ojp-shared-types 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/constants.ts
2
- var VERSION = "0.0.2";
2
+ var VERSION = "0.0.4";
3
3
 
4
4
  // src/types/openapi-dependencies.ts
5
5
  var MapNS_Tags = {
@@ -15,6 +15,8 @@ var MapNS_Tags = {
15
15
  "OJPTripRefineRequest.RequestTimestamp": "siri",
16
16
  // FareRequest
17
17
  "OJPFareRequest.RequestTimestamp": "siri",
18
+ // TripInfoRequest
19
+ "OJPTripInfoRequest.RequestTimestamp": "siri",
18
20
  // TripRequest
19
21
  "OJPTripRequest.RequestTimestamp": "siri",
20
22
  // TripResponse
@@ -56,26 +58,17 @@ var MapNS_Tags = {
56
58
  "OJPStopEventRequest.RequestTimestamp": "siri",
57
59
  "PlaceRef.StopPointRef": "siri"
58
60
  };
59
- var MapParentArrayTags = {
60
- "TripResult.trip": ["leg"],
61
- "leg.timedLeg": ["legIntermediate"],
62
- "timedLeg.service": ["attribute"],
63
- "trackSection.linkProjection": ["position"],
64
- // LIR Request
65
- "restrictions.placeParam": ["type"],
66
- // LIR Response
67
- "place.pointOfInterest": ["pointOfInterestCategory"],
68
- "placeResult.place": ["mode"],
69
- "serviceDelivery.OJPLocationInformationDelivery": ["placeResult"],
70
- // SER Response
71
- "stopEventResult.stopEvent": ["previousCall", "onwardCall"]
72
- };
73
61
  var MapArrayTags = {
62
+ // Shared
63
+ "places.place": true,
64
+ "situations.ptSituation": true,
65
+ "linkProjection.position": true,
66
+ // Service
67
+ "service.attribute": true,
74
68
  // TR Response
75
69
  "trip.leg": true,
76
70
  "timedLeg.legIntermediate": true,
77
- "service.attribute": true,
78
- "linkProjection.position": true,
71
+ "legTrack.trackSection": true,
79
72
  // LIR Response
80
73
  "pointOfInterest.pointOfInterestCategory": true,
81
74
  "place.mode": true,
@@ -86,13 +79,19 @@ var MapArrayTags = {
86
79
  // Fare Response
87
80
  "fareResult.tripFareResult": true,
88
81
  // TODO - this is not in the current schema (v2)
89
- "tripFareResult.fareProduct": true
82
+ "tripFareResult.fareProduct": true,
83
+ // TripInfoResult
84
+ "OJPTripInfoDelivery.tripInfoResult": true,
85
+ "tripInfoResult.previousCall": true,
86
+ "tripInfoResult.onwardCall": true,
87
+ "journeyTrack.trackSection": true
90
88
  };
91
89
  var MapModelKeepPropertiesXML = {
92
90
  "OJPLocationInformationRequest": ["requestTimestamp", "initialInput", "placeRef", "restrictions"],
93
91
  "OJPTripRequest": ["requestTimestamp", "origin", "destination", "via", "params"],
94
92
  "OJPStopEventRequest": ["requestTimestamp", "location", "params"],
95
93
  "OJPTripRefineRequest": ["requestTimestamp", "refineParams", "tripResult"],
94
+ "OJPTripInfoRequest": ["requestTimestamp", "journeyRef", "operatingDayRef", "params"],
96
95
  "geoPosition": ["longitude", "latitude"]
97
96
  };
98
97
  var MapStringValues = {
@@ -100,7 +99,6 @@ var MapStringValues = {
100
99
  };
101
100
  var OpenAPI_Dependencies = {
102
101
  MapNS_Tags,
103
- MapParentArrayTags,
104
102
  MapArrayTags,
105
103
  MapModelKeepPropertiesXML,
106
104
  MapStringValues
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ojp-shared-types",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Shared types for OJP models based on OpenAPI / XSD Schema",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -16,11 +16,14 @@
16
16
  "scripts": {
17
17
  "build": "rm -rf dist && tsup src/index.ts --dts --format esm,cjs --out-dir dist",
18
18
  "dev": "tsup src/index.ts --dts --format esm,cjs --out-dir dist --watch",
19
- "generate:ts": "bash ./scripts/generate_models.sh"
19
+ "generate:ts": "bash ./scripts/generate-ts.sh"
20
20
  },
21
21
  "keywords": [],
22
22
  "author": "Vasile Cotovanu",
23
23
  "license": "MIT",
24
+ "dependencies": {
25
+ "openapi-typescript": "7.8.0"
26
+ },
24
27
  "devDependencies": {
25
28
  "tsup": "8.4.0",
26
29
  "typescript": "5.8.3"