mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
@@ -12,8 +12,15 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCAuthorizationProvider, SCBackendAggregationConfiguration, SCThingType} from '@openstapps/core';
|
||||
import {
|
||||
SCAboutPageContentType,
|
||||
SCAuthorizationProvider,
|
||||
SCBackendAggregationConfiguration,
|
||||
SCIndexResponse, SCSettingInputType, SCThingOriginType,
|
||||
SCThingType
|
||||
} from '@openstapps/core';
|
||||
import {Polygon} from 'geojson';
|
||||
import packageJson from "../../../../package.json";
|
||||
|
||||
// provides sample aggregations to be used in tests or backendless development
|
||||
export const sampleAggregations: SCBackendAggregationConfiguration[] = [
|
||||
@@ -118,3 +125,161 @@ export const sampleDefaultPolygon: Polygon = {
|
||||
],
|
||||
"type": "Polygon"
|
||||
}
|
||||
|
||||
const scVersion = packageJson.dependencies['@openstapps/core'];
|
||||
|
||||
export const sampleIndexResponse: SCIndexResponse = {
|
||||
app: {
|
||||
aboutPages: {
|
||||
about: {
|
||||
title: 'About',
|
||||
content: [
|
||||
{
|
||||
value: 'This is the about page',
|
||||
type: SCAboutPageContentType.MARKDOWN,
|
||||
translations: {
|
||||
en: {
|
||||
value: 'This is the about page',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
translations: {
|
||||
en: {
|
||||
title: 'About',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
campusPolygon: {
|
||||
coordinates: [[[1, 2]], [[1, 2]]],
|
||||
type: 'Polygon',
|
||||
},
|
||||
features: {},
|
||||
menus: [
|
||||
{
|
||||
icon: 'icon',
|
||||
id: 'main',
|
||||
items: [
|
||||
{
|
||||
icon: 'icon',
|
||||
route: '/index',
|
||||
title: 'start',
|
||||
translations: {
|
||||
de: {
|
||||
title: 'Start',
|
||||
},
|
||||
en: {
|
||||
title: 'start',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
name: 'main',
|
||||
translations: {
|
||||
de: {
|
||||
name: 'Haupt',
|
||||
},
|
||||
en: {
|
||||
name: 'main',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
name: 'StApps',
|
||||
privacyPolicyUrl: 'foo.bar',
|
||||
settings: [
|
||||
{
|
||||
categories: ['credentials'],
|
||||
defaultValue: '',
|
||||
inputType: SCSettingInputType.Text,
|
||||
name: 'username',
|
||||
order: 0,
|
||||
origin: {
|
||||
indexed: '2018-09-11T12:30:00Z',
|
||||
name: 'Dummy',
|
||||
type: SCThingOriginType.Remote,
|
||||
},
|
||||
translations: {
|
||||
de: {
|
||||
name: 'Benutzername',
|
||||
},
|
||||
en: {
|
||||
name: 'Username',
|
||||
},
|
||||
},
|
||||
type: SCThingType.Setting,
|
||||
uid: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
auth: {},
|
||||
backend: {
|
||||
SCVersion: scVersion,
|
||||
externalRequestTimeout: 5000,
|
||||
hiddenTypes: [SCThingType.DateSeries, SCThingType.Diff, SCThingType.Floor],
|
||||
mappingIgnoredTags: [],
|
||||
maxMultiSearchRouteQueries: 5,
|
||||
maxRequestBodySize: 512 * 1024,
|
||||
name: 'Technische Universität Berlin',
|
||||
namespace: '909a8cbc-8520-456c-b474-ef1525f14209',
|
||||
sortableFields: [
|
||||
{
|
||||
fieldName: 'name',
|
||||
sortTypes: ['ducet'],
|
||||
},
|
||||
{
|
||||
fieldName: 'type',
|
||||
sortTypes: ['ducet'],
|
||||
},
|
||||
{
|
||||
fieldName: 'categories',
|
||||
onlyOnTypes: [
|
||||
SCThingType.AcademicEvent,
|
||||
SCThingType.Building,
|
||||
SCThingType.Catalog,
|
||||
SCThingType.Dish,
|
||||
SCThingType.PointOfInterest,
|
||||
SCThingType.Room,
|
||||
],
|
||||
sortTypes: ['ducet'],
|
||||
},
|
||||
{
|
||||
fieldName: 'geo',
|
||||
onlyOnTypes: [
|
||||
SCThingType.Building,
|
||||
SCThingType.PointOfInterest,
|
||||
SCThingType.Room,
|
||||
],
|
||||
sortTypes: ['distance'],
|
||||
},
|
||||
{
|
||||
fieldName: 'geo',
|
||||
onlyOnTypes: [
|
||||
SCThingType.Building,
|
||||
SCThingType.PointOfInterest,
|
||||
SCThingType.Room,
|
||||
],
|
||||
sortTypes: ['distance'],
|
||||
},
|
||||
{
|
||||
fieldName: 'inPlace.geo',
|
||||
onlyOnTypes: [
|
||||
SCThingType.DateSeries,
|
||||
SCThingType.Dish,
|
||||
SCThingType.Floor,
|
||||
SCThingType.Organization,
|
||||
SCThingType.PointOfInterest,
|
||||
SCThingType.Room,
|
||||
SCThingType.Ticket,
|
||||
],
|
||||
sortTypes: ['distance'],
|
||||
},
|
||||
{
|
||||
fieldName: 'offers',
|
||||
onlyOnTypes: [SCThingType.Dish],
|
||||
sortTypes: ['price'],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user