diff --git a/schema-definitions/mobility.json b/schema-definitions/mobility.json index d76cc36..f3a87fc 100644 --- a/schema-definitions/mobility.json +++ b/schema-definitions/mobility.json @@ -675,246 +675,6 @@ } ] } - }, - "bonusProducts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "minLength": 1 - }, - "isActive": { - "type": "boolean" - }, - "operatorId": { - "type": "string", - "minLength": 1 - }, - "formFactors": { - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "string", - "const": "SCOOTER" - }, - { - "type": "string", - "const": "SCOOTER_STANDING" - }, - { - "type": "string", - "const": "BICYCLE" - }, - { - "type": "string", - "const": "CAR" - } - ] - } - }, - "price": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - "currencyCode": { - "type": "string", - "const": "ATB_BONUS_POINT" - } - }, - "required": ["amount", "currencyCode"] - }, - "paymentDescription": { - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "lang": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["lang", "value"] - }, - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - ] - } - }, - "productDescription": { - "type": "object", - "properties": { - "title": { - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "lang": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["lang", "value"] - }, - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - ] - } - }, - "description": { - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "lang": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["lang", "value"] - }, - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - ] - } - } - }, - "required": ["title"] - } - }, - "required": [ - "id", - "isActive", - "operatorId", - "formFactors", - "price", - "paymentDescription", - "productDescription" - ] - } - }, - "bonusTexts": { - "type": "object", - "properties": { - "howBonusWorks": { - "type": "object", - "properties": { - "title": { - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "lang": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["lang", "value"] - }, - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - ] - } - }, - "description": { - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "lang": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["lang", "value"] - }, - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - ] - } - } - }, - "required": ["title", "description"] - } - }, - "required": ["howBonusWorks"] } }, "required": ["operators"] diff --git a/src/mobility.ts b/src/mobility.ts index c325dbf..1002ead 100644 --- a/src/mobility.ts +++ b/src/mobility.ts @@ -118,24 +118,3 @@ export const ConsentLine = z.object({ }); export type ConsentLineType = z.infer; - -export const BonusProduct = z.object({ - id: z.string().nonempty(), - isActive: z.boolean(), - operatorId: MobilityOperator.shape.id, - formFactors: z.array(FormFactor).nonempty(), - price: z.object({ - amount: z.number().int().positive(), - currencyCode: z.literal('ATB_BONUS_POINT'), - }), - paymentDescription: LanguageAndTextTypeArray.nonempty(), - productDescription: titleAndOptionalDescription, -}); - -export type BonusProductType = z.infer; - -export const BonusTexts = z.object({ - howBonusWorks: titleAndDescription, -}); - -export type BonusTextsType = z.infer; diff --git a/src/tools/specifications-types.ts b/src/tools/specifications-types.ts index 808f0f0..0903db0 100644 --- a/src/tools/specifications-types.ts +++ b/src/tools/specifications-types.ts @@ -2,8 +2,6 @@ import {z} from 'zod'; import {FareProductGroup, FareProductTypeConfig} from '../fare-product-type'; import {TravelSearchFilters} from '../travel-search-filters'; import { - BonusProduct, - BonusTexts, ConsentLine, MobilityOperator, OperatorBenefitId, @@ -66,8 +64,6 @@ export const schemaTypes = { scooterConsentLines: z.array(ConsentLine).optional(), bicycleConsentLines: z.array(ConsentLine).optional(), benefitIdsRequiringValueCode: z.array(OperatorBenefitId).optional(), - bonusProducts: z.array(BonusProduct).optional(), - bonusTexts: BonusTexts.optional(), }) .meta({title: 'MobilityOperator'}), other: Other,