@mountaya/client 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/LICENCE.fr.txt +280 -0
  3. package/LICENSE.txt +262 -0
  4. package/README.md +1260 -2
  5. package/dist/admin/index.cjs +3521 -0
  6. package/dist/admin/index.cjs.map +1 -0
  7. package/dist/admin/index.d.cts +1070 -0
  8. package/dist/admin/index.d.ts +1070 -0
  9. package/dist/admin/index.js +301 -0
  10. package/dist/admin/index.js.map +1 -0
  11. package/dist/browser.cjs +8073 -0
  12. package/dist/browser.cjs.map +1 -0
  13. package/dist/browser.d.cts +106 -0
  14. package/dist/browser.d.ts +106 -0
  15. package/dist/browser.js +53 -0
  16. package/dist/browser.js.map +1 -0
  17. package/dist/chunk-BM526BHG.js +342 -0
  18. package/dist/chunk-BM526BHG.js.map +1 -0
  19. package/dist/chunk-D2YEVTG7.js +327 -0
  20. package/dist/chunk-D2YEVTG7.js.map +1 -0
  21. package/dist/chunk-OHKVUREN.js +3500 -0
  22. package/dist/chunk-OHKVUREN.js.map +1 -0
  23. package/dist/chunk-TDTK2L5H.js +3842 -0
  24. package/dist/chunk-TDTK2L5H.js.map +1 -0
  25. package/dist/coreOperations.gen-BMYPoBbz.d.ts +1760 -0
  26. package/dist/coreOperations.gen-BxX5xRxw.d.cts +1760 -0
  27. package/dist/errors-B-GqAtQv.d.cts +75960 -0
  28. package/dist/errors-B-GqAtQv.d.ts +75960 -0
  29. package/dist/events/index.cjs +1972 -0
  30. package/dist/events/index.cjs.map +1 -0
  31. package/dist/events/index.d.cts +781 -0
  32. package/dist/events/index.d.ts +781 -0
  33. package/dist/events/index.js +826 -0
  34. package/dist/events/index.js.map +1 -0
  35. package/dist/index.cjs +8072 -0
  36. package/dist/index.cjs.map +1 -0
  37. package/dist/index.d.cts +76 -0
  38. package/dist/index.d.ts +76 -0
  39. package/dist/index.js +52 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/operations.gen-CvTyzKNF.d.cts +3993 -0
  42. package/dist/operations.gen-DUD406TV.d.ts +3993 -0
  43. package/package.json +127 -4
  44. package/src/admin/index.ts +47 -0
  45. package/src/admin/rules/mountayaAdmin.ts +102 -0
  46. package/src/browser.ts +232 -0
  47. package/src/core/engines/sessionToken.ts +870 -0
  48. package/src/core/rules/auth.ts +1017 -0
  49. package/src/core/rules/clientHeader.ts +28 -0
  50. package/src/core/rules/dates.ts +200 -0
  51. package/src/core/rules/decode.ts +154 -0
  52. package/src/core/rules/envelope.ts +41 -0
  53. package/src/core/rules/errors.ts +1486 -0
  54. package/src/core/rules/graphql.ts +576 -0
  55. package/src/core/rules/headerValue.ts +42 -0
  56. package/src/core/rules/idempotencyKey.ts +64 -0
  57. package/src/core/rules/nullMask.ts +127 -0
  58. package/src/core/rules/nullMasks.gen.ts +416 -0
  59. package/src/core/rules/paginate.ts +316 -0
  60. package/src/core/rules/rateLimit.ts +507 -0
  61. package/src/core/rules/redaction.ts +219 -0
  62. package/src/core/rules/resourceRef.ts +110 -0
  63. package/src/core/rules/responseBody.ts +492 -0
  64. package/src/core/rules/retry.ts +386 -0
  65. package/src/core/rules/selection.ts +416 -0
  66. package/src/core/rules/sessionAnswer.ts +90 -0
  67. package/src/core/rules/sessionSchedule.ts +131 -0
  68. package/src/core/rules/sessionWait.ts +112 -0
  69. package/src/core/rules/transport.ts +2386 -0
  70. package/src/core/rules/version.gen.ts +16 -0
  71. package/src/core/rules/webAddress.ts +165 -0
  72. package/src/core/rules/webAddresses.gen.ts +30 -0
  73. package/src/data/operations.gen.ts +603 -0
  74. package/src/data/schema.gen.ts +8078 -0
  75. package/src/data/selection.gen.ts +472 -0
  76. package/src/events/index.ts +67 -0
  77. package/src/events/rules/agent.ts +439 -0
  78. package/src/events/rules/collab.ts +554 -0
  79. package/src/events/rules/collabNulls.gen.ts +17 -0
  80. package/src/events/rules/eventStream.ts +94 -0
  81. package/src/events/rules/openSseStream.ts +594 -0
  82. package/src/events/rules/sse.ts +349 -0
  83. package/src/index.ts +231 -0
  84. package/src/rest/adminOperations.gen.ts +70 -0
  85. package/src/rest/adminResources.gen.ts +136 -0
  86. package/src/rest/coreOperations.gen.ts +74 -0
  87. package/src/rest/coreResources.gen.ts +244 -0
  88. package/src/rest/dates.gen.ts +217 -0
  89. package/src/rest/operations.gen.ts +4341 -0
  90. package/src/rest/resources.gen.ts +369 -0
  91. package/src/rest/schema.gen.ts +56840 -0
  92. package/src/tiles/operations.gen.ts +206 -0
  93. package/src/tiles/schema.gen.ts +8408 -0
  94. package/src/webhooks/rules/constructWebhookEvent.ts +482 -0
  95. package/src/webhooks/rules/webhookEvent.ts +38 -0
  96. package/src/webhooks/rules/webhookEvents.gen.ts +732 -0
