s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
309 lines • 15.2 kB
JavaScript
/**
* # GBFS System Alerts Schema V3.1-RC
* Describes ad-hoc changes to the system.
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.1-RC/gbfs.md#system_alertsjson)
*/
export const gbfsSystemAlertsSchemaV31RC = {
$schema: 'http://json-schema.org/draft-07/schema',
$id: 'https://github.com/MobilityData/gbfs/blob/v3.1-RC/gbfs.md#system_alertsjson',
description: 'Describes ad-hoc changes to the system.',
type: 'object',
properties: {
last_updated: {
description: 'Last time the data in the feed was updated in RFC3339 format.',
type: 'string',
format: 'date-time',
},
ttl: {
description: 'Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).',
type: 'integer',
minimum: 0,
},
version: {
description: 'GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).',
type: 'string',
const: '3.1-RC',
},
data: {
description: 'Array that contains ad-hoc alerts for the system.',
type: 'object',
properties: {
alerts: {
type: 'array',
items: {
type: 'object',
properties: {
alert_id: {
description: 'Identifier for this alert.',
type: 'string',
},
type: {
description: 'Type of alert.',
type: 'string',
enum: ['system_closure', 'station_closure', 'station_move', 'other'],
},
times: {
description: 'Array of objects indicating when the alert is in effect.',
type: 'array',
items: {
type: 'object',
properties: {
start: {
description: 'Start time of the alert.',
type: 'string',
format: 'date-time',
},
end: {
description: 'End time of the alert.',
type: 'string',
format: 'date-time',
},
},
},
additionalItems: false,
required: ['start'],
},
station_ids: {
description: 'Array of identifiers of the stations for which this alert applies.',
type: 'array',
items: {
type: 'string',
},
},
region_ids: {
description: 'Array of identifiers of the regions for which this alert applies.',
type: 'array',
items: {
type: 'string',
},
},
url: {
description: 'URL where the customer can learn more information about this alert.',
type: 'array',
items: {
type: 'object',
properties: {
text: {
description: 'The translated text.',
type: 'string',
format: 'uri',
},
language: {
description: 'IETF BCP 47 language code.',
type: 'string',
pattern: '^[a-z]{2,3}(-[A-Z]{2})?$',
},
},
required: ['text', 'language'],
},
},
summary: {
description: 'A short summary of this alert to be displayed to the customer.',
type: 'array',
items: {
type: 'object',
properties: {
text: {
description: 'The translated text.',
type: 'string',
},
language: {
description: 'IETF BCP 47 language code.',
type: 'string',
pattern: '^[a-z]{2,3}(-[A-Z]{2})?$',
},
},
required: ['text', 'language'],
},
},
description: {
description: 'Detailed description of the alert.',
type: 'array',
items: {
type: 'object',
properties: {
text: {
description: 'The translated text.',
type: 'string',
},
language: {
description: 'IETF BCP 47 language code.',
type: 'string',
pattern: '^[a-z]{2,3}(-[A-Z]{2})?$',
},
},
required: ['text', 'language'],
},
},
last_updated: {
description: 'Indicates the last time the info for the alert was updated.',
type: 'string',
format: 'date-time',
},
},
required: ['alert_id', 'type', 'summary'],
},
},
},
required: ['alerts'],
},
},
required: ['last_updated', 'ttl', 'version', 'data'],
};
/**
* # GBFS System Alerts Schema V3.0
* Describes ad-hoc changes to the system.
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.0/gbfs.md#system_alertsjson)
*/
export const gbfsSystemAlertsSchemaV30 = {
$schema: 'http://json-schema.org/draft-07/schema',
$id: 'https://github.com/MobilityData/gbfs/blob/v3.0/gbfs.md#system_alertsjson',
description: 'Describes ad-hoc changes to the system.',
type: 'object',
properties: {
last_updated: {
description: 'Last time the data in the feed was updated in RFC3339 format.',
type: 'string',
format: 'date-time',
},
ttl: {
description: 'Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).',
type: 'integer',
minimum: 0,
},
version: {
description: 'GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).',
type: 'string',
const: '3.0',
},
data: {
description: 'Array that contains ad-hoc alerts for the system.',
type: 'object',
properties: {
alerts: {
type: 'array',
items: {
type: 'object',
properties: {
alert_id: {
description: 'Identifier for this alert.',
type: 'string',
},
type: {
description: 'Type of alert.',
type: 'string',
enum: ['system_closure', 'station_closure', 'station_move', 'other'],
},
times: {
description: 'Array of objects indicating when the alert is in effect.',
type: 'array',
items: {
type: 'object',
properties: {
start: {
description: 'Start time of the alert.',
type: 'string',
format: 'date-time',
},
end: {
description: 'End time of the alert.',
type: 'string',
format: 'date-time',
},
},
},
additionalItems: false,
required: ['start'],
},
station_ids: {
description: 'Array of identifiers of the stations for which this alert applies.',
type: 'array',
items: {
type: 'string',
},
},
region_ids: {
description: 'Array of identifiers of the regions for which this alert applies.',
type: 'array',
items: {
type: 'string',
},
},
url: {
description: 'URL where the customer can learn more information about this alert.',
type: 'array',
items: {
type: 'object',
properties: {
text: {
description: 'The translated text.',
type: 'string',
format: 'uri',
},
language: {
description: 'IETF BCP 47 language code.',
type: 'string',
pattern: '^[a-z]{2,3}(-[A-Z]{2})?$',
},
},
required: ['text', 'language'],
},
},
summary: {
description: 'A short summary of this alert to be displayed to the customer.',
type: 'array',
items: {
type: 'object',
properties: {
text: {
description: 'The translated text.',
type: 'string',
},
language: {
description: 'IETF BCP 47 language code.',
type: 'string',
pattern: '^[a-z]{2,3}(-[A-Z]{2})?$',
},
},
required: ['text', 'language'],
},
},
description: {
description: 'Detailed description of the alert.',
type: 'array',
items: {
type: 'object',
properties: {
text: {
description: 'The translated text.',
type: 'string',
},
language: {
description: 'IETF BCP 47 language code.',
type: 'string',
pattern: '^[a-z]{2,3}(-[A-Z]{2})?$',
},
},
required: ['text', 'language'],
},
},
last_updated: {
description: 'Indicates the last time the info for the alert was updated.',
type: 'string',
format: 'date-time',
},
},
required: ['alert_id', 'type', 'summary'],
},
},
},
required: ['alerts'],
},
},
required: ['last_updated', 'ttl', 'version', 'data'],
};
//# sourceMappingURL=systemAlerts.js.map