diff --git a/maas-schemas/package.json b/maas-schemas/package.json index 1422f957c..81dd6463b 100644 --- a/maas-schemas/package.json +++ b/maas-schemas/package.json @@ -1,6 +1,6 @@ { "name": "maas-schemas", - "version": "20.7.0", + "version": "20.8.0", "description": "Schemas for MaaS infrastructure", "main": "index.js", "engine": { diff --git a/maas-schemas/schemas/maas-backend/bookings/bookings-agency-options/request.json b/maas-schemas/schemas/maas-backend/bookings/bookings-agency-options/request.json index c7687ebb9..75a62c3f7 100644 --- a/maas-schemas/schemas/maas-backend/bookings/bookings-agency-options/request.json +++ b/maas-schemas/schemas/maas-backend/bookings/bookings-agency-options/request.json @@ -6,6 +6,15 @@ "additionalProperties": false, "required": ["identityId", "payload", "agencyId", "headers"], "properties": { + "filters": { + "type": "string", + "pattern": "[a-zA-Z_]+==[\\-a-zA-Z0-9]+(?=[;,]|$)", + "description": "Schema for client filters which are passed to TSP-adapter. Based on https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters", + "examples": [ + "ticketZone==ATM-m1,ticketZone==ATM-m2", + "ticketType==daily;ticketZone==ATM-m2" + ] + }, "identityId": { "$ref": "https://schemas.maas.global/core/components/units.json#/definitions/identityId" }, diff --git a/maas-schemas/schemas/maas-backend/bookings/bookings-options/request.json b/maas-schemas/schemas/maas-backend/bookings/bookings-options/request.json index 84b75d673..4c434eb55 100644 --- a/maas-schemas/schemas/maas-backend/bookings/bookings-options/request.json +++ b/maas-schemas/schemas/maas-backend/bookings/bookings-options/request.json @@ -21,15 +21,6 @@ "type": "object", "additionalProperties": false, "properties": { - "filters": { - "type": "string", - "pattern": "[a-zA-Z_]+==[\\-a-zA-Z0-9]+(?=[;,]|$)", - "description": "Schema for client filters which are passed to TSP-adapter. Based on https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters", - "examples": [ - "ticketZone==ATM-m1,ticketZone==ATM-m2", - "ticketType==daily;ticketZone==ATM-m2" - ] - }, "mode": { "$ref": "https://schemas.maas.global/core/components/travel-mode.json" }, diff --git a/maas-schemas/src/io-ts/_translation.log b/maas-schemas/src/io-ts/_translation.log index b9a3b7a26..c11cbccad 100644 --- a/maas-schemas/src/io-ts/_translation.log +++ b/maas-schemas/src/io-ts/_translation.log @@ -1414,6 +1414,12 @@ WARNING: patternProperty support has limitations in schemas/maas-backend/bookings/bookings-agency-options/request.json WARNING: unexpected key in a $ref object in schemas/maas-backend/bookings/bookings-agency-options/request.json +INFO: primitive type "string" used outside top-level definitions + in schemas/maas-backend/bookings/bookings-agency-options/request.json +WARNING: pattern field not supported outside top-level definitions + in schemas/maas-backend/bookings/bookings-agency-options/request.json +WARNING: examples field not supported outside top-level definitions + in schemas/maas-backend/bookings/bookings-agency-options/request.json INFO: missing description in schemas/maas-backend/bookings/bookings-agency-options/request.json INFO: primitive type "string" used outside top-level definitions @@ -1464,12 +1470,6 @@ WARNING: pattern field not supported outside top-level definitions in schemas/maas-backend/bookings/bookings-list/request.json WARNING: minItems field not supported outside top-level definitions in schemas/maas-backend/bookings/bookings-list/response.json -INFO: primitive type "string" used outside top-level definitions - in schemas/maas-backend/bookings/bookings-options/request.json -WARNING: pattern field not supported outside top-level definitions - in schemas/maas-backend/bookings/bookings-options/request.json -WARNING: examples field not supported outside top-level definitions - in schemas/maas-backend/bookings/bookings-options/request.json WARNING: unexpected key in a $ref object in schemas/maas-backend/bookings/bookings-options/request.json INFO: primitive type "string" used outside top-level definitions @@ -1480,12 +1480,6 @@ WARNING: maxLength field not supported outside top-level definitions in schemas/maas-backend/bookings/bookings-options/request.json WARNING: patternProperty support has limitations in schemas/maas-backend/bookings/bookings-options/request.json -INFO: primitive type "string" used outside top-level definitions - in schemas/maas-backend/bookings/bookings-options/request.json -WARNING: pattern field not supported outside top-level definitions - in schemas/maas-backend/bookings/bookings-options/request.json -WARNING: examples field not supported outside top-level definitions - in schemas/maas-backend/bookings/bookings-options/request.json WARNING: unexpected key in a $ref object in schemas/maas-backend/bookings/bookings-options/request.json INFO: primitive type "string" used outside top-level definitions diff --git a/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-agency-options/request.ts b/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-agency-options/request.ts index 7fc6f62a9..5ff78004b 100644 --- a/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-agency-options/request.ts +++ b/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-agency-options/request.ts @@ -200,6 +200,7 @@ export type PayloadBrand = { // The default export. More information at the top. export type Request = t.Branded< { + filters?: string; identityId?: Units_c404_.IdentityId; agencyId?: Common_ffba_.AgencyId; payload?: Payload; @@ -216,6 +217,7 @@ export type RequestC = t.BrandC< t.IntersectionC< [ t.PartialC<{ + filters: t.StringC; identityId: typeof Units_c404_.IdentityId; agencyId: typeof Common_ffba_.AgencyId; payload: typeof Payload; @@ -234,6 +236,7 @@ export type RequestC = t.BrandC< export const Request: RequestC = t.brand( t.intersection([ t.partial({ + filters: t.string, identityId: Units_c404_.IdentityId, agencyId: Common_ffba_.AgencyId, payload: Payload, @@ -250,6 +253,7 @@ export const Request: RequestC = t.brand( x, ): x is t.Branded< { + filters?: string; identityId?: Units_c404_.IdentityId; agencyId?: Common_ffba_.AgencyId; payload?: Payload; diff --git a/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-options/request.ts b/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-options/request.ts index 9f9ecb563..5f5eab11e 100644 --- a/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-options/request.ts +++ b/maas-schemas/src/io-ts/_types/maas-backend/bookings/bookings-options/request.ts @@ -40,7 +40,6 @@ export const schemaId = // The purpose of this remains a mystery export type Payload = t.Branded< { - filters?: string; mode?: TravelMode_5e34_.TravelMode; startTime?: Units_c404_.Time; endTime?: Units_c404_.Time; @@ -58,7 +57,6 @@ export type Payload = t.Branded< code?: string; } & Record< string, - | string | TravelMode_5e34_.TravelMode | Units_c404_.Time | Units_c404_.Time @@ -82,7 +80,6 @@ export type PayloadC = t.BrandC< t.IntersectionC< [ t.PartialC<{ - filters: t.StringC; mode: typeof TravelMode_5e34_.TravelMode; startTime: typeof Units_c404_.Time; endTime: typeof Units_c404_.Time; @@ -103,7 +100,6 @@ export type PayloadC = t.BrandC< t.StringC, t.UnionC< [ - t.StringC, typeof TravelMode_5e34_.TravelMode, typeof Units_c404_.Time, typeof Units_c404_.Time, @@ -130,7 +126,6 @@ export type PayloadC = t.BrandC< export const Payload: PayloadC = t.brand( t.intersection([ t.partial({ - filters: t.string, mode: TravelMode_5e34_.TravelMode, startTime: Units_c404_.Time, endTime: Units_c404_.Time, @@ -150,7 +145,6 @@ export const Payload: PayloadC = t.brand( t.record( t.string, t.union([ - t.string, TravelMode_5e34_.TravelMode, Units_c404_.Time, Units_c404_.Time, @@ -174,7 +168,6 @@ export const Payload: PayloadC = t.brand( x, ): x is t.Branded< { - filters?: string; mode?: TravelMode_5e34_.TravelMode; startTime?: Units_c404_.Time; endTime?: Units_c404_.Time; @@ -192,7 +185,6 @@ export const Payload: PayloadC = t.brand( code?: string; } & Record< string, - | string | TravelMode_5e34_.TravelMode | Units_c404_.Time | Units_c404_.Time