@@ -0,0 +1,4341 @@
1
+ // GENERATED FILE. DO NOT EDIT.
2
+ //
3
+ // One method per operation on the public 'api' surface, generated from
4
+ // the mountaya/schemas contract (openapi/api.yaml).
5
+ //
6
+ // Method names are the spec's operationIds verbatim.
7
+ // Edit the spec in mountaya/schemas, not this file.
8
+
9
+ import type { BinaryBody, RequestOptions, MountayaTransport } from "../core/rules/transport.js";
10
+ import type { operations } from "./schema.gen.js";
11
+ import { agentRunDates, collectionDates, invoiceDates, itineraryDates, itineraryWithDetailsDates, membershipDates, organizationDates, organizationInvitationDates, organizationMemberDates, organizationSubscriptionSummaryDates, publishableKeyDates, sessionDates, shareLinkDates, userInvitationDates, webhookDeliveryDates, webhookDeliveryTriggerDates, webhookDeliveryWithAttemptsDates, webhookEndpointDates, webhookEndpointWithSecretDates, webhookEventDates, webhookEventWithDeliveriesDates, webhookHealthDates, zoneDates } from "./dates.gen.js";
12
+
13
+ /**
14
+ * SuccessBody extracts the JSON body of an operation's 2xx response: its 200, else its 201,
15
+ * else its 202.
16
+ *
17
+ * The platform wraps every success in an envelope whose `data` carries the payload, so
18
+ * this resolves to the envelope rather than to the bare resource: callers read
19
+ * `result.data`, which is what the wire actually sends, `null` on a write that removes
20
+ * something and has nothing left to answer. A 202 is read like the other two: an operation
21
+ * that starts work rather than finishing it names what it started at `data`, and that is
22
+ * typed only if this reaches it.
23
+ */
24
+ type SuccessBody<O> = O extends {
25
+ responses: { 200: { content: { "application/json": infer B } } };
26
+ }
27
+ ? B
28
+ : O extends { responses: { 201: { content: { "application/json": infer C } } } }
29
+ ? C
30
+ : O extends { responses: { 202: { content: { "application/json": infer D } } } }
31
+ ? D
32
+ : unknown;
33
+
34
+ /**
35
+ * Delete a collection.
36
+ * DELETE /v1/collections/{collection_id}
37
+ * Requires a publishable key with the `studio-embedded` scope.
38
+ * Acts as the user its session token was minted for, so the token must name one.
39
+ */
40
+ export const deleteCollection = (transport: MountayaTransport, args: {
41
+ readonly "collection_id": string;
42
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
43
+ readonly idempotencyKey?: string | undefined;
44
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
45
+ readonly ifMatch?: string | undefined;
46
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteCollection"]>> =>
47
+ transport.request({
48
+ actsAsMember: true,
49
+ idempotencyKey: args.idempotencyKey,
50
+ idempotent: true,
51
+ ifMatch: args.ifMatch,
52
+ method: "DELETE",
53
+ operationId: "deleteCollection",
54
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}`,
55
+ requiresSession: true,
56
+ retry: options?.retry,
57
+ serverBudgetMs: 30000,
58
+ signal: options?.signal,
59
+ surface: "rest",
60
+ takesIdempotencyKey: true,
61
+ timeoutMs: options?.timeoutMs,
62
+ });
63
+
64
+ /**
65
+ * Remove an itinerary from a collection.
66
+ * DELETE /v1/collections/{collection_id}/itineraries/{itinerary_id}
67
+ * Requires a publishable key with the `studio-embedded` scope.
68
+ * Acts as the user its session token was minted for, so the token must name one.
69
+ */
70
+ export const deleteCollectionItinerary = (transport: MountayaTransport, args: {
71
+ readonly "collection_id": string;
72
+ readonly "itinerary_id": string;
73
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
74
+ readonly idempotencyKey?: string | undefined;
75
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
76
+ readonly ifMatch?: string | undefined;
77
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteCollectionItinerary"]>> =>
78
+ transport.request({
79
+ actsAsMember: true,
80
+ dates: { data: collectionDates },
81
+ idempotencyKey: args.idempotencyKey,
82
+ idempotent: true,
83
+ ifMatch: args.ifMatch,
84
+ method: "DELETE",
85
+ operationId: "deleteCollectionItinerary",
86
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
87
+ requiresSession: true,
88
+ retry: options?.retry,
89
+ serverBudgetMs: 30000,
90
+ signal: options?.signal,
91
+ surface: "rest",
92
+ takesIdempotencyKey: true,
93
+ timeoutMs: options?.timeoutMs,
94
+ });
95
+
96
+ /**
97
+ * Remove the collection's share link.
98
+ * DELETE /v1/collections/{collection_id}/share-link
99
+ * Requires a publishable key with the `studio-embedded` scope.
100
+ * Acts as the user its session token was minted for, so the token must name one.
101
+ */
102
+ export const deleteCollectionShareLink = (transport: MountayaTransport, args: {
103
+ readonly "collection_id": string;
104
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
105
+ readonly idempotencyKey?: string | undefined;
106
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteCollectionShareLink"]>> =>
107
+ transport.request({
108
+ actsAsMember: true,
109
+ idempotencyKey: args.idempotencyKey,
110
+ idempotent: true,
111
+ method: "DELETE",
112
+ operationId: "deleteCollectionShareLink",
113
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link`,
114
+ requiresSession: true,
115
+ retry: options?.retry,
116
+ serverBudgetMs: 30000,
117
+ signal: options?.signal,
118
+ surface: "rest",
119
+ takesIdempotencyKey: true,
120
+ timeoutMs: options?.timeoutMs,
121
+ });
122
+
123
+ /**
124
+ * Remove a zone from a collection.
125
+ * DELETE /v1/collections/{collection_id}/zones/{zone_id}
126
+ * Requires a publishable key with the `studio-embedded` scope.
127
+ * Acts as the user its session token was minted for, so the token must name one.
128
+ */
129
+ export const deleteCollectionZone = (transport: MountayaTransport, args: {
130
+ readonly "collection_id": string;
131
+ readonly "zone_id": string;
132
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
133
+ readonly idempotencyKey?: string | undefined;
134
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
135
+ readonly ifMatch?: string | undefined;
136
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteCollectionZone"]>> =>
137
+ transport.request({
138
+ actsAsMember: true,
139
+ dates: { data: collectionDates },
140
+ idempotencyKey: args.idempotencyKey,
141
+ idempotent: true,
142
+ ifMatch: args.ifMatch,
143
+ method: "DELETE",
144
+ operationId: "deleteCollectionZone",
145
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/zones/${encodeURIComponent(String(args.zone_id))}`,
146
+ requiresSession: true,
147
+ retry: options?.retry,
148
+ serverBudgetMs: 30000,
149
+ signal: options?.signal,
150
+ surface: "rest",
151
+ takesIdempotencyKey: true,
152
+ timeoutMs: options?.timeoutMs,
153
+ });
154
+
155
+ /**
156
+ * Delete an itinerary.
157
+ * DELETE /v1/itineraries/{itinerary_id}
158
+ * Requires a publishable key with the `studio-embedded` scope.
159
+ * Acts as the user its session token was minted for, so the token must name one.
160
+ */
161
+ export const deleteItinerary = (transport: MountayaTransport, args: {
162
+ readonly "itinerary_id": string;
163
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
164
+ readonly idempotencyKey?: string | undefined;
165
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
166
+ readonly ifMatch?: string | undefined;
167
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteItinerary"]>> =>
168
+ transport.request({
169
+ actsAsMember: true,
170
+ idempotencyKey: args.idempotencyKey,
171
+ idempotent: true,
172
+ ifMatch: args.ifMatch,
173
+ method: "DELETE",
174
+ operationId: "deleteItinerary",
175
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
176
+ requiresSession: true,
177
+ retry: options?.retry,
178
+ serverBudgetMs: 30000,
179
+ signal: options?.signal,
180
+ surface: "rest",
181
+ takesIdempotencyKey: true,
182
+ timeoutMs: options?.timeoutMs,
183
+ });
184
+
185
+ /**
186
+ * Take the itinerary's publication down.
187
+ * DELETE /v1/itineraries/{itinerary_id}/publication
188
+ * Requires a publishable key with the `studio-embedded` scope.
189
+ * Acts as the user its session token was minted for, so the token must name one.
190
+ */
191
+ export const deleteItineraryPublication = (transport: MountayaTransport, args: {
192
+ readonly "itinerary_id": string;
193
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
194
+ readonly idempotencyKey?: string | undefined;
195
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
196
+ readonly ifMatch?: string | undefined;
197
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteItineraryPublication"]>> =>
198
+ transport.request({
199
+ actsAsMember: true,
200
+ dates: { data: itineraryWithDetailsDates },
201
+ idempotencyKey: args.idempotencyKey,
202
+ idempotent: true,
203
+ ifMatch: args.ifMatch,
204
+ method: "DELETE",
205
+ operationId: "deleteItineraryPublication",
206
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/publication`,
207
+ requiresSession: true,
208
+ retry: options?.retry,
209
+ serverBudgetMs: 30000,
210
+ signal: options?.signal,
211
+ surface: "rest",
212
+ takesIdempotencyKey: true,
213
+ timeoutMs: options?.timeoutMs,
214
+ });
215
+
216
+ /**
217
+ * Delete a segment from an itinerary.
218
+ * DELETE /v1/itineraries/{itinerary_id}/segments/{segment_id}
219
+ * Requires a publishable key with the `studio-embedded` scope.
220
+ * Acts as the user its session token was minted for, so the token must name one.
221
+ */
222
+ export const deleteItinerarySegment = (transport: MountayaTransport, args: {
223
+ readonly "itinerary_id": string;
224
+ readonly "segment_id": string;
225
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
226
+ readonly idempotencyKey?: string | undefined;
227
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
228
+ readonly ifMatch?: string | undefined;
229
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteItinerarySegment"]>> =>
230
+ transport.request({
231
+ actsAsMember: true,
232
+ dates: { data: itineraryWithDetailsDates },
233
+ idempotencyKey: args.idempotencyKey,
234
+ idempotent: true,
235
+ ifMatch: args.ifMatch,
236
+ method: "DELETE",
237
+ operationId: "deleteItinerarySegment",
238
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}`,
239
+ requiresSession: true,
240
+ retry: options?.retry,
241
+ serverBudgetMs: 30000,
242
+ signal: options?.signal,
243
+ surface: "rest",
244
+ takesIdempotencyKey: true,
245
+ timeoutMs: options?.timeoutMs,
246
+ });
247
+
248
+ /**
249
+ * Delete a segment group.
250
+ * DELETE /v1/itineraries/{itinerary_id}/segment-groups/{group_id}
251
+ * Requires a publishable key with the `studio-embedded` scope.
252
+ * Acts as the user its session token was minted for, so the token must name one.
253
+ */
254
+ export const deleteItinerarySegmentGroup = (transport: MountayaTransport, args: {
255
+ readonly "itinerary_id": string;
256
+ readonly "group_id": string;
257
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
258
+ readonly idempotencyKey?: string | undefined;
259
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
260
+ readonly ifMatch?: string | undefined;
261
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteItinerarySegmentGroup"]>> =>
262
+ transport.request({
263
+ actsAsMember: true,
264
+ dates: { data: itineraryWithDetailsDates },
265
+ idempotencyKey: args.idempotencyKey,
266
+ idempotent: true,
267
+ ifMatch: args.ifMatch,
268
+ method: "DELETE",
269
+ operationId: "deleteItinerarySegmentGroup",
270
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segment-groups/${encodeURIComponent(String(args.group_id))}`,
271
+ requiresSession: true,
272
+ retry: options?.retry,
273
+ serverBudgetMs: 30000,
274
+ signal: options?.signal,
275
+ surface: "rest",
276
+ takesIdempotencyKey: true,
277
+ timeoutMs: options?.timeoutMs,
278
+ });
279
+
280
+ /**
281
+ * Remove the itinerary's share link.
282
+ * DELETE /v1/itineraries/{itinerary_id}/share-link
283
+ * Requires a publishable key with the `studio-embedded` scope.
284
+ * Acts as the user its session token was minted for, so the token must name one.
285
+ */
286
+ export const deleteItineraryShareLink = (transport: MountayaTransport, args: {
287
+ readonly "itinerary_id": string;
288
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
289
+ readonly idempotencyKey?: string | undefined;
290
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteItineraryShareLink"]>> =>
291
+ transport.request({
292
+ actsAsMember: true,
293
+ idempotencyKey: args.idempotencyKey,
294
+ idempotent: true,
295
+ method: "DELETE",
296
+ operationId: "deleteItineraryShareLink",
297
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link`,
298
+ requiresSession: true,
299
+ retry: options?.retry,
300
+ serverBudgetMs: 30000,
301
+ signal: options?.signal,
302
+ surface: "rest",
303
+ takesIdempotencyKey: true,
304
+ timeoutMs: options?.timeoutMs,
305
+ });
306
+
307
+ /**
308
+ * Delete a waypoint from an itinerary.
309
+ * DELETE /v1/itineraries/{itinerary_id}/waypoints/{waypoint_id}
310
+ * Requires a publishable key with the `studio-embedded` scope.
311
+ * Acts as the user its session token was minted for, so the token must name one.
312
+ */
313
+ export const deleteItineraryWaypoint = (transport: MountayaTransport, args: {
314
+ readonly "itinerary_id": string;
315
+ readonly "waypoint_id": string;
316
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
317
+ readonly idempotencyKey?: string | undefined;
318
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
319
+ readonly ifMatch?: string | undefined;
320
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteItineraryWaypoint"]>> =>
321
+ transport.request({
322
+ actsAsMember: true,
323
+ dates: { data: itineraryWithDetailsDates },
324
+ idempotencyKey: args.idempotencyKey,
325
+ idempotent: true,
326
+ ifMatch: args.ifMatch,
327
+ method: "DELETE",
328
+ operationId: "deleteItineraryWaypoint",
329
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/waypoints/${encodeURIComponent(String(args.waypoint_id))}`,
330
+ requiresSession: true,
331
+ retry: options?.retry,
332
+ serverBudgetMs: 30000,
333
+ signal: options?.signal,
334
+ surface: "rest",
335
+ takesIdempotencyKey: true,
336
+ timeoutMs: options?.timeoutMs,
337
+ });
338
+
339
+ /**
340
+ * Decline an invitation.
341
+ * DELETE /v1/me/invitations/{invitation_id}
342
+ * Requires a publishable key with the `studio-embedded` scope.
343
+ * Acts as the user its session token was minted for, so the token must name one.
344
+ */
345
+ export const deleteMyInvitation = (transport: MountayaTransport, args: {
346
+ readonly "invitation_id": string;
347
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
348
+ readonly idempotencyKey?: string | undefined;
349
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteMyInvitation"]>> =>
350
+ transport.request({
351
+ actsAsMember: true,
352
+ idempotencyKey: args.idempotencyKey,
353
+ idempotent: true,
354
+ method: "DELETE",
355
+ operationId: "deleteMyInvitation",
356
+ path: `/v1/me/invitations/${encodeURIComponent(String(args.invitation_id))}`,
357
+ requiresSession: true,
358
+ retry: options?.retry,
359
+ serverBudgetMs: 30000,
360
+ signal: options?.signal,
361
+ surface: "rest",
362
+ takesIdempotencyKey: true,
363
+ timeoutMs: options?.timeoutMs,
364
+ });
365
+
366
+ /**
367
+ * Delete an organization's AI provider configuration.
368
+ * DELETE /v1/organizations/{organization_id}/ai-provider-config
369
+ * Requires a publishable key with the `management` scope.
370
+ * Acts as the user its session token was minted for, so the token must name one.
371
+ */
372
+ export const deleteOrganizationAiProviderConfig = (transport: MountayaTransport, args: {
373
+ readonly "organization_id": string;
374
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
375
+ readonly idempotencyKey?: string | undefined;
376
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
377
+ readonly ifMatch?: string | undefined;
378
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteOrganizationAiProviderConfig"]>> =>
379
+ transport.request({
380
+ actsAsMember: true,
381
+ idempotencyKey: args.idempotencyKey,
382
+ idempotent: true,
383
+ ifMatch: args.ifMatch,
384
+ method: "DELETE",
385
+ operationId: "deleteOrganizationAiProviderConfig",
386
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
387
+ requiresSession: true,
388
+ retry: options?.retry,
389
+ serverBudgetMs: 30000,
390
+ signal: options?.signal,
391
+ surface: "rest",
392
+ takesIdempotencyKey: true,
393
+ timeoutMs: options?.timeoutMs,
394
+ });
395
+
396
+ /**
397
+ * Detach a payment method from an organization.
398
+ * DELETE /v1/organizations/{organization_id}/billing/payment-methods/{payment_method_id}
399
+ * Requires a publishable key with the `management` scope.
400
+ * Acts as the user its session token was minted for, so the token must name one.
401
+ */
402
+ export const deleteOrganizationBillingPaymentMethod = (transport: MountayaTransport, args: {
403
+ readonly "organization_id": string;
404
+ readonly "payment_method_id": string;
405
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
406
+ readonly idempotencyKey?: string | undefined;
407
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteOrganizationBillingPaymentMethod"]>> =>
408
+ transport.request({
409
+ actsAsMember: true,
410
+ idempotencyKey: args.idempotencyKey,
411
+ idempotent: true,
412
+ method: "DELETE",
413
+ operationId: "deleteOrganizationBillingPaymentMethod",
414
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods/${encodeURIComponent(String(args.payment_method_id))}`,
415
+ requiresSession: true,
416
+ retry: options?.retry,
417
+ serverBudgetMs: 30000,
418
+ signal: options?.signal,
419
+ surface: "rest",
420
+ takesIdempotencyKey: true,
421
+ timeoutMs: options?.timeoutMs,
422
+ });
423
+
424
+ /**
425
+ * End an organization's Data API subscription at the end of its period.
426
+ * DELETE /v1/organizations/{organization_id}/billing/subscription
427
+ * Requires a publishable key with the `management` scope.
428
+ * Acts as the user its session token was minted for, so the token must name one.
429
+ */
430
+ export const deleteOrganizationBillingSubscription = (transport: MountayaTransport, args: {
431
+ readonly "organization_id": string;
432
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
433
+ readonly idempotencyKey?: string | undefined;
434
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteOrganizationBillingSubscription"]>> =>
435
+ transport.request({
436
+ actsAsMember: true,
437
+ dates: { data: organizationSubscriptionSummaryDates },
438
+ idempotencyKey: args.idempotencyKey,
439
+ idempotent: true,
440
+ method: "DELETE",
441
+ operationId: "deleteOrganizationBillingSubscription",
442
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/subscription`,
443
+ requiresSession: true,
444
+ retry: options?.retry,
445
+ serverBudgetMs: 30000,
446
+ signal: options?.signal,
447
+ surface: "rest",
448
+ takesIdempotencyKey: true,
449
+ timeoutMs: options?.timeoutMs,
450
+ });
451
+
452
+ /**
453
+ * Withdraw a pending invitation.
454
+ * DELETE /v1/organizations/{organization_id}/invitations/{invitation_id}
455
+ * Requires a publishable key with the `management` scope.
456
+ * Acts as the user its session token was minted for, so the token must name one.
457
+ */
458
+ export const deleteOrganizationInvitation = (transport: MountayaTransport, args: {
459
+ readonly "organization_id": string;
460
+ readonly "invitation_id": string;
461
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
462
+ readonly idempotencyKey?: string | undefined;
463
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteOrganizationInvitation"]>> =>
464
+ transport.request({
465
+ actsAsMember: true,
466
+ idempotencyKey: args.idempotencyKey,
467
+ idempotent: true,
468
+ method: "DELETE",
469
+ operationId: "deleteOrganizationInvitation",
470
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations/${encodeURIComponent(String(args.invitation_id))}`,
471
+ requiresSession: true,
472
+ retry: options?.retry,
473
+ serverBudgetMs: 30000,
474
+ signal: options?.signal,
475
+ surface: "rest",
476
+ takesIdempotencyKey: true,
477
+ timeoutMs: options?.timeoutMs,
478
+ });
479
+
480
+ /**
481
+ * Remove a member from an organization, or leave it.
482
+ * DELETE /v1/organizations/{organization_id}/members/{user_id}
483
+ * Requires a publishable key with the `management` scope.
484
+ * Acts as the user its session token was minted for, so the token must name one.
485
+ */
486
+ export const deleteOrganizationMember = (transport: MountayaTransport, args: {
487
+ readonly "organization_id": string;
488
+ readonly "user_id": string;
489
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
490
+ readonly idempotencyKey?: string | undefined;
491
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteOrganizationMember"]>> =>
492
+ transport.request({
493
+ actsAsMember: true,
494
+ idempotencyKey: args.idempotencyKey,
495
+ idempotent: true,
496
+ method: "DELETE",
497
+ operationId: "deleteOrganizationMember",
498
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/members/${encodeURIComponent(String(args.user_id))}`,
499
+ requiresSession: true,
500
+ retry: options?.retry,
501
+ serverBudgetMs: 30000,
502
+ signal: options?.signal,
503
+ surface: "rest",
504
+ takesIdempotencyKey: true,
505
+ timeoutMs: options?.timeoutMs,
506
+ });
507
+
508
+ /**
509
+ * Revoke a publishable key.
510
+ * DELETE /v1/organizations/{organization_id}/publishable-keys/{key_id}
511
+ * Requires a publishable key with the `management` scope.
512
+ * Acts as the user its session token was minted for, so the token must name one.
513
+ */
514
+ export const deleteOrganizationPublishableKey = (transport: MountayaTransport, args: {
515
+ readonly "organization_id": string;
516
+ readonly "key_id": string;
517
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
518
+ readonly idempotencyKey?: string | undefined;
519
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
520
+ readonly ifMatch?: string | undefined;
521
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteOrganizationPublishableKey"]>> =>
522
+ transport.request({
523
+ actsAsMember: true,
524
+ dates: { data: publishableKeyDates },
525
+ idempotencyKey: args.idempotencyKey,
526
+ idempotent: true,
527
+ ifMatch: args.ifMatch,
528
+ method: "DELETE",
529
+ operationId: "deleteOrganizationPublishableKey",
530
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys/${encodeURIComponent(String(args.key_id))}`,
531
+ requiresSession: true,
532
+ retry: options?.retry,
533
+ serverBudgetMs: 30000,
534
+ signal: options?.signal,
535
+ surface: "rest",
536
+ takesIdempotencyKey: true,
537
+ timeoutMs: options?.timeoutMs,
538
+ });
539
+
540
+ /**
541
+ * Delete a webhook endpoint.
542
+ * DELETE /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
543
+ * Requires a publishable key with the `management` scope.
544
+ * Acts as the user its session token was minted for, so the token must name one.
545
+ */
546
+ export const deleteOrganizationWebhookEndpoint = (transport: MountayaTransport, args: {
547
+ readonly "organization_id": string;
548
+ readonly "webhook_endpoint_id": string;
549
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
550
+ readonly idempotencyKey?: string | undefined;
551
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
552
+ readonly ifMatch?: string | undefined;
553
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteOrganizationWebhookEndpoint"]>> =>
554
+ transport.request({
555
+ actsAsMember: true,
556
+ idempotencyKey: args.idempotencyKey,
557
+ idempotent: true,
558
+ ifMatch: args.ifMatch,
559
+ method: "DELETE",
560
+ operationId: "deleteOrganizationWebhookEndpoint",
561
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints/${encodeURIComponent(String(args.webhook_endpoint_id))}`,
562
+ requiresSession: true,
563
+ retry: options?.retry,
564
+ serverBudgetMs: 30000,
565
+ signal: options?.signal,
566
+ surface: "rest",
567
+ takesIdempotencyKey: true,
568
+ timeoutMs: options?.timeoutMs,
569
+ });
570
+
571
+ /**
572
+ * Delete a zone.
573
+ * DELETE /v1/zones/{zone_id}
574
+ * Requires a publishable key with the `studio-embedded` scope.
575
+ * Acts as the user its session token was minted for, so the token must name one.
576
+ */
577
+ export const deleteZone = (transport: MountayaTransport, args: {
578
+ readonly "zone_id": string;
579
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
580
+ readonly idempotencyKey?: string | undefined;
581
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
582
+ readonly ifMatch?: string | undefined;
583
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteZone"]>> =>
584
+ transport.request({
585
+ actsAsMember: true,
586
+ idempotencyKey: args.idempotencyKey,
587
+ idempotent: true,
588
+ ifMatch: args.ifMatch,
589
+ method: "DELETE",
590
+ operationId: "deleteZone",
591
+ path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}`,
592
+ requiresSession: true,
593
+ retry: options?.retry,
594
+ serverBudgetMs: 30000,
595
+ signal: options?.signal,
596
+ surface: "rest",
597
+ takesIdempotencyKey: true,
598
+ timeoutMs: options?.timeoutMs,
599
+ });
600
+
601
+ /**
602
+ * Take the zone's publication down.
603
+ * DELETE /v1/zones/{zone_id}/publication
604
+ * Requires a publishable key with the `studio-embedded` scope.
605
+ * Acts as the user its session token was minted for, so the token must name one.
606
+ */
607
+ export const deleteZonePublication = (transport: MountayaTransport, args: {
608
+ readonly "zone_id": string;
609
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
610
+ readonly idempotencyKey?: string | undefined;
611
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
612
+ readonly ifMatch?: string | undefined;
613
+ }, options?: RequestOptions): Promise<SuccessBody<operations["deleteZonePublication"]>> =>
614
+ transport.request({
615
+ actsAsMember: true,
616
+ dates: { data: zoneDates },
617
+ idempotencyKey: args.idempotencyKey,
618
+ idempotent: true,
619
+ ifMatch: args.ifMatch,
620
+ method: "DELETE",
621
+ operationId: "deleteZonePublication",
622
+ path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/publication`,
623
+ requiresSession: true,
624
+ retry: options?.retry,
625
+ serverBudgetMs: 30000,
626
+ signal: options?.signal,
627
+ surface: "rest",
628
+ takesIdempotencyKey: true,
629
+ timeoutMs: options?.timeoutMs,
630
+ });
631
+
632
+ /**
633
+ * List all activity categories and their activities.
634
+ * GET /v1/activities
635
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
636
+ */
637
+ export const getActivities = (transport: MountayaTransport, options?: RequestOptions): Promise<SuccessBody<operations["getActivities"]>> =>
638
+ transport.request({
639
+ acceptsShareToken: true,
640
+ idempotent: true,
641
+ method: "GET",
642
+ operationId: "getActivities",
643
+ path: "/v1/activities",
644
+ retry: options?.retry,
645
+ serverBudgetMs: 30000,
646
+ signal: options?.signal,
647
+ surface: "rest",
648
+ timeoutMs: options?.timeoutMs,
649
+ });
650
+
651
+ /**
652
+ * Stream an agent run's events over Server-Sent Events.
653
+ * GET /v1/agent/runs/{run_id}/events
654
+ * Requires a publishable key with the `studio-embedded` scope.
655
+ * Acts as the user its session token was minted for, so the token must name one.
656
+ */
657
+ export const getAgentRunEvents = (transport: MountayaTransport, args: {
658
+ readonly "run_id": string;
659
+ }, options?: RequestOptions): Promise<BinaryBody> =>
660
+ transport.requestBinary({
661
+ accept: "text/event-stream",
662
+ actsAsMember: true,
663
+ idempotent: true,
664
+ method: "GET",
665
+ operationId: "getAgentRunEvents",
666
+ path: `/v1/agent/runs/${encodeURIComponent(String(args.run_id))}/events`,
667
+ requiresSession: true,
668
+ retry: options?.retry,
669
+ signal: options?.signal,
670
+ surface: "rest",
671
+ timeoutMs: options?.timeoutMs,
672
+ });
673
+
674
+ /**
675
+ * List the AI provider catalog.
676
+ * GET /v1/ai-providers
677
+ * Requires a publishable key with the `management` scope.
678
+ */
679
+ export const getAiProviders = (transport: MountayaTransport, options?: RequestOptions): Promise<SuccessBody<operations["getAiProviders"]>> =>
680
+ transport.request({
681
+ idempotent: true,
682
+ method: "GET",
683
+ operationId: "getAiProviders",
684
+ path: "/v1/ai-providers",
685
+ requiresSession: true,
686
+ retry: options?.retry,
687
+ serverBudgetMs: 30000,
688
+ signal: options?.signal,
689
+ surface: "rest",
690
+ timeoutMs: options?.timeoutMs,
691
+ });
692
+
693
+ /**
694
+ * List the billing catalog.
695
+ * GET /v1/billing/products
696
+ * Requires a publishable key with the `management` scope.
697
+ */
698
+ export const getBillingProducts = (transport: MountayaTransport, options?: RequestOptions): Promise<SuccessBody<operations["getBillingProducts"]>> =>
699
+ transport.request({
700
+ idempotent: true,
701
+ method: "GET",
702
+ operationId: "getBillingProducts",
703
+ path: "/v1/billing/products",
704
+ requiresSession: true,
705
+ retry: options?.retry,
706
+ serverBudgetMs: 30000,
707
+ signal: options?.signal,
708
+ surface: "rest",
709
+ timeoutMs: options?.timeoutMs,
710
+ });
711
+
712
+ /**
713
+ * Retrieve a single collection with its itineraries and zones.
714
+ * GET /v1/collections/{collection_id}
715
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
716
+ */
717
+ export const getCollection = (transport: MountayaTransport, args: {
718
+ readonly "collection_id": string;
719
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getCollection"]>> =>
720
+ transport.request({
721
+ acceptsShareToken: true,
722
+ dates: { data: collectionDates },
723
+ idempotent: true,
724
+ method: "GET",
725
+ operationId: "getCollection",
726
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}`,
727
+ retry: options?.retry,
728
+ serverBudgetMs: 30000,
729
+ signal: options?.signal,
730
+ surface: "rest",
731
+ timeoutMs: options?.timeoutMs,
732
+ });
733
+
734
+ /**
735
+ * List the itineraries a collection contains.
736
+ * GET /v1/collections/{collection_id}/itineraries
737
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
738
+ */
739
+ export const getCollectionItineraries = (transport: MountayaTransport, args: {
740
+ readonly "collection_id": string;
741
+ readonly query?: NonNullable<operations["getCollectionItineraries"]["parameters"]["query"]> | undefined;
742
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getCollectionItineraries"]>> =>
743
+ transport.request({
744
+ acceptsShareToken: true,
745
+ dates: { data: [itineraryDates] },
746
+ idempotent: true,
747
+ method: "GET",
748
+ operationId: "getCollectionItineraries",
749
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries`,
750
+ query: args.query,
751
+ retry: options?.retry,
752
+ serverBudgetMs: 30000,
753
+ signal: options?.signal,
754
+ surface: "rest",
755
+ timeoutMs: options?.timeoutMs,
756
+ });
757
+
758
+ /**
759
+ * List collections.
760
+ * GET /v1/collections
761
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
762
+ */
763
+ export const getCollections = (transport: MountayaTransport, args: {
764
+ readonly query?: NonNullable<operations["getCollections"]["parameters"]["query"]> | undefined;
765
+ } = {}, options?: RequestOptions): Promise<SuccessBody<operations["getCollections"]>> =>
766
+ transport.request({
767
+ dates: { data: [collectionDates] },
768
+ idempotent: true,
769
+ method: "GET",
770
+ operationId: "getCollections",
771
+ path: "/v1/collections",
772
+ query: args.query,
773
+ retry: options?.retry,
774
+ serverBudgetMs: 30000,
775
+ signal: options?.signal,
776
+ surface: "rest",
777
+ timeoutMs: options?.timeoutMs,
778
+ });
779
+
780
+ /**
781
+ * Read the collection's share link.
782
+ * GET /v1/collections/{collection_id}/share-link
783
+ * Requires a publishable key with the `studio-embedded` scope.
784
+ * Acts as the user its session token was minted for, so the token must name one.
785
+ */
786
+ export const getCollectionShareLink = (transport: MountayaTransport, args: {
787
+ readonly "collection_id": string;
788
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getCollectionShareLink"]>> =>
789
+ transport.request({
790
+ actsAsMember: true,
791
+ dates: { data: shareLinkDates },
792
+ idempotent: true,
793
+ method: "GET",
794
+ operationId: "getCollectionShareLink",
795
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link`,
796
+ requiresSession: true,
797
+ retry: options?.retry,
798
+ serverBudgetMs: 30000,
799
+ signal: options?.signal,
800
+ surface: "rest",
801
+ timeoutMs: options?.timeoutMs,
802
+ });
803
+
804
+ /**
805
+ * List the zones a collection contains.
806
+ * GET /v1/collections/{collection_id}/zones
807
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
808
+ */
809
+ export const getCollectionZones = (transport: MountayaTransport, args: {
810
+ readonly "collection_id": string;
811
+ readonly query?: NonNullable<operations["getCollectionZones"]["parameters"]["query"]> | undefined;
812
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getCollectionZones"]>> =>
813
+ transport.request({
814
+ acceptsShareToken: true,
815
+ dates: { data: [zoneDates] },
816
+ idempotent: true,
817
+ method: "GET",
818
+ operationId: "getCollectionZones",
819
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/zones`,
820
+ query: args.query,
821
+ retry: options?.retry,
822
+ serverBudgetMs: 30000,
823
+ signal: options?.signal,
824
+ surface: "rest",
825
+ timeoutMs: options?.timeoutMs,
826
+ });
827
+
828
+ /**
829
+ * List the itineraries the credential reaches.
830
+ * GET /v1/itineraries
831
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
832
+ */
833
+ export const getItineraries = (transport: MountayaTransport, args: {
834
+ readonly query?: NonNullable<operations["getItineraries"]["parameters"]["query"]> | undefined;
835
+ } = {}, options?: RequestOptions): Promise<SuccessBody<operations["getItineraries"]>> =>
836
+ transport.request({
837
+ dates: { data: [itineraryDates] },
838
+ idempotent: true,
839
+ method: "GET",
840
+ operationId: "getItineraries",
841
+ path: "/v1/itineraries",
842
+ query: args.query,
843
+ retry: options?.retry,
844
+ serverBudgetMs: 30000,
845
+ signal: options?.signal,
846
+ surface: "rest",
847
+ timeoutMs: options?.timeoutMs,
848
+ });
849
+
850
+ /**
851
+ * Retrieve a single itinerary with its segments and waypoints.
852
+ * GET /v1/itineraries/{itinerary_id}
853
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
854
+ */
855
+ export const getItinerary = (transport: MountayaTransport, args: {
856
+ readonly "itinerary_id": string;
857
+ readonly query?: NonNullable<operations["getItinerary"]["parameters"]["query"]> | undefined;
858
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getItinerary"]>> =>
859
+ transport.request({
860
+ acceptsShareToken: true,
861
+ dates: { data: itineraryWithDetailsDates },
862
+ idempotent: true,
863
+ method: "GET",
864
+ operationId: "getItinerary",
865
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
866
+ query: args.query,
867
+ retry: options?.retry,
868
+ serverBudgetMs: 30000,
869
+ signal: options?.signal,
870
+ surface: "rest",
871
+ timeoutMs: options?.timeoutMs,
872
+ });
873
+
874
+ /**
875
+ * Stream one itinerary's collaboration session over SSE.
876
+ * GET /v1/itineraries/{itinerary_id}/events
877
+ * Requires a publishable key with the `studio-embedded` scope.
878
+ * Acts as the user its session token was minted for, so the token must name one.
879
+ */
880
+ export const getItineraryEvents = (transport: MountayaTransport, args: {
881
+ readonly "itinerary_id": string;
882
+ }, options?: RequestOptions): Promise<BinaryBody> =>
883
+ transport.requestBinary({
884
+ accept: "text/event-stream",
885
+ actsAsMember: true,
886
+ idempotent: true,
887
+ method: "GET",
888
+ operationId: "getItineraryEvents",
889
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/events`,
890
+ requiresSession: true,
891
+ retry: options?.retry,
892
+ signal: options?.signal,
893
+ surface: "rest",
894
+ timeoutMs: options?.timeoutMs,
895
+ });
896
+
897
+ /**
898
+ * Export an itinerary as a downloadable file.
899
+ * GET /v1/itineraries/{itinerary_id}/export
900
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
901
+ */
902
+ export const getItineraryExport = (transport: MountayaTransport, args: {
903
+ readonly "itinerary_id": string;
904
+ readonly query?: NonNullable<operations["getItineraryExport"]["parameters"]["query"]> | undefined;
905
+ }, options?: RequestOptions): Promise<BinaryBody> =>
906
+ transport.requestBinary({
907
+ accept: "application/gpx+xml, application/geo+json, application/vnd.google-earth.kml+xml, application/vnd.google-earth.kmz, application/vnd.ant.fit, application/vnd.garmin.tcx+xml, text/csv",
908
+ acceptsShareToken: true,
909
+ idempotent: true,
910
+ method: "GET",
911
+ operationId: "getItineraryExport",
912
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/export`,
913
+ query: args.query,
914
+ retry: options?.retry,
915
+ serverBudgetMs: 30000,
916
+ signal: options?.signal,
917
+ surface: "rest",
918
+ timeoutMs: options?.timeoutMs,
919
+ });
920
+
921
+ /**
922
+ * Re-time an itinerary at a travel pace the caller names.
923
+ * GET /v1/itineraries/{itinerary_id}/pace
924
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
925
+ */
926
+ export const getItineraryPace = (transport: MountayaTransport, args: {
927
+ readonly "itinerary_id": string;
928
+ readonly query?: NonNullable<operations["getItineraryPace"]["parameters"]["query"]> | undefined;
929
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getItineraryPace"]>> =>
930
+ transport.request({
931
+ acceptsShareToken: true,
932
+ idempotent: true,
933
+ method: "GET",
934
+ operationId: "getItineraryPace",
935
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/pace`,
936
+ query: args.query,
937
+ retry: options?.retry,
938
+ serverBudgetMs: 30000,
939
+ signal: options?.signal,
940
+ surface: "rest",
941
+ timeoutMs: options?.timeoutMs,
942
+ });
943
+
944
+ /**
945
+ * Read the itinerary's share link.
946
+ * GET /v1/itineraries/{itinerary_id}/share-link
947
+ * Requires a publishable key with the `studio-embedded` scope.
948
+ * Acts as the user its session token was minted for, so the token must name one.
949
+ */
950
+ export const getItineraryShareLink = (transport: MountayaTransport, args: {
951
+ readonly "itinerary_id": string;
952
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getItineraryShareLink"]>> =>
953
+ transport.request({
954
+ actsAsMember: true,
955
+ dates: { data: shareLinkDates },
956
+ idempotent: true,
957
+ method: "GET",
958
+ operationId: "getItineraryShareLink",
959
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link`,
960
+ requiresSession: true,
961
+ retry: options?.retry,
962
+ serverBudgetMs: 30000,
963
+ signal: options?.signal,
964
+ surface: "rest",
965
+ timeoutMs: options?.timeoutMs,
966
+ });
967
+
968
+ /**
969
+ * List terrains, overlays, and the zone layer.
970
+ * GET /v1/layers
971
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
972
+ */
973
+ export const getLayers = (transport: MountayaTransport, args: {
974
+ readonly query?: NonNullable<operations["getLayers"]["parameters"]["query"]> | undefined;
975
+ } = {}, options?: RequestOptions): Promise<SuccessBody<operations["getLayers"]>> =>
976
+ transport.request({
977
+ acceptsShareToken: true,
978
+ idempotent: true,
979
+ method: "GET",
980
+ operationId: "getLayers",
981
+ path: "/v1/layers",
982
+ query: args.query,
983
+ retry: options?.retry,
984
+ serverBudgetMs: 30000,
985
+ signal: options?.signal,
986
+ surface: "rest",
987
+ timeoutMs: options?.timeoutMs,
988
+ });
989
+
990
+ /**
991
+ * List the invitations waiting for the acting user.
992
+ * GET /v1/me/invitations
993
+ * Requires a publishable key with the `studio-embedded` scope.
994
+ * Acts as the user its session token was minted for, so the token must name one.
995
+ */
996
+ export const getMyInvitations = (transport: MountayaTransport, args: {
997
+ readonly query?: NonNullable<operations["getMyInvitations"]["parameters"]["query"]> | undefined;
998
+ } = {}, options?: RequestOptions): Promise<SuccessBody<operations["getMyInvitations"]>> =>
999
+ transport.request({
1000
+ actsAsMember: true,
1001
+ dates: { data: [userInvitationDates] },
1002
+ idempotent: true,
1003
+ method: "GET",
1004
+ operationId: "getMyInvitations",
1005
+ path: "/v1/me/invitations",
1006
+ query: args.query,
1007
+ requiresSession: true,
1008
+ retry: options?.retry,
1009
+ serverBudgetMs: 30000,
1010
+ signal: options?.signal,
1011
+ surface: "rest",
1012
+ timeoutMs: options?.timeoutMs,
1013
+ });
1014
+
1015
+ /**
1016
+ * Retrieve the acting user's notification emails for an organization.
1017
+ * GET /v1/me/organizations/{organization_id}/notification-preferences
1018
+ * Requires a publishable key with the `studio-embedded` scope.
1019
+ * Acts as the user its session token was minted for, so the token must name one.
1020
+ */
1021
+ export const getMyOrganizationNotificationPreferences = (transport: MountayaTransport, args: {
1022
+ readonly "organization_id": string;
1023
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getMyOrganizationNotificationPreferences"]>> =>
1024
+ transport.request({
1025
+ actsAsMember: true,
1026
+ idempotent: true,
1027
+ method: "GET",
1028
+ operationId: "getMyOrganizationNotificationPreferences",
1029
+ path: `/v1/me/organizations/${encodeURIComponent(String(args.organization_id))}/notification-preferences`,
1030
+ requiresSession: true,
1031
+ retry: options?.retry,
1032
+ serverBudgetMs: 30000,
1033
+ signal: options?.signal,
1034
+ surface: "rest",
1035
+ timeoutMs: options?.timeoutMs,
1036
+ });
1037
+
1038
+ /**
1039
+ * List the acting user's memberships.
1040
+ * GET /v1/me/organizations
1041
+ * Requires a publishable key with the `studio-embedded` scope.
1042
+ * Acts as the user its session token was minted for, so the token must name one.
1043
+ */
1044
+ export const getMyOrganizations = (transport: MountayaTransport, args: {
1045
+ readonly query?: NonNullable<operations["getMyOrganizations"]["parameters"]["query"]> | undefined;
1046
+ } = {}, options?: RequestOptions): Promise<SuccessBody<operations["getMyOrganizations"]>> =>
1047
+ transport.request({
1048
+ actsAsMember: true,
1049
+ dates: { data: [membershipDates] },
1050
+ idempotent: true,
1051
+ method: "GET",
1052
+ operationId: "getMyOrganizations",
1053
+ path: "/v1/me/organizations",
1054
+ query: args.query,
1055
+ requiresSession: true,
1056
+ retry: options?.retry,
1057
+ serverBudgetMs: 30000,
1058
+ signal: options?.signal,
1059
+ surface: "rest",
1060
+ timeoutMs: options?.timeoutMs,
1061
+ });
1062
+
1063
+ /**
1064
+ * Retrieve the acting user's display preferences.
1065
+ * GET /v1/me/preferences
1066
+ * Requires a publishable key with the `studio-embedded` scope.
1067
+ * Acts as the user its session token was minted for, so the token must name one.
1068
+ */
1069
+ export const getMyPreferences = (transport: MountayaTransport, options?: RequestOptions): Promise<SuccessBody<operations["getMyPreferences"]>> =>
1070
+ transport.request({
1071
+ actsAsMember: true,
1072
+ idempotent: true,
1073
+ method: "GET",
1074
+ operationId: "getMyPreferences",
1075
+ path: "/v1/me/preferences",
1076
+ requiresSession: true,
1077
+ retry: options?.retry,
1078
+ serverBudgetMs: 30000,
1079
+ signal: options?.signal,
1080
+ surface: "rest",
1081
+ timeoutMs: options?.timeoutMs,
1082
+ });
1083
+
1084
+ /**
1085
+ * Retrieve an organization.
1086
+ * GET /v1/organizations/{organization_id}
1087
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
1088
+ */
1089
+ export const getOrganization = (transport: MountayaTransport, args: {
1090
+ readonly "organization_id": string;
1091
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganization"]>> =>
1092
+ transport.request({
1093
+ acceptsShareToken: true,
1094
+ dates: { data: organizationDates },
1095
+ idempotent: true,
1096
+ method: "GET",
1097
+ operationId: "getOrganization",
1098
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}`,
1099
+ retry: options?.retry,
1100
+ serverBudgetMs: 30000,
1101
+ signal: options?.signal,
1102
+ surface: "rest",
1103
+ timeoutMs: options?.timeoutMs,
1104
+ });
1105
+
1106
+ /**
1107
+ * Retrieve an organization's AI provider configuration.
1108
+ * GET /v1/organizations/{organization_id}/ai-provider-config
1109
+ * Requires a publishable key with the `management` scope.
1110
+ */
1111
+ export const getOrganizationAiProviderConfig = (transport: MountayaTransport, args: {
1112
+ readonly "organization_id": string;
1113
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationAiProviderConfig"]>> =>
1114
+ transport.request({
1115
+ idempotent: true,
1116
+ method: "GET",
1117
+ operationId: "getOrganizationAiProviderConfig",
1118
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
1119
+ requiresSession: true,
1120
+ retry: options?.retry,
1121
+ serverBudgetMs: 30000,
1122
+ signal: options?.signal,
1123
+ surface: "rest",
1124
+ timeoutMs: options?.timeoutMs,
1125
+ });
1126
+
1127
+ /**
1128
+ * Retrieve an organization's billing information.
1129
+ * GET /v1/organizations/{organization_id}/billing/info
1130
+ * Requires a publishable key with the `management` scope.
1131
+ */
1132
+ export const getOrganizationBillingInfo = (transport: MountayaTransport, args: {
1133
+ readonly "organization_id": string;
1134
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationBillingInfo"]>> =>
1135
+ transport.request({
1136
+ idempotent: true,
1137
+ method: "GET",
1138
+ operationId: "getOrganizationBillingInfo",
1139
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/info`,
1140
+ requiresSession: true,
1141
+ retry: options?.retry,
1142
+ serverBudgetMs: 30000,
1143
+ signal: options?.signal,
1144
+ surface: "rest",
1145
+ timeoutMs: options?.timeoutMs,
1146
+ });
1147
+
1148
+ /**
1149
+ * List an organization's invoices.
1150
+ * GET /v1/organizations/{organization_id}/billing/invoices
1151
+ * Requires a publishable key with the `management` scope.
1152
+ */
1153
+ export const getOrganizationBillingInvoices = (transport: MountayaTransport, args: {
1154
+ readonly "organization_id": string;
1155
+ readonly query?: NonNullable<operations["getOrganizationBillingInvoices"]["parameters"]["query"]> | undefined;
1156
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationBillingInvoices"]>> =>
1157
+ transport.request({
1158
+ dates: { data: [invoiceDates] },
1159
+ idempotent: true,
1160
+ method: "GET",
1161
+ operationId: "getOrganizationBillingInvoices",
1162
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/invoices`,
1163
+ query: args.query,
1164
+ requiresSession: true,
1165
+ retry: options?.retry,
1166
+ serverBudgetMs: 30000,
1167
+ signal: options?.signal,
1168
+ surface: "rest",
1169
+ timeoutMs: options?.timeoutMs,
1170
+ });
1171
+
1172
+ /**
1173
+ * List an organization's saved payment methods.
1174
+ * GET /v1/organizations/{organization_id}/billing/payment-methods
1175
+ * Requires a publishable key with the `management` scope.
1176
+ */
1177
+ export const getOrganizationBillingPaymentMethods = (transport: MountayaTransport, args: {
1178
+ readonly "organization_id": string;
1179
+ readonly query?: NonNullable<operations["getOrganizationBillingPaymentMethods"]["parameters"]["query"]> | undefined;
1180
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationBillingPaymentMethods"]>> =>
1181
+ transport.request({
1182
+ idempotent: true,
1183
+ method: "GET",
1184
+ operationId: "getOrganizationBillingPaymentMethods",
1185
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods`,
1186
+ query: args.query,
1187
+ requiresSession: true,
1188
+ retry: options?.retry,
1189
+ serverBudgetMs: 30000,
1190
+ signal: options?.signal,
1191
+ surface: "rest",
1192
+ timeoutMs: options?.timeoutMs,
1193
+ });
1194
+
1195
+ /**
1196
+ * Check what a promotion code is worth to an organization.
1197
+ * GET /v1/organizations/{organization_id}/billing/promotion-codes/{code}
1198
+ * Requires a publishable key with the `management` scope.
1199
+ */
1200
+ export const getOrganizationBillingPromotionCode = (transport: MountayaTransport, args: {
1201
+ readonly "organization_id": string;
1202
+ readonly "code": string;
1203
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationBillingPromotionCode"]>> =>
1204
+ transport.request({
1205
+ idempotent: true,
1206
+ method: "GET",
1207
+ operationId: "getOrganizationBillingPromotionCode",
1208
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/promotion-codes/${encodeURIComponent(String(args.code))}`,
1209
+ requiresSession: true,
1210
+ retry: options?.retry,
1211
+ serverBudgetMs: 30000,
1212
+ signal: options?.signal,
1213
+ surface: "rest",
1214
+ timeoutMs: options?.timeoutMs,
1215
+ });
1216
+
1217
+ /**
1218
+ * Retrieve an organization's subscription.
1219
+ * GET /v1/organizations/{organization_id}/billing/subscription
1220
+ * Requires a publishable key with the `management` scope.
1221
+ */
1222
+ export const getOrganizationBillingSubscription = (transport: MountayaTransport, args: {
1223
+ readonly "organization_id": string;
1224
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationBillingSubscription"]>> =>
1225
+ transport.request({
1226
+ dates: { data: organizationSubscriptionSummaryDates },
1227
+ idempotent: true,
1228
+ method: "GET",
1229
+ operationId: "getOrganizationBillingSubscription",
1230
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/subscription`,
1231
+ requiresSession: true,
1232
+ retry: options?.retry,
1233
+ serverBudgetMs: 30000,
1234
+ signal: options?.signal,
1235
+ surface: "rest",
1236
+ timeoutMs: options?.timeoutMs,
1237
+ });
1238
+
1239
+ /**
1240
+ * Stream an organization's list events over SSE.
1241
+ * GET /v1/organizations/{organization_id}/events
1242
+ * Requires a publishable key with the `studio-embedded` scope.
1243
+ * Acts as the user its session token was minted for, so the token must name one.
1244
+ */
1245
+ export const getOrganizationEvents = (transport: MountayaTransport, args: {
1246
+ readonly "organization_id": string;
1247
+ }, options?: RequestOptions): Promise<BinaryBody> =>
1248
+ transport.requestBinary({
1249
+ accept: "text/event-stream",
1250
+ actsAsMember: true,
1251
+ idempotent: true,
1252
+ method: "GET",
1253
+ operationId: "getOrganizationEvents",
1254
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/events`,
1255
+ requiresSession: true,
1256
+ retry: options?.retry,
1257
+ signal: options?.signal,
1258
+ surface: "rest",
1259
+ timeoutMs: options?.timeoutMs,
1260
+ });
1261
+
1262
+ /**
1263
+ * Retrieve a pending invitation.
1264
+ * GET /v1/organizations/{organization_id}/invitations/{invitation_id}
1265
+ * Requires a publishable key with the `management` scope.
1266
+ */
1267
+ export const getOrganizationInvitation = (transport: MountayaTransport, args: {
1268
+ readonly "organization_id": string;
1269
+ readonly "invitation_id": string;
1270
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationInvitation"]>> =>
1271
+ transport.request({
1272
+ dates: { data: organizationInvitationDates },
1273
+ idempotent: true,
1274
+ method: "GET",
1275
+ operationId: "getOrganizationInvitation",
1276
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations/${encodeURIComponent(String(args.invitation_id))}`,
1277
+ requiresSession: true,
1278
+ retry: options?.retry,
1279
+ serverBudgetMs: 30000,
1280
+ signal: options?.signal,
1281
+ surface: "rest",
1282
+ timeoutMs: options?.timeoutMs,
1283
+ });
1284
+
1285
+ /**
1286
+ * List an organization's pending invitations.
1287
+ * GET /v1/organizations/{organization_id}/invitations
1288
+ * Requires a publishable key with the `management` scope.
1289
+ */
1290
+ export const getOrganizationInvitations = (transport: MountayaTransport, args: {
1291
+ readonly "organization_id": string;
1292
+ readonly query?: NonNullable<operations["getOrganizationInvitations"]["parameters"]["query"]> | undefined;
1293
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationInvitations"]>> =>
1294
+ transport.request({
1295
+ dates: { data: [organizationInvitationDates] },
1296
+ idempotent: true,
1297
+ method: "GET",
1298
+ operationId: "getOrganizationInvitations",
1299
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations`,
1300
+ query: args.query,
1301
+ requiresSession: true,
1302
+ retry: options?.retry,
1303
+ serverBudgetMs: 30000,
1304
+ signal: options?.signal,
1305
+ surface: "rest",
1306
+ timeoutMs: options?.timeoutMs,
1307
+ });
1308
+
1309
+ /**
1310
+ * List an organization's members.
1311
+ * GET /v1/organizations/{organization_id}/members
1312
+ * Requires a publishable key with the `management` scope.
1313
+ */
1314
+ export const getOrganizationMembers = (transport: MountayaTransport, args: {
1315
+ readonly "organization_id": string;
1316
+ readonly query?: NonNullable<operations["getOrganizationMembers"]["parameters"]["query"]> | undefined;
1317
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationMembers"]>> =>
1318
+ transport.request({
1319
+ dates: { data: [organizationMemberDates] },
1320
+ idempotent: true,
1321
+ method: "GET",
1322
+ operationId: "getOrganizationMembers",
1323
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/members`,
1324
+ query: args.query,
1325
+ requiresSession: true,
1326
+ retry: options?.retry,
1327
+ serverBudgetMs: 30000,
1328
+ signal: options?.signal,
1329
+ surface: "rest",
1330
+ timeoutMs: options?.timeoutMs,
1331
+ });
1332
+
1333
+ /**
1334
+ * Retrieve a publishable key.
1335
+ * GET /v1/organizations/{organization_id}/publishable-keys/{key_id}
1336
+ * Requires a publishable key with the `management` scope.
1337
+ */
1338
+ export const getOrganizationPublishableKey = (transport: MountayaTransport, args: {
1339
+ readonly "organization_id": string;
1340
+ readonly "key_id": string;
1341
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationPublishableKey"]>> =>
1342
+ transport.request({
1343
+ dates: { data: publishableKeyDates },
1344
+ idempotent: true,
1345
+ method: "GET",
1346
+ operationId: "getOrganizationPublishableKey",
1347
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys/${encodeURIComponent(String(args.key_id))}`,
1348
+ requiresSession: true,
1349
+ retry: options?.retry,
1350
+ serverBudgetMs: 30000,
1351
+ signal: options?.signal,
1352
+ surface: "rest",
1353
+ timeoutMs: options?.timeoutMs,
1354
+ });
1355
+
1356
+ /**
1357
+ * List an organization's publishable keys.
1358
+ * GET /v1/organizations/{organization_id}/publishable-keys
1359
+ * Requires a publishable key with the `management` scope.
1360
+ */
1361
+ export const getOrganizationPublishableKeys = (transport: MountayaTransport, args: {
1362
+ readonly "organization_id": string;
1363
+ readonly query?: NonNullable<operations["getOrganizationPublishableKeys"]["parameters"]["query"]> | undefined;
1364
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationPublishableKeys"]>> =>
1365
+ transport.request({
1366
+ dates: { data: [publishableKeyDates] },
1367
+ idempotent: true,
1368
+ method: "GET",
1369
+ operationId: "getOrganizationPublishableKeys",
1370
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys`,
1371
+ query: args.query,
1372
+ requiresSession: true,
1373
+ retry: options?.retry,
1374
+ serverBudgetMs: 30000,
1375
+ signal: options?.signal,
1376
+ surface: "rest",
1377
+ timeoutMs: options?.timeoutMs,
1378
+ });
1379
+
1380
+ /**
1381
+ * Retrieve an organization's Map Publishing settings.
1382
+ * GET /v1/organizations/{organization_id}/settings
1383
+ * Requires a publishable key with the `management` scope.
1384
+ */
1385
+ export const getOrganizationSettings = (transport: MountayaTransport, args: {
1386
+ readonly "organization_id": string;
1387
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationSettings"]>> =>
1388
+ transport.request({
1389
+ idempotent: true,
1390
+ method: "GET",
1391
+ operationId: "getOrganizationSettings",
1392
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/settings`,
1393
+ requiresSession: true,
1394
+ retry: options?.retry,
1395
+ serverBudgetMs: 30000,
1396
+ signal: options?.signal,
1397
+ surface: "rest",
1398
+ timeoutMs: options?.timeoutMs,
1399
+ });
1400
+
1401
+ /**
1402
+ * Retrieve an organization's data usage.
1403
+ * GET /v1/organizations/{organization_id}/usage/data
1404
+ * Requires a publishable key with the `management` scope.
1405
+ */
1406
+ export const getOrganizationUsageData = (transport: MountayaTransport, args: {
1407
+ readonly "organization_id": string;
1408
+ readonly query?: NonNullable<operations["getOrganizationUsageData"]["parameters"]["query"]> | undefined;
1409
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationUsageData"]>> =>
1410
+ transport.request({
1411
+ idempotent: true,
1412
+ method: "GET",
1413
+ operationId: "getOrganizationUsageData",
1414
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/usage/data`,
1415
+ query: args.query,
1416
+ requiresSession: true,
1417
+ retry: options?.retry,
1418
+ serverBudgetMs: 30000,
1419
+ signal: options?.signal,
1420
+ surface: "rest",
1421
+ timeoutMs: options?.timeoutMs,
1422
+ });
1423
+
1424
+ /**
1425
+ * Retrieve an organization's Tile API usage.
1426
+ * GET /v1/organizations/{organization_id}/usage/tiles
1427
+ * Requires a publishable key with the `management` scope.
1428
+ */
1429
+ export const getOrganizationUsageTiles = (transport: MountayaTransport, args: {
1430
+ readonly "organization_id": string;
1431
+ readonly query?: NonNullable<operations["getOrganizationUsageTiles"]["parameters"]["query"]> | undefined;
1432
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationUsageTiles"]>> =>
1433
+ transport.request({
1434
+ idempotent: true,
1435
+ method: "GET",
1436
+ operationId: "getOrganizationUsageTiles",
1437
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/usage/tiles`,
1438
+ query: args.query,
1439
+ requiresSession: true,
1440
+ retry: options?.retry,
1441
+ serverBudgetMs: 30000,
1442
+ signal: options?.signal,
1443
+ surface: "rest",
1444
+ timeoutMs: options?.timeoutMs,
1445
+ });
1446
+
1447
+ /**
1448
+ * List an organization's webhook deliveries.
1449
+ * GET /v1/organizations/{organization_id}/webhook-deliveries
1450
+ * Requires a publishable key with the `management` scope.
1451
+ */
1452
+ export const getOrganizationWebhookDeliveries = (transport: MountayaTransport, args: {
1453
+ readonly "organization_id": string;
1454
+ readonly query?: NonNullable<operations["getOrganizationWebhookDeliveries"]["parameters"]["query"]> | undefined;
1455
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationWebhookDeliveries"]>> =>
1456
+ transport.request({
1457
+ dates: { data: [webhookDeliveryDates] },
1458
+ idempotent: true,
1459
+ method: "GET",
1460
+ operationId: "getOrganizationWebhookDeliveries",
1461
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-deliveries`,
1462
+ query: args.query,
1463
+ requiresSession: true,
1464
+ retry: options?.retry,
1465
+ serverBudgetMs: 30000,
1466
+ signal: options?.signal,
1467
+ surface: "rest",
1468
+ timeoutMs: options?.timeoutMs,
1469
+ });
1470
+
1471
+ /**
1472
+ * Retrieve a webhook delivery with its attempts.
1473
+ * GET /v1/organizations/{organization_id}/webhook-deliveries/{delivery_id}
1474
+ * Requires a publishable key with the `management` scope.
1475
+ */
1476
+ export const getOrganizationWebhookDelivery = (transport: MountayaTransport, args: {
1477
+ readonly "organization_id": string;
1478
+ readonly "delivery_id": string;
1479
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationWebhookDelivery"]>> =>
1480
+ transport.request({
1481
+ dates: { data: webhookDeliveryWithAttemptsDates },
1482
+ idempotent: true,
1483
+ method: "GET",
1484
+ operationId: "getOrganizationWebhookDelivery",
1485
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-deliveries/${encodeURIComponent(String(args.delivery_id))}`,
1486
+ requiresSession: true,
1487
+ retry: options?.retry,
1488
+ serverBudgetMs: 30000,
1489
+ signal: options?.signal,
1490
+ surface: "rest",
1491
+ timeoutMs: options?.timeoutMs,
1492
+ });
1493
+
1494
+ /**
1495
+ * Retrieve a webhook endpoint.
1496
+ * GET /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
1497
+ * Requires a publishable key with the `management` scope.
1498
+ */
1499
+ export const getOrganizationWebhookEndpoint = (transport: MountayaTransport, args: {
1500
+ readonly "organization_id": string;
1501
+ readonly "webhook_endpoint_id": string;
1502
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationWebhookEndpoint"]>> =>
1503
+ transport.request({
1504
+ dates: { data: webhookEndpointDates },
1505
+ idempotent: true,
1506
+ method: "GET",
1507
+ operationId: "getOrganizationWebhookEndpoint",
1508
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints/${encodeURIComponent(String(args.webhook_endpoint_id))}`,
1509
+ requiresSession: true,
1510
+ retry: options?.retry,
1511
+ serverBudgetMs: 30000,
1512
+ signal: options?.signal,
1513
+ surface: "rest",
1514
+ timeoutMs: options?.timeoutMs,
1515
+ });
1516
+
1517
+ /**
1518
+ * List an organization's webhook endpoints.
1519
+ * GET /v1/organizations/{organization_id}/webhook-endpoints
1520
+ * Requires a publishable key with the `management` scope.
1521
+ */
1522
+ export const getOrganizationWebhookEndpoints = (transport: MountayaTransport, args: {
1523
+ readonly "organization_id": string;
1524
+ readonly query?: NonNullable<operations["getOrganizationWebhookEndpoints"]["parameters"]["query"]> | undefined;
1525
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationWebhookEndpoints"]>> =>
1526
+ transport.request({
1527
+ dates: { data: [webhookEndpointDates] },
1528
+ idempotent: true,
1529
+ method: "GET",
1530
+ operationId: "getOrganizationWebhookEndpoints",
1531
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints`,
1532
+ query: args.query,
1533
+ requiresSession: true,
1534
+ retry: options?.retry,
1535
+ serverBudgetMs: 30000,
1536
+ signal: options?.signal,
1537
+ surface: "rest",
1538
+ timeoutMs: options?.timeoutMs,
1539
+ });
1540
+
1541
+ /**
1542
+ * Retrieve a webhook event with its deliveries.
1543
+ * GET /v1/organizations/{organization_id}/webhook-events/{event_id}
1544
+ * Requires a publishable key with the `management` scope.
1545
+ */
1546
+ export const getOrganizationWebhookEvent = (transport: MountayaTransport, args: {
1547
+ readonly "organization_id": string;
1548
+ readonly "event_id": string;
1549
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationWebhookEvent"]>> =>
1550
+ transport.request({
1551
+ dates: { data: webhookEventWithDeliveriesDates },
1552
+ idempotent: true,
1553
+ method: "GET",
1554
+ operationId: "getOrganizationWebhookEvent",
1555
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-events/${encodeURIComponent(String(args.event_id))}`,
1556
+ requiresSession: true,
1557
+ retry: options?.retry,
1558
+ serverBudgetMs: 30000,
1559
+ signal: options?.signal,
1560
+ surface: "rest",
1561
+ timeoutMs: options?.timeoutMs,
1562
+ });
1563
+
1564
+ /**
1565
+ * List an organization's webhook events.
1566
+ * GET /v1/organizations/{organization_id}/webhook-events
1567
+ * Requires a publishable key with the `management` scope.
1568
+ */
1569
+ export const getOrganizationWebhookEvents = (transport: MountayaTransport, args: {
1570
+ readonly "organization_id": string;
1571
+ readonly query?: NonNullable<operations["getOrganizationWebhookEvents"]["parameters"]["query"]> | undefined;
1572
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationWebhookEvents"]>> =>
1573
+ transport.request({
1574
+ dates: { data: [webhookEventDates] },
1575
+ idempotent: true,
1576
+ method: "GET",
1577
+ operationId: "getOrganizationWebhookEvents",
1578
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-events`,
1579
+ query: args.query,
1580
+ requiresSession: true,
1581
+ retry: options?.retry,
1582
+ serverBudgetMs: 30000,
1583
+ signal: options?.signal,
1584
+ surface: "rest",
1585
+ timeoutMs: options?.timeoutMs,
1586
+ });
1587
+
1588
+ /**
1589
+ * Retrieve the reliability of an organization's webhooks.
1590
+ * GET /v1/organizations/{organization_id}/webhook-health
1591
+ * Requires a publishable key with the `management` scope.
1592
+ */
1593
+ export const getOrganizationWebhookHealth = (transport: MountayaTransport, args: {
1594
+ readonly "organization_id": string;
1595
+ readonly query?: NonNullable<operations["getOrganizationWebhookHealth"]["parameters"]["query"]> | undefined;
1596
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getOrganizationWebhookHealth"]>> =>
1597
+ transport.request({
1598
+ dates: { data: webhookHealthDates },
1599
+ idempotent: true,
1600
+ method: "GET",
1601
+ operationId: "getOrganizationWebhookHealth",
1602
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-health`,
1603
+ query: args.query,
1604
+ requiresSession: true,
1605
+ retry: options?.retry,
1606
+ serverBudgetMs: 30000,
1607
+ signal: options?.signal,
1608
+ surface: "rest",
1609
+ timeoutMs: options?.timeoutMs,
1610
+ });
1611
+
1612
+ /**
1613
+ * List the public webhook event types.
1614
+ * GET /v1/webhook-event-types
1615
+ * Requires a publishable key with the `management` scope.
1616
+ */
1617
+ export const getWebhookEventTypes = (transport: MountayaTransport, options?: RequestOptions): Promise<SuccessBody<operations["getWebhookEventTypes"]>> =>
1618
+ transport.request({
1619
+ idempotent: true,
1620
+ method: "GET",
1621
+ operationId: "getWebhookEventTypes",
1622
+ path: "/v1/webhook-event-types",
1623
+ requiresSession: true,
1624
+ retry: options?.retry,
1625
+ serverBudgetMs: 30000,
1626
+ signal: options?.signal,
1627
+ surface: "rest",
1628
+ timeoutMs: options?.timeoutMs,
1629
+ });
1630
+
1631
+ /**
1632
+ * Retrieve a single zone with its geometry.
1633
+ * GET /v1/zones/{zone_id}
1634
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
1635
+ */
1636
+ export const getZone = (transport: MountayaTransport, args: {
1637
+ readonly "zone_id": string;
1638
+ readonly query?: NonNullable<operations["getZone"]["parameters"]["query"]> | undefined;
1639
+ }, options?: RequestOptions): Promise<SuccessBody<operations["getZone"]>> =>
1640
+ transport.request({
1641
+ acceptsShareToken: true,
1642
+ dates: { data: zoneDates },
1643
+ idempotent: true,
1644
+ method: "GET",
1645
+ operationId: "getZone",
1646
+ path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}`,
1647
+ query: args.query,
1648
+ retry: options?.retry,
1649
+ serverBudgetMs: 30000,
1650
+ signal: options?.signal,
1651
+ surface: "rest",
1652
+ timeoutMs: options?.timeoutMs,
1653
+ });
1654
+
1655
+ /**
1656
+ * Stream one zone's collaboration session over SSE.
1657
+ * GET /v1/zones/{zone_id}/events
1658
+ * Requires a publishable key with the `studio-embedded` scope.
1659
+ * Acts as the user its session token was minted for, so the token must name one.
1660
+ */
1661
+ export const getZoneEvents = (transport: MountayaTransport, args: {
1662
+ readonly "zone_id": string;
1663
+ }, options?: RequestOptions): Promise<BinaryBody> =>
1664
+ transport.requestBinary({
1665
+ accept: "text/event-stream",
1666
+ actsAsMember: true,
1667
+ idempotent: true,
1668
+ method: "GET",
1669
+ operationId: "getZoneEvents",
1670
+ path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/events`,
1671
+ requiresSession: true,
1672
+ retry: options?.retry,
1673
+ signal: options?.signal,
1674
+ surface: "rest",
1675
+ timeoutMs: options?.timeoutMs,
1676
+ });
1677
+
1678
+ /**
1679
+ * List zones.
1680
+ * GET /v1/zones
1681
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
1682
+ */
1683
+ export const getZones = (transport: MountayaTransport, args: {
1684
+ readonly query?: NonNullable<operations["getZones"]["parameters"]["query"]> | undefined;
1685
+ } = {}, options?: RequestOptions): Promise<SuccessBody<operations["getZones"]>> =>
1686
+ transport.request({
1687
+ dates: { data: [zoneDates] },
1688
+ idempotent: true,
1689
+ method: "GET",
1690
+ operationId: "getZones",
1691
+ path: "/v1/zones",
1692
+ query: args.query,
1693
+ retry: options?.retry,
1694
+ serverBudgetMs: 30000,
1695
+ signal: options?.signal,
1696
+ surface: "rest",
1697
+ timeoutMs: options?.timeoutMs,
1698
+ });
1699
+
1700
+ /**
1701
+ * Update an existing collection.
1702
+ * PATCH /v1/collections/{collection_id}
1703
+ * Requires a publishable key with the `studio-embedded` scope.
1704
+ * Acts as the user its session token was minted for, so the token must name one.
1705
+ */
1706
+ export const patchCollection = (transport: MountayaTransport, args: {
1707
+ readonly "collection_id": string;
1708
+ readonly body: operations["patchCollection"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1709
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1710
+ readonly idempotencyKey?: string | undefined;
1711
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
1712
+ readonly ifMatch?: string | undefined;
1713
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchCollection"]>> =>
1714
+ transport.request({
1715
+ actsAsMember: true,
1716
+ body: args.body,
1717
+ dates: { data: collectionDates },
1718
+ idempotencyKey: args.idempotencyKey,
1719
+ idempotent: true,
1720
+ ifMatch: args.ifMatch,
1721
+ method: "PATCH",
1722
+ operationId: "patchCollection",
1723
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}`,
1724
+ requiresSession: true,
1725
+ retry: options?.retry,
1726
+ serverBudgetMs: 30000,
1727
+ signal: options?.signal,
1728
+ surface: "rest",
1729
+ takesIdempotencyKey: true,
1730
+ timeoutMs: options?.timeoutMs,
1731
+ });
1732
+
1733
+ /**
1734
+ * Set an itinerary's position within a collection.
1735
+ * PATCH /v1/collections/{collection_id}/itineraries/{itinerary_id}
1736
+ * Requires a publishable key with the `studio-embedded` scope.
1737
+ * Acts as the user its session token was minted for, so the token must name one.
1738
+ */
1739
+ export const patchCollectionItinerary = (transport: MountayaTransport, args: {
1740
+ readonly "collection_id": string;
1741
+ readonly "itinerary_id": string;
1742
+ readonly body: operations["patchCollectionItinerary"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1743
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1744
+ readonly idempotencyKey?: string | undefined;
1745
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
1746
+ readonly ifMatch?: string | undefined;
1747
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchCollectionItinerary"]>> =>
1748
+ transport.request({
1749
+ actsAsMember: true,
1750
+ body: args.body,
1751
+ dates: { data: collectionDates },
1752
+ idempotencyKey: args.idempotencyKey,
1753
+ idempotent: true,
1754
+ ifMatch: args.ifMatch,
1755
+ method: "PATCH",
1756
+ operationId: "patchCollectionItinerary",
1757
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
1758
+ requiresSession: true,
1759
+ retry: options?.retry,
1760
+ serverBudgetMs: 30000,
1761
+ signal: options?.signal,
1762
+ surface: "rest",
1763
+ takesIdempotencyKey: true,
1764
+ timeoutMs: options?.timeoutMs,
1765
+ });
1766
+
1767
+ /**
1768
+ * Update an existing itinerary.
1769
+ * PATCH /v1/itineraries/{itinerary_id}
1770
+ * Requires a publishable key with the `studio-embedded` scope.
1771
+ * Acts as the user its session token was minted for, so the token must name one.
1772
+ */
1773
+ export const patchItinerary = (transport: MountayaTransport, args: {
1774
+ readonly "itinerary_id": string;
1775
+ readonly body: operations["patchItinerary"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1776
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1777
+ readonly idempotencyKey?: string | undefined;
1778
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
1779
+ readonly ifMatch?: string | undefined;
1780
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchItinerary"]>> =>
1781
+ transport.request({
1782
+ actsAsMember: true,
1783
+ body: args.body,
1784
+ dates: { data: itineraryWithDetailsDates },
1785
+ idempotencyKey: args.idempotencyKey,
1786
+ idempotent: true,
1787
+ ifMatch: args.ifMatch,
1788
+ method: "PATCH",
1789
+ operationId: "patchItinerary",
1790
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
1791
+ requiresSession: true,
1792
+ retry: options?.retry,
1793
+ serverBudgetMs: 30000,
1794
+ signal: options?.signal,
1795
+ surface: "rest",
1796
+ takesIdempotencyKey: true,
1797
+ timeoutMs: options?.timeoutMs,
1798
+ });
1799
+
1800
+ /**
1801
+ * Update an existing segment.
1802
+ * PATCH /v1/itineraries/{itinerary_id}/segments/{segment_id}
1803
+ * Requires a publishable key with the `studio-embedded` scope.
1804
+ * Acts as the user its session token was minted for, so the token must name one.
1805
+ */
1806
+ export const patchItinerarySegment = (transport: MountayaTransport, args: {
1807
+ readonly "itinerary_id": string;
1808
+ readonly "segment_id": string;
1809
+ readonly body: operations["patchItinerarySegment"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1810
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1811
+ readonly idempotencyKey?: string | undefined;
1812
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
1813
+ readonly ifMatch?: string | undefined;
1814
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchItinerarySegment"]>> =>
1815
+ transport.request({
1816
+ actsAsMember: true,
1817
+ body: args.body,
1818
+ dates: { data: itineraryWithDetailsDates },
1819
+ idempotencyKey: args.idempotencyKey,
1820
+ idempotent: true,
1821
+ ifMatch: args.ifMatch,
1822
+ method: "PATCH",
1823
+ operationId: "patchItinerarySegment",
1824
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}`,
1825
+ requiresSession: true,
1826
+ retry: options?.retry,
1827
+ serverBudgetMs: 30000,
1828
+ signal: options?.signal,
1829
+ surface: "rest",
1830
+ takesIdempotencyKey: true,
1831
+ timeoutMs: options?.timeoutMs,
1832
+ });
1833
+
1834
+ /**
1835
+ * Update a segment group.
1836
+ * PATCH /v1/itineraries/{itinerary_id}/segment-groups/{group_id}
1837
+ * Requires a publishable key with the `studio-embedded` scope.
1838
+ * Acts as the user its session token was minted for, so the token must name one.
1839
+ */
1840
+ export const patchItinerarySegmentGroup = (transport: MountayaTransport, args: {
1841
+ readonly "itinerary_id": string;
1842
+ readonly "group_id": string;
1843
+ readonly body: operations["patchItinerarySegmentGroup"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1844
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1845
+ readonly idempotencyKey?: string | undefined;
1846
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
1847
+ readonly ifMatch?: string | undefined;
1848
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchItinerarySegmentGroup"]>> =>
1849
+ transport.request({
1850
+ actsAsMember: true,
1851
+ body: args.body,
1852
+ dates: { data: itineraryWithDetailsDates },
1853
+ idempotencyKey: args.idempotencyKey,
1854
+ idempotent: true,
1855
+ ifMatch: args.ifMatch,
1856
+ method: "PATCH",
1857
+ operationId: "patchItinerarySegmentGroup",
1858
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segment-groups/${encodeURIComponent(String(args.group_id))}`,
1859
+ requiresSession: true,
1860
+ retry: options?.retry,
1861
+ serverBudgetMs: 30000,
1862
+ signal: options?.signal,
1863
+ surface: "rest",
1864
+ takesIdempotencyKey: true,
1865
+ timeoutMs: options?.timeoutMs,
1866
+ });
1867
+
1868
+ /**
1869
+ * Update an existing waypoint.
1870
+ * PATCH /v1/itineraries/{itinerary_id}/waypoints/{waypoint_id}
1871
+ * Requires a publishable key with the `studio-embedded` scope.
1872
+ * Acts as the user its session token was minted for, so the token must name one.
1873
+ */
1874
+ export const patchItineraryWaypoint = (transport: MountayaTransport, args: {
1875
+ readonly "itinerary_id": string;
1876
+ readonly "waypoint_id": string;
1877
+ readonly body: operations["patchItineraryWaypoint"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1878
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1879
+ readonly idempotencyKey?: string | undefined;
1880
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
1881
+ readonly ifMatch?: string | undefined;
1882
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchItineraryWaypoint"]>> =>
1883
+ transport.request({
1884
+ actsAsMember: true,
1885
+ body: args.body,
1886
+ dates: { data: itineraryWithDetailsDates },
1887
+ idempotencyKey: args.idempotencyKey,
1888
+ idempotent: true,
1889
+ ifMatch: args.ifMatch,
1890
+ method: "PATCH",
1891
+ operationId: "patchItineraryWaypoint",
1892
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/waypoints/${encodeURIComponent(String(args.waypoint_id))}`,
1893
+ requiresSession: true,
1894
+ retry: options?.retry,
1895
+ serverBudgetMs: 30000,
1896
+ signal: options?.signal,
1897
+ surface: "rest",
1898
+ takesIdempotencyKey: true,
1899
+ timeoutMs: options?.timeoutMs,
1900
+ });
1901
+
1902
+ /**
1903
+ * Turn the acting user's notification emails for an organization on or off.
1904
+ * PATCH /v1/me/organizations/{organization_id}/notification-preferences
1905
+ * Requires a publishable key with the `studio-embedded` scope.
1906
+ * Acts as the user its session token was minted for, so the token must name one.
1907
+ */
1908
+ export const patchMyOrganizationNotificationPreferences = (transport: MountayaTransport, args: {
1909
+ readonly "organization_id": string;
1910
+ readonly body: operations["patchMyOrganizationNotificationPreferences"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1911
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1912
+ readonly idempotencyKey?: string | undefined;
1913
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchMyOrganizationNotificationPreferences"]>> =>
1914
+ transport.request({
1915
+ actsAsMember: true,
1916
+ body: args.body,
1917
+ idempotencyKey: args.idempotencyKey,
1918
+ idempotent: true,
1919
+ method: "PATCH",
1920
+ operationId: "patchMyOrganizationNotificationPreferences",
1921
+ path: `/v1/me/organizations/${encodeURIComponent(String(args.organization_id))}/notification-preferences`,
1922
+ requiresSession: true,
1923
+ retry: options?.retry,
1924
+ serverBudgetMs: 30000,
1925
+ signal: options?.signal,
1926
+ surface: "rest",
1927
+ takesIdempotencyKey: true,
1928
+ timeoutMs: options?.timeoutMs,
1929
+ });
1930
+
1931
+ /**
1932
+ * Update the acting user's display preferences.
1933
+ * PATCH /v1/me/preferences
1934
+ * Requires a publishable key with the `studio-embedded` scope.
1935
+ * Acts as the user its session token was minted for, so the token must name one.
1936
+ */
1937
+ export const patchMyPreferences = (transport: MountayaTransport, args: {
1938
+ readonly body: operations["patchMyPreferences"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1939
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1940
+ readonly idempotencyKey?: string | undefined;
1941
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchMyPreferences"]>> =>
1942
+ transport.request({
1943
+ actsAsMember: true,
1944
+ body: args.body,
1945
+ idempotencyKey: args.idempotencyKey,
1946
+ idempotent: true,
1947
+ method: "PATCH",
1948
+ operationId: "patchMyPreferences",
1949
+ path: "/v1/me/preferences",
1950
+ requiresSession: true,
1951
+ retry: options?.retry,
1952
+ serverBudgetMs: 30000,
1953
+ signal: options?.signal,
1954
+ surface: "rest",
1955
+ takesIdempotencyKey: true,
1956
+ timeoutMs: options?.timeoutMs,
1957
+ });
1958
+
1959
+ /**
1960
+ * Update an organization.
1961
+ * PATCH /v1/organizations/{organization_id}
1962
+ * Requires a publishable key with the `management` scope.
1963
+ * Acts as the user its session token was minted for, so the token must name one.
1964
+ */
1965
+ export const patchOrganization = (transport: MountayaTransport, args: {
1966
+ readonly "organization_id": string;
1967
+ readonly body: operations["patchOrganization"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
1968
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
1969
+ readonly idempotencyKey?: string | undefined;
1970
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
1971
+ readonly ifMatch?: string | undefined;
1972
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchOrganization"]>> =>
1973
+ transport.request({
1974
+ actsAsMember: true,
1975
+ body: args.body,
1976
+ dates: { data: organizationDates },
1977
+ idempotencyKey: args.idempotencyKey,
1978
+ idempotent: true,
1979
+ ifMatch: args.ifMatch,
1980
+ method: "PATCH",
1981
+ operationId: "patchOrganization",
1982
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}`,
1983
+ requiresSession: true,
1984
+ retry: options?.retry,
1985
+ serverBudgetMs: 30000,
1986
+ signal: options?.signal,
1987
+ surface: "rest",
1988
+ takesIdempotencyKey: true,
1989
+ timeoutMs: options?.timeoutMs,
1990
+ });
1991
+
1992
+ /**
1993
+ * Update an organization's AI provider configuration.
1994
+ * PATCH /v1/organizations/{organization_id}/ai-provider-config
1995
+ * Requires a publishable key with the `management` scope.
1996
+ * Acts as the user its session token was minted for, so the token must name one.
1997
+ */
1998
+ export const patchOrganizationAiProviderConfig = (transport: MountayaTransport, args: {
1999
+ readonly "organization_id": string;
2000
+ readonly body: operations["patchOrganizationAiProviderConfig"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2001
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2002
+ readonly idempotencyKey?: string | undefined;
2003
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2004
+ readonly ifMatch?: string | undefined;
2005
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchOrganizationAiProviderConfig"]>> =>
2006
+ transport.request({
2007
+ actsAsMember: true,
2008
+ body: args.body,
2009
+ idempotencyKey: args.idempotencyKey,
2010
+ idempotent: true,
2011
+ ifMatch: args.ifMatch,
2012
+ method: "PATCH",
2013
+ operationId: "patchOrganizationAiProviderConfig",
2014
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
2015
+ requiresSession: true,
2016
+ retry: options?.retry,
2017
+ serverBudgetMs: 30000,
2018
+ signal: options?.signal,
2019
+ surface: "rest",
2020
+ takesIdempotencyKey: true,
2021
+ timeoutMs: options?.timeoutMs,
2022
+ });
2023
+
2024
+ /**
2025
+ * Update an organization's billing information.
2026
+ * PATCH /v1/organizations/{organization_id}/billing/info
2027
+ * Requires a publishable key with the `management` scope.
2028
+ * Acts as the user its session token was minted for, so the token must name one.
2029
+ */
2030
+ export const patchOrganizationBillingInfo = (transport: MountayaTransport, args: {
2031
+ readonly "organization_id": string;
2032
+ readonly body: operations["patchOrganizationBillingInfo"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2033
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2034
+ readonly idempotencyKey?: string | undefined;
2035
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchOrganizationBillingInfo"]>> =>
2036
+ transport.request({
2037
+ actsAsMember: true,
2038
+ body: args.body,
2039
+ idempotencyKey: args.idempotencyKey,
2040
+ idempotent: true,
2041
+ method: "PATCH",
2042
+ operationId: "patchOrganizationBillingInfo",
2043
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/info`,
2044
+ requiresSession: true,
2045
+ retry: options?.retry,
2046
+ serverBudgetMs: 30000,
2047
+ signal: options?.signal,
2048
+ surface: "rest",
2049
+ takesIdempotencyKey: true,
2050
+ timeoutMs: options?.timeoutMs,
2051
+ });
2052
+
2053
+ /**
2054
+ * Change a member's role.
2055
+ * PATCH /v1/organizations/{organization_id}/members/{user_id}
2056
+ * Requires a publishable key with the `management` scope.
2057
+ * Acts as the user its session token was minted for, so the token must name one.
2058
+ */
2059
+ export const patchOrganizationMember = (transport: MountayaTransport, args: {
2060
+ readonly "organization_id": string;
2061
+ readonly "user_id": string;
2062
+ readonly body: operations["patchOrganizationMember"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2063
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2064
+ readonly idempotencyKey?: string | undefined;
2065
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchOrganizationMember"]>> =>
2066
+ transport.request({
2067
+ actsAsMember: true,
2068
+ body: args.body,
2069
+ dates: { data: organizationMemberDates },
2070
+ idempotencyKey: args.idempotencyKey,
2071
+ idempotent: true,
2072
+ method: "PATCH",
2073
+ operationId: "patchOrganizationMember",
2074
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/members/${encodeURIComponent(String(args.user_id))}`,
2075
+ requiresSession: true,
2076
+ retry: options?.retry,
2077
+ serverBudgetMs: 30000,
2078
+ signal: options?.signal,
2079
+ surface: "rest",
2080
+ takesIdempotencyKey: true,
2081
+ timeoutMs: options?.timeoutMs,
2082
+ });
2083
+
2084
+ /**
2085
+ * Update a publishable key's name or scopes.
2086
+ * PATCH /v1/organizations/{organization_id}/publishable-keys/{key_id}
2087
+ * Requires a publishable key with the `management` scope.
2088
+ * Acts as the user its session token was minted for, so the token must name one.
2089
+ */
2090
+ export const patchOrganizationPublishableKey = (transport: MountayaTransport, args: {
2091
+ readonly "organization_id": string;
2092
+ readonly "key_id": string;
2093
+ readonly body: operations["patchOrganizationPublishableKey"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2094
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2095
+ readonly idempotencyKey?: string | undefined;
2096
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2097
+ readonly ifMatch?: string | undefined;
2098
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchOrganizationPublishableKey"]>> =>
2099
+ transport.request({
2100
+ actsAsMember: true,
2101
+ body: args.body,
2102
+ dates: { data: publishableKeyDates },
2103
+ idempotencyKey: args.idempotencyKey,
2104
+ idempotent: true,
2105
+ ifMatch: args.ifMatch,
2106
+ method: "PATCH",
2107
+ operationId: "patchOrganizationPublishableKey",
2108
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys/${encodeURIComponent(String(args.key_id))}`,
2109
+ requiresSession: true,
2110
+ retry: options?.retry,
2111
+ serverBudgetMs: 30000,
2112
+ signal: options?.signal,
2113
+ surface: "rest",
2114
+ takesIdempotencyKey: true,
2115
+ timeoutMs: options?.timeoutMs,
2116
+ });
2117
+
2118
+ /**
2119
+ * Update an organization's Map Publishing settings.
2120
+ * PATCH /v1/organizations/{organization_id}/settings
2121
+ * Requires a publishable key with the `management` scope.
2122
+ * Acts as the user its session token was minted for, so the token must name one.
2123
+ */
2124
+ export const patchOrganizationSettings = (transport: MountayaTransport, args: {
2125
+ readonly "organization_id": string;
2126
+ readonly body: operations["patchOrganizationSettings"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2127
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2128
+ readonly idempotencyKey?: string | undefined;
2129
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2130
+ readonly ifMatch?: string | undefined;
2131
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchOrganizationSettings"]>> =>
2132
+ transport.request({
2133
+ actsAsMember: true,
2134
+ body: args.body,
2135
+ idempotencyKey: args.idempotencyKey,
2136
+ idempotent: true,
2137
+ ifMatch: args.ifMatch,
2138
+ method: "PATCH",
2139
+ operationId: "patchOrganizationSettings",
2140
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/settings`,
2141
+ requiresSession: true,
2142
+ retry: options?.retry,
2143
+ serverBudgetMs: 30000,
2144
+ signal: options?.signal,
2145
+ surface: "rest",
2146
+ takesIdempotencyKey: true,
2147
+ timeoutMs: options?.timeoutMs,
2148
+ });
2149
+
2150
+ /**
2151
+ * Update a webhook endpoint.
2152
+ * PATCH /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
2153
+ * Requires a publishable key with the `management` scope.
2154
+ * Acts as the user its session token was minted for, so the token must name one.
2155
+ */
2156
+ export const patchOrganizationWebhookEndpoint = (transport: MountayaTransport, args: {
2157
+ readonly "organization_id": string;
2158
+ readonly "webhook_endpoint_id": string;
2159
+ readonly body: operations["patchOrganizationWebhookEndpoint"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2160
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2161
+ readonly idempotencyKey?: string | undefined;
2162
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2163
+ readonly ifMatch?: string | undefined;
2164
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchOrganizationWebhookEndpoint"]>> =>
2165
+ transport.request({
2166
+ actsAsMember: true,
2167
+ body: args.body,
2168
+ dates: { data: webhookEndpointDates },
2169
+ idempotencyKey: args.idempotencyKey,
2170
+ idempotent: true,
2171
+ ifMatch: args.ifMatch,
2172
+ method: "PATCH",
2173
+ operationId: "patchOrganizationWebhookEndpoint",
2174
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints/${encodeURIComponent(String(args.webhook_endpoint_id))}`,
2175
+ requiresSession: true,
2176
+ retry: options?.retry,
2177
+ serverBudgetMs: 30000,
2178
+ signal: options?.signal,
2179
+ surface: "rest",
2180
+ takesIdempotencyKey: true,
2181
+ timeoutMs: options?.timeoutMs,
2182
+ });
2183
+
2184
+ /**
2185
+ * Update an existing zone.
2186
+ * PATCH /v1/zones/{zone_id}
2187
+ * Requires a publishable key with the `studio-embedded` scope.
2188
+ * Acts as the user its session token was minted for, so the token must name one.
2189
+ */
2190
+ export const patchZone = (transport: MountayaTransport, args: {
2191
+ readonly "zone_id": string;
2192
+ readonly body: operations["patchZone"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2193
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2194
+ readonly idempotencyKey?: string | undefined;
2195
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2196
+ readonly ifMatch?: string | undefined;
2197
+ }, options?: RequestOptions): Promise<SuccessBody<operations["patchZone"]>> =>
2198
+ transport.request({
2199
+ actsAsMember: true,
2200
+ body: args.body,
2201
+ dates: { data: zoneDates },
2202
+ idempotencyKey: args.idempotencyKey,
2203
+ idempotent: true,
2204
+ ifMatch: args.ifMatch,
2205
+ method: "PATCH",
2206
+ operationId: "patchZone",
2207
+ path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}`,
2208
+ requiresSession: true,
2209
+ retry: options?.retry,
2210
+ serverBudgetMs: 30000,
2211
+ signal: options?.signal,
2212
+ surface: "rest",
2213
+ takesIdempotencyKey: true,
2214
+ timeoutMs: options?.timeoutMs,
2215
+ });
2216
+
2217
+ /**
2218
+ * Start a new agent run.
2219
+ * POST /v1/agent/runs
2220
+ * Requires a publishable key with the `studio-embedded` scope.
2221
+ * Acts as the user its session token was minted for, so the token must name one.
2222
+ */
2223
+ export const postAgentRun = (transport: MountayaTransport, args: {
2224
+ readonly body: operations["postAgentRun"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2225
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2226
+ readonly idempotencyKey?: string | undefined;
2227
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postAgentRun"]>> =>
2228
+ transport.request({
2229
+ actsAsMember: true,
2230
+ body: args.body,
2231
+ dates: { data: agentRunDates },
2232
+ idempotencyKey: args.idempotencyKey,
2233
+ idempotent: false,
2234
+ method: "POST",
2235
+ operationId: "postAgentRun",
2236
+ path: "/v1/agent/runs",
2237
+ requiresSession: true,
2238
+ retry: options?.retry,
2239
+ serverBudgetMs: 30000,
2240
+ signal: options?.signal,
2241
+ surface: "rest",
2242
+ takesIdempotencyKey: true,
2243
+ timeoutMs: options?.timeoutMs,
2244
+ });
2245
+
2246
+ /**
2247
+ * Record the user's rating of one assistant message in a run.
2248
+ * POST /v1/agent/runs/{run_id}/feedback
2249
+ * Requires a publishable key with the `studio-embedded` scope.
2250
+ * Acts as the user its session token was minted for, so the token must name one.
2251
+ */
2252
+ export const postAgentRunFeedback = (transport: MountayaTransport, args: {
2253
+ readonly "run_id": string;
2254
+ readonly body: operations["postAgentRunFeedback"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2255
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2256
+ readonly idempotencyKey?: string | undefined;
2257
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postAgentRunFeedback"]>> =>
2258
+ transport.request({
2259
+ actsAsMember: true,
2260
+ body: args.body,
2261
+ idempotencyKey: args.idempotencyKey,
2262
+ idempotent: false,
2263
+ method: "POST",
2264
+ operationId: "postAgentRunFeedback",
2265
+ path: `/v1/agent/runs/${encodeURIComponent(String(args.run_id))}/feedback`,
2266
+ requiresSession: true,
2267
+ retry: options?.retry,
2268
+ serverBudgetMs: 30000,
2269
+ signal: options?.signal,
2270
+ surface: "rest",
2271
+ takesIdempotencyKey: true,
2272
+ timeoutMs: options?.timeoutMs,
2273
+ });
2274
+
2275
+ /**
2276
+ * Send an input signal into a running agent run.
2277
+ * POST /v1/agent/runs/{run_id}/input
2278
+ * Requires a publishable key with the `studio-embedded` scope.
2279
+ * Acts as the user its session token was minted for, so the token must name one.
2280
+ */
2281
+ export const postAgentRunInput = (transport: MountayaTransport, args: {
2282
+ readonly "run_id": string;
2283
+ readonly body: operations["postAgentRunInput"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2284
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2285
+ readonly idempotencyKey?: string | undefined;
2286
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postAgentRunInput"]>> =>
2287
+ transport.request({
2288
+ actsAsMember: true,
2289
+ body: args.body,
2290
+ idempotencyKey: args.idempotencyKey,
2291
+ idempotent: false,
2292
+ method: "POST",
2293
+ operationId: "postAgentRunInput",
2294
+ path: `/v1/agent/runs/${encodeURIComponent(String(args.run_id))}/input`,
2295
+ requiresSession: true,
2296
+ retry: options?.retry,
2297
+ serverBudgetMs: 30000,
2298
+ signal: options?.signal,
2299
+ surface: "rest",
2300
+ takesIdempotencyKey: true,
2301
+ timeoutMs: options?.timeoutMs,
2302
+ });
2303
+
2304
+ /**
2305
+ * Create a new collection.
2306
+ * POST /v1/collections
2307
+ * Requires a publishable key with the `studio-embedded` scope.
2308
+ * Acts as the user its session token was minted for, so the token must name one.
2309
+ */
2310
+ export const postCollection = (transport: MountayaTransport, args: {
2311
+ readonly body: operations["postCollection"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2312
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2313
+ readonly idempotencyKey?: string | undefined;
2314
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postCollection"]>> =>
2315
+ transport.request({
2316
+ actsAsMember: true,
2317
+ body: args.body,
2318
+ dates: { data: collectionDates },
2319
+ idempotencyKey: args.idempotencyKey,
2320
+ idempotent: false,
2321
+ method: "POST",
2322
+ operationId: "postCollection",
2323
+ path: "/v1/collections",
2324
+ requiresSession: true,
2325
+ retry: options?.retry,
2326
+ serverBudgetMs: 30000,
2327
+ signal: options?.signal,
2328
+ surface: "rest",
2329
+ takesIdempotencyKey: true,
2330
+ timeoutMs: options?.timeoutMs,
2331
+ });
2332
+
2333
+ /**
2334
+ * Add itineraries to a collection.
2335
+ * POST /v1/collections/{collection_id}/itineraries
2336
+ * Requires a publishable key with the `studio-embedded` scope.
2337
+ * Acts as the user its session token was minted for, so the token must name one.
2338
+ */
2339
+ export const postCollectionItineraries = (transport: MountayaTransport, args: {
2340
+ readonly "collection_id": string;
2341
+ readonly body: operations["postCollectionItineraries"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2342
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2343
+ readonly idempotencyKey?: string | undefined;
2344
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2345
+ readonly ifMatch?: string | undefined;
2346
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postCollectionItineraries"]>> =>
2347
+ transport.request({
2348
+ actsAsMember: true,
2349
+ body: args.body,
2350
+ dates: { data: collectionDates },
2351
+ idempotencyKey: args.idempotencyKey,
2352
+ idempotent: true,
2353
+ ifMatch: args.ifMatch,
2354
+ method: "POST",
2355
+ operationId: "postCollectionItineraries",
2356
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries`,
2357
+ requiresSession: true,
2358
+ retry: options?.retry,
2359
+ serverBudgetMs: 30000,
2360
+ signal: options?.signal,
2361
+ surface: "rest",
2362
+ takesIdempotencyKey: true,
2363
+ timeoutMs: options?.timeoutMs,
2364
+ });
2365
+
2366
+ /**
2367
+ * Mint the collection's share link, or return the one it has.
2368
+ * POST /v1/collections/{collection_id}/share-link
2369
+ * Requires a publishable key with the `studio-embedded` scope.
2370
+ * Acts as the user its session token was minted for, so the token must name one.
2371
+ */
2372
+ export const postCollectionShareLink = (transport: MountayaTransport, args: {
2373
+ readonly "collection_id": string;
2374
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2375
+ readonly idempotencyKey?: string | undefined;
2376
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postCollectionShareLink"]>> =>
2377
+ transport.request({
2378
+ actsAsMember: true,
2379
+ dates: { data: shareLinkDates },
2380
+ idempotencyKey: args.idempotencyKey,
2381
+ idempotent: true,
2382
+ method: "POST",
2383
+ operationId: "postCollectionShareLink",
2384
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link`,
2385
+ requiresSession: true,
2386
+ retry: options?.retry,
2387
+ serverBudgetMs: 30000,
2388
+ signal: options?.signal,
2389
+ surface: "rest",
2390
+ takesIdempotencyKey: true,
2391
+ timeoutMs: options?.timeoutMs,
2392
+ });
2393
+
2394
+ /**
2395
+ * Rotate the collection's share link.
2396
+ * POST /v1/collections/{collection_id}/share-link/rotate
2397
+ * Requires a publishable key with the `studio-embedded` scope.
2398
+ * Acts as the user its session token was minted for, so the token must name one.
2399
+ */
2400
+ export const postCollectionShareLinkRotate = (transport: MountayaTransport, args: {
2401
+ readonly "collection_id": string;
2402
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2403
+ readonly idempotencyKey?: string | undefined;
2404
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postCollectionShareLinkRotate"]>> =>
2405
+ transport.request({
2406
+ actsAsMember: true,
2407
+ dates: { data: shareLinkDates },
2408
+ idempotencyKey: args.idempotencyKey,
2409
+ idempotent: false,
2410
+ method: "POST",
2411
+ operationId: "postCollectionShareLinkRotate",
2412
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link/rotate`,
2413
+ requiresSession: true,
2414
+ retry: options?.retry,
2415
+ serverBudgetMs: 30000,
2416
+ signal: options?.signal,
2417
+ surface: "rest",
2418
+ takesIdempotencyKey: true,
2419
+ timeoutMs: options?.timeoutMs,
2420
+ });
2421
+
2422
+ /**
2423
+ * Add zones to a collection.
2424
+ * POST /v1/collections/{collection_id}/zones
2425
+ * Requires a publishable key with the `studio-embedded` scope.
2426
+ * Acts as the user its session token was minted for, so the token must name one.
2427
+ */
2428
+ export const postCollectionZones = (transport: MountayaTransport, args: {
2429
+ readonly "collection_id": string;
2430
+ readonly body: operations["postCollectionZones"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2431
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2432
+ readonly idempotencyKey?: string | undefined;
2433
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2434
+ readonly ifMatch?: string | undefined;
2435
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postCollectionZones"]>> =>
2436
+ transport.request({
2437
+ actsAsMember: true,
2438
+ body: args.body,
2439
+ dates: { data: collectionDates },
2440
+ idempotencyKey: args.idempotencyKey,
2441
+ idempotent: true,
2442
+ ifMatch: args.ifMatch,
2443
+ method: "POST",
2444
+ operationId: "postCollectionZones",
2445
+ path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/zones`,
2446
+ requiresSession: true,
2447
+ retry: options?.retry,
2448
+ serverBudgetMs: 30000,
2449
+ signal: options?.signal,
2450
+ surface: "rest",
2451
+ takesIdempotencyKey: true,
2452
+ timeoutMs: options?.timeoutMs,
2453
+ });
2454
+
2455
+ /**
2456
+ * Create a new itinerary.
2457
+ * POST /v1/itineraries
2458
+ * Requires a publishable key with the `studio-embedded` scope.
2459
+ * Acts as the user its session token was minted for, so the token must name one.
2460
+ */
2461
+ export const postItinerary = (transport: MountayaTransport, args: {
2462
+ readonly body: operations["postItinerary"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2463
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2464
+ readonly idempotencyKey?: string | undefined;
2465
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItinerary"]>> =>
2466
+ transport.request({
2467
+ actsAsMember: true,
2468
+ body: args.body,
2469
+ dates: { data: itineraryWithDetailsDates },
2470
+ idempotencyKey: args.idempotencyKey,
2471
+ idempotent: false,
2472
+ method: "POST",
2473
+ operationId: "postItinerary",
2474
+ path: "/v1/itineraries",
2475
+ requiresSession: true,
2476
+ retry: options?.retry,
2477
+ serverBudgetMs: 30000,
2478
+ signal: options?.signal,
2479
+ surface: "rest",
2480
+ takesIdempotencyKey: true,
2481
+ timeoutMs: options?.timeoutMs,
2482
+ });
2483
+
2484
+ /**
2485
+ * Send a collaboration signal into an itinerary's session.
2486
+ * POST /v1/itineraries/{itinerary_id}/collab
2487
+ * Requires a publishable key with the `studio-embedded` scope.
2488
+ * Acts as the user its session token was minted for, so the token must name one.
2489
+ */
2490
+ export const postItineraryCollab = (transport: MountayaTransport, args: {
2491
+ readonly "itinerary_id": string;
2492
+ readonly body: operations["postItineraryCollab"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2493
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryCollab"]>> =>
2494
+ transport.request({
2495
+ actsAsMember: true,
2496
+ body: args.body,
2497
+ idempotent: true,
2498
+ method: "POST",
2499
+ operationId: "postItineraryCollab",
2500
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/collab`,
2501
+ requiresSession: true,
2502
+ retry: options?.retry,
2503
+ serverBudgetMs: 30000,
2504
+ signal: options?.signal,
2505
+ surface: "rest",
2506
+ timeoutMs: options?.timeoutMs,
2507
+ });
2508
+
2509
+ /**
2510
+ * Duplicate an itinerary into the key's organization.
2511
+ * POST /v1/itineraries/{itinerary_id}/duplicate
2512
+ * Requires a publishable key with the `studio-embedded` scope.
2513
+ * Acts as the user its session token was minted for, so the token must name one.
2514
+ */
2515
+ export const postItineraryDuplicate = (transport: MountayaTransport, args: {
2516
+ readonly "itinerary_id": string;
2517
+ readonly query?: NonNullable<operations["postItineraryDuplicate"]["parameters"]["query"]> | undefined;
2518
+ readonly body: operations["postItineraryDuplicate"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2519
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2520
+ readonly idempotencyKey?: string | undefined;
2521
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryDuplicate"]>> =>
2522
+ transport.request({
2523
+ actsAsMember: true,
2524
+ body: args.body,
2525
+ dates: { data: itineraryWithDetailsDates },
2526
+ idempotencyKey: args.idempotencyKey,
2527
+ idempotent: false,
2528
+ method: "POST",
2529
+ operationId: "postItineraryDuplicate",
2530
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/duplicate`,
2531
+ query: args.query,
2532
+ requiresSession: true,
2533
+ retry: options?.retry,
2534
+ serverBudgetMs: 30000,
2535
+ signal: options?.signal,
2536
+ surface: "rest",
2537
+ takesIdempotencyKey: true,
2538
+ timeoutMs: options?.timeoutMs,
2539
+ });
2540
+
2541
+ /**
2542
+ * Confirm an itinerary import, persisting the reviewed draft.
2543
+ * POST /v1/itineraries/import
2544
+ * Requires a publishable key with the `studio-embedded` scope.
2545
+ * Acts as the user its session token was minted for, so the token must name one.
2546
+ */
2547
+ export const postItineraryImport = (transport: MountayaTransport, args: {
2548
+ readonly body: operations["postItineraryImport"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2549
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2550
+ readonly idempotencyKey?: string | undefined;
2551
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryImport"]>> =>
2552
+ transport.request({
2553
+ actsAsMember: true,
2554
+ body: args.body,
2555
+ dates: { data: itineraryWithDetailsDates },
2556
+ idempotencyKey: args.idempotencyKey,
2557
+ idempotent: false,
2558
+ method: "POST",
2559
+ operationId: "postItineraryImport",
2560
+ path: "/v1/itineraries/import",
2561
+ requiresSession: true,
2562
+ retry: options?.retry,
2563
+ serverBudgetMs: 55000,
2564
+ signal: options?.signal,
2565
+ surface: "rest",
2566
+ takesIdempotencyKey: true,
2567
+ timeoutMs: options?.timeoutMs,
2568
+ });
2569
+
2570
+ /**
2571
+ * Preview an itinerary import without persisting it.
2572
+ * POST /v1/itineraries/preview
2573
+ * Requires a publishable key with the `studio-embedded` scope.
2574
+ * Acts as the user its session token was minted for, so the token must name one.
2575
+ */
2576
+ export const postItineraryPreview = (transport: MountayaTransport, args: {
2577
+ readonly body: FormData;
2578
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2579
+ readonly idempotencyKey?: string | undefined;
2580
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryPreview"]>> =>
2581
+ transport.request({
2582
+ actsAsMember: true,
2583
+ body: args.body,
2584
+ idempotencyKey: args.idempotencyKey,
2585
+ idempotent: true,
2586
+ method: "POST",
2587
+ operationId: "postItineraryPreview",
2588
+ path: "/v1/itineraries/preview",
2589
+ requiresSession: true,
2590
+ retry: options?.retry,
2591
+ serverBudgetMs: 55000,
2592
+ signal: options?.signal,
2593
+ surface: "rest",
2594
+ takesIdempotencyKey: true,
2595
+ timeoutMs: options?.timeoutMs,
2596
+ });
2597
+
2598
+ /**
2599
+ * Publish the itinerary's current draft.
2600
+ * POST /v1/itineraries/{itinerary_id}/publication
2601
+ * Requires a publishable key with the `studio-embedded` scope.
2602
+ * Acts as the user its session token was minted for, so the token must name one.
2603
+ */
2604
+ export const postItineraryPublication = (transport: MountayaTransport, args: {
2605
+ readonly "itinerary_id": string;
2606
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2607
+ readonly idempotencyKey?: string | undefined;
2608
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2609
+ readonly ifMatch?: string | undefined;
2610
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryPublication"]>> =>
2611
+ transport.request({
2612
+ actsAsMember: true,
2613
+ dates: { data: itineraryWithDetailsDates },
2614
+ idempotencyKey: args.idempotencyKey,
2615
+ idempotent: true,
2616
+ ifMatch: args.ifMatch,
2617
+ method: "POST",
2618
+ operationId: "postItineraryPublication",
2619
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/publication`,
2620
+ requiresSession: true,
2621
+ retry: options?.retry,
2622
+ serverBudgetMs: 30000,
2623
+ signal: options?.signal,
2624
+ surface: "rest",
2625
+ takesIdempotencyKey: true,
2626
+ timeoutMs: options?.timeoutMs,
2627
+ });
2628
+
2629
+ /**
2630
+ * Create a segment, at the end of the chain or before another.
2631
+ * POST /v1/itineraries/{itinerary_id}/segments
2632
+ * Requires a publishable key with the `studio-embedded` scope.
2633
+ * Acts as the user its session token was minted for, so the token must name one.
2634
+ */
2635
+ export const postItinerarySegment = (transport: MountayaTransport, args: {
2636
+ readonly "itinerary_id": string;
2637
+ readonly body: operations["postItinerarySegment"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2638
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2639
+ readonly idempotencyKey?: string | undefined;
2640
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2641
+ readonly ifMatch?: string | undefined;
2642
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItinerarySegment"]>> =>
2643
+ transport.request({
2644
+ actsAsMember: true,
2645
+ body: args.body,
2646
+ dates: { data: itineraryWithDetailsDates },
2647
+ idempotencyKey: args.idempotencyKey,
2648
+ idempotent: false,
2649
+ ifMatch: args.ifMatch,
2650
+ method: "POST",
2651
+ operationId: "postItinerarySegment",
2652
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments`,
2653
+ requiresSession: true,
2654
+ retry: options?.retry,
2655
+ serverBudgetMs: 30000,
2656
+ signal: options?.signal,
2657
+ surface: "rest",
2658
+ takesIdempotencyKey: true,
2659
+ timeoutMs: options?.timeoutMs,
2660
+ });
2661
+
2662
+ /**
2663
+ * Convert a segment between routed and freehand.
2664
+ * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/convert
2665
+ * Requires a publishable key with the `studio-embedded` scope.
2666
+ * Acts as the user its session token was minted for, so the token must name one.
2667
+ */
2668
+ export const postItinerarySegmentConvert = (transport: MountayaTransport, args: {
2669
+ readonly "itinerary_id": string;
2670
+ readonly "segment_id": string;
2671
+ readonly body: operations["postItinerarySegmentConvert"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2672
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2673
+ readonly idempotencyKey?: string | undefined;
2674
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2675
+ readonly ifMatch?: string | undefined;
2676
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItinerarySegmentConvert"]>> =>
2677
+ transport.request({
2678
+ actsAsMember: true,
2679
+ body: args.body,
2680
+ dates: { data: itineraryWithDetailsDates },
2681
+ idempotencyKey: args.idempotencyKey,
2682
+ idempotent: true,
2683
+ ifMatch: args.ifMatch,
2684
+ method: "POST",
2685
+ operationId: "postItinerarySegmentConvert",
2686
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}/convert`,
2687
+ requiresSession: true,
2688
+ retry: options?.retry,
2689
+ serverBudgetMs: 30000,
2690
+ signal: options?.signal,
2691
+ surface: "rest",
2692
+ takesIdempotencyKey: true,
2693
+ timeoutMs: options?.timeoutMs,
2694
+ });
2695
+
2696
+ /**
2697
+ * Group a contiguous run of an itinerary's segments.
2698
+ * POST /v1/itineraries/{itinerary_id}/segment-groups
2699
+ * Requires a publishable key with the `studio-embedded` scope.
2700
+ * Acts as the user its session token was minted for, so the token must name one.
2701
+ */
2702
+ export const postItinerarySegmentGroup = (transport: MountayaTransport, args: {
2703
+ readonly "itinerary_id": string;
2704
+ readonly body: operations["postItinerarySegmentGroup"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2705
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2706
+ readonly idempotencyKey?: string | undefined;
2707
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2708
+ readonly ifMatch?: string | undefined;
2709
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItinerarySegmentGroup"]>> =>
2710
+ transport.request({
2711
+ actsAsMember: true,
2712
+ body: args.body,
2713
+ dates: { data: itineraryWithDetailsDates },
2714
+ idempotencyKey: args.idempotencyKey,
2715
+ idempotent: false,
2716
+ ifMatch: args.ifMatch,
2717
+ method: "POST",
2718
+ operationId: "postItinerarySegmentGroup",
2719
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segment-groups`,
2720
+ requiresSession: true,
2721
+ retry: options?.retry,
2722
+ serverBudgetMs: 30000,
2723
+ signal: options?.signal,
2724
+ surface: "rest",
2725
+ takesIdempotencyKey: true,
2726
+ timeoutMs: options?.timeoutMs,
2727
+ });
2728
+
2729
+ /**
2730
+ * Merge a segment with the one that follows it.
2731
+ * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/merge
2732
+ * Requires a publishable key with the `studio-embedded` scope.
2733
+ * Acts as the user its session token was minted for, so the token must name one.
2734
+ */
2735
+ export const postItinerarySegmentMerge = (transport: MountayaTransport, args: {
2736
+ readonly "itinerary_id": string;
2737
+ readonly "segment_id": string;
2738
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2739
+ readonly idempotencyKey?: string | undefined;
2740
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2741
+ readonly ifMatch?: string | undefined;
2742
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItinerarySegmentMerge"]>> =>
2743
+ transport.request({
2744
+ actsAsMember: true,
2745
+ dates: { data: itineraryWithDetailsDates },
2746
+ idempotencyKey: args.idempotencyKey,
2747
+ idempotent: false,
2748
+ ifMatch: args.ifMatch,
2749
+ method: "POST",
2750
+ operationId: "postItinerarySegmentMerge",
2751
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}/merge`,
2752
+ requiresSession: true,
2753
+ retry: options?.retry,
2754
+ serverBudgetMs: 30000,
2755
+ signal: options?.signal,
2756
+ surface: "rest",
2757
+ takesIdempotencyKey: true,
2758
+ timeoutMs: options?.timeoutMs,
2759
+ });
2760
+
2761
+ /**
2762
+ * Split a segment in two at a fraction of its length.
2763
+ * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/split
2764
+ * Requires a publishable key with the `studio-embedded` scope.
2765
+ * Acts as the user its session token was minted for, so the token must name one.
2766
+ */
2767
+ export const postItinerarySegmentSplit = (transport: MountayaTransport, args: {
2768
+ readonly "itinerary_id": string;
2769
+ readonly "segment_id": string;
2770
+ readonly body: operations["postItinerarySegmentSplit"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2771
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2772
+ readonly idempotencyKey?: string | undefined;
2773
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2774
+ readonly ifMatch?: string | undefined;
2775
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItinerarySegmentSplit"]>> =>
2776
+ transport.request({
2777
+ actsAsMember: true,
2778
+ body: args.body,
2779
+ dates: { data: itineraryWithDetailsDates },
2780
+ idempotencyKey: args.idempotencyKey,
2781
+ idempotent: false,
2782
+ ifMatch: args.ifMatch,
2783
+ method: "POST",
2784
+ operationId: "postItinerarySegmentSplit",
2785
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}/split`,
2786
+ requiresSession: true,
2787
+ retry: options?.retry,
2788
+ serverBudgetMs: 30000,
2789
+ signal: options?.signal,
2790
+ surface: "rest",
2791
+ takesIdempotencyKey: true,
2792
+ timeoutMs: options?.timeoutMs,
2793
+ });
2794
+
2795
+ /**
2796
+ * Mint the itinerary's share link, or return the one it has.
2797
+ * POST /v1/itineraries/{itinerary_id}/share-link
2798
+ * Requires a publishable key with the `studio-embedded` scope.
2799
+ * Acts as the user its session token was minted for, so the token must name one.
2800
+ */
2801
+ export const postItineraryShareLink = (transport: MountayaTransport, args: {
2802
+ readonly "itinerary_id": string;
2803
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2804
+ readonly idempotencyKey?: string | undefined;
2805
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryShareLink"]>> =>
2806
+ transport.request({
2807
+ actsAsMember: true,
2808
+ dates: { data: shareLinkDates },
2809
+ idempotencyKey: args.idempotencyKey,
2810
+ idempotent: true,
2811
+ method: "POST",
2812
+ operationId: "postItineraryShareLink",
2813
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link`,
2814
+ requiresSession: true,
2815
+ retry: options?.retry,
2816
+ serverBudgetMs: 30000,
2817
+ signal: options?.signal,
2818
+ surface: "rest",
2819
+ takesIdempotencyKey: true,
2820
+ timeoutMs: options?.timeoutMs,
2821
+ });
2822
+
2823
+ /**
2824
+ * Rotate the itinerary's share link.
2825
+ * POST /v1/itineraries/{itinerary_id}/share-link/rotate
2826
+ * Requires a publishable key with the `studio-embedded` scope.
2827
+ * Acts as the user its session token was minted for, so the token must name one.
2828
+ */
2829
+ export const postItineraryShareLinkRotate = (transport: MountayaTransport, args: {
2830
+ readonly "itinerary_id": string;
2831
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2832
+ readonly idempotencyKey?: string | undefined;
2833
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryShareLinkRotate"]>> =>
2834
+ transport.request({
2835
+ actsAsMember: true,
2836
+ dates: { data: shareLinkDates },
2837
+ idempotencyKey: args.idempotencyKey,
2838
+ idempotent: false,
2839
+ method: "POST",
2840
+ operationId: "postItineraryShareLinkRotate",
2841
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link/rotate`,
2842
+ requiresSession: true,
2843
+ retry: options?.retry,
2844
+ serverBudgetMs: 30000,
2845
+ signal: options?.signal,
2846
+ surface: "rest",
2847
+ takesIdempotencyKey: true,
2848
+ timeoutMs: options?.timeoutMs,
2849
+ });
2850
+
2851
+ /**
2852
+ * Create a new waypoint within an itinerary.
2853
+ * POST /v1/itineraries/{itinerary_id}/waypoints
2854
+ * Requires a publishable key with the `studio-embedded` scope.
2855
+ * Acts as the user its session token was minted for, so the token must name one.
2856
+ */
2857
+ export const postItineraryWaypoint = (transport: MountayaTransport, args: {
2858
+ readonly "itinerary_id": string;
2859
+ readonly body: operations["postItineraryWaypoint"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2860
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2861
+ readonly idempotencyKey?: string | undefined;
2862
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
2863
+ readonly ifMatch?: string | undefined;
2864
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postItineraryWaypoint"]>> =>
2865
+ transport.request({
2866
+ actsAsMember: true,
2867
+ body: args.body,
2868
+ dates: { data: itineraryWithDetailsDates },
2869
+ idempotencyKey: args.idempotencyKey,
2870
+ idempotent: false,
2871
+ ifMatch: args.ifMatch,
2872
+ method: "POST",
2873
+ operationId: "postItineraryWaypoint",
2874
+ path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/waypoints`,
2875
+ requiresSession: true,
2876
+ retry: options?.retry,
2877
+ serverBudgetMs: 30000,
2878
+ signal: options?.signal,
2879
+ surface: "rest",
2880
+ takesIdempotencyKey: true,
2881
+ timeoutMs: options?.timeoutMs,
2882
+ });
2883
+
2884
+ /**
2885
+ * Accept an invitation.
2886
+ * POST /v1/me/invitations/{invitation_id}/accept
2887
+ * Requires a publishable key with the `studio-embedded` scope.
2888
+ * Acts as the user its session token was minted for, so the token must name one.
2889
+ */
2890
+ export const postMyInvitationAccept = (transport: MountayaTransport, args: {
2891
+ readonly "invitation_id": string;
2892
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2893
+ readonly idempotencyKey?: string | undefined;
2894
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postMyInvitationAccept"]>> =>
2895
+ transport.request({
2896
+ actsAsMember: true,
2897
+ dates: { data: membershipDates },
2898
+ idempotencyKey: args.idempotencyKey,
2899
+ idempotent: true,
2900
+ method: "POST",
2901
+ operationId: "postMyInvitationAccept",
2902
+ path: `/v1/me/invitations/${encodeURIComponent(String(args.invitation_id))}/accept`,
2903
+ requiresSession: true,
2904
+ retry: options?.retry,
2905
+ serverBudgetMs: 30000,
2906
+ signal: options?.signal,
2907
+ surface: "rest",
2908
+ takesIdempotencyKey: true,
2909
+ timeoutMs: options?.timeoutMs,
2910
+ });
2911
+
2912
+ /**
2913
+ * Create an organization.
2914
+ * POST /v1/organizations
2915
+ * Requires a publishable key with the `management` scope.
2916
+ * Acts as the user its session token was minted for, so the token must name one.
2917
+ */
2918
+ export const postOrganization = (transport: MountayaTransport, args: {
2919
+ readonly body: operations["postOrganization"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2920
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2921
+ readonly idempotencyKey?: string | undefined;
2922
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganization"]>> =>
2923
+ transport.request({
2924
+ actsAsMember: true,
2925
+ body: args.body,
2926
+ dates: { data: organizationDates },
2927
+ idempotencyKey: args.idempotencyKey,
2928
+ idempotent: false,
2929
+ method: "POST",
2930
+ operationId: "postOrganization",
2931
+ path: "/v1/organizations",
2932
+ requiresSession: true,
2933
+ retry: options?.retry,
2934
+ serverBudgetMs: 30000,
2935
+ signal: options?.signal,
2936
+ surface: "rest",
2937
+ takesIdempotencyKey: true,
2938
+ timeoutMs: options?.timeoutMs,
2939
+ });
2940
+
2941
+ /**
2942
+ * Configure an organization's AI provider.
2943
+ * POST /v1/organizations/{organization_id}/ai-provider-config
2944
+ * Requires a publishable key with the `management` scope.
2945
+ * Acts as the user its session token was minted for, so the token must name one.
2946
+ */
2947
+ export const postOrganizationAiProviderConfig = (transport: MountayaTransport, args: {
2948
+ readonly "organization_id": string;
2949
+ readonly body: operations["postOrganizationAiProviderConfig"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2950
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2951
+ readonly idempotencyKey?: string | undefined;
2952
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationAiProviderConfig"]>> =>
2953
+ transport.request({
2954
+ actsAsMember: true,
2955
+ body: args.body,
2956
+ idempotencyKey: args.idempotencyKey,
2957
+ idempotent: false,
2958
+ method: "POST",
2959
+ operationId: "postOrganizationAiProviderConfig",
2960
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
2961
+ requiresSession: true,
2962
+ retry: options?.retry,
2963
+ serverBudgetMs: 30000,
2964
+ signal: options?.signal,
2965
+ surface: "rest",
2966
+ takesIdempotencyKey: true,
2967
+ timeoutMs: options?.timeoutMs,
2968
+ });
2969
+
2970
+ /**
2971
+ * Save a confirmed card against an organization.
2972
+ * POST /v1/organizations/{organization_id}/billing/payment-methods
2973
+ * Requires a publishable key with the `management` scope.
2974
+ * Acts as the user its session token was minted for, so the token must name one.
2975
+ */
2976
+ export const postOrganizationBillingPaymentMethod = (transport: MountayaTransport, args: {
2977
+ readonly "organization_id": string;
2978
+ readonly body: operations["postOrganizationBillingPaymentMethod"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
2979
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
2980
+ readonly idempotencyKey?: string | undefined;
2981
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationBillingPaymentMethod"]>> =>
2982
+ transport.request({
2983
+ actsAsMember: true,
2984
+ body: args.body,
2985
+ idempotencyKey: args.idempotencyKey,
2986
+ idempotent: true,
2987
+ method: "POST",
2988
+ operationId: "postOrganizationBillingPaymentMethod",
2989
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods`,
2990
+ requiresSession: true,
2991
+ retry: options?.retry,
2992
+ serverBudgetMs: 30000,
2993
+ signal: options?.signal,
2994
+ surface: "rest",
2995
+ takesIdempotencyKey: true,
2996
+ timeoutMs: options?.timeoutMs,
2997
+ });
2998
+
2999
+ /**
3000
+ * Choose which payment method an organization is charged on.
3001
+ * POST /v1/organizations/{organization_id}/billing/payment-methods/{payment_method_id}/set-default
3002
+ * Requires a publishable key with the `management` scope.
3003
+ * Acts as the user its session token was minted for, so the token must name one.
3004
+ */
3005
+ export const postOrganizationBillingPaymentMethodSetDefault = (transport: MountayaTransport, args: {
3006
+ readonly "organization_id": string;
3007
+ readonly "payment_method_id": string;
3008
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3009
+ readonly idempotencyKey?: string | undefined;
3010
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationBillingPaymentMethodSetDefault"]>> =>
3011
+ transport.request({
3012
+ actsAsMember: true,
3013
+ idempotencyKey: args.idempotencyKey,
3014
+ idempotent: true,
3015
+ method: "POST",
3016
+ operationId: "postOrganizationBillingPaymentMethodSetDefault",
3017
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods/${encodeURIComponent(String(args.payment_method_id))}/set-default`,
3018
+ requiresSession: true,
3019
+ retry: options?.retry,
3020
+ serverBudgetMs: 30000,
3021
+ signal: options?.signal,
3022
+ surface: "rest",
3023
+ takesIdempotencyKey: true,
3024
+ timeoutMs: options?.timeoutMs,
3025
+ });
3026
+
3027
+ /**
3028
+ * Start collecting a card for an organization.
3029
+ * POST /v1/organizations/{organization_id}/billing/payment-methods/setup
3030
+ * Requires a publishable key with the `management` scope.
3031
+ * Acts as the user its session token was minted for, so the token must name one.
3032
+ */
3033
+ export const postOrganizationBillingPaymentMethodSetup = (transport: MountayaTransport, args: {
3034
+ readonly "organization_id": string;
3035
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3036
+ readonly idempotencyKey?: string | undefined;
3037
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationBillingPaymentMethodSetup"]>> =>
3038
+ transport.request({
3039
+ actsAsMember: true,
3040
+ idempotencyKey: args.idempotencyKey,
3041
+ idempotent: false,
3042
+ method: "POST",
3043
+ operationId: "postOrganizationBillingPaymentMethodSetup",
3044
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods/setup`,
3045
+ requiresSession: true,
3046
+ retry: options?.retry,
3047
+ serverBudgetMs: 30000,
3048
+ signal: options?.signal,
3049
+ surface: "rest",
3050
+ takesIdempotencyKey: true,
3051
+ timeoutMs: options?.timeoutMs,
3052
+ });
3053
+
3054
+ /**
3055
+ * Open an organization's billing.
3056
+ * POST /v1/organizations/{organization_id}/billing/provision
3057
+ * Requires a publishable key with the `management` scope.
3058
+ * Acts as the user its session token was minted for, so the token must name one.
3059
+ */
3060
+ export const postOrganizationBillingProvision = (transport: MountayaTransport, args: {
3061
+ readonly "organization_id": string;
3062
+ readonly body: operations["postOrganizationBillingProvision"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3063
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3064
+ readonly idempotencyKey?: string | undefined;
3065
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationBillingProvision"]>> =>
3066
+ transport.request({
3067
+ actsAsMember: true,
3068
+ body: args.body,
3069
+ idempotencyKey: args.idempotencyKey,
3070
+ idempotent: true,
3071
+ method: "POST",
3072
+ operationId: "postOrganizationBillingProvision",
3073
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/provision`,
3074
+ requiresSession: true,
3075
+ retry: options?.retry,
3076
+ serverBudgetMs: 30000,
3077
+ signal: options?.signal,
3078
+ surface: "rest",
3079
+ takesIdempotencyKey: true,
3080
+ timeoutMs: options?.timeoutMs,
3081
+ });
3082
+
3083
+ /**
3084
+ * Run an organization's Data API subscription.
3085
+ * POST /v1/organizations/{organization_id}/billing/subscription
3086
+ * Requires a publishable key with the `management` scope.
3087
+ * Acts as the user its session token was minted for, so the token must name one.
3088
+ */
3089
+ export const postOrganizationBillingSubscription = (transport: MountayaTransport, args: {
3090
+ readonly "organization_id": string;
3091
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3092
+ readonly idempotencyKey?: string | undefined;
3093
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationBillingSubscription"]>> =>
3094
+ transport.request({
3095
+ actsAsMember: true,
3096
+ dates: { data: organizationSubscriptionSummaryDates },
3097
+ idempotencyKey: args.idempotencyKey,
3098
+ idempotent: true,
3099
+ method: "POST",
3100
+ operationId: "postOrganizationBillingSubscription",
3101
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/subscription`,
3102
+ requiresSession: true,
3103
+ retry: options?.retry,
3104
+ serverBudgetMs: 30000,
3105
+ signal: options?.signal,
3106
+ surface: "rest",
3107
+ takesIdempotencyKey: true,
3108
+ timeoutMs: options?.timeoutMs,
3109
+ });
3110
+
3111
+ /**
3112
+ * Invite somebody to an organization by email.
3113
+ * POST /v1/organizations/{organization_id}/invitations
3114
+ * Requires a publishable key with the `management` scope.
3115
+ * Acts as the user its session token was minted for, so the token must name one.
3116
+ */
3117
+ export const postOrganizationInvitation = (transport: MountayaTransport, args: {
3118
+ readonly "organization_id": string;
3119
+ readonly body: operations["postOrganizationInvitation"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3120
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3121
+ readonly idempotencyKey?: string | undefined;
3122
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationInvitation"]>> =>
3123
+ transport.request({
3124
+ actsAsMember: true,
3125
+ body: args.body,
3126
+ dates: { data: organizationInvitationDates },
3127
+ idempotencyKey: args.idempotencyKey,
3128
+ idempotent: false,
3129
+ method: "POST",
3130
+ operationId: "postOrganizationInvitation",
3131
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations`,
3132
+ requiresSession: true,
3133
+ retry: options?.retry,
3134
+ serverBudgetMs: 30000,
3135
+ signal: options?.signal,
3136
+ surface: "rest",
3137
+ takesIdempotencyKey: true,
3138
+ timeoutMs: options?.timeoutMs,
3139
+ });
3140
+
3141
+ /**
3142
+ * Resolve the organization a publishable key belongs to.
3143
+ * POST /v1/organizations/lookup
3144
+ * Takes no credential.
3145
+ */
3146
+ export const postOrganizationLookup = (transport: MountayaTransport, args: {
3147
+ readonly body: operations["postOrganizationLookup"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3148
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationLookup"]>> =>
3149
+ transport.request({
3150
+ body: args.body,
3151
+ dates: { data: organizationDates },
3152
+ idempotent: true,
3153
+ method: "POST",
3154
+ operationId: "postOrganizationLookup",
3155
+ path: "/v1/organizations/lookup",
3156
+ retry: options?.retry,
3157
+ serverBudgetMs: 30000,
3158
+ signal: options?.signal,
3159
+ surface: "rest",
3160
+ takesNoCredential: true,
3161
+ timeoutMs: options?.timeoutMs,
3162
+ });
3163
+
3164
+ /**
3165
+ * Create a publishable key.
3166
+ * POST /v1/organizations/{organization_id}/publishable-keys
3167
+ * Requires a publishable key with the `management` scope.
3168
+ * Acts as the user its session token was minted for, so the token must name one.
3169
+ */
3170
+ export const postOrganizationPublishableKey = (transport: MountayaTransport, args: {
3171
+ readonly "organization_id": string;
3172
+ readonly body: operations["postOrganizationPublishableKey"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3173
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3174
+ readonly idempotencyKey?: string | undefined;
3175
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationPublishableKey"]>> =>
3176
+ transport.request({
3177
+ actsAsMember: true,
3178
+ body: args.body,
3179
+ dates: { data: publishableKeyDates },
3180
+ idempotencyKey: args.idempotencyKey,
3181
+ idempotent: false,
3182
+ method: "POST",
3183
+ operationId: "postOrganizationPublishableKey",
3184
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys`,
3185
+ requiresSession: true,
3186
+ retry: options?.retry,
3187
+ serverBudgetMs: 30000,
3188
+ signal: options?.signal,
3189
+ surface: "rest",
3190
+ takesIdempotencyKey: true,
3191
+ timeoutMs: options?.timeoutMs,
3192
+ });
3193
+
3194
+ /**
3195
+ * Resend an event, send a test event, or redeliver an endpoint's events.
3196
+ * POST /v1/organizations/{organization_id}/webhook-deliveries
3197
+ * Requires a publishable key with the `management` scope.
3198
+ * Acts as the user its session token was minted for, so the token must name one.
3199
+ */
3200
+ export const postOrganizationWebhookDelivery = (transport: MountayaTransport, args: {
3201
+ readonly "organization_id": string;
3202
+ readonly body: operations["postOrganizationWebhookDelivery"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3203
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3204
+ readonly idempotencyKey?: string | undefined;
3205
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationWebhookDelivery"]>> =>
3206
+ transport.request({
3207
+ actsAsMember: true,
3208
+ body: args.body,
3209
+ dates: { data: webhookDeliveryTriggerDates },
3210
+ idempotencyKey: args.idempotencyKey,
3211
+ idempotent: false,
3212
+ method: "POST",
3213
+ operationId: "postOrganizationWebhookDelivery",
3214
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-deliveries`,
3215
+ requiresSession: true,
3216
+ retry: options?.retry,
3217
+ serverBudgetMs: 30000,
3218
+ signal: options?.signal,
3219
+ surface: "rest",
3220
+ takesIdempotencyKey: true,
3221
+ timeoutMs: options?.timeoutMs,
3222
+ });
3223
+
3224
+ /**
3225
+ * Create a webhook endpoint.
3226
+ * POST /v1/organizations/{organization_id}/webhook-endpoints
3227
+ * Requires a publishable key with the `management` scope.
3228
+ * Acts as the user its session token was minted for, so the token must name one.
3229
+ */
3230
+ export const postOrganizationWebhookEndpoint = (transport: MountayaTransport, args: {
3231
+ readonly "organization_id": string;
3232
+ readonly body: operations["postOrganizationWebhookEndpoint"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3233
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3234
+ readonly idempotencyKey?: string | undefined;
3235
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postOrganizationWebhookEndpoint"]>> =>
3236
+ transport.request({
3237
+ actsAsMember: true,
3238
+ body: args.body,
3239
+ dates: { data: webhookEndpointWithSecretDates },
3240
+ idempotencyKey: args.idempotencyKey,
3241
+ idempotent: false,
3242
+ method: "POST",
3243
+ operationId: "postOrganizationWebhookEndpoint",
3244
+ path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints`,
3245
+ requiresSession: true,
3246
+ retry: options?.retry,
3247
+ serverBudgetMs: 30000,
3248
+ signal: options?.signal,
3249
+ surface: "rest",
3250
+ takesIdempotencyKey: true,
3251
+ timeoutMs: options?.timeoutMs,
3252
+ });
3253
+
3254
+ /**
3255
+ * Create a session token using a secret key.
3256
+ * POST /v1/sessions
3257
+ * Requires a secret key, and takes no other credential.
3258
+ */
3259
+ export const postSession = (transport: MountayaTransport, args: {
3260
+ readonly body: operations["postSession"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3261
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postSession"]>> =>
3262
+ transport.request({
3263
+ body: args.body,
3264
+ dates: { data: sessionDates },
3265
+ idempotent: true,
3266
+ method: "POST",
3267
+ operationId: "postSession",
3268
+ path: "/v1/sessions",
3269
+ requiresSecretKey: true,
3270
+ retry: options?.retry,
3271
+ serverBudgetMs: 30000,
3272
+ signal: options?.signal,
3273
+ surface: "rest",
3274
+ timeoutMs: options?.timeoutMs,
3275
+ });
3276
+
3277
+ /**
3278
+ * Create a new zone.
3279
+ * POST /v1/zones
3280
+ * Requires a publishable key with the `studio-embedded` scope.
3281
+ * Acts as the user its session token was minted for, so the token must name one.
3282
+ */
3283
+ export const postZone = (transport: MountayaTransport, args: {
3284
+ readonly body: operations["postZone"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3285
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3286
+ readonly idempotencyKey?: string | undefined;
3287
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postZone"]>> =>
3288
+ transport.request({
3289
+ actsAsMember: true,
3290
+ body: args.body,
3291
+ dates: { data: zoneDates },
3292
+ idempotencyKey: args.idempotencyKey,
3293
+ idempotent: false,
3294
+ method: "POST",
3295
+ operationId: "postZone",
3296
+ path: "/v1/zones",
3297
+ requiresSession: true,
3298
+ retry: options?.retry,
3299
+ serverBudgetMs: 30000,
3300
+ signal: options?.signal,
3301
+ surface: "rest",
3302
+ takesIdempotencyKey: true,
3303
+ timeoutMs: options?.timeoutMs,
3304
+ });
3305
+
3306
+ /**
3307
+ * Send a collaboration signal into a zone's session.
3308
+ * POST /v1/zones/{zone_id}/collab
3309
+ * Requires a publishable key with the `studio-embedded` scope.
3310
+ * Acts as the user its session token was minted for, so the token must name one.
3311
+ */
3312
+ export const postZoneCollab = (transport: MountayaTransport, args: {
3313
+ readonly "zone_id": string;
3314
+ readonly body: operations["postZoneCollab"]["requestBody"] extends { content: { "application/json": infer B } } ? B : never;
3315
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postZoneCollab"]>> =>
3316
+ transport.request({
3317
+ actsAsMember: true,
3318
+ body: args.body,
3319
+ idempotent: true,
3320
+ method: "POST",
3321
+ operationId: "postZoneCollab",
3322
+ path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/collab`,
3323
+ requiresSession: true,
3324
+ retry: options?.retry,
3325
+ serverBudgetMs: 30000,
3326
+ signal: options?.signal,
3327
+ surface: "rest",
3328
+ timeoutMs: options?.timeoutMs,
3329
+ });
3330
+
3331
+ /**
3332
+ * Publish the zone's current draft.
3333
+ * POST /v1/zones/{zone_id}/publication
3334
+ * Requires a publishable key with the `studio-embedded` scope.
3335
+ * Acts as the user its session token was minted for, so the token must name one.
3336
+ */
3337
+ export const postZonePublication = (transport: MountayaTransport, args: {
3338
+ readonly "zone_id": string;
3339
+ /** The `Idempotency-Key` every attempt sends; left out, the client draws one for the call. */
3340
+ readonly idempotencyKey?: string | undefined;
3341
+ /** The `etag` the resource was read under, sent as `If-Match`; left out, the write is unconditional. */
3342
+ readonly ifMatch?: string | undefined;
3343
+ }, options?: RequestOptions): Promise<SuccessBody<operations["postZonePublication"]>> =>
3344
+ transport.request({
3345
+ actsAsMember: true,
3346
+ dates: { data: zoneDates },
3347
+ idempotencyKey: args.idempotencyKey,
3348
+ idempotent: true,
3349
+ ifMatch: args.ifMatch,
3350
+ method: "POST",
3351
+ operationId: "postZonePublication",
3352
+ path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/publication`,
3353
+ requiresSession: true,
3354
+ retry: options?.retry,
3355
+ serverBudgetMs: 30000,
3356
+ signal: options?.signal,
3357
+ surface: "rest",
3358
+ takesIdempotencyKey: true,
3359
+ timeoutMs: options?.timeoutMs,
3360
+ });
3361
+
3362
+ /**
3363
+ * bind returns every 'api' operation with the transport applied.
3364
+ */
3365
+ export const bind = (transport: MountayaTransport) => ({
3366
+ admin: {
3367
+ billing: {
3368
+ /**
3369
+ * Detach a payment method from an organization.
3370
+ * DELETE /v1/organizations/{organization_id}/billing/payment-methods/{payment_method_id}
3371
+ * Requires a publishable key with the `management` scope.
3372
+ * Acts as the user its session token was minted for, so the token must name one.
3373
+ * @see {@link deleteOrganizationBillingPaymentMethod}
3374
+ */
3375
+ deleteOrganizationBillingPaymentMethod: (args: Parameters<typeof deleteOrganizationBillingPaymentMethod>[1], options?: RequestOptions) => deleteOrganizationBillingPaymentMethod(transport, args, options),
3376
+ /**
3377
+ * End an organization's Data API subscription at the end of its period.
3378
+ * DELETE /v1/organizations/{organization_id}/billing/subscription
3379
+ * Requires a publishable key with the `management` scope.
3380
+ * Acts as the user its session token was minted for, so the token must name one.
3381
+ * @see {@link deleteOrganizationBillingSubscription}
3382
+ */
3383
+ deleteOrganizationBillingSubscription: (args: Parameters<typeof deleteOrganizationBillingSubscription>[1], options?: RequestOptions) => deleteOrganizationBillingSubscription(transport, args, options),
3384
+ /**
3385
+ * List the billing catalog.
3386
+ * GET /v1/billing/products
3387
+ * Requires a publishable key with the `management` scope.
3388
+ * @see {@link getBillingProducts}
3389
+ */
3390
+ getBillingProducts: (options?: RequestOptions) => getBillingProducts(transport, options),
3391
+ /**
3392
+ * Retrieve an organization's billing information.
3393
+ * GET /v1/organizations/{organization_id}/billing/info
3394
+ * Requires a publishable key with the `management` scope.
3395
+ * @see {@link getOrganizationBillingInfo}
3396
+ */
3397
+ getOrganizationBillingInfo: (args: Parameters<typeof getOrganizationBillingInfo>[1], options?: RequestOptions) => getOrganizationBillingInfo(transport, args, options),
3398
+ /**
3399
+ * List an organization's invoices.
3400
+ * GET /v1/organizations/{organization_id}/billing/invoices
3401
+ * Requires a publishable key with the `management` scope.
3402
+ * @see {@link getOrganizationBillingInvoices}
3403
+ */
3404
+ getOrganizationBillingInvoices: (args: Parameters<typeof getOrganizationBillingInvoices>[1], options?: RequestOptions) => getOrganizationBillingInvoices(transport, args, options),
3405
+ /**
3406
+ * List an organization's saved payment methods.
3407
+ * GET /v1/organizations/{organization_id}/billing/payment-methods
3408
+ * Requires a publishable key with the `management` scope.
3409
+ * @see {@link getOrganizationBillingPaymentMethods}
3410
+ */
3411
+ getOrganizationBillingPaymentMethods: (args: Parameters<typeof getOrganizationBillingPaymentMethods>[1], options?: RequestOptions) => getOrganizationBillingPaymentMethods(transport, args, options),
3412
+ /**
3413
+ * Check what a promotion code is worth to an organization.
3414
+ * GET /v1/organizations/{organization_id}/billing/promotion-codes/{code}
3415
+ * Requires a publishable key with the `management` scope.
3416
+ * @see {@link getOrganizationBillingPromotionCode}
3417
+ */
3418
+ getOrganizationBillingPromotionCode: (args: Parameters<typeof getOrganizationBillingPromotionCode>[1], options?: RequestOptions) => getOrganizationBillingPromotionCode(transport, args, options),
3419
+ /**
3420
+ * Retrieve an organization's subscription.
3421
+ * GET /v1/organizations/{organization_id}/billing/subscription
3422
+ * Requires a publishable key with the `management` scope.
3423
+ * @see {@link getOrganizationBillingSubscription}
3424
+ */
3425
+ getOrganizationBillingSubscription: (args: Parameters<typeof getOrganizationBillingSubscription>[1], options?: RequestOptions) => getOrganizationBillingSubscription(transport, args, options),
3426
+ /**
3427
+ * Update an organization's billing information.
3428
+ * PATCH /v1/organizations/{organization_id}/billing/info
3429
+ * Requires a publishable key with the `management` scope.
3430
+ * Acts as the user its session token was minted for, so the token must name one.
3431
+ * @see {@link patchOrganizationBillingInfo}
3432
+ */
3433
+ patchOrganizationBillingInfo: (args: Parameters<typeof patchOrganizationBillingInfo>[1], options?: RequestOptions) => patchOrganizationBillingInfo(transport, args, options),
3434
+ /**
3435
+ * Save a confirmed card against an organization.
3436
+ * POST /v1/organizations/{organization_id}/billing/payment-methods
3437
+ * Requires a publishable key with the `management` scope.
3438
+ * Acts as the user its session token was minted for, so the token must name one.
3439
+ * @see {@link postOrganizationBillingPaymentMethod}
3440
+ */
3441
+ postOrganizationBillingPaymentMethod: (args: Parameters<typeof postOrganizationBillingPaymentMethod>[1], options?: RequestOptions) => postOrganizationBillingPaymentMethod(transport, args, options),
3442
+ /**
3443
+ * Choose which payment method an organization is charged on.
3444
+ * POST /v1/organizations/{organization_id}/billing/payment-methods/{payment_method_id}/set-default
3445
+ * Requires a publishable key with the `management` scope.
3446
+ * Acts as the user its session token was minted for, so the token must name one.
3447
+ * @see {@link postOrganizationBillingPaymentMethodSetDefault}
3448
+ */
3449
+ postOrganizationBillingPaymentMethodSetDefault: (args: Parameters<typeof postOrganizationBillingPaymentMethodSetDefault>[1], options?: RequestOptions) => postOrganizationBillingPaymentMethodSetDefault(transport, args, options),
3450
+ /**
3451
+ * Start collecting a card for an organization.
3452
+ * POST /v1/organizations/{organization_id}/billing/payment-methods/setup
3453
+ * Requires a publishable key with the `management` scope.
3454
+ * Acts as the user its session token was minted for, so the token must name one.
3455
+ * @see {@link postOrganizationBillingPaymentMethodSetup}
3456
+ */
3457
+ postOrganizationBillingPaymentMethodSetup: (args: Parameters<typeof postOrganizationBillingPaymentMethodSetup>[1], options?: RequestOptions) => postOrganizationBillingPaymentMethodSetup(transport, args, options),
3458
+ /**
3459
+ * Open an organization's billing.
3460
+ * POST /v1/organizations/{organization_id}/billing/provision
3461
+ * Requires a publishable key with the `management` scope.
3462
+ * Acts as the user its session token was minted for, so the token must name one.
3463
+ * @see {@link postOrganizationBillingProvision}
3464
+ */
3465
+ postOrganizationBillingProvision: (args: Parameters<typeof postOrganizationBillingProvision>[1], options?: RequestOptions) => postOrganizationBillingProvision(transport, args, options),
3466
+ /**
3467
+ * Run an organization's Data API subscription.
3468
+ * POST /v1/organizations/{organization_id}/billing/subscription
3469
+ * Requires a publishable key with the `management` scope.
3470
+ * Acts as the user its session token was minted for, so the token must name one.
3471
+ * @see {@link postOrganizationBillingSubscription}
3472
+ */
3473
+ postOrganizationBillingSubscription: (args: Parameters<typeof postOrganizationBillingSubscription>[1], options?: RequestOptions) => postOrganizationBillingSubscription(transport, args, options),
3474
+ },
3475
+ invitations: {
3476
+ /**
3477
+ * Withdraw a pending invitation.
3478
+ * DELETE /v1/organizations/{organization_id}/invitations/{invitation_id}
3479
+ * Requires a publishable key with the `management` scope.
3480
+ * Acts as the user its session token was minted for, so the token must name one.
3481
+ * @see {@link deleteOrganizationInvitation}
3482
+ */
3483
+ deleteOrganizationInvitation: (args: Parameters<typeof deleteOrganizationInvitation>[1], options?: RequestOptions) => deleteOrganizationInvitation(transport, args, options),
3484
+ /**
3485
+ * Retrieve a pending invitation.
3486
+ * GET /v1/organizations/{organization_id}/invitations/{invitation_id}
3487
+ * Requires a publishable key with the `management` scope.
3488
+ * @see {@link getOrganizationInvitation}
3489
+ */
3490
+ getOrganizationInvitation: (args: Parameters<typeof getOrganizationInvitation>[1], options?: RequestOptions) => getOrganizationInvitation(transport, args, options),
3491
+ /**
3492
+ * List an organization's pending invitations.
3493
+ * GET /v1/organizations/{organization_id}/invitations
3494
+ * Requires a publishable key with the `management` scope.
3495
+ * @see {@link getOrganizationInvitations}
3496
+ */
3497
+ getOrganizationInvitations: (args: Parameters<typeof getOrganizationInvitations>[1], options?: RequestOptions) => getOrganizationInvitations(transport, args, options),
3498
+ /**
3499
+ * Invite somebody to an organization by email.
3500
+ * POST /v1/organizations/{organization_id}/invitations
3501
+ * Requires a publishable key with the `management` scope.
3502
+ * Acts as the user its session token was minted for, so the token must name one.
3503
+ * @see {@link postOrganizationInvitation}
3504
+ */
3505
+ postOrganizationInvitation: (args: Parameters<typeof postOrganizationInvitation>[1], options?: RequestOptions) => postOrganizationInvitation(transport, args, options),
3506
+ },
3507
+ keys: {
3508
+ /**
3509
+ * Revoke a publishable key.
3510
+ * DELETE /v1/organizations/{organization_id}/publishable-keys/{key_id}
3511
+ * Requires a publishable key with the `management` scope.
3512
+ * Acts as the user its session token was minted for, so the token must name one.
3513
+ * @see {@link deleteOrganizationPublishableKey}
3514
+ */
3515
+ deleteOrganizationPublishableKey: (args: Parameters<typeof deleteOrganizationPublishableKey>[1], options?: RequestOptions) => deleteOrganizationPublishableKey(transport, args, options),
3516
+ /**
3517
+ * Retrieve a publishable key.
3518
+ * GET /v1/organizations/{organization_id}/publishable-keys/{key_id}
3519
+ * Requires a publishable key with the `management` scope.
3520
+ * @see {@link getOrganizationPublishableKey}
3521
+ */
3522
+ getOrganizationPublishableKey: (args: Parameters<typeof getOrganizationPublishableKey>[1], options?: RequestOptions) => getOrganizationPublishableKey(transport, args, options),
3523
+ /**
3524
+ * List an organization's publishable keys.
3525
+ * GET /v1/organizations/{organization_id}/publishable-keys
3526
+ * Requires a publishable key with the `management` scope.
3527
+ * @see {@link getOrganizationPublishableKeys}
3528
+ */
3529
+ getOrganizationPublishableKeys: (args: Parameters<typeof getOrganizationPublishableKeys>[1], options?: RequestOptions) => getOrganizationPublishableKeys(transport, args, options),
3530
+ /**
3531
+ * Update a publishable key's name or scopes.
3532
+ * PATCH /v1/organizations/{organization_id}/publishable-keys/{key_id}
3533
+ * Requires a publishable key with the `management` scope.
3534
+ * Acts as the user its session token was minted for, so the token must name one.
3535
+ * @see {@link patchOrganizationPublishableKey}
3536
+ */
3537
+ patchOrganizationPublishableKey: (args: Parameters<typeof patchOrganizationPublishableKey>[1], options?: RequestOptions) => patchOrganizationPublishableKey(transport, args, options),
3538
+ /**
3539
+ * Create a publishable key.
3540
+ * POST /v1/organizations/{organization_id}/publishable-keys
3541
+ * Requires a publishable key with the `management` scope.
3542
+ * Acts as the user its session token was minted for, so the token must name one.
3543
+ * @see {@link postOrganizationPublishableKey}
3544
+ */
3545
+ postOrganizationPublishableKey: (args: Parameters<typeof postOrganizationPublishableKey>[1], options?: RequestOptions) => postOrganizationPublishableKey(transport, args, options),
3546
+ },
3547
+ members: {
3548
+ /**
3549
+ * Remove a member from an organization, or leave it.
3550
+ * DELETE /v1/organizations/{organization_id}/members/{user_id}
3551
+ * Requires a publishable key with the `management` scope.
3552
+ * Acts as the user its session token was minted for, so the token must name one.
3553
+ * @see {@link deleteOrganizationMember}
3554
+ */
3555
+ deleteOrganizationMember: (args: Parameters<typeof deleteOrganizationMember>[1], options?: RequestOptions) => deleteOrganizationMember(transport, args, options),
3556
+ /**
3557
+ * List an organization's members.
3558
+ * GET /v1/organizations/{organization_id}/members
3559
+ * Requires a publishable key with the `management` scope.
3560
+ * @see {@link getOrganizationMembers}
3561
+ */
3562
+ getOrganizationMembers: (args: Parameters<typeof getOrganizationMembers>[1], options?: RequestOptions) => getOrganizationMembers(transport, args, options),
3563
+ /**
3564
+ * Change a member's role.
3565
+ * PATCH /v1/organizations/{organization_id}/members/{user_id}
3566
+ * Requires a publishable key with the `management` scope.
3567
+ * Acts as the user its session token was minted for, so the token must name one.
3568
+ * @see {@link patchOrganizationMember}
3569
+ */
3570
+ patchOrganizationMember: (args: Parameters<typeof patchOrganizationMember>[1], options?: RequestOptions) => patchOrganizationMember(transport, args, options),
3571
+ },
3572
+ organizations: {
3573
+ /**
3574
+ * Delete an organization's AI provider configuration.
3575
+ * DELETE /v1/organizations/{organization_id}/ai-provider-config
3576
+ * Requires a publishable key with the `management` scope.
3577
+ * Acts as the user its session token was minted for, so the token must name one.
3578
+ * @see {@link deleteOrganizationAiProviderConfig}
3579
+ */
3580
+ deleteOrganizationAiProviderConfig: (args: Parameters<typeof deleteOrganizationAiProviderConfig>[1], options?: RequestOptions) => deleteOrganizationAiProviderConfig(transport, args, options),
3581
+ /**
3582
+ * List the AI provider catalog.
3583
+ * GET /v1/ai-providers
3584
+ * Requires a publishable key with the `management` scope.
3585
+ * @see {@link getAiProviders}
3586
+ */
3587
+ getAiProviders: (options?: RequestOptions) => getAiProviders(transport, options),
3588
+ /**
3589
+ * Retrieve an organization.
3590
+ * GET /v1/organizations/{organization_id}
3591
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3592
+ * @see {@link getOrganization}
3593
+ */
3594
+ getOrganization: (args: Parameters<typeof getOrganization>[1], options?: RequestOptions) => getOrganization(transport, args, options),
3595
+ /**
3596
+ * Retrieve an organization's AI provider configuration.
3597
+ * GET /v1/organizations/{organization_id}/ai-provider-config
3598
+ * Requires a publishable key with the `management` scope.
3599
+ * @see {@link getOrganizationAiProviderConfig}
3600
+ */
3601
+ getOrganizationAiProviderConfig: (args: Parameters<typeof getOrganizationAiProviderConfig>[1], options?: RequestOptions) => getOrganizationAiProviderConfig(transport, args, options),
3602
+ /**
3603
+ * Retrieve an organization's Map Publishing settings.
3604
+ * GET /v1/organizations/{organization_id}/settings
3605
+ * Requires a publishable key with the `management` scope.
3606
+ * @see {@link getOrganizationSettings}
3607
+ */
3608
+ getOrganizationSettings: (args: Parameters<typeof getOrganizationSettings>[1], options?: RequestOptions) => getOrganizationSettings(transport, args, options),
3609
+ /**
3610
+ * Retrieve an organization's data usage.
3611
+ * GET /v1/organizations/{organization_id}/usage/data
3612
+ * Requires a publishable key with the `management` scope.
3613
+ * @see {@link getOrganizationUsageData}
3614
+ */
3615
+ getOrganizationUsageData: (args: Parameters<typeof getOrganizationUsageData>[1], options?: RequestOptions) => getOrganizationUsageData(transport, args, options),
3616
+ /**
3617
+ * Retrieve an organization's Tile API usage.
3618
+ * GET /v1/organizations/{organization_id}/usage/tiles
3619
+ * Requires a publishable key with the `management` scope.
3620
+ * @see {@link getOrganizationUsageTiles}
3621
+ */
3622
+ getOrganizationUsageTiles: (args: Parameters<typeof getOrganizationUsageTiles>[1], options?: RequestOptions) => getOrganizationUsageTiles(transport, args, options),
3623
+ /**
3624
+ * Update an organization.
3625
+ * PATCH /v1/organizations/{organization_id}
3626
+ * Requires a publishable key with the `management` scope.
3627
+ * Acts as the user its session token was minted for, so the token must name one.
3628
+ * @see {@link patchOrganization}
3629
+ */
3630
+ patchOrganization: (args: Parameters<typeof patchOrganization>[1], options?: RequestOptions) => patchOrganization(transport, args, options),
3631
+ /**
3632
+ * Update an organization's AI provider configuration.
3633
+ * PATCH /v1/organizations/{organization_id}/ai-provider-config
3634
+ * Requires a publishable key with the `management` scope.
3635
+ * Acts as the user its session token was minted for, so the token must name one.
3636
+ * @see {@link patchOrganizationAiProviderConfig}
3637
+ */
3638
+ patchOrganizationAiProviderConfig: (args: Parameters<typeof patchOrganizationAiProviderConfig>[1], options?: RequestOptions) => patchOrganizationAiProviderConfig(transport, args, options),
3639
+ /**
3640
+ * Update an organization's Map Publishing settings.
3641
+ * PATCH /v1/organizations/{organization_id}/settings
3642
+ * Requires a publishable key with the `management` scope.
3643
+ * Acts as the user its session token was minted for, so the token must name one.
3644
+ * @see {@link patchOrganizationSettings}
3645
+ */
3646
+ patchOrganizationSettings: (args: Parameters<typeof patchOrganizationSettings>[1], options?: RequestOptions) => patchOrganizationSettings(transport, args, options),
3647
+ /**
3648
+ * Create an organization.
3649
+ * POST /v1/organizations
3650
+ * Requires a publishable key with the `management` scope.
3651
+ * Acts as the user its session token was minted for, so the token must name one.
3652
+ * @see {@link postOrganization}
3653
+ */
3654
+ postOrganization: (args: Parameters<typeof postOrganization>[1], options?: RequestOptions) => postOrganization(transport, args, options),
3655
+ /**
3656
+ * Configure an organization's AI provider.
3657
+ * POST /v1/organizations/{organization_id}/ai-provider-config
3658
+ * Requires a publishable key with the `management` scope.
3659
+ * Acts as the user its session token was minted for, so the token must name one.
3660
+ * @see {@link postOrganizationAiProviderConfig}
3661
+ */
3662
+ postOrganizationAiProviderConfig: (args: Parameters<typeof postOrganizationAiProviderConfig>[1], options?: RequestOptions) => postOrganizationAiProviderConfig(transport, args, options),
3663
+ },
3664
+ sessions: {
3665
+ /**
3666
+ * Create a session token using a secret key.
3667
+ * POST /v1/sessions
3668
+ * Requires a secret key, and takes no other credential.
3669
+ * @see {@link postSession}
3670
+ */
3671
+ postSession: (args: Parameters<typeof postSession>[1], options?: RequestOptions) => postSession(transport, args, options),
3672
+ },
3673
+ users: {
3674
+ /**
3675
+ * Decline an invitation.
3676
+ * DELETE /v1/me/invitations/{invitation_id}
3677
+ * Requires a publishable key with the `studio-embedded` scope.
3678
+ * Acts as the user its session token was minted for, so the token must name one.
3679
+ * @see {@link deleteMyInvitation}
3680
+ */
3681
+ deleteMyInvitation: (args: Parameters<typeof deleteMyInvitation>[1], options?: RequestOptions) => deleteMyInvitation(transport, args, options),
3682
+ /**
3683
+ * List the invitations waiting for the acting user.
3684
+ * GET /v1/me/invitations
3685
+ * Requires a publishable key with the `studio-embedded` scope.
3686
+ * Acts as the user its session token was minted for, so the token must name one.
3687
+ * @see {@link getMyInvitations}
3688
+ */
3689
+ getMyInvitations: (args?: Parameters<typeof getMyInvitations>[1], options?: RequestOptions) => getMyInvitations(transport, args, options),
3690
+ /**
3691
+ * Retrieve the acting user's notification emails for an organization.
3692
+ * GET /v1/me/organizations/{organization_id}/notification-preferences
3693
+ * Requires a publishable key with the `studio-embedded` scope.
3694
+ * Acts as the user its session token was minted for, so the token must name one.
3695
+ * @see {@link getMyOrganizationNotificationPreferences}
3696
+ */
3697
+ getMyOrganizationNotificationPreferences: (args: Parameters<typeof getMyOrganizationNotificationPreferences>[1], options?: RequestOptions) => getMyOrganizationNotificationPreferences(transport, args, options),
3698
+ /**
3699
+ * List the acting user's memberships.
3700
+ * GET /v1/me/organizations
3701
+ * Requires a publishable key with the `studio-embedded` scope.
3702
+ * Acts as the user its session token was minted for, so the token must name one.
3703
+ * @see {@link getMyOrganizations}
3704
+ */
3705
+ getMyOrganizations: (args?: Parameters<typeof getMyOrganizations>[1], options?: RequestOptions) => getMyOrganizations(transport, args, options),
3706
+ /**
3707
+ * Retrieve the acting user's display preferences.
3708
+ * GET /v1/me/preferences
3709
+ * Requires a publishable key with the `studio-embedded` scope.
3710
+ * Acts as the user its session token was minted for, so the token must name one.
3711
+ * @see {@link getMyPreferences}
3712
+ */
3713
+ getMyPreferences: (options?: RequestOptions) => getMyPreferences(transport, options),
3714
+ /**
3715
+ * Turn the acting user's notification emails for an organization on or off.
3716
+ * PATCH /v1/me/organizations/{organization_id}/notification-preferences
3717
+ * Requires a publishable key with the `studio-embedded` scope.
3718
+ * Acts as the user its session token was minted for, so the token must name one.
3719
+ * @see {@link patchMyOrganizationNotificationPreferences}
3720
+ */
3721
+ patchMyOrganizationNotificationPreferences: (args: Parameters<typeof patchMyOrganizationNotificationPreferences>[1], options?: RequestOptions) => patchMyOrganizationNotificationPreferences(transport, args, options),
3722
+ /**
3723
+ * Update the acting user's display preferences.
3724
+ * PATCH /v1/me/preferences
3725
+ * Requires a publishable key with the `studio-embedded` scope.
3726
+ * Acts as the user its session token was minted for, so the token must name one.
3727
+ * @see {@link patchMyPreferences}
3728
+ */
3729
+ patchMyPreferences: (args: Parameters<typeof patchMyPreferences>[1], options?: RequestOptions) => patchMyPreferences(transport, args, options),
3730
+ /**
3731
+ * Accept an invitation.
3732
+ * POST /v1/me/invitations/{invitation_id}/accept
3733
+ * Requires a publishable key with the `studio-embedded` scope.
3734
+ * Acts as the user its session token was minted for, so the token must name one.
3735
+ * @see {@link postMyInvitationAccept}
3736
+ */
3737
+ postMyInvitationAccept: (args: Parameters<typeof postMyInvitationAccept>[1], options?: RequestOptions) => postMyInvitationAccept(transport, args, options),
3738
+ },
3739
+ webhooks: {
3740
+ /**
3741
+ * Delete a webhook endpoint.
3742
+ * DELETE /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
3743
+ * Requires a publishable key with the `management` scope.
3744
+ * Acts as the user its session token was minted for, so the token must name one.
3745
+ * @see {@link deleteOrganizationWebhookEndpoint}
3746
+ */
3747
+ deleteOrganizationWebhookEndpoint: (args: Parameters<typeof deleteOrganizationWebhookEndpoint>[1], options?: RequestOptions) => deleteOrganizationWebhookEndpoint(transport, args, options),
3748
+ /**
3749
+ * List an organization's webhook deliveries.
3750
+ * GET /v1/organizations/{organization_id}/webhook-deliveries
3751
+ * Requires a publishable key with the `management` scope.
3752
+ * @see {@link getOrganizationWebhookDeliveries}
3753
+ */
3754
+ getOrganizationWebhookDeliveries: (args: Parameters<typeof getOrganizationWebhookDeliveries>[1], options?: RequestOptions) => getOrganizationWebhookDeliveries(transport, args, options),
3755
+ /**
3756
+ * Retrieve a webhook delivery with its attempts.
3757
+ * GET /v1/organizations/{organization_id}/webhook-deliveries/{delivery_id}
3758
+ * Requires a publishable key with the `management` scope.
3759
+ * @see {@link getOrganizationWebhookDelivery}
3760
+ */
3761
+ getOrganizationWebhookDelivery: (args: Parameters<typeof getOrganizationWebhookDelivery>[1], options?: RequestOptions) => getOrganizationWebhookDelivery(transport, args, options),
3762
+ /**
3763
+ * Retrieve a webhook endpoint.
3764
+ * GET /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
3765
+ * Requires a publishable key with the `management` scope.
3766
+ * @see {@link getOrganizationWebhookEndpoint}
3767
+ */
3768
+ getOrganizationWebhookEndpoint: (args: Parameters<typeof getOrganizationWebhookEndpoint>[1], options?: RequestOptions) => getOrganizationWebhookEndpoint(transport, args, options),
3769
+ /**
3770
+ * List an organization's webhook endpoints.
3771
+ * GET /v1/organizations/{organization_id}/webhook-endpoints
3772
+ * Requires a publishable key with the `management` scope.
3773
+ * @see {@link getOrganizationWebhookEndpoints}
3774
+ */
3775
+ getOrganizationWebhookEndpoints: (args: Parameters<typeof getOrganizationWebhookEndpoints>[1], options?: RequestOptions) => getOrganizationWebhookEndpoints(transport, args, options),
3776
+ /**
3777
+ * Retrieve a webhook event with its deliveries.
3778
+ * GET /v1/organizations/{organization_id}/webhook-events/{event_id}
3779
+ * Requires a publishable key with the `management` scope.
3780
+ * @see {@link getOrganizationWebhookEvent}
3781
+ */
3782
+ getOrganizationWebhookEvent: (args: Parameters<typeof getOrganizationWebhookEvent>[1], options?: RequestOptions) => getOrganizationWebhookEvent(transport, args, options),
3783
+ /**
3784
+ * List an organization's webhook events.
3785
+ * GET /v1/organizations/{organization_id}/webhook-events
3786
+ * Requires a publishable key with the `management` scope.
3787
+ * @see {@link getOrganizationWebhookEvents}
3788
+ */
3789
+ getOrganizationWebhookEvents: (args: Parameters<typeof getOrganizationWebhookEvents>[1], options?: RequestOptions) => getOrganizationWebhookEvents(transport, args, options),
3790
+ /**
3791
+ * Retrieve the reliability of an organization's webhooks.
3792
+ * GET /v1/organizations/{organization_id}/webhook-health
3793
+ * Requires a publishable key with the `management` scope.
3794
+ * @see {@link getOrganizationWebhookHealth}
3795
+ */
3796
+ getOrganizationWebhookHealth: (args: Parameters<typeof getOrganizationWebhookHealth>[1], options?: RequestOptions) => getOrganizationWebhookHealth(transport, args, options),
3797
+ /**
3798
+ * List the public webhook event types.
3799
+ * GET /v1/webhook-event-types
3800
+ * Requires a publishable key with the `management` scope.
3801
+ * @see {@link getWebhookEventTypes}
3802
+ */
3803
+ getWebhookEventTypes: (options?: RequestOptions) => getWebhookEventTypes(transport, options),
3804
+ /**
3805
+ * Update a webhook endpoint.
3806
+ * PATCH /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
3807
+ * Requires a publishable key with the `management` scope.
3808
+ * Acts as the user its session token was minted for, so the token must name one.
3809
+ * @see {@link patchOrganizationWebhookEndpoint}
3810
+ */
3811
+ patchOrganizationWebhookEndpoint: (args: Parameters<typeof patchOrganizationWebhookEndpoint>[1], options?: RequestOptions) => patchOrganizationWebhookEndpoint(transport, args, options),
3812
+ /**
3813
+ * Resend an event, send a test event, or redeliver an endpoint's events.
3814
+ * POST /v1/organizations/{organization_id}/webhook-deliveries
3815
+ * Requires a publishable key with the `management` scope.
3816
+ * Acts as the user its session token was minted for, so the token must name one.
3817
+ * @see {@link postOrganizationWebhookDelivery}
3818
+ */
3819
+ postOrganizationWebhookDelivery: (args: Parameters<typeof postOrganizationWebhookDelivery>[1], options?: RequestOptions) => postOrganizationWebhookDelivery(transport, args, options),
3820
+ /**
3821
+ * Create a webhook endpoint.
3822
+ * POST /v1/organizations/{organization_id}/webhook-endpoints
3823
+ * Requires a publishable key with the `management` scope.
3824
+ * Acts as the user its session token was minted for, so the token must name one.
3825
+ * @see {@link postOrganizationWebhookEndpoint}
3826
+ */
3827
+ postOrganizationWebhookEndpoint: (args: Parameters<typeof postOrganizationWebhookEndpoint>[1], options?: RequestOptions) => postOrganizationWebhookEndpoint(transport, args, options),
3828
+ },
3829
+ },
3830
+ agent: {
3831
+ runs: {
3832
+ /**
3833
+ * Stream an agent run's events over Server-Sent Events.
3834
+ * GET /v1/agent/runs/{run_id}/events
3835
+ * Requires a publishable key with the `studio-embedded` scope.
3836
+ * Acts as the user its session token was minted for, so the token must name one.
3837
+ * @see {@link getAgentRunEvents}
3838
+ */
3839
+ getAgentRunEvents: (args: Parameters<typeof getAgentRunEvents>[1], options?: RequestOptions) => getAgentRunEvents(transport, args, options),
3840
+ /**
3841
+ * Start a new agent run.
3842
+ * POST /v1/agent/runs
3843
+ * Requires a publishable key with the `studio-embedded` scope.
3844
+ * Acts as the user its session token was minted for, so the token must name one.
3845
+ * @see {@link postAgentRun}
3846
+ */
3847
+ postAgentRun: (args: Parameters<typeof postAgentRun>[1], options?: RequestOptions) => postAgentRun(transport, args, options),
3848
+ /**
3849
+ * Record the user's rating of one assistant message in a run.
3850
+ * POST /v1/agent/runs/{run_id}/feedback
3851
+ * Requires a publishable key with the `studio-embedded` scope.
3852
+ * Acts as the user its session token was minted for, so the token must name one.
3853
+ * @see {@link postAgentRunFeedback}
3854
+ */
3855
+ postAgentRunFeedback: (args: Parameters<typeof postAgentRunFeedback>[1], options?: RequestOptions) => postAgentRunFeedback(transport, args, options),
3856
+ /**
3857
+ * Send an input signal into a running agent run.
3858
+ * POST /v1/agent/runs/{run_id}/input
3859
+ * Requires a publishable key with the `studio-embedded` scope.
3860
+ * Acts as the user its session token was minted for, so the token must name one.
3861
+ * @see {@link postAgentRunInput}
3862
+ */
3863
+ postAgentRunInput: (args: Parameters<typeof postAgentRunInput>[1], options?: RequestOptions) => postAgentRunInput(transport, args, options),
3864
+ },
3865
+ },
3866
+ studio: {
3867
+ activities: {
3868
+ /**
3869
+ * List all activity categories and their activities.
3870
+ * GET /v1/activities
3871
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3872
+ * @see {@link getActivities}
3873
+ */
3874
+ getActivities: (options?: RequestOptions) => getActivities(transport, options),
3875
+ },
3876
+ collab: {
3877
+ /**
3878
+ * Stream one itinerary's collaboration session over SSE.
3879
+ * GET /v1/itineraries/{itinerary_id}/events
3880
+ * Requires a publishable key with the `studio-embedded` scope.
3881
+ * Acts as the user its session token was minted for, so the token must name one.
3882
+ * @see {@link getItineraryEvents}
3883
+ */
3884
+ getItineraryEvents: (args: Parameters<typeof getItineraryEvents>[1], options?: RequestOptions) => getItineraryEvents(transport, args, options),
3885
+ /**
3886
+ * Stream an organization's list events over SSE.
3887
+ * GET /v1/organizations/{organization_id}/events
3888
+ * Requires a publishable key with the `studio-embedded` scope.
3889
+ * Acts as the user its session token was minted for, so the token must name one.
3890
+ * @see {@link getOrganizationEvents}
3891
+ */
3892
+ getOrganizationEvents: (args: Parameters<typeof getOrganizationEvents>[1], options?: RequestOptions) => getOrganizationEvents(transport, args, options),
3893
+ /**
3894
+ * Stream one zone's collaboration session over SSE.
3895
+ * GET /v1/zones/{zone_id}/events
3896
+ * Requires a publishable key with the `studio-embedded` scope.
3897
+ * Acts as the user its session token was minted for, so the token must name one.
3898
+ * @see {@link getZoneEvents}
3899
+ */
3900
+ getZoneEvents: (args: Parameters<typeof getZoneEvents>[1], options?: RequestOptions) => getZoneEvents(transport, args, options),
3901
+ /**
3902
+ * Send a collaboration signal into an itinerary's session.
3903
+ * POST /v1/itineraries/{itinerary_id}/collab
3904
+ * Requires a publishable key with the `studio-embedded` scope.
3905
+ * Acts as the user its session token was minted for, so the token must name one.
3906
+ * @see {@link postItineraryCollab}
3907
+ */
3908
+ postItineraryCollab: (args: Parameters<typeof postItineraryCollab>[1], options?: RequestOptions) => postItineraryCollab(transport, args, options),
3909
+ /**
3910
+ * Send a collaboration signal into a zone's session.
3911
+ * POST /v1/zones/{zone_id}/collab
3912
+ * Requires a publishable key with the `studio-embedded` scope.
3913
+ * Acts as the user its session token was minted for, so the token must name one.
3914
+ * @see {@link postZoneCollab}
3915
+ */
3916
+ postZoneCollab: (args: Parameters<typeof postZoneCollab>[1], options?: RequestOptions) => postZoneCollab(transport, args, options),
3917
+ },
3918
+ collections: {
3919
+ /**
3920
+ * Delete a collection.
3921
+ * DELETE /v1/collections/{collection_id}
3922
+ * Requires a publishable key with the `studio-embedded` scope.
3923
+ * Acts as the user its session token was minted for, so the token must name one.
3924
+ * @see {@link deleteCollection}
3925
+ */
3926
+ deleteCollection: (args: Parameters<typeof deleteCollection>[1], options?: RequestOptions) => deleteCollection(transport, args, options),
3927
+ /**
3928
+ * Remove an itinerary from a collection.
3929
+ * DELETE /v1/collections/{collection_id}/itineraries/{itinerary_id}
3930
+ * Requires a publishable key with the `studio-embedded` scope.
3931
+ * Acts as the user its session token was minted for, so the token must name one.
3932
+ * @see {@link deleteCollectionItinerary}
3933
+ */
3934
+ deleteCollectionItinerary: (args: Parameters<typeof deleteCollectionItinerary>[1], options?: RequestOptions) => deleteCollectionItinerary(transport, args, options),
3935
+ /**
3936
+ * Remove the collection's share link.
3937
+ * DELETE /v1/collections/{collection_id}/share-link
3938
+ * Requires a publishable key with the `studio-embedded` scope.
3939
+ * Acts as the user its session token was minted for, so the token must name one.
3940
+ * @see {@link deleteCollectionShareLink}
3941
+ */
3942
+ deleteCollectionShareLink: (args: Parameters<typeof deleteCollectionShareLink>[1], options?: RequestOptions) => deleteCollectionShareLink(transport, args, options),
3943
+ /**
3944
+ * Remove a zone from a collection.
3945
+ * DELETE /v1/collections/{collection_id}/zones/{zone_id}
3946
+ * Requires a publishable key with the `studio-embedded` scope.
3947
+ * Acts as the user its session token was minted for, so the token must name one.
3948
+ * @see {@link deleteCollectionZone}
3949
+ */
3950
+ deleteCollectionZone: (args: Parameters<typeof deleteCollectionZone>[1], options?: RequestOptions) => deleteCollectionZone(transport, args, options),
3951
+ /**
3952
+ * Retrieve a single collection with its itineraries and zones.
3953
+ * GET /v1/collections/{collection_id}
3954
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3955
+ * @see {@link getCollection}
3956
+ */
3957
+ getCollection: (args: Parameters<typeof getCollection>[1], options?: RequestOptions) => getCollection(transport, args, options),
3958
+ /**
3959
+ * List the itineraries a collection contains.
3960
+ * GET /v1/collections/{collection_id}/itineraries
3961
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3962
+ * @see {@link getCollectionItineraries}
3963
+ */
3964
+ getCollectionItineraries: (args: Parameters<typeof getCollectionItineraries>[1], options?: RequestOptions) => getCollectionItineraries(transport, args, options),
3965
+ /**
3966
+ * List collections.
3967
+ * GET /v1/collections
3968
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3969
+ * @see {@link getCollections}
3970
+ */
3971
+ getCollections: (args?: Parameters<typeof getCollections>[1], options?: RequestOptions) => getCollections(transport, args, options),
3972
+ /**
3973
+ * Read the collection's share link.
3974
+ * GET /v1/collections/{collection_id}/share-link
3975
+ * Requires a publishable key with the `studio-embedded` scope.
3976
+ * Acts as the user its session token was minted for, so the token must name one.
3977
+ * @see {@link getCollectionShareLink}
3978
+ */
3979
+ getCollectionShareLink: (args: Parameters<typeof getCollectionShareLink>[1], options?: RequestOptions) => getCollectionShareLink(transport, args, options),
3980
+ /**
3981
+ * List the zones a collection contains.
3982
+ * GET /v1/collections/{collection_id}/zones
3983
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3984
+ * @see {@link getCollectionZones}
3985
+ */
3986
+ getCollectionZones: (args: Parameters<typeof getCollectionZones>[1], options?: RequestOptions) => getCollectionZones(transport, args, options),
3987
+ /**
3988
+ * Update an existing collection.
3989
+ * PATCH /v1/collections/{collection_id}
3990
+ * Requires a publishable key with the `studio-embedded` scope.
3991
+ * Acts as the user its session token was minted for, so the token must name one.
3992
+ * @see {@link patchCollection}
3993
+ */
3994
+ patchCollection: (args: Parameters<typeof patchCollection>[1], options?: RequestOptions) => patchCollection(transport, args, options),
3995
+ /**
3996
+ * Set an itinerary's position within a collection.
3997
+ * PATCH /v1/collections/{collection_id}/itineraries/{itinerary_id}
3998
+ * Requires a publishable key with the `studio-embedded` scope.
3999
+ * Acts as the user its session token was minted for, so the token must name one.
4000
+ * @see {@link patchCollectionItinerary}
4001
+ */
4002
+ patchCollectionItinerary: (args: Parameters<typeof patchCollectionItinerary>[1], options?: RequestOptions) => patchCollectionItinerary(transport, args, options),
4003
+ /**
4004
+ * Create a new collection.
4005
+ * POST /v1/collections
4006
+ * Requires a publishable key with the `studio-embedded` scope.
4007
+ * Acts as the user its session token was minted for, so the token must name one.
4008
+ * @see {@link postCollection}
4009
+ */
4010
+ postCollection: (args: Parameters<typeof postCollection>[1], options?: RequestOptions) => postCollection(transport, args, options),
4011
+ /**
4012
+ * Add itineraries to a collection.
4013
+ * POST /v1/collections/{collection_id}/itineraries
4014
+ * Requires a publishable key with the `studio-embedded` scope.
4015
+ * Acts as the user its session token was minted for, so the token must name one.
4016
+ * @see {@link postCollectionItineraries}
4017
+ */
4018
+ postCollectionItineraries: (args: Parameters<typeof postCollectionItineraries>[1], options?: RequestOptions) => postCollectionItineraries(transport, args, options),
4019
+ /**
4020
+ * Mint the collection's share link, or return the one it has.
4021
+ * POST /v1/collections/{collection_id}/share-link
4022
+ * Requires a publishable key with the `studio-embedded` scope.
4023
+ * Acts as the user its session token was minted for, so the token must name one.
4024
+ * @see {@link postCollectionShareLink}
4025
+ */
4026
+ postCollectionShareLink: (args: Parameters<typeof postCollectionShareLink>[1], options?: RequestOptions) => postCollectionShareLink(transport, args, options),
4027
+ /**
4028
+ * Rotate the collection's share link.
4029
+ * POST /v1/collections/{collection_id}/share-link/rotate
4030
+ * Requires a publishable key with the `studio-embedded` scope.
4031
+ * Acts as the user its session token was minted for, so the token must name one.
4032
+ * @see {@link postCollectionShareLinkRotate}
4033
+ */
4034
+ postCollectionShareLinkRotate: (args: Parameters<typeof postCollectionShareLinkRotate>[1], options?: RequestOptions) => postCollectionShareLinkRotate(transport, args, options),
4035
+ /**
4036
+ * Add zones to a collection.
4037
+ * POST /v1/collections/{collection_id}/zones
4038
+ * Requires a publishable key with the `studio-embedded` scope.
4039
+ * Acts as the user its session token was minted for, so the token must name one.
4040
+ * @see {@link postCollectionZones}
4041
+ */
4042
+ postCollectionZones: (args: Parameters<typeof postCollectionZones>[1], options?: RequestOptions) => postCollectionZones(transport, args, options),
4043
+ },
4044
+ itineraries: {
4045
+ /**
4046
+ * Delete an itinerary.
4047
+ * DELETE /v1/itineraries/{itinerary_id}
4048
+ * Requires a publishable key with the `studio-embedded` scope.
4049
+ * Acts as the user its session token was minted for, so the token must name one.
4050
+ * @see {@link deleteItinerary}
4051
+ */
4052
+ deleteItinerary: (args: Parameters<typeof deleteItinerary>[1], options?: RequestOptions) => deleteItinerary(transport, args, options),
4053
+ /**
4054
+ * Take the itinerary's publication down.
4055
+ * DELETE /v1/itineraries/{itinerary_id}/publication
4056
+ * Requires a publishable key with the `studio-embedded` scope.
4057
+ * Acts as the user its session token was minted for, so the token must name one.
4058
+ * @see {@link deleteItineraryPublication}
4059
+ */
4060
+ deleteItineraryPublication: (args: Parameters<typeof deleteItineraryPublication>[1], options?: RequestOptions) => deleteItineraryPublication(transport, args, options),
4061
+ /**
4062
+ * Delete a segment from an itinerary.
4063
+ * DELETE /v1/itineraries/{itinerary_id}/segments/{segment_id}
4064
+ * Requires a publishable key with the `studio-embedded` scope.
4065
+ * Acts as the user its session token was minted for, so the token must name one.
4066
+ * @see {@link deleteItinerarySegment}
4067
+ */
4068
+ deleteItinerarySegment: (args: Parameters<typeof deleteItinerarySegment>[1], options?: RequestOptions) => deleteItinerarySegment(transport, args, options),
4069
+ /**
4070
+ * Delete a segment group.
4071
+ * DELETE /v1/itineraries/{itinerary_id}/segment-groups/{group_id}
4072
+ * Requires a publishable key with the `studio-embedded` scope.
4073
+ * Acts as the user its session token was minted for, so the token must name one.
4074
+ * @see {@link deleteItinerarySegmentGroup}
4075
+ */
4076
+ deleteItinerarySegmentGroup: (args: Parameters<typeof deleteItinerarySegmentGroup>[1], options?: RequestOptions) => deleteItinerarySegmentGroup(transport, args, options),
4077
+ /**
4078
+ * Remove the itinerary's share link.
4079
+ * DELETE /v1/itineraries/{itinerary_id}/share-link
4080
+ * Requires a publishable key with the `studio-embedded` scope.
4081
+ * Acts as the user its session token was minted for, so the token must name one.
4082
+ * @see {@link deleteItineraryShareLink}
4083
+ */
4084
+ deleteItineraryShareLink: (args: Parameters<typeof deleteItineraryShareLink>[1], options?: RequestOptions) => deleteItineraryShareLink(transport, args, options),
4085
+ /**
4086
+ * Delete a waypoint from an itinerary.
4087
+ * DELETE /v1/itineraries/{itinerary_id}/waypoints/{waypoint_id}
4088
+ * Requires a publishable key with the `studio-embedded` scope.
4089
+ * Acts as the user its session token was minted for, so the token must name one.
4090
+ * @see {@link deleteItineraryWaypoint}
4091
+ */
4092
+ deleteItineraryWaypoint: (args: Parameters<typeof deleteItineraryWaypoint>[1], options?: RequestOptions) => deleteItineraryWaypoint(transport, args, options),
4093
+ /**
4094
+ * List the itineraries the credential reaches.
4095
+ * GET /v1/itineraries
4096
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
4097
+ * @see {@link getItineraries}
4098
+ */
4099
+ getItineraries: (args?: Parameters<typeof getItineraries>[1], options?: RequestOptions) => getItineraries(transport, args, options),
4100
+ /**
4101
+ * Retrieve a single itinerary with its segments and waypoints.
4102
+ * GET /v1/itineraries/{itinerary_id}
4103
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
4104
+ * @see {@link getItinerary}
4105
+ */
4106
+ getItinerary: (args: Parameters<typeof getItinerary>[1], options?: RequestOptions) => getItinerary(transport, args, options),
4107
+ /**
4108
+ * Export an itinerary as a downloadable file.
4109
+ * GET /v1/itineraries/{itinerary_id}/export
4110
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
4111
+ * @see {@link getItineraryExport}
4112
+ */
4113
+ getItineraryExport: (args: Parameters<typeof getItineraryExport>[1], options?: RequestOptions) => getItineraryExport(transport, args, options),
4114
+ /**
4115
+ * Re-time an itinerary at a travel pace the caller names.
4116
+ * GET /v1/itineraries/{itinerary_id}/pace
4117
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
4118
+ * @see {@link getItineraryPace}
4119
+ */
4120
+ getItineraryPace: (args: Parameters<typeof getItineraryPace>[1], options?: RequestOptions) => getItineraryPace(transport, args, options),
4121
+ /**
4122
+ * Read the itinerary's share link.
4123
+ * GET /v1/itineraries/{itinerary_id}/share-link
4124
+ * Requires a publishable key with the `studio-embedded` scope.
4125
+ * Acts as the user its session token was minted for, so the token must name one.
4126
+ * @see {@link getItineraryShareLink}
4127
+ */
4128
+ getItineraryShareLink: (args: Parameters<typeof getItineraryShareLink>[1], options?: RequestOptions) => getItineraryShareLink(transport, args, options),
4129
+ /**
4130
+ * Update an existing itinerary.
4131
+ * PATCH /v1/itineraries/{itinerary_id}
4132
+ * Requires a publishable key with the `studio-embedded` scope.
4133
+ * Acts as the user its session token was minted for, so the token must name one.
4134
+ * @see {@link patchItinerary}
4135
+ */
4136
+ patchItinerary: (args: Parameters<typeof patchItinerary>[1], options?: RequestOptions) => patchItinerary(transport, args, options),
4137
+ /**
4138
+ * Update an existing segment.
4139
+ * PATCH /v1/itineraries/{itinerary_id}/segments/{segment_id}
4140
+ * Requires a publishable key with the `studio-embedded` scope.
4141
+ * Acts as the user its session token was minted for, so the token must name one.
4142
+ * @see {@link patchItinerarySegment}
4143
+ */
4144
+ patchItinerarySegment: (args: Parameters<typeof patchItinerarySegment>[1], options?: RequestOptions) => patchItinerarySegment(transport, args, options),
4145
+ /**
4146
+ * Update a segment group.
4147
+ * PATCH /v1/itineraries/{itinerary_id}/segment-groups/{group_id}
4148
+ * Requires a publishable key with the `studio-embedded` scope.
4149
+ * Acts as the user its session token was minted for, so the token must name one.
4150
+ * @see {@link patchItinerarySegmentGroup}
4151
+ */
4152
+ patchItinerarySegmentGroup: (args: Parameters<typeof patchItinerarySegmentGroup>[1], options?: RequestOptions) => patchItinerarySegmentGroup(transport, args, options),
4153
+ /**
4154
+ * Update an existing waypoint.
4155
+ * PATCH /v1/itineraries/{itinerary_id}/waypoints/{waypoint_id}
4156
+ * Requires a publishable key with the `studio-embedded` scope.
4157
+ * Acts as the user its session token was minted for, so the token must name one.
4158
+ * @see {@link patchItineraryWaypoint}
4159
+ */
4160
+ patchItineraryWaypoint: (args: Parameters<typeof patchItineraryWaypoint>[1], options?: RequestOptions) => patchItineraryWaypoint(transport, args, options),
4161
+ /**
4162
+ * Create a new itinerary.
4163
+ * POST /v1/itineraries
4164
+ * Requires a publishable key with the `studio-embedded` scope.
4165
+ * Acts as the user its session token was minted for, so the token must name one.
4166
+ * @see {@link postItinerary}
4167
+ */
4168
+ postItinerary: (args: Parameters<typeof postItinerary>[1], options?: RequestOptions) => postItinerary(transport, args, options),
4169
+ /**
4170
+ * Duplicate an itinerary into the key's organization.
4171
+ * POST /v1/itineraries/{itinerary_id}/duplicate
4172
+ * Requires a publishable key with the `studio-embedded` scope.
4173
+ * Acts as the user its session token was minted for, so the token must name one.
4174
+ * @see {@link postItineraryDuplicate}
4175
+ */
4176
+ postItineraryDuplicate: (args: Parameters<typeof postItineraryDuplicate>[1], options?: RequestOptions) => postItineraryDuplicate(transport, args, options),
4177
+ /**
4178
+ * Confirm an itinerary import, persisting the reviewed draft.
4179
+ * POST /v1/itineraries/import
4180
+ * Requires a publishable key with the `studio-embedded` scope.
4181
+ * Acts as the user its session token was minted for, so the token must name one.
4182
+ * @see {@link postItineraryImport}
4183
+ */
4184
+ postItineraryImport: (args: Parameters<typeof postItineraryImport>[1], options?: RequestOptions) => postItineraryImport(transport, args, options),
4185
+ /**
4186
+ * Preview an itinerary import without persisting it.
4187
+ * POST /v1/itineraries/preview
4188
+ * Requires a publishable key with the `studio-embedded` scope.
4189
+ * Acts as the user its session token was minted for, so the token must name one.
4190
+ * @see {@link postItineraryPreview}
4191
+ */
4192
+ postItineraryPreview: (args: Parameters<typeof postItineraryPreview>[1], options?: RequestOptions) => postItineraryPreview(transport, args, options),
4193
+ /**
4194
+ * Publish the itinerary's current draft.
4195
+ * POST /v1/itineraries/{itinerary_id}/publication
4196
+ * Requires a publishable key with the `studio-embedded` scope.
4197
+ * Acts as the user its session token was minted for, so the token must name one.
4198
+ * @see {@link postItineraryPublication}
4199
+ */
4200
+ postItineraryPublication: (args: Parameters<typeof postItineraryPublication>[1], options?: RequestOptions) => postItineraryPublication(transport, args, options),
4201
+ /**
4202
+ * Create a segment, at the end of the chain or before another.
4203
+ * POST /v1/itineraries/{itinerary_id}/segments
4204
+ * Requires a publishable key with the `studio-embedded` scope.
4205
+ * Acts as the user its session token was minted for, so the token must name one.
4206
+ * @see {@link postItinerarySegment}
4207
+ */
4208
+ postItinerarySegment: (args: Parameters<typeof postItinerarySegment>[1], options?: RequestOptions) => postItinerarySegment(transport, args, options),
4209
+ /**
4210
+ * Convert a segment between routed and freehand.
4211
+ * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/convert
4212
+ * Requires a publishable key with the `studio-embedded` scope.
4213
+ * Acts as the user its session token was minted for, so the token must name one.
4214
+ * @see {@link postItinerarySegmentConvert}
4215
+ */
4216
+ postItinerarySegmentConvert: (args: Parameters<typeof postItinerarySegmentConvert>[1], options?: RequestOptions) => postItinerarySegmentConvert(transport, args, options),
4217
+ /**
4218
+ * Group a contiguous run of an itinerary's segments.
4219
+ * POST /v1/itineraries/{itinerary_id}/segment-groups
4220
+ * Requires a publishable key with the `studio-embedded` scope.
4221
+ * Acts as the user its session token was minted for, so the token must name one.
4222
+ * @see {@link postItinerarySegmentGroup}
4223
+ */
4224
+ postItinerarySegmentGroup: (args: Parameters<typeof postItinerarySegmentGroup>[1], options?: RequestOptions) => postItinerarySegmentGroup(transport, args, options),
4225
+ /**
4226
+ * Merge a segment with the one that follows it.
4227
+ * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/merge
4228
+ * Requires a publishable key with the `studio-embedded` scope.
4229
+ * Acts as the user its session token was minted for, so the token must name one.
4230
+ * @see {@link postItinerarySegmentMerge}
4231
+ */
4232
+ postItinerarySegmentMerge: (args: Parameters<typeof postItinerarySegmentMerge>[1], options?: RequestOptions) => postItinerarySegmentMerge(transport, args, options),
4233
+ /**
4234
+ * Split a segment in two at a fraction of its length.
4235
+ * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/split
4236
+ * Requires a publishable key with the `studio-embedded` scope.
4237
+ * Acts as the user its session token was minted for, so the token must name one.
4238
+ * @see {@link postItinerarySegmentSplit}
4239
+ */
4240
+ postItinerarySegmentSplit: (args: Parameters<typeof postItinerarySegmentSplit>[1], options?: RequestOptions) => postItinerarySegmentSplit(transport, args, options),
4241
+ /**
4242
+ * Mint the itinerary's share link, or return the one it has.
4243
+ * POST /v1/itineraries/{itinerary_id}/share-link
4244
+ * Requires a publishable key with the `studio-embedded` scope.
4245
+ * Acts as the user its session token was minted for, so the token must name one.
4246
+ * @see {@link postItineraryShareLink}
4247
+ */
4248
+ postItineraryShareLink: (args: Parameters<typeof postItineraryShareLink>[1], options?: RequestOptions) => postItineraryShareLink(transport, args, options),
4249
+ /**
4250
+ * Rotate the itinerary's share link.
4251
+ * POST /v1/itineraries/{itinerary_id}/share-link/rotate
4252
+ * Requires a publishable key with the `studio-embedded` scope.
4253
+ * Acts as the user its session token was minted for, so the token must name one.
4254
+ * @see {@link postItineraryShareLinkRotate}
4255
+ */
4256
+ postItineraryShareLinkRotate: (args: Parameters<typeof postItineraryShareLinkRotate>[1], options?: RequestOptions) => postItineraryShareLinkRotate(transport, args, options),
4257
+ /**
4258
+ * Create a new waypoint within an itinerary.
4259
+ * POST /v1/itineraries/{itinerary_id}/waypoints
4260
+ * Requires a publishable key with the `studio-embedded` scope.
4261
+ * Acts as the user its session token was minted for, so the token must name one.
4262
+ * @see {@link postItineraryWaypoint}
4263
+ */
4264
+ postItineraryWaypoint: (args: Parameters<typeof postItineraryWaypoint>[1], options?: RequestOptions) => postItineraryWaypoint(transport, args, options),
4265
+ },
4266
+ layers: {
4267
+ /**
4268
+ * List terrains, overlays, and the zone layer.
4269
+ * GET /v1/layers
4270
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
4271
+ * @see {@link getLayers}
4272
+ */
4273
+ getLayers: (args?: Parameters<typeof getLayers>[1], options?: RequestOptions) => getLayers(transport, args, options),
4274
+ },
4275
+ organizations: {
4276
+ /**
4277
+ * Resolve the organization a publishable key belongs to.
4278
+ * POST /v1/organizations/lookup
4279
+ * Takes no credential.
4280
+ * @see {@link postOrganizationLookup}
4281
+ */
4282
+ postOrganizationLookup: (args: Parameters<typeof postOrganizationLookup>[1], options?: RequestOptions) => postOrganizationLookup(transport, args, options),
4283
+ },
4284
+ zones: {
4285
+ /**
4286
+ * Delete a zone.
4287
+ * DELETE /v1/zones/{zone_id}
4288
+ * Requires a publishable key with the `studio-embedded` scope.
4289
+ * Acts as the user its session token was minted for, so the token must name one.
4290
+ * @see {@link deleteZone}
4291
+ */
4292
+ deleteZone: (args: Parameters<typeof deleteZone>[1], options?: RequestOptions) => deleteZone(transport, args, options),
4293
+ /**
4294
+ * Take the zone's publication down.
4295
+ * DELETE /v1/zones/{zone_id}/publication
4296
+ * Requires a publishable key with the `studio-embedded` scope.
4297
+ * Acts as the user its session token was minted for, so the token must name one.
4298
+ * @see {@link deleteZonePublication}
4299
+ */
4300
+ deleteZonePublication: (args: Parameters<typeof deleteZonePublication>[1], options?: RequestOptions) => deleteZonePublication(transport, args, options),
4301
+ /**
4302
+ * Retrieve a single zone with its geometry.
4303
+ * GET /v1/zones/{zone_id}
4304
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
4305
+ * @see {@link getZone}
4306
+ */
4307
+ getZone: (args: Parameters<typeof getZone>[1], options?: RequestOptions) => getZone(transport, args, options),
4308
+ /**
4309
+ * List zones.
4310
+ * GET /v1/zones
4311
+ * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
4312
+ * @see {@link getZones}
4313
+ */
4314
+ getZones: (args?: Parameters<typeof getZones>[1], options?: RequestOptions) => getZones(transport, args, options),
4315
+ /**
4316
+ * Update an existing zone.
4317
+ * PATCH /v1/zones/{zone_id}
4318
+ * Requires a publishable key with the `studio-embedded` scope.
4319
+ * Acts as the user its session token was minted for, so the token must name one.
4320
+ * @see {@link patchZone}
4321
+ */
4322
+ patchZone: (args: Parameters<typeof patchZone>[1], options?: RequestOptions) => patchZone(transport, args, options),
4323
+ /**
4324
+ * Create a new zone.
4325
+ * POST /v1/zones
4326
+ * Requires a publishable key with the `studio-embedded` scope.
4327
+ * Acts as the user its session token was minted for, so the token must name one.
4328
+ * @see {@link postZone}
4329
+ */
4330
+ postZone: (args: Parameters<typeof postZone>[1], options?: RequestOptions) => postZone(transport, args, options),
4331
+ /**
4332
+ * Publish the zone's current draft.
4333
+ * POST /v1/zones/{zone_id}/publication
4334
+ * Requires a publishable key with the `studio-embedded` scope.
4335
+ * Acts as the user its session token was minted for, so the token must name one.
4336
+ * @see {@link postZonePublication}
4337
+ */
4338
+ postZonePublication: (args: Parameters<typeof postZonePublication>[1], options?: RequestOptions) => postZonePublication(transport, args, options),
4339
+ },
4340
+ },
4341
+ });