Skip to content

Commit

Permalink
Merge pull request #777 from vonpoland/update-tsp-update-endpoint
Browse files Browse the repository at this point in the history
Add Finished operation to schemas.
  • Loading branch information
vonpoland authored Jul 15, 2024
2 parents 7879026 + 0a8d09c commit e27943b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion maas-schemas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maas-schemas",
"version": "24.0.0",
"version": "25.0.0",
"description": "Schemas for MaaS infrastructure",
"main": "index.js",
"engine": {
Expand Down
2 changes: 1 addition & 1 deletion maas-schemas/schemas/tsp/booking-update/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"$ref": "https://schemas.maas.global/core/booking.json#/definitions/tspId"
},
"state": {
"enum": ["RESERVED", "ACTIVATED", "ON_HOLD", "EXPIRED"]
"enum": ["RESERVED", "ACTIVATED", "ON_HOLD", "EXPIRED", "FINISHED"]
},
"configurator": {
"$ref": "https://schemas.maas.global/core/components/configurator.json"
Expand Down
6 changes: 4 additions & 2 deletions maas-schemas/src/io-ts/_types/tsp/booking-update/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const schemaId = 'https://schemas.maas.global/tsp/booking-update/request.
export type Request = t.Branded<
({
tspId?: Booking_4353_.TspId;
state?: 'RESERVED' | 'ACTIVATED' | 'ON_HOLD' | 'EXPIRED';
state?: 'RESERVED' | 'ACTIVATED' | 'ON_HOLD' | 'EXPIRED' | 'FINISHED';
configurator?: Configurator_2e96_.Configurator;
meta?: BookingMeta_c057_.BookingMeta;
terms?: Booking_4353_.Terms;
Expand All @@ -60,6 +60,7 @@ export type RequestC = t.BrandC<
t.LiteralC<'ACTIVATED'>,
t.LiteralC<'ON_HOLD'>,
t.LiteralC<'EXPIRED'>,
t.LiteralC<'FINISHED'>,
]
>;
configurator: typeof Configurator_2e96_.Configurator;
Expand Down Expand Up @@ -87,6 +88,7 @@ export const Request: RequestC = t.brand(
t.literal('ACTIVATED'),
t.literal('ON_HOLD'),
t.literal('EXPIRED'),
t.literal('FINISHED'),
]),
configurator: Configurator_2e96_.Configurator,
meta: BookingMeta_c057_.BookingMeta,
Expand All @@ -104,7 +106,7 @@ export const Request: RequestC = t.brand(
): x is t.Branded<
({
tspId?: Booking_4353_.TspId;
state?: 'RESERVED' | 'ACTIVATED' | 'ON_HOLD' | 'EXPIRED';
state?: 'RESERVED' | 'ACTIVATED' | 'ON_HOLD' | 'EXPIRED' | 'FINISHED';
configurator?: Configurator_2e96_.Configurator;
meta?: BookingMeta_c057_.BookingMeta;
terms?: Booking_4353_.Terms;
Expand Down

0 comments on commit e27943b

Please sign in to comment.