kaafil-js 0.1.0-beta.6 → 0.1.0
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 +659 -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 +659 -60
- package/dist/client-entry.js.map +1 -1
- package/dist/index.cjs +413 -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 +413 -43
- package/dist/index.js.map +1 -1
- package/dist/{vocabulary-CC-Pfd6I.d.cts → vocabulary-uZXjYsxn.d.cts} +8599 -3665
- package/dist/{vocabulary-CC-Pfd6I.d.ts → vocabulary-uZXjYsxn.d.ts} +8599 -3665
- package/package.json +3 -2
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 {
|
|
@@ -1373,6 +1478,10 @@ var CredentialResolver = class {
|
|
|
1373
1478
|
};
|
|
1374
1479
|
|
|
1375
1480
|
// src/config.ts
|
|
1481
|
+
var Environment = {
|
|
1482
|
+
Live: "live",
|
|
1483
|
+
Test: "test"
|
|
1484
|
+
};
|
|
1376
1485
|
var ENVIRONMENT_BASE_URLS = {
|
|
1377
1486
|
live: "https://engine.kaafil.in",
|
|
1378
1487
|
test: "https://engine.kaafil.in"
|
|
@@ -1383,6 +1492,16 @@ var KaafilConfigError = class extends Error {
|
|
|
1383
1492
|
this.name = "KaafilConfigError";
|
|
1384
1493
|
}
|
|
1385
1494
|
};
|
|
1495
|
+
function describeConfigValue(value) {
|
|
1496
|
+
return typeof value === "string" ? `"${value}"` : String(value);
|
|
1497
|
+
}
|
|
1498
|
+
function assertValidEnvironment(environment) {
|
|
1499
|
+
if (environment !== Environment.Live && environment !== Environment.Test) {
|
|
1500
|
+
throw new KaafilConfigError(
|
|
1501
|
+
`"environment" is required and must be "${Environment.Live}" or "${Environment.Test}"; received ${describeConfigValue(environment)}.`
|
|
1502
|
+
);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1386
1505
|
function isValidAbsoluteUrl(value) {
|
|
1387
1506
|
try {
|
|
1388
1507
|
const url = new URL(value);
|
|
@@ -1392,6 +1511,7 @@ function isValidAbsoluteUrl(value) {
|
|
|
1392
1511
|
}
|
|
1393
1512
|
}
|
|
1394
1513
|
function resolveBaseUrl(environment, baseUrl) {
|
|
1514
|
+
assertValidEnvironment(environment);
|
|
1395
1515
|
if (baseUrl === void 0) {
|
|
1396
1516
|
return ENVIRONMENT_BASE_URLS[environment];
|
|
1397
1517
|
}
|
|
@@ -1630,8 +1750,9 @@ function parseRetryAfterSeconds(headerValue) {
|
|
|
1630
1750
|
const seconds = Number(headerValue);
|
|
1631
1751
|
return Number.isFinite(seconds) && seconds >= 0 ? seconds : void 0;
|
|
1632
1752
|
}
|
|
1633
|
-
function attachMeta(data, meta) {
|
|
1634
|
-
|
|
1753
|
+
function attachMeta(data, meta, facets) {
|
|
1754
|
+
const withMeta = Object.assign(data, { meta });
|
|
1755
|
+
return facets === void 0 ? withMeta : Object.assign(withMeta, { facets });
|
|
1635
1756
|
}
|
|
1636
1757
|
function describeCrossOriginSuspect(url) {
|
|
1637
1758
|
const loc = globalThis.location;
|
|
@@ -1700,7 +1821,11 @@ function sendOnce(ctx, request, idempotencyKey) {
|
|
|
1700
1821
|
...requestId !== void 0 ? { requestId } : {}
|
|
1701
1822
|
});
|
|
1702
1823
|
}
|
|
1703
|
-
return {
|
|
1824
|
+
return {
|
|
1825
|
+
data: body.data,
|
|
1826
|
+
meta: buildResponseMeta(status, requestId, body.meta),
|
|
1827
|
+
facets: body.facets
|
|
1828
|
+
};
|
|
1704
1829
|
});
|
|
1705
1830
|
}
|
|
1706
1831
|
function sendOnceBinary(ctx, request, idempotencyKey) {
|
|
@@ -1835,8 +1960,8 @@ async function runWithLadder(ctx, request, send) {
|
|
|
1835
1960
|
}
|
|
1836
1961
|
function execute(ctx, request) {
|
|
1837
1962
|
return runWithLadder(ctx, request, async (idempotencyKey) => {
|
|
1838
|
-
const { data, meta } = await sendOnce(ctx, request, idempotencyKey);
|
|
1839
|
-
return attachMeta(data, meta);
|
|
1963
|
+
const { data, meta, facets } = await sendOnce(ctx, request, idempotencyKey);
|
|
1964
|
+
return attachMeta(data, meta, facets);
|
|
1840
1965
|
});
|
|
1841
1966
|
}
|
|
1842
1967
|
function executeBinary(ctx, request) {
|
|
@@ -2367,13 +2492,14 @@ async function reconcileConflict(args) {
|
|
|
2367
2492
|
const { op, transport, snapshot, resolver } = args;
|
|
2368
2493
|
const currentVersion = readCurrentVersion(args.details);
|
|
2369
2494
|
let current;
|
|
2370
|
-
if (op.entity !== void 0 && transport.readEntity !== void 0) {
|
|
2495
|
+
if (op.entity?.id !== void 0 && transport.readEntity !== void 0) {
|
|
2496
|
+
const entityId = op.entity.id;
|
|
2371
2497
|
let read;
|
|
2372
2498
|
try {
|
|
2373
2499
|
read = await transport.readEntity({
|
|
2374
2500
|
tripRef: op.tripRef,
|
|
2375
2501
|
listName: op.entity.listName,
|
|
2376
|
-
id:
|
|
2502
|
+
id: entityId
|
|
2377
2503
|
});
|
|
2378
2504
|
} catch {
|
|
2379
2505
|
return { action: "deferred", body: void 0, currentVersion, current: void 0 };
|
|
@@ -2439,13 +2565,34 @@ function createDrainer(options) {
|
|
|
2439
2565
|
}
|
|
2440
2566
|
}
|
|
2441
2567
|
async function applySuccess(op, outcome, state) {
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
row
|
|
2447
|
-
|
|
2448
|
-
|
|
2568
|
+
let changed = false;
|
|
2569
|
+
const entity = op.entity;
|
|
2570
|
+
if (entity !== void 0) {
|
|
2571
|
+
if (entity.arrayKey !== void 0 && outcome.entities !== void 0) {
|
|
2572
|
+
for (const row of outcome.entities) {
|
|
2573
|
+
const applied = await snapshot.upsert({
|
|
2574
|
+
tripRef: op.tripRef,
|
|
2575
|
+
listName: entity.listName,
|
|
2576
|
+
row,
|
|
2577
|
+
...outcome.serverTime !== void 0 ? { syncedAt: outcome.serverTime } : {}
|
|
2578
|
+
});
|
|
2579
|
+
changed = changed || applied;
|
|
2580
|
+
}
|
|
2581
|
+
} else if (outcome.entity !== void 0) {
|
|
2582
|
+
changed = await snapshot.upsert({
|
|
2583
|
+
tripRef: op.tripRef,
|
|
2584
|
+
listName: entity.listName,
|
|
2585
|
+
row: outcome.entity,
|
|
2586
|
+
...outcome.serverTime !== void 0 ? { syncedAt: outcome.serverTime } : {}
|
|
2587
|
+
});
|
|
2588
|
+
}
|
|
2589
|
+
if (changed && outcome.serverTime !== void 0) {
|
|
2590
|
+
events.emit("snapshot.updated", {
|
|
2591
|
+
tripRef: op.tripRef,
|
|
2592
|
+
lists: [entity.listName],
|
|
2593
|
+
serverTime: outcome.serverTime
|
|
2594
|
+
});
|
|
2595
|
+
}
|
|
2449
2596
|
}
|
|
2450
2597
|
await outbox.markDone(op.id);
|
|
2451
2598
|
state.applied += 1;
|
|
@@ -2468,7 +2615,7 @@ function createDrainer(options) {
|
|
|
2468
2615
|
});
|
|
2469
2616
|
}
|
|
2470
2617
|
async function purgeIfCached(op, outcome) {
|
|
2471
|
-
if (op.entity === void 0) {
|
|
2618
|
+
if (op.entity === void 0 || op.entity.id === void 0) {
|
|
2472
2619
|
return;
|
|
2473
2620
|
}
|
|
2474
2621
|
const held = snapshot.list(op.tripRef, op.entity.listName).some((row) => row.id === op.entity?.id);
|
|
@@ -3378,6 +3525,7 @@ function createOfflineEngine(options) {
|
|
|
3378
3525
|
async open() {
|
|
3379
3526
|
await Promise.all([snapshot.load(), outbox.load(), blobs?.load() ?? Promise.resolve()]);
|
|
3380
3527
|
unbind = drainer.bindOpportunisticTriggers();
|
|
3528
|
+
drainer.kick();
|
|
3381
3529
|
},
|
|
3382
3530
|
enqueue,
|
|
3383
3531
|
async enqueueWithBlob(input) {
|
|
@@ -3453,6 +3601,16 @@ function entityFromBody(body) {
|
|
|
3453
3601
|
}
|
|
3454
3602
|
return void 0;
|
|
3455
3603
|
}
|
|
3604
|
+
function entitiesFromBody(body, arrayKey) {
|
|
3605
|
+
if (typeof body !== "object" || body === null) {
|
|
3606
|
+
return void 0;
|
|
3607
|
+
}
|
|
3608
|
+
const list = body[arrayKey];
|
|
3609
|
+
if (!Array.isArray(list)) {
|
|
3610
|
+
return void 0;
|
|
3611
|
+
}
|
|
3612
|
+
return list.filter((item) => entityFromBody(item) !== void 0);
|
|
3613
|
+
}
|
|
3456
3614
|
function createHttpOfflineTransport(options) {
|
|
3457
3615
|
const { http, sync } = options;
|
|
3458
3616
|
const batchable = options.credential !== "share" || isShareBatchPushAvailable();
|
|
@@ -3470,11 +3628,14 @@ function createHttpOfflineTransport(options) {
|
|
|
3470
3628
|
...signal !== void 0 ? { signal } : {}
|
|
3471
3629
|
});
|
|
3472
3630
|
const { meta, ...data } = response;
|
|
3473
|
-
const
|
|
3631
|
+
const arrayKey = op.entity?.arrayKey;
|
|
3632
|
+
const entity = arrayKey === void 0 ? entityFromBody(data) : void 0;
|
|
3633
|
+
const entities = arrayKey !== void 0 ? entitiesFromBody(data, arrayKey) : void 0;
|
|
3474
3634
|
return {
|
|
3475
3635
|
status: meta.status,
|
|
3476
3636
|
serverTime: meta.serverTime,
|
|
3477
|
-
...entity !== void 0 ? { entity } : {}
|
|
3637
|
+
...entity !== void 0 ? { entity } : {},
|
|
3638
|
+
...entities !== void 0 ? { entities } : {}
|
|
3478
3639
|
};
|
|
3479
3640
|
} catch (error) {
|
|
3480
3641
|
return outcomeFromError(error);
|
|
@@ -3516,18 +3677,21 @@ function createHttpOfflineTransport(options) {
|
|
|
3516
3677
|
});
|
|
3517
3678
|
const serverTime = response.meta.serverTime;
|
|
3518
3679
|
const byIndex = new Map(response.verdicts.map((verdict) => [verdict.index, verdict]));
|
|
3519
|
-
return ops.map((
|
|
3680
|
+
return ops.map((op, index) => {
|
|
3520
3681
|
const verdict = byIndex.get(index);
|
|
3521
3682
|
if (verdict === void 0) {
|
|
3522
3683
|
return { status: null, transportFailureKind: "network" };
|
|
3523
3684
|
}
|
|
3524
3685
|
const envelope = verdict.body;
|
|
3525
3686
|
if (verdict.status >= 200 && verdict.status < 300) {
|
|
3526
|
-
const
|
|
3687
|
+
const arrayKey = op.entity?.arrayKey;
|
|
3688
|
+
const entity = arrayKey === void 0 ? entityFromBody(envelope?.data) : void 0;
|
|
3689
|
+
const entities = arrayKey !== void 0 ? entitiesFromBody(envelope?.data, arrayKey) : void 0;
|
|
3527
3690
|
return {
|
|
3528
3691
|
status: verdict.status,
|
|
3529
3692
|
serverTime,
|
|
3530
|
-
...entity !== void 0 ? { entity } : {}
|
|
3693
|
+
...entity !== void 0 ? { entity } : {},
|
|
3694
|
+
...entities !== void 0 ? { entities } : {}
|
|
3531
3695
|
};
|
|
3532
3696
|
}
|
|
3533
3697
|
const code = envelope?.error?.code;
|
|
@@ -3675,6 +3839,26 @@ async function fetchAgencyManagersPage(client, agencyRef, request) {
|
|
|
3675
3839
|
});
|
|
3676
3840
|
return toPaginatorPage(response);
|
|
3677
3841
|
}
|
|
3842
|
+
async function fetchAgencyTripsPage(client, agencyRef, request) {
|
|
3843
|
+
const response = await client.execute({
|
|
3844
|
+
method: "GET",
|
|
3845
|
+
operationId: OperationId.ListAgencyTrips,
|
|
3846
|
+
path: "/api/v1/agencies/{ref}/trips",
|
|
3847
|
+
pathParams: { ref: agencyRef },
|
|
3848
|
+
query: { ...request.filters, cursor: request.cursor, limit: request.limit }
|
|
3849
|
+
});
|
|
3850
|
+
return toPaginatorPage(response);
|
|
3851
|
+
}
|
|
3852
|
+
async function fetchTripManifestPage(client, agencyRef, tripRef, request) {
|
|
3853
|
+
const response = await client.execute({
|
|
3854
|
+
method: "GET",
|
|
3855
|
+
operationId: OperationId.ListTripManifest,
|
|
3856
|
+
path: "/api/v1/agencies/{ref}/trips/{tripRef}/manifest",
|
|
3857
|
+
pathParams: { ref: agencyRef, tripRef },
|
|
3858
|
+
query: { ...request.filters, cursor: request.cursor, limit: request.limit }
|
|
3859
|
+
});
|
|
3860
|
+
return toPaginatorPage(response);
|
|
3861
|
+
}
|
|
3678
3862
|
function createAgenciesResource(client) {
|
|
3679
3863
|
return {
|
|
3680
3864
|
async upsert(options) {
|
|
@@ -3713,6 +3897,70 @@ function createAgenciesResource(client) {
|
|
|
3713
3897
|
...signal !== void 0 ? { signal } : {}
|
|
3714
3898
|
});
|
|
3715
3899
|
return narrowPaged(response);
|
|
3900
|
+
},
|
|
3901
|
+
async get(options) {
|
|
3902
|
+
const { agencyRef, managerRef, signal } = options;
|
|
3903
|
+
return client.execute({
|
|
3904
|
+
method: "GET",
|
|
3905
|
+
operationId: OperationId.GetManagerAgencyProfile,
|
|
3906
|
+
path: "/api/v1/agencies/{ref}/managers/{managerRef}",
|
|
3907
|
+
pathParams: { ref: agencyRef, managerRef },
|
|
3908
|
+
...signal !== void 0 ? { signal } : {}
|
|
3909
|
+
});
|
|
3910
|
+
}
|
|
3911
|
+
},
|
|
3912
|
+
trips: {
|
|
3913
|
+
list(options) {
|
|
3914
|
+
const { agencyRef, filters, limit } = options;
|
|
3915
|
+
return createPaginator({
|
|
3916
|
+
fetchPage: (request) => fetchAgencyTripsPage(client, agencyRef, request),
|
|
3917
|
+
filters: filters ?? {},
|
|
3918
|
+
...limit !== void 0 ? { limit } : {}
|
|
3919
|
+
});
|
|
3920
|
+
},
|
|
3921
|
+
async listPage(options) {
|
|
3922
|
+
const { agencyRef, cursor, limit, signal, ...filters } = options;
|
|
3923
|
+
const response = await client.execute({
|
|
3924
|
+
method: "GET",
|
|
3925
|
+
operationId: OperationId.ListAgencyTrips,
|
|
3926
|
+
path: "/api/v1/agencies/{ref}/trips",
|
|
3927
|
+
pathParams: { ref: agencyRef },
|
|
3928
|
+
query: { ...filters, cursor, limit },
|
|
3929
|
+
...signal !== void 0 ? { signal } : {}
|
|
3930
|
+
});
|
|
3931
|
+
return narrowPaged(response);
|
|
3932
|
+
},
|
|
3933
|
+
async get(options) {
|
|
3934
|
+
const { agencyRef, tripRef, signal } = options;
|
|
3935
|
+
return client.execute({
|
|
3936
|
+
method: "GET",
|
|
3937
|
+
operationId: OperationId.GetAgencyTrip,
|
|
3938
|
+
path: "/api/v1/agencies/{ref}/trips/{tripRef}",
|
|
3939
|
+
pathParams: { ref: agencyRef, tripRef },
|
|
3940
|
+
...signal !== void 0 ? { signal } : {}
|
|
3941
|
+
});
|
|
3942
|
+
},
|
|
3943
|
+
manifest: {
|
|
3944
|
+
list(options) {
|
|
3945
|
+
const { agencyRef, tripRef, filters, limit } = options;
|
|
3946
|
+
return createPaginator({
|
|
3947
|
+
fetchPage: (request) => fetchTripManifestPage(client, agencyRef, tripRef, request),
|
|
3948
|
+
filters: filters ?? {},
|
|
3949
|
+
...limit !== void 0 ? { limit } : {}
|
|
3950
|
+
});
|
|
3951
|
+
},
|
|
3952
|
+
async listPage(options) {
|
|
3953
|
+
const { agencyRef, tripRef, cursor, limit, signal, ...filters } = options;
|
|
3954
|
+
const response = await client.execute({
|
|
3955
|
+
method: "GET",
|
|
3956
|
+
operationId: OperationId.ListTripManifest,
|
|
3957
|
+
path: "/api/v1/agencies/{ref}/trips/{tripRef}/manifest",
|
|
3958
|
+
pathParams: { ref: agencyRef, tripRef },
|
|
3959
|
+
query: { ...filters, cursor, limit },
|
|
3960
|
+
...signal !== void 0 ? { signal } : {}
|
|
3961
|
+
});
|
|
3962
|
+
return narrowPaged(response);
|
|
3963
|
+
}
|
|
3716
3964
|
}
|
|
3717
3965
|
},
|
|
3718
3966
|
settings: {
|
|
@@ -3742,6 +3990,21 @@ function createAgenciesResource(client) {
|
|
|
3742
3990
|
};
|
|
3743
3991
|
}
|
|
3744
3992
|
|
|
3993
|
+
// src/resources/agency-admin-me.ts
|
|
3994
|
+
function createAgencyAdminMeResource(client) {
|
|
3995
|
+
return {
|
|
3996
|
+
async read(options = {}) {
|
|
3997
|
+
const { signal } = options;
|
|
3998
|
+
return client.execute({
|
|
3999
|
+
method: "GET",
|
|
4000
|
+
operationId: OperationId.GetAgencyAdminMe,
|
|
4001
|
+
path: "/api/v1/agency-admin/me",
|
|
4002
|
+
...signal !== void 0 ? { signal } : {}
|
|
4003
|
+
});
|
|
4004
|
+
}
|
|
4005
|
+
};
|
|
4006
|
+
}
|
|
4007
|
+
|
|
3745
4008
|
// src/resources/bookings.ts
|
|
3746
4009
|
function createBookingsResource(client) {
|
|
3747
4010
|
return {
|
|
@@ -3824,6 +4087,16 @@ function createChecklistsResource(client) {
|
|
|
3824
4087
|
});
|
|
3825
4088
|
},
|
|
3826
4089
|
items: {
|
|
4090
|
+
async get(options) {
|
|
4091
|
+
const { tripRef, itemId, signal } = options;
|
|
4092
|
+
return client.execute({
|
|
4093
|
+
method: "GET",
|
|
4094
|
+
operationId: OperationId.ReadChecklistItem,
|
|
4095
|
+
path: "/api/v1/trips/{ref}/checklist/items/{itemId}",
|
|
4096
|
+
pathParams: { ref: tripRef, itemId },
|
|
4097
|
+
...signal !== void 0 ? { signal } : {}
|
|
4098
|
+
});
|
|
4099
|
+
},
|
|
3827
4100
|
async add(options) {
|
|
3828
4101
|
const { tripRef, idempotencyKey, signal, ...body } = options;
|
|
3829
4102
|
return client.execute({
|
|
@@ -4043,12 +4316,13 @@ function createCollectionsResource(client) {
|
|
|
4043
4316
|
});
|
|
4044
4317
|
},
|
|
4045
4318
|
async eligible(options) {
|
|
4046
|
-
const { tripRef, signal } = options;
|
|
4319
|
+
const { tripRef, status, signal } = options;
|
|
4047
4320
|
return client.execute({
|
|
4048
4321
|
method: "GET",
|
|
4049
4322
|
operationId: OperationId.ListEligibleCollections,
|
|
4050
4323
|
path: "/api/v1/trips/{ref}/collections/eligible",
|
|
4051
4324
|
pathParams: { ref: tripRef },
|
|
4325
|
+
query: { status },
|
|
4052
4326
|
...signal !== void 0 ? { signal } : {}
|
|
4053
4327
|
});
|
|
4054
4328
|
},
|
|
@@ -4263,6 +4537,26 @@ function createFilesResource(client) {
|
|
|
4263
4537
|
pathParams: { id: fileId },
|
|
4264
4538
|
...signal !== void 0 ? { signal } : {}
|
|
4265
4539
|
});
|
|
4540
|
+
},
|
|
4541
|
+
async list(options) {
|
|
4542
|
+
const { signal, ...query } = options;
|
|
4543
|
+
return client.execute({
|
|
4544
|
+
method: "GET",
|
|
4545
|
+
operationId: OperationId.ListFiles,
|
|
4546
|
+
path: "/api/v1/files",
|
|
4547
|
+
query,
|
|
4548
|
+
...signal !== void 0 ? { signal } : {}
|
|
4549
|
+
});
|
|
4550
|
+
},
|
|
4551
|
+
async managerView(options) {
|
|
4552
|
+
const { fileId, signal } = options;
|
|
4553
|
+
return client.execute({
|
|
4554
|
+
method: "GET",
|
|
4555
|
+
operationId: OperationId.ReadManagerFileView,
|
|
4556
|
+
path: "/api/v1/files/{id}/manager-view",
|
|
4557
|
+
pathParams: { id: fileId },
|
|
4558
|
+
...signal !== void 0 ? { signal } : {}
|
|
4559
|
+
});
|
|
4266
4560
|
}
|
|
4267
4561
|
};
|
|
4268
4562
|
}
|
|
@@ -4282,12 +4576,13 @@ function createFloatResource(client) {
|
|
|
4282
4576
|
});
|
|
4283
4577
|
},
|
|
4284
4578
|
async readLedger(options) {
|
|
4285
|
-
const { tripRef, managerId, signal } = options;
|
|
4579
|
+
const { tripRef, managerId, since, signal } = options;
|
|
4286
4580
|
return client.execute({
|
|
4287
4581
|
method: "GET",
|
|
4288
4582
|
operationId: OperationId.ReadFloatLedger,
|
|
4289
4583
|
path: "/api/v1/trips/{ref}/float/{managerId}/ledger",
|
|
4290
4584
|
pathParams: { ref: tripRef, managerId },
|
|
4585
|
+
query: { since },
|
|
4291
4586
|
...signal !== void 0 ? { signal } : {}
|
|
4292
4587
|
});
|
|
4293
4588
|
},
|
|
@@ -4662,6 +4957,18 @@ function createFormsResource(client) {
|
|
|
4662
4957
|
...signal !== void 0 ? { signal } : {}
|
|
4663
4958
|
});
|
|
4664
4959
|
}
|
|
4960
|
+
},
|
|
4961
|
+
travellerResponses: {
|
|
4962
|
+
async list(options) {
|
|
4963
|
+
const { tripRef, travellerRef, signal } = options;
|
|
4964
|
+
return client.execute({
|
|
4965
|
+
method: "GET",
|
|
4966
|
+
operationId: OperationId.ListTravellerFormResponses,
|
|
4967
|
+
path: "/api/v1/trips/{ref}/travellers/{travellerRef}/forms/responses",
|
|
4968
|
+
pathParams: { ref: tripRef, travellerRef },
|
|
4969
|
+
...signal !== void 0 ? { signal } : {}
|
|
4970
|
+
});
|
|
4971
|
+
}
|
|
4665
4972
|
}
|
|
4666
4973
|
}
|
|
4667
4974
|
};
|
|
@@ -4861,12 +5168,13 @@ function createJourneyResource(client) {
|
|
|
4861
5168
|
});
|
|
4862
5169
|
},
|
|
4863
5170
|
async patch(options) {
|
|
4864
|
-
const { agencyRef, key, version, idempotencyKey, signal, ...body } = options;
|
|
5171
|
+
const { agencyRef, key, tripMode, version, idempotencyKey, signal, ...body } = options;
|
|
4865
5172
|
return client.execute({
|
|
4866
5173
|
method: "PATCH",
|
|
4867
5174
|
operationId: OperationId.PatchJourneyTrigger,
|
|
4868
5175
|
path: "/api/v1/agencies/{ref}/journey-triggers/{key}",
|
|
4869
5176
|
pathParams: { ref: agencyRef, key },
|
|
5177
|
+
...tripMode !== void 0 ? { query: { tripMode } } : {},
|
|
4870
5178
|
body,
|
|
4871
5179
|
headers: { "If-Match": String(version) },
|
|
4872
5180
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
@@ -4878,6 +5186,74 @@ function createJourneyResource(client) {
|
|
|
4878
5186
|
return resource;
|
|
4879
5187
|
}
|
|
4880
5188
|
|
|
5189
|
+
// src/resources/manager-expenses.ts
|
|
5190
|
+
function createManagerExpensesResource(client) {
|
|
5191
|
+
return {
|
|
5192
|
+
async list(options = {}) {
|
|
5193
|
+
const { tripRef, since, signal, ...filters } = options;
|
|
5194
|
+
return client.execute({
|
|
5195
|
+
method: "GET",
|
|
5196
|
+
operationId: OperationId.ListManagerExpenses,
|
|
5197
|
+
path: "/api/v1/manager/expenses",
|
|
5198
|
+
query: { ...filters, ...tripRef !== void 0 ? { tripRef } : {}, since },
|
|
5199
|
+
...signal !== void 0 ? { signal } : {}
|
|
5200
|
+
});
|
|
5201
|
+
},
|
|
5202
|
+
async read(options) {
|
|
5203
|
+
const { expenseId, tripRef, signal } = options;
|
|
5204
|
+
return client.execute({
|
|
5205
|
+
method: "GET",
|
|
5206
|
+
operationId: OperationId.ReadManagerExpense,
|
|
5207
|
+
path: "/api/v1/manager/expenses/{id}",
|
|
5208
|
+
pathParams: { id: expenseId },
|
|
5209
|
+
...tripRef !== void 0 ? { query: { tripRef } } : {},
|
|
5210
|
+
...signal !== void 0 ? { signal } : {}
|
|
5211
|
+
});
|
|
5212
|
+
},
|
|
5213
|
+
async logMeta(options = {}) {
|
|
5214
|
+
const { tripRef, signal } = options;
|
|
5215
|
+
return client.execute({
|
|
5216
|
+
method: "GET",
|
|
5217
|
+
operationId: OperationId.ReadManagerExpenseLogMeta,
|
|
5218
|
+
path: "/api/v1/manager/expenses/log/meta",
|
|
5219
|
+
...tripRef !== void 0 ? { query: { tripRef } } : {},
|
|
5220
|
+
...signal !== void 0 ? { signal } : {}
|
|
5221
|
+
});
|
|
5222
|
+
}
|
|
5223
|
+
};
|
|
5224
|
+
}
|
|
5225
|
+
|
|
5226
|
+
// src/resources/manager-me.ts
|
|
5227
|
+
function createManagerMeResource(client) {
|
|
5228
|
+
return {
|
|
5229
|
+
async listTrips(options = {}) {
|
|
5230
|
+
const { signal } = options;
|
|
5231
|
+
return client.execute({
|
|
5232
|
+
method: "GET",
|
|
5233
|
+
operationId: OperationId.ListOwnManagerTrips,
|
|
5234
|
+
path: "/api/v1/manager/me/trips",
|
|
5235
|
+
...signal !== void 0 ? { signal } : {}
|
|
5236
|
+
});
|
|
5237
|
+
}
|
|
5238
|
+
};
|
|
5239
|
+
}
|
|
5240
|
+
|
|
5241
|
+
// src/resources/manager-today.ts
|
|
5242
|
+
function createManagerTodayResource(client) {
|
|
5243
|
+
return {
|
|
5244
|
+
async read(options) {
|
|
5245
|
+
const { tripRef, signal } = options;
|
|
5246
|
+
return client.execute({
|
|
5247
|
+
method: "GET",
|
|
5248
|
+
operationId: OperationId.ReadManagerToday,
|
|
5249
|
+
path: "/api/v1/trips/{ref}/manager/today",
|
|
5250
|
+
pathParams: { ref: tripRef },
|
|
5251
|
+
...signal !== void 0 ? { signal } : {}
|
|
5252
|
+
});
|
|
5253
|
+
}
|
|
5254
|
+
};
|
|
5255
|
+
}
|
|
5256
|
+
|
|
4881
5257
|
// src/resources/notifications.ts
|
|
4882
5258
|
function createNotificationsResource(client) {
|
|
4883
5259
|
return {
|
|
@@ -4902,6 +5278,26 @@ function createNotificationsResource(client) {
|
|
|
4902
5278
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
4903
5279
|
...signal !== void 0 ? { signal } : {}
|
|
4904
5280
|
});
|
|
5281
|
+
},
|
|
5282
|
+
async getInbox(options = {}) {
|
|
5283
|
+
const { segment, signal } = options;
|
|
5284
|
+
return client.execute({
|
|
5285
|
+
method: "GET",
|
|
5286
|
+
operationId: OperationId.GetManagerInbox,
|
|
5287
|
+
path: "/api/v1/managers/me/inbox",
|
|
5288
|
+
...segment !== void 0 ? { query: { segment } } : {},
|
|
5289
|
+
...signal !== void 0 ? { signal } : {}
|
|
5290
|
+
});
|
|
5291
|
+
},
|
|
5292
|
+
async getDetail(options) {
|
|
5293
|
+
const { id, signal } = options;
|
|
5294
|
+
return client.execute({
|
|
5295
|
+
method: "GET",
|
|
5296
|
+
operationId: OperationId.GetNotificationDetail,
|
|
5297
|
+
path: "/api/v1/notifications/{id}",
|
|
5298
|
+
pathParams: { id },
|
|
5299
|
+
...signal !== void 0 ? { signal } : {}
|
|
5300
|
+
});
|
|
4905
5301
|
}
|
|
4906
5302
|
};
|
|
4907
5303
|
}
|
|
@@ -4988,6 +5384,18 @@ function createPickupsResource(client) {
|
|
|
4988
5384
|
...signal !== void 0 ? { signal } : {}
|
|
4989
5385
|
});
|
|
4990
5386
|
},
|
|
5387
|
+
async reassign(options) {
|
|
5388
|
+
const { tripRef, pointId, idempotencyKey, signal, ...body } = options;
|
|
5389
|
+
return client.execute({
|
|
5390
|
+
method: "POST",
|
|
5391
|
+
operationId: OperationId.ReassignPickupStopTravellers,
|
|
5392
|
+
path: "/api/v1/trips/{ref}/pickups/{pointId}/reassign",
|
|
5393
|
+
pathParams: { ref: tripRef, pointId },
|
|
5394
|
+
body,
|
|
5395
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5396
|
+
...signal !== void 0 ? { signal } : {}
|
|
5397
|
+
});
|
|
5398
|
+
},
|
|
4991
5399
|
async board(options) {
|
|
4992
5400
|
const { tripRef, pointId, idempotencyKey, signal, ...body } = options;
|
|
4993
5401
|
return client.execute({
|
|
@@ -5146,6 +5554,16 @@ function createRoomingResource(client) {
|
|
|
5146
5554
|
}
|
|
5147
5555
|
},
|
|
5148
5556
|
rooms: {
|
|
5557
|
+
async get(options) {
|
|
5558
|
+
const { tripRef, roomId, signal } = options;
|
|
5559
|
+
return client.execute({
|
|
5560
|
+
method: "GET",
|
|
5561
|
+
operationId: OperationId.ReadRoomingRoom,
|
|
5562
|
+
path: "/api/v1/trips/{ref}/rooming/rooms/{roomId}",
|
|
5563
|
+
pathParams: { ref: tripRef, roomId },
|
|
5564
|
+
...signal !== void 0 ? { signal } : {}
|
|
5565
|
+
});
|
|
5566
|
+
},
|
|
5149
5567
|
async create(options) {
|
|
5150
5568
|
const { tripRef, idempotencyKey, signal, ...body } = options;
|
|
5151
5569
|
return client.execute({
|
|
@@ -5364,6 +5782,86 @@ function createShareResource(client) {
|
|
|
5364
5782
|
};
|
|
5365
5783
|
}
|
|
5366
5784
|
|
|
5785
|
+
// src/resources/share-tokens.ts
|
|
5786
|
+
function createShareTokensResource(client) {
|
|
5787
|
+
return {
|
|
5788
|
+
async list(options) {
|
|
5789
|
+
const { tripRef, travellerRef, includeRevoked, signal } = options;
|
|
5790
|
+
return client.execute({
|
|
5791
|
+
method: "GET",
|
|
5792
|
+
operationId: OperationId.ListShareTokens,
|
|
5793
|
+
path: "/api/v1/share-tokens",
|
|
5794
|
+
query: { tripRef, travellerRef, includeRevoked },
|
|
5795
|
+
...signal !== void 0 ? { signal } : {}
|
|
5796
|
+
});
|
|
5797
|
+
},
|
|
5798
|
+
async create(options) {
|
|
5799
|
+
const { idempotencyKey, signal, expiresAt, ...rest } = options;
|
|
5800
|
+
const body = {
|
|
5801
|
+
...rest,
|
|
5802
|
+
...expiresAt !== void 0 ? { expiresAt: normalizeDateTimeInput(expiresAt, "expiresAt") } : {}
|
|
5803
|
+
};
|
|
5804
|
+
return client.execute({
|
|
5805
|
+
method: "POST",
|
|
5806
|
+
operationId: OperationId.MintShareToken,
|
|
5807
|
+
path: "/api/v1/share-tokens",
|
|
5808
|
+
body,
|
|
5809
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5810
|
+
...signal !== void 0 ? { signal } : {}
|
|
5811
|
+
});
|
|
5812
|
+
},
|
|
5813
|
+
async read(options) {
|
|
5814
|
+
const { id, signal } = options;
|
|
5815
|
+
return client.execute({
|
|
5816
|
+
method: "GET",
|
|
5817
|
+
operationId: OperationId.ReadShareToken,
|
|
5818
|
+
path: "/api/v1/share-tokens/{id}",
|
|
5819
|
+
pathParams: { id },
|
|
5820
|
+
...signal !== void 0 ? { signal } : {}
|
|
5821
|
+
});
|
|
5822
|
+
},
|
|
5823
|
+
async revoke(options) {
|
|
5824
|
+
const { id, signal } = options;
|
|
5825
|
+
return client.execute({
|
|
5826
|
+
method: "DELETE",
|
|
5827
|
+
operationId: OperationId.RevokeShareToken,
|
|
5828
|
+
path: "/api/v1/share-tokens/{id}",
|
|
5829
|
+
pathParams: { id },
|
|
5830
|
+
...signal !== void 0 ? { signal } : {}
|
|
5831
|
+
});
|
|
5832
|
+
},
|
|
5833
|
+
async patch(options) {
|
|
5834
|
+
const { id, version, signal, expiresAt, ...rest } = options;
|
|
5835
|
+
const body = {
|
|
5836
|
+
...rest,
|
|
5837
|
+
...expiresAt !== void 0 ? { expiresAt: normalizeDateTimeInput(expiresAt, "expiresAt") } : {}
|
|
5838
|
+
};
|
|
5839
|
+
return client.execute({
|
|
5840
|
+
method: "PATCH",
|
|
5841
|
+
operationId: OperationId.PatchShareToken,
|
|
5842
|
+
path: "/api/v1/share-tokens/{id}",
|
|
5843
|
+
pathParams: { id },
|
|
5844
|
+
body,
|
|
5845
|
+
headers: { "If-Match": String(version) },
|
|
5846
|
+
...signal !== void 0 ? { signal } : {}
|
|
5847
|
+
});
|
|
5848
|
+
},
|
|
5849
|
+
async regenerate(options) {
|
|
5850
|
+
const { id, idempotencyKey, signal, ...rest } = options;
|
|
5851
|
+
const body = { ...rest };
|
|
5852
|
+
return client.execute({
|
|
5853
|
+
method: "POST",
|
|
5854
|
+
operationId: OperationId.RegenerateShareToken,
|
|
5855
|
+
path: "/api/v1/share-tokens/{id}/regenerate",
|
|
5856
|
+
pathParams: { id },
|
|
5857
|
+
body,
|
|
5858
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5859
|
+
...signal !== void 0 ? { signal } : {}
|
|
5860
|
+
});
|
|
5861
|
+
}
|
|
5862
|
+
};
|
|
5863
|
+
}
|
|
5864
|
+
|
|
5367
5865
|
// src/resources/travellers.ts
|
|
5368
5866
|
async function fetchAgencyDirectoryPage(client, agencyRef, request) {
|
|
5369
5867
|
const response = await client.execute({
|
|
@@ -5408,6 +5906,28 @@ function createTravellersResource(client) {
|
|
|
5408
5906
|
...signal !== void 0 ? { signal } : {}
|
|
5409
5907
|
});
|
|
5410
5908
|
},
|
|
5909
|
+
async getDetail(options) {
|
|
5910
|
+
const { tripRef, travellerRef, signal } = options;
|
|
5911
|
+
return client.execute({
|
|
5912
|
+
method: "GET",
|
|
5913
|
+
operationId: OperationId.GetTravellerDetail,
|
|
5914
|
+
path: "/api/v1/trips/{ref}/travellers/{travellerRef}",
|
|
5915
|
+
pathParams: { ref: tripRef, travellerRef },
|
|
5916
|
+
...signal !== void 0 ? { signal } : {}
|
|
5917
|
+
});
|
|
5918
|
+
},
|
|
5919
|
+
async addNote(options) {
|
|
5920
|
+
const { tripRef, travellerRef, idempotencyKey, signal, ...body } = options;
|
|
5921
|
+
return client.execute({
|
|
5922
|
+
method: "POST",
|
|
5923
|
+
operationId: OperationId.AddTravellerNote,
|
|
5924
|
+
path: "/api/v1/trips/{ref}/travellers/{travellerRef}/notes",
|
|
5925
|
+
pathParams: { ref: tripRef, travellerRef },
|
|
5926
|
+
body,
|
|
5927
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5928
|
+
...signal !== void 0 ? { signal } : {}
|
|
5929
|
+
});
|
|
5930
|
+
},
|
|
5411
5931
|
listForAgency(options) {
|
|
5412
5932
|
const { agencyRef, filters, limit } = options;
|
|
5413
5933
|
return createPaginator({
|
|
@@ -5439,6 +5959,16 @@ function createTravellersResource(client) {
|
|
|
5439
5959
|
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
5440
5960
|
...signal !== void 0 ? { signal } : {}
|
|
5441
5961
|
});
|
|
5962
|
+
},
|
|
5963
|
+
async getAgencyProfile(options) {
|
|
5964
|
+
const { agencyRef, travellerRef, signal } = options;
|
|
5965
|
+
return client.execute({
|
|
5966
|
+
method: "GET",
|
|
5967
|
+
operationId: OperationId.GetTravellerAgencyProfile,
|
|
5968
|
+
path: "/api/v1/agencies/{ref}/travellers/{travellerRef}",
|
|
5969
|
+
pathParams: { ref: agencyRef, travellerRef },
|
|
5970
|
+
...signal !== void 0 ? { signal } : {}
|
|
5971
|
+
});
|
|
5442
5972
|
}
|
|
5443
5973
|
};
|
|
5444
5974
|
}
|
|
@@ -5526,6 +6056,18 @@ function createTreksResource(client) {
|
|
|
5526
6056
|
...signal !== void 0 ? { signal } : {}
|
|
5527
6057
|
});
|
|
5528
6058
|
return narrowPaged(response);
|
|
6059
|
+
},
|
|
6060
|
+
async reconcile(options) {
|
|
6061
|
+
const { trekRef, walkInId, idempotencyKey, signal, ...body } = options;
|
|
6062
|
+
return client.execute({
|
|
6063
|
+
method: "POST",
|
|
6064
|
+
operationId: OperationId.ReconcileTrekWalkIn,
|
|
6065
|
+
path: "/api/v1/treks/{trekRef}/walk-ins/{walkInId}/reconcile",
|
|
6066
|
+
pathParams: { trekRef, walkInId },
|
|
6067
|
+
body,
|
|
6068
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
6069
|
+
...signal !== void 0 ? { signal } : {}
|
|
6070
|
+
});
|
|
5529
6071
|
}
|
|
5530
6072
|
}
|
|
5531
6073
|
};
|
|
@@ -5689,7 +6231,7 @@ function createTripsResource(client) {
|
|
|
5689
6231
|
const { tripRef, idempotencyKey, signal, sourceUpdatedAt, ...rest } = options;
|
|
5690
6232
|
const body = {
|
|
5691
6233
|
...rest,
|
|
5692
|
-
sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt")
|
|
6234
|
+
...sourceUpdatedAt === void 0 ? {} : { sourceUpdatedAt: normalizeDateTimeInput(sourceUpdatedAt, "sourceUpdatedAt") }
|
|
5693
6235
|
};
|
|
5694
6236
|
return client.execute({
|
|
5695
6237
|
method: "POST",
|
|
@@ -5836,6 +6378,18 @@ function createVendorsResource(client) {
|
|
|
5836
6378
|
...signal !== void 0 ? { signal } : {}
|
|
5837
6379
|
});
|
|
5838
6380
|
},
|
|
6381
|
+
async create(options) {
|
|
6382
|
+
const { agencyRef, idempotencyKey, signal, ...body } = options;
|
|
6383
|
+
return client.execute({
|
|
6384
|
+
method: "POST",
|
|
6385
|
+
operationId: OperationId.CreateVendor,
|
|
6386
|
+
path: "/api/v1/agencies/{ref}/vendors",
|
|
6387
|
+
pathParams: { ref: agencyRef },
|
|
6388
|
+
body,
|
|
6389
|
+
...idempotencyKey !== void 0 ? { idempotencyKey } : {},
|
|
6390
|
+
...signal !== void 0 ? { signal } : {}
|
|
6391
|
+
});
|
|
6392
|
+
},
|
|
5839
6393
|
async upsert(options) {
|
|
5840
6394
|
const { agencyRef, externalVendorId, idempotencyKey, signal, ...body } = options;
|
|
5841
6395
|
return client.execute({
|
|
@@ -5950,7 +6504,8 @@ var FileContentType = {
|
|
|
5950
6504
|
var FilePurpose = {
|
|
5951
6505
|
ExpenseReceipt: "expense_receipt",
|
|
5952
6506
|
FormAttachment: "form_attachment",
|
|
5953
|
-
BookingVoucher: "booking_voucher"
|
|
6507
|
+
BookingVoucher: "booking_voucher",
|
|
6508
|
+
TripDocument: "trip_document"
|
|
5954
6509
|
};
|
|
5955
6510
|
var FloatDirection = {
|
|
5956
6511
|
In: "IN",
|
|
@@ -6557,6 +7112,15 @@ var KaafilClient = class {
|
|
|
6557
7112
|
get agencies() {
|
|
6558
7113
|
return this.#requireState().agencies;
|
|
6559
7114
|
}
|
|
7115
|
+
/**
|
|
7116
|
+
* Share-link lifecycle — mint, list, read, revoke, patch, regenerate.
|
|
7117
|
+
*
|
|
7118
|
+
* `agencyAdmin` only among the browser session kinds; a manager session
|
|
7119
|
+
* reaches `UnsatisfiableSchemeError` on every method, by design.
|
|
7120
|
+
*/
|
|
7121
|
+
get shareTokens() {
|
|
7122
|
+
return this.#requireState().shareTokens;
|
|
7123
|
+
}
|
|
6560
7124
|
get vendors() {
|
|
6561
7125
|
return this.#requireState().vendors;
|
|
6562
7126
|
}
|
|
@@ -6584,6 +7148,18 @@ var KaafilClient = class {
|
|
|
6584
7148
|
get itinerary() {
|
|
6585
7149
|
return this.#requireState().itinerary;
|
|
6586
7150
|
}
|
|
7151
|
+
get managerToday() {
|
|
7152
|
+
return this.#requireState().managerToday;
|
|
7153
|
+
}
|
|
7154
|
+
get managerMe() {
|
|
7155
|
+
return this.#requireState().managerMe;
|
|
7156
|
+
}
|
|
7157
|
+
get agencyAdminMe() {
|
|
7158
|
+
return this.#requireState().agencyAdminMe;
|
|
7159
|
+
}
|
|
7160
|
+
get managerExpenses() {
|
|
7161
|
+
return this.#requireState().managerExpenses;
|
|
7162
|
+
}
|
|
6587
7163
|
get rooming() {
|
|
6588
7164
|
return this.#requireState().rooming;
|
|
6589
7165
|
}
|
|
@@ -6727,7 +7303,23 @@ var KaafilClient = class {
|
|
|
6727
7303
|
...agenciesResource,
|
|
6728
7304
|
managers: {
|
|
6729
7305
|
list: (options) => agenciesResource.managers.list({ ...options, agencyRef }),
|
|
6730
|
-
listPage: (options) => agenciesResource.managers.listPage({ ...options, agencyRef })
|
|
7306
|
+
listPage: (options) => agenciesResource.managers.listPage({ ...options, agencyRef }),
|
|
7307
|
+
get: (options) => agenciesResource.managers.get({ ...options, agencyRef })
|
|
7308
|
+
},
|
|
7309
|
+
trips: {
|
|
7310
|
+
list: (options) => agenciesResource.trips.list({ ...options, agencyRef }),
|
|
7311
|
+
listPage: (options) => agenciesResource.trips.listPage({ ...options, agencyRef }),
|
|
7312
|
+
get: (options) => agenciesResource.trips.get({ ...options, agencyRef }),
|
|
7313
|
+
manifest: {
|
|
7314
|
+
list: (options) => agenciesResource.trips.manifest.list({
|
|
7315
|
+
...options,
|
|
7316
|
+
agencyRef
|
|
7317
|
+
}),
|
|
7318
|
+
listPage: (options) => agenciesResource.trips.manifest.listPage({
|
|
7319
|
+
...options,
|
|
7320
|
+
agencyRef
|
|
7321
|
+
})
|
|
7322
|
+
}
|
|
6731
7323
|
},
|
|
6732
7324
|
settings: {
|
|
6733
7325
|
get: (options) => agenciesResource.settings.get({ ...options, agencyRef }),
|
|
@@ -6736,6 +7328,7 @@ var KaafilClient = class {
|
|
|
6736
7328
|
};
|
|
6737
7329
|
const boundVendors = {
|
|
6738
7330
|
...vendorsResource,
|
|
7331
|
+
create: (options) => vendorsResource.create({ ...options, agencyRef }),
|
|
6739
7332
|
upsert: (options) => vendorsResource.upsert({ ...options, agencyRef }),
|
|
6740
7333
|
remove: (options) => vendorsResource.remove({ ...options, agencyRef })
|
|
6741
7334
|
};
|
|
@@ -6778,7 +7371,8 @@ var KaafilClient = class {
|
|
|
6778
7371
|
...travellersResource,
|
|
6779
7372
|
listForAgency: (options) => travellersResource.listForAgency({ ...options, agencyRef }),
|
|
6780
7373
|
listForAgencyPage: (options) => travellersResource.listForAgencyPage({ ...options, agencyRef }),
|
|
6781
|
-
create: (options) => travellersResource.create({ ...options, agencyRef })
|
|
7374
|
+
create: (options) => travellersResource.create({ ...options, agencyRef }),
|
|
7375
|
+
getAgencyProfile: (options) => travellersResource.getAgencyProfile({ ...options, agencyRef })
|
|
6782
7376
|
};
|
|
6783
7377
|
this.#state = {
|
|
6784
7378
|
http,
|
|
@@ -6791,8 +7385,13 @@ var KaafilClient = class {
|
|
|
6791
7385
|
feedbackNps: boundFeedbackNps,
|
|
6792
7386
|
forms: boundForms,
|
|
6793
7387
|
share: createShareResource(http),
|
|
7388
|
+
shareTokens: createShareTokensResource(http),
|
|
6794
7389
|
notifications: createNotificationsResource(http),
|
|
6795
7390
|
itinerary: createItineraryResource(http),
|
|
7391
|
+
managerToday: createManagerTodayResource(http),
|
|
7392
|
+
managerMe: createManagerMeResource(http),
|
|
7393
|
+
agencyAdminMe: createAgencyAdminMeResource(http),
|
|
7394
|
+
managerExpenses: createManagerExpensesResource(http),
|
|
6796
7395
|
rooming: createRoomingResource(http),
|
|
6797
7396
|
seating: createSeatingResource(http),
|
|
6798
7397
|
pickups: createPickupsResource(http),
|