kaafil-js 0.1.0-beta.6 → 0.1.0-beta.7
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 +643 -60
- package/dist/client-entry.cjs.map +1 -1
- package/dist/client-entry.d.cts +299 -30
- package/dist/client-entry.d.ts +299 -30
- package/dist/client-entry.js +643 -60
- package/dist/client-entry.js.map +1 -1
- package/dist/index.cjs +402 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +168 -93
- package/dist/index.d.ts +168 -93
- package/dist/index.js +402 -43
- package/dist/index.js.map +1 -1
- package/dist/{vocabulary-CC-Pfd6I.d.cts → vocabulary-Cjd7p4_r.d.cts} +8582 -3664
- package/dist/{vocabulary-CC-Pfd6I.d.ts → vocabulary-Cjd7p4_r.d.ts} +8582 -3664
- package/package.json +1 -1
package/dist/client-entry.cjs
CHANGED
|
@@ -18,6 +18,7 @@ var SECURITY_SCHEME_CARRIERS = {
|
|
|
18
18
|
var OperationId = {
|
|
19
19
|
AddChecklistItem: "addChecklistItem",
|
|
20
20
|
AddItineraryItem: "addItineraryItem",
|
|
21
|
+
AddTravellerNote: "addTravellerNote",
|
|
21
22
|
AdjustFloat: "adjustFloat",
|
|
22
23
|
ArchiveForm: "archiveForm",
|
|
23
24
|
AssignManager: "assignManager",
|
|
@@ -46,6 +47,7 @@ var OperationId = {
|
|
|
46
47
|
CreateSeatingVehicle: "createSeatingVehicle",
|
|
47
48
|
CreateTraveller: "createTraveller",
|
|
48
49
|
CreateTrekWalkIn: "createTrekWalkIn",
|
|
50
|
+
CreateVendor: "createVendor",
|
|
49
51
|
DeleteBooking: "deleteBooking",
|
|
50
52
|
DeleteChecklistItem: "deleteChecklistItem",
|
|
51
53
|
DeleteChecklistTemplate: "deleteChecklistTemplate",
|
|
@@ -64,43 +66,58 @@ var OperationId = {
|
|
|
64
66
|
ExportCloseoutPack: "exportCloseoutPack",
|
|
65
67
|
ExportFormResponses: "exportFormResponses",
|
|
66
68
|
ExportTraveller: "exportTraveller",
|
|
69
|
+
GetAgencyAdminMe: "getAgencyAdminMe",
|
|
67
70
|
GetAgencySettingsSelf: "getAgencySettingsSelf",
|
|
71
|
+
GetAgencyTrip: "getAgencyTrip",
|
|
68
72
|
GetForm: "getForm",
|
|
69
73
|
GetFormAggregate: "getFormAggregate",
|
|
70
74
|
GetFormConsentReceipt: "getFormConsentReceipt",
|
|
71
75
|
GetFormResponse: "getFormResponse",
|
|
72
76
|
GetFormsCompletionMatrix: "getFormsCompletionMatrix",
|
|
73
77
|
GetFormsCrossModuleAnswers: "getFormsCrossModuleAnswers",
|
|
78
|
+
GetManagerAgencyProfile: "getManagerAgencyProfile",
|
|
79
|
+
GetManagerInbox: "getManagerInbox",
|
|
80
|
+
GetNotificationDetail: "getNotificationDetail",
|
|
74
81
|
GetShareManifest: "getShareManifest",
|
|
75
82
|
GetShareSnapshot: "getShareSnapshot",
|
|
83
|
+
GetTravellerAgencyProfile: "getTravellerAgencyProfile",
|
|
84
|
+
GetTravellerDetail: "getTravellerDetail",
|
|
76
85
|
GetTrip: "getTrip",
|
|
77
86
|
GetTripManifest: "getTripManifest",
|
|
78
87
|
IssueFloat: "issueFloat",
|
|
79
88
|
LinkExpenseReceipt: "linkExpenseReceipt",
|
|
80
89
|
LinkSeatingManager: "linkSeatingManager",
|
|
81
90
|
ListAgencyManagers: "listAgencyManagers",
|
|
91
|
+
ListAgencyTrips: "listAgencyTrips",
|
|
82
92
|
ListBookings: "listBookings",
|
|
83
93
|
ListChecklistTemplates: "listChecklistTemplates",
|
|
84
94
|
ListChecklistTemplatesAdmin: "listChecklistTemplatesAdmin",
|
|
85
95
|
ListCollections: "listCollections",
|
|
86
96
|
ListEligibleCollections: "listEligibleCollections",
|
|
87
97
|
ListExpenses: "listExpenses",
|
|
98
|
+
ListFiles: "listFiles",
|
|
88
99
|
ListFormBindings: "listFormBindings",
|
|
89
100
|
ListForms: "listForms",
|
|
90
101
|
ListJourneyTriggers: "listJourneyTriggers",
|
|
102
|
+
ListManagerExpenses: "listManagerExpenses",
|
|
91
103
|
ListManagerNotifications: "listManagerNotifications",
|
|
104
|
+
ListOwnManagerTrips: "listOwnManagerTrips",
|
|
92
105
|
ListParties: "listParties",
|
|
93
106
|
ListPickupStops: "listPickupStops",
|
|
94
107
|
ListRoomingStayWindows: "listRoomingStayWindows",
|
|
108
|
+
ListShareTokens: "listShareTokens",
|
|
109
|
+
ListTravellerFormResponses: "listTravellerFormResponses",
|
|
95
110
|
ListTrekWalkIns: "listTrekWalkIns",
|
|
96
111
|
ListTripFormResponses: "listTripFormResponses",
|
|
97
112
|
ListTripForms: "listTripForms",
|
|
98
113
|
ListTripManagers: "listTripManagers",
|
|
114
|
+
ListTripManifest: "listTripManifest",
|
|
99
115
|
ListTripVendors: "listTripVendors",
|
|
100
116
|
LockCloseout: "lockCloseout",
|
|
101
117
|
LogExpense: "logExpense",
|
|
102
118
|
ManagerCreateFormResponse: "managerCreateFormResponse",
|
|
103
119
|
MarkNotificationRead: "markNotificationRead",
|
|
120
|
+
MintShareToken: "mintShareToken",
|
|
104
121
|
PatchAgencySettingsSelf: "patchAgencySettingsSelf",
|
|
105
122
|
PatchChecklistItem: "patchChecklistItem",
|
|
106
123
|
PatchChecklistTemplate: "patchChecklistTemplate",
|
|
@@ -115,6 +132,7 @@ var OperationId = {
|
|
|
115
132
|
PatchRoomingRoom: "patchRoomingRoom",
|
|
116
133
|
PatchRoomingStayWindow: "patchRoomingStayWindow",
|
|
117
134
|
PatchSeatingVehicle: "patchSeatingVehicle",
|
|
135
|
+
PatchShareToken: "patchShareToken",
|
|
118
136
|
PatchTripManager: "patchTripManager",
|
|
119
137
|
PostponeTrek: "postponeTrek",
|
|
120
138
|
PublishChecklistTemplate: "publishChecklistTemplate",
|
|
@@ -125,6 +143,7 @@ var OperationId = {
|
|
|
125
143
|
PushTripBalances: "pushTripBalances",
|
|
126
144
|
ReadAgencyFeedbackSummary: "readAgencyFeedbackSummary",
|
|
127
145
|
ReadChecklistAggregate: "readChecklistAggregate",
|
|
146
|
+
ReadChecklistItem: "readChecklistItem",
|
|
128
147
|
ReadCloseout: "readCloseout",
|
|
129
148
|
ReadExpense: "readExpense",
|
|
130
149
|
ReadFile: "readFile",
|
|
@@ -135,14 +154,23 @@ var OperationId = {
|
|
|
135
154
|
ReadItineraryChangeLog: "readItineraryChangeLog",
|
|
136
155
|
ReadJourney: "readJourney",
|
|
137
156
|
ReadJourneyCapabilities: "readJourneyCapabilities",
|
|
157
|
+
ReadManagerExpense: "readManagerExpense",
|
|
158
|
+
ReadManagerExpenseLogMeta: "readManagerExpenseLogMeta",
|
|
159
|
+
ReadManagerFileView: "readManagerFileView",
|
|
160
|
+
ReadManagerToday: "readManagerToday",
|
|
138
161
|
ReadManifestByPickup: "readManifestByPickup",
|
|
139
162
|
ReadRoomingBoard: "readRoomingBoard",
|
|
163
|
+
ReadRoomingRoom: "readRoomingRoom",
|
|
140
164
|
ReadSeatingBoard: "readSeatingBoard",
|
|
165
|
+
ReadShareToken: "readShareToken",
|
|
141
166
|
ReadTrekBoard: "readTrekBoard",
|
|
142
167
|
ReadTrekWalkInMeta: "readTrekWalkInMeta",
|
|
143
168
|
ReadTripFeedbackSummary: "readTripFeedbackSummary",
|
|
169
|
+
ReassignPickupStopTravellers: "reassignPickupStopTravellers",
|
|
144
170
|
RebuildJourney: "rebuildJourney",
|
|
171
|
+
ReconcileTrekWalkIn: "reconcileTrekWalkIn",
|
|
145
172
|
RecordCollection: "recordCollection",
|
|
173
|
+
RegenerateShareToken: "regenerateShareToken",
|
|
146
174
|
RemoveFromManifest: "removeFromManifest",
|
|
147
175
|
ReopenForm: "reopenForm",
|
|
148
176
|
ReopenPickupStop: "reopenPickupStop",
|
|
@@ -152,6 +180,7 @@ var OperationId = {
|
|
|
152
180
|
ReplaceBookingVouchers: "replaceBookingVouchers",
|
|
153
181
|
RequestFileUpload: "requestFileUpload",
|
|
154
182
|
ReturnFloat: "returnFloat",
|
|
183
|
+
RevokeShareToken: "revokeShareToken",
|
|
155
184
|
RunJourneyStep: "runJourneyStep",
|
|
156
185
|
SaveCloseoutHandover: "saveCloseoutHandover",
|
|
157
186
|
SearchTravellerDirectory: "searchTravellerDirectory",
|
|
@@ -184,11 +213,12 @@ var OPERATION_SECURITY = {
|
|
|
184
213
|
addChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
185
214
|
addItineraryItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
186
215
|
addPlatformIncidentUpdate: ["platformAdminAuth"],
|
|
216
|
+
addTravellerNote: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
187
217
|
adjustFloat: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
188
218
|
advanceTestTime: ["apiKeyAuth"],
|
|
189
219
|
advanceTestTimeConsole: ["consoleAuth"],
|
|
190
220
|
archiveForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
191
|
-
assignManager: ["apiKeyAuth"],
|
|
221
|
+
assignManager: ["apiKeyAuth", "agencyAdminAuth"],
|
|
192
222
|
assignPickupTraveller: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
193
223
|
assignRoomingBed: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
194
224
|
assignSeating: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
@@ -233,6 +263,7 @@ var OPERATION_SECURITY = {
|
|
|
233
263
|
createSupportGrant: ["platformAdminAuth"],
|
|
234
264
|
createTraveller: ["apiKeyAuth", "agencyAdminAuth"],
|
|
235
265
|
createTrekWalkIn: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
266
|
+
createVendor: ["apiKeyAuth", "agencyAdminAuth"],
|
|
236
267
|
deleteBooking: ["apiKeyAuth"],
|
|
237
268
|
deleteChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
238
269
|
deleteChecklistTemplate: ["apiKeyAuth", "agencyAdminAuth"],
|
|
@@ -247,22 +278,29 @@ var OPERATION_SECURITY = {
|
|
|
247
278
|
deleteRoomingStayWindow: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
248
279
|
deleteSeatingVehicle: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
249
280
|
deleteVendor: ["apiKeyAuth", "agencyAdminAuth"],
|
|
250
|
-
dispatchForm: ["managerAuth", "apiKeyAuth"],
|
|
281
|
+
dispatchForm: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
251
282
|
editWebhookEndpoint: ["consoleAuth"],
|
|
252
283
|
eraseTraveller: ["apiKeyAuth"],
|
|
253
284
|
exportCloseoutPack: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
254
|
-
exportFormResponses: ["apiKeyAuth", "managerAuth"],
|
|
285
|
+
exportFormResponses: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
255
286
|
exportTraveller: ["apiKeyAuth"],
|
|
287
|
+
getAgencyAdminMe: ["agencyAdminAuth"],
|
|
256
288
|
getAgencySettings: ["consoleAuth"],
|
|
257
289
|
getAgencySettingsSelf: ["apiKeyAuth", "agencyAdminAuth"],
|
|
290
|
+
getAgencyTrip: ["apiKeyAuth", "agencyAdminAuth"],
|
|
258
291
|
getForm: ["apiKeyAuth", "agencyAdminAuth", "managerAuth"],
|
|
259
292
|
getFormAggregate: ["apiKeyAuth"],
|
|
260
|
-
getFormConsentReceipt: ["apiKeyAuth", "managerAuth"],
|
|
261
|
-
getFormResponse: ["managerAuth", "apiKeyAuth"],
|
|
262
|
-
getFormsCompletionMatrix: ["managerAuth", "apiKeyAuth"],
|
|
263
|
-
getFormsCrossModuleAnswers: ["managerAuth", "apiKeyAuth"],
|
|
293
|
+
getFormConsentReceipt: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
294
|
+
getFormResponse: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
295
|
+
getFormsCompletionMatrix: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
296
|
+
getFormsCrossModuleAnswers: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
297
|
+
getManagerAgencyProfile: ["apiKeyAuth", "agencyAdminAuth"],
|
|
298
|
+
getManagerInbox: ["managerAuth"],
|
|
299
|
+
getNotificationDetail: ["managerAuth"],
|
|
264
300
|
getShareManifest: ["shareAuth"],
|
|
265
301
|
getShareSnapshot: ["shareAuth"],
|
|
302
|
+
getTravellerAgencyProfile: ["apiKeyAuth", "agencyAdminAuth"],
|
|
303
|
+
getTravellerDetail: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
266
304
|
getTrip: ["apiKeyAuth"],
|
|
267
305
|
getTripManifest: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
268
306
|
health: [],
|
|
@@ -274,24 +312,28 @@ var OPERATION_SECURITY = {
|
|
|
274
312
|
linkSeatingManager: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
275
313
|
listAgencies: ["consoleAuth"],
|
|
276
314
|
listAgencyManagers: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
315
|
+
listAgencyTrips: ["apiKeyAuth", "agencyAdminAuth"],
|
|
277
316
|
listApiKeys: ["consoleAuth"],
|
|
278
|
-
listBookings: ["apiKeyAuth", "managerAuth"],
|
|
317
|
+
listBookings: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
279
318
|
listChecklistTemplates: ["managerAuth", "apiKeyAuth"],
|
|
280
319
|
listChecklistTemplatesAdmin: ["apiKeyAuth", "agencyAdminAuth"],
|
|
281
|
-
listCollections: ["managerAuth", "apiKeyAuth"],
|
|
320
|
+
listCollections: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
282
321
|
listConsoleUsers: ["consoleAuth"],
|
|
283
|
-
listEligibleCollections: ["managerAuth", "apiKeyAuth"],
|
|
322
|
+
listEligibleCollections: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
284
323
|
listEvents: ["apiKeyAuth"],
|
|
285
|
-
listExpenses: ["managerAuth", "apiKeyAuth"],
|
|
324
|
+
listExpenses: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
325
|
+
listFiles: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
286
326
|
listFormBindings: ["apiKeyAuth", "agencyAdminAuth", "managerAuth"],
|
|
287
327
|
listForms: ["apiKeyAuth", "agencyAdminAuth"],
|
|
288
328
|
listJourneyTriggers: ["apiKeyAuth", "agencyAdminAuth"],
|
|
289
329
|
listJourneyTriggersConsole: ["consoleAuth"],
|
|
330
|
+
listManagerExpenses: ["managerAuth"],
|
|
290
331
|
listManagerNotifications: ["managerAuth"],
|
|
291
332
|
listMessages: ["apiKeyAuth"],
|
|
292
333
|
listMessagesConsole: ["consoleAuth"],
|
|
293
334
|
listMessageTemplates: ["apiKeyAuth"],
|
|
294
335
|
listMyConsoleSessions: ["consoleAuth"],
|
|
336
|
+
listOwnManagerTrips: ["managerAuth"],
|
|
295
337
|
listParties: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
296
338
|
listPickupStops: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
297
339
|
listPlatformAdmins: ["platformAdminAuth"],
|
|
@@ -302,12 +344,15 @@ var OPERATION_SECURITY = {
|
|
|
302
344
|
listPlatformPartners: ["platformAdminAuth"],
|
|
303
345
|
listPlatformPlanTiers: ["platformAdminAuth"],
|
|
304
346
|
listRoomingStayWindows: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
347
|
+
listShareTokens: ["apiKeyAuth", "agencyAdminAuth"],
|
|
305
348
|
listSupportIngestLog: ["platformAdminAuth"],
|
|
306
349
|
listSupportWebhookDeliveries: ["platformAdminAuth"],
|
|
350
|
+
listTravellerFormResponses: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
307
351
|
listTrekWalkIns: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
308
|
-
listTripFormResponses: ["managerAuth", "apiKeyAuth"],
|
|
309
|
-
listTripForms: ["managerAuth", "apiKeyAuth"],
|
|
352
|
+
listTripFormResponses: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
353
|
+
listTripForms: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
310
354
|
listTripManagers: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
355
|
+
listTripManifest: ["apiKeyAuth", "agencyAdminAuth"],
|
|
311
356
|
listTripVendors: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
312
357
|
listWebhookDeliveries: ["apiKeyAuth"],
|
|
313
358
|
listWebhookDeliveriesConsole: ["consoleAuth"],
|
|
@@ -318,7 +363,7 @@ var OPERATION_SECURITY = {
|
|
|
318
363
|
markNotificationRead: ["managerAuth"],
|
|
319
364
|
mintAgencyAdminTokens: ["apiKeyAuth"],
|
|
320
365
|
mintManagerTokens: ["apiKeyAuth"],
|
|
321
|
-
mintShareToken: ["apiKeyAuth"],
|
|
366
|
+
mintShareToken: ["apiKeyAuth", "agencyAdminAuth"],
|
|
322
367
|
nudgeConsoleInvite: [],
|
|
323
368
|
patchAgencyEntitlement: ["consoleAuth"],
|
|
324
369
|
patchAgencySettings: ["consoleAuth"],
|
|
@@ -341,7 +386,7 @@ var OPERATION_SECURITY = {
|
|
|
341
386
|
patchRoomingRoom: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
342
387
|
patchRoomingStayWindow: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
343
388
|
patchSeatingVehicle: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
344
|
-
patchShareToken: ["apiKeyAuth"],
|
|
389
|
+
patchShareToken: ["apiKeyAuth", "agencyAdminAuth"],
|
|
345
390
|
patchTripManager: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
346
391
|
platformHealth: ["platformAdminAuth"],
|
|
347
392
|
platformLogin: [],
|
|
@@ -362,8 +407,9 @@ var OPERATION_SECURITY = {
|
|
|
362
407
|
readAgencyEntitlement: ["consoleAuth"],
|
|
363
408
|
readAgencyFeedbackSummary: ["agencyAdminAuth", "apiKeyAuth"],
|
|
364
409
|
readApiKey: ["consoleAuth"],
|
|
365
|
-
readChecklistAggregate: ["managerAuth", "apiKeyAuth"],
|
|
366
|
-
|
|
410
|
+
readChecklistAggregate: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
411
|
+
readChecklistItem: ["managerAuth", "apiKeyAuth"],
|
|
412
|
+
readCloseout: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
367
413
|
readCommsConfig: ["apiKeyAuth"],
|
|
368
414
|
readCommsConfigConsole: ["consoleAuth"],
|
|
369
415
|
readConsoleAudit: ["consoleAuth"],
|
|
@@ -373,7 +419,7 @@ var OPERATION_SECURITY = {
|
|
|
373
419
|
readEndpointDeliveries: ["consoleAuth"],
|
|
374
420
|
readEndpointDelivery: ["consoleAuth"],
|
|
375
421
|
readEntitlementCatalog: ["consoleAuth"],
|
|
376
|
-
readExpense: ["managerAuth", "apiKeyAuth"],
|
|
422
|
+
readExpense: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
377
423
|
readFile: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
378
424
|
readFileUrl: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
379
425
|
readFloatLedger: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
@@ -384,18 +430,25 @@ var OPERATION_SECURITY = {
|
|
|
384
430
|
readItineraryChangeLog: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
385
431
|
readJourney: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
386
432
|
readJourneyCapabilities: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
433
|
+
readManagerExpense: ["managerAuth"],
|
|
434
|
+
readManagerExpenseLogMeta: ["managerAuth"],
|
|
435
|
+
readManagerFileView: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
436
|
+
readManagerToday: ["apiKeyAuth", "managerAuth", "agencyAdminAuth"],
|
|
387
437
|
readManifestByPickup: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
388
438
|
readPlan: ["consoleAuth"],
|
|
389
439
|
readPlatformPartner: ["platformAdminAuth"],
|
|
390
440
|
readRoomingBoard: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
441
|
+
readRoomingRoom: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
391
442
|
readSeatingBoard: ["managerAuth", "agencyAdminAuth", "apiKeyAuth"],
|
|
392
|
-
readShareToken: ["apiKeyAuth"],
|
|
443
|
+
readShareToken: ["apiKeyAuth", "agencyAdminAuth"],
|
|
393
444
|
readSupportJourneyState: ["platformAdminAuth"],
|
|
394
445
|
readSupportWebhookDeliveryDetail: ["platformAdminAuth"],
|
|
395
446
|
readTenantDefaultCommsConfig: ["apiKeyAuth"],
|
|
396
447
|
readTenantDefaultCommsConfigConsole: ["consoleAuth"],
|
|
397
448
|
readTestClock: ["apiKeyAuth"],
|
|
398
449
|
readTestClockConsole: ["consoleAuth"],
|
|
450
|
+
readTestFixtures: ["apiKeyAuth"],
|
|
451
|
+
readTestFixturesConsole: ["consoleAuth"],
|
|
399
452
|
readTestQuota: ["apiKeyAuth"],
|
|
400
453
|
readTestQuotaConsole: ["consoleAuth"],
|
|
401
454
|
readTrekBoard: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
@@ -406,7 +459,9 @@ var OPERATION_SECURITY = {
|
|
|
406
459
|
readWebhookDeliveryConsole: ["consoleAuth"],
|
|
407
460
|
readWebhookEndpoint: ["consoleAuth"],
|
|
408
461
|
readWebhookEventCatalog: ["consoleAuth"],
|
|
462
|
+
reassignPickupStopTravellers: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
409
463
|
rebuildJourney: ["apiKeyAuth"],
|
|
464
|
+
reconcileTrekWalkIn: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
410
465
|
recordCollection: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
411
466
|
redeliverEndpointDelivery: ["consoleAuth"],
|
|
412
467
|
redeliverWebhookDelivery: ["apiKeyAuth"],
|
|
@@ -414,7 +469,7 @@ var OPERATION_SECURITY = {
|
|
|
414
469
|
redriveSupportWebhookDelivery: ["platformAdminAuth"],
|
|
415
470
|
refreshAgencyAdminTokens: ["agencyAdminAuth"],
|
|
416
471
|
refreshManagerTokens: ["managerAuth"],
|
|
417
|
-
regenerateShareToken: ["apiKeyAuth"],
|
|
472
|
+
regenerateShareToken: ["apiKeyAuth", "agencyAdminAuth"],
|
|
418
473
|
registerWebhookEndpoint: ["consoleAuth"],
|
|
419
474
|
reissueConsoleUserInvite: ["consoleAuth"],
|
|
420
475
|
reissuePlatformAdminInvite: ["platformAdminAuth"],
|
|
@@ -426,7 +481,7 @@ var OPERATION_SECURITY = {
|
|
|
426
481
|
reorderForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
427
482
|
reorderItineraryItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
428
483
|
reorderPickupStops: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
429
|
-
replaceBookingVouchers: ["apiKeyAuth"],
|
|
484
|
+
replaceBookingVouchers: ["apiKeyAuth", "agencyAdminAuth"],
|
|
430
485
|
replaySupportWebhookRange: ["platformAdminAuth"],
|
|
431
486
|
replayWebhookEndpoint: ["apiKeyAuth"],
|
|
432
487
|
replayWebhookEndpointConsole: ["consoleAuth"],
|
|
@@ -439,7 +494,7 @@ var OPERATION_SECURITY = {
|
|
|
439
494
|
revokeApiKey: ["consoleAuth"],
|
|
440
495
|
revokeMyConsoleSession: ["consoleAuth"],
|
|
441
496
|
revokePlatformPartnerApiKey: ["platformAdminAuth"],
|
|
442
|
-
revokeShareToken: ["apiKeyAuth"],
|
|
497
|
+
revokeShareToken: ["apiKeyAuth", "agencyAdminAuth"],
|
|
443
498
|
rotateApiKey: ["consoleAuth"],
|
|
444
499
|
rotateWebhookEndpointSecret: ["consoleAuth"],
|
|
445
500
|
runJourneyStep: ["apiKeyAuth"],
|
|
@@ -461,9 +516,10 @@ var OPERATION_SECURITY = {
|
|
|
461
516
|
testCommsProviderCredential: ["apiKeyAuth"],
|
|
462
517
|
testCommsProviderCredentialConsole: ["consoleAuth"],
|
|
463
518
|
testWebhookEndpoint: ["consoleAuth"],
|
|
519
|
+
testWebhookEndpointApiKey: ["apiKeyAuth"],
|
|
464
520
|
toggleChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
465
521
|
unarchiveForm: ["apiKeyAuth", "agencyAdminAuth"],
|
|
466
|
-
unassignManager: ["apiKeyAuth"],
|
|
522
|
+
unassignManager: ["apiKeyAuth", "agencyAdminAuth"],
|
|
467
523
|
unlinkSeatingManager: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
|
|
468
524
|
unlockCloseout: ["apiKeyAuth"],
|
|
469
525
|
upsertAgency: ["apiKeyAuth"],
|
|
@@ -482,9 +538,10 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
482
538
|
addChecklistItem: true,
|
|
483
539
|
addItineraryItem: true,
|
|
484
540
|
addPlatformIncidentUpdate: false,
|
|
541
|
+
addTravellerNote: true,
|
|
485
542
|
adjustFloat: true,
|
|
486
|
-
advanceTestTime:
|
|
487
|
-
advanceTestTimeConsole:
|
|
543
|
+
advanceTestTime: true,
|
|
544
|
+
advanceTestTimeConsole: true,
|
|
488
545
|
archiveForm: false,
|
|
489
546
|
assignManager: true,
|
|
490
547
|
assignPickupTraveller: true,
|
|
@@ -493,8 +550,8 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
493
550
|
autoAssignRooming: true,
|
|
494
551
|
autoAssignSeating: true,
|
|
495
552
|
boardPickupTraveller: true,
|
|
496
|
-
buildTestFixtures:
|
|
497
|
-
buildTestFixturesConsole:
|
|
553
|
+
buildTestFixtures: true,
|
|
554
|
+
buildTestFixturesConsole: true,
|
|
498
555
|
bulkUpsertBookings: true,
|
|
499
556
|
cancelTrip: true,
|
|
500
557
|
changeMyConsolePassword: true,
|
|
@@ -531,6 +588,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
531
588
|
createSupportGrant: false,
|
|
532
589
|
createTraveller: true,
|
|
533
590
|
createTrekWalkIn: true,
|
|
591
|
+
createVendor: true,
|
|
534
592
|
deleteBooking: true,
|
|
535
593
|
deleteChecklistItem: false,
|
|
536
594
|
deleteChecklistTemplate: false,
|
|
@@ -551,16 +609,23 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
551
609
|
exportCloseoutPack: false,
|
|
552
610
|
exportFormResponses: false,
|
|
553
611
|
exportTraveller: false,
|
|
612
|
+
getAgencyAdminMe: false,
|
|
554
613
|
getAgencySettings: false,
|
|
555
614
|
getAgencySettingsSelf: false,
|
|
615
|
+
getAgencyTrip: false,
|
|
556
616
|
getForm: false,
|
|
557
617
|
getFormAggregate: false,
|
|
558
618
|
getFormConsentReceipt: false,
|
|
559
619
|
getFormResponse: false,
|
|
560
620
|
getFormsCompletionMatrix: false,
|
|
561
621
|
getFormsCrossModuleAnswers: false,
|
|
622
|
+
getManagerAgencyProfile: false,
|
|
623
|
+
getManagerInbox: false,
|
|
624
|
+
getNotificationDetail: false,
|
|
562
625
|
getShareManifest: false,
|
|
563
626
|
getShareSnapshot: false,
|
|
627
|
+
getTravellerAgencyProfile: false,
|
|
628
|
+
getTravellerDetail: false,
|
|
564
629
|
getTrip: false,
|
|
565
630
|
getTripManifest: false,
|
|
566
631
|
health: false,
|
|
@@ -572,6 +637,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
572
637
|
linkSeatingManager: true,
|
|
573
638
|
listAgencies: false,
|
|
574
639
|
listAgencyManagers: false,
|
|
640
|
+
listAgencyTrips: false,
|
|
575
641
|
listApiKeys: false,
|
|
576
642
|
listBookings: false,
|
|
577
643
|
listChecklistTemplates: false,
|
|
@@ -581,15 +647,18 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
581
647
|
listEligibleCollections: false,
|
|
582
648
|
listEvents: false,
|
|
583
649
|
listExpenses: false,
|
|
650
|
+
listFiles: false,
|
|
584
651
|
listFormBindings: false,
|
|
585
652
|
listForms: false,
|
|
586
653
|
listJourneyTriggers: false,
|
|
587
654
|
listJourneyTriggersConsole: false,
|
|
655
|
+
listManagerExpenses: false,
|
|
588
656
|
listManagerNotifications: false,
|
|
589
657
|
listMessages: false,
|
|
590
658
|
listMessagesConsole: false,
|
|
591
659
|
listMessageTemplates: false,
|
|
592
660
|
listMyConsoleSessions: false,
|
|
661
|
+
listOwnManagerTrips: false,
|
|
593
662
|
listParties: false,
|
|
594
663
|
listPickupStops: false,
|
|
595
664
|
listPlatformAdmins: false,
|
|
@@ -600,12 +669,15 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
600
669
|
listPlatformPartners: false,
|
|
601
670
|
listPlatformPlanTiers: false,
|
|
602
671
|
listRoomingStayWindows: false,
|
|
672
|
+
listShareTokens: false,
|
|
603
673
|
listSupportIngestLog: false,
|
|
604
674
|
listSupportWebhookDeliveries: false,
|
|
675
|
+
listTravellerFormResponses: false,
|
|
605
676
|
listTrekWalkIns: false,
|
|
606
677
|
listTripFormResponses: false,
|
|
607
678
|
listTripForms: false,
|
|
608
679
|
listTripManagers: false,
|
|
680
|
+
listTripManifest: false,
|
|
609
681
|
listTripVendors: false,
|
|
610
682
|
listWebhookDeliveries: false,
|
|
611
683
|
listWebhookDeliveriesConsole: false,
|
|
@@ -661,6 +733,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
661
733
|
readAgencyFeedbackSummary: false,
|
|
662
734
|
readApiKey: false,
|
|
663
735
|
readChecklistAggregate: false,
|
|
736
|
+
readChecklistItem: false,
|
|
664
737
|
readCloseout: false,
|
|
665
738
|
readCommsConfig: false,
|
|
666
739
|
readCommsConfigConsole: false,
|
|
@@ -682,10 +755,15 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
682
755
|
readItineraryChangeLog: false,
|
|
683
756
|
readJourney: false,
|
|
684
757
|
readJourneyCapabilities: false,
|
|
758
|
+
readManagerExpense: false,
|
|
759
|
+
readManagerExpenseLogMeta: false,
|
|
760
|
+
readManagerFileView: false,
|
|
761
|
+
readManagerToday: false,
|
|
685
762
|
readManifestByPickup: false,
|
|
686
763
|
readPlan: false,
|
|
687
764
|
readPlatformPartner: false,
|
|
688
765
|
readRoomingBoard: false,
|
|
766
|
+
readRoomingRoom: false,
|
|
689
767
|
readSeatingBoard: false,
|
|
690
768
|
readShareToken: false,
|
|
691
769
|
readSupportJourneyState: false,
|
|
@@ -694,6 +772,8 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
694
772
|
readTenantDefaultCommsConfigConsole: false,
|
|
695
773
|
readTestClock: false,
|
|
696
774
|
readTestClockConsole: false,
|
|
775
|
+
readTestFixtures: false,
|
|
776
|
+
readTestFixturesConsole: false,
|
|
697
777
|
readTestQuota: false,
|
|
698
778
|
readTestQuotaConsole: false,
|
|
699
779
|
readTrekBoard: false,
|
|
@@ -704,7 +784,9 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
704
784
|
readWebhookDeliveryConsole: false,
|
|
705
785
|
readWebhookEndpoint: false,
|
|
706
786
|
readWebhookEventCatalog: false,
|
|
787
|
+
reassignPickupStopTravellers: true,
|
|
707
788
|
rebuildJourney: true,
|
|
789
|
+
reconcileTrekWalkIn: true,
|
|
708
790
|
recordCollection: true,
|
|
709
791
|
redeliverEndpointDelivery: true,
|
|
710
792
|
redeliverWebhookDelivery: true,
|
|
@@ -730,8 +812,8 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
730
812
|
replayWebhookEndpointConsole: true,
|
|
731
813
|
requestFileUpload: true,
|
|
732
814
|
resetPlatformPartnerConsoleUser: false,
|
|
733
|
-
resetTestClock:
|
|
734
|
-
resetTestClockConsole:
|
|
815
|
+
resetTestClock: true,
|
|
816
|
+
resetTestClockConsole: true,
|
|
735
817
|
resolvePlatformCredential: false,
|
|
736
818
|
returnFloat: true,
|
|
737
819
|
revokeApiKey: true,
|
|
@@ -759,6 +841,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
|
|
|
759
841
|
testCommsProviderCredential: true,
|
|
760
842
|
testCommsProviderCredentialConsole: true,
|
|
761
843
|
testWebhookEndpoint: false,
|
|
844
|
+
testWebhookEndpointApiKey: false,
|
|
762
845
|
toggleChecklistItem: true,
|
|
763
846
|
unarchiveForm: false,
|
|
764
847
|
unassignManager: true,
|
|
@@ -817,7 +900,9 @@ var KaafilErrorCode = {
|
|
|
817
900
|
SyncTargetRefused: "SYNC_TARGET_REFUSED",
|
|
818
901
|
TenantScopeMissing: "TENANT_SCOPE_MISSING",
|
|
819
902
|
TestClockBackwards: "TEST_CLOCK_BACKWARDS",
|
|
903
|
+
TestClockTooFar: "TEST_CLOCK_TOO_FAR",
|
|
820
904
|
TestFixtureScenarioUnknown: "TEST_FIXTURE_SCENARIO_UNKNOWN",
|
|
905
|
+
TestTravellerLimit: "TEST_TRAVELLER_LIMIT",
|
|
821
906
|
TestTripLimit: "TEST_TRIP_LIMIT",
|
|
822
907
|
Unauthenticated: "UNAUTHENTICATED",
|
|
823
908
|
UploadMismatch: "UPLOAD_MISMATCH",
|
|
@@ -875,7 +960,9 @@ var ERROR_CODE_TABLE = {
|
|
|
875
960
|
SYNC_TARGET_REFUSED: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
876
961
|
TENANT_SCOPE_MISSING: { status: 500, retryability: "yes", outboxClass: "TRANSIENT" },
|
|
877
962
|
TEST_CLOCK_BACKWARDS: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
963
|
+
TEST_CLOCK_TOO_FAR: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
878
964
|
TEST_FIXTURE_SCENARIO_UNKNOWN: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
965
|
+
TEST_TRAVELLER_LIMIT: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
879
966
|
TEST_TRIP_LIMIT: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
880
967
|
UNAUTHENTICATED: { status: 401, retryability: "after-refresh", outboxClass: "FATAL" },
|
|
881
968
|
UPLOAD_MISMATCH: { status: 422, retryability: "no", outboxClass: "FATAL" },
|
|
@@ -918,6 +1005,12 @@ var KaafilNotFoundError = class _KaafilNotFoundError extends KaafilApiError {
|
|
|
918
1005
|
Object.setPrototypeOf(this, _KaafilNotFoundError.prototype);
|
|
919
1006
|
}
|
|
920
1007
|
};
|
|
1008
|
+
var PLAN_REFUSAL_REASONS = /* @__PURE__ */ new Set([
|
|
1009
|
+
"agencyFlag",
|
|
1010
|
+
"partnerTier",
|
|
1011
|
+
"tripQuota",
|
|
1012
|
+
"storageQuota"
|
|
1013
|
+
]);
|
|
921
1014
|
var KaafilEntitlementError = class _KaafilEntitlementError extends KaafilApiError {
|
|
922
1015
|
code;
|
|
923
1016
|
constructor(message, init = {}) {
|
|
@@ -927,15 +1020,27 @@ var KaafilEntitlementError = class _KaafilEntitlementError extends KaafilApiErro
|
|
|
927
1020
|
Object.setPrototypeOf(this, _KaafilEntitlementError.prototype);
|
|
928
1021
|
}
|
|
929
1022
|
/**
|
|
930
|
-
* `details.reason` — which
|
|
1023
|
+
* `details.reason` — which person (or which wait) fixes this. Read
|
|
931
1024
|
* defensively, like `.fields`/`.currentVersion` below: `details` is
|
|
932
1025
|
* untyped at the transport boundary, so a value this SDK does not
|
|
933
|
-
* recognise (an engine that ships a
|
|
934
|
-
* about it) surfaces as `undefined` rather than a wrong branch.
|
|
1026
|
+
* recognise (an engine that ships a fifth reason before this SDK knows
|
|
1027
|
+
* about it) surfaces as `undefined` rather than a wrong branch. The guard
|
|
1028
|
+
* reads the same set the type is declared from, so adding a reason is one
|
|
1029
|
+
* edit, not two that can drift — `storageQuota` shipped on the engine
|
|
1030
|
+
* before this guard knew it, and every storage refusal read as `undefined`.
|
|
935
1031
|
*/
|
|
936
1032
|
get reason() {
|
|
937
1033
|
const value = this.details?.reason;
|
|
938
|
-
return
|
|
1034
|
+
return typeof value === "string" && PLAN_REFUSAL_REASONS.has(value) ? value : void 0;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* `details.requiredTier` — the cheapest tier that would lift this refusal,
|
|
1038
|
+
* carried on `partnerTier` and `tripQuota`; `null` on `agencyFlag` (no tier
|
|
1039
|
+
* would help — the agency never asked) and absent on `storageQuota`.
|
|
1040
|
+
*/
|
|
1041
|
+
get requiredTier() {
|
|
1042
|
+
const value = this.details?.requiredTier;
|
|
1043
|
+
return value === null || typeof value === "string" ? value : void 0;
|
|
939
1044
|
}
|
|
940
1045
|
};
|
|
941
1046
|
var KaafilCapabilityUnavailableError = class _KaafilCapabilityUnavailableError extends KaafilApiError {
|
|
@@ -1630,8 +1735,9 @@ function parseRetryAfterSeconds(headerValue) {
|
|
|
1630
1735
|
const seconds = Number(headerValue);
|
|
1631
1736
|
return Number.isFinite(seconds) && seconds >= 0 ? seconds : void 0;
|
|
1632
1737
|
}
|
|
1633
|
-
function attachMeta(data, meta) {
|
|
1634
|
-
|
|
1738
|
+
function attachMeta(data, meta, facets) {
|
|
1739
|
+
const withMeta = Object.assign(data, { meta });
|
|
1740
|
+
return facets === void 0 ? withMeta : Object.assign(withMeta, { facets });
|
|
1635
1741
|
}
|
|
1636
1742
|
function describeCrossOriginSuspect(url) {
|
|
1637
1743
|
const loc = globalThis.location;
|
|
@@ -1700,7 +1806,11 @@ function sendOnce(ctx, request, idempotencyKey) {
|
|
|
1700
1806
|
...requestId !== void 0 ? { requestId } : {}
|
|
1701
1807
|
});
|
|
1702
1808
|
}
|
|
1703
|
-
return {
|
|
1809
|
+
return {
|
|
1810
|
+
data: body.data,
|
|
1811
|
+
meta: buildResponseMeta(status, requestId, body.meta),
|
|
1812
|
+
facets: body.facets
|
|
1813
|
+
};
|
|
1704
1814
|
});
|
|
1705
1815
|
}
|
|
1706
1816
|
function sendOnceBinary(ctx, request, idempotencyKey) {
|
|
@@ -1835,8 +1945,8 @@ async function runWithLadder(ctx, request, send) {
|
|
|
1835
1945
|
}
|
|
1836
1946
|
function execute(ctx, request) {
|
|
1837
1947
|
return runWithLadder(ctx, request, async (idempotencyKey) => {
|
|
1838
|
-
const { data, meta } = await sendOnce(ctx, request, idempotencyKey);
|
|
1839
|
-
return attachMeta(data, meta);
|
|
1948
|
+
const { data, meta, facets } = await sendOnce(ctx, request, idempotencyKey);
|
|
1949
|
+
return attachMeta(data, meta, facets);
|
|
1840
1950
|
});
|
|
1841
1951
|
}
|
|
1842
1952
|
function executeBinary(ctx, request) {
|
|
@@ -2367,13 +2477,14 @@ async function reconcileConflict(args) {
|
|
|
2367
2477
|
const { op, transport, snapshot, resolver } = args;
|
|
2368
2478
|
const currentVersion = readCurrentVersion(args.details);
|
|
2369
2479
|
let current;
|
|
2370
|
-
if (op.entity !== void 0 && transport.readEntity !== void 0) {
|
|
2480
|
+
if (op.entity?.id !== void 0 && transport.readEntity !== void 0) {
|
|
2481
|
+
const entityId = op.entity.id;
|
|
2371
2482
|
let read;
|
|
2372
2483
|
try {
|
|
2373
2484
|
read = await transport.readEntity({
|
|
2374
2485
|
tripRef: op.tripRef,
|
|
2375
2486
|
listName: op.entity.listName,
|
|
2376
|
-
id:
|
|
2487
|
+
id: entityId
|
|
2377
2488
|
});
|
|
2378
2489
|
} catch {
|
|
2379
2490
|
return { action: "deferred", body: void 0, currentVersion, current: void 0 };
|
|
@@ -2439,13 +2550,34 @@ function createDrainer(options) {
|
|
|
2439
2550
|
}
|
|
2440
2551
|
}
|
|
2441
2552
|
async function applySuccess(op, outcome, state) {
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
row
|
|
2447
|
-
|
|
2448
|
-
|
|
2553
|
+
let changed = false;
|
|
2554
|
+
const entity = op.entity;
|
|
2555
|
+
if (entity !== void 0) {
|
|
2556
|
+
if (entity.arrayKey !== void 0 && outcome.entities !== void 0) {
|
|
2557
|
+
for (const row of outcome.entities) {
|
|
2558
|
+
const applied = await snapshot.upsert({
|
|
2559
|
+
tripRef: op.tripRef,
|
|
2560
|
+
listName: entity.listName,
|
|
2561
|
+
row,
|
|
2562
|
+
...outcome.serverTime !== void 0 ? { syncedAt: outcome.serverTime } : {}
|
|
2563
|
+
});
|
|
2564
|
+
changed = changed || applied;
|
|
2565
|
+
}
|
|
2566
|
+
} else if (outcome.entity !== void 0) {
|
|
2567
|
+
changed = await snapshot.upsert({
|
|
2568
|
+
tripRef: op.tripRef,
|
|
2569
|
+
listName: entity.listName,
|
|
2570
|
+
row: outcome.entity,
|
|
2571
|
+
...outcome.serverTime !== void 0 ? { syncedAt: outcome.serverTime } : {}
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
if (changed && outcome.serverTime !== void 0) {
|
|
2575
|
+
events.emit("snapshot.updated", {
|
|
2576
|
+
tripRef: op.tripRef,
|
|
2577
|
+
lists: [entity.listName],
|
|
2578
|
+
serverTime: outcome.serverTime
|
|
2579
|
+
});
|
|
2580
|
+
}
|
|
2449
2581
|
}
|
|
2450
2582
|
await outbox.markDone(op.id);
|
|
2451
2583
|
state.applied += 1;
|
|
@@ -2468,7 +2600,7 @@ function createDrainer(options) {
|
|
|
2468
2600
|
});
|
|
2469
2601
|
}
|
|
2470
2602
|
async function purgeIfCached(op, outcome) {
|
|
2471
|
-
if (op.entity === void 0) {
|
|
2603
|
+
if (op.entity === void 0 || op.entity.id === void 0) {
|
|
2472
2604
|
return;
|
|
2473
2605
|
}
|
|
2474
2606
|
const held = snapshot.list(op.tripRef, op.entity.listName).some((row) => row.id === op.entity?.id);
|
|
@@ -3453,6 +3585,16 @@ function entityFromBody(body) {
|
|
|
3453
3585
|
}
|
|
3454
3586
|
return void 0;
|
|
3455
3587
|
}
|
|
3588
|
+
function entitiesFromBody(body, arrayKey) {
|
|
3589
|
+
if (typeof body !== "object" || body === null) {
|
|
3590
|
+
return void 0;
|
|
3591
|
+
}
|
|
3592
|
+
const list = body[arrayKey];
|
|
3593
|
+
if (!Array.isArray(list)) {
|
|
3594
|
+
return void 0;
|
|
3595
|
+
}
|
|
3596
|
+
return list.filter((item) => entityFromBody(item) !== void 0);
|
|
3597
|
+
}
|
|
3456
3598
|
function createHttpOfflineTransport(options) {
|
|
3457
3599
|
const { http, sync } = options;
|
|
3458
3600
|
const batchable = options.credential !== "share" || isShareBatchPushAvailable();
|
|
@@ -3470,11 +3612,14 @@ function createHttpOfflineTransport(options) {
|
|
|
3470
3612
|
...signal !== void 0 ? { signal } : {}
|
|
3471
3613
|
});
|
|
3472
3614
|
const { meta, ...data } = response;
|
|
3473
|
-
const
|
|
3615
|
+
const arrayKey = op.entity?.arrayKey;
|
|
3616
|
+
const entity = arrayKey === void 0 ? entityFromBody(data) : void 0;
|
|
3617
|
+
const entities = arrayKey !== void 0 ? entitiesFromBody(data, arrayKey) : void 0;
|
|
3474
3618
|
return {
|
|
3475
3619
|
status: meta.status,
|
|
3476
3620
|
serverTime: meta.serverTime,
|
|
3477
|
-
...entity !== void 0 ? { entity } : {}
|
|
3621
|
+
...entity !== void 0 ? { entity } : {},
|
|
3622
|
+
...entities !== void 0 ? { entities } : {}
|
|
3478
3623
|
};
|
|
3479
3624
|
} catch (error) {
|
|
3480
3625
|
return outcomeFromError(error);
|
|
@@ -3516,18 +3661,21 @@ function createHttpOfflineTransport(options) {
|
|
|
3516
3661
|
});
|
|
3517
3662
|
const serverTime = response.meta.serverTime;
|
|
3518
3663
|
const byIndex = new Map(response.verdicts.map((verdict) => [verdict.index, verdict]));
|
|
3519
|
-
return ops.map((
|
|
3664
|
+
return ops.map((op, index) => {
|
|
3520
3665
|
const verdict = byIndex.get(index);
|
|
3521
3666
|
if (verdict === void 0) {
|
|
3522
3667
|
return { status: null, transportFailureKind: "network" };
|
|
3523
3668
|
}
|
|
3524
3669
|
const envelope = verdict.body;
|
|
3525
3670
|
if (verdict.status >= 200 && verdict.status < 300) {
|
|
3526
|
-
const
|
|
3671
|
+
const arrayKey = op.entity?.arrayKey;
|
|
3672
|
+
const entity = arrayKey === void 0 ? entityFromBody(envelope?.data) : void 0;
|
|
3673
|
+
const entities = arrayKey !== void 0 ? entitiesFromBody(envelope?.data, arrayKey) : void 0;
|
|
3527
3674
|
return {
|
|
3528
3675
|
status: verdict.status,
|
|
3529
3676
|
serverTime,
|
|
3530
|
-
...entity !== void 0 ? { entity } : {}
|
|
3677
|
+
...entity !== void 0 ? { entity } : {},
|
|
3678
|
+
...entities !== void 0 ? { entities } : {}
|
|
3531
3679
|
};
|
|
3532
3680
|
}
|
|
3533
3681
|
const code = envelope?.error?.code;
|
|
@@ -3675,6 +3823,26 @@ async function fetchAgencyManagersPage(client, agencyRef, request) {
|
|
|
3675
3823
|
});
|
|
3676
3824
|
return toPaginatorPage(response);
|
|
3677
3825
|
}
|
|
3826
|
+
async function fetchAgencyTripsPage(client, agencyRef, request) {
|
|
3827
|
+
const response = await client.execute({
|
|
3828
|
+
method: "GET",
|
|
3829
|
+
operationId: OperationId.ListAgencyTrips,
|
|
3830
|
+
path: "/api/v1/agencies/{ref}/trips",
|
|
3831
|
+
pathParams: { ref: agencyRef },
|
|
3832
|
+
query: { ...request.filters, cursor: request.cursor, limit: request.limit }
|
|
3833
|
+
});
|
|
3834
|
+
return toPaginatorPage(response);
|
|
3835
|
+
}
|
|
3836
|
+
async function fetchTripManifestPage(client, agencyRef, tripRef, request) {
|
|
3837
|
+
const response = await client.execute({
|
|
3838
|
+
method: "GET",
|
|
3839
|
+
operationId: OperationId.ListTripManifest,
|
|
3840
|
+
path: "/api/v1/agencies/{ref}/trips/{tripRef}/manifest",
|
|
3841
|
+
pathParams: { ref: agencyRef, tripRef },
|
|
3842
|
+
query: { ...request.filters, cursor: request.cursor, limit: request.limit }
|
|
3843
|
+
});
|
|
3844
|
+
return toPaginatorPage(response);
|
|
3845
|
+
}
|
|
3678
3846
|
function createAgenciesResource(client) {
|
|
3679
3847
|
return {
|
|
3680
3848
|
async upsert(options) {
|
|
@@ -3713,6 +3881,70 @@ function createAgenciesResource(client) {
|
|
|
3713
3881
|
...signal !== void 0 ? { signal } : {}
|
|
3714
3882
|
});
|
|
3715
3883
|
return narrowPaged(response);
|
|
3884
|
+
},
|
|
3885
|
+
async get(options) {
|
|
3886
|
+
const { agencyRef, managerRef, signal } = options;
|
|
3887
|
+
return client.execute({
|
|
3888
|
+
method: "GET",
|
|
3889
|
+
operationId: OperationId.GetManagerAgencyProfile,
|
|
3890
|
+
path: "/api/v1/agencies/{ref}/managers/{managerRef}",
|
|
3891
|
+
pathParams: { ref: agencyRef, managerRef },
|
|
3892
|
+
...signal !== void 0 ? { signal } : {}
|
|
3893
|
+
});
|
|
3894
|
+
}
|
|
3895
|
+
},
|
|
3896
|
+
trips: {
|
|
3897
|
+
list(options) {
|
|
3898
|
+
const { agencyRef, filters, limit } = options;
|
|
3899
|
+
return createPaginator({
|
|
3900
|
+
fetchPage: (request) => fetchAgencyTripsPage(client, agencyRef, request),
|
|
3901
|
+
filters: filters ?? {},
|
|
3902
|
+
...limit !== void 0 ? { limit } : {}
|
|
3903
|
+
});
|
|
3904
|
+
},
|
|
3905
|
+
async listPage(options) {
|
|
3906
|
+
const { agencyRef, cursor, limit, signal, ...filters } = options;
|
|
3907
|
+
const response = await client.execute({
|
|
3908
|
+
method: "GET",
|
|
3909
|
+
operationId: OperationId.ListAgencyTrips,
|
|
3910
|
+
path: "/api/v1/agencies/{ref}/trips",
|
|
3911
|
+
pathParams: { ref: agencyRef },
|
|
3912
|
+
query: { ...filters, cursor, limit },
|
|
3913
|
+
...signal !== void 0 ? { signal } : {}
|
|
3914
|
+
});
|
|
3915
|
+
return narrowPaged(response);
|
|
3916
|
+
},
|
|
3917
|
+
async get(options) {
|
|
3918
|
+
const { agencyRef, tripRef, signal } = options;
|
|
3919
|
+
return client.execute({
|
|
3920
|
+
method: "GET",
|
|
3921
|
+
operationId: OperationId.GetAgencyTrip,
|
|
3922
|
+
path: "/api/v1/agencies/{ref}/trips/{tripRef}",
|
|
3923
|
+
pathParams: { ref: agencyRef, tripRef },
|
|
3924
|
+
...signal !== void 0 ? { signal } : {}
|
|
3925
|
+
});
|
|
3926
|
+
},
|
|
3927
|
+
manifest: {
|
|
3928
|
+
list(options) {
|
|
3929
|
+
const { agencyRef, tripRef, filters, limit } = options;
|
|
3930
|
+
return createPaginator({
|
|
3931
|
+
fetchPage: (request) => fetchTripManifestPage(client, agencyRef, tripRef, request),
|
|
3932
|
+
filters: filters ?? {},
|
|
3933
|
+
...limit !== void 0 ? { limit } : {}
|
|
3934
|
+
});
|
|
3935
|
+
},
|
|
3936
|
+
async listPage(options) {
|
|
3937
|
+
const { agencyRef, tripRef, cursor, limit, signal, ...filters } = options;
|
|
3938
|
+
const response = await client.execute({
|
|
3939
|
+
method: "GET",
|
|
3940
|
+
operationId: OperationId.ListTripManifest,
|
|
3941
|
+
path: "/api/v1/agencies/{ref}/trips/{tripRef}/manifest",
|
|
3942
|
+
pathParams: { ref: agencyRef, tripRef },
|
|
3943
|
+
query: { ...filters, cursor, limit },
|
|
3944
|
+
...signal !== void 0 ? { signal } : {}
|
|
3945
|
+
});
|
|
3946
|
+
return narrowPaged(response);
|
|
3947
|
+
}
|
|
3716
3948
|
}
|
|
3717
3949
|
},
|
|
3718
3950
|
settings: {
|
|
@@ -3742,6 +3974,21 @@ function createAgenciesResource(client) {
|
|
|
3742
3974
|
};
|
|
3743
3975
|
}
|
|
3744
3976
|
|
|
3977
|
+
// src/resources/agency-admin-me.ts
|
|
3978
|
+
function createAgencyAdminMeResource(client) {
|
|
3979
|
+
return {
|
|
3980
|
+
async read(options = {}) {
|
|
3981
|
+
const { signal } = options;
|
|
3982
|
+
return client.execute({
|
|
3983
|
+
method: "GET",
|
|
3984
|
+
operationId: OperationId.GetAgencyAdminMe,
|
|
3985
|
+
path: "/api/v1/agency-admin/me",
|
|
3986
|
+
...signal !== void 0 ? { signal } : {}
|
|
3987
|
+
});
|
|
3988
|
+
}
|
|
3989
|
+
};
|
|
3990
|
+
}
|
|
3991
|
+
|
|
3745
3992
|
// src/resources/bookings.ts
|
|
3746
3993
|
function createBookingsResource(client) {
|
|
3747
3994
|
return {
|
|
@@ -3824,6 +4071,16 @@ function createChecklistsResource(client) {
|
|
|
3824
4071
|
});
|
|
3825
4072
|
},
|
|
3826
4073
|
items: {
|
|
4074
|
+
async get(options) {
|
|
4075
|
+
const { tripRef, itemId, signal } = options;
|
|
4076
|
+
return client.execute({
|
|
4077
|
+
method: "GET",
|
|
4078
|
+
operationId: OperationId.ReadChecklistItem,
|
|
4079
|
+
path: "/api/v1/trips/{ref}/checklist/items/{itemId}",
|
|
4080
|
+
pathParams: { ref: tripRef, itemId },
|
|
4081
|
+
...signal !== void 0 ? { signal } : {}
|
|
4082
|
+
});
|
|
4083
|
+
},
|
|
3827
4084
|
async add(options) {
|
|
3828
4085
|
const { tripRef, idempotencyKey, signal, ...body } = options;
|
|
3829
4086
|
return client.execute({
|
|
@@ -4043,12 +4300,13 @@ function createCollectionsResource(client) {
|
|
|
4043
4300
|
});
|
|
4044
4301
|
},
|
|
4045
4302
|
async eligible(options) {
|
|
4046
|
-
const { tripRef, signal } = options;
|
|
4303
|
+
const { tripRef, status, signal } = options;
|
|
4047
4304
|
return client.execute({
|
|
4048
4305
|
method: "GET",
|
|
4049
4306
|
operationId: OperationId.ListEligibleCollections,
|
|
4050
4307
|
path: "/api/v1/trips/{ref}/collections/eligible",
|
|
4051
4308
|
pathParams: { ref: tripRef },
|
|
4309
|
+
query: { status },
|
|
4052
4310
|
...signal !== void 0 ? { signal } : {}
|
|
4053
4311
|
});
|
|
4054
4312
|
},
|
|
@@ -4263,6 +4521,26 @@ function createFilesResource(client) {
|
|
|
4263
4521
|
pathParams: { id: fileId },
|
|
4264
4522
|
...signal !== void 0 ? { signal } : {}
|
|
4265
4523
|
});
|
|
4524
|
+
},
|
|
4525
|
+
async list(options) {
|
|
4526
|
+
const { signal, ...query } = options;
|
|
4527
|
+
return client.execute({
|
|
4528
|
+
method: "GET",
|
|
4529
|
+
operationId: OperationId.ListFiles,
|
|
4530
|
+
path: "/api/v1/files",
|
|
4531
|
+
query,
|
|
4532
|
+
...signal !== void 0 ? { signal } : {}
|
|
4533
|
+
});
|
|
4534
|
+
},
|
|
4535
|
+
async managerView(options) {
|
|
4536
|
+
const { fileId, signal } = options;
|
|
4537
|
+
return client.execute({
|
|
4538
|
+
method: "GET",
|
|
4539
|
+
operationId: OperationId.ReadManagerFileView,
|
|
4540
|
+
path: "/api/v1/files/{id}/manager-view",
|
|
4541
|
+
pathParams: { id: fileId },
|
|
4542
|
+
...signal !== void 0 ? { signal } : {}
|
|
4543
|
+
});
|
|
4266
4544
|
}
|
|
4267
4545
|
};
|
|
4268
4546
|
}
|
|
@@ -4282,12 +4560,13 @@ function createFloatResource(client) {
|
|
|
4282
4560
|
});
|
|
4283
4561
|
},
|
|
4284
4562
|
async readLedger(options) {
|
|
4285
|
-
const { tripRef, managerId, signal } = options;
|
|
4563
|
+
const { tripRef, managerId, since, signal } = options;
|
|
4286
4564
|
return client.execute({
|
|
4287
4565
|
method: "GET",
|
|
4288
4566
|
operationId: OperationId.ReadFloatLedger,
|
|
4289
4567
|
path: "/api/v1/trips/{ref}/float/{managerId}/ledger",
|
|
4290
4568
|
pathParams: { ref: tripRef, managerId },
|
|
4569
|
+
query: { since },
|
|
4291
4570
|
...signal !== void 0 ? { signal } : {}
|
|
4292
4571
|
});
|
|
4293
4572
|
},
|
|
@@ -4662,6 +4941,18 @@ function createFormsResource(client) {
|
|
|
4662
4941
|
...signal !== void 0 ? { signal } : {}
|
|
4663
4942
|
});
|
|
4664
4943
|
}
|
|
4944
|
+
},
|
|
4945
|
+
travellerResponses: {
|
|
4946
|
+
async list(options) {
|
|
4947
|
+
const { tripRef, travellerRef, signal } = options;
|
|
4948
|
+
return client.execute({
|
|
4949
|
+
method: "GET",
|
|
4950
|
+
operationId: OperationId.ListTravellerFormResponses,
|
|
4951
|
+
path: "/api/v1/trips/{ref}/travellers/{travellerRef}/forms/responses",
|
|
4952
|
+
pathParams: { ref: tripRef, travellerRef },
|
|
4953
|
+
...signal !== void 0 ? { signal } : {}
|
|
4954
|
+
});
|
|
4955
|
+
}
|
|
4665
4956
|
}
|
|
4666
4957
|
}
|
|
4667
4958
|
};
|
|
@@ -4861,12 +5152,13 @@ function createJourneyResource(client) {
|
|
|
4861
5152
|
});
|
|
4862
5153
|
},
|
|
4863
5154
|
async patch(options) {
|
|
4864
|
-
const { agencyRef, key, version, idempotencyKey, signal, ...body } = options;
|
|
5155
|
+
const { agencyRef, key, tripMode, version, idempotencyKey, signal, ...body } = options;
|
|
4865
5156
|
return client.execute({
|
|
4866
5157
|
method: "PATCH",
|
|
4867
5158
|
operationId: OperationId.PatchJourneyTrigger,
|
|
4868
5159
|
path: "/api/v1/agencies/{ref}/journey-triggers/{key}",
|
|
4869
5160
|
pathParams: { ref: agencyRef, key },
|
|
5161
|
+
...tripMode !== void 0 ? { query: { tripMode } } : {},
|
|
4870
5162
|
body,
|
|
4871
5163
|
headers: { "If-Match": String(version) },
|
|
4872
5164
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
@@ -4878,6 +5170,74 @@ function createJourneyResource(client) {
|
|
|
4878
5170
|
return resource;
|
|
4879
5171
|
}
|
|
4880
5172
|
|
|
5173
|
+
// src/resources/manager-expenses.ts
|
|
5174
|
+
function createManagerExpensesResource(client) {
|
|
5175
|
+
return {
|
|
5176
|
+
async list(options = {}) {
|
|
5177
|
+
const { tripRef, since, signal, ...filters } = options;
|
|
5178
|
+
return client.execute({
|
|
5179
|
+
method: "GET",
|
|
5180
|
+
operationId: OperationId.ListManagerExpenses,
|
|
5181
|
+
path: "/api/v1/manager/expenses",
|
|
5182
|
+
query: { ...filters, ...tripRef !== void 0 ? { tripRef } : {}, since },
|
|
5183
|
+
...signal !== void 0 ? { signal } : {}
|
|
5184
|
+
});
|
|
5185
|
+
},
|
|
5186
|
+
async read(options) {
|
|
5187
|
+
const { expenseId, tripRef, signal } = options;
|
|
5188
|
+
return client.execute({
|
|
5189
|
+
method: "GET",
|
|
5190
|
+
operationId: OperationId.ReadManagerExpense,
|
|
5191
|
+
path: "/api/v1/manager/expenses/{id}",
|
|
5192
|
+
pathParams: { id: expenseId },
|
|
5193
|
+
...tripRef !== void 0 ? { query: { tripRef } } : {},
|
|
5194
|
+
...signal !== void 0 ? { signal } : {}
|
|
5195
|
+
});
|
|
5196
|
+
},
|
|
5197
|
+
async logMeta(options = {}) {
|
|
5198
|
+
const { tripRef, signal } = options;
|
|
5199
|
+
return client.execute({
|
|
5200
|
+
method: "GET",
|
|
5201
|
+
operationId: OperationId.ReadManagerExpenseLogMeta,
|
|
5202
|
+
path: "/api/v1/manager/expenses/log/meta",
|
|
5203
|
+
...tripRef !== void 0 ? { query: { tripRef } } : {},
|
|
5204
|
+
...signal !== void 0 ? { signal } : {}
|
|
5205
|
+
});
|
|
5206
|
+
}
|
|
5207
|
+
};
|
|
5208
|
+
}
|
|
5209
|
+
|
|
5210
|
+
// src/resources/manager-me.ts
|
|
5211
|
+
function createManagerMeResource(client) {
|
|
5212
|
+
return {
|
|
5213
|
+
async listTrips(options = {}) {
|
|
5214
|
+
const { signal } = options;
|
|
5215
|
+
return client.execute({
|
|
5216
|
+
method: "GET",
|
|
5217
|
+
operationId: OperationId.ListOwnManagerTrips,
|
|
5218
|
+
path: "/api/v1/manager/me/trips",
|
|
5219
|
+
...signal !== void 0 ? { signal } : {}
|
|
5220
|
+
});
|
|
5221
|
+
}
|
|
5222
|
+
};
|
|
5223
|
+
}
|
|
5224
|
+
|
|
5225
|
+
// src/resources/manager-today.ts
|
|
5226
|
+
function createManagerTodayResource(client) {
|
|
5227
|
+
return {
|
|
5228
|
+
async read(options) {
|
|
5229
|
+
const { tripRef, signal } = options;
|
|
5230
|
+
return client.execute({
|
|
5231
|
+
method: "GET",
|
|
5232
|
+
operationId: OperationId.ReadManagerToday,
|
|
5233
|
+
path: "/api/v1/trips/{ref}/manager/today",
|
|
5234
|
+
pathParams: { ref: tripRef },
|
|
5235
|
+
...signal !== void 0 ? { signal } : {}
|
|
5236
|
+
});
|
|
5237
|
+
}
|
|
5238
|
+
};
|
|
5239
|
+
}
|
|
5240
|
+
|
|
4881
5241
|
// src/resources/notifications.ts
|
|
4882
5242
|
function createNotificationsResource(client) {
|
|
4883
5243
|
return {
|
|
@@ -4902,6 +5262,26 @@ function createNotificationsResource(client) {
|
|
|
4902
5262
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4903
5263
|
...signal !== void 0 ? { signal } : {}
|
|
4904
5264
|
});
|
|
5265
|
+
},
|
|
5266
|
+
async getInbox(options = {}) {
|
|
5267
|
+
const { segment, signal } = options;
|
|
5268
|
+
return client.execute({
|
|
5269
|
+
method: "GET",
|
|
5270
|
+
operationId: OperationId.GetManagerInbox,
|
|
5271
|
+
path: "/api/v1/managers/me/inbox",
|
|
5272
|
+
...segment !== void 0 ? { query: { segment } } : {},
|
|
5273
|
+
...signal !== void 0 ? { signal } : {}
|
|
5274
|
+
});
|
|
5275
|
+
},
|
|
5276
|
+
async getDetail(options) {
|
|
5277
|
+
const { id, signal } = options;
|
|
5278
|
+
return client.execute({
|
|
5279
|
+
method: "GET",
|
|
5280
|
+
operationId: OperationId.GetNotificationDetail,
|
|
5281
|
+
path: "/api/v1/notifications/{id}",
|
|
5282
|
+
pathParams: { id },
|
|
5283
|
+
...signal !== void 0 ? { signal } : {}
|
|
5284
|
+
});
|
|
4905
5285
|
}
|
|
4906
5286
|
};
|
|
4907
5287
|
}
|
|
@@ -4988,6 +5368,18 @@ function createPickupsResource(client) {
|
|
|
4988
5368
|
...signal !== void 0 ? { signal } : {}
|
|
4989
5369
|
});
|
|
4990
5370
|
},
|
|
5371
|
+
async reassign(options) {
|
|
5372
|
+
const { tripRef, pointId, idempotencyKey, signal, ...body } = options;
|
|
5373
|
+
return client.execute({
|
|
5374
|
+
method: "POST",
|
|
5375
|
+
operationId: OperationId.ReassignPickupStopTravellers,
|
|
5376
|
+
path: "/api/v1/trips/{ref}/pickups/{pointId}/reassign",
|
|
5377
|
+
pathParams: { ref: tripRef, pointId },
|
|
5378
|
+
body,
|
|
5379
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5380
|
+
...signal !== void 0 ? { signal } : {}
|
|
5381
|
+
});
|
|
5382
|
+
},
|
|
4991
5383
|
async board(options) {
|
|
4992
5384
|
const { tripRef, pointId, idempotencyKey, signal, ...body } = options;
|
|
4993
5385
|
return client.execute({
|
|
@@ -5146,6 +5538,16 @@ function createRoomingResource(client) {
|
|
|
5146
5538
|
}
|
|
5147
5539
|
},
|
|
5148
5540
|
rooms: {
|
|
5541
|
+
async get(options) {
|
|
5542
|
+
const { tripRef, roomId, signal } = options;
|
|
5543
|
+
return client.execute({
|
|
5544
|
+
method: "GET",
|
|
5545
|
+
operationId: OperationId.ReadRoomingRoom,
|
|
5546
|
+
path: "/api/v1/trips/{ref}/rooming/rooms/{roomId}",
|
|
5547
|
+
pathParams: { ref: tripRef, roomId },
|
|
5548
|
+
...signal !== void 0 ? { signal } : {}
|
|
5549
|
+
});
|
|
5550
|
+
},
|
|
5149
5551
|
async create(options) {
|
|
5150
5552
|
const { tripRef, idempotencyKey, signal, ...body } = options;
|
|
5151
5553
|
return client.execute({
|
|
@@ -5364,6 +5766,86 @@ function createShareResource(client) {
|
|
|
5364
5766
|
};
|
|
5365
5767
|
}
|
|
5366
5768
|
|
|
5769
|
+
// src/resources/share-tokens.ts
|
|
5770
|
+
function createShareTokensResource(client) {
|
|
5771
|
+
return {
|
|
5772
|
+
async list(options) {
|
|
5773
|
+
const { tripRef, travellerRef, includeRevoked, signal } = options;
|
|
5774
|
+
return client.execute({
|
|
5775
|
+
method: "GET",
|
|
5776
|
+
operationId: OperationId.ListShareTokens,
|
|
5777
|
+
path: "/api/v1/share-tokens",
|
|
5778
|
+
query: { tripRef, travellerRef, includeRevoked },
|
|
5779
|
+
...signal !== void 0 ? { signal } : {}
|
|
5780
|
+
});
|
|
5781
|
+
},
|
|
5782
|
+
async create(options) {
|
|
5783
|
+
const { idempotencyKey, signal, expiresAt, ...rest } = options;
|
|
5784
|
+
const body = {
|
|
5785
|
+
...rest,
|
|
5786
|
+
...expiresAt !== void 0 ? { expiresAt: normalizeDateTimeInput(expiresAt, "expiresAt") } : {}
|
|
5787
|
+
};
|
|
5788
|
+
return client.execute({
|
|
5789
|
+
method: "POST",
|
|
5790
|
+
operationId: OperationId.MintShareToken,
|
|
5791
|
+
path: "/api/v1/share-tokens",
|
|
5792
|
+
body,
|
|
5793
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5794
|
+
...signal !== void 0 ? { signal } : {}
|
|
5795
|
+
});
|
|
5796
|
+
},
|
|
5797
|
+
async read(options) {
|
|
5798
|
+
const { id, signal } = options;
|
|
5799
|
+
return client.execute({
|
|
5800
|
+
method: "GET",
|
|
5801
|
+
operationId: OperationId.ReadShareToken,
|
|
5802
|
+
path: "/api/v1/share-tokens/{id}",
|
|
5803
|
+
pathParams: { id },
|
|
5804
|
+
...signal !== void 0 ? { signal } : {}
|
|
5805
|
+
});
|
|
5806
|
+
},
|
|
5807
|
+
async revoke(options) {
|
|
5808
|
+
const { id, signal } = options;
|
|
5809
|
+
return client.execute({
|
|
5810
|
+
method: "DELETE",
|
|
5811
|
+
operationId: OperationId.RevokeShareToken,
|
|
5812
|
+
path: "/api/v1/share-tokens/{id}",
|
|
5813
|
+
pathParams: { id },
|
|
5814
|
+
...signal !== void 0 ? { signal } : {}
|
|
5815
|
+
});
|
|
5816
|
+
},
|
|
5817
|
+
async patch(options) {
|
|
5818
|
+
const { id, version, signal, expiresAt, ...rest } = options;
|
|
5819
|
+
const body = {
|
|
5820
|
+
...rest,
|
|
5821
|
+
...expiresAt !== void 0 ? { expiresAt: normalizeDateTimeInput(expiresAt, "expiresAt") } : {}
|
|
5822
|
+
};
|
|
5823
|
+
return client.execute({
|
|
5824
|
+
method: "PATCH",
|
|
5825
|
+
operationId: OperationId.PatchShareToken,
|
|
5826
|
+
path: "/api/v1/share-tokens/{id}",
|
|
5827
|
+
pathParams: { id },
|
|
5828
|
+
body,
|
|
5829
|
+
headers: { "If-Match": String(version) },
|
|
5830
|
+
...signal !== void 0 ? { signal } : {}
|
|
5831
|
+
});
|
|
5832
|
+
},
|
|
5833
|
+
async regenerate(options) {
|
|
5834
|
+
const { id, idempotencyKey, signal, ...rest } = options;
|
|
5835
|
+
const body = { ...rest };
|
|
5836
|
+
return client.execute({
|
|
5837
|
+
method: "POST",
|
|
5838
|
+
operationId: OperationId.RegenerateShareToken,
|
|
5839
|
+
path: "/api/v1/share-tokens/{id}/regenerate",
|
|
5840
|
+
pathParams: { id },
|
|
5841
|
+
body,
|
|
5842
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5843
|
+
...signal !== void 0 ? { signal } : {}
|
|
5844
|
+
});
|
|
5845
|
+
}
|
|
5846
|
+
};
|
|
5847
|
+
}
|
|
5848
|
+
|
|
5367
5849
|
// src/resources/travellers.ts
|
|
5368
5850
|
async function fetchAgencyDirectoryPage(client, agencyRef, request) {
|
|
5369
5851
|
const response = await client.execute({
|
|
@@ -5408,6 +5890,28 @@ function createTravellersResource(client) {
|
|
|
5408
5890
|
...signal !== void 0 ? { signal } : {}
|
|
5409
5891
|
});
|
|
5410
5892
|
},
|
|
5893
|
+
async getDetail(options) {
|
|
5894
|
+
const { tripRef, travellerRef, signal } = options;
|
|
5895
|
+
return client.execute({
|
|
5896
|
+
method: "GET",
|
|
5897
|
+
operationId: OperationId.GetTravellerDetail,
|
|
5898
|
+
path: "/api/v1/trips/{ref}/travellers/{travellerRef}",
|
|
5899
|
+
pathParams: { ref: tripRef, travellerRef },
|
|
5900
|
+
...signal !== void 0 ? { signal } : {}
|
|
5901
|
+
});
|
|
5902
|
+
},
|
|
5903
|
+
async addNote(options) {
|
|
5904
|
+
const { tripRef, travellerRef, idempotencyKey, signal, ...body } = options;
|
|
5905
|
+
return client.execute({
|
|
5906
|
+
method: "POST",
|
|
5907
|
+
operationId: OperationId.AddTravellerNote,
|
|
5908
|
+
path: "/api/v1/trips/{ref}/travellers/{travellerRef}/notes",
|
|
5909
|
+
pathParams: { ref: tripRef, travellerRef },
|
|
5910
|
+
body,
|
|
5911
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5912
|
+
...signal !== void 0 ? { signal } : {}
|
|
5913
|
+
});
|
|
5914
|
+
},
|
|
5411
5915
|
listForAgency(options) {
|
|
5412
5916
|
const { agencyRef, filters, limit } = options;
|
|
5413
5917
|
return createPaginator({
|
|
@@ -5439,6 +5943,16 @@ function createTravellersResource(client) {
|
|
|
5439
5943
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5440
5944
|
...signal !== void 0 ? { signal } : {}
|
|
5441
5945
|
});
|
|
5946
|
+
},
|
|
5947
|
+
async getAgencyProfile(options) {
|
|
5948
|
+
const { agencyRef, travellerRef, signal } = options;
|
|
5949
|
+
return client.execute({
|
|
5950
|
+
method: "GET",
|
|
5951
|
+
operationId: OperationId.GetTravellerAgencyProfile,
|
|
5952
|
+
path: "/api/v1/agencies/{ref}/travellers/{travellerRef}",
|
|
5953
|
+
pathParams: { ref: agencyRef, travellerRef },
|
|
5954
|
+
...signal !== void 0 ? { signal } : {}
|
|
5955
|
+
});
|
|
5442
5956
|
}
|
|
5443
5957
|
};
|
|
5444
5958
|
}
|
|
@@ -5526,6 +6040,18 @@ function createTreksResource(client) {
|
|
|
5526
6040
|
...signal !== void 0 ? { signal } : {}
|
|
5527
6041
|
});
|
|
5528
6042
|
return narrowPaged(response);
|
|
6043
|
+
},
|
|
6044
|
+
async reconcile(options) {
|
|
6045
|
+
const { trekRef, walkInId, idempotencyKey, signal, ...body } = options;
|
|
6046
|
+
return client.execute({
|
|
6047
|
+
method: "POST",
|
|
6048
|
+
operationId: OperationId.ReconcileTrekWalkIn,
|
|
6049
|
+
path: "/api/v1/treks/{trekRef}/walk-ins/{walkInId}/reconcile",
|
|
6050
|
+
pathParams: { trekRef, walkInId },
|
|
6051
|
+
body,
|
|
6052
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
6053
|
+
...signal !== void 0 ? { signal } : {}
|
|
6054
|
+
});
|
|
5529
6055
|
}
|
|
5530
6056
|
}
|
|
5531
6057
|
};
|
|
@@ -5689,7 +6215,7 @@ function createTripsResource(client) {
|
|
|
5689
6215
|
const { tripRef, idempotencyKey, signal, sourceUpdatedAt, ...rest } = options;
|
|
5690
6216
|
const body = {
|
|
5691
6217
|
...rest,
|
|
5692
|
-
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt")
|
|
6218
|
+
...sourceUpdatedAt === void 0 ? {} : { sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt") }
|
|
5693
6219
|
};
|
|
5694
6220
|
return client.execute({
|
|
5695
6221
|
method: "POST",
|
|
@@ -5836,6 +6362,18 @@ function createVendorsResource(client) {
|
|
|
5836
6362
|
...signal !== void 0 ? { signal } : {}
|
|
5837
6363
|
});
|
|
5838
6364
|
},
|
|
6365
|
+
async create(options) {
|
|
6366
|
+
const { agencyRef, idempotencyKey, signal, ...body } = options;
|
|
6367
|
+
return client.execute({
|
|
6368
|
+
method: "POST",
|
|
6369
|
+
operationId: OperationId.CreateVendor,
|
|
6370
|
+
path: "/api/v1/agencies/{ref}/vendors",
|
|
6371
|
+
pathParams: { ref: agencyRef },
|
|
6372
|
+
body,
|
|
6373
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
6374
|
+
...signal !== void 0 ? { signal } : {}
|
|
6375
|
+
});
|
|
6376
|
+
},
|
|
5839
6377
|
async upsert(options) {
|
|
5840
6378
|
const { agencyRef, externalVendorId, idempotencyKey, signal, ...body } = options;
|
|
5841
6379
|
return client.execute({
|
|
@@ -5950,7 +6488,8 @@ var FileContentType = {
|
|
|
5950
6488
|
var FilePurpose = {
|
|
5951
6489
|
ExpenseReceipt: "expense_receipt",
|
|
5952
6490
|
FormAttachment: "form_attachment",
|
|
5953
|
-
BookingVoucher: "booking_voucher"
|
|
6491
|
+
BookingVoucher: "booking_voucher",
|
|
6492
|
+
TripDocument: "trip_document"
|
|
5954
6493
|
};
|
|
5955
6494
|
var FloatDirection = {
|
|
5956
6495
|
In: "IN",
|
|
@@ -6557,6 +7096,15 @@ var KaafilClient = class {
|
|
|
6557
7096
|
get agencies() {
|
|
6558
7097
|
return this.#requireState().agencies;
|
|
6559
7098
|
}
|
|
7099
|
+
/**
|
|
7100
|
+
* Share-link lifecycle — mint, list, read, revoke, patch, regenerate.
|
|
7101
|
+
*
|
|
7102
|
+
* `agencyAdmin` only among the browser session kinds; a manager session
|
|
7103
|
+
* reaches `UnsatisfiableSchemeError` on every method, by design.
|
|
7104
|
+
*/
|
|
7105
|
+
get shareTokens() {
|
|
7106
|
+
return this.#requireState().shareTokens;
|
|
7107
|
+
}
|
|
6560
7108
|
get vendors() {
|
|
6561
7109
|
return this.#requireState().vendors;
|
|
6562
7110
|
}
|
|
@@ -6584,6 +7132,18 @@ var KaafilClient = class {
|
|
|
6584
7132
|
get itinerary() {
|
|
6585
7133
|
return this.#requireState().itinerary;
|
|
6586
7134
|
}
|
|
7135
|
+
get managerToday() {
|
|
7136
|
+
return this.#requireState().managerToday;
|
|
7137
|
+
}
|
|
7138
|
+
get managerMe() {
|
|
7139
|
+
return this.#requireState().managerMe;
|
|
7140
|
+
}
|
|
7141
|
+
get agencyAdminMe() {
|
|
7142
|
+
return this.#requireState().agencyAdminMe;
|
|
7143
|
+
}
|
|
7144
|
+
get managerExpenses() {
|
|
7145
|
+
return this.#requireState().managerExpenses;
|
|
7146
|
+
}
|
|
6587
7147
|
get rooming() {
|
|
6588
7148
|
return this.#requireState().rooming;
|
|
6589
7149
|
}
|
|
@@ -6727,7 +7287,23 @@ var KaafilClient = class {
|
|
|
6727
7287
|
...agenciesResource,
|
|
6728
7288
|
managers: {
|
|
6729
7289
|
list: (options) => agenciesResource.managers.list({ ...options, agencyRef }),
|
|
6730
|
-
listPage: (options) => agenciesResource.managers.listPage({ ...options, agencyRef })
|
|
7290
|
+
listPage: (options) => agenciesResource.managers.listPage({ ...options, agencyRef }),
|
|
7291
|
+
get: (options) => agenciesResource.managers.get({ ...options, agencyRef })
|
|
7292
|
+
},
|
|
7293
|
+
trips: {
|
|
7294
|
+
list: (options) => agenciesResource.trips.list({ ...options, agencyRef }),
|
|
7295
|
+
listPage: (options) => agenciesResource.trips.listPage({ ...options, agencyRef }),
|
|
7296
|
+
get: (options) => agenciesResource.trips.get({ ...options, agencyRef }),
|
|
7297
|
+
manifest: {
|
|
7298
|
+
list: (options) => agenciesResource.trips.manifest.list({
|
|
7299
|
+
...options,
|
|
7300
|
+
agencyRef
|
|
7301
|
+
}),
|
|
7302
|
+
listPage: (options) => agenciesResource.trips.manifest.listPage({
|
|
7303
|
+
...options,
|
|
7304
|
+
agencyRef
|
|
7305
|
+
})
|
|
7306
|
+
}
|
|
6731
7307
|
},
|
|
6732
7308
|
settings: {
|
|
6733
7309
|
get: (options) => agenciesResource.settings.get({ ...options, agencyRef }),
|
|
@@ -6736,6 +7312,7 @@ var KaafilClient = class {
|
|
|
6736
7312
|
};
|
|
6737
7313
|
const boundVendors = {
|
|
6738
7314
|
...vendorsResource,
|
|
7315
|
+
create: (options) => vendorsResource.create({ ...options, agencyRef }),
|
|
6739
7316
|
upsert: (options) => vendorsResource.upsert({ ...options, agencyRef }),
|
|
6740
7317
|
remove: (options) => vendorsResource.remove({ ...options, agencyRef })
|
|
6741
7318
|
};
|
|
@@ -6778,7 +7355,8 @@ var KaafilClient = class {
|
|
|
6778
7355
|
...travellersResource,
|
|
6779
7356
|
listForAgency: (options) => travellersResource.listForAgency({ ...options, agencyRef }),
|
|
6780
7357
|
listForAgencyPage: (options) => travellersResource.listForAgencyPage({ ...options, agencyRef }),
|
|
6781
|
-
create: (options) => travellersResource.create({ ...options, agencyRef })
|
|
7358
|
+
create: (options) => travellersResource.create({ ...options, agencyRef }),
|
|
7359
|
+
getAgencyProfile: (options) => travellersResource.getAgencyProfile({ ...options, agencyRef })
|
|
6782
7360
|
};
|
|
6783
7361
|
this.#state = {
|
|
6784
7362
|
http,
|
|
@@ -6791,8 +7369,13 @@ var KaafilClient = class {
|
|
|
6791
7369
|
feedbackNps: boundFeedbackNps,
|
|
6792
7370
|
forms: boundForms,
|
|
6793
7371
|
share: createShareResource(http),
|
|
7372
|
+
shareTokens: createShareTokensResource(http),
|
|
6794
7373
|
notifications: createNotificationsResource(http),
|
|
6795
7374
|
itinerary: createItineraryResource(http),
|
|
7375
|
+
managerToday: createManagerTodayResource(http),
|
|
7376
|
+
managerMe: createManagerMeResource(http),
|
|
7377
|
+
agencyAdminMe: createAgencyAdminMeResource(http),
|
|
7378
|
+
managerExpenses: createManagerExpensesResource(http),
|
|
6796
7379
|
rooming: createRoomingResource(http),
|
|
6797
7380
|
seating: createSeatingResource(http),
|
|
6798
7381
|
pickups: createPickupsResource(http),
|