kaafil-js 0.1.0-beta.4 → 0.1.0-beta.6

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