Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNI-799: Backend - ATM ticket selector for single/day tickets #766

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "20.6.0",
"version": "20.7.0",
"description": "Schemas for MaaS infrastructure",
"main": "index.js",
"engine": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
"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"
},
Expand Down
12 changes: 12 additions & 0 deletions maas-schemas/src/io-ts/_translation.log
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,12 @@ 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
Expand All @@ -1474,6 +1480,12 @@ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ 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;
Expand All @@ -57,6 +58,7 @@ export type Payload = t.Branded<
code?: string;
} & Record<
string,
| string
| TravelMode_5e34_.TravelMode
| Units_c404_.Time
| Units_c404_.Time
Expand All @@ -80,6 +82,7 @@ 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;
Expand All @@ -100,6 +103,7 @@ export type PayloadC = t.BrandC<
t.StringC,
t.UnionC<
[
t.StringC,
typeof TravelMode_5e34_.TravelMode,
typeof Units_c404_.Time,
typeof Units_c404_.Time,
Expand All @@ -126,6 +130,7 @@ 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,
Expand All @@ -145,6 +150,7 @@ export const Payload: PayloadC = t.brand(
t.record(
t.string,
t.union([
t.string,
TravelMode_5e34_.TravelMode,
Units_c404_.Time,
Units_c404_.Time,
Expand All @@ -168,6 +174,7 @@ 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;
Expand All @@ -185,6 +192,7 @@ export const Payload: PayloadC = t.brand(
code?: string;
} & Record<
string,
| string
| TravelMode_5e34_.TravelMode
| Units_c404_.Time
| Units_c404_.Time
Expand Down