diff --git a/deliverables/1 search offers/AfterSalesFee.yaml b/deliverables/1 search offers/AfterSalesFee.yaml new file mode 100644 index 0000000..1918be5 --- /dev/null +++ b/deliverables/1 search offers/AfterSalesFee.yaml @@ -0,0 +1,19 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + required: + - packageElementType + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: afterSalesFee + price: + $ref: .\Cost.yaml + description: The fee associated with the after-sales service. This can include costs for cancellations, + exchanges, or other post-purchase services. +example: + { + "packageElementType": "afterSalesFee", + "price": { "amount": 10.00, "currency": "EUR" } + } \ No newline at end of file diff --git a/deliverables/1 search offers/Allocation.yaml b/deliverables/1 search offers/Allocation.yaml new file mode 100644 index 0000000..4f56476 --- /dev/null +++ b/deliverables/1 search offers/Allocation.yaml @@ -0,0 +1,61 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + required: + - allocationType + - packageElementType + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: allocation + allocationType: + type: string + description: The type of allocation provided. + x-enum : [spot, asset] + typeOfSpot: + type: string + description: The type of spot allocated. + x-enum : [seat, berth, other] + typeOfAsset: + type: string + description: The type of asset allocated. The allowed values are defined in 'asset-type' lookup. + description: + type: string + description: A description of the allocation. + reference: + oneOf: + - type: string + description: A spot reference identifier for the allocation. + format: spot-ref + - type: string + description: An asset reference identifier for the allocation. + format: asset-ref + numberOfAllocatedUnits: + type: integer + description: The number of allocated units for the allocation (spots or assets). + appliesTo: + type: array + description: A list of package elements to which this allocation applies + items: + type: string + format: package-element-ref +examples: +- { + "packageElementType": "allocation", + "allocationType": "spot", + "typeOfSpot": "seat", + "description": "Allocated seat for the trip.", + "reference": "SPOT-123", + "numberOfAllocatedUnits": 1, + "appliesTo": ["PE-123"] + } +- { + "packageElementType": "allocation", + "allocationType": "asset", + "typeOfAsset": "normal-bike", + "description": "Normal bike for the trip.", + "reference": "DEFAULT_BIKE", + "numberOfAllocatedUnits": 2, + "appliesTo": ["PE-456"] + } \ No newline at end of file diff --git a/deliverables/1 search offers/AllocationPlaceHolder.yaml b/deliverables/1 search offers/AllocationPlaceHolder.yaml new file mode 100644 index 0000000..77d80b8 --- /dev/null +++ b/deliverables/1 search offers/AllocationPlaceHolder.yaml @@ -0,0 +1,25 @@ +allOf: + - $ref: .\PlaceHolder.yaml + - type: object + properties: + placeHolderType: + type: string + const: allocation + selectableAllocations: + type: array + items: + type: string + format: allocation-ref + minimumToSelect: + type: integer + minimum: 0 + maximumToSelect: + type: integer + minimum: 0 +examples: +- { + "placeHolderType": "allocation", + "selectableAllocations": ["SEAT", "BERTH"], + "minimumToSelect": 1, + "maximumToSelect": 2 + } \ No newline at end of file diff --git a/deliverables/1 search offers/Ancillary.yaml b/deliverables/1 search offers/Ancillary.yaml new file mode 100644 index 0000000..1f423bc --- /dev/null +++ b/deliverables/1 search offers/Ancillary.yaml @@ -0,0 +1,26 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + required: + - ancillaryType + - packageElementType + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: ancillary + ancillaryType: + type: string + description: The type of ancillary service provided. The allowed values are defined in 'ancillary-type' lookup. + appliesTo: + type: array + description: A list of package elements to which this ancillary applies + items: + type: string + format: package-element-ref +examples: +- { + "packageElementType": "ancillary", + "ancillaryType": "meal", + "appliesTo": ["PE-123"] + } \ No newline at end of file diff --git a/deliverables/1 search offers/AncillaryPlaceHolder.yaml b/deliverables/1 search offers/AncillaryPlaceHolder.yaml new file mode 100644 index 0000000..2d918d6 --- /dev/null +++ b/deliverables/1 search offers/AncillaryPlaceHolder.yaml @@ -0,0 +1,25 @@ +allOf: + - $ref: .\PlaceHolder.yaml + - type: object + properties: + placeHolderType: + type: string + const: ancillary + selectableAncillaries: + type: array + items: + type: string + format: ancillary-ref + minimumToSelect: + type: integer + minimum: 0 + maximumToSelect: + type: integer + minimum: 0 +examples: +- { + "placeHolderType": "ancillary", + "selectableAncillaries": ["MEAL", "LUXURY_MEAL"], + "minimumToSelect": 0, + "maximumToSelect": 2 + } \ No newline at end of file diff --git a/deliverables/1 search offers/ContinuousLeg.yaml b/deliverables/1 search offers/ContinuousLeg.yaml new file mode 100644 index 0000000..107af42 --- /dev/null +++ b/deliverables/1 search offers/ContinuousLeg.yaml @@ -0,0 +1,30 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + properties: + legType: + type: string + description: discriminator for the leg type + const: continuous + continuousMode: + type: string + enum: [] + duration: + type: integer + description: Duration of the leg in minutes + individualMode: + type: string + enum: [] + startPlace: + type: string + format: place-ref + endPlace: + type: string + format: place-ref +examples: +- { + "legType": "continuous", + "duration": 120, + "startPlace": "PLACE-123", + "endPlace": "PLACE-456" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Cost.yaml b/deliverables/1 search offers/Cost.yaml new file mode 100644 index 0000000..a5f0a3c --- /dev/null +++ b/deliverables/1 search offers/Cost.yaml @@ -0,0 +1,23 @@ +type: object +properties: + amount: + type: number + description: The monetary amount of the cost. + format: float + currency: + type: string + description: The currency of the cost, represented as a three-letter ISO 4217 code + taxes: + type: array + description: A list of taxes associated with the cost. + items: + $ref: .\Tax.yaml +examples: +- { + "amount": 100.00, + "currency": "EUR", + "taxes": [ + { "taxType": "VAT", "amount": 20.00, "currency": "EUR" }, + { "taxType": "Service Tax", "amount": 5.00, "currency": "EUR" } + ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/Delivery.yaml b/deliverables/1 search offers/Delivery.yaml new file mode 100644 index 0000000..d7e0ddb --- /dev/null +++ b/deliverables/1 search offers/Delivery.yaml @@ -0,0 +1,16 @@ +type: object +properties: + request: + type: string + description: Identifier of the originating request + format: request-ref + warnings: + type: array + description: List of warnings related to the request + items: + $ref: .\Warning.yaml + errors: + type: array + description: List of errors related to the request + items: + $ref: .\Error.yaml \ No newline at end of file diff --git a/deliverables/1 search offers/DistributionFilter.yaml b/deliverables/1 search offers/DistributionFilter.yaml new file mode 100644 index 0000000..d13195c --- /dev/null +++ b/deliverables/1 search offers/DistributionFilter.yaml @@ -0,0 +1,72 @@ +allOf: + - $ref: .\SearchOfferFilter.yaml + - type: object + required: + - filterType + - mediaType + properties: + filterType: + type: string + const: distribution + channel: + type: string + description: The channel of the offer. + x-enum-values: + - "web" + - "mobile" + - "kiosk" + - "call center" + - "travel agency" + - "other" + fulfillmentMethod: + type: string + description: The fulfillment method of the offer. + x-enum-values: + - "electronic" + - "paper" + - "mobile" + - "other" + typeOfPayment: + type: string + description: The type of payment of the offer. + x-enum-values: + - "prepaid" + - "postpaid" + - "other" + mediaType: + type: string + description: |- + The media type of the offer. IANA media type registry: https://www.iana.org/assignments/media-types/media-types.xhtml + examples: + - "application/json" + - "application/xml" + - "text/html" + - "application/pdf" + - "image/jpeg" + - "image/svg+xml" + contentStandard: + type: string + description: The content standard of the offer. + x-enum-values: + - "ISO/IEC 18004" # QR Code + - "ISO/IEC 24778" # Aztec Code + - "ISO/IEC 15438" # PDF417 + - "ISO/IEC 16022" # Data Matrix + - "ISO/IEC 15417" # Code 128 + - "ISO/IEC 16388" # Code 39 + - "ISO/IEC 15420" # EAN-13 + - "ISO/IEC 15417" # UPC-A + - "ISO/IEC 15424" # MaxiCode + - "ISO/IEC 7816-4" # NFC, MIFARE DESFire + - "GATT" # Bluetooth Low Energy + - "AXA Bike lock" # AXA Bike lock + - "OTHER" # Other content standard +examples: + - { + "filterType": "distribution", + "channel": "web", + "fulfillmentMethod": "electronic", + "typeOfPayment": "prepaid", + "mediaType": "application/json", + "contentStandard": "ISO/IEC 18004" + } \ No newline at end of file diff --git a/deliverables/1 search offers/EntitlementRight.yaml b/deliverables/1 search offers/EntitlementRight.yaml new file mode 100644 index 0000000..a791ae9 --- /dev/null +++ b/deliverables/1 search offers/EntitlementRight.yaml @@ -0,0 +1,20 @@ +type: object +required: + - entitlementType + - code +properties: + issuer: + type: string + description: The entity that issues the entitlement right. + entitlementType: + type: string + description: The type of entitlement right (e.g., subscription, license, access). Valid values can be obtained using the `entitlementType` endpoint + code: + type: string + description: A unique code representing the entitlement right. +examples: +- { + "issuer": "Company XYZ", + "entitlementType": "voucher", + "code": "VOUCHER-2024-001" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Error.yaml b/deliverables/1 search offers/Error.yaml new file mode 100644 index 0000000..f5c0b6a --- /dev/null +++ b/deliverables/1 search offers/Error.yaml @@ -0,0 +1,36 @@ +type: object +externalDocs: + url: https://datatracker.ietf.org/doc/html/rfc7807 + additionalProperties: false + description: | + An error that the service may send, e.g. in case of invalid input, based on RFC 7807 + required: + - errorcode + - title + properties: + type: + type: string + format: uri + description: URI specifying the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". + title: + type: string + description: A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except to match Content-Language + status: + type: integer + description: HTTP-statuscode, The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem. + example: 501 + detail: + type: string + description: A human-readable explanation specific to this occurrence of the problem, matches Content-Language + instance: + type: string + format: uri + description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. +examples: +- { + "type": "https://example.com/probs/out-of-credit", + "title": "You do not have enough credit.", + "status": 403, + "detail": "Your current balance is 30, but that costs 50.", + "instance": "/account/12345/msgs/abc" + } \ No newline at end of file diff --git a/deliverables/1 search offers/FlexibilityFilter.yaml b/deliverables/1 search offers/FlexibilityFilter.yaml new file mode 100644 index 0000000..a5bbdb9 --- /dev/null +++ b/deliverables/1 search offers/FlexibilityFilter.yaml @@ -0,0 +1,21 @@ +allOf: + - $ref: .\SearchOfferFilter.yaml + - type: object + required: + - filterType + - afterSalesCondition + properties: + filterType: + type: string + const: flexibility + afterSalesCondition: + type: string + enum: + - cancellable + - exchangeable + - refundable +examples: +- { + "filterType": "flexibility", + "afterSalesCondition": "cancellable" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Fulfillment.yaml b/deliverables/1 search offers/Fulfillment.yaml new file mode 100644 index 0000000..8e6c9fa --- /dev/null +++ b/deliverables/1 search offers/Fulfillment.yaml @@ -0,0 +1,104 @@ +type: object +required: + - fulfillmentId + - status + - mediaType + - packageElements + - oneOf: + - url + - binaryData +properties: + fulfillmentId: + type: string + description: Unique identifier for the fulfillment + status: + type: string + description: The current status of the fulfillment. + enum: + - pending + - in_progress + - completed + - issued + - revoked + - refunded + binaryData: + type: string + format: binary + description: The binary data associated with the fulfillment, which may include documents, tickets, or other relevant files. + url: + type: string + format: uri + description: The URL where the fulfillment can be accessed or downloaded. + channel: + type: string + description: The channel of the offer. + x-enum-values: + - "web" + - "mobile" + - "kiosk" + - "call center" + - "travel agency" + - "other" + fulfillmentMethod: + type: string + description: The fulfillment method of the offer. + x-enum-values: + - "electronic" + - "paper" + - "mobile" + - "other" + typeOfPayment: + type: string + description: The type of payment of the offer. + x-enum-values: + - "prepaid" + - "postpaid" + - "other" + mediaType: + type: string + description: |- + The media type of the offer. + externalDocs: + description: |- + For more information about media types, see the [IANA Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml) registry. + url: https://www.iana.org/assignments/media-types/media-types.xhtml + examples: + - "application/json" + - "application/xml" + - "text/html" + - "application/pdf" + - "image/jpeg" + - "image/svg+xml" + contentStandard: + type: string + description: The content standard of the offer. + x-enum-values: + - "ISO/IEC 18004" # QR Code + - "ISO/IEC 24778" # Aztec Code + - "ISO/IEC 15438" # PDF417 + - "ISO/IEC 16022" # Data Matrix + - "ISO/IEC 15417" # Code 128 + - "ISO/IEC 16388" # Code 39 + - "ISO/IEC 15420" # EAN-13 + - "ISO/IEC 15417" # UPC-A + - "ISO/IEC 15424" # MaxiCode + - "ISO/IEC 7816-4" # NFC, MIFARE DESFire + - "GATT" # Bluetooth Low Energy + - "AXA Bike lock" # AXA Bike lock + - "OTHER" # Other content standard + packageElements: + type: array + description: A list of package elements associated with the fulfillment. + minItems: 1 + items: + type: string + format: package-element-ref +examples: +- { + "fulfillmentId": "FULFILLMENT-123", + "status": "revoked", + "mediaType": "application/pdf", + "packageElements": ["PE-123", "PE-456"], + "url": "https://example.com/fulfillment/FULFILLMENT-123", + "contentStandard": "ISO/IEC 18004" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Guarantee.yaml b/deliverables/1 search offers/Guarantee.yaml new file mode 100644 index 0000000..54ff632 --- /dev/null +++ b/deliverables/1 search offers/Guarantee.yaml @@ -0,0 +1,31 @@ +type: object +properties: + guaranteeId: + type: string + description: The unique identifier of the guarantee + description: + type: string + description: A human-readable description of the guarantee + guaranteeType: + type: string + description: The type of guarantee (e.g., refund, replacement, compensation). Valid values can be obtained using the `guaranteeType` endpoint + x-extensible-enum: [refund, replacement, compensation, travel-through, travel-back] + redresses: + type: array + description: A list of redresses for this guarantee + items: + $ref: .\Redress.yaml +examples: +- { + "guaranteeId": "G-123", + "description": "This guarantee provides a refund in case of cancellation.", + "guaranteeType": "refund", + "redresses": [ + { "redressType": "refund", + "amount": 23.00, + "currency": "EUR", + "conditions": "Valid for cancellations made at least 24 hours before departure.", + "validityPeriod": "/2024-06-01T10:13:00Z" + } + ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/Leg.yaml b/deliverables/1 search offers/Leg.yaml new file mode 100644 index 0000000..4873b22 --- /dev/null +++ b/deliverables/1 search offers/Leg.yaml @@ -0,0 +1,38 @@ +type: object +required: + - legId + - mode + - legType +properties: + legId: + type: string + description: Unique identifier for the leg + format: leg-ref + legType: + type: string + description: discriminator for the leg type + enum: [timed, continuous, transfer] + mode: + type: string + description: Mode of transportation for the leg (e.g., bus, train, walking). See modes as specified in NeTEx. + $ref: .\Mode.yaml + sequenceNumber: + type: integer + description: The order of the leg in the overall journey. In case of parallel legs, the sequence number should be the same for those legs. + default: 1 + minimum: 1 + tripPattern: + type: string + format: trip-pattern-ref + description: Reference to the trip pattern that this leg is part of, if applicable. There is no tripPattern object in the data model, + so legs with the same tripPattern reference are considered to be part of the same trip pattern. + examples: + - "inbound-1234" + - "outbound-5678" +examples: +- { + "legId": "LEG-123", + "legType": "timed", + "mode": "TRAIN", + "tripPattern": "inbound-1234" + } \ No newline at end of file diff --git a/deliverables/1 search offers/LegAlight.yaml b/deliverables/1 search offers/LegAlight.yaml new file mode 100644 index 0000000..b89a092 --- /dev/null +++ b/deliverables/1 search offers/LegAlight.yaml @@ -0,0 +1,27 @@ +type: object +required: + - setDownLocation + - arrivalTime +properties: + setDownLocation: + type: string + format: place-ref + description: Reference to the drop-off location for the leg + arrivalTime: + type: string + format: date-time + description: The arrival time at the drop-off location. Local time zone should be used. + stopPointName: + type: string + description: Name of the stop point where the leg ends + stopPointRef: + type: string + format: stop-point-ref + description: Reference to the stop point where the leg ends +examples: +- { + "setDownLocation": "PLACE-456", + "arrivalTime": "2024-06-15T14:30:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-789" + } \ No newline at end of file diff --git a/deliverables/1 search offers/LegBoard.yaml b/deliverables/1 search offers/LegBoard.yaml new file mode 100644 index 0000000..b2ebed4 --- /dev/null +++ b/deliverables/1 search offers/LegBoard.yaml @@ -0,0 +1,34 @@ +type: object +required: + - pickupLocation + - departureTime +properties: + pickupLocation: + type: string + format: place-ref + description: Reference to the pickup location for the leg + departureTime: + type: string + format: date-time + description: The departure time from the pickup location. Local time zone should be used. + stopPointName: + type: string + description: Name of the stop point where the leg starts + stopPointRef: + type: string + format: stop-point-ref + description: Reference to the stop point where the leg starts + trainNumbers: + type: array + items: + type: string + format: train-number + description: List of train numbers associated with this leg, if applicable +examples: +- { + "pickupLocation": "PLACE-123", + "departureTime": "2024-06-15T14:00:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-456", + "trainNumbers": ["1234", "5678"] + } \ No newline at end of file diff --git a/deliverables/1 search offers/LegIntermediate.yaml b/deliverables/1 search offers/LegIntermediate.yaml new file mode 100644 index 0000000..83e59e6 --- /dev/null +++ b/deliverables/1 search offers/LegIntermediate.yaml @@ -0,0 +1,27 @@ +type: object +required: + - arrivalTime + - departureTime +properties: + arrivalTime: + type: string + format: date-time + description: The arrival time at the drop-off location. Local time zone should be used. + departureTime: + type: string + format: date-time + description: The departure time from the stop point. Local time zone should be used. + stopPointName: + type: string + description: Name of the stop point + stopPointRef: + type: string + format: stop-point-ref + description: Reference to the stop point +examples: +- { + "arrivalTime": "2024-06-15T14:00:00Z", + "departureTime": "2024-06-15T14:06:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-456" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Link.yaml b/deliverables/1 search offers/Link.yaml new file mode 100644 index 0000000..a6dd140 --- /dev/null +++ b/deliverables/1 search offers/Link.yaml @@ -0,0 +1,38 @@ +type: object +externalDocs: + description: Link object definition + url: https://github.com/opengeospatial/ogcapi-processes/blob/master/openapi/schemas/processes-core/link.yaml +required: + - rel + - href +properties: + rel: + type: string + type: + type: string + hreflang: + type: string + title: + type: string + length: + type: integer + href: + type: string + method: + type: string + enum: [ POST, GET, DELETE, PATCH ] + body: + type: object + headers: + type: object + additionalProperties: + type: string +examples: +- { + "rel": "self", + "type": "application/json", + "title": "Self link", + "length": 1234, + "href": "https://api.example.com/resource/1", + "method": "GET" + } \ No newline at end of file diff --git a/deliverables/1 search offers/LockedOfferPackage.yaml b/deliverables/1 search offers/LockedOfferPackage.yaml new file mode 100644 index 0000000..7a8ead4 --- /dev/null +++ b/deliverables/1 search offers/LockedOfferPackage.yaml @@ -0,0 +1,16 @@ +allOf: + - $ref: ./Package.yaml + - type: object + properties: + expiryTime: + type: string + format: date-time + status: + type: string + enum: [locked, released, expired] +examples: +- { + "packageId": "PKG-123", + "expiryTime": "2024-06-15T12:00:00Z", + "status": "locked" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Mode.yaml b/deliverables/1 search offers/Mode.yaml new file mode 100644 index 0000000..bcc20c3 --- /dev/null +++ b/deliverables/1 search offers/Mode.yaml @@ -0,0 +1,27 @@ +mode: + type: string + description: These classes are taken from the NeTeX standard, but ALL and UNKNOWN are removed. On the other hand OTHER and PARKING are added. + enum: [ AIR, + BUS, + TROLLEYBUS, + TRAM, + COACH, + RAIL, + INTERCITYRAIL, + URBANRAIL, + METRO, + WATER, + CABLEWAY, + FUNICULAR, + TAXI, + SELFDRIVE, + FOOT, + BICYCLE, + MOTORCYCLE, + CAR, + SHUTTLE, + OTHER, + PARKING, + MOPED, + STEP, + FERRY ] \ No newline at end of file diff --git a/deliverables/1 search offers/OfferedPackage.yaml b/deliverables/1 search offers/OfferedPackage.yaml new file mode 100644 index 0000000..e0bd693 --- /dev/null +++ b/deliverables/1 search offers/OfferedPackage.yaml @@ -0,0 +1,52 @@ +allOf: + - $ref: ./Package.yaml + - type: object + properties: + status: + type: string + const: offered + matching: + type: string + description: Indicates the matching status of the package. + enum: [match, partial-match] + placeHolders: + type: array + items: + oneOf: + - $ref: .\PersonalDetailPlaceHolder.yaml + - $ref: .\AncillaryPlaceHolder.yaml + - $ref: .\AllocationPlaceHolder.yaml + discriminator: + propertyName: placeHolderType + mapping: + personalDetail: .\PersonalDetailPlaceHolder.yaml + ancillary: .\AncillaryPlaceHolder.yaml + allocation: .\AllocationPlaceHolder.yaml +example: + { + "packageId": "pkg-123", + "summary": "This is a sample offered package.", + "name": "Sample Package", + "status": "offered", + "minimumPrice": { "amount": 100.00, "currency": "USD" }, + "trip": { + "tripId": "trip-456", + "legs": [ + { "legType": "timed", + "journeyRef": "journey-789", + "operatingDayRef": "Monday", + "start": { "stopPointRef": "stop-001", "scheduledTime": "2024-06-01T08:00:00Z" }, + "end": { "stopPointRef": "stop-002", "scheduledTime": "2024-06-01T09:00:00Z" } + } + ] + }, + "placeHolders": [ + { + "placeHolderType": "personalDetail", + "travellingEntity": "Traveller-01", + "fieldName": "fullName", + "required": true + } + ] + } + diff --git a/deliverables/1 search offers/Package.yaml b/deliverables/1 search offers/Package.yaml new file mode 100644 index 0000000..cafcb43 --- /dev/null +++ b/deliverables/1 search offers/Package.yaml @@ -0,0 +1,122 @@ +type: object +required: + - packageId + - summary + - name + - matching + - status +properties: + packageId: + type: string + description: Unique identifier for the package + version: + type: string + description: > + The version of the package, which can be used for version control and tracking changes over time. + Avoid using an increasing integer as the version number, as it may not accurately reflect the content changes. + Instead, consider using a hash of the package content or a combination of an internal ID and version number + to ensure uniqueness and integrity. + summary: + type: string + description: A brief summary of the package, providing an overview of its contents or purpose. + name: + type: string + description: The name of the package, which can be used for display purposes in user interfaces. + status: + type: string + description: The current status of the package. + enum: + - offered + - locked + - expired + - released + - purchased + - rollback + - cancelled + - fulfilled + - refunded + - exchanged + - in_progress + - completed + elements: + type: array + description: A list of elements that are part of the package + items: + oneOf: + - $ref: .\TravelRight.yaml + - $ref: .\Ancillary.yaml + - $ref: .\Allocation.yaml + - $ref: .\AfterSalesFee.yaml + discriminator: + propertyName: packageElementType + mapping: + travelRight: .\TravelRight.yaml + ancillary: .\Ancillary.yaml + allocation: .\Allocation.yaml + afterSalesFee: .\AfterSalesFee.yaml + minimumPrice: + $ref: .\Cost.yaml + summaryDetails: + type: array + description: A list of detailed summaries related to the package, providing additional context or information. + items: + $ref: .\SummaryDetail.yaml + trip: + $ref: .\Trip.yaml + guarantees: + type: array + description: A list of guarantees + items: + $ref: .\Guarantee.yaml + links: + type: array + description: A list of links related to the package, which can provide additional information or actions. + items: + $ref: .\Link.yaml +example: + { + "packageId": "PK-123", + "summary": "This is a sample package.", + "name": "Sample Package", + "matching": "match", + "status": "offered", + "minimumPrice": { "amount": 100.00, "currency": "USD" }, + "summaryDetails": [ + { + "detailType": "geospatial", + "description": "A route from San Francisco to Los Angeles.", + "content": { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[-122.4194, 37.7749], [-118.2437, 34.0522]] } } + }, + { + "detailType": "condition", + "content": "No pets allowed" + } + ], + "elements": [ + { + "elementType": "travelRight", + "packageElementId": "PE-123", + "numberOfAvailableItems": "5", + "covering": [ { "startLeg": "L-789", "endLeg": "L-789" } ], + "price": { "amount": 23.20, "currency": "EUR" }, + "travellingEntities": [ "TE-123", "TE-456" ] + }, + { + "elementType": "allocation", + "packageElementId": "PE-124", + "allocationType": "spot", + "typeOfSpot": "seat", + "numberOfAllocatedUnits": 1, + "reference": "102/36B", + "appliesTo": [ "PE-123" ] + } + ], + "links": [ + { + "rel": "lock", + "href": "https://api.example.com/packages/PK-123/lock", + "method": "POST", + "type": "application/json" + } + ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/PackageElement.yaml b/deliverables/1 search offers/PackageElement.yaml new file mode 100644 index 0000000..83e80fd --- /dev/null +++ b/deliverables/1 search offers/PackageElement.yaml @@ -0,0 +1,39 @@ +type: object +required: + - packageElementId + - packageElementType +properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + enum: [travelRight, ancillary, allocation] + packageElementId: + description: Unique identifier for the package element + type: string + numberOfAvailableItems: + description: The number of available items at the moment of request + type: string + coverage: + type: array + description: A list of trip sections that are covered by this package element + items: + $ref: .\TripSection.yaml + price: + description: The price of this package element + $ref: .\Cost.yaml + product: + description: The product associated with this package element + $ref: .\Product.yaml + travellingEntities: + type: array + description: A list of travelling entities associated with this package element + items: + type: string + format: travelling-entity-ref +examples: + - { "packageElementId": "PE-123", + "numberOfAvailableItems": "5", + "coverage": [ { "startLeg": "L-789", "endLeg": "L-789" } ], + "price": { "amount": 23.20, "currency": "EUR" }, + "travellingEntities": [ "TE-123", "TE-456" ] + } diff --git a/deliverables/1 search offers/PersonalDetailPlaceHolder.yaml b/deliverables/1 search offers/PersonalDetailPlaceHolder.yaml new file mode 100644 index 0000000..b64ea11 --- /dev/null +++ b/deliverables/1 search offers/PersonalDetailPlaceHolder.yaml @@ -0,0 +1,37 @@ +allOf: +- $ref: ./PlaceHolder.yaml +- type: object + properties: + placeHolderType: + type: string + const: personalDetail + travellingEntity: + type: string + format: travelling-entity-ref + fieldName: + type: string + x-extensible-enum: + - fullName + - firstName + - lastName + - dateOfBirth + - gender + - nationality + - email + - address + - phoneNumber + - passportNumber + - passportExpiryDate + - passportIssuingCountry + - idCardNumber + - idCardExpiryDate + - idCardIssuingCountry + - drivingLicenseNumber + - drivingLicenseExpiryDate + - drivingLicenseIssuingCountry +examples: +- { + "placeHolderType": "personalDetail", + "travellingEntity": "TE-123", + "fieldName": "fullName" + } \ No newline at end of file diff --git a/deliverables/1 search offers/PlaceHolder.yaml b/deliverables/1 search offers/PlaceHolder.yaml new file mode 100644 index 0000000..f5b1a01 --- /dev/null +++ b/deliverables/1 search offers/PlaceHolder.yaml @@ -0,0 +1,13 @@ +type: object +required: + - placeHolderType + - required +description: A placeholder for a package element, which can be used to indicate that a specific type of package element + is required for the package. +properties: + placeHolderType: + type: string + enum: [personalDetail, ancillary, allocation] + required: + type: boolean + description: Indicates whether the placeholder is required for the package diff --git a/deliverables/1 search offers/Product.yaml b/deliverables/1 search offers/Product.yaml new file mode 100644 index 0000000..4d9c511 --- /dev/null +++ b/deliverables/1 search offers/Product.yaml @@ -0,0 +1,11 @@ +type: object +required: + - description + - productId +properties: + productId: + type: string + description: The unique identifier of the product + description: + type: string + description: A human-readable description of the product diff --git a/deliverables/1 search offers/PurchasedPackage.yaml b/deliverables/1 search offers/PurchasedPackage.yaml new file mode 100644 index 0000000..33204e5 --- /dev/null +++ b/deliverables/1 search offers/PurchasedPackage.yaml @@ -0,0 +1,35 @@ +allOf: + - $ref: ./Package.yaml + - type: object + properties: + status: + type: string + enum: + - purchased + - rollbacked + - cancelled + - fulfilled + - refunded + - exchanged + - in_progress + - completed + fulfillments: + type: array + items: + $ref: .\Fulfillment.yaml +examples: + - { + "packageId": "PKG-123", + "status": "purchased", + "fulfillments": + [ + { + "fulfillmentId": "FULFILLMENT-123", + "status": "revoked", + "mediaType": "application/pdf", + "packageElements": ["PE-123", "PE-456"], + "url": "https://example.com/fulfillment/FULFILLMENT-123", + "contentStandard": "ISO/IEC 18004", + }, + ], + } diff --git a/deliverables/1 search offers/Redress.yaml b/deliverables/1 search offers/Redress.yaml new file mode 100644 index 0000000..afb8409 --- /dev/null +++ b/deliverables/1 search offers/Redress.yaml @@ -0,0 +1,13 @@ +type: object +properties: + redressId: + type: string + description: An identifier for the redress + description: + type: string + description: A human-readable description of the redress + redressType: + type: string + x-extensible-enum: [] +examples: +- { redressId: "12345", description: "Refund for overcharge", redressType: "refund" } \ No newline at end of file diff --git a/deliverables/1 search offers/Request.yaml b/deliverables/1 search offers/Request.yaml new file mode 100644 index 0000000..424718e --- /dev/null +++ b/deliverables/1 search offers/Request.yaml @@ -0,0 +1,7 @@ +type: object +required: + - requestId +properties: + requestId: + type: string + description: Unique identifier for the request \ No newline at end of file diff --git a/deliverables/1 search offers/SearchOfferDelivery.yaml b/deliverables/1 search offers/SearchOfferDelivery.yaml new file mode 100644 index 0000000..a2a8a19 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferDelivery.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: ./Delivery.yaml + - type: object + properties: + offers: + type: array + description: List of sales offers included in the delivery + items: + $ref: ./OfferedPackage.yaml \ No newline at end of file diff --git a/deliverables/1 search offers/SearchOfferFilter.yaml b/deliverables/1 search offers/SearchOfferFilter.yaml new file mode 100644 index 0000000..cce24a2 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferFilter.yaml @@ -0,0 +1,9 @@ +type: object +properties: + description: + type: string + description: A description of the filter, providing context or details about its purpose. + exclude: + type: boolean + default: false + description: If true, the filter will exclude the specified item instead of including them diff --git a/deliverables/1 search offers/SearchOfferPolicy.yaml b/deliverables/1 search offers/SearchOfferPolicy.yaml new file mode 100644 index 0000000..835e697 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferPolicy.yaml @@ -0,0 +1,15 @@ +type: object +properties: + currency: + type: string + description: The currency code for the search offer request (e.g., USD, EUR) + format: ISO4217 + maxResults: + type: integer + description: Maximum number of results to return for the search offer request + default: 10 + minimum: 1 + allowPartialResults: + type: boolean + description: Whether to allow partial results if the full request cannot be fulfilled + default: false \ No newline at end of file diff --git a/deliverables/1 search offers/SearchOfferRequest.yaml b/deliverables/1 search offers/SearchOfferRequest.yaml new file mode 100644 index 0000000..53c0ed9 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferRequest.yaml @@ -0,0 +1,30 @@ +allOf: +- $ref: .\Request.yaml +- type: object + properties: + searchOfferId: + type: string + description: Unique identifier for the search offer request + format: search-offer-ref + trip: + $ref: .\Trip.yaml + requestedSections: + type: array + items: + $ref: .\TripSection.yaml + policy: + $ref: .\SearchOfferPolicy.yaml + filters: + type: array + items: + oneOf: + - $ref: .\ServiceFilter.yaml + - $ref: .\DistributionFilter.yaml + # - $ref: .\PriceFilter.yaml + # - $ref: .\AreaFilter.yaml + # - $ref: .\TimeFilter.yaml + # - $ref: .\AccessibilityFilter.yaml + # - $ref: .\OperatorFilter.yaml + - $ref: .\FlexibilityFilter.yaml + discriminator: + propertyName: filterType \ No newline at end of file diff --git a/deliverables/1 search offers/ServiceFilter.yaml b/deliverables/1 search offers/ServiceFilter.yaml new file mode 100644 index 0000000..6fb987a --- /dev/null +++ b/deliverables/1 search offers/ServiceFilter.yaml @@ -0,0 +1,21 @@ +allOf: + - $ref: .\SearchOfferFilter.yaml + - type: object + required: + - filterType + properties: + filterType: + type: string + const: mode + mode: + $ref: .\Mode.yaml + class: + type: string + x-enum-values: + - economy + - business + - first + - second + - premium +examples: +- { filterType: "mode", mode: { modeId: "mode123", description: "Economy class mode" }, class: "economy" } \ No newline at end of file diff --git a/deliverables/1 search offers/SummaryDetail.yaml b/deliverables/1 search offers/SummaryDetail.yaml new file mode 100644 index 0000000..5be25aa --- /dev/null +++ b/deliverables/1 search offers/SummaryDetail.yaml @@ -0,0 +1,64 @@ +type: object +required: + - detailType + - content +description: should we include all Transmodel validities in here? +properties: + detailType: + type: string + enum: [refund-condition, exchange-condition, other-condition, geospatial-condition] + description: + type: string + description: A human-readable description of the detail or condition, providing context or additional information. + geospatialCondition: + type: object + format: geojson-feature + description: A string representing the geometric shape of the trip, such as a route or area. + validityPeriod: + type: string + format: period + description: The duration for which the flexibility filter is valid. ISO 8601 period format is used. + examples: + - "2026-01-01T00:00:00Z/P1D" # Valid for one day from January 1, 2026 + - "2026-01-01T12:00:00Z/2026-01-02T12:00:00Z" # Valid for one day from January 1, 2026 + packageElements: + type: array + description: A list of package elements, where this detail/condition is applicable. + This can be used to specify which parts of the package are affected by the detail or condition. + items: + type: string + format: package-element-ref + fee: + $ref: .\Cost.yaml +examples: +- { + "detailType": "geospatial-condition", + "description": "You can travel within the city centre of Amersfoort.", + "geospatialCondition": { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[5.387, 52.156], [5.387, 52.157], [5.388, 52.157], [5.388, 52.156], [5.387, 52.156]]] } }, + "packageElements": ["PE-123"], + "fee": { "amount": 10.00, "currency": "EUR" } + } +- { + "detailType": "refund-condition", + "description": "Refunds are available, made at least 24 hours before departure.", + "packageElements": ["PE-456"], + "validityPeriod": "/2024-06-01T10:13:00Z", + "fee": { "amount": 5.00, "currency": "EUR" } + } +- { + "detailType": "refund-condition", + "description": "No refunding available within the last 24 hours before departure.", + "packageElements": ["PE-456"], + "validityPeriod": "2024-06-01T10:13:00Z/P1D", + "fee": { "amount": 23.25, "currency": "EUR" } + } +- { + "detailType": "other-condition", + "description": "No pets allowed", + "packageElements": ["PE-123", "PE-456"] + } +- { + "detailType": "other-condition", + "description": "Bikes only allowed outside peak hours", + "fee": { "amount": 12.50, "currency": "EUR" }, + } \ No newline at end of file diff --git a/deliverables/1 search offers/Tax.yaml b/deliverables/1 search offers/Tax.yaml new file mode 100644 index 0000000..3e557fd --- /dev/null +++ b/deliverables/1 search offers/Tax.yaml @@ -0,0 +1,18 @@ +type: object +properties: + amount: + type: number + description: The monetary amount of the cost. + format: float + country: + type: string + description: The country associated with the tax, represented as a two-letter ISO 3166-1 alpha-2 code + currencyCode: + type: string + description: The currency code of the cost, represented as a three-letter ISO 4217 code + percentage: + type: number + description: The percentage of the tax applied to the cost. + format: float +examples: +- { amount: 5.00, country: "US", currencyCode: "USD", percentage: 10.0 } \ No newline at end of file diff --git a/deliverables/1 search offers/TimedLeg.yaml b/deliverables/1 search offers/TimedLeg.yaml new file mode 100644 index 0000000..4fead7c --- /dev/null +++ b/deliverables/1 search offers/TimedLeg.yaml @@ -0,0 +1,69 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + properties: + legType: + type: string + description: discriminator for the leg type + const: timed + journeyRef: + type: string + description: Reference to the journey associated with this leg + format: journey-ref + lineRef: + type: string + description: Reference to the line associated with this leg + format: line-ref + operatingDayRef: + type: string + description: Reference to the operating day associated with this leg + format: day-of-week + enum: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday] + privateMode: + type: string + enum: [] + ptMode: + type: string + enum: [] + start: + $ref: .\LegBoard.yaml + end: + $ref: .\LegAlight.yaml + intermediateStops: + type: array + description: List of intermediate stops for this leg + items: + $ref: .\LegIntermediate.yaml +examples: + - { + legType: "timed", + journeyRef: "journey123", + lineRef: "line456", + operatingDayRef: "Monday", + privateMode: "bus", + ptMode: "bus", + start: + { + "pickupLocation": "PLACE-123", + "departureTime": "2024-06-15T14:00:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-456", + "trainNumbers": ["1234", "5678"], + }, + end: + { + "setDownLocation": "PLACE-456", + "arrivalTime": "2024-06-15T14:30:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-789", + }, + intermediateStops: + [ + { + "arrivalTime": "2024-06-15T14:00:00Z", + "departureTime": "2024-06-15T14:06:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-456", + }, + ], + } diff --git a/deliverables/1 search offers/TransferLeg.yaml b/deliverables/1 search offers/TransferLeg.yaml new file mode 100644 index 0000000..194af68 --- /dev/null +++ b/deliverables/1 search offers/TransferLeg.yaml @@ -0,0 +1,31 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + properties: + legType: + type: string + description: discriminator for the leg type + const: transfer + continuousMode: + type: string + enum: [] + duration: + type: integer + description: Duration of the leg in minutes + transferMode: + type: string + enum: [] + start: + type: string + format: place-ref + end: + type: string + format: place-ref +examples: + - { + legType: "transfer", + duration: 10, + transferMode: "walking", + start: "PLACE-123", + end: "PLACE-456" + } \ No newline at end of file diff --git a/deliverables/1 search offers/TravelParty.yaml b/deliverables/1 search offers/TravelParty.yaml new file mode 100644 index 0000000..418dc86 --- /dev/null +++ b/deliverables/1 search offers/TravelParty.yaml @@ -0,0 +1,14 @@ +type: object +required: + - travelPartyId +description: >- + TRAVEL PARTY — a group of travelling entities that are travelling together. The travel party can be used to apply group + discounts or other offers. Travelling entities with the same travelPartyId are considered to be part of the same travel party. +properties: + travelPartyId: + type: string + type: + type: string + x-extensible-enum: [family, group, individual] +examples: +- { travelPartyId: "party123", type: "family" } \ No newline at end of file diff --git a/deliverables/1 search offers/TravelRight.yaml b/deliverables/1 search offers/TravelRight.yaml new file mode 100644 index 0000000..fcfc3f0 --- /dev/null +++ b/deliverables/1 search offers/TravelRight.yaml @@ -0,0 +1,16 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: travelRight + examples: + - { packageElementType: "travelRight", + packageElementId: "PE-123", + coverage: [ { startLeg: "L-789", endLeg: "L-789" } ], + price: { amount: 23.20, currency: "EUR" }, + product: { productId: "PR-456", name: "Second class" }, + travellingEntities: [ "TE-123", "TE-456" ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/TravellingEntity.yaml b/deliverables/1 search offers/TravellingEntity.yaml new file mode 100644 index 0000000..cddfda4 --- /dev/null +++ b/deliverables/1 search offers/TravellingEntity.yaml @@ -0,0 +1,30 @@ +type: object +description: TRAVELLING ENTITY — base class for all entities taking part in a journey. Use the entityType discriminator to select the concrete sub-type. +required: +- entityType +- travellingEntityId +properties: + travellingEntityId: + type: string + description: Stable caller-assigned identifier for this entity. Must be unique within the request. + entityType: + type: string + enum: + - traveller + - passengerVehicle + - animal + - luggage + description: Discriminator identifying the concrete type of this entity. + entitlementRights: + type: array + description: ENTITLEMENT RIGHTs held by this entity that may qualify for reduced fares or additional offers. + items: + $ref: .\EntitlementRight.yaml + travelParty: + $ref: .\TravelParty.yaml +examples: + - { "travellingEntityId": "TE-123", + "entityType": "traveller", + "entitlementRights": [ { "entitlementRightId": "ER-456", "description": "Senior citizen discount" } ], + "travelParty": { "travelPartyId": "TP-789", "type": "family" } + } \ No newline at end of file diff --git a/deliverables/1 search offers/Trip.yaml b/deliverables/1 search offers/Trip.yaml new file mode 100644 index 0000000..a84f949 --- /dev/null +++ b/deliverables/1 search offers/Trip.yaml @@ -0,0 +1,22 @@ +type: object +required: +- legs +- tripId +properties: + tripId: + type: string + description: Unique identifier for the trip + format: trip-ref + legs: + type: array + items: + oneOf: + - $ref: .\TimedLeg.yaml + - $ref: .\ContinuousLeg.yaml + - $ref: .\TransferLeg.yaml + discriminator: + propertyName: legType + mapping: + timed: .\TimedLeg.yaml + continuous: .\ContinuousLeg.yaml + transfer: .\TransferLeg.yaml diff --git a/deliverables/1 search offers/TripSection.yaml b/deliverables/1 search offers/TripSection.yaml new file mode 100644 index 0000000..100f2b3 --- /dev/null +++ b/deliverables/1 search offers/TripSection.yaml @@ -0,0 +1,30 @@ +type: object +properties: + startLeg: + type: string + format: leg-ref + startPlace: + type: string + description: The starting place of the trip, which can be a stop or a location. + format: place-ref + endLeg: + type: string + format: leg-ref + endPlace: + type: string + description: The ending place of the trip, which can be a stop or a location. + format: place-ref + tripPattern: + type: string + format: trip-pattern-ref + description: | + Reference to the trip pattern that this trip follows, if applicable. + examples: + - "inbound-1234" + - "outbound-5678" +examples: + - { startLeg: "L-789", + startPlace: "PLACE-123", + endLeg: "L-789", + endPlace: "PLACE-456", + tripPattern: "inbound-1234" } \ No newline at end of file diff --git a/deliverables/1 search offers/Warning.yaml b/deliverables/1 search offers/Warning.yaml new file mode 100644 index 0000000..401189d --- /dev/null +++ b/deliverables/1 search offers/Warning.yaml @@ -0,0 +1,6 @@ +type: object +required: + - description +properties: + description: + type: string diff --git a/deliverables/1 search offers/search-offers-model.qea b/deliverables/1 search offers/search-offers-model.qea new file mode 100644 index 0000000..ebf4619 Binary files /dev/null and b/deliverables/1 search offers/search-offers-model.qea differ