kaafil-js 0.1.0-beta.5 → 0.1.0-beta.6
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/client-entry.cjs +1814 -284
- package/dist/client-entry.cjs.map +1 -1
- package/dist/client-entry.d.cts +496 -181
- package/dist/client-entry.d.ts +496 -181
- package/dist/client-entry.js +1809 -285
- package/dist/client-entry.js.map +1 -1
- package/dist/index.cjs +833 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +124 -774
- package/dist/index.d.ts +124 -774
- package/dist/index.js +833 -214
- package/dist/index.js.map +1 -1
- package/dist/{vocabulary-ntjUUQ6-.d.cts → vocabulary-CC-Pfd6I.d.cts} +10779 -4288
- package/dist/{vocabulary-ntjUUQ6-.d.ts → vocabulary-CC-Pfd6I.d.ts} +10779 -4288
- package/package.json +1 -1
package/dist/client-entry.cjs
CHANGED
|
@@ -19,53 +19,111 @@ var OperationId = {
|
|
|
19
19
|
AddChecklistItem: "addChecklistItem",
|
|
20
20
|
AddItineraryItem: "addItineraryItem",
|
|
21
21
|
AdjustFloat: "adjustFloat",
|
|
22
|
+
ArchiveForm: "archiveForm",
|
|
23
|
+
AssignManager: "assignManager",
|
|
22
24
|
AssignPickupTraveller: "assignPickupTraveller",
|
|
23
25
|
AssignRoomingBed: "assignRoomingBed",
|
|
24
26
|
AssignSeating: "assignSeating",
|
|
25
27
|
AutoAssignRooming: "autoAssignRooming",
|
|
26
28
|
AutoAssignSeating: "autoAssignSeating",
|
|
27
29
|
BoardPickupTraveller: "boardPickupTraveller",
|
|
30
|
+
BulkUpsertBookings: "bulkUpsertBookings",
|
|
31
|
+
CancelTrip: "cancelTrip",
|
|
28
32
|
ClaimStatusIngest: "claimStatusIngest",
|
|
33
|
+
CloneForm: "cloneForm",
|
|
34
|
+
CloseForm: "closeForm",
|
|
29
35
|
ClosePickupStop: "closePickupStop",
|
|
30
36
|
ConfirmFileUpload: "confirmFileUpload",
|
|
37
|
+
CorrectPickupBoardStatus: "correctPickupBoardStatus",
|
|
38
|
+
CreateChecklistTemplate: "createChecklistTemplate",
|
|
39
|
+
CreateForm: "createForm",
|
|
40
|
+
CreateFormField: "createFormField",
|
|
41
|
+
CreateFormSection: "createFormSection",
|
|
42
|
+
CreateParty: "createParty",
|
|
31
43
|
CreatePickupStop: "createPickupStop",
|
|
32
44
|
CreateRoomingRoom: "createRoomingRoom",
|
|
33
45
|
CreateRoomingStayWindow: "createRoomingStayWindow",
|
|
34
46
|
CreateSeatingVehicle: "createSeatingVehicle",
|
|
47
|
+
CreateTraveller: "createTraveller",
|
|
35
48
|
CreateTrekWalkIn: "createTrekWalkIn",
|
|
49
|
+
DeleteBooking: "deleteBooking",
|
|
36
50
|
DeleteChecklistItem: "deleteChecklistItem",
|
|
51
|
+
DeleteChecklistTemplate: "deleteChecklistTemplate",
|
|
52
|
+
DeleteForm: "deleteForm",
|
|
53
|
+
DeleteFormField: "deleteFormField",
|
|
54
|
+
DeleteFormSection: "deleteFormSection",
|
|
37
55
|
DeleteItineraryItem: "deleteItineraryItem",
|
|
56
|
+
DeleteParty: "deleteParty",
|
|
38
57
|
DeletePickupStop: "deletePickupStop",
|
|
39
58
|
DeleteRoomingRoom: "deleteRoomingRoom",
|
|
40
59
|
DeleteRoomingStayWindow: "deleteRoomingStayWindow",
|
|
41
60
|
DeleteSeatingVehicle: "deleteSeatingVehicle",
|
|
61
|
+
DeleteVendor: "deleteVendor",
|
|
62
|
+
DispatchForm: "dispatchForm",
|
|
63
|
+
EraseTraveller: "eraseTraveller",
|
|
42
64
|
ExportCloseoutPack: "exportCloseoutPack",
|
|
65
|
+
ExportFormResponses: "exportFormResponses",
|
|
66
|
+
ExportTraveller: "exportTraveller",
|
|
67
|
+
GetAgencySettingsSelf: "getAgencySettingsSelf",
|
|
68
|
+
GetForm: "getForm",
|
|
69
|
+
GetFormAggregate: "getFormAggregate",
|
|
70
|
+
GetFormConsentReceipt: "getFormConsentReceipt",
|
|
71
|
+
GetFormResponse: "getFormResponse",
|
|
72
|
+
GetFormsCompletionMatrix: "getFormsCompletionMatrix",
|
|
73
|
+
GetFormsCrossModuleAnswers: "getFormsCrossModuleAnswers",
|
|
43
74
|
GetShareManifest: "getShareManifest",
|
|
44
75
|
GetShareSnapshot: "getShareSnapshot",
|
|
76
|
+
GetTrip: "getTrip",
|
|
77
|
+
GetTripManifest: "getTripManifest",
|
|
45
78
|
IssueFloat: "issueFloat",
|
|
46
79
|
LinkExpenseReceipt: "linkExpenseReceipt",
|
|
47
80
|
LinkSeatingManager: "linkSeatingManager",
|
|
81
|
+
ListAgencyManagers: "listAgencyManagers",
|
|
82
|
+
ListBookings: "listBookings",
|
|
48
83
|
ListChecklistTemplates: "listChecklistTemplates",
|
|
84
|
+
ListChecklistTemplatesAdmin: "listChecklistTemplatesAdmin",
|
|
49
85
|
ListCollections: "listCollections",
|
|
50
86
|
ListEligibleCollections: "listEligibleCollections",
|
|
51
87
|
ListExpenses: "listExpenses",
|
|
88
|
+
ListFormBindings: "listFormBindings",
|
|
89
|
+
ListForms: "listForms",
|
|
52
90
|
ListJourneyTriggers: "listJourneyTriggers",
|
|
53
91
|
ListManagerNotifications: "listManagerNotifications",
|
|
92
|
+
ListParties: "listParties",
|
|
54
93
|
ListPickupStops: "listPickupStops",
|
|
55
94
|
ListRoomingStayWindows: "listRoomingStayWindows",
|
|
95
|
+
ListTrekWalkIns: "listTrekWalkIns",
|
|
96
|
+
ListTripFormResponses: "listTripFormResponses",
|
|
97
|
+
ListTripForms: "listTripForms",
|
|
98
|
+
ListTripManagers: "listTripManagers",
|
|
56
99
|
ListTripVendors: "listTripVendors",
|
|
57
100
|
LockCloseout: "lockCloseout",
|
|
58
101
|
LogExpense: "logExpense",
|
|
102
|
+
ManagerCreateFormResponse: "managerCreateFormResponse",
|
|
103
|
+
MarkNotificationRead: "markNotificationRead",
|
|
104
|
+
PatchAgencySettingsSelf: "patchAgencySettingsSelf",
|
|
59
105
|
PatchChecklistItem: "patchChecklistItem",
|
|
106
|
+
PatchChecklistTemplate: "patchChecklistTemplate",
|
|
107
|
+
PatchForm: "patchForm",
|
|
108
|
+
PatchFormField: "patchFormField",
|
|
109
|
+
PatchFormSection: "patchFormSection",
|
|
60
110
|
PatchItineraryDay: "patchItineraryDay",
|
|
61
111
|
PatchItineraryItem: "patchItineraryItem",
|
|
62
112
|
PatchJourneyTrigger: "patchJourneyTrigger",
|
|
113
|
+
PatchParty: "patchParty",
|
|
63
114
|
PatchPickupStop: "patchPickupStop",
|
|
64
115
|
PatchRoomingRoom: "patchRoomingRoom",
|
|
65
116
|
PatchRoomingStayWindow: "patchRoomingStayWindow",
|
|
66
117
|
PatchSeatingVehicle: "patchSeatingVehicle",
|
|
118
|
+
PatchTripManager: "patchTripManager",
|
|
67
119
|
PostponeTrek: "postponeTrek",
|
|
120
|
+
PublishChecklistTemplate: "publishChecklistTemplate",
|
|
121
|
+
PublishForm: "publishForm",
|
|
68
122
|
PullChecklistTemplate: "pullChecklistTemplate",
|
|
123
|
+
PushBulkTrips: "pushBulkTrips",
|
|
124
|
+
PushManifest: "pushManifest",
|
|
125
|
+
PushTripBalances: "pushTripBalances",
|
|
126
|
+
ReadAgencyFeedbackSummary: "readAgencyFeedbackSummary",
|
|
69
127
|
ReadChecklistAggregate: "readChecklistAggregate",
|
|
70
128
|
ReadCloseout: "readCloseout",
|
|
71
129
|
ReadExpense: "readExpense",
|
|
@@ -82,26 +140,40 @@ var OperationId = {
|
|
|
82
140
|
ReadSeatingBoard: "readSeatingBoard",
|
|
83
141
|
ReadTrekBoard: "readTrekBoard",
|
|
84
142
|
ReadTrekWalkInMeta: "readTrekWalkInMeta",
|
|
143
|
+
ReadTripFeedbackSummary: "readTripFeedbackSummary",
|
|
85
144
|
RebuildJourney: "rebuildJourney",
|
|
86
145
|
RecordCollection: "recordCollection",
|
|
146
|
+
RemoveFromManifest: "removeFromManifest",
|
|
147
|
+
ReopenForm: "reopenForm",
|
|
87
148
|
ReopenPickupStop: "reopenPickupStop",
|
|
149
|
+
ReorderForm: "reorderForm",
|
|
88
150
|
ReorderItineraryItem: "reorderItineraryItem",
|
|
89
151
|
ReorderPickupStops: "reorderPickupStops",
|
|
152
|
+
ReplaceBookingVouchers: "replaceBookingVouchers",
|
|
90
153
|
RequestFileUpload: "requestFileUpload",
|
|
91
154
|
ReturnFloat: "returnFloat",
|
|
92
155
|
RunJourneyStep: "runJourneyStep",
|
|
93
156
|
SaveCloseoutHandover: "saveCloseoutHandover",
|
|
157
|
+
SearchTravellerDirectory: "searchTravellerDirectory",
|
|
94
158
|
ShareListForms: "shareListForms",
|
|
95
159
|
ShareRenderForm: "shareRenderForm",
|
|
96
160
|
ShareSaveForm: "shareSaveForm",
|
|
97
161
|
ShareSubmitForm: "shareSubmitForm",
|
|
98
162
|
SubmitExpenseClaim: "submitExpenseClaim",
|
|
163
|
+
SyncDigest: "syncDigest",
|
|
99
164
|
SyncPullTrip: "syncPullTrip",
|
|
100
165
|
SyncPush: "syncPush",
|
|
101
166
|
SyncPushShare: "syncPushShare",
|
|
102
167
|
ToggleChecklistItem: "toggleChecklistItem",
|
|
168
|
+
UnarchiveForm: "unarchiveForm",
|
|
169
|
+
UnassignManager: "unassignManager",
|
|
103
170
|
UnlinkSeatingManager: "unlinkSeatingManager",
|
|
104
171
|
UnlockCloseout: "unlockCloseout",
|
|
172
|
+
UpsertAgency: "upsertAgency",
|
|
173
|
+
UpsertManager: "upsertManager",
|
|
174
|
+
UpsertTravellerProfile: "upsertTravellerProfile",
|
|
175
|
+
UpsertTrip: "upsertTrip",
|
|
176
|
+
UpsertVendor: "upsertVendor",
|
|
105
177
|
VoidCollection: "voidCollection",
|
|
106
178
|
VoidExpense: "voidExpense",
|
|
107
179
|
WithdrawExpenseClaim: "withdrawExpenseClaim"
|
|
@@ -109,20 +181,22 @@ var OperationId = {
|
|
|
109
181
|
var OPERATION_SECURITY = {
|
|
110
182
|
acceptConsoleInvite: [],
|
|
111
183
|
acceptPlatformAdminInvite: [],
|
|
112
|
-
addChecklistItem: ["managerAuth"],
|
|
113
|
-
addItineraryItem: ["managerAuth"],
|
|
184
|
+
addChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
185
|
+
addItineraryItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
114
186
|
addPlatformIncidentUpdate: ["platformAdminAuth"],
|
|
115
187
|
adjustFloat: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
116
188
|
advanceTestTime: ["apiKeyAuth"],
|
|
189
|
+
advanceTestTimeConsole: ["consoleAuth"],
|
|
117
190
|
archiveForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
118
191
|
assignManager: ["apiKeyAuth"],
|
|
119
|
-
assignPickupTraveller: ["managerAuth"],
|
|
120
|
-
assignRoomingBed: ["managerAuth"],
|
|
121
|
-
assignSeating: ["managerAuth"],
|
|
122
|
-
autoAssignRooming: ["managerAuth"],
|
|
123
|
-
autoAssignSeating: ["managerAuth"],
|
|
192
|
+
assignPickupTraveller: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
193
|
+
assignRoomingBed: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
194
|
+
assignSeating: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
195
|
+
autoAssignRooming: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
196
|
+
autoAssignSeating: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
124
197
|
boardPickupTraveller: ["managerAuth"],
|
|
125
198
|
buildTestFixtures: ["apiKeyAuth"],
|
|
199
|
+
buildTestFixturesConsole: ["consoleAuth"],
|
|
126
200
|
bulkUpsertBookings: ["apiKeyAuth"],
|
|
127
201
|
cancelTrip: ["apiKeyAuth"],
|
|
128
202
|
changeMyConsolePassword: ["consoleAuth"],
|
|
@@ -131,45 +205,56 @@ var OPERATION_SECURITY = {
|
|
|
131
205
|
cloneForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
132
206
|
closeForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
133
207
|
closePickupStop: ["managerAuth"],
|
|
134
|
-
confirmFileUpload: ["managerAuth", "apiKeyAuth"],
|
|
208
|
+
confirmFileUpload: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
135
209
|
consoleLogin: [],
|
|
136
210
|
consoleLogout: ["consoleAuth"],
|
|
137
211
|
consoleSwitchPlane: ["consoleAuth"],
|
|
138
212
|
copyAgencyEntitlement: ["consoleAuth"],
|
|
213
|
+
correctPickupBoardStatus: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
214
|
+
createAgencyConsole: ["consoleAuth"],
|
|
139
215
|
createApiKey: ["consoleAuth"],
|
|
216
|
+
createChecklistTemplate: ["apiKeyAuth", "agencyAdminAuth"],
|
|
140
217
|
createCommsProviderCredential: ["apiKeyAuth"],
|
|
218
|
+
createCommsProviderCredentialConsole: ["consoleAuth"],
|
|
141
219
|
createConsoleUser: ["consoleAuth"],
|
|
142
220
|
createForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
143
221
|
createFormField: ["apiKeyAuth", "agencyAdminAuth"],
|
|
144
222
|
createFormSection: ["apiKeyAuth", "agencyAdminAuth"],
|
|
145
223
|
createMessageTemplate: ["apiKeyAuth"],
|
|
146
|
-
|
|
224
|
+
createParty: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
225
|
+
createPickupStop: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
147
226
|
createPlatformAdmin: ["platformAdminAuth"],
|
|
148
227
|
createPlatformIncident: ["platformAdminAuth"],
|
|
149
228
|
createPlatformPartner: ["platformAdminAuth"],
|
|
150
229
|
createPlatformPartnerConsoleUser: ["platformAdminAuth"],
|
|
151
|
-
createRoomingRoom: ["managerAuth"],
|
|
152
|
-
createRoomingStayWindow: ["managerAuth"],
|
|
153
|
-
createSeatingVehicle: ["managerAuth"],
|
|
230
|
+
createRoomingRoom: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
231
|
+
createRoomingStayWindow: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
232
|
+
createSeatingVehicle: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
154
233
|
createSupportGrant: ["platformAdminAuth"],
|
|
155
|
-
|
|
234
|
+
createTraveller: ["apiKeyAuth", "agencyAdminAuth"],
|
|
235
|
+
createTrekWalkIn: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
156
236
|
deleteBooking: ["apiKeyAuth"],
|
|
157
|
-
deleteChecklistItem: ["managerAuth"],
|
|
237
|
+
deleteChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
238
|
+
deleteChecklistTemplate: ["apiKeyAuth", "agencyAdminAuth"],
|
|
158
239
|
deleteForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
159
240
|
deleteFormField: ["apiKeyAuth", "agencyAdminAuth"],
|
|
160
241
|
deleteFormSection: ["apiKeyAuth", "agencyAdminAuth"],
|
|
161
|
-
deleteItineraryItem: ["managerAuth"],
|
|
162
|
-
|
|
242
|
+
deleteItineraryItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
243
|
+
deleteParty: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
244
|
+
deletePickupStop: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
163
245
|
deletePlatformPartnerPlan: ["platformAdminAuth"],
|
|
164
|
-
deleteRoomingRoom: ["managerAuth"],
|
|
165
|
-
deleteRoomingStayWindow: ["managerAuth"],
|
|
166
|
-
deleteSeatingVehicle: ["managerAuth"],
|
|
246
|
+
deleteRoomingRoom: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
247
|
+
deleteRoomingStayWindow: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
248
|
+
deleteSeatingVehicle: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
249
|
+
deleteVendor: ["apiKeyAuth", "agencyAdminAuth"],
|
|
167
250
|
dispatchForm: ["managerAuth", "apiKeyAuth"],
|
|
168
251
|
editWebhookEndpoint: ["consoleAuth"],
|
|
169
252
|
eraseTraveller: ["apiKeyAuth"],
|
|
170
|
-
exportCloseoutPack: ["managerAuth", "apiKeyAuth"],
|
|
253
|
+
exportCloseoutPack: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
171
254
|
exportFormResponses: ["apiKeyAuth", "managerAuth"],
|
|
172
255
|
exportTraveller: ["apiKeyAuth"],
|
|
256
|
+
getAgencySettings: ["consoleAuth"],
|
|
257
|
+
getAgencySettingsSelf: ["apiKeyAuth", "agencyAdminAuth"],
|
|
173
258
|
getForm: ["apiKeyAuth", "agencyAdminAuth", "managerAuth"],
|
|
174
259
|
getFormAggregate: ["apiKeyAuth"],
|
|
175
260
|
getFormConsentReceipt: ["apiKeyAuth", "managerAuth"],
|
|
@@ -179,17 +264,20 @@ var OPERATION_SECURITY = {
|
|
|
179
264
|
getShareManifest: ["shareAuth"],
|
|
180
265
|
getShareSnapshot: ["shareAuth"],
|
|
181
266
|
getTrip: ["apiKeyAuth"],
|
|
267
|
+
getTripManifest: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
182
268
|
health: [],
|
|
183
269
|
healthV1: [],
|
|
184
270
|
inspectConsoleInvite: [],
|
|
185
271
|
inspectPlatformAdminInvite: [],
|
|
186
272
|
issueFloat: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
187
|
-
linkExpenseReceipt: ["managerAuth"],
|
|
188
|
-
linkSeatingManager: ["managerAuth"],
|
|
273
|
+
linkExpenseReceipt: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
274
|
+
linkSeatingManager: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
189
275
|
listAgencies: ["consoleAuth"],
|
|
276
|
+
listAgencyManagers: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
190
277
|
listApiKeys: ["consoleAuth"],
|
|
191
278
|
listBookings: ["apiKeyAuth", "managerAuth"],
|
|
192
279
|
listChecklistTemplates: ["managerAuth", "apiKeyAuth"],
|
|
280
|
+
listChecklistTemplatesAdmin: ["apiKeyAuth", "agencyAdminAuth"],
|
|
193
281
|
listCollections: ["managerAuth", "apiKeyAuth"],
|
|
194
282
|
listConsoleUsers: ["consoleAuth"],
|
|
195
283
|
listEligibleCollections: ["managerAuth", "apiKeyAuth"],
|
|
@@ -204,6 +292,7 @@ var OPERATION_SECURITY = {
|
|
|
204
292
|
listMessagesConsole: ["consoleAuth"],
|
|
205
293
|
listMessageTemplates: ["apiKeyAuth"],
|
|
206
294
|
listMyConsoleSessions: ["consoleAuth"],
|
|
295
|
+
listParties: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
207
296
|
listPickupStops: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
208
297
|
listPlatformAdmins: ["platformAdminAuth"],
|
|
209
298
|
listPlatformAudit: ["platformAdminAuth"],
|
|
@@ -215,50 +304,58 @@ var OPERATION_SECURITY = {
|
|
|
215
304
|
listRoomingStayWindows: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
216
305
|
listSupportIngestLog: ["platformAdminAuth"],
|
|
217
306
|
listSupportWebhookDeliveries: ["platformAdminAuth"],
|
|
307
|
+
listTrekWalkIns: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
218
308
|
listTripFormResponses: ["managerAuth", "apiKeyAuth"],
|
|
219
309
|
listTripForms: ["managerAuth", "apiKeyAuth"],
|
|
310
|
+
listTripManagers: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
220
311
|
listTripVendors: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
221
312
|
listWebhookDeliveries: ["apiKeyAuth"],
|
|
222
313
|
listWebhookDeliveriesConsole: ["consoleAuth"],
|
|
223
314
|
listWebhookEndpoints: ["consoleAuth"],
|
|
224
|
-
lockCloseout: ["managerAuth"],
|
|
225
|
-
logExpense: ["managerAuth"],
|
|
226
|
-
managerCreateFormResponse: ["managerAuth"],
|
|
315
|
+
lockCloseout: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
316
|
+
logExpense: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
317
|
+
managerCreateFormResponse: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
227
318
|
markNotificationRead: ["managerAuth"],
|
|
228
319
|
mintAgencyAdminTokens: ["apiKeyAuth"],
|
|
229
320
|
mintManagerTokens: ["apiKeyAuth"],
|
|
230
321
|
mintShareToken: ["apiKeyAuth"],
|
|
231
322
|
nudgeConsoleInvite: [],
|
|
232
323
|
patchAgencyEntitlement: ["consoleAuth"],
|
|
233
|
-
|
|
324
|
+
patchAgencySettings: ["consoleAuth"],
|
|
325
|
+
patchAgencySettingsSelf: ["agencyAdminAuth"],
|
|
326
|
+
patchChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
327
|
+
patchChecklistTemplate: ["apiKeyAuth", "agencyAdminAuth"],
|
|
234
328
|
patchConsoleUser: ["consoleAuth"],
|
|
235
329
|
patchForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
236
330
|
patchFormField: ["apiKeyAuth", "agencyAdminAuth"],
|
|
237
331
|
patchFormSection: ["apiKeyAuth", "agencyAdminAuth"],
|
|
238
|
-
patchItineraryDay: ["managerAuth"],
|
|
239
|
-
patchItineraryItem: ["managerAuth"],
|
|
332
|
+
patchItineraryDay: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
333
|
+
patchItineraryItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
240
334
|
patchJourneyTrigger: ["apiKeyAuth", "agencyAdminAuth"],
|
|
241
335
|
patchJourneyTriggerConsole: ["consoleAuth"],
|
|
242
336
|
patchMessageTemplate: ["apiKeyAuth"],
|
|
243
|
-
|
|
337
|
+
patchParty: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
338
|
+
patchPickupStop: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
244
339
|
patchPlatformAdmin: ["platformAdminAuth"],
|
|
245
340
|
patchPlatformPartnerConsoleUser: ["platformAdminAuth"],
|
|
246
|
-
patchRoomingRoom: ["managerAuth"],
|
|
247
|
-
patchRoomingStayWindow: ["managerAuth"],
|
|
248
|
-
patchSeatingVehicle: ["managerAuth"],
|
|
341
|
+
patchRoomingRoom: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
342
|
+
patchRoomingStayWindow: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
343
|
+
patchSeatingVehicle: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
249
344
|
patchShareToken: ["apiKeyAuth"],
|
|
345
|
+
patchTripManager: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
250
346
|
platformHealth: ["platformAdminAuth"],
|
|
251
347
|
platformLogin: [],
|
|
252
348
|
platformLogout: ["platformAdminAuth"],
|
|
253
349
|
platformMe: ["platformAdminAuth"],
|
|
254
350
|
platformRefreshTokens: ["platformAdminAuth"],
|
|
255
351
|
platformWebhookHealth: ["platformAdminAuth"],
|
|
256
|
-
postponeTrek: ["managerAuth"],
|
|
352
|
+
postponeTrek: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
353
|
+
publishChecklistTemplate: ["apiKeyAuth", "agencyAdminAuth"],
|
|
257
354
|
publishForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
258
|
-
pullChecklistTemplate: ["managerAuth"],
|
|
355
|
+
pullChecklistTemplate: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
259
356
|
pushBulkTrips: ["apiKeyAuth"],
|
|
260
|
-
pushManifest: ["apiKeyAuth"],
|
|
261
|
-
pushTripBalances: ["apiKeyAuth"],
|
|
357
|
+
pushManifest: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
358
|
+
pushTripBalances: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
262
359
|
putCommsConfig: ["apiKeyAuth"],
|
|
263
360
|
putCommsConfigConsole: ["consoleAuth"],
|
|
264
361
|
putPlatformPartnerPlan: ["platformAdminAuth"],
|
|
@@ -277,8 +374,8 @@ var OPERATION_SECURITY = {
|
|
|
277
374
|
readEndpointDelivery: ["consoleAuth"],
|
|
278
375
|
readEntitlementCatalog: ["consoleAuth"],
|
|
279
376
|
readExpense: ["managerAuth", "apiKeyAuth"],
|
|
280
|
-
readFile: ["managerAuth", "apiKeyAuth"],
|
|
281
|
-
readFileUrl: ["managerAuth", "apiKeyAuth"],
|
|
377
|
+
readFile: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
378
|
+
readFileUrl: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
282
379
|
readFloatLedger: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
283
380
|
readFloatSummary: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
284
381
|
readIngestLog: ["consoleAuth"],
|
|
@@ -296,10 +393,13 @@ var OPERATION_SECURITY = {
|
|
|
296
393
|
readSupportJourneyState: ["platformAdminAuth"],
|
|
297
394
|
readSupportWebhookDeliveryDetail: ["platformAdminAuth"],
|
|
298
395
|
readTenantDefaultCommsConfig: ["apiKeyAuth"],
|
|
396
|
+
readTenantDefaultCommsConfigConsole: ["consoleAuth"],
|
|
299
397
|
readTestClock: ["apiKeyAuth"],
|
|
398
|
+
readTestClockConsole: ["consoleAuth"],
|
|
300
399
|
readTestQuota: ["apiKeyAuth"],
|
|
301
|
-
|
|
302
|
-
|
|
400
|
+
readTestQuotaConsole: ["consoleAuth"],
|
|
401
|
+
readTrekBoard: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
402
|
+
readTrekWalkInMeta: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
303
403
|
readTripFeedbackSummary: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
304
404
|
readUsage: ["consoleAuth"],
|
|
305
405
|
readWebhookDelivery: ["apiKeyAuth"],
|
|
@@ -307,7 +407,7 @@ var OPERATION_SECURITY = {
|
|
|
307
407
|
readWebhookEndpoint: ["consoleAuth"],
|
|
308
408
|
readWebhookEventCatalog: ["consoleAuth"],
|
|
309
409
|
rebuildJourney: ["apiKeyAuth"],
|
|
310
|
-
recordCollection: ["managerAuth"],
|
|
410
|
+
recordCollection: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
311
411
|
redeliverEndpointDelivery: ["consoleAuth"],
|
|
312
412
|
redeliverWebhookDelivery: ["apiKeyAuth"],
|
|
313
413
|
redeliverWebhookDeliveryConsole: ["consoleAuth"],
|
|
@@ -319,22 +419,23 @@ var OPERATION_SECURITY = {
|
|
|
319
419
|
reissueConsoleUserInvite: ["consoleAuth"],
|
|
320
420
|
reissuePlatformAdminInvite: ["platformAdminAuth"],
|
|
321
421
|
reissuePlatformPartnerConsoleUserInvite: ["platformAdminAuth"],
|
|
322
|
-
removeFromManifest: ["apiKeyAuth"],
|
|
422
|
+
removeFromManifest: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
323
423
|
renamePlatformPartner: ["platformAdminAuth"],
|
|
324
424
|
reopenForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
325
425
|
reopenPickupStop: ["managerAuth"],
|
|
326
426
|
reorderForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
327
|
-
reorderItineraryItem: ["managerAuth"],
|
|
328
|
-
reorderPickupStops: ["managerAuth"],
|
|
427
|
+
reorderItineraryItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
428
|
+
reorderPickupStops: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
329
429
|
replaceBookingVouchers: ["apiKeyAuth"],
|
|
330
430
|
replaySupportWebhookRange: ["platformAdminAuth"],
|
|
331
431
|
replayWebhookEndpoint: ["apiKeyAuth"],
|
|
332
432
|
replayWebhookEndpointConsole: ["consoleAuth"],
|
|
333
|
-
requestFileUpload: ["managerAuth", "apiKeyAuth"],
|
|
433
|
+
requestFileUpload: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
334
434
|
resetPlatformPartnerConsoleUser: ["platformAdminAuth"],
|
|
335
435
|
resetTestClock: ["apiKeyAuth"],
|
|
436
|
+
resetTestClockConsole: ["consoleAuth"],
|
|
336
437
|
resolvePlatformCredential: ["platformAdminAuth"],
|
|
337
|
-
returnFloat: ["managerAuth"],
|
|
438
|
+
returnFloat: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
338
439
|
revokeApiKey: ["consoleAuth"],
|
|
339
440
|
revokeMyConsoleSession: ["consoleAuth"],
|
|
340
441
|
revokePlatformPartnerApiKey: ["platformAdminAuth"],
|
|
@@ -342,33 +443,38 @@ var OPERATION_SECURITY = {
|
|
|
342
443
|
rotateApiKey: ["consoleAuth"],
|
|
343
444
|
rotateWebhookEndpointSecret: ["consoleAuth"],
|
|
344
445
|
runJourneyStep: ["apiKeyAuth"],
|
|
345
|
-
saveCloseoutHandover: ["managerAuth"],
|
|
446
|
+
saveCloseoutHandover: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
447
|
+
searchTravellerDirectory: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
346
448
|
sendCommsTestMessage: ["apiKeyAuth"],
|
|
449
|
+
sendCommsTestMessageConsole: ["consoleAuth"],
|
|
347
450
|
sendMessage: ["apiKeyAuth"],
|
|
348
451
|
setPlatformPartnerStatus: ["platformAdminAuth"],
|
|
349
452
|
shareListForms: ["shareAuth"],
|
|
350
453
|
shareRenderForm: ["shareAuth"],
|
|
351
454
|
shareSaveForm: ["shareAuth"],
|
|
352
455
|
shareSubmitForm: ["shareAuth"],
|
|
353
|
-
submitExpenseClaim: ["managerAuth"],
|
|
456
|
+
submitExpenseClaim: ["managerAuth", "apiKeyAuth"],
|
|
354
457
|
syncDigest: ["apiKeyAuth"],
|
|
355
458
|
syncPullTrip: ["managerAuth", "apiKeyAuth"],
|
|
356
459
|
syncPush: ["managerAuth", "apiKeyAuth"],
|
|
357
460
|
syncPushShare: [],
|
|
358
461
|
testCommsProviderCredential: ["apiKeyAuth"],
|
|
462
|
+
testCommsProviderCredentialConsole: ["consoleAuth"],
|
|
359
463
|
testWebhookEndpoint: ["consoleAuth"],
|
|
360
|
-
toggleChecklistItem: ["managerAuth"],
|
|
464
|
+
toggleChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
361
465
|
unarchiveForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
362
466
|
unassignManager: ["apiKeyAuth"],
|
|
363
|
-
unlinkSeatingManager: ["managerAuth"],
|
|
467
|
+
unlinkSeatingManager: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
364
468
|
unlockCloseout: ["apiKeyAuth"],
|
|
469
|
+
upsertAgency: ["apiKeyAuth"],
|
|
365
470
|
upsertAgencyAdmin: ["apiKeyAuth"],
|
|
366
471
|
upsertManager: ["apiKeyAuth"],
|
|
367
472
|
upsertTravellerProfile: ["apiKeyAuth"],
|
|
368
473
|
upsertTrip: ["apiKeyAuth"],
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
474
|
+
upsertVendor: ["apiKeyAuth", "agencyAdminAuth"],
|
|
475
|
+
voidCollection: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
476
|
+
voidExpense: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
477
|
+
withdrawExpenseClaim: ["managerAuth", "apiKeyAuth"]
|
|
372
478
|
};
|
|
373
479
|
var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
374
480
|
acceptConsoleInvite: true,
|
|
@@ -378,6 +484,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
378
484
|
addPlatformIncidentUpdate: false,
|
|
379
485
|
adjustFloat: true,
|
|
380
486
|
advanceTestTime: false,
|
|
487
|
+
advanceTestTimeConsole: false,
|
|
381
488
|
archiveForm: false,
|
|
382
489
|
assignManager: true,
|
|
383
490
|
assignPickupTraveller: true,
|
|
@@ -387,6 +494,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
387
494
|
autoAssignSeating: true,
|
|
388
495
|
boardPickupTraveller: true,
|
|
389
496
|
buildTestFixtures: false,
|
|
497
|
+
buildTestFixturesConsole: false,
|
|
390
498
|
bulkUpsertBookings: true,
|
|
391
499
|
cancelTrip: true,
|
|
392
500
|
changeMyConsolePassword: true,
|
|
@@ -400,13 +508,18 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
400
508
|
consoleLogout: false,
|
|
401
509
|
consoleSwitchPlane: false,
|
|
402
510
|
copyAgencyEntitlement: true,
|
|
511
|
+
correctPickupBoardStatus: false,
|
|
512
|
+
createAgencyConsole: false,
|
|
403
513
|
createApiKey: true,
|
|
514
|
+
createChecklistTemplate: true,
|
|
404
515
|
createCommsProviderCredential: true,
|
|
516
|
+
createCommsProviderCredentialConsole: true,
|
|
405
517
|
createConsoleUser: true,
|
|
406
518
|
createForm: true,
|
|
407
519
|
createFormField: false,
|
|
408
520
|
createFormSection: false,
|
|
409
521
|
createMessageTemplate: true,
|
|
522
|
+
createParty: true,
|
|
410
523
|
createPickupStop: true,
|
|
411
524
|
createPlatformAdmin: false,
|
|
412
525
|
createPlatformIncident: false,
|
|
@@ -416,24 +529,30 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
416
529
|
createRoomingStayWindow: true,
|
|
417
530
|
createSeatingVehicle: true,
|
|
418
531
|
createSupportGrant: false,
|
|
532
|
+
createTraveller: true,
|
|
419
533
|
createTrekWalkIn: true,
|
|
420
534
|
deleteBooking: true,
|
|
421
535
|
deleteChecklistItem: false,
|
|
536
|
+
deleteChecklistTemplate: false,
|
|
422
537
|
deleteForm: false,
|
|
423
538
|
deleteFormField: false,
|
|
424
539
|
deleteFormSection: false,
|
|
425
540
|
deleteItineraryItem: false,
|
|
541
|
+
deleteParty: true,
|
|
426
542
|
deletePickupStop: false,
|
|
427
543
|
deletePlatformPartnerPlan: false,
|
|
428
544
|
deleteRoomingRoom: false,
|
|
429
545
|
deleteRoomingStayWindow: false,
|
|
430
546
|
deleteSeatingVehicle: false,
|
|
547
|
+
deleteVendor: true,
|
|
431
548
|
dispatchForm: true,
|
|
432
549
|
editWebhookEndpoint: true,
|
|
433
550
|
eraseTraveller: true,
|
|
434
551
|
exportCloseoutPack: false,
|
|
435
552
|
exportFormResponses: false,
|
|
436
553
|
exportTraveller: false,
|
|
554
|
+
getAgencySettings: false,
|
|
555
|
+
getAgencySettingsSelf: false,
|
|
437
556
|
getForm: false,
|
|
438
557
|
getFormAggregate: false,
|
|
439
558
|
getFormConsentReceipt: false,
|
|
@@ -443,6 +562,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
443
562
|
getShareManifest: false,
|
|
444
563
|
getShareSnapshot: false,
|
|
445
564
|
getTrip: false,
|
|
565
|
+
getTripManifest: false,
|
|
446
566
|
health: false,
|
|
447
567
|
healthV1: false,
|
|
448
568
|
inspectConsoleInvite: false,
|
|
@@ -451,9 +571,11 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
451
571
|
linkExpenseReceipt: true,
|
|
452
572
|
linkSeatingManager: true,
|
|
453
573
|
listAgencies: false,
|
|
574
|
+
listAgencyManagers: false,
|
|
454
575
|
listApiKeys: false,
|
|
455
576
|
listBookings: false,
|
|
456
577
|
listChecklistTemplates: false,
|
|
578
|
+
listChecklistTemplatesAdmin: false,
|
|
457
579
|
listCollections: false,
|
|
458
580
|
listConsoleUsers: false,
|
|
459
581
|
listEligibleCollections: false,
|
|
@@ -468,6 +590,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
468
590
|
listMessagesConsole: false,
|
|
469
591
|
listMessageTemplates: false,
|
|
470
592
|
listMyConsoleSessions: false,
|
|
593
|
+
listParties: false,
|
|
471
594
|
listPickupStops: false,
|
|
472
595
|
listPlatformAdmins: false,
|
|
473
596
|
listPlatformAudit: false,
|
|
@@ -479,8 +602,10 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
479
602
|
listRoomingStayWindows: false,
|
|
480
603
|
listSupportIngestLog: false,
|
|
481
604
|
listSupportWebhookDeliveries: false,
|
|
605
|
+
listTrekWalkIns: false,
|
|
482
606
|
listTripFormResponses: false,
|
|
483
607
|
listTripForms: false,
|
|
608
|
+
listTripManagers: false,
|
|
484
609
|
listTripVendors: false,
|
|
485
610
|
listWebhookDeliveries: false,
|
|
486
611
|
listWebhookDeliveriesConsole: false,
|
|
@@ -494,7 +619,10 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
494
619
|
mintShareToken: true,
|
|
495
620
|
nudgeConsoleInvite: false,
|
|
496
621
|
patchAgencyEntitlement: true,
|
|
622
|
+
patchAgencySettings: false,
|
|
623
|
+
patchAgencySettingsSelf: false,
|
|
497
624
|
patchChecklistItem: false,
|
|
625
|
+
patchChecklistTemplate: false,
|
|
498
626
|
patchConsoleUser: true,
|
|
499
627
|
patchForm: false,
|
|
500
628
|
patchFormField: false,
|
|
@@ -504,6 +632,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
504
632
|
patchJourneyTrigger: true,
|
|
505
633
|
patchJourneyTriggerConsole: true,
|
|
506
634
|
patchMessageTemplate: false,
|
|
635
|
+
patchParty: true,
|
|
507
636
|
patchPickupStop: false,
|
|
508
637
|
patchPlatformAdmin: false,
|
|
509
638
|
patchPlatformPartnerConsoleUser: false,
|
|
@@ -511,6 +640,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
511
640
|
patchRoomingStayWindow: false,
|
|
512
641
|
patchSeatingVehicle: false,
|
|
513
642
|
patchShareToken: false,
|
|
643
|
+
patchTripManager: false,
|
|
514
644
|
platformHealth: false,
|
|
515
645
|
platformLogin: true,
|
|
516
646
|
platformLogout: false,
|
|
@@ -518,6 +648,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
518
648
|
platformRefreshTokens: true,
|
|
519
649
|
platformWebhookHealth: false,
|
|
520
650
|
postponeTrek: true,
|
|
651
|
+
publishChecklistTemplate: false,
|
|
521
652
|
publishForm: false,
|
|
522
653
|
pullChecklistTemplate: true,
|
|
523
654
|
pushBulkTrips: true,
|
|
@@ -560,8 +691,11 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
560
691
|
readSupportJourneyState: false,
|
|
561
692
|
readSupportWebhookDeliveryDetail: false,
|
|
562
693
|
readTenantDefaultCommsConfig: false,
|
|
694
|
+
readTenantDefaultCommsConfigConsole: false,
|
|
563
695
|
readTestClock: false,
|
|
696
|
+
readTestClockConsole: false,
|
|
564
697
|
readTestQuota: false,
|
|
698
|
+
readTestQuotaConsole: false,
|
|
565
699
|
readTrekBoard: false,
|
|
566
700
|
readTrekWalkInMeta: false,
|
|
567
701
|
readTripFeedbackSummary: false,
|
|
@@ -597,6 +731,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
597
731
|
requestFileUpload: true,
|
|
598
732
|
resetPlatformPartnerConsoleUser: false,
|
|
599
733
|
resetTestClock: false,
|
|
734
|
+
resetTestClockConsole: false,
|
|
600
735
|
resolvePlatformCredential: false,
|
|
601
736
|
returnFloat: true,
|
|
602
737
|
revokeApiKey: true,
|
|
@@ -607,7 +742,9 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
607
742
|
rotateWebhookEndpointSecret: true,
|
|
608
743
|
runJourneyStep: true,
|
|
609
744
|
saveCloseoutHandover: true,
|
|
745
|
+
searchTravellerDirectory: false,
|
|
610
746
|
sendCommsTestMessage: true,
|
|
747
|
+
sendCommsTestMessageConsole: true,
|
|
611
748
|
sendMessage: true,
|
|
612
749
|
setPlatformPartnerStatus: false,
|
|
613
750
|
shareListForms: false,
|
|
@@ -620,16 +757,19 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
620
757
|
syncPush: false,
|
|
621
758
|
syncPushShare: false,
|
|
622
759
|
testCommsProviderCredential: true,
|
|
760
|
+
testCommsProviderCredentialConsole: true,
|
|
623
761
|
testWebhookEndpoint: false,
|
|
624
762
|
toggleChecklistItem: true,
|
|
625
763
|
unarchiveForm: false,
|
|
626
764
|
unassignManager: true,
|
|
627
765
|
unlinkSeatingManager: false,
|
|
628
766
|
unlockCloseout: true,
|
|
767
|
+
upsertAgency: true,
|
|
629
768
|
upsertAgencyAdmin: true,
|
|
630
769
|
upsertManager: true,
|
|
631
770
|
upsertTravellerProfile: true,
|
|
632
771
|
upsertTrip: true,
|
|
772
|
+
upsertVendor: true,
|
|
633
773
|
voidCollection: false,
|
|
634
774
|
voidExpense: false,
|
|
635
775
|
withdrawExpenseClaim: false
|
|
@@ -637,6 +777,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
637
777
|
|
|
638
778
|
// src/generated/error-codes.ts
|
|
639
779
|
var KaafilErrorCode = {
|
|
780
|
+
ActiveRequiresManager: "ACTIVE_REQUIRES_MANAGER",
|
|
640
781
|
BusinessRuleViolation: "BUSINESS_RULE_VIOLATION",
|
|
641
782
|
CannotPostpone: "CANNOT_POSTPONE",
|
|
642
783
|
CapabilityUnavailable: "CAPABILITY_UNAVAILABLE",
|
|
@@ -694,6 +835,7 @@ var OutboxClass = {
|
|
|
694
835
|
Fatal: "FATAL"
|
|
695
836
|
};
|
|
696
837
|
var ERROR_CODE_TABLE = {
|
|
838
|
+
ACTIVE_REQUIRES_MANAGER: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
697
839
|
BUSINESS_RULE_VIOLATION: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
698
840
|
CANNOT_POSTPONE: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
699
841
|
CAPABILITY_UNAVAILABLE: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
@@ -1764,6 +1906,16 @@ function createSyncResource(client) {
|
|
|
1764
1906
|
body,
|
|
1765
1907
|
...signal !== void 0 ? { signal } : {}
|
|
1766
1908
|
});
|
|
1909
|
+
},
|
|
1910
|
+
async digest(options) {
|
|
1911
|
+
const { agencyRef, signal } = options;
|
|
1912
|
+
return client.execute({
|
|
1913
|
+
method: "GET",
|
|
1914
|
+
operationId: OperationId.SyncDigest,
|
|
1915
|
+
path: "/api/v1/sync/digest",
|
|
1916
|
+
query: { agencyRef },
|
|
1917
|
+
...signal !== void 0 ? { signal } : {}
|
|
1918
|
+
});
|
|
1767
1919
|
}
|
|
1768
1920
|
};
|
|
1769
1921
|
}
|
|
@@ -3394,6 +3546,269 @@ var KaafilErrorCodeValues = Object.fromEntries(
|
|
|
3394
3546
|
Object.values(KaafilErrorCode).map((code) => [code, true])
|
|
3395
3547
|
);
|
|
3396
3548
|
|
|
3549
|
+
// src/pagination/paginator.ts
|
|
3550
|
+
var KaafilPaginationError = class extends Error {
|
|
3551
|
+
constructor(message) {
|
|
3552
|
+
super(message);
|
|
3553
|
+
this.name = "KaafilPaginationError";
|
|
3554
|
+
}
|
|
3555
|
+
};
|
|
3556
|
+
var KaafilPaginationInFlightError = class _KaafilPaginationInFlightError extends KaafilPaginationError {
|
|
3557
|
+
constructor() {
|
|
3558
|
+
super("next() was called while a previous call on this paginator was still in flight.");
|
|
3559
|
+
this.name = "KaafilPaginationInFlightError";
|
|
3560
|
+
Object.setPrototypeOf(this, _KaafilPaginationInFlightError.prototype);
|
|
3561
|
+
}
|
|
3562
|
+
};
|
|
3563
|
+
var KaafilPaginationExhaustedError = class _KaafilPaginationExhaustedError extends KaafilPaginationError {
|
|
3564
|
+
constructor() {
|
|
3565
|
+
super("next() was called after this paginator was already exhausted (hasNext is false).");
|
|
3566
|
+
this.name = "KaafilPaginationExhaustedError";
|
|
3567
|
+
Object.setPrototypeOf(this, _KaafilPaginationExhaustedError.prototype);
|
|
3568
|
+
}
|
|
3569
|
+
};
|
|
3570
|
+
var TERMINAL_STATUSES = /* @__PURE__ */ new Set([402, 404, 422]);
|
|
3571
|
+
function isTerminalStatus(error) {
|
|
3572
|
+
return typeof error === "object" && error !== null && "status" in error && typeof error.status === "number" && TERMINAL_STATUSES.has(error.status);
|
|
3573
|
+
}
|
|
3574
|
+
function createInitialState2(filters) {
|
|
3575
|
+
return {
|
|
3576
|
+
cursor: void 0,
|
|
3577
|
+
hasNext: true,
|
|
3578
|
+
isLoading: false,
|
|
3579
|
+
lastError: void 0,
|
|
3580
|
+
meta: void 0,
|
|
3581
|
+
items: [],
|
|
3582
|
+
filters
|
|
3583
|
+
};
|
|
3584
|
+
}
|
|
3585
|
+
function createPaginator(config) {
|
|
3586
|
+
const { fetchPage, limit } = config;
|
|
3587
|
+
const state = createInitialState2(config.filters);
|
|
3588
|
+
async function next() {
|
|
3589
|
+
if (state.isLoading) {
|
|
3590
|
+
throw new KaafilPaginationInFlightError();
|
|
3591
|
+
}
|
|
3592
|
+
if (!state.hasNext) {
|
|
3593
|
+
throw new KaafilPaginationExhaustedError();
|
|
3594
|
+
}
|
|
3595
|
+
state.isLoading = true;
|
|
3596
|
+
try {
|
|
3597
|
+
const page = await fetchPage({ cursor: state.cursor, limit, filters: state.filters });
|
|
3598
|
+
state.items.push(...page.items);
|
|
3599
|
+
state.cursor = page.meta.page.cursor ?? void 0;
|
|
3600
|
+
state.hasNext = page.meta.page.hasNext;
|
|
3601
|
+
state.meta = page.meta;
|
|
3602
|
+
state.lastError = void 0;
|
|
3603
|
+
return page.items;
|
|
3604
|
+
} catch (error) {
|
|
3605
|
+
state.lastError = error;
|
|
3606
|
+
if (isTerminalStatus(error)) {
|
|
3607
|
+
state.hasNext = false;
|
|
3608
|
+
return [];
|
|
3609
|
+
}
|
|
3610
|
+
throw error;
|
|
3611
|
+
} finally {
|
|
3612
|
+
state.isLoading = false;
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
function setFilters(filters) {
|
|
3616
|
+
const fresh = createInitialState2(filters);
|
|
3617
|
+
state.cursor = fresh.cursor;
|
|
3618
|
+
state.hasNext = fresh.hasNext;
|
|
3619
|
+
state.isLoading = fresh.isLoading;
|
|
3620
|
+
state.lastError = fresh.lastError;
|
|
3621
|
+
state.meta = fresh.meta;
|
|
3622
|
+
state.items.length = 0;
|
|
3623
|
+
state.filters = filters;
|
|
3624
|
+
}
|
|
3625
|
+
async function* iterate() {
|
|
3626
|
+
while (state.hasNext) {
|
|
3627
|
+
const page = await next();
|
|
3628
|
+
for (const item of page) {
|
|
3629
|
+
yield item;
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
return {
|
|
3634
|
+
get items() {
|
|
3635
|
+
return state.items;
|
|
3636
|
+
},
|
|
3637
|
+
get hasNext() {
|
|
3638
|
+
return state.hasNext;
|
|
3639
|
+
},
|
|
3640
|
+
get isLoading() {
|
|
3641
|
+
return state.isLoading;
|
|
3642
|
+
},
|
|
3643
|
+
get lastError() {
|
|
3644
|
+
return state.lastError;
|
|
3645
|
+
},
|
|
3646
|
+
get meta() {
|
|
3647
|
+
return state.meta;
|
|
3648
|
+
},
|
|
3649
|
+
next,
|
|
3650
|
+
setFilters,
|
|
3651
|
+
[Symbol.asyncIterator]: iterate
|
|
3652
|
+
};
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3655
|
+
// src/resources/internal.ts
|
|
3656
|
+
function narrowPaged(response) {
|
|
3657
|
+
if (response.meta.page === void 0) {
|
|
3658
|
+
throw new Error("invariant: a cursor-paginated response arrived without meta.page.");
|
|
3659
|
+
}
|
|
3660
|
+
return response;
|
|
3661
|
+
}
|
|
3662
|
+
function toPaginatorPage(response) {
|
|
3663
|
+
const paged = narrowPaged(response);
|
|
3664
|
+
return { items: paged, meta: paged.meta };
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
// src/resources/agencies.ts
|
|
3668
|
+
async function fetchAgencyManagersPage(client, agencyRef, request) {
|
|
3669
|
+
const response = await client.execute({
|
|
3670
|
+
method: "GET",
|
|
3671
|
+
operationId: OperationId.ListAgencyManagers,
|
|
3672
|
+
path: "/api/v1/agencies/{ref}/managers",
|
|
3673
|
+
pathParams: { ref: agencyRef },
|
|
3674
|
+
query: { ...request.filters, cursor: request.cursor, limit: request.limit }
|
|
3675
|
+
});
|
|
3676
|
+
return toPaginatorPage(response);
|
|
3677
|
+
}
|
|
3678
|
+
function createAgenciesResource(client) {
|
|
3679
|
+
return {
|
|
3680
|
+
async upsert(options) {
|
|
3681
|
+
const { agencyRef, idempotencyKey, signal, sourceUpdatedAt, ...rest } = options;
|
|
3682
|
+
const body = {
|
|
3683
|
+
...rest,
|
|
3684
|
+
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt")
|
|
3685
|
+
};
|
|
3686
|
+
return client.execute({
|
|
3687
|
+
method: "PUT",
|
|
3688
|
+
operationId: OperationId.UpsertAgency,
|
|
3689
|
+
path: "/api/v1/agencies/{ref}",
|
|
3690
|
+
pathParams: { ref: agencyRef },
|
|
3691
|
+
body,
|
|
3692
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
3693
|
+
...signal !== void 0 ? { signal } : {}
|
|
3694
|
+
});
|
|
3695
|
+
},
|
|
3696
|
+
managers: {
|
|
3697
|
+
list(options) {
|
|
3698
|
+
const { agencyRef, filters, limit } = options;
|
|
3699
|
+
return createPaginator({
|
|
3700
|
+
fetchPage: (request) => fetchAgencyManagersPage(client, agencyRef, request),
|
|
3701
|
+
filters: filters ?? {},
|
|
3702
|
+
...limit !== void 0 ? { limit } : {}
|
|
3703
|
+
});
|
|
3704
|
+
},
|
|
3705
|
+
async listPage(options) {
|
|
3706
|
+
const { agencyRef, cursor, limit, signal, ...filters } = options;
|
|
3707
|
+
const response = await client.execute({
|
|
3708
|
+
method: "GET",
|
|
3709
|
+
operationId: OperationId.ListAgencyManagers,
|
|
3710
|
+
path: "/api/v1/agencies/{ref}/managers",
|
|
3711
|
+
pathParams: { ref: agencyRef },
|
|
3712
|
+
query: { ...filters, cursor, limit },
|
|
3713
|
+
...signal !== void 0 ? { signal } : {}
|
|
3714
|
+
});
|
|
3715
|
+
return narrowPaged(response);
|
|
3716
|
+
}
|
|
3717
|
+
},
|
|
3718
|
+
settings: {
|
|
3719
|
+
async get(options) {
|
|
3720
|
+
const { agencyRef, signal } = options;
|
|
3721
|
+
return client.execute({
|
|
3722
|
+
method: "GET",
|
|
3723
|
+
operationId: OperationId.GetAgencySettingsSelf,
|
|
3724
|
+
path: "/api/v1/agencies/{ref}/settings/self",
|
|
3725
|
+
pathParams: { ref: agencyRef },
|
|
3726
|
+
...signal !== void 0 ? { signal } : {}
|
|
3727
|
+
});
|
|
3728
|
+
},
|
|
3729
|
+
async patch(options) {
|
|
3730
|
+
const { agencyRef, version, signal, ...body } = options;
|
|
3731
|
+
return client.execute({
|
|
3732
|
+
method: "PATCH",
|
|
3733
|
+
operationId: OperationId.PatchAgencySettingsSelf,
|
|
3734
|
+
path: "/api/v1/agencies/{ref}/settings/self",
|
|
3735
|
+
pathParams: { ref: agencyRef },
|
|
3736
|
+
body,
|
|
3737
|
+
headers: { "If-Match": String(version) },
|
|
3738
|
+
...signal !== void 0 ? { signal } : {}
|
|
3739
|
+
});
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
};
|
|
3743
|
+
}
|
|
3744
|
+
|
|
3745
|
+
// src/resources/bookings.ts
|
|
3746
|
+
function createBookingsResource(client) {
|
|
3747
|
+
return {
|
|
3748
|
+
async bulkUpsert(options) {
|
|
3749
|
+
const { tripRef, items, idempotencyKey, signal } = options;
|
|
3750
|
+
const body = items.map((item, index) => {
|
|
3751
|
+
const { startAt, endAt, sourceUpdatedAt, ...rest } = item;
|
|
3752
|
+
return {
|
|
3753
|
+
...rest,
|
|
3754
|
+
startAt: normalizeDateTimeInput(startAt, `items[${index}].startAt`),
|
|
3755
|
+
...endAt !== void 0 ? {
|
|
3756
|
+
endAt: endAt === null ? null : normalizeDateTimeInput(endAt, `items[${index}].endAt`)
|
|
3757
|
+
} : {},
|
|
3758
|
+
sourceUpdatedAt: normalizeDateTimeInput(
|
|
3759
|
+
sourceUpdatedAt,
|
|
3760
|
+
`items[${index}].sourceUpdatedAt`
|
|
3761
|
+
)
|
|
3762
|
+
};
|
|
3763
|
+
});
|
|
3764
|
+
return client.execute({
|
|
3765
|
+
method: "POST",
|
|
3766
|
+
operationId: OperationId.BulkUpsertBookings,
|
|
3767
|
+
path: "/api/v1/trips/{ref}/bookings",
|
|
3768
|
+
pathParams: { ref: tripRef },
|
|
3769
|
+
body,
|
|
3770
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
3771
|
+
...signal !== void 0 ? { signal } : {}
|
|
3772
|
+
});
|
|
3773
|
+
},
|
|
3774
|
+
async list(options) {
|
|
3775
|
+
const { tripRef, since, signal, ...filters } = options;
|
|
3776
|
+
return client.execute({
|
|
3777
|
+
method: "GET",
|
|
3778
|
+
operationId: OperationId.ListBookings,
|
|
3779
|
+
path: "/api/v1/trips/{ref}/bookings",
|
|
3780
|
+
pathParams: { ref: tripRef },
|
|
3781
|
+
query: { ...filters, since },
|
|
3782
|
+
...signal !== void 0 ? { signal } : {}
|
|
3783
|
+
});
|
|
3784
|
+
},
|
|
3785
|
+
async delete(options) {
|
|
3786
|
+
const { tripRef, bookingRef, idempotencyKey, signal } = options;
|
|
3787
|
+
return client.execute({
|
|
3788
|
+
method: "DELETE",
|
|
3789
|
+
operationId: OperationId.DeleteBooking,
|
|
3790
|
+
path: "/api/v1/trips/{ref}/bookings/{bookingRef}",
|
|
3791
|
+
pathParams: { ref: tripRef, bookingRef },
|
|
3792
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
3793
|
+
...signal !== void 0 ? { signal } : {}
|
|
3794
|
+
});
|
|
3795
|
+
},
|
|
3796
|
+
vouchers: {
|
|
3797
|
+
async replace(options) {
|
|
3798
|
+
const { tripRef, bookingRef, signal, ...body } = options;
|
|
3799
|
+
return client.execute({
|
|
3800
|
+
method: "PATCH",
|
|
3801
|
+
operationId: OperationId.ReplaceBookingVouchers,
|
|
3802
|
+
path: "/api/v1/trips/{ref}/bookings/{bookingRef}/vouchers",
|
|
3803
|
+
pathParams: { ref: tripRef, bookingRef },
|
|
3804
|
+
body,
|
|
3805
|
+
...signal !== void 0 ? { signal } : {}
|
|
3806
|
+
});
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
};
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3397
3812
|
// src/resources/checklists.ts
|
|
3398
3813
|
function createChecklistsResource(client) {
|
|
3399
3814
|
return {
|
|
@@ -3481,6 +3896,64 @@ function createChecklistsResource(client) {
|
|
|
3481
3896
|
...signal !== void 0 ? { signal } : {}
|
|
3482
3897
|
});
|
|
3483
3898
|
}
|
|
3899
|
+
},
|
|
3900
|
+
agencyTemplates: {
|
|
3901
|
+
async list(options) {
|
|
3902
|
+
const { agencyRef, signal } = options;
|
|
3903
|
+
return client.execute({
|
|
3904
|
+
method: "GET",
|
|
3905
|
+
operationId: OperationId.ListChecklistTemplatesAdmin,
|
|
3906
|
+
path: "/api/v1/agencies/{ref}/checklist-templates",
|
|
3907
|
+
pathParams: { ref: agencyRef },
|
|
3908
|
+
...signal !== void 0 ? { signal } : {}
|
|
3909
|
+
});
|
|
3910
|
+
},
|
|
3911
|
+
async create(options) {
|
|
3912
|
+
const { agencyRef, idempotencyKey, signal, ...body } = options;
|
|
3913
|
+
return client.execute({
|
|
3914
|
+
method: "POST",
|
|
3915
|
+
operationId: OperationId.CreateChecklistTemplate,
|
|
3916
|
+
path: "/api/v1/agencies/{ref}/checklist-templates",
|
|
3917
|
+
pathParams: { ref: agencyRef },
|
|
3918
|
+
body,
|
|
3919
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
3920
|
+
...signal !== void 0 ? { signal } : {}
|
|
3921
|
+
});
|
|
3922
|
+
},
|
|
3923
|
+
async patch(options) {
|
|
3924
|
+
const { agencyRef, templateId, version, signal, ...body } = options;
|
|
3925
|
+
return client.execute({
|
|
3926
|
+
method: "PATCH",
|
|
3927
|
+
operationId: OperationId.PatchChecklistTemplate,
|
|
3928
|
+
path: "/api/v1/agencies/{ref}/checklist-templates/{id}",
|
|
3929
|
+
pathParams: { ref: agencyRef, id: templateId },
|
|
3930
|
+
body,
|
|
3931
|
+
headers: { "If-Match": String(version) },
|
|
3932
|
+
...signal !== void 0 ? { signal } : {}
|
|
3933
|
+
});
|
|
3934
|
+
},
|
|
3935
|
+
async remove(options) {
|
|
3936
|
+
const { agencyRef, templateId, version, signal } = options;
|
|
3937
|
+
return client.execute({
|
|
3938
|
+
method: "DELETE",
|
|
3939
|
+
operationId: OperationId.DeleteChecklistTemplate,
|
|
3940
|
+
path: "/api/v1/agencies/{ref}/checklist-templates/{id}",
|
|
3941
|
+
pathParams: { ref: agencyRef, id: templateId },
|
|
3942
|
+
headers: { "If-Match": String(version) },
|
|
3943
|
+
...signal !== void 0 ? { signal } : {}
|
|
3944
|
+
});
|
|
3945
|
+
},
|
|
3946
|
+
async publish(options) {
|
|
3947
|
+
const { agencyRef, templateId, signal } = options;
|
|
3948
|
+
return client.execute({
|
|
3949
|
+
method: "POST",
|
|
3950
|
+
operationId: OperationId.PublishChecklistTemplate,
|
|
3951
|
+
path: "/api/v1/agencies/{ref}/checklist-templates/{id}/publish",
|
|
3952
|
+
pathParams: { ref: agencyRef, id: templateId },
|
|
3953
|
+
body: {},
|
|
3954
|
+
...signal !== void 0 ? { signal } : {}
|
|
3955
|
+
});
|
|
3956
|
+
}
|
|
3484
3957
|
}
|
|
3485
3958
|
};
|
|
3486
3959
|
}
|
|
@@ -3719,6 +4192,32 @@ function createExpensesResource(client) {
|
|
|
3719
4192
|
};
|
|
3720
4193
|
}
|
|
3721
4194
|
|
|
4195
|
+
// src/resources/feedback-nps.ts
|
|
4196
|
+
function createFeedbackNpsResource(client) {
|
|
4197
|
+
return {
|
|
4198
|
+
async agency(options) {
|
|
4199
|
+
const { agencyRef, signal } = options;
|
|
4200
|
+
return client.execute({
|
|
4201
|
+
method: "GET",
|
|
4202
|
+
operationId: OperationId.ReadAgencyFeedbackSummary,
|
|
4203
|
+
path: "/api/v1/agencies/{ref}/feedback/summary",
|
|
4204
|
+
pathParams: { ref: agencyRef },
|
|
4205
|
+
...signal !== void 0 ? { signal } : {}
|
|
4206
|
+
});
|
|
4207
|
+
},
|
|
4208
|
+
async trip(options) {
|
|
4209
|
+
const { tripRef, signal } = options;
|
|
4210
|
+
return client.execute({
|
|
4211
|
+
method: "GET",
|
|
4212
|
+
operationId: OperationId.ReadTripFeedbackSummary,
|
|
4213
|
+
path: "/api/v1/trips/{ref}/feedback/summary",
|
|
4214
|
+
pathParams: { ref: tripRef },
|
|
4215
|
+
...signal !== void 0 ? { signal } : {}
|
|
4216
|
+
});
|
|
4217
|
+
}
|
|
4218
|
+
};
|
|
4219
|
+
}
|
|
4220
|
+
|
|
3722
4221
|
// src/resources/files.ts
|
|
3723
4222
|
function createFilesResource(client) {
|
|
3724
4223
|
return {
|
|
@@ -3831,65 +4330,402 @@ function createFloatResource(client) {
|
|
|
3831
4330
|
};
|
|
3832
4331
|
}
|
|
3833
4332
|
|
|
3834
|
-
// src/resources/
|
|
3835
|
-
function
|
|
4333
|
+
// src/resources/forms.ts
|
|
4334
|
+
function createFormsResource(client) {
|
|
3836
4335
|
return {
|
|
3837
|
-
async
|
|
3838
|
-
const {
|
|
4336
|
+
async create(options) {
|
|
4337
|
+
const { agencyRef, idempotencyKey, signal, ...body } = options;
|
|
4338
|
+
return client.execute({
|
|
4339
|
+
method: "POST",
|
|
4340
|
+
operationId: OperationId.CreateForm,
|
|
4341
|
+
path: "/api/v1/agencies/{ref}/forms",
|
|
4342
|
+
pathParams: { ref: agencyRef },
|
|
4343
|
+
body,
|
|
4344
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4345
|
+
...signal !== void 0 ? { signal } : {}
|
|
4346
|
+
});
|
|
4347
|
+
},
|
|
4348
|
+
async list(options) {
|
|
4349
|
+
const { agencyRef, signal } = options;
|
|
3839
4350
|
return client.execute({
|
|
3840
4351
|
method: "GET",
|
|
3841
|
-
operationId: OperationId.
|
|
3842
|
-
path: "/api/v1/
|
|
3843
|
-
pathParams: { ref:
|
|
3844
|
-
query: { dayIndex, since },
|
|
4352
|
+
operationId: OperationId.ListForms,
|
|
4353
|
+
path: "/api/v1/agencies/{ref}/forms",
|
|
4354
|
+
pathParams: { ref: agencyRef },
|
|
3845
4355
|
...signal !== void 0 ? { signal } : {}
|
|
3846
4356
|
});
|
|
3847
4357
|
},
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
4358
|
+
async get(options) {
|
|
4359
|
+
const { formId, signal } = options;
|
|
4360
|
+
return client.execute({
|
|
4361
|
+
method: "GET",
|
|
4362
|
+
operationId: OperationId.GetForm,
|
|
4363
|
+
path: "/api/v1/forms/{formId}",
|
|
4364
|
+
pathParams: { formId },
|
|
4365
|
+
...signal !== void 0 ? { signal } : {}
|
|
4366
|
+
});
|
|
4367
|
+
},
|
|
4368
|
+
async patch(options) {
|
|
4369
|
+
const { formId, version, signal, ...body } = options;
|
|
4370
|
+
return client.execute({
|
|
4371
|
+
method: "PATCH",
|
|
4372
|
+
operationId: OperationId.PatchForm,
|
|
4373
|
+
path: "/api/v1/forms/{formId}",
|
|
4374
|
+
pathParams: { formId },
|
|
4375
|
+
body,
|
|
4376
|
+
headers: { "If-Match": String(version) },
|
|
4377
|
+
...signal !== void 0 ? { signal } : {}
|
|
4378
|
+
});
|
|
4379
|
+
},
|
|
4380
|
+
async delete(options) {
|
|
4381
|
+
const { formId, version, signal } = options;
|
|
4382
|
+
return client.execute({
|
|
4383
|
+
method: "DELETE",
|
|
4384
|
+
operationId: OperationId.DeleteForm,
|
|
4385
|
+
path: "/api/v1/forms/{formId}",
|
|
4386
|
+
pathParams: { formId },
|
|
4387
|
+
headers: { "If-Match": String(version) },
|
|
4388
|
+
...signal !== void 0 ? { signal } : {}
|
|
4389
|
+
});
|
|
4390
|
+
},
|
|
4391
|
+
async archive(options) {
|
|
4392
|
+
const { formId, signal } = options;
|
|
4393
|
+
return client.execute({
|
|
4394
|
+
method: "POST",
|
|
4395
|
+
operationId: OperationId.ArchiveForm,
|
|
4396
|
+
path: "/api/v1/forms/{formId}/archive",
|
|
4397
|
+
pathParams: { formId },
|
|
4398
|
+
...signal !== void 0 ? { signal } : {}
|
|
4399
|
+
});
|
|
4400
|
+
},
|
|
4401
|
+
async unarchive(options) {
|
|
4402
|
+
const { formId, signal } = options;
|
|
4403
|
+
return client.execute({
|
|
4404
|
+
method: "POST",
|
|
4405
|
+
operationId: OperationId.UnarchiveForm,
|
|
4406
|
+
path: "/api/v1/forms/{formId}/unarchive",
|
|
4407
|
+
pathParams: { formId },
|
|
4408
|
+
...signal !== void 0 ? { signal } : {}
|
|
4409
|
+
});
|
|
4410
|
+
},
|
|
4411
|
+
async publish(options) {
|
|
4412
|
+
const { formId, signal } = options;
|
|
4413
|
+
return client.execute({
|
|
4414
|
+
method: "POST",
|
|
4415
|
+
operationId: OperationId.PublishForm,
|
|
4416
|
+
path: "/api/v1/forms/{formId}/publish",
|
|
4417
|
+
pathParams: { formId },
|
|
4418
|
+
...signal !== void 0 ? { signal } : {}
|
|
4419
|
+
});
|
|
4420
|
+
},
|
|
4421
|
+
async close(options) {
|
|
4422
|
+
const { formId, signal } = options;
|
|
4423
|
+
return client.execute({
|
|
4424
|
+
method: "POST",
|
|
4425
|
+
operationId: OperationId.CloseForm,
|
|
4426
|
+
path: "/api/v1/forms/{formId}/close",
|
|
4427
|
+
pathParams: { formId },
|
|
4428
|
+
...signal !== void 0 ? { signal } : {}
|
|
4429
|
+
});
|
|
4430
|
+
},
|
|
4431
|
+
async reopen(options) {
|
|
4432
|
+
const { formId, signal } = options;
|
|
4433
|
+
return client.execute({
|
|
4434
|
+
method: "POST",
|
|
4435
|
+
operationId: OperationId.ReopenForm,
|
|
4436
|
+
path: "/api/v1/forms/{formId}/reopen",
|
|
4437
|
+
pathParams: { formId },
|
|
4438
|
+
...signal !== void 0 ? { signal } : {}
|
|
4439
|
+
});
|
|
4440
|
+
},
|
|
4441
|
+
async clone(options) {
|
|
4442
|
+
const { formId, idempotencyKey, signal, ...body } = options;
|
|
4443
|
+
return client.execute({
|
|
4444
|
+
method: "POST",
|
|
4445
|
+
operationId: OperationId.CloneForm,
|
|
4446
|
+
path: "/api/v1/forms/{formId}/clone",
|
|
4447
|
+
pathParams: { formId },
|
|
4448
|
+
body,
|
|
4449
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4450
|
+
...signal !== void 0 ? { signal } : {}
|
|
4451
|
+
});
|
|
4452
|
+
},
|
|
4453
|
+
async reorder(options) {
|
|
4454
|
+
const { formId, signal, ...body } = options;
|
|
4455
|
+
return client.execute({
|
|
4456
|
+
method: "POST",
|
|
4457
|
+
operationId: OperationId.ReorderForm,
|
|
4458
|
+
path: "/api/v1/forms/{formId}/reorder",
|
|
4459
|
+
pathParams: { formId },
|
|
4460
|
+
body,
|
|
4461
|
+
...signal !== void 0 ? { signal } : {}
|
|
4462
|
+
});
|
|
4463
|
+
},
|
|
4464
|
+
sections: {
|
|
4465
|
+
async create(options) {
|
|
4466
|
+
const { formId, signal, ...body } = options;
|
|
4467
|
+
return client.execute({
|
|
4468
|
+
method: "POST",
|
|
4469
|
+
operationId: OperationId.CreateFormSection,
|
|
4470
|
+
path: "/api/v1/forms/{formId}/sections",
|
|
4471
|
+
pathParams: { formId },
|
|
4472
|
+
body,
|
|
4473
|
+
...signal !== void 0 ? { signal } : {}
|
|
4474
|
+
});
|
|
4475
|
+
},
|
|
4476
|
+
async patch(options) {
|
|
4477
|
+
const { formId, sectionId, version, signal, ...body } = options;
|
|
4478
|
+
return client.execute({
|
|
4479
|
+
method: "PATCH",
|
|
4480
|
+
operationId: OperationId.PatchFormSection,
|
|
4481
|
+
path: "/api/v1/forms/{formId}/sections/{sectionId}",
|
|
4482
|
+
pathParams: { formId, sectionId },
|
|
4483
|
+
body,
|
|
4484
|
+
headers: { "If-Match": String(version) },
|
|
4485
|
+
...signal !== void 0 ? { signal } : {}
|
|
4486
|
+
});
|
|
4487
|
+
},
|
|
4488
|
+
async delete(options) {
|
|
4489
|
+
const { formId, sectionId, version, signal } = options;
|
|
4490
|
+
return client.execute({
|
|
4491
|
+
method: "DELETE",
|
|
4492
|
+
operationId: OperationId.DeleteFormSection,
|
|
4493
|
+
path: "/api/v1/forms/{formId}/sections/{sectionId}",
|
|
4494
|
+
pathParams: { formId, sectionId },
|
|
4495
|
+
headers: { "If-Match": String(version) },
|
|
4496
|
+
...signal !== void 0 ? { signal } : {}
|
|
4497
|
+
});
|
|
4498
|
+
}
|
|
4499
|
+
},
|
|
4500
|
+
fields: {
|
|
4501
|
+
async create(options) {
|
|
4502
|
+
const { formId, sectionId, signal, ...body } = options;
|
|
4503
|
+
return client.execute({
|
|
4504
|
+
method: "POST",
|
|
4505
|
+
operationId: OperationId.CreateFormField,
|
|
4506
|
+
path: "/api/v1/forms/{formId}/sections/{sectionId}/fields",
|
|
4507
|
+
pathParams: { formId, sectionId },
|
|
4508
|
+
body,
|
|
4509
|
+
...signal !== void 0 ? { signal } : {}
|
|
4510
|
+
});
|
|
4511
|
+
},
|
|
4512
|
+
async patch(options) {
|
|
4513
|
+
const { formId, fieldId, version, signal, ...body } = options;
|
|
4514
|
+
return client.execute({
|
|
4515
|
+
method: "PATCH",
|
|
4516
|
+
operationId: OperationId.PatchFormField,
|
|
4517
|
+
path: "/api/v1/forms/{formId}/fields/{fieldId}",
|
|
4518
|
+
pathParams: { formId, fieldId },
|
|
4519
|
+
body,
|
|
4520
|
+
headers: { "If-Match": String(version) },
|
|
4521
|
+
...signal !== void 0 ? { signal } : {}
|
|
4522
|
+
});
|
|
4523
|
+
},
|
|
4524
|
+
async delete(options) {
|
|
4525
|
+
const { formId, fieldId, version, signal } = options;
|
|
4526
|
+
return client.execute({
|
|
4527
|
+
method: "DELETE",
|
|
4528
|
+
operationId: OperationId.DeleteFormField,
|
|
4529
|
+
path: "/api/v1/forms/{formId}/fields/{fieldId}",
|
|
4530
|
+
pathParams: { formId, fieldId },
|
|
4531
|
+
headers: { "If-Match": String(version) },
|
|
4532
|
+
...signal !== void 0 ? { signal } : {}
|
|
4533
|
+
});
|
|
4534
|
+
}
|
|
4535
|
+
},
|
|
4536
|
+
async aggregate(options) {
|
|
4537
|
+
const { formId, signal, ...query } = options;
|
|
4538
|
+
return client.execute({
|
|
4539
|
+
method: "GET",
|
|
4540
|
+
operationId: OperationId.GetFormAggregate,
|
|
4541
|
+
path: "/api/v1/forms/{formId}/aggregate",
|
|
4542
|
+
pathParams: { formId },
|
|
4543
|
+
query,
|
|
4544
|
+
...signal !== void 0 ? { signal } : {}
|
|
4545
|
+
});
|
|
4546
|
+
},
|
|
4547
|
+
responses: {
|
|
4548
|
+
async get(options) {
|
|
4549
|
+
const { formId, responseId, signal } = options;
|
|
4550
|
+
return client.execute({
|
|
4551
|
+
method: "GET",
|
|
4552
|
+
operationId: OperationId.GetFormResponse,
|
|
4553
|
+
path: "/api/v1/forms/{formId}/responses/{responseId}",
|
|
4554
|
+
pathParams: { formId, responseId },
|
|
4555
|
+
...signal !== void 0 ? { signal } : {}
|
|
4556
|
+
});
|
|
4557
|
+
},
|
|
4558
|
+
async export(options) {
|
|
4559
|
+
const { formId, signal, ...body } = options;
|
|
4560
|
+
return client.executeBinary({
|
|
4561
|
+
method: "POST",
|
|
4562
|
+
operationId: OperationId.ExportFormResponses,
|
|
4563
|
+
path: "/api/v1/forms/{formId}/responses/export",
|
|
4564
|
+
pathParams: { formId },
|
|
4565
|
+
body,
|
|
4566
|
+
// Follows the requested format rather than being hardcoded: the
|
|
4567
|
+
// engine branches on `body.format` and sets the matching
|
|
4568
|
+
// `Content-Type` (`forms.controller.ts#exportResponses`).
|
|
4569
|
+
accept: body.format === "csv" ? "text/csv" : "application/pdf",
|
|
4570
|
+
...signal !== void 0 ? { signal } : {}
|
|
4571
|
+
});
|
|
4572
|
+
},
|
|
4573
|
+
async consentReceipt(options) {
|
|
4574
|
+
const { responseId, signal } = options;
|
|
4575
|
+
return client.executeBinary({
|
|
4576
|
+
method: "GET",
|
|
4577
|
+
operationId: OperationId.GetFormConsentReceipt,
|
|
4578
|
+
path: "/api/v1/forms/responses/{responseId}/consent-receipt",
|
|
4579
|
+
pathParams: { responseId },
|
|
4580
|
+
accept: "application/pdf",
|
|
4581
|
+
...signal !== void 0 ? { signal } : {}
|
|
4582
|
+
});
|
|
4583
|
+
}
|
|
4584
|
+
},
|
|
4585
|
+
bindings: {
|
|
4586
|
+
async list(options = {}) {
|
|
4587
|
+
const { signal } = options;
|
|
4588
|
+
return client.execute({
|
|
4589
|
+
method: "GET",
|
|
4590
|
+
operationId: OperationId.ListFormBindings,
|
|
4591
|
+
path: "/api/v1/forms/bindings",
|
|
4592
|
+
...signal !== void 0 ? { signal } : {}
|
|
4593
|
+
});
|
|
4594
|
+
}
|
|
4595
|
+
},
|
|
4596
|
+
trip: {
|
|
4597
|
+
async list(options) {
|
|
4598
|
+
const { tripRef, phase, since, signal } = options;
|
|
4599
|
+
return client.execute({
|
|
4600
|
+
method: "GET",
|
|
4601
|
+
operationId: OperationId.ListTripForms,
|
|
4602
|
+
path: "/api/v1/trips/{ref}/forms",
|
|
4603
|
+
pathParams: { ref: tripRef },
|
|
4604
|
+
query: { phase, since },
|
|
4605
|
+
...signal !== void 0 ? { signal } : {}
|
|
4606
|
+
});
|
|
4607
|
+
},
|
|
4608
|
+
async answers(options) {
|
|
4609
|
+
const { tripRef, keys, signal } = options;
|
|
4610
|
+
return client.execute({
|
|
4611
|
+
method: "GET",
|
|
4612
|
+
operationId: OperationId.GetFormsCrossModuleAnswers,
|
|
4613
|
+
path: "/api/v1/trips/{ref}/forms/answers",
|
|
4614
|
+
pathParams: { ref: tripRef },
|
|
4615
|
+
query: { keys },
|
|
4616
|
+
...signal !== void 0 ? { signal } : {}
|
|
4617
|
+
});
|
|
4618
|
+
},
|
|
4619
|
+
async completion(options) {
|
|
4620
|
+
const { tripRef, signal } = options;
|
|
4621
|
+
return client.execute({
|
|
4622
|
+
method: "GET",
|
|
4623
|
+
operationId: OperationId.GetFormsCompletionMatrix,
|
|
4624
|
+
path: "/api/v1/trips/{ref}/forms/completion",
|
|
4625
|
+
pathParams: { ref: tripRef },
|
|
4626
|
+
...signal !== void 0 ? { signal } : {}
|
|
4627
|
+
});
|
|
4628
|
+
},
|
|
4629
|
+
async dispatch(options) {
|
|
4630
|
+
const { tripRef, formId, idempotencyKey, signal, ...body } = options;
|
|
4631
|
+
return client.execute({
|
|
4632
|
+
method: "POST",
|
|
4633
|
+
operationId: OperationId.DispatchForm,
|
|
4634
|
+
path: "/api/v1/trips/{ref}/forms/{formId}/dispatch",
|
|
4635
|
+
pathParams: { ref: tripRef, formId },
|
|
4636
|
+
body,
|
|
4637
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4638
|
+
...signal !== void 0 ? { signal } : {}
|
|
4639
|
+
});
|
|
4640
|
+
},
|
|
4641
|
+
responses: {
|
|
4642
|
+
async create(options) {
|
|
4643
|
+
const { tripRef, formId, idempotencyKey, signal, ...body } = options;
|
|
4644
|
+
return client.execute({
|
|
4645
|
+
method: "POST",
|
|
4646
|
+
operationId: OperationId.ManagerCreateFormResponse,
|
|
4647
|
+
path: "/api/v1/trips/{ref}/forms/{formId}/responses",
|
|
4648
|
+
pathParams: { ref: tripRef, formId },
|
|
4649
|
+
body,
|
|
4650
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4651
|
+
...signal !== void 0 ? { signal } : {}
|
|
4652
|
+
});
|
|
4653
|
+
},
|
|
4654
|
+
async list(options) {
|
|
4655
|
+
const { tripRef, formId, since, signal, ...filters } = options;
|
|
4656
|
+
return client.execute({
|
|
4657
|
+
method: "GET",
|
|
4658
|
+
operationId: OperationId.ListTripFormResponses,
|
|
4659
|
+
path: "/api/v1/trips/{ref}/forms/{formId}/responses",
|
|
4660
|
+
pathParams: { ref: tripRef, formId },
|
|
4661
|
+
query: { ...filters, since },
|
|
4662
|
+
...signal !== void 0 ? { signal } : {}
|
|
4663
|
+
});
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
}
|
|
4667
|
+
};
|
|
4668
|
+
}
|
|
4669
|
+
|
|
4670
|
+
// src/resources/itinerary.ts
|
|
4671
|
+
function createItineraryResource(client) {
|
|
4672
|
+
return {
|
|
4673
|
+
async read(options) {
|
|
4674
|
+
const { tripRef, dayIndex, since, signal } = options;
|
|
4675
|
+
return client.execute({
|
|
4676
|
+
method: "GET",
|
|
4677
|
+
operationId: OperationId.ReadItinerary,
|
|
4678
|
+
path: "/api/v1/trips/{ref}/itinerary",
|
|
4679
|
+
pathParams: { ref: tripRef },
|
|
4680
|
+
query: { dayIndex, since },
|
|
4681
|
+
...signal !== void 0 ? { signal } : {}
|
|
4682
|
+
});
|
|
4683
|
+
},
|
|
4684
|
+
items: {
|
|
4685
|
+
async add(options) {
|
|
4686
|
+
const { tripRef, idempotencyKey, signal, isoDate, startTime, endTime, ...rest } = options;
|
|
4687
|
+
const body = {
|
|
4688
|
+
...rest,
|
|
4689
|
+
isoDate: normalizeDateTimeInput(isoDate, "isoDate"),
|
|
4690
|
+
...startTime !== void 0 ? { startTime: normalizeNullableDateTimeInput(startTime, "startTime") } : {},
|
|
4691
|
+
...endTime !== void 0 ? { endTime: normalizeNullableDateTimeInput(endTime, "endTime") } : {}
|
|
4692
|
+
};
|
|
4693
|
+
return client.execute({
|
|
4694
|
+
method: "POST",
|
|
4695
|
+
operationId: OperationId.AddItineraryItem,
|
|
4696
|
+
path: "/api/v1/trips/{ref}/itinerary/items",
|
|
4697
|
+
pathParams: { ref: tripRef },
|
|
4698
|
+
body,
|
|
4699
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4700
|
+
...signal !== void 0 ? { signal } : {}
|
|
4701
|
+
});
|
|
4702
|
+
},
|
|
4703
|
+
async patch(options) {
|
|
4704
|
+
const { tripRef, itemId, version, signal, startTime, endTime, ...rest } = options;
|
|
4705
|
+
const body = {
|
|
4706
|
+
...rest,
|
|
4707
|
+
...startTime !== void 0 ? { startTime: normalizeNullableDateTimeInput(startTime, "startTime") } : {},
|
|
4708
|
+
...endTime !== void 0 ? { endTime: normalizeNullableDateTimeInput(endTime, "endTime") } : {}
|
|
4709
|
+
};
|
|
4710
|
+
return client.execute({
|
|
4711
|
+
method: "PATCH",
|
|
4712
|
+
operationId: OperationId.PatchItineraryItem,
|
|
4713
|
+
path: "/api/v1/trips/{ref}/itinerary/items/{itemId}",
|
|
4714
|
+
pathParams: { ref: tripRef, itemId },
|
|
4715
|
+
body,
|
|
4716
|
+
headers: { "If-Match": String(version) },
|
|
4717
|
+
...signal !== void 0 ? { signal } : {}
|
|
4718
|
+
});
|
|
4719
|
+
},
|
|
4720
|
+
async remove(options) {
|
|
4721
|
+
const { tripRef, itemId, version, signal } = options;
|
|
4722
|
+
return client.execute({
|
|
4723
|
+
method: "DELETE",
|
|
4724
|
+
operationId: OperationId.DeleteItineraryItem,
|
|
4725
|
+
path: "/api/v1/trips/{ref}/itinerary/items/{itemId}",
|
|
4726
|
+
pathParams: { ref: tripRef, itemId },
|
|
4727
|
+
headers: { "If-Match": String(version) },
|
|
4728
|
+
...signal !== void 0 ? { signal } : {}
|
|
3893
4729
|
});
|
|
3894
4730
|
},
|
|
3895
4731
|
async reorder(options) {
|
|
@@ -3951,12 +4787,13 @@ function createJourneyResource(client) {
|
|
|
3951
4787
|
});
|
|
3952
4788
|
},
|
|
3953
4789
|
async capabilities(options) {
|
|
3954
|
-
const { tripRef, signal } = options;
|
|
4790
|
+
const { tripRef, live, signal } = options;
|
|
3955
4791
|
return client.execute({
|
|
3956
4792
|
method: "GET",
|
|
3957
4793
|
operationId: OperationId.ReadJourneyCapabilities,
|
|
3958
4794
|
path: "/api/v1/trips/{ref}/journey/capabilities",
|
|
3959
4795
|
pathParams: { ref: tripRef },
|
|
4796
|
+
...live === true ? { query: { live: "true" } } : {},
|
|
3960
4797
|
...signal !== void 0 ? { signal } : {}
|
|
3961
4798
|
});
|
|
3962
4799
|
},
|
|
@@ -4053,6 +4890,18 @@ function createNotificationsResource(client) {
|
|
|
4053
4890
|
...since !== void 0 ? { query: { since } } : {},
|
|
4054
4891
|
...signal !== void 0 ? { signal } : {}
|
|
4055
4892
|
});
|
|
4893
|
+
},
|
|
4894
|
+
async markRead(options) {
|
|
4895
|
+
const { id, idempotencyKey, signal } = options;
|
|
4896
|
+
return client.execute({
|
|
4897
|
+
method: "POST",
|
|
4898
|
+
operationId: OperationId.MarkNotificationRead,
|
|
4899
|
+
path: "/api/v1/notifications/{id}/read",
|
|
4900
|
+
pathParams: { id },
|
|
4901
|
+
body: {},
|
|
4902
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4903
|
+
...signal !== void 0 ? { signal } : {}
|
|
4904
|
+
});
|
|
4056
4905
|
}
|
|
4057
4906
|
};
|
|
4058
4907
|
}
|
|
@@ -4151,6 +5000,17 @@ function createPickupsResource(client) {
|
|
|
4151
5000
|
...signal !== void 0 ? { signal } : {}
|
|
4152
5001
|
});
|
|
4153
5002
|
},
|
|
5003
|
+
async correctBoardStatus(options) {
|
|
5004
|
+
const { tripRef, pointId, travellerId, signal, ...body } = options;
|
|
5005
|
+
return client.execute({
|
|
5006
|
+
method: "PATCH",
|
|
5007
|
+
operationId: OperationId.CorrectPickupBoardStatus,
|
|
5008
|
+
path: "/api/v1/trips/{ref}/pickups/{pointId}/board/{travellerId}",
|
|
5009
|
+
pathParams: { ref: tripRef, pointId, travellerId },
|
|
5010
|
+
body,
|
|
5011
|
+
...signal !== void 0 ? { signal } : {}
|
|
5012
|
+
});
|
|
5013
|
+
},
|
|
4154
5014
|
async close(options) {
|
|
4155
5015
|
const { tripRef, pointId, idempotencyKey, signal, ...body } = options;
|
|
4156
5016
|
return client.execute({
|
|
@@ -4369,8 +5229,530 @@ function createSeatingResource(client) {
|
|
|
4369
5229
|
const { tripRef, idempotencyKey, signal, ...body } = options;
|
|
4370
5230
|
return client.execute({
|
|
4371
5231
|
method: "POST",
|
|
4372
|
-
operationId: OperationId.CreateSeatingVehicle,
|
|
4373
|
-
path: "/api/v1/trips/{ref}/seating/vehicles",
|
|
5232
|
+
operationId: OperationId.CreateSeatingVehicle,
|
|
5233
|
+
path: "/api/v1/trips/{ref}/seating/vehicles",
|
|
5234
|
+
pathParams: { ref: tripRef },
|
|
5235
|
+
body,
|
|
5236
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5237
|
+
...signal !== void 0 ? { signal } : {}
|
|
5238
|
+
});
|
|
5239
|
+
},
|
|
5240
|
+
async patch(options) {
|
|
5241
|
+
const { tripRef, vehicleId, version, signal, ...body } = options;
|
|
5242
|
+
return client.execute({
|
|
5243
|
+
method: "PATCH",
|
|
5244
|
+
operationId: OperationId.PatchSeatingVehicle,
|
|
5245
|
+
path: "/api/v1/trips/{ref}/seating/vehicles/{vehicleId}",
|
|
5246
|
+
pathParams: { ref: tripRef, vehicleId },
|
|
5247
|
+
body,
|
|
5248
|
+
headers: { "If-Match": String(version) },
|
|
5249
|
+
...signal !== void 0 ? { signal } : {}
|
|
5250
|
+
});
|
|
5251
|
+
},
|
|
5252
|
+
async remove(options) {
|
|
5253
|
+
const { tripRef, vehicleId, version, signal } = options;
|
|
5254
|
+
return client.execute({
|
|
5255
|
+
method: "DELETE",
|
|
5256
|
+
operationId: OperationId.DeleteSeatingVehicle,
|
|
5257
|
+
path: "/api/v1/trips/{ref}/seating/vehicles/{vehicleId}",
|
|
5258
|
+
pathParams: { ref: tripRef, vehicleId },
|
|
5259
|
+
headers: { "If-Match": String(version) },
|
|
5260
|
+
...signal !== void 0 ? { signal } : {}
|
|
5261
|
+
});
|
|
5262
|
+
},
|
|
5263
|
+
manager: {
|
|
5264
|
+
async link(options) {
|
|
5265
|
+
const { tripRef, vehicleId, idempotencyKey, signal, ...body } = options;
|
|
5266
|
+
return client.execute({
|
|
5267
|
+
method: "POST",
|
|
5268
|
+
operationId: OperationId.LinkSeatingManager,
|
|
5269
|
+
path: "/api/v1/trips/{ref}/seating/vehicles/{vehicleId}/manager",
|
|
5270
|
+
pathParams: { ref: tripRef, vehicleId },
|
|
5271
|
+
body,
|
|
5272
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5273
|
+
...signal !== void 0 ? { signal } : {}
|
|
5274
|
+
});
|
|
5275
|
+
},
|
|
5276
|
+
async unlink(options) {
|
|
5277
|
+
const { tripRef, vehicleId, version, signal } = options;
|
|
5278
|
+
return client.execute({
|
|
5279
|
+
method: "DELETE",
|
|
5280
|
+
operationId: OperationId.UnlinkSeatingManager,
|
|
5281
|
+
path: "/api/v1/trips/{ref}/seating/vehicles/{vehicleId}/manager",
|
|
5282
|
+
pathParams: { ref: tripRef, vehicleId },
|
|
5283
|
+
headers: { "If-Match": String(version) },
|
|
5284
|
+
...signal !== void 0 ? { signal } : {}
|
|
5285
|
+
});
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5288
|
+
}
|
|
5289
|
+
};
|
|
5290
|
+
}
|
|
5291
|
+
|
|
5292
|
+
// src/resources/share.ts
|
|
5293
|
+
function createShareResource(client) {
|
|
5294
|
+
return {
|
|
5295
|
+
async snapshot(options) {
|
|
5296
|
+
const { token, signal } = options;
|
|
5297
|
+
return client.execute({
|
|
5298
|
+
method: "GET",
|
|
5299
|
+
operationId: OperationId.GetShareSnapshot,
|
|
5300
|
+
path: "/api/v1/share/{token}",
|
|
5301
|
+
pathParams: { token },
|
|
5302
|
+
...signal !== void 0 ? { signal } : {}
|
|
5303
|
+
});
|
|
5304
|
+
},
|
|
5305
|
+
async manifest(options) {
|
|
5306
|
+
const { token, signal } = options;
|
|
5307
|
+
return client.execute({
|
|
5308
|
+
method: "GET",
|
|
5309
|
+
operationId: OperationId.GetShareManifest,
|
|
5310
|
+
path: "/api/v1/share/{token}/manifest",
|
|
5311
|
+
pathParams: { token },
|
|
5312
|
+
...signal !== void 0 ? { signal } : {}
|
|
5313
|
+
});
|
|
5314
|
+
},
|
|
5315
|
+
forms: {
|
|
5316
|
+
async list(options) {
|
|
5317
|
+
const { token, signal } = options;
|
|
5318
|
+
return client.execute({
|
|
5319
|
+
method: "GET",
|
|
5320
|
+
operationId: OperationId.ShareListForms,
|
|
5321
|
+
path: "/api/v1/share/{token}/forms",
|
|
5322
|
+
pathParams: { token },
|
|
5323
|
+
...signal !== void 0 ? { signal } : {}
|
|
5324
|
+
});
|
|
5325
|
+
},
|
|
5326
|
+
async render(options) {
|
|
5327
|
+
const { token, formId, travellerRef, signal } = options;
|
|
5328
|
+
return client.execute({
|
|
5329
|
+
method: "GET",
|
|
5330
|
+
operationId: OperationId.ShareRenderForm,
|
|
5331
|
+
path: "/api/v1/share/{token}/forms/{formId}",
|
|
5332
|
+
pathParams: { token, formId },
|
|
5333
|
+
query: { travellerRef },
|
|
5334
|
+
...signal !== void 0 ? { signal } : {}
|
|
5335
|
+
});
|
|
5336
|
+
},
|
|
5337
|
+
async save(options) {
|
|
5338
|
+
const { token, formId, travellerRef, idempotencyKey, signal, ...body } = options;
|
|
5339
|
+
return client.execute({
|
|
5340
|
+
method: "POST",
|
|
5341
|
+
operationId: OperationId.ShareSaveForm,
|
|
5342
|
+
path: "/api/v1/share/{token}/forms/{formId}/save",
|
|
5343
|
+
pathParams: { token, formId },
|
|
5344
|
+
query: { travellerRef },
|
|
5345
|
+
body,
|
|
5346
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5347
|
+
...signal !== void 0 ? { signal } : {}
|
|
5348
|
+
});
|
|
5349
|
+
},
|
|
5350
|
+
async submit(options) {
|
|
5351
|
+
const { token, formId, travellerRef, idempotencyKey, signal, ...body } = options;
|
|
5352
|
+
return client.execute({
|
|
5353
|
+
method: "POST",
|
|
5354
|
+
operationId: OperationId.ShareSubmitForm,
|
|
5355
|
+
path: "/api/v1/share/{token}/forms/{formId}/submit",
|
|
5356
|
+
pathParams: { token, formId },
|
|
5357
|
+
query: { travellerRef },
|
|
5358
|
+
body,
|
|
5359
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5360
|
+
...signal !== void 0 ? { signal } : {}
|
|
5361
|
+
});
|
|
5362
|
+
}
|
|
5363
|
+
}
|
|
5364
|
+
};
|
|
5365
|
+
}
|
|
5366
|
+
|
|
5367
|
+
// src/resources/travellers.ts
|
|
5368
|
+
async function fetchAgencyDirectoryPage(client, agencyRef, request) {
|
|
5369
|
+
const response = await client.execute({
|
|
5370
|
+
method: "GET",
|
|
5371
|
+
operationId: OperationId.SearchTravellerDirectory,
|
|
5372
|
+
path: "/api/v1/agencies/{ref}/travellers",
|
|
5373
|
+
pathParams: { ref: agencyRef },
|
|
5374
|
+
query: { ...request.filters, cursor: request.cursor, limit: request.limit }
|
|
5375
|
+
});
|
|
5376
|
+
return toPaginatorPage(response);
|
|
5377
|
+
}
|
|
5378
|
+
function createTravellersResource(client) {
|
|
5379
|
+
return {
|
|
5380
|
+
async erase(options) {
|
|
5381
|
+
const { ref, idempotencyKey, signal } = options;
|
|
5382
|
+
return client.execute({
|
|
5383
|
+
method: "POST",
|
|
5384
|
+
operationId: OperationId.EraseTraveller,
|
|
5385
|
+
path: "/api/v1/travellers/{ref}/erase",
|
|
5386
|
+
pathParams: { ref },
|
|
5387
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5388
|
+
...signal !== void 0 ? { signal } : {}
|
|
5389
|
+
});
|
|
5390
|
+
},
|
|
5391
|
+
async export_(options) {
|
|
5392
|
+
const { ref, signal } = options;
|
|
5393
|
+
return client.execute({
|
|
5394
|
+
method: "GET",
|
|
5395
|
+
operationId: OperationId.ExportTraveller,
|
|
5396
|
+
path: "/api/v1/travellers/{ref}/export",
|
|
5397
|
+
pathParams: { ref },
|
|
5398
|
+
...signal !== void 0 ? { signal } : {}
|
|
5399
|
+
});
|
|
5400
|
+
},
|
|
5401
|
+
async listForTrip(options) {
|
|
5402
|
+
const { tripRef, signal } = options;
|
|
5403
|
+
return client.execute({
|
|
5404
|
+
method: "GET",
|
|
5405
|
+
operationId: OperationId.GetTripManifest,
|
|
5406
|
+
path: "/api/v1/trips/{ref}/travellers",
|
|
5407
|
+
pathParams: { ref: tripRef },
|
|
5408
|
+
...signal !== void 0 ? { signal } : {}
|
|
5409
|
+
});
|
|
5410
|
+
},
|
|
5411
|
+
listForAgency(options) {
|
|
5412
|
+
const { agencyRef, filters, limit } = options;
|
|
5413
|
+
return createPaginator({
|
|
5414
|
+
fetchPage: (request) => fetchAgencyDirectoryPage(client, agencyRef, request),
|
|
5415
|
+
filters,
|
|
5416
|
+
...limit !== void 0 ? { limit } : {}
|
|
5417
|
+
});
|
|
5418
|
+
},
|
|
5419
|
+
async listForAgencyPage(options) {
|
|
5420
|
+
const { agencyRef, cursor, limit, signal, ...filters } = options;
|
|
5421
|
+
const response = await client.execute({
|
|
5422
|
+
method: "GET",
|
|
5423
|
+
operationId: OperationId.SearchTravellerDirectory,
|
|
5424
|
+
path: "/api/v1/agencies/{ref}/travellers",
|
|
5425
|
+
pathParams: { ref: agencyRef },
|
|
5426
|
+
query: { ...filters, cursor, limit },
|
|
5427
|
+
...signal !== void 0 ? { signal } : {}
|
|
5428
|
+
});
|
|
5429
|
+
return narrowPaged(response);
|
|
5430
|
+
},
|
|
5431
|
+
async create(options) {
|
|
5432
|
+
const { agencyRef, idempotencyKey, signal, ...body } = options;
|
|
5433
|
+
return client.execute({
|
|
5434
|
+
method: "POST",
|
|
5435
|
+
operationId: OperationId.CreateTraveller,
|
|
5436
|
+
path: "/api/v1/agencies/{ref}/travellers",
|
|
5437
|
+
pathParams: { ref: agencyRef },
|
|
5438
|
+
body,
|
|
5439
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5440
|
+
...signal !== void 0 ? { signal } : {}
|
|
5441
|
+
});
|
|
5442
|
+
}
|
|
5443
|
+
};
|
|
5444
|
+
}
|
|
5445
|
+
|
|
5446
|
+
// src/resources/treks.ts
|
|
5447
|
+
var ACTIVE_TREK_REF = "active";
|
|
5448
|
+
async function fetchTrekWalkInsPage(client, trekRef, request) {
|
|
5449
|
+
const response = await client.execute({
|
|
5450
|
+
method: "GET",
|
|
5451
|
+
operationId: OperationId.ListTrekWalkIns,
|
|
5452
|
+
path: "/api/v1/treks/{trekRef}/walk-ins",
|
|
5453
|
+
pathParams: { trekRef },
|
|
5454
|
+
query: { cursor: request.cursor, limit: request.limit }
|
|
5455
|
+
});
|
|
5456
|
+
return toPaginatorPage(response);
|
|
5457
|
+
}
|
|
5458
|
+
function createTreksResource(client) {
|
|
5459
|
+
return {
|
|
5460
|
+
async board(options) {
|
|
5461
|
+
const { trekRef, signal } = options;
|
|
5462
|
+
return client.execute({
|
|
5463
|
+
method: "GET",
|
|
5464
|
+
operationId: OperationId.ReadTrekBoard,
|
|
5465
|
+
path: "/api/v1/treks/{trekRef}/board",
|
|
5466
|
+
pathParams: { trekRef },
|
|
5467
|
+
...signal !== void 0 ? { signal } : {}
|
|
5468
|
+
});
|
|
5469
|
+
},
|
|
5470
|
+
async postpone(options) {
|
|
5471
|
+
const { trekRef, idempotencyKey, signal, newStartDate, newEndDate, ...rest } = options;
|
|
5472
|
+
const body = {
|
|
5473
|
+
...rest,
|
|
5474
|
+
newStartDate: normalizeDateTimeInput(newStartDate, "newStartDate"),
|
|
5475
|
+
newEndDate: normalizeDateTimeInput(newEndDate, "newEndDate")
|
|
5476
|
+
};
|
|
5477
|
+
return client.execute({
|
|
5478
|
+
method: "POST",
|
|
5479
|
+
operationId: OperationId.PostponeTrek,
|
|
5480
|
+
path: "/api/v1/treks/{trekRef}/postpone",
|
|
5481
|
+
pathParams: { trekRef },
|
|
5482
|
+
body,
|
|
5483
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5484
|
+
...signal !== void 0 ? { signal } : {}
|
|
5485
|
+
});
|
|
5486
|
+
},
|
|
5487
|
+
walkIns: {
|
|
5488
|
+
async meta(options) {
|
|
5489
|
+
const { trekRef, signal } = options;
|
|
5490
|
+
return client.execute({
|
|
5491
|
+
method: "GET",
|
|
5492
|
+
operationId: OperationId.ReadTrekWalkInMeta,
|
|
5493
|
+
path: "/api/v1/treks/{trekRef}/walk-ins/meta",
|
|
5494
|
+
pathParams: { trekRef },
|
|
5495
|
+
...signal !== void 0 ? { signal } : {}
|
|
5496
|
+
});
|
|
5497
|
+
},
|
|
5498
|
+
async create(options) {
|
|
5499
|
+
const { trekRef, idempotencyKey, signal, ...body } = options;
|
|
5500
|
+
return client.execute({
|
|
5501
|
+
method: "POST",
|
|
5502
|
+
operationId: OperationId.CreateTrekWalkIn,
|
|
5503
|
+
path: "/api/v1/treks/{trekRef}/walk-ins",
|
|
5504
|
+
pathParams: { trekRef },
|
|
5505
|
+
body,
|
|
5506
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5507
|
+
...signal !== void 0 ? { signal } : {}
|
|
5508
|
+
});
|
|
5509
|
+
},
|
|
5510
|
+
list(options) {
|
|
5511
|
+
const { trekRef, limit } = options;
|
|
5512
|
+
return createPaginator({
|
|
5513
|
+
fetchPage: (request) => fetchTrekWalkInsPage(client, trekRef, request),
|
|
5514
|
+
filters: {},
|
|
5515
|
+
...limit !== void 0 ? { limit } : {}
|
|
5516
|
+
});
|
|
5517
|
+
},
|
|
5518
|
+
async listPage(options) {
|
|
5519
|
+
const { trekRef, cursor, limit, signal } = options;
|
|
5520
|
+
const response = await client.execute({
|
|
5521
|
+
method: "GET",
|
|
5522
|
+
operationId: OperationId.ListTrekWalkIns,
|
|
5523
|
+
path: "/api/v1/treks/{trekRef}/walk-ins",
|
|
5524
|
+
pathParams: { trekRef },
|
|
5525
|
+
query: { cursor, limit },
|
|
5526
|
+
...signal !== void 0 ? { signal } : {}
|
|
5527
|
+
});
|
|
5528
|
+
return narrowPaged(response);
|
|
5529
|
+
}
|
|
5530
|
+
}
|
|
5531
|
+
};
|
|
5532
|
+
}
|
|
5533
|
+
|
|
5534
|
+
// src/resources/trips.ts
|
|
5535
|
+
function normalizeBulkTripsItem(item, tripIndex) {
|
|
5536
|
+
const { startDate, endDate, sourceUpdatedAt, travellers, balance, managers, ...rest } = item;
|
|
5537
|
+
return {
|
|
5538
|
+
...rest,
|
|
5539
|
+
startDate: normalizeDateTimeInput(startDate, `trips[${tripIndex}].startDate`),
|
|
5540
|
+
endDate: normalizeDateTimeInput(endDate, `trips[${tripIndex}].endDate`),
|
|
5541
|
+
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, `trips[${tripIndex}].sourceUpdatedAt`),
|
|
5542
|
+
...travellers !== void 0 ? {
|
|
5543
|
+
travellers: travellers.map((traveller, index) => ({
|
|
5544
|
+
...traveller,
|
|
5545
|
+
sourceUpdatedAt: normalizeDateTimeInput(
|
|
5546
|
+
traveller.sourceUpdatedAt,
|
|
5547
|
+
`trips[${tripIndex}].travellers[${index}].sourceUpdatedAt`
|
|
5548
|
+
)
|
|
5549
|
+
}))
|
|
5550
|
+
} : {},
|
|
5551
|
+
...balance !== void 0 ? {
|
|
5552
|
+
balance: balance.map((row, index) => ({
|
|
5553
|
+
...row,
|
|
5554
|
+
sourceUpdatedAt: normalizeDateTimeInput(
|
|
5555
|
+
row.sourceUpdatedAt,
|
|
5556
|
+
`trips[${tripIndex}].balance[${index}].sourceUpdatedAt`
|
|
5557
|
+
)
|
|
5558
|
+
}))
|
|
5559
|
+
} : {},
|
|
5560
|
+
...managers !== void 0 ? {
|
|
5561
|
+
managers: managers.map((manager, index) => ({
|
|
5562
|
+
...manager,
|
|
5563
|
+
sourceUpdatedAt: normalizeDateTimeInput(
|
|
5564
|
+
manager.sourceUpdatedAt,
|
|
5565
|
+
`trips[${tripIndex}].managers[${index}].sourceUpdatedAt`
|
|
5566
|
+
)
|
|
5567
|
+
}))
|
|
5568
|
+
} : {}
|
|
5569
|
+
};
|
|
5570
|
+
}
|
|
5571
|
+
function createTripsResource(client) {
|
|
5572
|
+
return {
|
|
5573
|
+
async upsert(options) {
|
|
5574
|
+
const { idempotencyKey, signal, startDate, endDate, sourceUpdatedAt, segments, ...rest } = options;
|
|
5575
|
+
const body = {
|
|
5576
|
+
...rest,
|
|
5577
|
+
startDate: normalizeDateTimeInput(startDate, "startDate"),
|
|
5578
|
+
endDate: normalizeDateTimeInput(endDate, "endDate"),
|
|
5579
|
+
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt"),
|
|
5580
|
+
...segments !== void 0 ? {
|
|
5581
|
+
segments: segments.map((segment, index) => ({
|
|
5582
|
+
...segment,
|
|
5583
|
+
startDate: normalizeDateTimeInput(
|
|
5584
|
+
segment.startDate,
|
|
5585
|
+
`segments[${index}].startDate`
|
|
5586
|
+
),
|
|
5587
|
+
endDate: normalizeDateTimeInput(segment.endDate, `segments[${index}].endDate`)
|
|
5588
|
+
}))
|
|
5589
|
+
} : {}
|
|
5590
|
+
};
|
|
5591
|
+
return client.execute({
|
|
5592
|
+
method: "POST",
|
|
5593
|
+
operationId: OperationId.UpsertTrip,
|
|
5594
|
+
path: "/api/v1/trips",
|
|
5595
|
+
body,
|
|
5596
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5597
|
+
...signal !== void 0 ? { signal } : {}
|
|
5598
|
+
});
|
|
5599
|
+
},
|
|
5600
|
+
async get(options) {
|
|
5601
|
+
const { tripRef, signal } = options;
|
|
5602
|
+
return client.execute({
|
|
5603
|
+
method: "GET",
|
|
5604
|
+
operationId: OperationId.GetTrip,
|
|
5605
|
+
path: "/api/v1/trips/{ref}",
|
|
5606
|
+
pathParams: { ref: tripRef },
|
|
5607
|
+
...signal !== void 0 ? { signal } : {}
|
|
5608
|
+
});
|
|
5609
|
+
},
|
|
5610
|
+
async cancel(options) {
|
|
5611
|
+
const { tripRef, idempotencyKey, signal } = options;
|
|
5612
|
+
return client.execute({
|
|
5613
|
+
method: "DELETE",
|
|
5614
|
+
operationId: OperationId.CancelTrip,
|
|
5615
|
+
path: "/api/v1/trips/{ref}",
|
|
5616
|
+
pathParams: { ref: tripRef },
|
|
5617
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5618
|
+
...signal !== void 0 ? { signal } : {}
|
|
5619
|
+
});
|
|
5620
|
+
},
|
|
5621
|
+
travellers: {
|
|
5622
|
+
async upsert(options) {
|
|
5623
|
+
const { travellerRef, idempotencyKey, signal, sourceUpdatedAt, ...rest } = options;
|
|
5624
|
+
const body = {
|
|
5625
|
+
...rest,
|
|
5626
|
+
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt")
|
|
5627
|
+
};
|
|
5628
|
+
return client.execute({
|
|
5629
|
+
method: "POST",
|
|
5630
|
+
operationId: OperationId.UpsertTravellerProfile,
|
|
5631
|
+
path: "/api/v1/travellers/{ref}",
|
|
5632
|
+
pathParams: { ref: travellerRef },
|
|
5633
|
+
body,
|
|
5634
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5635
|
+
...signal !== void 0 ? { signal } : {}
|
|
5636
|
+
});
|
|
5637
|
+
},
|
|
5638
|
+
async pushManifest(options) {
|
|
5639
|
+
const { tripRef, idempotencyKey, signal, travellers, ...rest } = options;
|
|
5640
|
+
const body = {
|
|
5641
|
+
...rest,
|
|
5642
|
+
travellers: travellers.map((traveller, index) => ({
|
|
5643
|
+
...traveller,
|
|
5644
|
+
sourceUpdatedAt: normalizeDateTimeInput(
|
|
5645
|
+
traveller.sourceUpdatedAt,
|
|
5646
|
+
`travellers[${index}].sourceUpdatedAt`
|
|
5647
|
+
)
|
|
5648
|
+
}))
|
|
5649
|
+
};
|
|
5650
|
+
return client.execute({
|
|
5651
|
+
method: "POST",
|
|
5652
|
+
operationId: OperationId.PushManifest,
|
|
5653
|
+
path: "/api/v1/trips/{ref}/travellers",
|
|
5654
|
+
pathParams: { ref: tripRef },
|
|
5655
|
+
body,
|
|
5656
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5657
|
+
...signal !== void 0 ? { signal } : {}
|
|
5658
|
+
});
|
|
5659
|
+
},
|
|
5660
|
+
async remove(options) {
|
|
5661
|
+
const { tripRef, travellerRef, idempotencyKey, signal } = options;
|
|
5662
|
+
return client.execute({
|
|
5663
|
+
method: "DELETE",
|
|
5664
|
+
operationId: OperationId.RemoveFromManifest,
|
|
5665
|
+
path: "/api/v1/trips/{ref}/travellers/{travellerRef}",
|
|
5666
|
+
pathParams: { ref: tripRef, travellerRef },
|
|
5667
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5668
|
+
...signal !== void 0 ? { signal } : {}
|
|
5669
|
+
});
|
|
5670
|
+
}
|
|
5671
|
+
},
|
|
5672
|
+
managers: {
|
|
5673
|
+
async upsert(options) {
|
|
5674
|
+
const { idempotencyKey, signal, sourceUpdatedAt, ...rest } = options;
|
|
5675
|
+
const body = {
|
|
5676
|
+
...rest,
|
|
5677
|
+
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt")
|
|
5678
|
+
};
|
|
5679
|
+
return client.execute({
|
|
5680
|
+
method: "POST",
|
|
5681
|
+
operationId: OperationId.UpsertManager,
|
|
5682
|
+
path: "/api/v1/managers",
|
|
5683
|
+
body,
|
|
5684
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5685
|
+
...signal !== void 0 ? { signal } : {}
|
|
5686
|
+
});
|
|
5687
|
+
},
|
|
5688
|
+
async assign(options) {
|
|
5689
|
+
const { tripRef, idempotencyKey, signal, sourceUpdatedAt, ...rest } = options;
|
|
5690
|
+
const body = {
|
|
5691
|
+
...rest,
|
|
5692
|
+
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt")
|
|
5693
|
+
};
|
|
5694
|
+
return client.execute({
|
|
5695
|
+
method: "POST",
|
|
5696
|
+
operationId: OperationId.AssignManager,
|
|
5697
|
+
path: "/api/v1/trips/{ref}/managers",
|
|
5698
|
+
pathParams: { ref: tripRef },
|
|
5699
|
+
body,
|
|
5700
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5701
|
+
...signal !== void 0 ? { signal } : {}
|
|
5702
|
+
});
|
|
5703
|
+
},
|
|
5704
|
+
async unassign(options) {
|
|
5705
|
+
const { tripRef, managerRef, idempotencyKey, signal } = options;
|
|
5706
|
+
return client.execute({
|
|
5707
|
+
method: "DELETE",
|
|
5708
|
+
operationId: OperationId.UnassignManager,
|
|
5709
|
+
path: "/api/v1/trips/{ref}/managers/{managerRef}",
|
|
5710
|
+
pathParams: { ref: tripRef, managerRef },
|
|
5711
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5712
|
+
...signal !== void 0 ? { signal } : {}
|
|
5713
|
+
});
|
|
5714
|
+
},
|
|
5715
|
+
async list(options) {
|
|
5716
|
+
const { tripRef, signal } = options;
|
|
5717
|
+
return client.execute({
|
|
5718
|
+
method: "GET",
|
|
5719
|
+
operationId: OperationId.ListTripManagers,
|
|
5720
|
+
path: "/api/v1/trips/{ref}/managers",
|
|
5721
|
+
pathParams: { ref: tripRef },
|
|
5722
|
+
...signal !== void 0 ? { signal } : {}
|
|
5723
|
+
});
|
|
5724
|
+
},
|
|
5725
|
+
async patch(options) {
|
|
5726
|
+
const { tripRef, managerRef, version, signal, ...body } = options;
|
|
5727
|
+
return client.execute({
|
|
5728
|
+
method: "PATCH",
|
|
5729
|
+
operationId: OperationId.PatchTripManager,
|
|
5730
|
+
path: "/api/v1/trips/{ref}/managers/{managerRef}",
|
|
5731
|
+
pathParams: { ref: tripRef, managerRef },
|
|
5732
|
+
body,
|
|
5733
|
+
headers: { "If-Match": String(version) },
|
|
5734
|
+
...signal !== void 0 ? { signal } : {}
|
|
5735
|
+
});
|
|
5736
|
+
}
|
|
5737
|
+
},
|
|
5738
|
+
parties: {
|
|
5739
|
+
async list(options) {
|
|
5740
|
+
const { tripRef, since, signal } = options;
|
|
5741
|
+
return client.execute({
|
|
5742
|
+
method: "GET",
|
|
5743
|
+
operationId: OperationId.ListParties,
|
|
5744
|
+
path: "/api/v1/trips/{ref}/parties",
|
|
5745
|
+
pathParams: { ref: tripRef },
|
|
5746
|
+
query: { since },
|
|
5747
|
+
...signal !== void 0 ? { signal } : {}
|
|
5748
|
+
});
|
|
5749
|
+
},
|
|
5750
|
+
async add(options) {
|
|
5751
|
+
const { tripRef, idempotencyKey, signal, ...body } = options;
|
|
5752
|
+
return client.execute({
|
|
5753
|
+
method: "POST",
|
|
5754
|
+
operationId: OperationId.CreateParty,
|
|
5755
|
+
path: "/api/v1/trips/{ref}/parties",
|
|
4374
5756
|
pathParams: { ref: tripRef },
|
|
4375
5757
|
body,
|
|
4376
5758
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
@@ -4378,123 +5760,60 @@ function createSeatingResource(client) {
|
|
|
4378
5760
|
});
|
|
4379
5761
|
},
|
|
4380
5762
|
async patch(options) {
|
|
4381
|
-
const { tripRef,
|
|
5763
|
+
const { tripRef, partyId, version, signal, ...body } = options;
|
|
4382
5764
|
return client.execute({
|
|
4383
5765
|
method: "PATCH",
|
|
4384
|
-
operationId: OperationId.
|
|
4385
|
-
path: "/api/v1/trips/{ref}/
|
|
4386
|
-
pathParams: { ref: tripRef,
|
|
5766
|
+
operationId: OperationId.PatchParty,
|
|
5767
|
+
path: "/api/v1/trips/{ref}/parties/{partyId}",
|
|
5768
|
+
pathParams: { ref: tripRef, partyId },
|
|
4387
5769
|
body,
|
|
4388
5770
|
headers: { "If-Match": String(version) },
|
|
4389
5771
|
...signal !== void 0 ? { signal } : {}
|
|
4390
5772
|
});
|
|
4391
5773
|
},
|
|
4392
5774
|
async remove(options) {
|
|
4393
|
-
const { tripRef,
|
|
5775
|
+
const { tripRef, partyId, idempotencyKey, signal } = options;
|
|
4394
5776
|
return client.execute({
|
|
4395
5777
|
method: "DELETE",
|
|
4396
|
-
operationId: OperationId.
|
|
4397
|
-
path: "/api/v1/trips/{ref}/
|
|
4398
|
-
pathParams: { ref: tripRef,
|
|
4399
|
-
|
|
5778
|
+
operationId: OperationId.DeleteParty,
|
|
5779
|
+
path: "/api/v1/trips/{ref}/parties/{partyId}",
|
|
5780
|
+
pathParams: { ref: tripRef, partyId },
|
|
5781
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4400
5782
|
...signal !== void 0 ? { signal } : {}
|
|
4401
5783
|
});
|
|
4402
|
-
},
|
|
4403
|
-
manager: {
|
|
4404
|
-
async link(options) {
|
|
4405
|
-
const { tripRef, vehicleId, idempotencyKey, signal, ...body } = options;
|
|
4406
|
-
return client.execute({
|
|
4407
|
-
method: "POST",
|
|
4408
|
-
operationId: OperationId.LinkSeatingManager,
|
|
4409
|
-
path: "/api/v1/trips/{ref}/seating/vehicles/{vehicleId}/manager",
|
|
4410
|
-
pathParams: { ref: tripRef, vehicleId },
|
|
4411
|
-
body,
|
|
4412
|
-
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4413
|
-
...signal !== void 0 ? { signal } : {}
|
|
4414
|
-
});
|
|
4415
|
-
},
|
|
4416
|
-
async unlink(options) {
|
|
4417
|
-
const { tripRef, vehicleId, version, signal } = options;
|
|
4418
|
-
return client.execute({
|
|
4419
|
-
method: "DELETE",
|
|
4420
|
-
operationId: OperationId.UnlinkSeatingManager,
|
|
4421
|
-
path: "/api/v1/trips/{ref}/seating/vehicles/{vehicleId}/manager",
|
|
4422
|
-
pathParams: { ref: tripRef, vehicleId },
|
|
4423
|
-
headers: { "If-Match": String(version) },
|
|
4424
|
-
...signal !== void 0 ? { signal } : {}
|
|
4425
|
-
});
|
|
4426
|
-
}
|
|
4427
5784
|
}
|
|
4428
|
-
}
|
|
4429
|
-
};
|
|
4430
|
-
}
|
|
4431
|
-
|
|
4432
|
-
// src/resources/share.ts
|
|
4433
|
-
function createShareResource(client) {
|
|
4434
|
-
return {
|
|
4435
|
-
async snapshot(options) {
|
|
4436
|
-
const { token, signal } = options;
|
|
4437
|
-
return client.execute({
|
|
4438
|
-
method: "GET",
|
|
4439
|
-
operationId: OperationId.GetShareSnapshot,
|
|
4440
|
-
path: "/api/v1/share/{token}",
|
|
4441
|
-
pathParams: { token },
|
|
4442
|
-
...signal !== void 0 ? { signal } : {}
|
|
4443
|
-
});
|
|
4444
|
-
},
|
|
4445
|
-
async manifest(options) {
|
|
4446
|
-
const { token, signal } = options;
|
|
4447
|
-
return client.execute({
|
|
4448
|
-
method: "GET",
|
|
4449
|
-
operationId: OperationId.GetShareManifest,
|
|
4450
|
-
path: "/api/v1/share/{token}/manifest",
|
|
4451
|
-
pathParams: { token },
|
|
4452
|
-
...signal !== void 0 ? { signal } : {}
|
|
4453
|
-
});
|
|
4454
5785
|
},
|
|
4455
|
-
|
|
4456
|
-
async
|
|
4457
|
-
const {
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
});
|
|
4465
|
-
},
|
|
4466
|
-
async render(options) {
|
|
4467
|
-
const { token, formId, travellerRef, signal } = options;
|
|
4468
|
-
return client.execute({
|
|
4469
|
-
method: "GET",
|
|
4470
|
-
operationId: OperationId.ShareRenderForm,
|
|
4471
|
-
path: "/api/v1/share/{token}/forms/{formId}",
|
|
4472
|
-
pathParams: { token, formId },
|
|
4473
|
-
query: { travellerRef },
|
|
4474
|
-
...signal !== void 0 ? { signal } : {}
|
|
4475
|
-
});
|
|
4476
|
-
},
|
|
4477
|
-
async save(options) {
|
|
4478
|
-
const { token, formId, travellerRef, idempotencyKey, signal, ...body } = options;
|
|
5786
|
+
balance: {
|
|
5787
|
+
async push(options) {
|
|
5788
|
+
const { tripRef, balances, idempotencyKey, signal } = options;
|
|
5789
|
+
const body = balances.map((row, index) => ({
|
|
5790
|
+
...row,
|
|
5791
|
+
sourceUpdatedAt: normalizeDateTimeInput(
|
|
5792
|
+
row.sourceUpdatedAt,
|
|
5793
|
+
`balances[${index}].sourceUpdatedAt`
|
|
5794
|
+
)
|
|
5795
|
+
}));
|
|
4479
5796
|
return client.execute({
|
|
4480
5797
|
method: "POST",
|
|
4481
|
-
operationId: OperationId.
|
|
4482
|
-
path: "/api/v1/
|
|
4483
|
-
pathParams: {
|
|
4484
|
-
query: { travellerRef },
|
|
5798
|
+
operationId: OperationId.PushTripBalances,
|
|
5799
|
+
path: "/api/v1/trips/{ref}/balance",
|
|
5800
|
+
pathParams: { ref: tripRef },
|
|
4485
5801
|
body,
|
|
4486
5802
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4487
5803
|
...signal !== void 0 ? { signal } : {}
|
|
4488
5804
|
});
|
|
4489
|
-
}
|
|
4490
|
-
|
|
4491
|
-
|
|
5805
|
+
}
|
|
5806
|
+
},
|
|
5807
|
+
bulk: {
|
|
5808
|
+
async push(options) {
|
|
5809
|
+
const { trips, idempotencyKey, signal } = options;
|
|
5810
|
+
const body = trips.map(
|
|
5811
|
+
(item, index) => normalizeBulkTripsItem(item, index)
|
|
5812
|
+
);
|
|
4492
5813
|
return client.execute({
|
|
4493
5814
|
method: "POST",
|
|
4494
|
-
operationId: OperationId.
|
|
4495
|
-
path: "/api/v1/
|
|
4496
|
-
pathParams: { token, formId },
|
|
4497
|
-
query: { travellerRef },
|
|
5815
|
+
operationId: OperationId.PushBulkTrips,
|
|
5816
|
+
path: "/api/v1/bulk/trips",
|
|
4498
5817
|
body,
|
|
4499
5818
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4500
5819
|
...signal !== void 0 ? { signal } : {}
|
|
@@ -4504,74 +5823,40 @@ function createShareResource(client) {
|
|
|
4504
5823
|
};
|
|
4505
5824
|
}
|
|
4506
5825
|
|
|
4507
|
-
// src/resources/
|
|
4508
|
-
|
|
4509
|
-
function createTreksResource(client) {
|
|
5826
|
+
// src/resources/vendors.ts
|
|
5827
|
+
function createVendorsResource(client) {
|
|
4510
5828
|
return {
|
|
4511
|
-
async
|
|
4512
|
-
const {
|
|
5829
|
+
async list(options) {
|
|
5830
|
+
const { tripRef, signal } = options;
|
|
4513
5831
|
return client.execute({
|
|
4514
5832
|
method: "GET",
|
|
4515
|
-
operationId: OperationId.
|
|
4516
|
-
path: "/api/v1/
|
|
4517
|
-
pathParams: {
|
|
5833
|
+
operationId: OperationId.ListTripVendors,
|
|
5834
|
+
path: "/api/v1/trips/{ref}/vendors",
|
|
5835
|
+
pathParams: { ref: tripRef },
|
|
4518
5836
|
...signal !== void 0 ? { signal } : {}
|
|
4519
5837
|
});
|
|
4520
5838
|
},
|
|
4521
|
-
async
|
|
4522
|
-
const {
|
|
4523
|
-
const body = {
|
|
4524
|
-
...rest,
|
|
4525
|
-
newStartDate: normalizeDateTimeInput(newStartDate, "newStartDate"),
|
|
4526
|
-
newEndDate: normalizeDateTimeInput(newEndDate, "newEndDate")
|
|
4527
|
-
};
|
|
5839
|
+
async upsert(options) {
|
|
5840
|
+
const { agencyRef, externalVendorId, idempotencyKey, signal, ...body } = options;
|
|
4528
5841
|
return client.execute({
|
|
4529
|
-
method: "
|
|
4530
|
-
operationId: OperationId.
|
|
4531
|
-
path: "/api/v1/
|
|
4532
|
-
pathParams: {
|
|
5842
|
+
method: "PUT",
|
|
5843
|
+
operationId: OperationId.UpsertVendor,
|
|
5844
|
+
path: "/api/v1/agencies/{ref}/vendors/{externalVendorId}",
|
|
5845
|
+
pathParams: { ref: agencyRef, externalVendorId },
|
|
4533
5846
|
body,
|
|
4534
5847
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4535
5848
|
...signal !== void 0 ? { signal } : {}
|
|
4536
5849
|
});
|
|
4537
5850
|
},
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
const { trekRef, signal } = options;
|
|
4541
|
-
return client.execute({
|
|
4542
|
-
method: "GET",
|
|
4543
|
-
operationId: OperationId.ReadTrekWalkInMeta,
|
|
4544
|
-
path: "/api/v1/treks/{trekRef}/walk-ins/meta",
|
|
4545
|
-
pathParams: { trekRef },
|
|
4546
|
-
...signal !== void 0 ? { signal } : {}
|
|
4547
|
-
});
|
|
4548
|
-
},
|
|
4549
|
-
async create(options) {
|
|
4550
|
-
const { trekRef, idempotencyKey, signal, ...body } = options;
|
|
4551
|
-
return client.execute({
|
|
4552
|
-
method: "POST",
|
|
4553
|
-
operationId: OperationId.CreateTrekWalkIn,
|
|
4554
|
-
path: "/api/v1/treks/{trekRef}/walk-ins",
|
|
4555
|
-
pathParams: { trekRef },
|
|
4556
|
-
body,
|
|
4557
|
-
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4558
|
-
...signal !== void 0 ? { signal } : {}
|
|
4559
|
-
});
|
|
4560
|
-
}
|
|
4561
|
-
}
|
|
4562
|
-
};
|
|
4563
|
-
}
|
|
4564
|
-
|
|
4565
|
-
// src/resources/vendors.ts
|
|
4566
|
-
function createVendorsResource(client) {
|
|
4567
|
-
return {
|
|
4568
|
-
async list(options) {
|
|
4569
|
-
const { tripRef, signal } = options;
|
|
5851
|
+
async remove(options) {
|
|
5852
|
+
const { agencyRef, externalVendorId, version, idempotencyKey, signal } = options;
|
|
4570
5853
|
return client.execute({
|
|
4571
|
-
method: "
|
|
4572
|
-
operationId: OperationId.
|
|
4573
|
-
path: "/api/v1/
|
|
4574
|
-
pathParams: { ref:
|
|
5854
|
+
method: "DELETE",
|
|
5855
|
+
operationId: OperationId.DeleteVendor,
|
|
5856
|
+
path: "/api/v1/agencies/{ref}/vendors/{externalVendorId}",
|
|
5857
|
+
pathParams: { ref: agencyRef, externalVendorId },
|
|
5858
|
+
headers: { "If-Match": String(version) },
|
|
5859
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4575
5860
|
...signal !== void 0 ? { signal } : {}
|
|
4576
5861
|
});
|
|
4577
5862
|
}
|
|
@@ -4786,28 +6071,6 @@ var VehicleType = {
|
|
|
4786
6071
|
Other: "OTHER"
|
|
4787
6072
|
};
|
|
4788
6073
|
|
|
4789
|
-
// src/pagination/paginator.ts
|
|
4790
|
-
var KaafilPaginationError = class extends Error {
|
|
4791
|
-
constructor(message) {
|
|
4792
|
-
super(message);
|
|
4793
|
-
this.name = "KaafilPaginationError";
|
|
4794
|
-
}
|
|
4795
|
-
};
|
|
4796
|
-
var KaafilPaginationInFlightError = class _KaafilPaginationInFlightError extends KaafilPaginationError {
|
|
4797
|
-
constructor() {
|
|
4798
|
-
super("next() was called while a previous call on this paginator was still in flight.");
|
|
4799
|
-
this.name = "KaafilPaginationInFlightError";
|
|
4800
|
-
Object.setPrototypeOf(this, _KaafilPaginationInFlightError.prototype);
|
|
4801
|
-
}
|
|
4802
|
-
};
|
|
4803
|
-
var KaafilPaginationExhaustedError = class _KaafilPaginationExhaustedError extends KaafilPaginationError {
|
|
4804
|
-
constructor() {
|
|
4805
|
-
super("next() was called after this paginator was already exhausted (hasNext is false).");
|
|
4806
|
-
this.name = "KaafilPaginationExhaustedError";
|
|
4807
|
-
Object.setPrototypeOf(this, _KaafilPaginationExhaustedError.prototype);
|
|
4808
|
-
}
|
|
4809
|
-
};
|
|
4810
|
-
|
|
4811
6074
|
// src/rooming/vocabulary.ts
|
|
4812
6075
|
var HEURISTIC_SEVERITY = Object.freeze({
|
|
4813
6076
|
medicalFirst: "warn",
|
|
@@ -4848,6 +6111,178 @@ function parseRoomingTone(tone) {
|
|
|
4848
6111
|
return { family, shade };
|
|
4849
6112
|
}
|
|
4850
6113
|
|
|
6114
|
+
// src/media/compress-image.ts
|
|
6115
|
+
var CompressionOutcome = {
|
|
6116
|
+
/** Re-encoded, and smaller. The ordinary case. */
|
|
6117
|
+
Compressed: "compressed",
|
|
6118
|
+
/** Re-encoded to drop metadata; the bytes did not shrink. See rule 3. */
|
|
6119
|
+
StrippedOnly: "stripped-only",
|
|
6120
|
+
/** Returned untouched — not a decodable image, or already smaller than any
|
|
6121
|
+
* re-encode would be, or this runtime cannot encode. */
|
|
6122
|
+
Skipped: "skipped"
|
|
6123
|
+
};
|
|
6124
|
+
var MAX_STRIP_ONLY_GROWTH = 1.05;
|
|
6125
|
+
function stripOnlyIsWorthIt(contentType, outSize, originalSize) {
|
|
6126
|
+
return carriesMetadata(contentType) && outSize <= originalSize * MAX_STRIP_ONLY_GROWTH;
|
|
6127
|
+
}
|
|
6128
|
+
var DEFAULT_MAX_EDGE = 2048;
|
|
6129
|
+
var DEFAULT_QUALITY = 0.82;
|
|
6130
|
+
var DEFAULT_PREFER_TYPES = ["image/webp", "image/jpeg"];
|
|
6131
|
+
var COMPRESSIBLE = /* @__PURE__ */ new Set(["image/jpeg", "image/jpg", "image/png", "image/webp", "image/avif"]);
|
|
6132
|
+
function isImageCompressionSupported() {
|
|
6133
|
+
return typeof createImageBitmap === "function" && (typeof OffscreenCanvas === "function" || typeof document === "object" && document !== null && "createElement" in document);
|
|
6134
|
+
}
|
|
6135
|
+
function scaledDimensions(width, height, maxEdge) {
|
|
6136
|
+
const longest = Math.max(width, height);
|
|
6137
|
+
if (longest <= maxEdge || longest === 0) return { width, height };
|
|
6138
|
+
const ratio = maxEdge / longest;
|
|
6139
|
+
return {
|
|
6140
|
+
width: Math.max(1, Math.round(width * ratio)),
|
|
6141
|
+
height: Math.max(1, Math.round(height * ratio))
|
|
6142
|
+
};
|
|
6143
|
+
}
|
|
6144
|
+
function isCompressibleType(contentType) {
|
|
6145
|
+
return COMPRESSIBLE.has(contentType.toLowerCase().split(";")[0]?.trim() ?? "");
|
|
6146
|
+
}
|
|
6147
|
+
function passthrough(blob, contentType) {
|
|
6148
|
+
return {
|
|
6149
|
+
blob,
|
|
6150
|
+
contentType,
|
|
6151
|
+
sizeBytes: blob.size,
|
|
6152
|
+
originalSizeBytes: blob.size,
|
|
6153
|
+
outcome: CompressionOutcome.Skipped
|
|
6154
|
+
};
|
|
6155
|
+
}
|
|
6156
|
+
async function encode(bitmap, width, height, type, quality) {
|
|
6157
|
+
if (typeof OffscreenCanvas === "function") {
|
|
6158
|
+
const canvas2 = new OffscreenCanvas(width, height);
|
|
6159
|
+
const ctx2 = canvas2.getContext("2d");
|
|
6160
|
+
if (ctx2 === null) return null;
|
|
6161
|
+
ctx2.drawImage(bitmap, 0, 0, width, height);
|
|
6162
|
+
try {
|
|
6163
|
+
const out = await canvas2.convertToBlob({ type, quality });
|
|
6164
|
+
return out.type === type ? out : null;
|
|
6165
|
+
} catch {
|
|
6166
|
+
return null;
|
|
6167
|
+
}
|
|
6168
|
+
}
|
|
6169
|
+
const canvas = document.createElement("canvas");
|
|
6170
|
+
canvas.width = width;
|
|
6171
|
+
canvas.height = height;
|
|
6172
|
+
const ctx = canvas.getContext("2d");
|
|
6173
|
+
if (ctx === null) return null;
|
|
6174
|
+
ctx.drawImage(bitmap, 0, 0, width, height);
|
|
6175
|
+
return new Promise((resolve) => {
|
|
6176
|
+
canvas.toBlob((out) => resolve(out !== null && out.type === type ? out : null), type, quality);
|
|
6177
|
+
});
|
|
6178
|
+
}
|
|
6179
|
+
async function compressImage(input, options = {}) {
|
|
6180
|
+
const contentType = input.type === "" ? "application/octet-stream" : input.type;
|
|
6181
|
+
const originalSizeBytes = input.size;
|
|
6182
|
+
if (!isCompressibleType(contentType)) return passthrough(input, contentType);
|
|
6183
|
+
if (!isImageCompressionSupported()) return passthrough(input, contentType);
|
|
6184
|
+
const maxEdge = options.maxEdge ?? DEFAULT_MAX_EDGE;
|
|
6185
|
+
const quality = options.quality ?? DEFAULT_QUALITY;
|
|
6186
|
+
const preferTypes = options.preferTypes ?? DEFAULT_PREFER_TYPES;
|
|
6187
|
+
let bitmap;
|
|
6188
|
+
try {
|
|
6189
|
+
bitmap = await createImageBitmap(input);
|
|
6190
|
+
} catch {
|
|
6191
|
+
return passthrough(input, contentType);
|
|
6192
|
+
}
|
|
6193
|
+
try {
|
|
6194
|
+
const { width, height } = scaledDimensions(bitmap.width, bitmap.height, maxEdge);
|
|
6195
|
+
for (const type of preferTypes) {
|
|
6196
|
+
const out = await encode(bitmap, width, height, type, quality);
|
|
6197
|
+
if (out === null) continue;
|
|
6198
|
+
if (out.size < originalSizeBytes) {
|
|
6199
|
+
return {
|
|
6200
|
+
blob: out,
|
|
6201
|
+
contentType: type,
|
|
6202
|
+
sizeBytes: out.size,
|
|
6203
|
+
originalSizeBytes,
|
|
6204
|
+
outcome: CompressionOutcome.Compressed,
|
|
6205
|
+
width,
|
|
6206
|
+
height
|
|
6207
|
+
};
|
|
6208
|
+
}
|
|
6209
|
+
if (stripOnlyIsWorthIt(contentType, out.size, originalSizeBytes)) {
|
|
6210
|
+
return {
|
|
6211
|
+
blob: out,
|
|
6212
|
+
contentType: type,
|
|
6213
|
+
sizeBytes: out.size,
|
|
6214
|
+
originalSizeBytes,
|
|
6215
|
+
outcome: CompressionOutcome.StrippedOnly,
|
|
6216
|
+
width,
|
|
6217
|
+
height
|
|
6218
|
+
};
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
return {
|
|
6222
|
+
...passthrough(input, contentType),
|
|
6223
|
+
width: bitmap.width,
|
|
6224
|
+
height: bitmap.height
|
|
6225
|
+
};
|
|
6226
|
+
} finally {
|
|
6227
|
+
bitmap.close();
|
|
6228
|
+
}
|
|
6229
|
+
}
|
|
6230
|
+
function carriesMetadata(contentType) {
|
|
6231
|
+
const type = contentType.toLowerCase();
|
|
6232
|
+
return type === "image/jpeg" || type === "image/jpg" || type === "image/avif";
|
|
6233
|
+
}
|
|
6234
|
+
var DEFAULT_LOSSLESS_TYPES = ["image/webp", "image/png"];
|
|
6235
|
+
async function convertImageLossless(input, options = {}) {
|
|
6236
|
+
const contentType = input.type === "" ? "application/octet-stream" : input.type;
|
|
6237
|
+
const originalSizeBytes = input.size;
|
|
6238
|
+
if (!isCompressibleType(contentType)) return passthrough(input, contentType);
|
|
6239
|
+
if (!isImageCompressionSupported()) return passthrough(input, contentType);
|
|
6240
|
+
const preferTypes = options.preferTypes ?? DEFAULT_LOSSLESS_TYPES;
|
|
6241
|
+
let bitmap;
|
|
6242
|
+
try {
|
|
6243
|
+
bitmap = await createImageBitmap(input);
|
|
6244
|
+
} catch {
|
|
6245
|
+
return passthrough(input, contentType);
|
|
6246
|
+
}
|
|
6247
|
+
try {
|
|
6248
|
+
const { width, height } = bitmap;
|
|
6249
|
+
let best = null;
|
|
6250
|
+
for (const type of preferTypes) {
|
|
6251
|
+
const out = await encode(bitmap, width, height, type, 1);
|
|
6252
|
+
if (out === null) continue;
|
|
6253
|
+
if (best === null || out.size < best.blob.size) best = { blob: out, type };
|
|
6254
|
+
}
|
|
6255
|
+
if (best === null) {
|
|
6256
|
+
return { ...passthrough(input, contentType), width, height };
|
|
6257
|
+
}
|
|
6258
|
+
if (best.blob.size < originalSizeBytes) {
|
|
6259
|
+
return {
|
|
6260
|
+
blob: best.blob,
|
|
6261
|
+
contentType: best.type,
|
|
6262
|
+
sizeBytes: best.blob.size,
|
|
6263
|
+
originalSizeBytes,
|
|
6264
|
+
outcome: CompressionOutcome.Compressed,
|
|
6265
|
+
width,
|
|
6266
|
+
height
|
|
6267
|
+
};
|
|
6268
|
+
}
|
|
6269
|
+
if (stripOnlyIsWorthIt(contentType, best.blob.size, originalSizeBytes)) {
|
|
6270
|
+
return {
|
|
6271
|
+
blob: best.blob,
|
|
6272
|
+
contentType: best.type,
|
|
6273
|
+
sizeBytes: best.blob.size,
|
|
6274
|
+
originalSizeBytes,
|
|
6275
|
+
outcome: CompressionOutcome.StrippedOnly,
|
|
6276
|
+
width,
|
|
6277
|
+
height
|
|
6278
|
+
};
|
|
6279
|
+
}
|
|
6280
|
+
return { ...passthrough(input, contentType), width, height };
|
|
6281
|
+
} finally {
|
|
6282
|
+
bitmap.close();
|
|
6283
|
+
}
|
|
6284
|
+
}
|
|
6285
|
+
|
|
4851
6286
|
// src/storage/adapter.ts
|
|
4852
6287
|
function createInMemoryStorageAdapter() {
|
|
4853
6288
|
const store = /* @__PURE__ */ new Map();
|
|
@@ -5119,12 +6554,30 @@ var KaafilClient = class {
|
|
|
5119
6554
|
submit: (options) => this.#requireState().share.forms.submit(options)
|
|
5120
6555
|
}
|
|
5121
6556
|
};
|
|
6557
|
+
get agencies() {
|
|
6558
|
+
return this.#requireState().agencies;
|
|
6559
|
+
}
|
|
5122
6560
|
get vendors() {
|
|
5123
6561
|
return this.#requireState().vendors;
|
|
5124
6562
|
}
|
|
6563
|
+
get trips() {
|
|
6564
|
+
return this.#requireState().trips;
|
|
6565
|
+
}
|
|
6566
|
+
get travellers() {
|
|
6567
|
+
return this.#requireState().travellers;
|
|
6568
|
+
}
|
|
5125
6569
|
get journey() {
|
|
5126
6570
|
return this.#requireState().journey;
|
|
5127
6571
|
}
|
|
6572
|
+
get bookings() {
|
|
6573
|
+
return this.#requireState().bookings;
|
|
6574
|
+
}
|
|
6575
|
+
get feedbackNps() {
|
|
6576
|
+
return this.#requireState().feedbackNps;
|
|
6577
|
+
}
|
|
6578
|
+
get forms() {
|
|
6579
|
+
return this.#requireState().forms;
|
|
6580
|
+
}
|
|
5128
6581
|
get notifications() {
|
|
5129
6582
|
return this.#requireState().notifications;
|
|
5130
6583
|
}
|
|
@@ -5262,10 +6715,81 @@ var KaafilClient = class {
|
|
|
5262
6715
|
...this.#config.userAgent !== void 0 ? { userAgent: this.#config.userAgent } : {},
|
|
5263
6716
|
...this.#config.random !== void 0 ? { random: this.#config.random } : {}
|
|
5264
6717
|
});
|
|
6718
|
+
const agencyRef = input.kind === "shareToken" ? void 0 : input.agencyRef;
|
|
6719
|
+
const agenciesResource = createAgenciesResource(http);
|
|
6720
|
+
const journeyResource = createJourneyResource(http);
|
|
6721
|
+
const checklistsResource = createChecklistsResource(http);
|
|
6722
|
+
const formsResource = createFormsResource(http);
|
|
6723
|
+
const feedbackNpsResource = createFeedbackNpsResource(http);
|
|
6724
|
+
const travellersResource = createTravellersResource(http);
|
|
6725
|
+
const vendorsResource = createVendorsResource(http);
|
|
6726
|
+
const boundAgencies = {
|
|
6727
|
+
...agenciesResource,
|
|
6728
|
+
managers: {
|
|
6729
|
+
list: (options) => agenciesResource.managers.list({ ...options, agencyRef }),
|
|
6730
|
+
listPage: (options) => agenciesResource.managers.listPage({ ...options, agencyRef })
|
|
6731
|
+
},
|
|
6732
|
+
settings: {
|
|
6733
|
+
get: (options) => agenciesResource.settings.get({ ...options, agencyRef }),
|
|
6734
|
+
patch: (options) => agenciesResource.settings.patch({ ...options, agencyRef })
|
|
6735
|
+
}
|
|
6736
|
+
};
|
|
6737
|
+
const boundVendors = {
|
|
6738
|
+
...vendorsResource,
|
|
6739
|
+
upsert: (options) => vendorsResource.upsert({ ...options, agencyRef }),
|
|
6740
|
+
remove: (options) => vendorsResource.remove({ ...options, agencyRef })
|
|
6741
|
+
};
|
|
6742
|
+
const boundJourney = {
|
|
6743
|
+
...journeyResource,
|
|
6744
|
+
triggers: {
|
|
6745
|
+
list: (options) => journeyResource.triggers.list({ ...options, agencyRef }),
|
|
6746
|
+
patch: (options) => journeyResource.triggers.patch({ ...options, agencyRef })
|
|
6747
|
+
}
|
|
6748
|
+
};
|
|
6749
|
+
const boundChecklists = {
|
|
6750
|
+
...checklistsResource,
|
|
6751
|
+
agencyTemplates: {
|
|
6752
|
+
list: (options) => checklistsResource.agencyTemplates.list({ ...options, agencyRef }),
|
|
6753
|
+
create: (options) => checklistsResource.agencyTemplates.create({
|
|
6754
|
+
...options,
|
|
6755
|
+
agencyRef
|
|
6756
|
+
}),
|
|
6757
|
+
patch: (options) => checklistsResource.agencyTemplates.patch({ ...options, agencyRef }),
|
|
6758
|
+
remove: (options) => checklistsResource.agencyTemplates.remove({
|
|
6759
|
+
...options,
|
|
6760
|
+
agencyRef
|
|
6761
|
+
}),
|
|
6762
|
+
publish: (options) => checklistsResource.agencyTemplates.publish({
|
|
6763
|
+
...options,
|
|
6764
|
+
agencyRef
|
|
6765
|
+
})
|
|
6766
|
+
}
|
|
6767
|
+
};
|
|
6768
|
+
const boundForms = {
|
|
6769
|
+
...formsResource,
|
|
6770
|
+
create: (options) => formsResource.create({ ...options, agencyRef }),
|
|
6771
|
+
list: (options) => formsResource.list({ ...options, agencyRef })
|
|
6772
|
+
};
|
|
6773
|
+
const boundFeedbackNps = {
|
|
6774
|
+
...feedbackNpsResource,
|
|
6775
|
+
agency: (options) => feedbackNpsResource.agency({ ...options, agencyRef })
|
|
6776
|
+
};
|
|
6777
|
+
const boundTravellers = {
|
|
6778
|
+
...travellersResource,
|
|
6779
|
+
listForAgency: (options) => travellersResource.listForAgency({ ...options, agencyRef }),
|
|
6780
|
+
listForAgencyPage: (options) => travellersResource.listForAgencyPage({ ...options, agencyRef }),
|
|
6781
|
+
create: (options) => travellersResource.create({ ...options, agencyRef })
|
|
6782
|
+
};
|
|
5265
6783
|
this.#state = {
|
|
5266
6784
|
http,
|
|
5267
|
-
|
|
5268
|
-
|
|
6785
|
+
agencies: boundAgencies,
|
|
6786
|
+
vendors: boundVendors,
|
|
6787
|
+
trips: createTripsResource(http),
|
|
6788
|
+
travellers: boundTravellers,
|
|
6789
|
+
journey: boundJourney,
|
|
6790
|
+
bookings: createBookingsResource(http),
|
|
6791
|
+
feedbackNps: boundFeedbackNps,
|
|
6792
|
+
forms: boundForms,
|
|
5269
6793
|
share: createShareResource(http),
|
|
5270
6794
|
notifications: createNotificationsResource(http),
|
|
5271
6795
|
itinerary: createItineraryResource(http),
|
|
@@ -5273,7 +6797,7 @@ var KaafilClient = class {
|
|
|
5273
6797
|
seating: createSeatingResource(http),
|
|
5274
6798
|
pickups: createPickupsResource(http),
|
|
5275
6799
|
treks: createTreksResource(http),
|
|
5276
|
-
checklists:
|
|
6800
|
+
checklists: boundChecklists,
|
|
5277
6801
|
float: createFloatResource(http),
|
|
5278
6802
|
expenses: createExpensesResource(http),
|
|
5279
6803
|
collections: createCollectionsResource(http),
|
|
@@ -5304,6 +6828,7 @@ exports.ChecklistPullTemplateMode = ChecklistPullTemplateMode;
|
|
|
5304
6828
|
exports.ClaimStatusIngest = ClaimStatusIngest;
|
|
5305
6829
|
exports.CloseoutPackSection = CloseoutPackSection;
|
|
5306
6830
|
exports.CollectionMode = CollectionMode;
|
|
6831
|
+
exports.CompressionOutcome = CompressionOutcome;
|
|
5307
6832
|
exports.Currency = Currency;
|
|
5308
6833
|
exports.ERROR_CODE_TABLE = ERROR_CODE_TABLE;
|
|
5309
6834
|
exports.EventType = EventType;
|
|
@@ -5375,6 +6900,8 @@ exports.UNKNOWN_TONE_FAMILY = UNKNOWN_TONE_FAMILY;
|
|
|
5375
6900
|
exports.UnsatisfiableSchemeError = UnsatisfiableSchemeError;
|
|
5376
6901
|
exports.VehicleLayout = VehicleLayout;
|
|
5377
6902
|
exports.VehicleType = VehicleType;
|
|
6903
|
+
exports.compressImage = compressImage;
|
|
6904
|
+
exports.convertImageLossless = convertImageLossless;
|
|
5378
6905
|
exports.createBlobLane = createBlobLane;
|
|
5379
6906
|
exports.createDeltaCursor = createDeltaCursor;
|
|
5380
6907
|
exports.createDrainer = createDrainer;
|
|
@@ -5389,6 +6916,8 @@ exports.createShareGuard = createShareGuard;
|
|
|
5389
6916
|
exports.createSnapshotStore = createSnapshotStore;
|
|
5390
6917
|
exports.createSyncResource = createSyncResource;
|
|
5391
6918
|
exports.extractSectionRows = extractSectionRows;
|
|
6919
|
+
exports.isCompressibleType = isCompressibleType;
|
|
6920
|
+
exports.isImageCompressionSupported = isImageCompressionSupported;
|
|
5392
6921
|
exports.isKaafilError = isKaafilError;
|
|
5393
6922
|
exports.isRetryable = isRetryable;
|
|
5394
6923
|
exports.isRoomingHeuristicKey = isRoomingHeuristicKey;
|
|
@@ -5399,6 +6928,7 @@ exports.parseRoomingTone = parseRoomingTone;
|
|
|
5399
6928
|
exports.readCurrentVersion = readCurrentVersion;
|
|
5400
6929
|
exports.reconcileConflict = reconcileConflict;
|
|
5401
6930
|
exports.roomingHeuristicSeverity = roomingHeuristicSeverity;
|
|
6931
|
+
exports.scaledDimensions = scaledDimensions;
|
|
5402
6932
|
exports.shouldUseBatchTransport = shouldUseBatchTransport;
|
|
5403
6933
|
//# sourceMappingURL=client-entry.cjs.map
|
|
5404
6934
|
//# sourceMappingURL=client-entry.cjs.map
|