mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-29 09:32:49 +00:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4036bfd193 | ||
|
|
f4f372b9ad | ||
|
|
872c1f5fc3 | ||
|
|
4f2ca30dab | ||
|
|
882483ee24 | ||
|
|
c998166938 | ||
|
|
d61e33de39 | ||
|
|
07d6c4770a | ||
|
|
aab3e9fa6c | ||
|
|
4a4cd4e6d4 | ||
|
|
942cd11469 | ||
|
|
fe090c7387 | ||
|
|
f0782d8820 | ||
|
|
a2461d5904 | ||
|
|
d2e0069dc2 | ||
|
|
9c6972af78 | ||
|
|
56b03aa0b9 | ||
|
|
b517837671 | ||
|
|
6f03ede8bf | ||
|
|
952207ace1 | ||
|
|
3d9d28c60c | ||
|
|
913c5691da | ||
|
|
03cdbc6f9b | ||
|
|
9f886a8968 | ||
|
|
e80afe2c93 | ||
|
|
6b10cc86d8 | ||
|
|
1aedd6332f | ||
|
|
790c8bbc3f |
@@ -47,6 +47,16 @@ test:
|
||||
- report
|
||||
- coverage
|
||||
|
||||
mapping:
|
||||
dependencies:
|
||||
- build
|
||||
stage: test
|
||||
services:
|
||||
- name: registry.gitlab.com/openstapps/database:master
|
||||
alias: elasticsearch
|
||||
script:
|
||||
- node ./node_modules/@openstapps/core-tools/lib/cli.js put-es-templates ./src http://elasticsearch:9200/ "pattern,see,minlength,tjs-format"
|
||||
|
||||
package:
|
||||
dependencies:
|
||||
- build
|
||||
|
||||
44
CHANGELOG.md
44
CHANGELOG.md
@@ -1,3 +1,47 @@
|
||||
# [0.47.0](https://gitlab.com/openstapps/core/compare/v0.46.0...v0.47.0) (2021-06-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* set date-series frequency non translatable ([4a4cd4e](https://gitlab.com/openstapps/core/commit/4a4cd4e6d4b01ac34b5338dfcf4aeb959f54461d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* make SCDateSeries.frequency compliant with schema.org ([942cd11](https://gitlab.com/openstapps/core/commit/942cd1146966aa9e60321160489a6605877925e9))
|
||||
|
||||
|
||||
|
||||
# [0.46.0](https://gitlab.com/openstapps/core/compare/v0.45.0...v0.46.0) (2021-05-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* change range offer to use date range ([9c6972a](https://gitlab.com/openstapps/core/commit/9c6972af787678567409877b6bc9f9417e1374e2))
|
||||
|
||||
|
||||
|
||||
# [0.45.0](https://gitlab.com/openstapps/core/compare/v0.44.0...v0.45.0) (2021-04-26)
|
||||
|
||||
|
||||
|
||||
# [0.44.0](https://gitlab.com/openstapps/core/compare/v0.43.0...v0.44.0) (2021-04-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add support for multiple values in the value filter ([913c569](https://gitlab.com/openstapps/core/commit/913c5691da46ad2591fe14bcf7286f12b29ab5ee))
|
||||
|
||||
|
||||
|
||||
# [0.43.0](https://gitlab.com/openstapps/core/compare/v0.42.0...v0.43.0) (2021-04-07)
|
||||
|
||||
|
||||
|
||||
# [0.42.0](https://gitlab.com/openstapps/core/compare/v0.41.0...v0.42.0) (2021-02-16)
|
||||
|
||||
|
||||
|
||||
# [0.41.0](https://gitlab.com/openstapps/core/compare/v0.40.0...v0.41.0) (2021-02-08)
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ External dependencies can not be covered by the annotations. Documentation about
|
||||
| `@sortable` | field is sortable if the core schema is used to put data into a database/key-value store. Fields are always sortable through generic sort, even without annotation. | sort method to be used: `ducet`, `price`, `distance` |
|
||||
| `@text` | string field is interpreted as text | |
|
||||
| `@date` | string field is interpreted as a date field | |
|
||||
| `@validatable` | marks the type as validatable if the core schema is used to put data into a database/key-value store | |
|
||||
| `@validatable` | Marks the type for json schema generation, which can be checked at runtime. Any top-level type that is put into a database should always be marked as validatable. | |
|
||||
| `@filterable` | non-object/nested field is filterable if the core schema is used to put data into a database/key-value store | |
|
||||
| `@inheritTags` | inherit all tags from another field | `[SCThingType]::[field]` |
|
||||
|
||||
|
||||
1256
package-lock.json
generated
1256
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"version": "0.42.0",
|
||||
"version": "0.48.0",
|
||||
"description": "StAppsCore - Generalized model of data",
|
||||
"keywords": [
|
||||
"Model",
|
||||
@@ -43,28 +43,28 @@
|
||||
"Wieland Schöbl"
|
||||
],
|
||||
"dependencies": {
|
||||
"@openstapps/core-tools": "0.17.0",
|
||||
"@openstapps/core-tools": "0.21.0",
|
||||
"@types/geojson": "1.0.6",
|
||||
"@types/json-patch": "0.0.30",
|
||||
"@types/json-schema": "7.0.7",
|
||||
"@types/node": "10.17.44",
|
||||
"@types/node": "14.17.4",
|
||||
"fast-clone": "1.5.13",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"http-status-codes": "2.1.4",
|
||||
"json-patch": "0.7.0",
|
||||
"json-schema": "0.2.5",
|
||||
"json-schema": "0.3.0",
|
||||
"ts-optchain": "0.1.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/configuration": "0.25.0",
|
||||
"@openstapps/logger": "0.5.0",
|
||||
"@openstapps/configuration": "0.27.0",
|
||||
"@openstapps/logger": "0.7.0",
|
||||
"@testdeck/mocha": "0.1.2",
|
||||
"@types/chai": "4.2.15",
|
||||
"@types/chai": "4.2.19",
|
||||
"@types/rimraf": "3.0.0",
|
||||
"chai": "4.3.0",
|
||||
"chai": "4.3.4",
|
||||
"conditional-type-checks": "1.0.5",
|
||||
"conventional-changelog-cli": "2.1.1",
|
||||
"mocha": "8.3.0",
|
||||
"mocha": "8.4.0",
|
||||
"nyc": "15.1.0",
|
||||
"rimraf": "3.0.2",
|
||||
"source-map-support": "0.5.19",
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when an internal server error occurred
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCInternalServerErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when the used HTTP method is not allowed on the requested route
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCMethodNotAllowedErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned when the requested route or resource was not found
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCNotFoundErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,8 @@ import {SCError} from '../error';
|
||||
/**
|
||||
* An error that is returned when the request is in the right format, but contains parameters that are invalid or not
|
||||
* acceptable.
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCParametersNotAcceptable extends SCError {
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,8 @@ import {SCPluginMetaData} from '../routes/plugin-register';
|
||||
* An error that is returned when a plugin with the same name is already registered, to prevent two copies of a plugin
|
||||
* running at the same time.
|
||||
* This usually indicates that there is more than one instance a plugin running.
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCPluginAlreadyRegisteredErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned whenever there is an unexpected error while creating a plugin
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCPluginRegisteringFailedErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when the request body is too large.
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCRequestBodyTooLargeErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned whenever there is a syntax error
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCSyntaxErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when to many request are submitted at once
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCTooManyRequestsErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned when the content type of the request is not supported
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCUnsupportedMediaTypeErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned when the validation of a request fails
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCValidationErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,7 @@ export class SCThingUpdateRoute extends SCAbstractRoute {
|
||||
];
|
||||
this.method = SCRouteHttpVerbs.PUT;
|
||||
this.obligatoryParameters = {
|
||||
TYPE: 'SCThingTypes',
|
||||
TYPE: 'SCThingType',
|
||||
UID: 'SCUuid',
|
||||
};
|
||||
this.requestBodyName = 'SCThingUpdateRequest';
|
||||
|
||||
@@ -19,6 +19,7 @@ import {SCMap} from '../../general/map';
|
||||
import {SCSearchAvailabilityFilter} from './filters/availability';
|
||||
import {SCSearchBooleanFilter} from './filters/boolean';
|
||||
import {SCSearchDistanceFilter} from './filters/distance';
|
||||
import {SCGeoFilter} from './filters/geo';
|
||||
import {SCSearchDateRangeFilter, SCSearchNumericRangeFilter} from './filters/range';
|
||||
import {SCSearchValueFilter} from './filters/value';
|
||||
|
||||
@@ -31,7 +32,8 @@ export type SCSearchFilterType =
|
||||
| 'distance'
|
||||
| 'value'
|
||||
| 'date range'
|
||||
| 'numeric range';
|
||||
| 'numeric range'
|
||||
| 'geo';
|
||||
|
||||
/**
|
||||
* Structure of a filter instruction
|
||||
@@ -62,4 +64,5 @@ export type SCSearchFilter =
|
||||
| SCSearchDistanceFilter
|
||||
| SCSearchValueFilter
|
||||
| SCSearchNumericRangeFilter
|
||||
| SCSearchDateRangeFilter;
|
||||
| SCSearchDateRangeFilter
|
||||
| SCGeoFilter;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 StApps
|
||||
* Copyright (C) 2019-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -33,17 +33,17 @@ export interface SCSearchAvailabilityFilter extends SCSearchAbstractFilter<SCAva
|
||||
*/
|
||||
export interface SCAvailabilityFilterArguments extends SCSearchAbstractFilterArguments {
|
||||
/**
|
||||
* Field which marks the start of the availability
|
||||
* Field which marks availability range
|
||||
*/
|
||||
fromField: SCThingsField;
|
||||
field: SCThingsField;
|
||||
|
||||
/**
|
||||
* Time to check. Defaults to 'now'
|
||||
* If set, the provided time will apply to the full hour, day, week, etc.
|
||||
*/
|
||||
time?: SCISO8601Date | 'now';
|
||||
scope?: 's' | 'm' | 'H' | 'd' | 'w' | 'M' | 'y';
|
||||
|
||||
/**
|
||||
* Field which marks the end of the availability
|
||||
* Time to check. Defaults current time if not set
|
||||
*/
|
||||
toField: SCThingsField;
|
||||
time?: SCISO8601Date;
|
||||
}
|
||||
|
||||
55
src/protocol/search/filters/geo.ts
Normal file
55
src/protocol/search/filters/geo.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// tslint:disable-next-line:no-implicit-dependencies
|
||||
import {Polygon} from 'geojson';
|
||||
import {SCThingsField} from '../../../meta';
|
||||
import {SCSearchAbstractFilter, SCSearchAbstractFilterArguments} from '../filter';
|
||||
|
||||
/**
|
||||
* A geo filter
|
||||
*
|
||||
* Filter for documents that are in relation to some geo data
|
||||
*/
|
||||
export interface SCGeoFilter extends SCSearchAbstractFilter<SCGeoFilterArguments> {
|
||||
/**
|
||||
* @see SCSearchAbstractFilter.type
|
||||
*/
|
||||
type: 'geo';
|
||||
}
|
||||
|
||||
/**
|
||||
* Arguments for filter instruction by geo data
|
||||
*/
|
||||
export interface SCGeoFilterArguments extends SCSearchAbstractFilterArguments {
|
||||
/**
|
||||
* Field on which to filter
|
||||
*/
|
||||
field: SCThingsField;
|
||||
|
||||
/**
|
||||
* Geo data to check up on
|
||||
*/
|
||||
shape: Polygon;
|
||||
|
||||
/**
|
||||
* Spatial relation between the provided shape and the shape of the field.
|
||||
*
|
||||
* intersects - both shapes intersect (default)
|
||||
* disjoint - both shapes don't intersect
|
||||
* within - the search shape contains the field shape
|
||||
* contains - the search shape is contained in the field shape
|
||||
*/
|
||||
spatialRelation?: 'intersects' | 'disjoint' | 'within' | 'contains';
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 StApps
|
||||
* Copyright (C) 2020-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -85,6 +85,15 @@ export interface SCRangeFilterArguments<T> extends SCSearchAbstractFilterArgumen
|
||||
* Field where the filter will be applied
|
||||
*/
|
||||
field: SCThingsField;
|
||||
|
||||
/**
|
||||
* Relation when searching on other range fields
|
||||
*
|
||||
* Intersects (Default): Both search and field range intersect
|
||||
* Within: Search range is within the field range
|
||||
* Contains: Search range contains the field range
|
||||
*/
|
||||
relation?: 'intersects' | 'within' | 'contains';
|
||||
}
|
||||
|
||||
export interface Bounds<T> {
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface SCValueFilterArguments extends SCSearchAbstractFilterArguments
|
||||
field: SCThingsField;
|
||||
|
||||
/**
|
||||
* Value to filter. Value has to match the field exactly.
|
||||
* Value to filter. One or more values has to match the field exactly.
|
||||
*/
|
||||
value: string;
|
||||
value: string | string[];
|
||||
}
|
||||
|
||||
64
src/things/abstract/range.ts
Normal file
64
src/things/abstract/range.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* 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 {SCISO8601Date} from '../../general/time';
|
||||
|
||||
/**
|
||||
* Date Range
|
||||
*
|
||||
* CAUTION: Changing the name requires changes in the core-tools premaps
|
||||
*/
|
||||
export type SCISO8601DateRange = SCRange<SCISO8601Date>;
|
||||
|
||||
/**
|
||||
* Generic range type
|
||||
*/
|
||||
export type SCRange<T> = {
|
||||
/**
|
||||
* Greater than value
|
||||
*/
|
||||
gt?: never;
|
||||
|
||||
/**
|
||||
* Greater or equal to value
|
||||
*/
|
||||
gte?: T;
|
||||
|
||||
/**
|
||||
* Greater than value
|
||||
*/
|
||||
lt?: never;
|
||||
|
||||
/**
|
||||
* Greater or equal to value
|
||||
*/
|
||||
lte?: T;
|
||||
} | {
|
||||
// tslint:disable:completed-docs
|
||||
gt?: T;
|
||||
gte?: never;
|
||||
lt?: T;
|
||||
lte?: never;
|
||||
} | {
|
||||
gt?: T;
|
||||
gte?: never;
|
||||
lt?: never;
|
||||
lte?: T;
|
||||
} | {
|
||||
gt?: never;
|
||||
gte?: T;
|
||||
lt?: T;
|
||||
lte?: never;
|
||||
// tslint:enable:completed-docs
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 StApps
|
||||
* Copyright (C) 2019-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -13,10 +13,10 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCMetaTranslations, SCTranslations} from '../../general/i18n';
|
||||
import {SCISO8601Date} from '../../general/time';
|
||||
import {SCOrganizationWithoutReferences} from '../organization';
|
||||
import {SCPersonWithoutReferences} from '../person';
|
||||
import {SCInPlace} from './place';
|
||||
import {SCISO8601DateRange} from './range';
|
||||
import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from './thing';
|
||||
|
||||
/**
|
||||
@@ -100,14 +100,9 @@ export interface SCThingThatCanBeOfferedOffer<T extends SCPriceGroup>
|
||||
availability: SCThingThatCanBeOfferedAvailability;
|
||||
|
||||
/**
|
||||
* The time when the thing becomes unavailable as an SCISO8601Date formatted string.
|
||||
* The time when the thing is available.
|
||||
*/
|
||||
availabilityEnds?: SCISO8601Date;
|
||||
|
||||
/**
|
||||
* The time when the thing becomes available as an SCISO8601Date formatted string.
|
||||
*/
|
||||
availabilityStarts?: SCISO8601Date;
|
||||
availabilityRange?: SCISO8601DateRange;
|
||||
|
||||
/**
|
||||
* List of prices that are distinct for specific groups
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface SCCatalogWithoutReferences
|
||||
*
|
||||
* Needed for keeping order in catalog inheritance array.
|
||||
*
|
||||
* @filterable
|
||||
* @integer
|
||||
*/
|
||||
level: number;
|
||||
|
||||
@@ -65,9 +65,9 @@ export interface SCDateSeriesWithoutReferences
|
||||
/**
|
||||
* Frequency of the date series
|
||||
*
|
||||
* @keyword
|
||||
* @filterable
|
||||
*/
|
||||
frequency: string;
|
||||
repeatFrequency?: SCISO8601Duration;
|
||||
|
||||
/**
|
||||
* Translated properties
|
||||
@@ -131,7 +131,7 @@ export class SCDateSeriesMeta
|
||||
duration: 'Dauer',
|
||||
event: 'Event',
|
||||
exceptions: 'Ausnahmen',
|
||||
frequency: 'Frequenz',
|
||||
repeatFrequency: 'Frequenz',
|
||||
performers: 'Vortragende',
|
||||
},
|
||||
en: {
|
||||
@@ -143,7 +143,7 @@ export class SCDateSeriesMeta
|
||||
duration: 'duration',
|
||||
event: 'event',
|
||||
exceptions: 'exceptions',
|
||||
frequency: 'frequency',
|
||||
repeatFrequency: 'frequency',
|
||||
performers: 'performers',
|
||||
},
|
||||
};
|
||||
@@ -174,8 +174,4 @@ export class SCDateSeriesMeta
|
||||
*/
|
||||
export interface SCDateSeriesTranslatableProperties
|
||||
extends SCThingThatCanBeOfferedTranslatableProperties {
|
||||
/**
|
||||
* @see SCDateSeriesWithoutReferences.frequency
|
||||
*/
|
||||
frequency?: string;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"frequency": "once",
|
||||
"repeatFrequency": "P1W",
|
||||
"dates": [
|
||||
"2016-04-15T17:00:00+00:00"
|
||||
],
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"name": "EMH 225",
|
||||
"floorName": "2"
|
||||
},
|
||||
"frequency": "once",
|
||||
"dates": [
|
||||
"2016-04-12T11:00:00+00:00"
|
||||
],
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"name": "EMH 225",
|
||||
"floorName": "2"
|
||||
},
|
||||
"frequency": "once",
|
||||
"dates": [
|
||||
"2016-04-12T11:00:00+00:00"
|
||||
],
|
||||
@@ -43,8 +42,10 @@
|
||||
"offers": [
|
||||
{
|
||||
"availability": "in stock",
|
||||
"availabilityStarts": "2017-01-30T00:00:00.000Z",
|
||||
"availabilityEnds": "2017-01-30T23:59:59.999Z",
|
||||
"availabilityRange": {
|
||||
"gte": "2017-01-30T00:00:00.000Z",
|
||||
"lte": "2017-01-30T23:59:59.999Z"
|
||||
},
|
||||
"prices": {
|
||||
"default": 6.5,
|
||||
"student": 5,
|
||||
|
||||
@@ -19,8 +19,10 @@
|
||||
"offers": [
|
||||
{
|
||||
"availability": "in stock",
|
||||
"availabilityStarts": "2017-01-30T00:00:00.000Z",
|
||||
"availabilityEnds": "2017-01-30T23:59:59.999Z",
|
||||
"availabilityRange": {
|
||||
"gte": "2017-01-30T00:00:00.000Z",
|
||||
"lte": "2017-01-30T23:59:59.999Z"
|
||||
},
|
||||
"prices": {
|
||||
"default": 4.85,
|
||||
"student": 2.85,
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
"uid": "3b9b3df6-3a7a-58cc-922f-c7335c002634"
|
||||
},
|
||||
"availability": "in stock",
|
||||
"availabilityStarts": "2017-01-30T00:00:00.000Z",
|
||||
"availabilityEnds": "2017-01-30T23:59:59.999Z",
|
||||
"availabilityRange": {
|
||||
"gte": "2017-01-30T00:00:00.000Z",
|
||||
"lte": "2017-01-30T23:59:59.999Z"
|
||||
},
|
||||
"inPlace": {
|
||||
"geo": {
|
||||
"point": {
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
],
|
||||
"offers": [
|
||||
{
|
||||
"availabilityEnds": "2017-03-27T23:59:59.000Z",
|
||||
"availabilityStarts": "2017-03-27T00:00:00.000Z",
|
||||
"availability": "in stock",
|
||||
"availabilityRange": {
|
||||
"gte": "2017-03-27T00:00:00.000Z",
|
||||
"lte": "2017-03-27T23:59:59.000Z"
|
||||
},
|
||||
"inPlace": {
|
||||
"type": "room",
|
||||
"name": "Cafeteria LEVEL",
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
},
|
||||
{
|
||||
"arguments": {
|
||||
"fromField": "availabilityStarts",
|
||||
"toField": "availabilityEnds",
|
||||
"scope": "d",
|
||||
"field": "availabilityRange",
|
||||
"time": "2018-01-15T04:13:00+00:00"
|
||||
},
|
||||
"type": "availability"
|
||||
|
||||
@@ -102,7 +102,7 @@ function getExtendedTypes(thingReflection: DeclarationReflection,
|
||||
return extendedTypes;
|
||||
}
|
||||
|
||||
@suite(timeout(10000), slow(5000))
|
||||
@suite(timeout(15000), slow(10000))
|
||||
export class SchemaSpec {
|
||||
static objects: { [name: string]: DeclarationReflection } = {};
|
||||
static reflection: ProjectReflection;
|
||||
|
||||
Reference in New Issue
Block a user