@mountaya/client 0.1.0 → 0.2.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 (67) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +2 -2
  3. package/dist/admin/index.cjs +2876 -3502
  4. package/dist/admin/index.cjs.map +1 -1
  5. package/dist/admin/index.d.cts +731 -912
  6. package/dist/admin/index.d.ts +731 -912
  7. package/dist/admin/index.js +188 -285
  8. package/dist/admin/index.js.map +1 -1
  9. package/dist/browser.cjs +5913 -7993
  10. package/dist/browser.cjs.map +1 -1
  11. package/dist/browser.d.cts +42 -78
  12. package/dist/browser.d.ts +42 -78
  13. package/dist/browser.js +18 -49
  14. package/dist/browser.js.map +1 -1
  15. package/dist/chunk-CeEX7ayk.d.cts +75531 -0
  16. package/dist/chunk-CeEX7ayk.d.ts +75531 -0
  17. package/dist/chunk-Cg7Dtcb4.js +2987 -0
  18. package/dist/chunk-Cg7Dtcb4.js.map +1 -0
  19. package/dist/chunk-DJqUsgsy.d.ts +1463 -0
  20. package/dist/chunk-DNc8T5K1.js +241 -0
  21. package/dist/chunk-DNc8T5K1.js.map +1 -0
  22. package/dist/chunk-DTxzw3hu.d.cts +1463 -0
  23. package/dist/chunk-DmxQID5X.js +2289 -0
  24. package/dist/chunk-DmxQID5X.js.map +1 -0
  25. package/dist/chunk-DoZt_oIV.d.ts +3991 -0
  26. package/dist/chunk-DpJrqANO.js +11 -0
  27. package/dist/chunk-Dx8mPAdC.d.cts +3991 -0
  28. package/dist/chunk-X2ukY3ho.js +419 -0
  29. package/dist/chunk-X2ukY3ho.js.map +1 -0
  30. package/dist/events/index.cjs +1338 -1874
  31. package/dist/events/index.cjs.map +1 -1
  32. package/dist/events/index.d.cts +373 -382
  33. package/dist/events/index.d.ts +373 -382
  34. package/dist/events/index.js +523 -806
  35. package/dist/events/index.js.map +1 -1
  36. package/dist/index.cjs +5908 -7988
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +37 -69
  39. package/dist/index.d.ts +37 -69
  40. package/dist/index.js +17 -48
  41. package/dist/index.js.map +1 -1
  42. package/package.json +7 -8
  43. package/src/browser.ts +1 -0
  44. package/src/core/rules/clientHeader.ts +1 -1
  45. package/src/core/rules/errors.ts +1 -1
  46. package/src/core/rules/nullMasks.gen.ts +14 -2
  47. package/src/core/rules/version.gen.ts +1 -1
  48. package/src/events/index.ts +1 -5
  49. package/src/rest/adminResources.gen.ts +2 -0
  50. package/src/rest/dates.gen.ts +1 -1
  51. package/src/rest/resources.gen.ts +2 -0
  52. package/src/rest/schema.gen.ts +247 -60
  53. package/src/tiles/schema.gen.ts +1 -3
  54. package/dist/chunk-BM526BHG.js +0 -342
  55. package/dist/chunk-BM526BHG.js.map +0 -1
  56. package/dist/chunk-D2YEVTG7.js +0 -327
  57. package/dist/chunk-D2YEVTG7.js.map +0 -1
  58. package/dist/chunk-OHKVUREN.js +0 -3500
  59. package/dist/chunk-OHKVUREN.js.map +0 -1
  60. package/dist/chunk-TDTK2L5H.js +0 -3842
  61. package/dist/chunk-TDTK2L5H.js.map +0 -1
  62. package/dist/coreOperations.gen-BMYPoBbz.d.ts +0 -1760
  63. package/dist/coreOperations.gen-BxX5xRxw.d.cts +0 -1760
  64. package/dist/errors-B-GqAtQv.d.cts +0 -75960
  65. package/dist/errors-B-GqAtQv.d.ts +0 -75960
  66. package/dist/operations.gen-CvTyzKNF.d.cts +0 -3993
  67. package/dist/operations.gen-DUD406TV.d.ts +0 -3993
@@ -1,3842 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // src/core/rules/rateLimit.ts
8
- var digitPattern = /[0-9]/;
9
- var alphaPattern = /[A-Za-z]/;
10
- var lowercaseAlphaPattern = /[a-z]/;
11
- var keyCharPattern = /[a-z0-9_.*-]/;
12
- var tokenCharPattern = /[!#$%&'*+\-.^_`|~0-9A-Za-z:/]/;
13
- var base64CharPattern = /[A-Za-z0-9+/=]/;
14
- var Cursor = class {
15
- constructor(text) {
16
- this.text = text;
17
- }
18
- text;
19
- index = 0;
20
- /** Whether every character is consumed. */
21
- get done() {
22
- return this.index >= this.text.length;
23
- }
24
- /**
25
- * The next character, or "" at the end. A method rather than a getter, so a comparison with it
26
- * is not taken to hold after the cursor moves.
27
- */
28
- peek() {
29
- return this.text[this.index] ?? "";
30
- }
31
- /** Consumes one character and answers it. */
32
- take() {
33
- const char = this.peek();
34
- this.index += 1;
35
- return char;
36
- }
37
- /** Discards spaces. */
38
- skipSpaces() {
39
- while (this.peek() === " ") {
40
- this.index += 1;
41
- }
42
- }
43
- /** Discards optional whitespace: spaces and tabs. */
44
- skipWhitespace() {
45
- while (this.peek() === " " || this.peek() === " ") {
46
- this.index += 1;
47
- }
48
- }
49
- /** Consumes `char` and answers whether the next character was it. */
50
- consume(char) {
51
- return this.take() === char;
52
- }
53
- /** An item or an inner list, and its parameters. */
54
- member() {
55
- if (this.peek() === "(") {
56
- if (!this.innerList()) {
57
- return void 0;
58
- }
59
- const parameters2 = this.parameters();
60
- return parameters2 === void 0 ? void 0 : { item: void 0, parameters: parameters2 };
61
- }
62
- const item = this.bareItem();
63
- const parameters = item === void 0 ? void 0 : this.parameters();
64
- return parameters === void 0 ? void 0 : { item, parameters };
65
- }
66
- /** An inner list, `(item item);params`, whose items are parsed and set aside. */
67
- innerList() {
68
- this.index += 1;
69
- for (; ; ) {
70
- this.skipSpaces();
71
- if (this.peek() === ")") {
72
- this.index += 1;
73
- return true;
74
- }
75
- if (this.bareItem() === void 0 || this.parameters() === void 0) {
76
- return false;
77
- }
78
- if (this.peek() !== " " && this.peek() !== ")") {
79
- return false;
80
- }
81
- }
82
- }
83
- /** The parameters after an item: `;key=value`, a key alone being `true`. */
84
- parameters() {
85
- const parameters = /* @__PURE__ */ new Map();
86
- while (this.peek() === ";") {
87
- this.index += 1;
88
- this.skipSpaces();
89
- const key = this.key();
90
- if (key === void 0) {
91
- return void 0;
92
- }
93
- let value = { kind: "boolean", value: true };
94
- if (this.peek() === "=") {
95
- this.index += 1;
96
- value = this.bareItem();
97
- }
98
- if (value === void 0) {
99
- return void 0;
100
- }
101
- parameters.set(key, value);
102
- }
103
- return parameters;
104
- }
105
- /** A parameter's key: a lowercase letter or `*`, then lowercase letters, digits, `_-.*`. */
106
- key() {
107
- if (!lowercaseAlphaPattern.test(this.peek()) && this.peek() !== "*") {
108
- return void 0;
109
- }
110
- let key = this.take();
111
- while (keyCharPattern.test(this.peek())) {
112
- key += this.take();
113
- }
114
- return key;
115
- }
116
- /** One bare item, its kind decided by its first character. */
117
- bareItem() {
118
- const first = this.peek();
119
- if (first === "-" || digitPattern.test(first)) {
120
- return this.number();
121
- }
122
- if (first === '"') {
123
- const value = this.string();
124
- return value === void 0 ? void 0 : { kind: "string", value };
125
- }
126
- if (first === "*" || alphaPattern.test(first)) {
127
- return { kind: "token", value: this.token() };
128
- }
129
- if (first === ":") {
130
- return this.bytes() ? { kind: "bytes" } : void 0;
131
- }
132
- if (first === "?") {
133
- this.index += 1;
134
- const value = this.take();
135
- return value === "0" || value === "1" ? { kind: "boolean", value: value === "1" } : void 0;
136
- }
137
- if (first === "@") {
138
- this.index += 1;
139
- const date = this.number();
140
- return date?.kind === "integer" ? { kind: "date", value: date.value } : void 0;
141
- }
142
- if (first === "%") {
143
- this.index += 1;
144
- const value = this.displayString();
145
- return value === void 0 ? void 0 : { kind: "display", value };
146
- }
147
- return void 0;
148
- }
149
- /** An integer of at most 15 digits, or a decimal of at most 12 before its point and 3 after. */
150
- number() {
151
- let sign = 1;
152
- if (this.peek() === "-") {
153
- sign = -1;
154
- this.index += 1;
155
- }
156
- let digits = "";
157
- let decimal = false;
158
- while (digitPattern.test(this.peek()) || this.peek() === "." && !decimal) {
159
- if (this.peek() === ".") {
160
- if (digits.length > 12) {
161
- return void 0;
162
- }
163
- decimal = true;
164
- }
165
- digits += this.take();
166
- if (!decimal && digits.length > 15 || decimal && digits.length > 16) {
167
- return void 0;
168
- }
169
- }
170
- if (digits === "" || digits.startsWith(".")) {
171
- return void 0;
172
- }
173
- if (!decimal) {
174
- return { kind: "integer", value: sign * Number(digits) };
175
- }
176
- const fraction = digits.slice(digits.indexOf(".") + 1);
177
- if (fraction.length === 0 || fraction.length > 3) {
178
- return void 0;
179
- }
180
- return { kind: "decimal", value: sign * Number(digits) };
181
- }
182
- /** A quoted string of printable ASCII, whose only escapes are `\"` and `\\`. */
183
- string() {
184
- this.index += 1;
185
- let value = "";
186
- for (; ; ) {
187
- if (this.done) {
188
- return void 0;
189
- }
190
- const char = this.take();
191
- if (char === '"') {
192
- return value;
193
- }
194
- if (char === "\\") {
195
- const escaped = this.take();
196
- if (escaped !== '"' && escaped !== "\\") {
197
- return void 0;
198
- }
199
- value += escaped;
200
- continue;
201
- }
202
- const code = char.charCodeAt(0);
203
- if (code < 32 || code > 126) {
204
- return void 0;
205
- }
206
- value += char;
207
- }
208
- }
209
- /** A token: a letter or `*`, then tchar, `:` and `/`. */
210
- token() {
211
- let value = this.take();
212
- while (tokenCharPattern.test(this.peek())) {
213
- value += this.take();
214
- }
215
- return value;
216
- }
217
- /** A byte sequence, `:base64:`, read for its shape alone. */
218
- bytes() {
219
- this.index += 1;
220
- while (base64CharPattern.test(this.peek())) {
221
- this.index += 1;
222
- }
223
- return this.consume(":");
224
- }
225
- /** A display string, `"…"` with each byte past ASCII percent-encoded as lowercase hex. */
226
- displayString() {
227
- if (!this.consume('"')) {
228
- return void 0;
229
- }
230
- const bytes = [];
231
- for (; ; ) {
232
- if (this.done) {
233
- return void 0;
234
- }
235
- const char = this.take();
236
- const code = char.charCodeAt(0);
237
- if (code < 32 || code > 126) {
238
- return void 0;
239
- }
240
- if (char === '"') {
241
- try {
242
- return new TextDecoder("utf-8", { fatal: true }).decode(Uint8Array.from(bytes));
243
- } catch {
244
- return void 0;
245
- }
246
- }
247
- if (char === "%") {
248
- const hex = this.take() + this.take();
249
- if (!/^[0-9a-f]{2}$/.test(hex)) {
250
- return void 0;
251
- }
252
- bytes.push(Number.parseInt(hex, 16));
253
- continue;
254
- }
255
- bytes.push(code);
256
- }
257
- }
258
- };
259
- var parseList = (text) => {
260
- const cursor = new Cursor(text);
261
- const members = [];
262
- cursor.skipSpaces();
263
- while (!cursor.done) {
264
- const member = cursor.member();
265
- if (member === void 0) {
266
- return void 0;
267
- }
268
- members.push(member);
269
- cursor.skipWhitespace();
270
- if (cursor.done) {
271
- break;
272
- }
273
- if (!cursor.consume(",")) {
274
- return void 0;
275
- }
276
- cursor.skipWhitespace();
277
- if (cursor.done) {
278
- return void 0;
279
- }
280
- }
281
- return members;
282
- };
283
- var wholeNumber = (item) => item?.kind === "integer" && item.value >= 0 ? item.value : void 0;
284
- var policyName = (member) => member.item?.kind === "string" ? member.item.value : void 0;
285
- var parseRateLimit = (headers) => {
286
- const policyField = headers.get("RateLimit-Policy");
287
- const declared = policyField === null ? void 0 : parseList(policyField);
288
- if (declared === void 0) {
289
- return void 0;
290
- }
291
- const stateField = headers.get("RateLimit");
292
- const states = /* @__PURE__ */ new Map();
293
- for (const member of (stateField === null ? void 0 : parseList(stateField)) ?? []) {
294
- const name = policyName(member);
295
- if (name !== void 0 && !states.has(name)) {
296
- states.set(name, member);
297
- }
298
- }
299
- const policies = [];
300
- for (const member of declared) {
301
- const name = policyName(member);
302
- const quota = wholeNumber(member.parameters.get("q"));
303
- if (name === void 0 || quota === void 0) {
304
- continue;
305
- }
306
- const state = states.get(name)?.parameters;
307
- policies.push({
308
- name,
309
- quota,
310
- remaining: wholeNumber(state?.get("r")),
311
- resetSeconds: wholeNumber(state?.get("t")),
312
- windowSeconds: wholeNumber(member.parameters.get("w"))
313
- });
314
- }
315
- return policies.length === 0 ? void 0 : { policies };
316
- };
317
-
318
- // src/core/rules/errors.ts
319
- var MountayaError = class extends Error {
320
- name = "MountayaError";
321
- /**
322
- * The `Idempotency-Key` the call that raised this error fixed for its attempts, the caller's own
323
- * or the one the client drew for it, and undefined where it fixed none: a read, an operation
324
- * that declares no key, a call whose own arguments were refused, and a runtime with no
325
- * cryptographic random source. The key is fixed before the first attempt, so a call whose
326
- * credential its first attempt refused, or whose wait for a first session token ran out,
327
- * carries it too.
328
- *
329
- * A write that carried one may have been made whatever the error says: an answer that never
330
- * arrived, a 5xx and a body that broke off do not tell. Send the same call again with this key
331
- * as its `idempotencyKey`, never a new one: the API answers a key it has seen with the answer it
332
- * kept, or runs the write where it made none, so the write is made once. A new key is a new
333
- * write, made a second time where the first one landed.
334
- */
335
- idempotencyKey;
336
- // The constructor narrows the signature rather than adding behaviour: `Error`'s `message`
337
- // is optional and this family's is not. Dropping it makes
338
- // `new MountayaConfigurationError()` compile, which is a thrown value carrying nothing a
339
- // caller can read.
340
- /**
341
- * @param message - what went wrong and what to do about it, naming the call where there is one.
342
- * @param options - the standard error options, for the `cause` behind it, and the
343
- * `idempotencyKey` the call sent, where it sent one.
344
- */
345
- constructor(message, options) {
346
- super(message, options);
347
- this.idempotencyKey = options?.idempotencyKey;
348
- }
349
- };
350
- var MountayaConfigurationError = class extends MountayaError {
351
- name = "MountayaConfigurationError";
352
- };
353
- var describeType = (value) => {
354
- if (value === null || value === void 0) {
355
- return String(value);
356
- }
357
- const type = Array.isArray(value) ? "array" : typeof value;
358
- return /^[aeiou]/.test(type) ? `an ${type}` : `a ${type}`;
359
- };
360
- var describeValue = (value) => {
361
- if (typeof value === "string") {
362
- return JSON.stringify(value);
363
- }
364
- try {
365
- return String(value);
366
- } catch {
367
- return describeType(value);
368
- }
369
- };
370
- var refuseOption = (path, value, remedy, context) => new MountayaConfigurationError(
371
- `${context === void 0 ? "" : `${context}: `}${path} is ${describeValue(value)}; ${remedy}`
372
- );
373
- var MountayaConnectionError = class extends MountayaError {
374
- name = "MountayaConnectionError";
375
- /**
376
- * @param message - the call, and which transport failure it met where the transport can tell.
377
- * @param cause - the runtime's own failure, carried on `Error.cause`.
378
- * @param idempotencyKey - the `Idempotency-Key` the call sent, where it sent one.
379
- */
380
- constructor(message, cause, idempotencyKey) {
381
- super(message, { cause, idempotencyKey });
382
- }
383
- };
384
- var MountayaApiError = class extends MountayaError {
385
- name = "MountayaApiError";
386
- /** The HTTP status the response carried. */
387
- status;
388
- /** Every entry of the envelope, in the order the API wrote them; empty for a bodiless answer. */
389
- errors;
390
- /**
391
- * The envelope's `extensions.metadata`, exactly as sent, or undefined where the response
392
- * carried none: see {@link ErrorMetadata}.
393
- */
394
- metadata;
395
- /**
396
- * The rate-limit state the answer's `RateLimit-Policy` and `RateLimit` describe, or undefined
397
- * where they describe none, as on every Map Studio API answer.
398
- */
399
- rateLimit;
400
- /**
401
- * The answer's `X-Request-Id`, exactly as sent: 32 lowercase hex characters the API recorded
402
- * the request under, and the one thing to quote to support. Undefined where the answer sent
403
- * none; the client never makes one up.
404
- */
405
- requestId;
406
- /**
407
- * How many seconds the answer asked the caller to wait before asking again, from its
408
- * `Retry-After` header, read as whole seconds or an HTTP date; undefined where the header was
409
- * absent or neither.
410
- *
411
- * Every 429 of a limit names one, the wait a spent limit asks for
412
- * ({@link MountayaRateLimitError}); a ceiling's 429, coded `LIMIT_REACHED`, names none, since no
413
- * wait lifts it. A 503 names one where the API knows when it can answer, and a 409 whose
414
- * `Idempotency-Key` is still in use names the second the first request may take. The client waits each out itself where it
415
- * repeats the call and the wait fits its `retry.maxWaitMs`; an error that arrives carrying one
416
- * is the wait a caller schedules the next call from, and one carrying none says nothing of when.
417
- */
418
- retryAfter;
419
- /**
420
- * @param message - the message {@link failureMessage} spells for the call.
421
- * @param status - the HTTP status the response carried.
422
- * @param errors - the envelope's entries, the first of which classifies the response.
423
- * @param details - the envelope's metadata, the request id, the rate-limit state and the wait
424
- * `Retry-After` names, where the answer sent them, the `Idempotency-Key` the call sent,
425
- * where it sent one, and the `cause` that kept the answer from being read, where one did.
426
- */
427
- constructor(message, status, errors, details = {}) {
428
- super(
429
- message,
430
- details.cause === void 0 ? { idempotencyKey: details.idempotencyKey } : { cause: details.cause, idempotencyKey: details.idempotencyKey }
431
- );
432
- this.status = status;
433
- this.errors = errors;
434
- this.metadata = details.metadata;
435
- this.rateLimit = details.rateLimit;
436
- this.requestId = details.requestId;
437
- this.retryAfter = details.retryAfter;
438
- }
439
- /** The classifying code of the response, taken from its first entry. */
440
- get code() {
441
- return this.errors[0]?.extensions?.code;
442
- }
443
- /** Reports whether any entry carries the given code. */
444
- hasCode(code) {
445
- return this.errors.some((entry) => entry.extensions?.code === code);
446
- }
447
- };
448
- var MountayaBadRequestError = class extends MountayaApiError {
449
- name = "MountayaBadRequestError";
450
- };
451
- var MountayaAuthenticationError = class extends MountayaApiError {
452
- name = "MountayaAuthenticationError";
453
- };
454
- var MountayaBillingError = class extends MountayaApiError {
455
- name = "MountayaBillingError";
456
- };
457
- var MountayaForbiddenError = class extends MountayaApiError {
458
- name = "MountayaForbiddenError";
459
- };
460
- var MountayaNotFoundError = class extends MountayaApiError {
461
- name = "MountayaNotFoundError";
462
- };
463
- var MountayaMethodNotAllowedError = class extends MountayaApiError {
464
- name = "MountayaMethodNotAllowedError";
465
- };
466
- var MountayaConflictError = class extends MountayaApiError {
467
- // Typed as a string rather than as its literal, so each subclass can declare its own.
468
- name = "MountayaConflictError";
469
- };
470
- var KEY_IN_USE_CODE = "IDEMPOTENCY_KEY_IN_USE";
471
- var CEILING_CODE = "LIMIT_REACHED";
472
- var MountayaIdempotencyKeyInUseError = class extends MountayaConflictError {
473
- name = "MountayaIdempotencyKeyInUseError";
474
- };
475
- var IDEMPOTENT_ANSWER_UNAVAILABLE_CODE = "IDEMPOTENCY_ANSWER_UNAVAILABLE";
476
- var MountayaIdempotentAnswerUnavailableError = class extends MountayaConflictError {
477
- name = "MountayaIdempotentAnswerUnavailableError";
478
- /** What the write's first answer was, as the metadata states it: see {@link IdempotentAnswer}. */
479
- answer;
480
- /**
481
- * @param message - the message {@link failureMessage} spells for the call.
482
- * @param status - the HTTP status the response carried, which is 409.
483
- * @param errors - the envelope's entries, the first of which is coded
484
- * `IDEMPOTENCY_ANSWER_UNAVAILABLE`.
485
- * @param details - what the answer sent beside them, the first answer at `metadata` included.
486
- */
487
- constructor(message, status, errors, details = {}) {
488
- super(message, status, errors, details);
489
- const { etag: taggedAs, location: createdAt, status: answeredWith } = details.metadata ?? {};
490
- this.answer = {
491
- etag: typeof taggedAs === "string" ? taggedAs : void 0,
492
- location: typeof createdAt === "string" ? createdAt : void 0,
493
- status: typeof answeredWith === "number" && Number.isInteger(answeredWith) ? answeredWith : void 0
494
- };
495
- }
496
- };
497
- var MountayaPreconditionFailedError = class extends MountayaApiError {
498
- name = "MountayaPreconditionFailedError";
499
- /**
500
- * The tag the resource carries now, from the 412's `ETag`, exactly as sent, or undefined where
501
- * the answer carried none. It is what the resource was changed to, not what the caller has read:
502
- * read the resource again before a write names it as its `ifMatch`, so the write is decided
503
- * against what it holds.
504
- */
505
- etag;
506
- /**
507
- * @param message - the message {@link failureMessage} spells for the call.
508
- * @param status - the HTTP status the response carried, which is 412.
509
- * @param errors - the envelope's entries, the first of which classifies the response.
510
- * @param details - what the answer sent beside them, its `ETag` included.
511
- */
512
- constructor(message, status, errors, details = {}) {
513
- super(message, status, errors, details);
514
- this.etag = details.etag;
515
- }
516
- };
517
- var MountayaPayloadTooLargeError = class extends MountayaApiError {
518
- name = "MountayaPayloadTooLargeError";
519
- };
520
- var MountayaRateLimitError = class extends MountayaApiError {
521
- name = "MountayaRateLimitError";
522
- };
523
- var MountayaServerError = class extends MountayaApiError {
524
- name = "MountayaServerError";
525
- };
526
- var MountayaDataError = class extends MountayaApiError {
527
- name = "MountayaDataError";
528
- };
529
- var MOUNTAYA_API_ERROR_NAMES = [
530
- "MountayaApiError",
531
- "MountayaAuthenticationError",
532
- "MountayaBadRequestError",
533
- "MountayaBillingError",
534
- "MountayaConflictError",
535
- "MountayaDataError",
536
- "MountayaForbiddenError",
537
- "MountayaIdempotencyKeyInUseError",
538
- "MountayaIdempotentAnswerUnavailableError",
539
- "MountayaMethodNotAllowedError",
540
- "MountayaNotFoundError",
541
- "MountayaPayloadTooLargeError",
542
- "MountayaPreconditionFailedError",
543
- "MountayaRateLimitError",
544
- "MountayaServerError"
545
- ];
546
- var MOUNTAYA_ERROR_NAMES = [
547
- ...MOUNTAYA_API_ERROR_NAMES,
548
- "MountayaConfigurationError",
549
- "MountayaConnectionError",
550
- "MountayaError",
551
- "MountayaSelectionError",
552
- "MountayaWebhookSignatureError",
553
- "SseBufferOverflowError"
554
- ];
555
- var declaresName = (value, names) => typeof value === "object" && value !== null && "name" in value && typeof value.name === "string" && names.includes(value.name);
556
- var isMountayaError = (error) => declaresName(error, MOUNTAYA_ERROR_NAMES);
557
- var isMountayaApiError = (error) => declaresName(error, MOUNTAYA_API_ERROR_NAMES) && "status" in error && typeof error.status === "number" && "errors" in error && Array.isArray(error.errors) && error.errors.every((entry) => typeof entry === "object" && entry !== null) && "hasCode" in error && typeof error.hasCode === "function";
558
- var isErrorEntry = (entry) => typeof entry === "object" && entry !== null && "message" in entry && typeof entry.message === "string";
559
- var errorsOf = (body) => typeof body === "object" && body !== null && "errors" in body ? body.errors : void 0;
560
- var entriesOf = (body) => {
561
- const errors = errorsOf(body);
562
- return Array.isArray(errors) ? errors.filter(isErrorEntry) : [];
563
- };
564
- var statesErrors = (body) => {
565
- const errors = errorsOf(body);
566
- return errors !== void 0 && errors !== null && !(Array.isArray(errors) && errors.length === 0);
567
- };
568
- var isMetadata = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
569
- var metadataOf = (body) => {
570
- if (typeof body !== "object" || body === null || !("extensions" in body)) {
571
- return void 0;
572
- }
573
- const { extensions } = body;
574
- if (typeof extensions !== "object" || extensions === null || !("metadata" in extensions)) {
575
- return void 0;
576
- }
577
- const { metadata } = extensions;
578
- return isMetadata(metadata) ? metadata : void 0;
579
- };
580
- var PAYMENT_REQUIRED_CODE = "PAYMENT_REQUIRED";
581
- var BILLING_STEP = "The API's message says which applies: a product of the organization's agreement is changed with Mountaya (https://mountaya.com/en/contact/), and a missing payment method is added, or an invoice still owed paid, in the organization's billing settings.";
582
- var CEILING_STEP = "No wait lifts a ceiling, so this call is not repeated: free a place in what the error's metadata names, or change the organization's agreement with Mountaya (https://mountaya.com/en/contact/) where it sets that ceiling.";
583
- var secondsSpelled = (count) => `${count} ${count === 1 ? "second" : "seconds"}`;
584
- var momentAfter = (seconds) => {
585
- const end = new Date(Date.now() + seconds * 1e3);
586
- return Number.isNaN(end.getTime()) ? void 0 : end.toISOString().replace(/\.\d{3}Z$/, "Z");
587
- };
588
- var monthlyAllowanceStep = (retryAfterSeconds) => {
589
- const moment = retryAfterSeconds === void 0 ? void 0 : momentAfter(retryAfterSeconds);
590
- const when = retryAfterSeconds === void 0 || retryAfterSeconds === 0 ? "" : ` in ${secondsSpelled(retryAfterSeconds)}${moment === void 0 ? "" : ` (at ${moment})`}`;
591
- return `The organization's monthly allowance on this API is spent: it renews when the next billing period begins${when}, so this call is not repeated before then. A larger allowance is set in the organization's agreement with Mountaya (https://mountaya.com/en/contact/).`;
592
- };
593
- var spendsMonthlyAllowance = (rateLimit) => {
594
- const policies = rateLimit?.policies ?? [];
595
- return policies.some((policy) => policy.name === "month" && policy.remaining === 0) && policies.every((policy) => policy.name === "month" || policy.remaining !== 0);
596
- };
597
- var CREDENTIAL_STEP = "Check the credential this client sends: a key that is unknown, rotated or disabled, and a session token that has expired, are refused.";
598
- var MEMBER_SESSION_STEP = "This call acts as the user its session token was minted for, so mint the token with postSession's user_id set to that user.";
599
- var SECRET_KEY_STEP = "Check the secret key this client sends: one that is unknown, revoked or malformed, or one of a canceled organization, is refused.";
600
- var FORBIDDEN_STEP = "Check that the key carries the scope this call needs, that the resource belongs to the key's organization, and that the page calling is one the organization allows.";
601
- var ACTING_USER_STEP = "This call acts as the user its session token names (postSession's user_id), who must be a member of the key's organization holding the role the call asks.";
602
- var MINT_REFUSAL_STEP = "Check that the publishable key in the body is one this secret key's organization issued, and that user_id names a member of that organization or a user holding an invitation to it.";
603
- var PRECONDITION_STEP = "The resource changed since the etag this write names was read: read it again, and decide what the write should be now.";
604
- var IDEMPOTENT_ANSWER_STEP = "The write was made, and its answer cannot be given again: read the resource again rather than sending the write once more.";
605
- var KEY_IN_USE_STEP = "The first request with this Idempotency-Key is still running: send the same call again with the error's idempotencyKey, never a new key, which would make the write twice.";
606
- var MINT_LIMIT_STEP = "Minting is limited per secret key, per client IP address and secret key whose requests keep failing, and per user_id it refuses, so check the publishable key and the user_id before asking again.";
607
- var nextStepFor = (status, code, retryAfterSeconds, monthlyAllowanceSpent, declaration) => {
608
- const mints = declaration.requiresSecretKey === true;
609
- const actsAsMember = declaration.actsAsMember === true;
610
- switch (status) {
611
- case 401:
612
- if (mints) {
613
- return SECRET_KEY_STEP;
614
- }
615
- return actsAsMember ? `${CREDENTIAL_STEP} ${MEMBER_SESSION_STEP}` : CREDENTIAL_STEP;
616
- case 402:
617
- return BILLING_STEP;
618
- case 403:
619
- if (mints) {
620
- return MINT_REFUSAL_STEP;
621
- }
622
- return actsAsMember ? `${FORBIDDEN_STEP} ${ACTING_USER_STEP}` : FORBIDDEN_STEP;
623
- case 409:
624
- return code === IDEMPOTENT_ANSWER_UNAVAILABLE_CODE ? IDEMPOTENT_ANSWER_STEP : code === KEY_IN_USE_CODE ? KEY_IN_USE_STEP : void 0;
625
- case 412:
626
- return PRECONDITION_STEP;
627
- case 429: {
628
- if (code === CEILING_CODE) {
629
- return CEILING_STEP;
630
- }
631
- if (monthlyAllowanceSpent) {
632
- return monthlyAllowanceStep(retryAfterSeconds);
633
- }
634
- const wait = retryAfterSeconds === void 0 || retryAfterSeconds === 0 ? "Wait before calling again." : `Wait ${secondsSpelled(retryAfterSeconds)} before calling again.`;
635
- return mints ? `${wait} ${MINT_LIMIT_STEP}` : wait;
636
- }
637
- default:
638
- return void 0;
639
- }
640
- };
641
- var failureMessage = (context, status, entries, facts = {}) => {
642
- const first = entries[0] ?? {};
643
- const parts = [status, first.extensions?.code, first.message].map(
644
- (part) => typeof part === "string" ? part.trim() : typeof part === "number" ? String(part) : ""
645
- ).filter((part) => part !== "");
646
- const summary = parts.length === 0 ? context : `${context}: ${parts.join(" ")}`;
647
- const next = status === void 0 ? void 0 : nextStepFor(
648
- status,
649
- first.extensions?.code,
650
- facts.retryAfterSeconds,
651
- spendsMonthlyAllowance(facts.rateLimit),
652
- facts.declaration ?? {}
653
- );
654
- const sentence = next === void 0 ? summary : `${/[.!?]$/.test(summary) ? summary : `${summary}.`} ${next}`;
655
- return facts.requestId === void 0 ? sentence : `${sentence} (request ${facts.requestId})`;
656
- };
657
- var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
658
- var delaySecondsPattern = /^[ \t]*(\d+)[ \t]*$/;
659
- var MAX_DELAY_SECONDS_COUNT = 9223372036854775807n;
660
- var imfFixdatePattern = /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) ([A-Z][a-z]{2}) (\d{4}) (\d{2}):(\d{2}):(\d{2}) GMT$/;
661
- var rfc850DatePattern = /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-([A-Z][a-z]{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}) GMT$/;
662
- var asctimeDatePattern = /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) ([A-Z][a-z]{2}) ([ \d]\d) (\d{2}):(\d{2}):(\d{2}) (\d{4})$/;
663
- var utcInstant = (year, month, day, hour, minute, second) => {
664
- const monthIndex = MONTHS.indexOf(month);
665
- if (monthIndex < 0 || hour > 23 || minute > 59 || second > 60) {
666
- return void 0;
667
- }
668
- const midnight = /* @__PURE__ */ new Date(0);
669
- midnight.setUTCFullYear(year, monthIndex, day);
670
- if (midnight.getUTCMonth() !== monthIndex || midnight.getUTCDate() !== day) {
671
- return void 0;
672
- }
673
- return midnight.getTime() + ((hour * 60 + minute) * 60 + second) * 1e3;
674
- };
675
- var httpDate = (value, now) => {
676
- const fixdate = imfFixdatePattern.exec(value);
677
- if (fixdate !== null) {
678
- const [, day, month, year, hour, minute, second] = fixdate;
679
- return utcInstant(
680
- Number(year),
681
- month ?? "",
682
- Number(day),
683
- Number(hour),
684
- Number(minute),
685
- Number(second)
686
- );
687
- }
688
- const rfc850 = rfc850DatePattern.exec(value);
689
- if (rfc850 !== null) {
690
- const [, day, month, shortYear, hour, minute, second] = rfc850;
691
- const currentYear = new Date(now).getUTCFullYear();
692
- const sameDigits = currentYear - currentYear % 100 + Number(shortYear);
693
- const year = sameDigits > currentYear + 50 ? sameDigits - 100 : sameDigits;
694
- return utcInstant(year, month ?? "", Number(day), Number(hour), Number(minute), Number(second));
695
- }
696
- const asctime = asctimeDatePattern.exec(value);
697
- if (asctime !== null) {
698
- const [, month, day, hour, minute, second, year] = asctime;
699
- return utcInstant(
700
- Number(year),
701
- month ?? "",
702
- Number(day),
703
- Number(hour),
704
- Number(minute),
705
- Number(second)
706
- );
707
- }
708
- return void 0;
709
- };
710
- var parseRetryAfter = (header, now = Date.now) => {
711
- if (header === null) {
712
- return void 0;
713
- }
714
- const digits = delaySecondsPattern.exec(header)?.[1];
715
- if (digits !== void 0) {
716
- if (BigInt(digits) > MAX_DELAY_SECONDS_COUNT) {
717
- return void 0;
718
- }
719
- return Math.min(Number(digits), Number.MAX_SAFE_INTEGER);
720
- }
721
- const current = now();
722
- const instant = httpDate(header.replace(/^[ \t]+|[ \t]+$/g, ""), current);
723
- return instant === void 0 ? void 0 : Math.max(0, Math.ceil((instant - current) / 1e3));
724
- };
725
- var answerDetailsOf = (headers) => {
726
- const requestId = headers.get("X-Request-Id")?.trim();
727
- return {
728
- rateLimit: parseRateLimit(headers),
729
- requestId: requestId === void 0 || requestId === "" ? void 0 : requestId
730
- };
731
- };
732
- var replayedOf = (headers) => headers.get("Idempotent-Replayed")?.trim().toLowerCase() === "true";
733
- var errorOfBody = (body, answer, context, declaration, idempotencyKey) => {
734
- const entries = entriesOf(body);
735
- const retryAfterSeconds = parseRetryAfter(answer.headers.get("Retry-After"));
736
- const details = answerDetailsOf(answer.headers);
737
- return errorForStatus(
738
- failureMessage(context, answer.status, entries, {
739
- declaration,
740
- rateLimit: details.rateLimit,
741
- requestId: details.requestId,
742
- retryAfterSeconds
743
- }),
744
- answer.status,
745
- entries,
746
- {
747
- ...details,
748
- etag: answer.headers.get("ETag") ?? void 0,
749
- idempotencyKey,
750
- metadata: metadataOf(body),
751
- retryAfter: retryAfterSeconds
752
- }
753
- );
754
- };
755
- var errorFromResponse = async (response, context, declaration, idempotencyKey) => errorOfBody(
756
- await response.json().catch(() => void 0),
757
- response,
758
- context,
759
- declaration,
760
- idempotencyKey
761
- );
762
- var errorFromBody = (text, answer, context, declaration, idempotencyKey) => {
763
- let body;
764
- try {
765
- body = JSON.parse(text);
766
- } catch {
767
- body = void 0;
768
- }
769
- return errorOfBody(body, answer, context, declaration, idempotencyKey);
770
- };
771
- var errorForStatus = (message, status, entries = [], details = {}) => {
772
- const { etag, ...rest } = details;
773
- const args = [message, status, entries, rest];
774
- switch (status) {
775
- case 400:
776
- return new MountayaBadRequestError(...args);
777
- case 401:
778
- return new MountayaAuthenticationError(...args);
779
- case 402:
780
- return new MountayaBillingError(...args);
781
- case 403:
782
- return new MountayaForbiddenError(...args);
783
- case 404:
784
- return new MountayaNotFoundError(...args);
785
- case 405:
786
- return new MountayaMethodNotAllowedError(...args);
787
- case 409:
788
- switch (entries[0]?.extensions?.code) {
789
- case IDEMPOTENT_ANSWER_UNAVAILABLE_CODE:
790
- return new MountayaIdempotentAnswerUnavailableError(...args);
791
- case KEY_IN_USE_CODE:
792
- return new MountayaIdempotencyKeyInUseError(...args);
793
- default:
794
- return new MountayaConflictError(...args);
795
- }
796
- case 412:
797
- return new MountayaPreconditionFailedError(message, status, entries, { ...rest, etag });
798
- case 413:
799
- return new MountayaPayloadTooLargeError(...args);
800
- case 429:
801
- return new MountayaRateLimitError(...args);
802
- default:
803
- return status >= 500 ? new MountayaServerError(...args) : new MountayaApiError(...args);
804
- }
805
- };
806
-
807
- // src/rest/dates.gen.ts
808
- var agentRunDates = { created_at: true };
809
- var collabCollectionChangedEventDates = { occurred_at: true };
810
- var collabItineraryChangedEventDates = { occurred_at: true };
811
- var collabMemberDates = { connected_at: true };
812
- var collabPresenceJoinEventDates = { connected_at: true };
813
- var collabPresenceSnapshotEventDates = { members: [collabMemberDates] };
814
- var collabSegmentChangedEventDates = { occurred_at: true };
815
- var collabStreamEventDates = { connected_at: true, members: [collabMemberDates], occurred_at: true };
816
- var collabWaypointChangedEventDates = { occurred_at: true };
817
- var collabZoneChangedEventDates = { occurred_at: true };
818
- var collectionDates = { created_at: true, updated_at: true };
819
- var collectionEventObjectDates = { created_at: true, updated_at: true };
820
- var collectionShareLinkEventObjectDates = { created_at: true };
821
- var invoiceDates = { created_at: true };
822
- var invoiceEventObjectDates = { created_at: true };
823
- var itineraryDates = { created_at: true, updated_at: true };
824
- var itineraryEventObjectDates = { created_at: true, updated_at: true };
825
- var itinerarySegmentDates = { created_at: true, start_at: true };
826
- var itinerarySegmentEventObjectDates = { created_at: true };
827
- var itinerarySegmentGroupDates = { created_at: true };
828
- var itinerarySegmentGroupEventObjectDates = { created_at: true };
829
- var itineraryShareLinkEventObjectDates = { created_at: true };
830
- var waypointTimingDates = { cutoff_at: true };
831
- var itineraryWaypointDates = { created_at: true, timing: waypointTimingDates };
832
- var itineraryWaypointEventObjectDates = { created_at: true };
833
- var itineraryWithDetailsDates = { created_at: true, groups: [itinerarySegmentGroupDates], published_at: true, segments: [itinerarySegmentDates], updated_at: true, waypoints: [itineraryWaypointDates] };
834
- var membershipDates = { joined_at: true };
835
- var organizationDates = { created_at: true, updated_at: true };
836
- var organizationEventObjectDates = { created_at: true, updated_at: true };
837
- var organizationInvitationDates = { created_at: true, expires_at: true };
838
- var organizationInvitationEventObjectDates = { created_at: true, expires_at: true };
839
- var organizationMemberDates = { joined_at: true };
840
- var organizationMemberEventObjectDates = { joined_at: true };
841
- var subscriptionDiscountDates = { ends_at: true };
842
- var organizationSubscriptionDates = { current_period_end_at: true, discount: subscriptionDiscountDates };
843
- var organizationSubscriptionEventObjectDates = { current_period_end_at: true };
844
- var organizationSubscriptionSummaryDates = { api: organizationSubscriptionDates };
845
- var publishableKeyDates = { created_at: true, last_used_at: true, revoked_at: true };
846
- var publishableKeyEventObjectDates = { created_at: true, revoked_at: true };
847
- var secretKeyEventObjectDates = { created_at: true, revoked_at: true };
848
- var segmentCreateParamsDates = { start_at: true };
849
- var segmentUpdateParamsDates = { start_at: true };
850
- var sessionDates = { expires_at: true };
851
- var shareLinkDates = { created_at: true };
852
- var userInvitationDates = { created_at: true, expires_at: true };
853
- var waypointCreateParamsDates = { timing: waypointTimingDates };
854
- var waypointUpdateParamsDates = { timing: waypointTimingDates };
855
- var webhookDeliveryDates = { created_at: true, last_attempt_at: true, next_attempt_at: true };
856
- var webhookDeliveryAttemptDates = { attempted_at: true, scheduled_at: true };
857
- var webhookDeliveryCreateParamsDates = { since: true };
858
- var webhookDeliveryTriggerDates = { created_at: true, since: true };
859
- var webhookDeliveryWithAttemptsDates = { attempts: [webhookDeliveryAttemptDates], created_at: true, last_attempt_at: true, next_attempt_at: true };
860
- var webhookEndpointDates = { created_at: true, disabled_at: true, failing_since: true, updated_at: true };
861
- var webhookEndpointEventObjectDates = { created_at: true, failing_since: true, updated_at: true };
862
- var webhookEndpointWithSecretDates = webhookEndpointDates;
863
- var webhookEventObjectDates = { created_at: true, current_period_end_at: true, end_at: true, expires_at: true, failing_since: true, joined_at: true, revoked_at: true, start_at: true, updated_at: true };
864
- var webhookEventDataDates = { object: webhookEventObjectDates };
865
- var webhookEventDates = { created_at: true, data: webhookEventDataDates };
866
- var webhookEventWithDeliveriesDates = { created_at: true, data: webhookEventDataDates, deliveries: [webhookDeliveryDates] };
867
- var webhookHealthDestinationDates = { failing_since: true, last_success_at: true };
868
- var webhookHealthPointDates = { start_at: true };
869
- var webhookHealthDates = { destinations: [webhookHealthDestinationDates], end_at: true, series: [webhookHealthPointDates], start_at: true };
870
- var zoneDates = { created_at: true, end_at: true, published_at: true, start_at: true, updated_at: true };
871
- var zoneCreateParamsDates = { end_at: true, start_at: true };
872
- var zoneEventObjectDates = { created_at: true, end_at: true, start_at: true, updated_at: true };
873
- var zoneUpdateParamsDates = { end_at: true, start_at: true };
874
- var collabStreamEventDatesByType = { "collection.changed": collabCollectionChangedEventDates, "itinerary.changed": collabItineraryChangedEventDates, "presence.join": collabPresenceJoinEventDates, "presence.snapshot": collabPresenceSnapshotEventDates, "segment.changed": collabSegmentChangedEventDates, "waypoint.changed": collabWaypointChangedEventDates, "zone.changed": collabZoneChangedEventDates };
875
- var restSchemaDates = { AgentRun: agentRunDates, CollabCollectionChangedEvent: collabCollectionChangedEventDates, CollabItineraryChangedEvent: collabItineraryChangedEventDates, CollabMember: collabMemberDates, CollabPresenceJoinEvent: collabPresenceJoinEventDates, CollabPresenceSnapshotEvent: collabPresenceSnapshotEventDates, CollabSegmentChangedEvent: collabSegmentChangedEventDates, CollabStreamEvent: collabStreamEventDates, CollabWaypointChangedEvent: collabWaypointChangedEventDates, CollabZoneChangedEvent: collabZoneChangedEventDates, Collection: collectionDates, CollectionEventObject: collectionEventObjectDates, CollectionShareLinkEventObject: collectionShareLinkEventObjectDates, Invoice: invoiceDates, InvoiceEventObject: invoiceEventObjectDates, Itinerary: itineraryDates, ItineraryEventObject: itineraryEventObjectDates, ItinerarySegment: itinerarySegmentDates, ItinerarySegmentEventObject: itinerarySegmentEventObjectDates, ItinerarySegmentGroup: itinerarySegmentGroupDates, ItinerarySegmentGroupEventObject: itinerarySegmentGroupEventObjectDates, ItineraryShareLinkEventObject: itineraryShareLinkEventObjectDates, ItineraryWaypoint: itineraryWaypointDates, ItineraryWaypointEventObject: itineraryWaypointEventObjectDates, ItineraryWithDetails: itineraryWithDetailsDates, Membership: membershipDates, Organization: organizationDates, OrganizationEventObject: organizationEventObjectDates, OrganizationInvitation: organizationInvitationDates, OrganizationInvitationEventObject: organizationInvitationEventObjectDates, OrganizationMember: organizationMemberDates, OrganizationMemberEventObject: organizationMemberEventObjectDates, OrganizationSubscription: organizationSubscriptionDates, OrganizationSubscriptionEventObject: organizationSubscriptionEventObjectDates, OrganizationSubscriptionSummary: organizationSubscriptionSummaryDates, PublishableKey: publishableKeyDates, PublishableKeyEventObject: publishableKeyEventObjectDates, SecretKeyEventObject: secretKeyEventObjectDates, SegmentCreateParams: segmentCreateParamsDates, SegmentUpdateParams: segmentUpdateParamsDates, Session: sessionDates, ShareLink: shareLinkDates, SubscriptionDiscount: subscriptionDiscountDates, UserInvitation: userInvitationDates, WaypointCreateParams: waypointCreateParamsDates, WaypointTiming: waypointTimingDates, WaypointUpdateParams: waypointUpdateParamsDates, WebhookDelivery: webhookDeliveryDates, WebhookDeliveryAttempt: webhookDeliveryAttemptDates, WebhookDeliveryCreateParams: webhookDeliveryCreateParamsDates, WebhookDeliveryTrigger: webhookDeliveryTriggerDates, WebhookDeliveryWithAttempts: webhookDeliveryWithAttemptsDates, WebhookEndpoint: webhookEndpointDates, WebhookEndpointEventObject: webhookEndpointEventObjectDates, WebhookEndpointWithSecret: webhookEndpointWithSecretDates, WebhookEvent: webhookEventDates, WebhookEventData: webhookEventDataDates, WebhookEventObject: webhookEventObjectDates, WebhookEventWithDeliveries: webhookEventWithDeliveriesDates, WebhookHealth: webhookHealthDates, WebhookHealthDestination: webhookHealthDestinationDates, WebhookHealthPoint: webhookHealthPointDates, Zone: zoneDates, ZoneCreateParams: zoneCreateParamsDates, ZoneEventObject: zoneEventObjectDates, ZoneUpdateParams: zoneUpdateParamsDates };
876
-
877
- // src/rest/operations.gen.ts
878
- var deleteCollection = (transport, args, options) => transport.request({
879
- actsAsMember: true,
880
- idempotencyKey: args.idempotencyKey,
881
- idempotent: true,
882
- ifMatch: args.ifMatch,
883
- method: "DELETE",
884
- operationId: "deleteCollection",
885
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}`,
886
- requiresSession: true,
887
- retry: options?.retry,
888
- serverBudgetMs: 3e4,
889
- signal: options?.signal,
890
- surface: "rest",
891
- takesIdempotencyKey: true,
892
- timeoutMs: options?.timeoutMs
893
- });
894
- var deleteCollectionItinerary = (transport, args, options) => transport.request({
895
- actsAsMember: true,
896
- dates: { data: collectionDates },
897
- idempotencyKey: args.idempotencyKey,
898
- idempotent: true,
899
- ifMatch: args.ifMatch,
900
- method: "DELETE",
901
- operationId: "deleteCollectionItinerary",
902
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
903
- requiresSession: true,
904
- retry: options?.retry,
905
- serverBudgetMs: 3e4,
906
- signal: options?.signal,
907
- surface: "rest",
908
- takesIdempotencyKey: true,
909
- timeoutMs: options?.timeoutMs
910
- });
911
- var deleteCollectionShareLink = (transport, args, options) => transport.request({
912
- actsAsMember: true,
913
- idempotencyKey: args.idempotencyKey,
914
- idempotent: true,
915
- method: "DELETE",
916
- operationId: "deleteCollectionShareLink",
917
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link`,
918
- requiresSession: true,
919
- retry: options?.retry,
920
- serverBudgetMs: 3e4,
921
- signal: options?.signal,
922
- surface: "rest",
923
- takesIdempotencyKey: true,
924
- timeoutMs: options?.timeoutMs
925
- });
926
- var deleteCollectionZone = (transport, args, options) => transport.request({
927
- actsAsMember: true,
928
- dates: { data: collectionDates },
929
- idempotencyKey: args.idempotencyKey,
930
- idempotent: true,
931
- ifMatch: args.ifMatch,
932
- method: "DELETE",
933
- operationId: "deleteCollectionZone",
934
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/zones/${encodeURIComponent(String(args.zone_id))}`,
935
- requiresSession: true,
936
- retry: options?.retry,
937
- serverBudgetMs: 3e4,
938
- signal: options?.signal,
939
- surface: "rest",
940
- takesIdempotencyKey: true,
941
- timeoutMs: options?.timeoutMs
942
- });
943
- var deleteItinerary = (transport, args, options) => transport.request({
944
- actsAsMember: true,
945
- idempotencyKey: args.idempotencyKey,
946
- idempotent: true,
947
- ifMatch: args.ifMatch,
948
- method: "DELETE",
949
- operationId: "deleteItinerary",
950
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
951
- requiresSession: true,
952
- retry: options?.retry,
953
- serverBudgetMs: 3e4,
954
- signal: options?.signal,
955
- surface: "rest",
956
- takesIdempotencyKey: true,
957
- timeoutMs: options?.timeoutMs
958
- });
959
- var deleteItineraryPublication = (transport, args, options) => transport.request({
960
- actsAsMember: true,
961
- dates: { data: itineraryWithDetailsDates },
962
- idempotencyKey: args.idempotencyKey,
963
- idempotent: true,
964
- ifMatch: args.ifMatch,
965
- method: "DELETE",
966
- operationId: "deleteItineraryPublication",
967
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/publication`,
968
- requiresSession: true,
969
- retry: options?.retry,
970
- serverBudgetMs: 3e4,
971
- signal: options?.signal,
972
- surface: "rest",
973
- takesIdempotencyKey: true,
974
- timeoutMs: options?.timeoutMs
975
- });
976
- var deleteItinerarySegment = (transport, args, options) => transport.request({
977
- actsAsMember: true,
978
- dates: { data: itineraryWithDetailsDates },
979
- idempotencyKey: args.idempotencyKey,
980
- idempotent: true,
981
- ifMatch: args.ifMatch,
982
- method: "DELETE",
983
- operationId: "deleteItinerarySegment",
984
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}`,
985
- requiresSession: true,
986
- retry: options?.retry,
987
- serverBudgetMs: 3e4,
988
- signal: options?.signal,
989
- surface: "rest",
990
- takesIdempotencyKey: true,
991
- timeoutMs: options?.timeoutMs
992
- });
993
- var deleteItinerarySegmentGroup = (transport, args, options) => transport.request({
994
- actsAsMember: true,
995
- dates: { data: itineraryWithDetailsDates },
996
- idempotencyKey: args.idempotencyKey,
997
- idempotent: true,
998
- ifMatch: args.ifMatch,
999
- method: "DELETE",
1000
- operationId: "deleteItinerarySegmentGroup",
1001
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segment-groups/${encodeURIComponent(String(args.group_id))}`,
1002
- requiresSession: true,
1003
- retry: options?.retry,
1004
- serverBudgetMs: 3e4,
1005
- signal: options?.signal,
1006
- surface: "rest",
1007
- takesIdempotencyKey: true,
1008
- timeoutMs: options?.timeoutMs
1009
- });
1010
- var deleteItineraryShareLink = (transport, args, options) => transport.request({
1011
- actsAsMember: true,
1012
- idempotencyKey: args.idempotencyKey,
1013
- idempotent: true,
1014
- method: "DELETE",
1015
- operationId: "deleteItineraryShareLink",
1016
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link`,
1017
- requiresSession: true,
1018
- retry: options?.retry,
1019
- serverBudgetMs: 3e4,
1020
- signal: options?.signal,
1021
- surface: "rest",
1022
- takesIdempotencyKey: true,
1023
- timeoutMs: options?.timeoutMs
1024
- });
1025
- var deleteItineraryWaypoint = (transport, args, options) => transport.request({
1026
- actsAsMember: true,
1027
- dates: { data: itineraryWithDetailsDates },
1028
- idempotencyKey: args.idempotencyKey,
1029
- idempotent: true,
1030
- ifMatch: args.ifMatch,
1031
- method: "DELETE",
1032
- operationId: "deleteItineraryWaypoint",
1033
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/waypoints/${encodeURIComponent(String(args.waypoint_id))}`,
1034
- requiresSession: true,
1035
- retry: options?.retry,
1036
- serverBudgetMs: 3e4,
1037
- signal: options?.signal,
1038
- surface: "rest",
1039
- takesIdempotencyKey: true,
1040
- timeoutMs: options?.timeoutMs
1041
- });
1042
- var deleteMyInvitation = (transport, args, options) => transport.request({
1043
- actsAsMember: true,
1044
- idempotencyKey: args.idempotencyKey,
1045
- idempotent: true,
1046
- method: "DELETE",
1047
- operationId: "deleteMyInvitation",
1048
- path: `/v1/me/invitations/${encodeURIComponent(String(args.invitation_id))}`,
1049
- requiresSession: true,
1050
- retry: options?.retry,
1051
- serverBudgetMs: 3e4,
1052
- signal: options?.signal,
1053
- surface: "rest",
1054
- takesIdempotencyKey: true,
1055
- timeoutMs: options?.timeoutMs
1056
- });
1057
- var deleteOrganizationAiProviderConfig = (transport, args, options) => transport.request({
1058
- actsAsMember: true,
1059
- idempotencyKey: args.idempotencyKey,
1060
- idempotent: true,
1061
- ifMatch: args.ifMatch,
1062
- method: "DELETE",
1063
- operationId: "deleteOrganizationAiProviderConfig",
1064
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
1065
- requiresSession: true,
1066
- retry: options?.retry,
1067
- serverBudgetMs: 3e4,
1068
- signal: options?.signal,
1069
- surface: "rest",
1070
- takesIdempotencyKey: true,
1071
- timeoutMs: options?.timeoutMs
1072
- });
1073
- var deleteOrganizationBillingPaymentMethod = (transport, args, options) => transport.request({
1074
- actsAsMember: true,
1075
- idempotencyKey: args.idempotencyKey,
1076
- idempotent: true,
1077
- method: "DELETE",
1078
- operationId: "deleteOrganizationBillingPaymentMethod",
1079
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods/${encodeURIComponent(String(args.payment_method_id))}`,
1080
- requiresSession: true,
1081
- retry: options?.retry,
1082
- serverBudgetMs: 3e4,
1083
- signal: options?.signal,
1084
- surface: "rest",
1085
- takesIdempotencyKey: true,
1086
- timeoutMs: options?.timeoutMs
1087
- });
1088
- var deleteOrganizationBillingSubscription = (transport, args, options) => transport.request({
1089
- actsAsMember: true,
1090
- dates: { data: organizationSubscriptionSummaryDates },
1091
- idempotencyKey: args.idempotencyKey,
1092
- idempotent: true,
1093
- method: "DELETE",
1094
- operationId: "deleteOrganizationBillingSubscription",
1095
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/subscription`,
1096
- requiresSession: true,
1097
- retry: options?.retry,
1098
- serverBudgetMs: 3e4,
1099
- signal: options?.signal,
1100
- surface: "rest",
1101
- takesIdempotencyKey: true,
1102
- timeoutMs: options?.timeoutMs
1103
- });
1104
- var deleteOrganizationInvitation = (transport, args, options) => transport.request({
1105
- actsAsMember: true,
1106
- idempotencyKey: args.idempotencyKey,
1107
- idempotent: true,
1108
- method: "DELETE",
1109
- operationId: "deleteOrganizationInvitation",
1110
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations/${encodeURIComponent(String(args.invitation_id))}`,
1111
- requiresSession: true,
1112
- retry: options?.retry,
1113
- serverBudgetMs: 3e4,
1114
- signal: options?.signal,
1115
- surface: "rest",
1116
- takesIdempotencyKey: true,
1117
- timeoutMs: options?.timeoutMs
1118
- });
1119
- var deleteOrganizationMember = (transport, args, options) => transport.request({
1120
- actsAsMember: true,
1121
- idempotencyKey: args.idempotencyKey,
1122
- idempotent: true,
1123
- method: "DELETE",
1124
- operationId: "deleteOrganizationMember",
1125
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/members/${encodeURIComponent(String(args.user_id))}`,
1126
- requiresSession: true,
1127
- retry: options?.retry,
1128
- serverBudgetMs: 3e4,
1129
- signal: options?.signal,
1130
- surface: "rest",
1131
- takesIdempotencyKey: true,
1132
- timeoutMs: options?.timeoutMs
1133
- });
1134
- var deleteOrganizationPublishableKey = (transport, args, options) => transport.request({
1135
- actsAsMember: true,
1136
- dates: { data: publishableKeyDates },
1137
- idempotencyKey: args.idempotencyKey,
1138
- idempotent: true,
1139
- ifMatch: args.ifMatch,
1140
- method: "DELETE",
1141
- operationId: "deleteOrganizationPublishableKey",
1142
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys/${encodeURIComponent(String(args.key_id))}`,
1143
- requiresSession: true,
1144
- retry: options?.retry,
1145
- serverBudgetMs: 3e4,
1146
- signal: options?.signal,
1147
- surface: "rest",
1148
- takesIdempotencyKey: true,
1149
- timeoutMs: options?.timeoutMs
1150
- });
1151
- var deleteOrganizationWebhookEndpoint = (transport, args, options) => transport.request({
1152
- actsAsMember: true,
1153
- idempotencyKey: args.idempotencyKey,
1154
- idempotent: true,
1155
- ifMatch: args.ifMatch,
1156
- method: "DELETE",
1157
- operationId: "deleteOrganizationWebhookEndpoint",
1158
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints/${encodeURIComponent(String(args.webhook_endpoint_id))}`,
1159
- requiresSession: true,
1160
- retry: options?.retry,
1161
- serverBudgetMs: 3e4,
1162
- signal: options?.signal,
1163
- surface: "rest",
1164
- takesIdempotencyKey: true,
1165
- timeoutMs: options?.timeoutMs
1166
- });
1167
- var deleteZone = (transport, args, options) => transport.request({
1168
- actsAsMember: true,
1169
- idempotencyKey: args.idempotencyKey,
1170
- idempotent: true,
1171
- ifMatch: args.ifMatch,
1172
- method: "DELETE",
1173
- operationId: "deleteZone",
1174
- path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}`,
1175
- requiresSession: true,
1176
- retry: options?.retry,
1177
- serverBudgetMs: 3e4,
1178
- signal: options?.signal,
1179
- surface: "rest",
1180
- takesIdempotencyKey: true,
1181
- timeoutMs: options?.timeoutMs
1182
- });
1183
- var deleteZonePublication = (transport, args, options) => transport.request({
1184
- actsAsMember: true,
1185
- dates: { data: zoneDates },
1186
- idempotencyKey: args.idempotencyKey,
1187
- idempotent: true,
1188
- ifMatch: args.ifMatch,
1189
- method: "DELETE",
1190
- operationId: "deleteZonePublication",
1191
- path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/publication`,
1192
- requiresSession: true,
1193
- retry: options?.retry,
1194
- serverBudgetMs: 3e4,
1195
- signal: options?.signal,
1196
- surface: "rest",
1197
- takesIdempotencyKey: true,
1198
- timeoutMs: options?.timeoutMs
1199
- });
1200
- var getActivities = (transport, options) => transport.request({
1201
- acceptsShareToken: true,
1202
- idempotent: true,
1203
- method: "GET",
1204
- operationId: "getActivities",
1205
- path: "/v1/activities",
1206
- retry: options?.retry,
1207
- serverBudgetMs: 3e4,
1208
- signal: options?.signal,
1209
- surface: "rest",
1210
- timeoutMs: options?.timeoutMs
1211
- });
1212
- var getAgentRunEvents = (transport, args, options) => transport.requestBinary({
1213
- accept: "text/event-stream",
1214
- actsAsMember: true,
1215
- idempotent: true,
1216
- method: "GET",
1217
- operationId: "getAgentRunEvents",
1218
- path: `/v1/agent/runs/${encodeURIComponent(String(args.run_id))}/events`,
1219
- requiresSession: true,
1220
- retry: options?.retry,
1221
- signal: options?.signal,
1222
- surface: "rest",
1223
- timeoutMs: options?.timeoutMs
1224
- });
1225
- var getAiProviders = (transport, options) => transport.request({
1226
- idempotent: true,
1227
- method: "GET",
1228
- operationId: "getAiProviders",
1229
- path: "/v1/ai-providers",
1230
- requiresSession: true,
1231
- retry: options?.retry,
1232
- serverBudgetMs: 3e4,
1233
- signal: options?.signal,
1234
- surface: "rest",
1235
- timeoutMs: options?.timeoutMs
1236
- });
1237
- var getBillingProducts = (transport, options) => transport.request({
1238
- idempotent: true,
1239
- method: "GET",
1240
- operationId: "getBillingProducts",
1241
- path: "/v1/billing/products",
1242
- requiresSession: true,
1243
- retry: options?.retry,
1244
- serverBudgetMs: 3e4,
1245
- signal: options?.signal,
1246
- surface: "rest",
1247
- timeoutMs: options?.timeoutMs
1248
- });
1249
- var getCollection = (transport, args, options) => transport.request({
1250
- acceptsShareToken: true,
1251
- dates: { data: collectionDates },
1252
- idempotent: true,
1253
- method: "GET",
1254
- operationId: "getCollection",
1255
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}`,
1256
- retry: options?.retry,
1257
- serverBudgetMs: 3e4,
1258
- signal: options?.signal,
1259
- surface: "rest",
1260
- timeoutMs: options?.timeoutMs
1261
- });
1262
- var getCollectionItineraries = (transport, args, options) => transport.request({
1263
- acceptsShareToken: true,
1264
- dates: { data: [itineraryDates] },
1265
- idempotent: true,
1266
- method: "GET",
1267
- operationId: "getCollectionItineraries",
1268
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries`,
1269
- query: args.query,
1270
- retry: options?.retry,
1271
- serverBudgetMs: 3e4,
1272
- signal: options?.signal,
1273
- surface: "rest",
1274
- timeoutMs: options?.timeoutMs
1275
- });
1276
- var getCollections = (transport, args = {}, options) => transport.request({
1277
- dates: { data: [collectionDates] },
1278
- idempotent: true,
1279
- method: "GET",
1280
- operationId: "getCollections",
1281
- path: "/v1/collections",
1282
- query: args.query,
1283
- retry: options?.retry,
1284
- serverBudgetMs: 3e4,
1285
- signal: options?.signal,
1286
- surface: "rest",
1287
- timeoutMs: options?.timeoutMs
1288
- });
1289
- var getCollectionShareLink = (transport, args, options) => transport.request({
1290
- actsAsMember: true,
1291
- dates: { data: shareLinkDates },
1292
- idempotent: true,
1293
- method: "GET",
1294
- operationId: "getCollectionShareLink",
1295
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link`,
1296
- requiresSession: true,
1297
- retry: options?.retry,
1298
- serverBudgetMs: 3e4,
1299
- signal: options?.signal,
1300
- surface: "rest",
1301
- timeoutMs: options?.timeoutMs
1302
- });
1303
- var getCollectionZones = (transport, args, options) => transport.request({
1304
- acceptsShareToken: true,
1305
- dates: { data: [zoneDates] },
1306
- idempotent: true,
1307
- method: "GET",
1308
- operationId: "getCollectionZones",
1309
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/zones`,
1310
- query: args.query,
1311
- retry: options?.retry,
1312
- serverBudgetMs: 3e4,
1313
- signal: options?.signal,
1314
- surface: "rest",
1315
- timeoutMs: options?.timeoutMs
1316
- });
1317
- var getItineraries = (transport, args = {}, options) => transport.request({
1318
- dates: { data: [itineraryDates] },
1319
- idempotent: true,
1320
- method: "GET",
1321
- operationId: "getItineraries",
1322
- path: "/v1/itineraries",
1323
- query: args.query,
1324
- retry: options?.retry,
1325
- serverBudgetMs: 3e4,
1326
- signal: options?.signal,
1327
- surface: "rest",
1328
- timeoutMs: options?.timeoutMs
1329
- });
1330
- var getItinerary = (transport, args, options) => transport.request({
1331
- acceptsShareToken: true,
1332
- dates: { data: itineraryWithDetailsDates },
1333
- idempotent: true,
1334
- method: "GET",
1335
- operationId: "getItinerary",
1336
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
1337
- query: args.query,
1338
- retry: options?.retry,
1339
- serverBudgetMs: 3e4,
1340
- signal: options?.signal,
1341
- surface: "rest",
1342
- timeoutMs: options?.timeoutMs
1343
- });
1344
- var getItineraryEvents = (transport, args, options) => transport.requestBinary({
1345
- accept: "text/event-stream",
1346
- actsAsMember: true,
1347
- idempotent: true,
1348
- method: "GET",
1349
- operationId: "getItineraryEvents",
1350
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/events`,
1351
- requiresSession: true,
1352
- retry: options?.retry,
1353
- signal: options?.signal,
1354
- surface: "rest",
1355
- timeoutMs: options?.timeoutMs
1356
- });
1357
- var getItineraryExport = (transport, args, options) => transport.requestBinary({
1358
- 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",
1359
- acceptsShareToken: true,
1360
- idempotent: true,
1361
- method: "GET",
1362
- operationId: "getItineraryExport",
1363
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/export`,
1364
- query: args.query,
1365
- retry: options?.retry,
1366
- serverBudgetMs: 3e4,
1367
- signal: options?.signal,
1368
- surface: "rest",
1369
- timeoutMs: options?.timeoutMs
1370
- });
1371
- var getItineraryPace = (transport, args, options) => transport.request({
1372
- acceptsShareToken: true,
1373
- idempotent: true,
1374
- method: "GET",
1375
- operationId: "getItineraryPace",
1376
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/pace`,
1377
- query: args.query,
1378
- retry: options?.retry,
1379
- serverBudgetMs: 3e4,
1380
- signal: options?.signal,
1381
- surface: "rest",
1382
- timeoutMs: options?.timeoutMs
1383
- });
1384
- var getItineraryShareLink = (transport, args, options) => transport.request({
1385
- actsAsMember: true,
1386
- dates: { data: shareLinkDates },
1387
- idempotent: true,
1388
- method: "GET",
1389
- operationId: "getItineraryShareLink",
1390
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link`,
1391
- requiresSession: true,
1392
- retry: options?.retry,
1393
- serverBudgetMs: 3e4,
1394
- signal: options?.signal,
1395
- surface: "rest",
1396
- timeoutMs: options?.timeoutMs
1397
- });
1398
- var getLayers = (transport, args = {}, options) => transport.request({
1399
- acceptsShareToken: true,
1400
- idempotent: true,
1401
- method: "GET",
1402
- operationId: "getLayers",
1403
- path: "/v1/layers",
1404
- query: args.query,
1405
- retry: options?.retry,
1406
- serverBudgetMs: 3e4,
1407
- signal: options?.signal,
1408
- surface: "rest",
1409
- timeoutMs: options?.timeoutMs
1410
- });
1411
- var getMyInvitations = (transport, args = {}, options) => transport.request({
1412
- actsAsMember: true,
1413
- dates: { data: [userInvitationDates] },
1414
- idempotent: true,
1415
- method: "GET",
1416
- operationId: "getMyInvitations",
1417
- path: "/v1/me/invitations",
1418
- query: args.query,
1419
- requiresSession: true,
1420
- retry: options?.retry,
1421
- serverBudgetMs: 3e4,
1422
- signal: options?.signal,
1423
- surface: "rest",
1424
- timeoutMs: options?.timeoutMs
1425
- });
1426
- var getMyOrganizationNotificationPreferences = (transport, args, options) => transport.request({
1427
- actsAsMember: true,
1428
- idempotent: true,
1429
- method: "GET",
1430
- operationId: "getMyOrganizationNotificationPreferences",
1431
- path: `/v1/me/organizations/${encodeURIComponent(String(args.organization_id))}/notification-preferences`,
1432
- requiresSession: true,
1433
- retry: options?.retry,
1434
- serverBudgetMs: 3e4,
1435
- signal: options?.signal,
1436
- surface: "rest",
1437
- timeoutMs: options?.timeoutMs
1438
- });
1439
- var getMyOrganizations = (transport, args = {}, options) => transport.request({
1440
- actsAsMember: true,
1441
- dates: { data: [membershipDates] },
1442
- idempotent: true,
1443
- method: "GET",
1444
- operationId: "getMyOrganizations",
1445
- path: "/v1/me/organizations",
1446
- query: args.query,
1447
- requiresSession: true,
1448
- retry: options?.retry,
1449
- serverBudgetMs: 3e4,
1450
- signal: options?.signal,
1451
- surface: "rest",
1452
- timeoutMs: options?.timeoutMs
1453
- });
1454
- var getMyPreferences = (transport, options) => transport.request({
1455
- actsAsMember: true,
1456
- idempotent: true,
1457
- method: "GET",
1458
- operationId: "getMyPreferences",
1459
- path: "/v1/me/preferences",
1460
- requiresSession: true,
1461
- retry: options?.retry,
1462
- serverBudgetMs: 3e4,
1463
- signal: options?.signal,
1464
- surface: "rest",
1465
- timeoutMs: options?.timeoutMs
1466
- });
1467
- var getOrganization = (transport, args, options) => transport.request({
1468
- acceptsShareToken: true,
1469
- dates: { data: organizationDates },
1470
- idempotent: true,
1471
- method: "GET",
1472
- operationId: "getOrganization",
1473
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}`,
1474
- retry: options?.retry,
1475
- serverBudgetMs: 3e4,
1476
- signal: options?.signal,
1477
- surface: "rest",
1478
- timeoutMs: options?.timeoutMs
1479
- });
1480
- var getOrganizationAiProviderConfig = (transport, args, options) => transport.request({
1481
- idempotent: true,
1482
- method: "GET",
1483
- operationId: "getOrganizationAiProviderConfig",
1484
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
1485
- requiresSession: true,
1486
- retry: options?.retry,
1487
- serverBudgetMs: 3e4,
1488
- signal: options?.signal,
1489
- surface: "rest",
1490
- timeoutMs: options?.timeoutMs
1491
- });
1492
- var getOrganizationBillingInfo = (transport, args, options) => transport.request({
1493
- idempotent: true,
1494
- method: "GET",
1495
- operationId: "getOrganizationBillingInfo",
1496
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/info`,
1497
- requiresSession: true,
1498
- retry: options?.retry,
1499
- serverBudgetMs: 3e4,
1500
- signal: options?.signal,
1501
- surface: "rest",
1502
- timeoutMs: options?.timeoutMs
1503
- });
1504
- var getOrganizationBillingInvoices = (transport, args, options) => transport.request({
1505
- dates: { data: [invoiceDates] },
1506
- idempotent: true,
1507
- method: "GET",
1508
- operationId: "getOrganizationBillingInvoices",
1509
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/invoices`,
1510
- query: args.query,
1511
- requiresSession: true,
1512
- retry: options?.retry,
1513
- serverBudgetMs: 3e4,
1514
- signal: options?.signal,
1515
- surface: "rest",
1516
- timeoutMs: options?.timeoutMs
1517
- });
1518
- var getOrganizationBillingPaymentMethods = (transport, args, options) => transport.request({
1519
- idempotent: true,
1520
- method: "GET",
1521
- operationId: "getOrganizationBillingPaymentMethods",
1522
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods`,
1523
- query: args.query,
1524
- requiresSession: true,
1525
- retry: options?.retry,
1526
- serverBudgetMs: 3e4,
1527
- signal: options?.signal,
1528
- surface: "rest",
1529
- timeoutMs: options?.timeoutMs
1530
- });
1531
- var getOrganizationBillingPromotionCode = (transport, args, options) => transport.request({
1532
- idempotent: true,
1533
- method: "GET",
1534
- operationId: "getOrganizationBillingPromotionCode",
1535
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/promotion-codes/${encodeURIComponent(String(args.code))}`,
1536
- requiresSession: true,
1537
- retry: options?.retry,
1538
- serverBudgetMs: 3e4,
1539
- signal: options?.signal,
1540
- surface: "rest",
1541
- timeoutMs: options?.timeoutMs
1542
- });
1543
- var getOrganizationBillingSubscription = (transport, args, options) => transport.request({
1544
- dates: { data: organizationSubscriptionSummaryDates },
1545
- idempotent: true,
1546
- method: "GET",
1547
- operationId: "getOrganizationBillingSubscription",
1548
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/subscription`,
1549
- requiresSession: true,
1550
- retry: options?.retry,
1551
- serverBudgetMs: 3e4,
1552
- signal: options?.signal,
1553
- surface: "rest",
1554
- timeoutMs: options?.timeoutMs
1555
- });
1556
- var getOrganizationEvents = (transport, args, options) => transport.requestBinary({
1557
- accept: "text/event-stream",
1558
- actsAsMember: true,
1559
- idempotent: true,
1560
- method: "GET",
1561
- operationId: "getOrganizationEvents",
1562
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/events`,
1563
- requiresSession: true,
1564
- retry: options?.retry,
1565
- signal: options?.signal,
1566
- surface: "rest",
1567
- timeoutMs: options?.timeoutMs
1568
- });
1569
- var getOrganizationInvitation = (transport, args, options) => transport.request({
1570
- dates: { data: organizationInvitationDates },
1571
- idempotent: true,
1572
- method: "GET",
1573
- operationId: "getOrganizationInvitation",
1574
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations/${encodeURIComponent(String(args.invitation_id))}`,
1575
- requiresSession: true,
1576
- retry: options?.retry,
1577
- serverBudgetMs: 3e4,
1578
- signal: options?.signal,
1579
- surface: "rest",
1580
- timeoutMs: options?.timeoutMs
1581
- });
1582
- var getOrganizationInvitations = (transport, args, options) => transport.request({
1583
- dates: { data: [organizationInvitationDates] },
1584
- idempotent: true,
1585
- method: "GET",
1586
- operationId: "getOrganizationInvitations",
1587
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations`,
1588
- query: args.query,
1589
- requiresSession: true,
1590
- retry: options?.retry,
1591
- serverBudgetMs: 3e4,
1592
- signal: options?.signal,
1593
- surface: "rest",
1594
- timeoutMs: options?.timeoutMs
1595
- });
1596
- var getOrganizationMembers = (transport, args, options) => transport.request({
1597
- dates: { data: [organizationMemberDates] },
1598
- idempotent: true,
1599
- method: "GET",
1600
- operationId: "getOrganizationMembers",
1601
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/members`,
1602
- query: args.query,
1603
- requiresSession: true,
1604
- retry: options?.retry,
1605
- serverBudgetMs: 3e4,
1606
- signal: options?.signal,
1607
- surface: "rest",
1608
- timeoutMs: options?.timeoutMs
1609
- });
1610
- var getOrganizationPublishableKey = (transport, args, options) => transport.request({
1611
- dates: { data: publishableKeyDates },
1612
- idempotent: true,
1613
- method: "GET",
1614
- operationId: "getOrganizationPublishableKey",
1615
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys/${encodeURIComponent(String(args.key_id))}`,
1616
- requiresSession: true,
1617
- retry: options?.retry,
1618
- serverBudgetMs: 3e4,
1619
- signal: options?.signal,
1620
- surface: "rest",
1621
- timeoutMs: options?.timeoutMs
1622
- });
1623
- var getOrganizationPublishableKeys = (transport, args, options) => transport.request({
1624
- dates: { data: [publishableKeyDates] },
1625
- idempotent: true,
1626
- method: "GET",
1627
- operationId: "getOrganizationPublishableKeys",
1628
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys`,
1629
- query: args.query,
1630
- requiresSession: true,
1631
- retry: options?.retry,
1632
- serverBudgetMs: 3e4,
1633
- signal: options?.signal,
1634
- surface: "rest",
1635
- timeoutMs: options?.timeoutMs
1636
- });
1637
- var getOrganizationSettings = (transport, args, options) => transport.request({
1638
- idempotent: true,
1639
- method: "GET",
1640
- operationId: "getOrganizationSettings",
1641
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/settings`,
1642
- requiresSession: true,
1643
- retry: options?.retry,
1644
- serverBudgetMs: 3e4,
1645
- signal: options?.signal,
1646
- surface: "rest",
1647
- timeoutMs: options?.timeoutMs
1648
- });
1649
- var getOrganizationUsageData = (transport, args, options) => transport.request({
1650
- idempotent: true,
1651
- method: "GET",
1652
- operationId: "getOrganizationUsageData",
1653
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/usage/data`,
1654
- query: args.query,
1655
- requiresSession: true,
1656
- retry: options?.retry,
1657
- serverBudgetMs: 3e4,
1658
- signal: options?.signal,
1659
- surface: "rest",
1660
- timeoutMs: options?.timeoutMs
1661
- });
1662
- var getOrganizationUsageTiles = (transport, args, options) => transport.request({
1663
- idempotent: true,
1664
- method: "GET",
1665
- operationId: "getOrganizationUsageTiles",
1666
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/usage/tiles`,
1667
- query: args.query,
1668
- requiresSession: true,
1669
- retry: options?.retry,
1670
- serverBudgetMs: 3e4,
1671
- signal: options?.signal,
1672
- surface: "rest",
1673
- timeoutMs: options?.timeoutMs
1674
- });
1675
- var getOrganizationWebhookDeliveries = (transport, args, options) => transport.request({
1676
- dates: { data: [webhookDeliveryDates] },
1677
- idempotent: true,
1678
- method: "GET",
1679
- operationId: "getOrganizationWebhookDeliveries",
1680
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-deliveries`,
1681
- query: args.query,
1682
- requiresSession: true,
1683
- retry: options?.retry,
1684
- serverBudgetMs: 3e4,
1685
- signal: options?.signal,
1686
- surface: "rest",
1687
- timeoutMs: options?.timeoutMs
1688
- });
1689
- var getOrganizationWebhookDelivery = (transport, args, options) => transport.request({
1690
- dates: { data: webhookDeliveryWithAttemptsDates },
1691
- idempotent: true,
1692
- method: "GET",
1693
- operationId: "getOrganizationWebhookDelivery",
1694
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-deliveries/${encodeURIComponent(String(args.delivery_id))}`,
1695
- requiresSession: true,
1696
- retry: options?.retry,
1697
- serverBudgetMs: 3e4,
1698
- signal: options?.signal,
1699
- surface: "rest",
1700
- timeoutMs: options?.timeoutMs
1701
- });
1702
- var getOrganizationWebhookEndpoint = (transport, args, options) => transport.request({
1703
- dates: { data: webhookEndpointDates },
1704
- idempotent: true,
1705
- method: "GET",
1706
- operationId: "getOrganizationWebhookEndpoint",
1707
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints/${encodeURIComponent(String(args.webhook_endpoint_id))}`,
1708
- requiresSession: true,
1709
- retry: options?.retry,
1710
- serverBudgetMs: 3e4,
1711
- signal: options?.signal,
1712
- surface: "rest",
1713
- timeoutMs: options?.timeoutMs
1714
- });
1715
- var getOrganizationWebhookEndpoints = (transport, args, options) => transport.request({
1716
- dates: { data: [webhookEndpointDates] },
1717
- idempotent: true,
1718
- method: "GET",
1719
- operationId: "getOrganizationWebhookEndpoints",
1720
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints`,
1721
- query: args.query,
1722
- requiresSession: true,
1723
- retry: options?.retry,
1724
- serverBudgetMs: 3e4,
1725
- signal: options?.signal,
1726
- surface: "rest",
1727
- timeoutMs: options?.timeoutMs
1728
- });
1729
- var getOrganizationWebhookEvent = (transport, args, options) => transport.request({
1730
- dates: { data: webhookEventWithDeliveriesDates },
1731
- idempotent: true,
1732
- method: "GET",
1733
- operationId: "getOrganizationWebhookEvent",
1734
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-events/${encodeURIComponent(String(args.event_id))}`,
1735
- requiresSession: true,
1736
- retry: options?.retry,
1737
- serverBudgetMs: 3e4,
1738
- signal: options?.signal,
1739
- surface: "rest",
1740
- timeoutMs: options?.timeoutMs
1741
- });
1742
- var getOrganizationWebhookEvents = (transport, args, options) => transport.request({
1743
- dates: { data: [webhookEventDates] },
1744
- idempotent: true,
1745
- method: "GET",
1746
- operationId: "getOrganizationWebhookEvents",
1747
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-events`,
1748
- query: args.query,
1749
- requiresSession: true,
1750
- retry: options?.retry,
1751
- serverBudgetMs: 3e4,
1752
- signal: options?.signal,
1753
- surface: "rest",
1754
- timeoutMs: options?.timeoutMs
1755
- });
1756
- var getOrganizationWebhookHealth = (transport, args, options) => transport.request({
1757
- dates: { data: webhookHealthDates },
1758
- idempotent: true,
1759
- method: "GET",
1760
- operationId: "getOrganizationWebhookHealth",
1761
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-health`,
1762
- query: args.query,
1763
- requiresSession: true,
1764
- retry: options?.retry,
1765
- serverBudgetMs: 3e4,
1766
- signal: options?.signal,
1767
- surface: "rest",
1768
- timeoutMs: options?.timeoutMs
1769
- });
1770
- var getWebhookEventTypes = (transport, options) => transport.request({
1771
- idempotent: true,
1772
- method: "GET",
1773
- operationId: "getWebhookEventTypes",
1774
- path: "/v1/webhook-event-types",
1775
- requiresSession: true,
1776
- retry: options?.retry,
1777
- serverBudgetMs: 3e4,
1778
- signal: options?.signal,
1779
- surface: "rest",
1780
- timeoutMs: options?.timeoutMs
1781
- });
1782
- var getZone = (transport, args, options) => transport.request({
1783
- acceptsShareToken: true,
1784
- dates: { data: zoneDates },
1785
- idempotent: true,
1786
- method: "GET",
1787
- operationId: "getZone",
1788
- path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}`,
1789
- query: args.query,
1790
- retry: options?.retry,
1791
- serverBudgetMs: 3e4,
1792
- signal: options?.signal,
1793
- surface: "rest",
1794
- timeoutMs: options?.timeoutMs
1795
- });
1796
- var getZoneEvents = (transport, args, options) => transport.requestBinary({
1797
- accept: "text/event-stream",
1798
- actsAsMember: true,
1799
- idempotent: true,
1800
- method: "GET",
1801
- operationId: "getZoneEvents",
1802
- path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/events`,
1803
- requiresSession: true,
1804
- retry: options?.retry,
1805
- signal: options?.signal,
1806
- surface: "rest",
1807
- timeoutMs: options?.timeoutMs
1808
- });
1809
- var getZones = (transport, args = {}, options) => transport.request({
1810
- dates: { data: [zoneDates] },
1811
- idempotent: true,
1812
- method: "GET",
1813
- operationId: "getZones",
1814
- path: "/v1/zones",
1815
- query: args.query,
1816
- retry: options?.retry,
1817
- serverBudgetMs: 3e4,
1818
- signal: options?.signal,
1819
- surface: "rest",
1820
- timeoutMs: options?.timeoutMs
1821
- });
1822
- var patchCollection = (transport, args, options) => transport.request({
1823
- actsAsMember: true,
1824
- body: args.body,
1825
- dates: { data: collectionDates },
1826
- idempotencyKey: args.idempotencyKey,
1827
- idempotent: true,
1828
- ifMatch: args.ifMatch,
1829
- method: "PATCH",
1830
- operationId: "patchCollection",
1831
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}`,
1832
- requiresSession: true,
1833
- retry: options?.retry,
1834
- serverBudgetMs: 3e4,
1835
- signal: options?.signal,
1836
- surface: "rest",
1837
- takesIdempotencyKey: true,
1838
- timeoutMs: options?.timeoutMs
1839
- });
1840
- var patchCollectionItinerary = (transport, args, options) => transport.request({
1841
- actsAsMember: true,
1842
- body: args.body,
1843
- dates: { data: collectionDates },
1844
- idempotencyKey: args.idempotencyKey,
1845
- idempotent: true,
1846
- ifMatch: args.ifMatch,
1847
- method: "PATCH",
1848
- operationId: "patchCollectionItinerary",
1849
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
1850
- requiresSession: true,
1851
- retry: options?.retry,
1852
- serverBudgetMs: 3e4,
1853
- signal: options?.signal,
1854
- surface: "rest",
1855
- takesIdempotencyKey: true,
1856
- timeoutMs: options?.timeoutMs
1857
- });
1858
- var patchItinerary = (transport, args, options) => transport.request({
1859
- actsAsMember: true,
1860
- body: args.body,
1861
- dates: { data: itineraryWithDetailsDates },
1862
- idempotencyKey: args.idempotencyKey,
1863
- idempotent: true,
1864
- ifMatch: args.ifMatch,
1865
- method: "PATCH",
1866
- operationId: "patchItinerary",
1867
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}`,
1868
- requiresSession: true,
1869
- retry: options?.retry,
1870
- serverBudgetMs: 3e4,
1871
- signal: options?.signal,
1872
- surface: "rest",
1873
- takesIdempotencyKey: true,
1874
- timeoutMs: options?.timeoutMs
1875
- });
1876
- var patchItinerarySegment = (transport, args, options) => transport.request({
1877
- actsAsMember: true,
1878
- body: args.body,
1879
- dates: { data: itineraryWithDetailsDates },
1880
- idempotencyKey: args.idempotencyKey,
1881
- idempotent: true,
1882
- ifMatch: args.ifMatch,
1883
- method: "PATCH",
1884
- operationId: "patchItinerarySegment",
1885
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}`,
1886
- requiresSession: true,
1887
- retry: options?.retry,
1888
- serverBudgetMs: 3e4,
1889
- signal: options?.signal,
1890
- surface: "rest",
1891
- takesIdempotencyKey: true,
1892
- timeoutMs: options?.timeoutMs
1893
- });
1894
- var patchItinerarySegmentGroup = (transport, args, options) => transport.request({
1895
- actsAsMember: true,
1896
- body: args.body,
1897
- dates: { data: itineraryWithDetailsDates },
1898
- idempotencyKey: args.idempotencyKey,
1899
- idempotent: true,
1900
- ifMatch: args.ifMatch,
1901
- method: "PATCH",
1902
- operationId: "patchItinerarySegmentGroup",
1903
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segment-groups/${encodeURIComponent(String(args.group_id))}`,
1904
- requiresSession: true,
1905
- retry: options?.retry,
1906
- serverBudgetMs: 3e4,
1907
- signal: options?.signal,
1908
- surface: "rest",
1909
- takesIdempotencyKey: true,
1910
- timeoutMs: options?.timeoutMs
1911
- });
1912
- var patchItineraryWaypoint = (transport, args, options) => transport.request({
1913
- actsAsMember: true,
1914
- body: args.body,
1915
- dates: { data: itineraryWithDetailsDates },
1916
- idempotencyKey: args.idempotencyKey,
1917
- idempotent: true,
1918
- ifMatch: args.ifMatch,
1919
- method: "PATCH",
1920
- operationId: "patchItineraryWaypoint",
1921
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/waypoints/${encodeURIComponent(String(args.waypoint_id))}`,
1922
- requiresSession: true,
1923
- retry: options?.retry,
1924
- serverBudgetMs: 3e4,
1925
- signal: options?.signal,
1926
- surface: "rest",
1927
- takesIdempotencyKey: true,
1928
- timeoutMs: options?.timeoutMs
1929
- });
1930
- var patchMyOrganizationNotificationPreferences = (transport, args, options) => transport.request({
1931
- actsAsMember: true,
1932
- body: args.body,
1933
- idempotencyKey: args.idempotencyKey,
1934
- idempotent: true,
1935
- method: "PATCH",
1936
- operationId: "patchMyOrganizationNotificationPreferences",
1937
- path: `/v1/me/organizations/${encodeURIComponent(String(args.organization_id))}/notification-preferences`,
1938
- requiresSession: true,
1939
- retry: options?.retry,
1940
- serverBudgetMs: 3e4,
1941
- signal: options?.signal,
1942
- surface: "rest",
1943
- takesIdempotencyKey: true,
1944
- timeoutMs: options?.timeoutMs
1945
- });
1946
- var patchMyPreferences = (transport, args, options) => transport.request({
1947
- actsAsMember: true,
1948
- body: args.body,
1949
- idempotencyKey: args.idempotencyKey,
1950
- idempotent: true,
1951
- method: "PATCH",
1952
- operationId: "patchMyPreferences",
1953
- path: "/v1/me/preferences",
1954
- requiresSession: true,
1955
- retry: options?.retry,
1956
- serverBudgetMs: 3e4,
1957
- signal: options?.signal,
1958
- surface: "rest",
1959
- takesIdempotencyKey: true,
1960
- timeoutMs: options?.timeoutMs
1961
- });
1962
- var patchOrganization = (transport, args, options) => transport.request({
1963
- actsAsMember: true,
1964
- body: args.body,
1965
- dates: { data: organizationDates },
1966
- idempotencyKey: args.idempotencyKey,
1967
- idempotent: true,
1968
- ifMatch: args.ifMatch,
1969
- method: "PATCH",
1970
- operationId: "patchOrganization",
1971
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}`,
1972
- requiresSession: true,
1973
- retry: options?.retry,
1974
- serverBudgetMs: 3e4,
1975
- signal: options?.signal,
1976
- surface: "rest",
1977
- takesIdempotencyKey: true,
1978
- timeoutMs: options?.timeoutMs
1979
- });
1980
- var patchOrganizationAiProviderConfig = (transport, args, options) => transport.request({
1981
- actsAsMember: true,
1982
- body: args.body,
1983
- idempotencyKey: args.idempotencyKey,
1984
- idempotent: true,
1985
- ifMatch: args.ifMatch,
1986
- method: "PATCH",
1987
- operationId: "patchOrganizationAiProviderConfig",
1988
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
1989
- requiresSession: true,
1990
- retry: options?.retry,
1991
- serverBudgetMs: 3e4,
1992
- signal: options?.signal,
1993
- surface: "rest",
1994
- takesIdempotencyKey: true,
1995
- timeoutMs: options?.timeoutMs
1996
- });
1997
- var patchOrganizationBillingInfo = (transport, args, options) => transport.request({
1998
- actsAsMember: true,
1999
- body: args.body,
2000
- idempotencyKey: args.idempotencyKey,
2001
- idempotent: true,
2002
- method: "PATCH",
2003
- operationId: "patchOrganizationBillingInfo",
2004
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/info`,
2005
- requiresSession: true,
2006
- retry: options?.retry,
2007
- serverBudgetMs: 3e4,
2008
- signal: options?.signal,
2009
- surface: "rest",
2010
- takesIdempotencyKey: true,
2011
- timeoutMs: options?.timeoutMs
2012
- });
2013
- var patchOrganizationMember = (transport, args, options) => transport.request({
2014
- actsAsMember: true,
2015
- body: args.body,
2016
- dates: { data: organizationMemberDates },
2017
- idempotencyKey: args.idempotencyKey,
2018
- idempotent: true,
2019
- method: "PATCH",
2020
- operationId: "patchOrganizationMember",
2021
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/members/${encodeURIComponent(String(args.user_id))}`,
2022
- requiresSession: true,
2023
- retry: options?.retry,
2024
- serverBudgetMs: 3e4,
2025
- signal: options?.signal,
2026
- surface: "rest",
2027
- takesIdempotencyKey: true,
2028
- timeoutMs: options?.timeoutMs
2029
- });
2030
- var patchOrganizationPublishableKey = (transport, args, options) => transport.request({
2031
- actsAsMember: true,
2032
- body: args.body,
2033
- dates: { data: publishableKeyDates },
2034
- idempotencyKey: args.idempotencyKey,
2035
- idempotent: true,
2036
- ifMatch: args.ifMatch,
2037
- method: "PATCH",
2038
- operationId: "patchOrganizationPublishableKey",
2039
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys/${encodeURIComponent(String(args.key_id))}`,
2040
- requiresSession: true,
2041
- retry: options?.retry,
2042
- serverBudgetMs: 3e4,
2043
- signal: options?.signal,
2044
- surface: "rest",
2045
- takesIdempotencyKey: true,
2046
- timeoutMs: options?.timeoutMs
2047
- });
2048
- var patchOrganizationSettings = (transport, args, options) => transport.request({
2049
- actsAsMember: true,
2050
- body: args.body,
2051
- idempotencyKey: args.idempotencyKey,
2052
- idempotent: true,
2053
- ifMatch: args.ifMatch,
2054
- method: "PATCH",
2055
- operationId: "patchOrganizationSettings",
2056
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/settings`,
2057
- requiresSession: true,
2058
- retry: options?.retry,
2059
- serverBudgetMs: 3e4,
2060
- signal: options?.signal,
2061
- surface: "rest",
2062
- takesIdempotencyKey: true,
2063
- timeoutMs: options?.timeoutMs
2064
- });
2065
- var patchOrganizationWebhookEndpoint = (transport, args, options) => transport.request({
2066
- actsAsMember: true,
2067
- body: args.body,
2068
- dates: { data: webhookEndpointDates },
2069
- idempotencyKey: args.idempotencyKey,
2070
- idempotent: true,
2071
- ifMatch: args.ifMatch,
2072
- method: "PATCH",
2073
- operationId: "patchOrganizationWebhookEndpoint",
2074
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints/${encodeURIComponent(String(args.webhook_endpoint_id))}`,
2075
- requiresSession: true,
2076
- retry: options?.retry,
2077
- serverBudgetMs: 3e4,
2078
- signal: options?.signal,
2079
- surface: "rest",
2080
- takesIdempotencyKey: true,
2081
- timeoutMs: options?.timeoutMs
2082
- });
2083
- var patchZone = (transport, args, options) => transport.request({
2084
- actsAsMember: true,
2085
- body: args.body,
2086
- dates: { data: zoneDates },
2087
- idempotencyKey: args.idempotencyKey,
2088
- idempotent: true,
2089
- ifMatch: args.ifMatch,
2090
- method: "PATCH",
2091
- operationId: "patchZone",
2092
- path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}`,
2093
- requiresSession: true,
2094
- retry: options?.retry,
2095
- serverBudgetMs: 3e4,
2096
- signal: options?.signal,
2097
- surface: "rest",
2098
- takesIdempotencyKey: true,
2099
- timeoutMs: options?.timeoutMs
2100
- });
2101
- var postAgentRun = (transport, args, options) => transport.request({
2102
- actsAsMember: true,
2103
- body: args.body,
2104
- dates: { data: agentRunDates },
2105
- idempotencyKey: args.idempotencyKey,
2106
- idempotent: false,
2107
- method: "POST",
2108
- operationId: "postAgentRun",
2109
- path: "/v1/agent/runs",
2110
- requiresSession: true,
2111
- retry: options?.retry,
2112
- serverBudgetMs: 3e4,
2113
- signal: options?.signal,
2114
- surface: "rest",
2115
- takesIdempotencyKey: true,
2116
- timeoutMs: options?.timeoutMs
2117
- });
2118
- var postAgentRunFeedback = (transport, args, options) => transport.request({
2119
- actsAsMember: true,
2120
- body: args.body,
2121
- idempotencyKey: args.idempotencyKey,
2122
- idempotent: false,
2123
- method: "POST",
2124
- operationId: "postAgentRunFeedback",
2125
- path: `/v1/agent/runs/${encodeURIComponent(String(args.run_id))}/feedback`,
2126
- requiresSession: true,
2127
- retry: options?.retry,
2128
- serverBudgetMs: 3e4,
2129
- signal: options?.signal,
2130
- surface: "rest",
2131
- takesIdempotencyKey: true,
2132
- timeoutMs: options?.timeoutMs
2133
- });
2134
- var postAgentRunInput = (transport, args, options) => transport.request({
2135
- actsAsMember: true,
2136
- body: args.body,
2137
- idempotencyKey: args.idempotencyKey,
2138
- idempotent: false,
2139
- method: "POST",
2140
- operationId: "postAgentRunInput",
2141
- path: `/v1/agent/runs/${encodeURIComponent(String(args.run_id))}/input`,
2142
- requiresSession: true,
2143
- retry: options?.retry,
2144
- serverBudgetMs: 3e4,
2145
- signal: options?.signal,
2146
- surface: "rest",
2147
- takesIdempotencyKey: true,
2148
- timeoutMs: options?.timeoutMs
2149
- });
2150
- var postCollection = (transport, args, options) => transport.request({
2151
- actsAsMember: true,
2152
- body: args.body,
2153
- dates: { data: collectionDates },
2154
- idempotencyKey: args.idempotencyKey,
2155
- idempotent: false,
2156
- method: "POST",
2157
- operationId: "postCollection",
2158
- path: "/v1/collections",
2159
- requiresSession: true,
2160
- retry: options?.retry,
2161
- serverBudgetMs: 3e4,
2162
- signal: options?.signal,
2163
- surface: "rest",
2164
- takesIdempotencyKey: true,
2165
- timeoutMs: options?.timeoutMs
2166
- });
2167
- var postCollectionItineraries = (transport, args, options) => transport.request({
2168
- actsAsMember: true,
2169
- body: args.body,
2170
- dates: { data: collectionDates },
2171
- idempotencyKey: args.idempotencyKey,
2172
- idempotent: true,
2173
- ifMatch: args.ifMatch,
2174
- method: "POST",
2175
- operationId: "postCollectionItineraries",
2176
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/itineraries`,
2177
- requiresSession: true,
2178
- retry: options?.retry,
2179
- serverBudgetMs: 3e4,
2180
- signal: options?.signal,
2181
- surface: "rest",
2182
- takesIdempotencyKey: true,
2183
- timeoutMs: options?.timeoutMs
2184
- });
2185
- var postCollectionShareLink = (transport, args, options) => transport.request({
2186
- actsAsMember: true,
2187
- dates: { data: shareLinkDates },
2188
- idempotencyKey: args.idempotencyKey,
2189
- idempotent: true,
2190
- method: "POST",
2191
- operationId: "postCollectionShareLink",
2192
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link`,
2193
- requiresSession: true,
2194
- retry: options?.retry,
2195
- serverBudgetMs: 3e4,
2196
- signal: options?.signal,
2197
- surface: "rest",
2198
- takesIdempotencyKey: true,
2199
- timeoutMs: options?.timeoutMs
2200
- });
2201
- var postCollectionShareLinkRotate = (transport, args, options) => transport.request({
2202
- actsAsMember: true,
2203
- dates: { data: shareLinkDates },
2204
- idempotencyKey: args.idempotencyKey,
2205
- idempotent: false,
2206
- method: "POST",
2207
- operationId: "postCollectionShareLinkRotate",
2208
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/share-link/rotate`,
2209
- requiresSession: true,
2210
- retry: options?.retry,
2211
- serverBudgetMs: 3e4,
2212
- signal: options?.signal,
2213
- surface: "rest",
2214
- takesIdempotencyKey: true,
2215
- timeoutMs: options?.timeoutMs
2216
- });
2217
- var postCollectionZones = (transport, args, options) => transport.request({
2218
- actsAsMember: true,
2219
- body: args.body,
2220
- dates: { data: collectionDates },
2221
- idempotencyKey: args.idempotencyKey,
2222
- idempotent: true,
2223
- ifMatch: args.ifMatch,
2224
- method: "POST",
2225
- operationId: "postCollectionZones",
2226
- path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/zones`,
2227
- requiresSession: true,
2228
- retry: options?.retry,
2229
- serverBudgetMs: 3e4,
2230
- signal: options?.signal,
2231
- surface: "rest",
2232
- takesIdempotencyKey: true,
2233
- timeoutMs: options?.timeoutMs
2234
- });
2235
- var postItinerary = (transport, args, options) => transport.request({
2236
- actsAsMember: true,
2237
- body: args.body,
2238
- dates: { data: itineraryWithDetailsDates },
2239
- idempotencyKey: args.idempotencyKey,
2240
- idempotent: false,
2241
- method: "POST",
2242
- operationId: "postItinerary",
2243
- path: "/v1/itineraries",
2244
- requiresSession: true,
2245
- retry: options?.retry,
2246
- serverBudgetMs: 3e4,
2247
- signal: options?.signal,
2248
- surface: "rest",
2249
- takesIdempotencyKey: true,
2250
- timeoutMs: options?.timeoutMs
2251
- });
2252
- var postItineraryCollab = (transport, args, options) => transport.request({
2253
- actsAsMember: true,
2254
- body: args.body,
2255
- idempotent: true,
2256
- method: "POST",
2257
- operationId: "postItineraryCollab",
2258
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/collab`,
2259
- requiresSession: true,
2260
- retry: options?.retry,
2261
- serverBudgetMs: 3e4,
2262
- signal: options?.signal,
2263
- surface: "rest",
2264
- timeoutMs: options?.timeoutMs
2265
- });
2266
- var postItineraryDuplicate = (transport, args, options) => transport.request({
2267
- actsAsMember: true,
2268
- body: args.body,
2269
- dates: { data: itineraryWithDetailsDates },
2270
- idempotencyKey: args.idempotencyKey,
2271
- idempotent: false,
2272
- method: "POST",
2273
- operationId: "postItineraryDuplicate",
2274
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/duplicate`,
2275
- query: args.query,
2276
- requiresSession: true,
2277
- retry: options?.retry,
2278
- serverBudgetMs: 3e4,
2279
- signal: options?.signal,
2280
- surface: "rest",
2281
- takesIdempotencyKey: true,
2282
- timeoutMs: options?.timeoutMs
2283
- });
2284
- var postItineraryImport = (transport, args, options) => transport.request({
2285
- actsAsMember: true,
2286
- body: args.body,
2287
- dates: { data: itineraryWithDetailsDates },
2288
- idempotencyKey: args.idempotencyKey,
2289
- idempotent: false,
2290
- method: "POST",
2291
- operationId: "postItineraryImport",
2292
- path: "/v1/itineraries/import",
2293
- requiresSession: true,
2294
- retry: options?.retry,
2295
- serverBudgetMs: 55e3,
2296
- signal: options?.signal,
2297
- surface: "rest",
2298
- takesIdempotencyKey: true,
2299
- timeoutMs: options?.timeoutMs
2300
- });
2301
- var postItineraryPreview = (transport, args, options) => transport.request({
2302
- actsAsMember: true,
2303
- body: args.body,
2304
- idempotencyKey: args.idempotencyKey,
2305
- idempotent: true,
2306
- method: "POST",
2307
- operationId: "postItineraryPreview",
2308
- path: "/v1/itineraries/preview",
2309
- requiresSession: true,
2310
- retry: options?.retry,
2311
- serverBudgetMs: 55e3,
2312
- signal: options?.signal,
2313
- surface: "rest",
2314
- takesIdempotencyKey: true,
2315
- timeoutMs: options?.timeoutMs
2316
- });
2317
- var postItineraryPublication = (transport, args, options) => transport.request({
2318
- actsAsMember: true,
2319
- dates: { data: itineraryWithDetailsDates },
2320
- idempotencyKey: args.idempotencyKey,
2321
- idempotent: true,
2322
- ifMatch: args.ifMatch,
2323
- method: "POST",
2324
- operationId: "postItineraryPublication",
2325
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/publication`,
2326
- requiresSession: true,
2327
- retry: options?.retry,
2328
- serverBudgetMs: 3e4,
2329
- signal: options?.signal,
2330
- surface: "rest",
2331
- takesIdempotencyKey: true,
2332
- timeoutMs: options?.timeoutMs
2333
- });
2334
- var postItinerarySegment = (transport, args, options) => transport.request({
2335
- actsAsMember: true,
2336
- body: args.body,
2337
- dates: { data: itineraryWithDetailsDates },
2338
- idempotencyKey: args.idempotencyKey,
2339
- idempotent: false,
2340
- ifMatch: args.ifMatch,
2341
- method: "POST",
2342
- operationId: "postItinerarySegment",
2343
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments`,
2344
- requiresSession: true,
2345
- retry: options?.retry,
2346
- serverBudgetMs: 3e4,
2347
- signal: options?.signal,
2348
- surface: "rest",
2349
- takesIdempotencyKey: true,
2350
- timeoutMs: options?.timeoutMs
2351
- });
2352
- var postItinerarySegmentConvert = (transport, args, options) => transport.request({
2353
- actsAsMember: true,
2354
- body: args.body,
2355
- dates: { data: itineraryWithDetailsDates },
2356
- idempotencyKey: args.idempotencyKey,
2357
- idempotent: true,
2358
- ifMatch: args.ifMatch,
2359
- method: "POST",
2360
- operationId: "postItinerarySegmentConvert",
2361
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}/convert`,
2362
- requiresSession: true,
2363
- retry: options?.retry,
2364
- serverBudgetMs: 3e4,
2365
- signal: options?.signal,
2366
- surface: "rest",
2367
- takesIdempotencyKey: true,
2368
- timeoutMs: options?.timeoutMs
2369
- });
2370
- var postItinerarySegmentGroup = (transport, args, options) => transport.request({
2371
- actsAsMember: true,
2372
- body: args.body,
2373
- dates: { data: itineraryWithDetailsDates },
2374
- idempotencyKey: args.idempotencyKey,
2375
- idempotent: false,
2376
- ifMatch: args.ifMatch,
2377
- method: "POST",
2378
- operationId: "postItinerarySegmentGroup",
2379
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segment-groups`,
2380
- requiresSession: true,
2381
- retry: options?.retry,
2382
- serverBudgetMs: 3e4,
2383
- signal: options?.signal,
2384
- surface: "rest",
2385
- takesIdempotencyKey: true,
2386
- timeoutMs: options?.timeoutMs
2387
- });
2388
- var postItinerarySegmentMerge = (transport, args, options) => transport.request({
2389
- actsAsMember: true,
2390
- dates: { data: itineraryWithDetailsDates },
2391
- idempotencyKey: args.idempotencyKey,
2392
- idempotent: false,
2393
- ifMatch: args.ifMatch,
2394
- method: "POST",
2395
- operationId: "postItinerarySegmentMerge",
2396
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}/merge`,
2397
- requiresSession: true,
2398
- retry: options?.retry,
2399
- serverBudgetMs: 3e4,
2400
- signal: options?.signal,
2401
- surface: "rest",
2402
- takesIdempotencyKey: true,
2403
- timeoutMs: options?.timeoutMs
2404
- });
2405
- var postItinerarySegmentSplit = (transport, args, options) => transport.request({
2406
- actsAsMember: true,
2407
- body: args.body,
2408
- dates: { data: itineraryWithDetailsDates },
2409
- idempotencyKey: args.idempotencyKey,
2410
- idempotent: false,
2411
- ifMatch: args.ifMatch,
2412
- method: "POST",
2413
- operationId: "postItinerarySegmentSplit",
2414
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/segments/${encodeURIComponent(String(args.segment_id))}/split`,
2415
- requiresSession: true,
2416
- retry: options?.retry,
2417
- serverBudgetMs: 3e4,
2418
- signal: options?.signal,
2419
- surface: "rest",
2420
- takesIdempotencyKey: true,
2421
- timeoutMs: options?.timeoutMs
2422
- });
2423
- var postItineraryShareLink = (transport, args, options) => transport.request({
2424
- actsAsMember: true,
2425
- dates: { data: shareLinkDates },
2426
- idempotencyKey: args.idempotencyKey,
2427
- idempotent: true,
2428
- method: "POST",
2429
- operationId: "postItineraryShareLink",
2430
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link`,
2431
- requiresSession: true,
2432
- retry: options?.retry,
2433
- serverBudgetMs: 3e4,
2434
- signal: options?.signal,
2435
- surface: "rest",
2436
- takesIdempotencyKey: true,
2437
- timeoutMs: options?.timeoutMs
2438
- });
2439
- var postItineraryShareLinkRotate = (transport, args, options) => transport.request({
2440
- actsAsMember: true,
2441
- dates: { data: shareLinkDates },
2442
- idempotencyKey: args.idempotencyKey,
2443
- idempotent: false,
2444
- method: "POST",
2445
- operationId: "postItineraryShareLinkRotate",
2446
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/share-link/rotate`,
2447
- requiresSession: true,
2448
- retry: options?.retry,
2449
- serverBudgetMs: 3e4,
2450
- signal: options?.signal,
2451
- surface: "rest",
2452
- takesIdempotencyKey: true,
2453
- timeoutMs: options?.timeoutMs
2454
- });
2455
- var postItineraryWaypoint = (transport, args, options) => transport.request({
2456
- actsAsMember: true,
2457
- body: args.body,
2458
- dates: { data: itineraryWithDetailsDates },
2459
- idempotencyKey: args.idempotencyKey,
2460
- idempotent: false,
2461
- ifMatch: args.ifMatch,
2462
- method: "POST",
2463
- operationId: "postItineraryWaypoint",
2464
- path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/waypoints`,
2465
- requiresSession: true,
2466
- retry: options?.retry,
2467
- serverBudgetMs: 3e4,
2468
- signal: options?.signal,
2469
- surface: "rest",
2470
- takesIdempotencyKey: true,
2471
- timeoutMs: options?.timeoutMs
2472
- });
2473
- var postMyInvitationAccept = (transport, args, options) => transport.request({
2474
- actsAsMember: true,
2475
- dates: { data: membershipDates },
2476
- idempotencyKey: args.idempotencyKey,
2477
- idempotent: true,
2478
- method: "POST",
2479
- operationId: "postMyInvitationAccept",
2480
- path: `/v1/me/invitations/${encodeURIComponent(String(args.invitation_id))}/accept`,
2481
- requiresSession: true,
2482
- retry: options?.retry,
2483
- serverBudgetMs: 3e4,
2484
- signal: options?.signal,
2485
- surface: "rest",
2486
- takesIdempotencyKey: true,
2487
- timeoutMs: options?.timeoutMs
2488
- });
2489
- var postOrganization = (transport, args, options) => transport.request({
2490
- actsAsMember: true,
2491
- body: args.body,
2492
- dates: { data: organizationDates },
2493
- idempotencyKey: args.idempotencyKey,
2494
- idempotent: false,
2495
- method: "POST",
2496
- operationId: "postOrganization",
2497
- path: "/v1/organizations",
2498
- requiresSession: true,
2499
- retry: options?.retry,
2500
- serverBudgetMs: 3e4,
2501
- signal: options?.signal,
2502
- surface: "rest",
2503
- takesIdempotencyKey: true,
2504
- timeoutMs: options?.timeoutMs
2505
- });
2506
- var postOrganizationAiProviderConfig = (transport, args, options) => transport.request({
2507
- actsAsMember: true,
2508
- body: args.body,
2509
- idempotencyKey: args.idempotencyKey,
2510
- idempotent: false,
2511
- method: "POST",
2512
- operationId: "postOrganizationAiProviderConfig",
2513
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/ai-provider-config`,
2514
- requiresSession: true,
2515
- retry: options?.retry,
2516
- serverBudgetMs: 3e4,
2517
- signal: options?.signal,
2518
- surface: "rest",
2519
- takesIdempotencyKey: true,
2520
- timeoutMs: options?.timeoutMs
2521
- });
2522
- var postOrganizationBillingPaymentMethod = (transport, args, options) => transport.request({
2523
- actsAsMember: true,
2524
- body: args.body,
2525
- idempotencyKey: args.idempotencyKey,
2526
- idempotent: true,
2527
- method: "POST",
2528
- operationId: "postOrganizationBillingPaymentMethod",
2529
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods`,
2530
- requiresSession: true,
2531
- retry: options?.retry,
2532
- serverBudgetMs: 3e4,
2533
- signal: options?.signal,
2534
- surface: "rest",
2535
- takesIdempotencyKey: true,
2536
- timeoutMs: options?.timeoutMs
2537
- });
2538
- var postOrganizationBillingPaymentMethodSetDefault = (transport, args, options) => transport.request({
2539
- actsAsMember: true,
2540
- idempotencyKey: args.idempotencyKey,
2541
- idempotent: true,
2542
- method: "POST",
2543
- operationId: "postOrganizationBillingPaymentMethodSetDefault",
2544
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods/${encodeURIComponent(String(args.payment_method_id))}/set-default`,
2545
- requiresSession: true,
2546
- retry: options?.retry,
2547
- serverBudgetMs: 3e4,
2548
- signal: options?.signal,
2549
- surface: "rest",
2550
- takesIdempotencyKey: true,
2551
- timeoutMs: options?.timeoutMs
2552
- });
2553
- var postOrganizationBillingPaymentMethodSetup = (transport, args, options) => transport.request({
2554
- actsAsMember: true,
2555
- idempotencyKey: args.idempotencyKey,
2556
- idempotent: false,
2557
- method: "POST",
2558
- operationId: "postOrganizationBillingPaymentMethodSetup",
2559
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/payment-methods/setup`,
2560
- requiresSession: true,
2561
- retry: options?.retry,
2562
- serverBudgetMs: 3e4,
2563
- signal: options?.signal,
2564
- surface: "rest",
2565
- takesIdempotencyKey: true,
2566
- timeoutMs: options?.timeoutMs
2567
- });
2568
- var postOrganizationBillingProvision = (transport, args, options) => transport.request({
2569
- actsAsMember: true,
2570
- body: args.body,
2571
- idempotencyKey: args.idempotencyKey,
2572
- idempotent: true,
2573
- method: "POST",
2574
- operationId: "postOrganizationBillingProvision",
2575
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/provision`,
2576
- requiresSession: true,
2577
- retry: options?.retry,
2578
- serverBudgetMs: 3e4,
2579
- signal: options?.signal,
2580
- surface: "rest",
2581
- takesIdempotencyKey: true,
2582
- timeoutMs: options?.timeoutMs
2583
- });
2584
- var postOrganizationBillingSubscription = (transport, args, options) => transport.request({
2585
- actsAsMember: true,
2586
- dates: { data: organizationSubscriptionSummaryDates },
2587
- idempotencyKey: args.idempotencyKey,
2588
- idempotent: true,
2589
- method: "POST",
2590
- operationId: "postOrganizationBillingSubscription",
2591
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/billing/subscription`,
2592
- requiresSession: true,
2593
- retry: options?.retry,
2594
- serverBudgetMs: 3e4,
2595
- signal: options?.signal,
2596
- surface: "rest",
2597
- takesIdempotencyKey: true,
2598
- timeoutMs: options?.timeoutMs
2599
- });
2600
- var postOrganizationInvitation = (transport, args, options) => transport.request({
2601
- actsAsMember: true,
2602
- body: args.body,
2603
- dates: { data: organizationInvitationDates },
2604
- idempotencyKey: args.idempotencyKey,
2605
- idempotent: false,
2606
- method: "POST",
2607
- operationId: "postOrganizationInvitation",
2608
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/invitations`,
2609
- requiresSession: true,
2610
- retry: options?.retry,
2611
- serverBudgetMs: 3e4,
2612
- signal: options?.signal,
2613
- surface: "rest",
2614
- takesIdempotencyKey: true,
2615
- timeoutMs: options?.timeoutMs
2616
- });
2617
- var postOrganizationLookup = (transport, args, options) => transport.request({
2618
- body: args.body,
2619
- dates: { data: organizationDates },
2620
- idempotent: true,
2621
- method: "POST",
2622
- operationId: "postOrganizationLookup",
2623
- path: "/v1/organizations/lookup",
2624
- retry: options?.retry,
2625
- serverBudgetMs: 3e4,
2626
- signal: options?.signal,
2627
- surface: "rest",
2628
- takesNoCredential: true,
2629
- timeoutMs: options?.timeoutMs
2630
- });
2631
- var postOrganizationPublishableKey = (transport, args, options) => transport.request({
2632
- actsAsMember: true,
2633
- body: args.body,
2634
- dates: { data: publishableKeyDates },
2635
- idempotencyKey: args.idempotencyKey,
2636
- idempotent: false,
2637
- method: "POST",
2638
- operationId: "postOrganizationPublishableKey",
2639
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/publishable-keys`,
2640
- requiresSession: true,
2641
- retry: options?.retry,
2642
- serverBudgetMs: 3e4,
2643
- signal: options?.signal,
2644
- surface: "rest",
2645
- takesIdempotencyKey: true,
2646
- timeoutMs: options?.timeoutMs
2647
- });
2648
- var postOrganizationWebhookDelivery = (transport, args, options) => transport.request({
2649
- actsAsMember: true,
2650
- body: args.body,
2651
- dates: { data: webhookDeliveryTriggerDates },
2652
- idempotencyKey: args.idempotencyKey,
2653
- idempotent: false,
2654
- method: "POST",
2655
- operationId: "postOrganizationWebhookDelivery",
2656
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-deliveries`,
2657
- requiresSession: true,
2658
- retry: options?.retry,
2659
- serverBudgetMs: 3e4,
2660
- signal: options?.signal,
2661
- surface: "rest",
2662
- takesIdempotencyKey: true,
2663
- timeoutMs: options?.timeoutMs
2664
- });
2665
- var postOrganizationWebhookEndpoint = (transport, args, options) => transport.request({
2666
- actsAsMember: true,
2667
- body: args.body,
2668
- dates: { data: webhookEndpointWithSecretDates },
2669
- idempotencyKey: args.idempotencyKey,
2670
- idempotent: false,
2671
- method: "POST",
2672
- operationId: "postOrganizationWebhookEndpoint",
2673
- path: `/v1/organizations/${encodeURIComponent(String(args.organization_id))}/webhook-endpoints`,
2674
- requiresSession: true,
2675
- retry: options?.retry,
2676
- serverBudgetMs: 3e4,
2677
- signal: options?.signal,
2678
- surface: "rest",
2679
- takesIdempotencyKey: true,
2680
- timeoutMs: options?.timeoutMs
2681
- });
2682
- var postSession = (transport, args, options) => transport.request({
2683
- body: args.body,
2684
- dates: { data: sessionDates },
2685
- idempotent: true,
2686
- method: "POST",
2687
- operationId: "postSession",
2688
- path: "/v1/sessions",
2689
- requiresSecretKey: true,
2690
- retry: options?.retry,
2691
- serverBudgetMs: 3e4,
2692
- signal: options?.signal,
2693
- surface: "rest",
2694
- timeoutMs: options?.timeoutMs
2695
- });
2696
- var postZone = (transport, args, options) => transport.request({
2697
- actsAsMember: true,
2698
- body: args.body,
2699
- dates: { data: zoneDates },
2700
- idempotencyKey: args.idempotencyKey,
2701
- idempotent: false,
2702
- method: "POST",
2703
- operationId: "postZone",
2704
- path: "/v1/zones",
2705
- requiresSession: true,
2706
- retry: options?.retry,
2707
- serverBudgetMs: 3e4,
2708
- signal: options?.signal,
2709
- surface: "rest",
2710
- takesIdempotencyKey: true,
2711
- timeoutMs: options?.timeoutMs
2712
- });
2713
- var postZoneCollab = (transport, args, options) => transport.request({
2714
- actsAsMember: true,
2715
- body: args.body,
2716
- idempotent: true,
2717
- method: "POST",
2718
- operationId: "postZoneCollab",
2719
- path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/collab`,
2720
- requiresSession: true,
2721
- retry: options?.retry,
2722
- serverBudgetMs: 3e4,
2723
- signal: options?.signal,
2724
- surface: "rest",
2725
- timeoutMs: options?.timeoutMs
2726
- });
2727
- var postZonePublication = (transport, args, options) => transport.request({
2728
- actsAsMember: true,
2729
- dates: { data: zoneDates },
2730
- idempotencyKey: args.idempotencyKey,
2731
- idempotent: true,
2732
- ifMatch: args.ifMatch,
2733
- method: "POST",
2734
- operationId: "postZonePublication",
2735
- path: `/v1/zones/${encodeURIComponent(String(args.zone_id))}/publication`,
2736
- requiresSession: true,
2737
- retry: options?.retry,
2738
- serverBudgetMs: 3e4,
2739
- signal: options?.signal,
2740
- surface: "rest",
2741
- takesIdempotencyKey: true,
2742
- timeoutMs: options?.timeoutMs
2743
- });
2744
- var bind = (transport) => ({
2745
- admin: {
2746
- billing: {
2747
- /**
2748
- * Detach a payment method from an organization.
2749
- * DELETE /v1/organizations/{organization_id}/billing/payment-methods/{payment_method_id}
2750
- * Requires a publishable key with the `management` scope.
2751
- * Acts as the user its session token was minted for, so the token must name one.
2752
- * @see {@link deleteOrganizationBillingPaymentMethod}
2753
- */
2754
- deleteOrganizationBillingPaymentMethod: (args, options) => deleteOrganizationBillingPaymentMethod(transport, args, options),
2755
- /**
2756
- * End an organization's Data API subscription at the end of its period.
2757
- * DELETE /v1/organizations/{organization_id}/billing/subscription
2758
- * Requires a publishable key with the `management` scope.
2759
- * Acts as the user its session token was minted for, so the token must name one.
2760
- * @see {@link deleteOrganizationBillingSubscription}
2761
- */
2762
- deleteOrganizationBillingSubscription: (args, options) => deleteOrganizationBillingSubscription(transport, args, options),
2763
- /**
2764
- * List the billing catalog.
2765
- * GET /v1/billing/products
2766
- * Requires a publishable key with the `management` scope.
2767
- * @see {@link getBillingProducts}
2768
- */
2769
- getBillingProducts: (options) => getBillingProducts(transport, options),
2770
- /**
2771
- * Retrieve an organization's billing information.
2772
- * GET /v1/organizations/{organization_id}/billing/info
2773
- * Requires a publishable key with the `management` scope.
2774
- * @see {@link getOrganizationBillingInfo}
2775
- */
2776
- getOrganizationBillingInfo: (args, options) => getOrganizationBillingInfo(transport, args, options),
2777
- /**
2778
- * List an organization's invoices.
2779
- * GET /v1/organizations/{organization_id}/billing/invoices
2780
- * Requires a publishable key with the `management` scope.
2781
- * @see {@link getOrganizationBillingInvoices}
2782
- */
2783
- getOrganizationBillingInvoices: (args, options) => getOrganizationBillingInvoices(transport, args, options),
2784
- /**
2785
- * List an organization's saved payment methods.
2786
- * GET /v1/organizations/{organization_id}/billing/payment-methods
2787
- * Requires a publishable key with the `management` scope.
2788
- * @see {@link getOrganizationBillingPaymentMethods}
2789
- */
2790
- getOrganizationBillingPaymentMethods: (args, options) => getOrganizationBillingPaymentMethods(transport, args, options),
2791
- /**
2792
- * Check what a promotion code is worth to an organization.
2793
- * GET /v1/organizations/{organization_id}/billing/promotion-codes/{code}
2794
- * Requires a publishable key with the `management` scope.
2795
- * @see {@link getOrganizationBillingPromotionCode}
2796
- */
2797
- getOrganizationBillingPromotionCode: (args, options) => getOrganizationBillingPromotionCode(transport, args, options),
2798
- /**
2799
- * Retrieve an organization's subscription.
2800
- * GET /v1/organizations/{organization_id}/billing/subscription
2801
- * Requires a publishable key with the `management` scope.
2802
- * @see {@link getOrganizationBillingSubscription}
2803
- */
2804
- getOrganizationBillingSubscription: (args, options) => getOrganizationBillingSubscription(transport, args, options),
2805
- /**
2806
- * Update an organization's billing information.
2807
- * PATCH /v1/organizations/{organization_id}/billing/info
2808
- * Requires a publishable key with the `management` scope.
2809
- * Acts as the user its session token was minted for, so the token must name one.
2810
- * @see {@link patchOrganizationBillingInfo}
2811
- */
2812
- patchOrganizationBillingInfo: (args, options) => patchOrganizationBillingInfo(transport, args, options),
2813
- /**
2814
- * Save a confirmed card against an organization.
2815
- * POST /v1/organizations/{organization_id}/billing/payment-methods
2816
- * Requires a publishable key with the `management` scope.
2817
- * Acts as the user its session token was minted for, so the token must name one.
2818
- * @see {@link postOrganizationBillingPaymentMethod}
2819
- */
2820
- postOrganizationBillingPaymentMethod: (args, options) => postOrganizationBillingPaymentMethod(transport, args, options),
2821
- /**
2822
- * Choose which payment method an organization is charged on.
2823
- * POST /v1/organizations/{organization_id}/billing/payment-methods/{payment_method_id}/set-default
2824
- * Requires a publishable key with the `management` scope.
2825
- * Acts as the user its session token was minted for, so the token must name one.
2826
- * @see {@link postOrganizationBillingPaymentMethodSetDefault}
2827
- */
2828
- postOrganizationBillingPaymentMethodSetDefault: (args, options) => postOrganizationBillingPaymentMethodSetDefault(transport, args, options),
2829
- /**
2830
- * Start collecting a card for an organization.
2831
- * POST /v1/organizations/{organization_id}/billing/payment-methods/setup
2832
- * Requires a publishable key with the `management` scope.
2833
- * Acts as the user its session token was minted for, so the token must name one.
2834
- * @see {@link postOrganizationBillingPaymentMethodSetup}
2835
- */
2836
- postOrganizationBillingPaymentMethodSetup: (args, options) => postOrganizationBillingPaymentMethodSetup(transport, args, options),
2837
- /**
2838
- * Open an organization's billing.
2839
- * POST /v1/organizations/{organization_id}/billing/provision
2840
- * Requires a publishable key with the `management` scope.
2841
- * Acts as the user its session token was minted for, so the token must name one.
2842
- * @see {@link postOrganizationBillingProvision}
2843
- */
2844
- postOrganizationBillingProvision: (args, options) => postOrganizationBillingProvision(transport, args, options),
2845
- /**
2846
- * Run an organization's Data API subscription.
2847
- * POST /v1/organizations/{organization_id}/billing/subscription
2848
- * Requires a publishable key with the `management` scope.
2849
- * Acts as the user its session token was minted for, so the token must name one.
2850
- * @see {@link postOrganizationBillingSubscription}
2851
- */
2852
- postOrganizationBillingSubscription: (args, options) => postOrganizationBillingSubscription(transport, args, options)
2853
- },
2854
- invitations: {
2855
- /**
2856
- * Withdraw a pending invitation.
2857
- * DELETE /v1/organizations/{organization_id}/invitations/{invitation_id}
2858
- * Requires a publishable key with the `management` scope.
2859
- * Acts as the user its session token was minted for, so the token must name one.
2860
- * @see {@link deleteOrganizationInvitation}
2861
- */
2862
- deleteOrganizationInvitation: (args, options) => deleteOrganizationInvitation(transport, args, options),
2863
- /**
2864
- * Retrieve a pending invitation.
2865
- * GET /v1/organizations/{organization_id}/invitations/{invitation_id}
2866
- * Requires a publishable key with the `management` scope.
2867
- * @see {@link getOrganizationInvitation}
2868
- */
2869
- getOrganizationInvitation: (args, options) => getOrganizationInvitation(transport, args, options),
2870
- /**
2871
- * List an organization's pending invitations.
2872
- * GET /v1/organizations/{organization_id}/invitations
2873
- * Requires a publishable key with the `management` scope.
2874
- * @see {@link getOrganizationInvitations}
2875
- */
2876
- getOrganizationInvitations: (args, options) => getOrganizationInvitations(transport, args, options),
2877
- /**
2878
- * Invite somebody to an organization by email.
2879
- * POST /v1/organizations/{organization_id}/invitations
2880
- * Requires a publishable key with the `management` scope.
2881
- * Acts as the user its session token was minted for, so the token must name one.
2882
- * @see {@link postOrganizationInvitation}
2883
- */
2884
- postOrganizationInvitation: (args, options) => postOrganizationInvitation(transport, args, options)
2885
- },
2886
- keys: {
2887
- /**
2888
- * Revoke a publishable key.
2889
- * DELETE /v1/organizations/{organization_id}/publishable-keys/{key_id}
2890
- * Requires a publishable key with the `management` scope.
2891
- * Acts as the user its session token was minted for, so the token must name one.
2892
- * @see {@link deleteOrganizationPublishableKey}
2893
- */
2894
- deleteOrganizationPublishableKey: (args, options) => deleteOrganizationPublishableKey(transport, args, options),
2895
- /**
2896
- * Retrieve a publishable key.
2897
- * GET /v1/organizations/{organization_id}/publishable-keys/{key_id}
2898
- * Requires a publishable key with the `management` scope.
2899
- * @see {@link getOrganizationPublishableKey}
2900
- */
2901
- getOrganizationPublishableKey: (args, options) => getOrganizationPublishableKey(transport, args, options),
2902
- /**
2903
- * List an organization's publishable keys.
2904
- * GET /v1/organizations/{organization_id}/publishable-keys
2905
- * Requires a publishable key with the `management` scope.
2906
- * @see {@link getOrganizationPublishableKeys}
2907
- */
2908
- getOrganizationPublishableKeys: (args, options) => getOrganizationPublishableKeys(transport, args, options),
2909
- /**
2910
- * Update a publishable key's name or scopes.
2911
- * PATCH /v1/organizations/{organization_id}/publishable-keys/{key_id}
2912
- * Requires a publishable key with the `management` scope.
2913
- * Acts as the user its session token was minted for, so the token must name one.
2914
- * @see {@link patchOrganizationPublishableKey}
2915
- */
2916
- patchOrganizationPublishableKey: (args, options) => patchOrganizationPublishableKey(transport, args, options),
2917
- /**
2918
- * Create a publishable key.
2919
- * POST /v1/organizations/{organization_id}/publishable-keys
2920
- * Requires a publishable key with the `management` scope.
2921
- * Acts as the user its session token was minted for, so the token must name one.
2922
- * @see {@link postOrganizationPublishableKey}
2923
- */
2924
- postOrganizationPublishableKey: (args, options) => postOrganizationPublishableKey(transport, args, options)
2925
- },
2926
- members: {
2927
- /**
2928
- * Remove a member from an organization, or leave it.
2929
- * DELETE /v1/organizations/{organization_id}/members/{user_id}
2930
- * Requires a publishable key with the `management` scope.
2931
- * Acts as the user its session token was minted for, so the token must name one.
2932
- * @see {@link deleteOrganizationMember}
2933
- */
2934
- deleteOrganizationMember: (args, options) => deleteOrganizationMember(transport, args, options),
2935
- /**
2936
- * List an organization's members.
2937
- * GET /v1/organizations/{organization_id}/members
2938
- * Requires a publishable key with the `management` scope.
2939
- * @see {@link getOrganizationMembers}
2940
- */
2941
- getOrganizationMembers: (args, options) => getOrganizationMembers(transport, args, options),
2942
- /**
2943
- * Change a member's role.
2944
- * PATCH /v1/organizations/{organization_id}/members/{user_id}
2945
- * Requires a publishable key with the `management` scope.
2946
- * Acts as the user its session token was minted for, so the token must name one.
2947
- * @see {@link patchOrganizationMember}
2948
- */
2949
- patchOrganizationMember: (args, options) => patchOrganizationMember(transport, args, options)
2950
- },
2951
- organizations: {
2952
- /**
2953
- * Delete an organization's AI provider configuration.
2954
- * DELETE /v1/organizations/{organization_id}/ai-provider-config
2955
- * Requires a publishable key with the `management` scope.
2956
- * Acts as the user its session token was minted for, so the token must name one.
2957
- * @see {@link deleteOrganizationAiProviderConfig}
2958
- */
2959
- deleteOrganizationAiProviderConfig: (args, options) => deleteOrganizationAiProviderConfig(transport, args, options),
2960
- /**
2961
- * List the AI provider catalog.
2962
- * GET /v1/ai-providers
2963
- * Requires a publishable key with the `management` scope.
2964
- * @see {@link getAiProviders}
2965
- */
2966
- getAiProviders: (options) => getAiProviders(transport, options),
2967
- /**
2968
- * Retrieve an organization.
2969
- * GET /v1/organizations/{organization_id}
2970
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
2971
- * @see {@link getOrganization}
2972
- */
2973
- getOrganization: (args, options) => getOrganization(transport, args, options),
2974
- /**
2975
- * Retrieve an organization's AI provider configuration.
2976
- * GET /v1/organizations/{organization_id}/ai-provider-config
2977
- * Requires a publishable key with the `management` scope.
2978
- * @see {@link getOrganizationAiProviderConfig}
2979
- */
2980
- getOrganizationAiProviderConfig: (args, options) => getOrganizationAiProviderConfig(transport, args, options),
2981
- /**
2982
- * Retrieve an organization's Map Publishing settings.
2983
- * GET /v1/organizations/{organization_id}/settings
2984
- * Requires a publishable key with the `management` scope.
2985
- * @see {@link getOrganizationSettings}
2986
- */
2987
- getOrganizationSettings: (args, options) => getOrganizationSettings(transport, args, options),
2988
- /**
2989
- * Retrieve an organization's data usage.
2990
- * GET /v1/organizations/{organization_id}/usage/data
2991
- * Requires a publishable key with the `management` scope.
2992
- * @see {@link getOrganizationUsageData}
2993
- */
2994
- getOrganizationUsageData: (args, options) => getOrganizationUsageData(transport, args, options),
2995
- /**
2996
- * Retrieve an organization's Tile API usage.
2997
- * GET /v1/organizations/{organization_id}/usage/tiles
2998
- * Requires a publishable key with the `management` scope.
2999
- * @see {@link getOrganizationUsageTiles}
3000
- */
3001
- getOrganizationUsageTiles: (args, options) => getOrganizationUsageTiles(transport, args, options),
3002
- /**
3003
- * Update an organization.
3004
- * PATCH /v1/organizations/{organization_id}
3005
- * Requires a publishable key with the `management` scope.
3006
- * Acts as the user its session token was minted for, so the token must name one.
3007
- * @see {@link patchOrganization}
3008
- */
3009
- patchOrganization: (args, options) => patchOrganization(transport, args, options),
3010
- /**
3011
- * Update an organization's AI provider configuration.
3012
- * PATCH /v1/organizations/{organization_id}/ai-provider-config
3013
- * Requires a publishable key with the `management` scope.
3014
- * Acts as the user its session token was minted for, so the token must name one.
3015
- * @see {@link patchOrganizationAiProviderConfig}
3016
- */
3017
- patchOrganizationAiProviderConfig: (args, options) => patchOrganizationAiProviderConfig(transport, args, options),
3018
- /**
3019
- * Update an organization's Map Publishing settings.
3020
- * PATCH /v1/organizations/{organization_id}/settings
3021
- * Requires a publishable key with the `management` scope.
3022
- * Acts as the user its session token was minted for, so the token must name one.
3023
- * @see {@link patchOrganizationSettings}
3024
- */
3025
- patchOrganizationSettings: (args, options) => patchOrganizationSettings(transport, args, options),
3026
- /**
3027
- * Create an organization.
3028
- * POST /v1/organizations
3029
- * Requires a publishable key with the `management` scope.
3030
- * Acts as the user its session token was minted for, so the token must name one.
3031
- * @see {@link postOrganization}
3032
- */
3033
- postOrganization: (args, options) => postOrganization(transport, args, options),
3034
- /**
3035
- * Configure an organization's AI provider.
3036
- * POST /v1/organizations/{organization_id}/ai-provider-config
3037
- * Requires a publishable key with the `management` scope.
3038
- * Acts as the user its session token was minted for, so the token must name one.
3039
- * @see {@link postOrganizationAiProviderConfig}
3040
- */
3041
- postOrganizationAiProviderConfig: (args, options) => postOrganizationAiProviderConfig(transport, args, options)
3042
- },
3043
- sessions: {
3044
- /**
3045
- * Create a session token using a secret key.
3046
- * POST /v1/sessions
3047
- * Requires a secret key, and takes no other credential.
3048
- * @see {@link postSession}
3049
- */
3050
- postSession: (args, options) => postSession(transport, args, options)
3051
- },
3052
- users: {
3053
- /**
3054
- * Decline an invitation.
3055
- * DELETE /v1/me/invitations/{invitation_id}
3056
- * Requires a publishable key with the `studio-embedded` scope.
3057
- * Acts as the user its session token was minted for, so the token must name one.
3058
- * @see {@link deleteMyInvitation}
3059
- */
3060
- deleteMyInvitation: (args, options) => deleteMyInvitation(transport, args, options),
3061
- /**
3062
- * List the invitations waiting for the acting user.
3063
- * GET /v1/me/invitations
3064
- * Requires a publishable key with the `studio-embedded` scope.
3065
- * Acts as the user its session token was minted for, so the token must name one.
3066
- * @see {@link getMyInvitations}
3067
- */
3068
- getMyInvitations: (args, options) => getMyInvitations(transport, args, options),
3069
- /**
3070
- * Retrieve the acting user's notification emails for an organization.
3071
- * GET /v1/me/organizations/{organization_id}/notification-preferences
3072
- * Requires a publishable key with the `studio-embedded` scope.
3073
- * Acts as the user its session token was minted for, so the token must name one.
3074
- * @see {@link getMyOrganizationNotificationPreferences}
3075
- */
3076
- getMyOrganizationNotificationPreferences: (args, options) => getMyOrganizationNotificationPreferences(transport, args, options),
3077
- /**
3078
- * List the acting user's memberships.
3079
- * GET /v1/me/organizations
3080
- * Requires a publishable key with the `studio-embedded` scope.
3081
- * Acts as the user its session token was minted for, so the token must name one.
3082
- * @see {@link getMyOrganizations}
3083
- */
3084
- getMyOrganizations: (args, options) => getMyOrganizations(transport, args, options),
3085
- /**
3086
- * Retrieve the acting user's display preferences.
3087
- * GET /v1/me/preferences
3088
- * Requires a publishable key with the `studio-embedded` scope.
3089
- * Acts as the user its session token was minted for, so the token must name one.
3090
- * @see {@link getMyPreferences}
3091
- */
3092
- getMyPreferences: (options) => getMyPreferences(transport, options),
3093
- /**
3094
- * Turn the acting user's notification emails for an organization on or off.
3095
- * PATCH /v1/me/organizations/{organization_id}/notification-preferences
3096
- * Requires a publishable key with the `studio-embedded` scope.
3097
- * Acts as the user its session token was minted for, so the token must name one.
3098
- * @see {@link patchMyOrganizationNotificationPreferences}
3099
- */
3100
- patchMyOrganizationNotificationPreferences: (args, options) => patchMyOrganizationNotificationPreferences(transport, args, options),
3101
- /**
3102
- * Update the acting user's display preferences.
3103
- * PATCH /v1/me/preferences
3104
- * Requires a publishable key with the `studio-embedded` scope.
3105
- * Acts as the user its session token was minted for, so the token must name one.
3106
- * @see {@link patchMyPreferences}
3107
- */
3108
- patchMyPreferences: (args, options) => patchMyPreferences(transport, args, options),
3109
- /**
3110
- * Accept an invitation.
3111
- * POST /v1/me/invitations/{invitation_id}/accept
3112
- * Requires a publishable key with the `studio-embedded` scope.
3113
- * Acts as the user its session token was minted for, so the token must name one.
3114
- * @see {@link postMyInvitationAccept}
3115
- */
3116
- postMyInvitationAccept: (args, options) => postMyInvitationAccept(transport, args, options)
3117
- },
3118
- webhooks: {
3119
- /**
3120
- * Delete a webhook endpoint.
3121
- * DELETE /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
3122
- * Requires a publishable key with the `management` scope.
3123
- * Acts as the user its session token was minted for, so the token must name one.
3124
- * @see {@link deleteOrganizationWebhookEndpoint}
3125
- */
3126
- deleteOrganizationWebhookEndpoint: (args, options) => deleteOrganizationWebhookEndpoint(transport, args, options),
3127
- /**
3128
- * List an organization's webhook deliveries.
3129
- * GET /v1/organizations/{organization_id}/webhook-deliveries
3130
- * Requires a publishable key with the `management` scope.
3131
- * @see {@link getOrganizationWebhookDeliveries}
3132
- */
3133
- getOrganizationWebhookDeliveries: (args, options) => getOrganizationWebhookDeliveries(transport, args, options),
3134
- /**
3135
- * Retrieve a webhook delivery with its attempts.
3136
- * GET /v1/organizations/{organization_id}/webhook-deliveries/{delivery_id}
3137
- * Requires a publishable key with the `management` scope.
3138
- * @see {@link getOrganizationWebhookDelivery}
3139
- */
3140
- getOrganizationWebhookDelivery: (args, options) => getOrganizationWebhookDelivery(transport, args, options),
3141
- /**
3142
- * Retrieve a webhook endpoint.
3143
- * GET /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
3144
- * Requires a publishable key with the `management` scope.
3145
- * @see {@link getOrganizationWebhookEndpoint}
3146
- */
3147
- getOrganizationWebhookEndpoint: (args, options) => getOrganizationWebhookEndpoint(transport, args, options),
3148
- /**
3149
- * List an organization's webhook endpoints.
3150
- * GET /v1/organizations/{organization_id}/webhook-endpoints
3151
- * Requires a publishable key with the `management` scope.
3152
- * @see {@link getOrganizationWebhookEndpoints}
3153
- */
3154
- getOrganizationWebhookEndpoints: (args, options) => getOrganizationWebhookEndpoints(transport, args, options),
3155
- /**
3156
- * Retrieve a webhook event with its deliveries.
3157
- * GET /v1/organizations/{organization_id}/webhook-events/{event_id}
3158
- * Requires a publishable key with the `management` scope.
3159
- * @see {@link getOrganizationWebhookEvent}
3160
- */
3161
- getOrganizationWebhookEvent: (args, options) => getOrganizationWebhookEvent(transport, args, options),
3162
- /**
3163
- * List an organization's webhook events.
3164
- * GET /v1/organizations/{organization_id}/webhook-events
3165
- * Requires a publishable key with the `management` scope.
3166
- * @see {@link getOrganizationWebhookEvents}
3167
- */
3168
- getOrganizationWebhookEvents: (args, options) => getOrganizationWebhookEvents(transport, args, options),
3169
- /**
3170
- * Retrieve the reliability of an organization's webhooks.
3171
- * GET /v1/organizations/{organization_id}/webhook-health
3172
- * Requires a publishable key with the `management` scope.
3173
- * @see {@link getOrganizationWebhookHealth}
3174
- */
3175
- getOrganizationWebhookHealth: (args, options) => getOrganizationWebhookHealth(transport, args, options),
3176
- /**
3177
- * List the public webhook event types.
3178
- * GET /v1/webhook-event-types
3179
- * Requires a publishable key with the `management` scope.
3180
- * @see {@link getWebhookEventTypes}
3181
- */
3182
- getWebhookEventTypes: (options) => getWebhookEventTypes(transport, options),
3183
- /**
3184
- * Update a webhook endpoint.
3185
- * PATCH /v1/organizations/{organization_id}/webhook-endpoints/{webhook_endpoint_id}
3186
- * Requires a publishable key with the `management` scope.
3187
- * Acts as the user its session token was minted for, so the token must name one.
3188
- * @see {@link patchOrganizationWebhookEndpoint}
3189
- */
3190
- patchOrganizationWebhookEndpoint: (args, options) => patchOrganizationWebhookEndpoint(transport, args, options),
3191
- /**
3192
- * Resend an event, send a test event, or redeliver an endpoint's events.
3193
- * POST /v1/organizations/{organization_id}/webhook-deliveries
3194
- * Requires a publishable key with the `management` scope.
3195
- * Acts as the user its session token was minted for, so the token must name one.
3196
- * @see {@link postOrganizationWebhookDelivery}
3197
- */
3198
- postOrganizationWebhookDelivery: (args, options) => postOrganizationWebhookDelivery(transport, args, options),
3199
- /**
3200
- * Create a webhook endpoint.
3201
- * POST /v1/organizations/{organization_id}/webhook-endpoints
3202
- * Requires a publishable key with the `management` scope.
3203
- * Acts as the user its session token was minted for, so the token must name one.
3204
- * @see {@link postOrganizationWebhookEndpoint}
3205
- */
3206
- postOrganizationWebhookEndpoint: (args, options) => postOrganizationWebhookEndpoint(transport, args, options)
3207
- }
3208
- },
3209
- agent: {
3210
- runs: {
3211
- /**
3212
- * Stream an agent run's events over Server-Sent Events.
3213
- * GET /v1/agent/runs/{run_id}/events
3214
- * Requires a publishable key with the `studio-embedded` scope.
3215
- * Acts as the user its session token was minted for, so the token must name one.
3216
- * @see {@link getAgentRunEvents}
3217
- */
3218
- getAgentRunEvents: (args, options) => getAgentRunEvents(transport, args, options),
3219
- /**
3220
- * Start a new agent run.
3221
- * POST /v1/agent/runs
3222
- * Requires a publishable key with the `studio-embedded` scope.
3223
- * Acts as the user its session token was minted for, so the token must name one.
3224
- * @see {@link postAgentRun}
3225
- */
3226
- postAgentRun: (args, options) => postAgentRun(transport, args, options),
3227
- /**
3228
- * Record the user's rating of one assistant message in a run.
3229
- * POST /v1/agent/runs/{run_id}/feedback
3230
- * Requires a publishable key with the `studio-embedded` scope.
3231
- * Acts as the user its session token was minted for, so the token must name one.
3232
- * @see {@link postAgentRunFeedback}
3233
- */
3234
- postAgentRunFeedback: (args, options) => postAgentRunFeedback(transport, args, options),
3235
- /**
3236
- * Send an input signal into a running agent run.
3237
- * POST /v1/agent/runs/{run_id}/input
3238
- * Requires a publishable key with the `studio-embedded` scope.
3239
- * Acts as the user its session token was minted for, so the token must name one.
3240
- * @see {@link postAgentRunInput}
3241
- */
3242
- postAgentRunInput: (args, options) => postAgentRunInput(transport, args, options)
3243
- }
3244
- },
3245
- studio: {
3246
- activities: {
3247
- /**
3248
- * List all activity categories and their activities.
3249
- * GET /v1/activities
3250
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3251
- * @see {@link getActivities}
3252
- */
3253
- getActivities: (options) => getActivities(transport, options)
3254
- },
3255
- collab: {
3256
- /**
3257
- * Stream one itinerary's collaboration session over SSE.
3258
- * GET /v1/itineraries/{itinerary_id}/events
3259
- * Requires a publishable key with the `studio-embedded` scope.
3260
- * Acts as the user its session token was minted for, so the token must name one.
3261
- * @see {@link getItineraryEvents}
3262
- */
3263
- getItineraryEvents: (args, options) => getItineraryEvents(transport, args, options),
3264
- /**
3265
- * Stream an organization's list events over SSE.
3266
- * GET /v1/organizations/{organization_id}/events
3267
- * Requires a publishable key with the `studio-embedded` scope.
3268
- * Acts as the user its session token was minted for, so the token must name one.
3269
- * @see {@link getOrganizationEvents}
3270
- */
3271
- getOrganizationEvents: (args, options) => getOrganizationEvents(transport, args, options),
3272
- /**
3273
- * Stream one zone's collaboration session over SSE.
3274
- * GET /v1/zones/{zone_id}/events
3275
- * Requires a publishable key with the `studio-embedded` scope.
3276
- * Acts as the user its session token was minted for, so the token must name one.
3277
- * @see {@link getZoneEvents}
3278
- */
3279
- getZoneEvents: (args, options) => getZoneEvents(transport, args, options),
3280
- /**
3281
- * Send a collaboration signal into an itinerary's session.
3282
- * POST /v1/itineraries/{itinerary_id}/collab
3283
- * Requires a publishable key with the `studio-embedded` scope.
3284
- * Acts as the user its session token was minted for, so the token must name one.
3285
- * @see {@link postItineraryCollab}
3286
- */
3287
- postItineraryCollab: (args, options) => postItineraryCollab(transport, args, options),
3288
- /**
3289
- * Send a collaboration signal into a zone's session.
3290
- * POST /v1/zones/{zone_id}/collab
3291
- * Requires a publishable key with the `studio-embedded` scope.
3292
- * Acts as the user its session token was minted for, so the token must name one.
3293
- * @see {@link postZoneCollab}
3294
- */
3295
- postZoneCollab: (args, options) => postZoneCollab(transport, args, options)
3296
- },
3297
- collections: {
3298
- /**
3299
- * Delete a collection.
3300
- * DELETE /v1/collections/{collection_id}
3301
- * Requires a publishable key with the `studio-embedded` scope.
3302
- * Acts as the user its session token was minted for, so the token must name one.
3303
- * @see {@link deleteCollection}
3304
- */
3305
- deleteCollection: (args, options) => deleteCollection(transport, args, options),
3306
- /**
3307
- * Remove an itinerary from a collection.
3308
- * DELETE /v1/collections/{collection_id}/itineraries/{itinerary_id}
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
- * @see {@link deleteCollectionItinerary}
3312
- */
3313
- deleteCollectionItinerary: (args, options) => deleteCollectionItinerary(transport, args, options),
3314
- /**
3315
- * Remove the collection's share link.
3316
- * DELETE /v1/collections/{collection_id}/share-link
3317
- * Requires a publishable key with the `studio-embedded` scope.
3318
- * Acts as the user its session token was minted for, so the token must name one.
3319
- * @see {@link deleteCollectionShareLink}
3320
- */
3321
- deleteCollectionShareLink: (args, options) => deleteCollectionShareLink(transport, args, options),
3322
- /**
3323
- * Remove a zone from a collection.
3324
- * DELETE /v1/collections/{collection_id}/zones/{zone_id}
3325
- * Requires a publishable key with the `studio-embedded` scope.
3326
- * Acts as the user its session token was minted for, so the token must name one.
3327
- * @see {@link deleteCollectionZone}
3328
- */
3329
- deleteCollectionZone: (args, options) => deleteCollectionZone(transport, args, options),
3330
- /**
3331
- * Retrieve a single collection with its itineraries and zones.
3332
- * GET /v1/collections/{collection_id}
3333
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3334
- * @see {@link getCollection}
3335
- */
3336
- getCollection: (args, options) => getCollection(transport, args, options),
3337
- /**
3338
- * List the itineraries a collection contains.
3339
- * GET /v1/collections/{collection_id}/itineraries
3340
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3341
- * @see {@link getCollectionItineraries}
3342
- */
3343
- getCollectionItineraries: (args, options) => getCollectionItineraries(transport, args, options),
3344
- /**
3345
- * List collections.
3346
- * GET /v1/collections
3347
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3348
- * @see {@link getCollections}
3349
- */
3350
- getCollections: (args, options) => getCollections(transport, args, options),
3351
- /**
3352
- * Read the collection's share link.
3353
- * GET /v1/collections/{collection_id}/share-link
3354
- * Requires a publishable key with the `studio-embedded` scope.
3355
- * Acts as the user its session token was minted for, so the token must name one.
3356
- * @see {@link getCollectionShareLink}
3357
- */
3358
- getCollectionShareLink: (args, options) => getCollectionShareLink(transport, args, options),
3359
- /**
3360
- * List the zones a collection contains.
3361
- * GET /v1/collections/{collection_id}/zones
3362
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3363
- * @see {@link getCollectionZones}
3364
- */
3365
- getCollectionZones: (args, options) => getCollectionZones(transport, args, options),
3366
- /**
3367
- * Update an existing collection.
3368
- * PATCH /v1/collections/{collection_id}
3369
- * Requires a publishable key with the `studio-embedded` scope.
3370
- * Acts as the user its session token was minted for, so the token must name one.
3371
- * @see {@link patchCollection}
3372
- */
3373
- patchCollection: (args, options) => patchCollection(transport, args, options),
3374
- /**
3375
- * Set an itinerary's position within a collection.
3376
- * PATCH /v1/collections/{collection_id}/itineraries/{itinerary_id}
3377
- * Requires a publishable key with the `studio-embedded` scope.
3378
- * Acts as the user its session token was minted for, so the token must name one.
3379
- * @see {@link patchCollectionItinerary}
3380
- */
3381
- patchCollectionItinerary: (args, options) => patchCollectionItinerary(transport, args, options),
3382
- /**
3383
- * Create a new collection.
3384
- * POST /v1/collections
3385
- * Requires a publishable key with the `studio-embedded` scope.
3386
- * Acts as the user its session token was minted for, so the token must name one.
3387
- * @see {@link postCollection}
3388
- */
3389
- postCollection: (args, options) => postCollection(transport, args, options),
3390
- /**
3391
- * Add itineraries to a collection.
3392
- * POST /v1/collections/{collection_id}/itineraries
3393
- * Requires a publishable key with the `studio-embedded` scope.
3394
- * Acts as the user its session token was minted for, so the token must name one.
3395
- * @see {@link postCollectionItineraries}
3396
- */
3397
- postCollectionItineraries: (args, options) => postCollectionItineraries(transport, args, options),
3398
- /**
3399
- * Mint the collection's share link, or return the one it has.
3400
- * POST /v1/collections/{collection_id}/share-link
3401
- * Requires a publishable key with the `studio-embedded` scope.
3402
- * Acts as the user its session token was minted for, so the token must name one.
3403
- * @see {@link postCollectionShareLink}
3404
- */
3405
- postCollectionShareLink: (args, options) => postCollectionShareLink(transport, args, options),
3406
- /**
3407
- * Rotate the collection's share link.
3408
- * POST /v1/collections/{collection_id}/share-link/rotate
3409
- * Requires a publishable key with the `studio-embedded` scope.
3410
- * Acts as the user its session token was minted for, so the token must name one.
3411
- * @see {@link postCollectionShareLinkRotate}
3412
- */
3413
- postCollectionShareLinkRotate: (args, options) => postCollectionShareLinkRotate(transport, args, options),
3414
- /**
3415
- * Add zones to a collection.
3416
- * POST /v1/collections/{collection_id}/zones
3417
- * Requires a publishable key with the `studio-embedded` scope.
3418
- * Acts as the user its session token was minted for, so the token must name one.
3419
- * @see {@link postCollectionZones}
3420
- */
3421
- postCollectionZones: (args, options) => postCollectionZones(transport, args, options)
3422
- },
3423
- itineraries: {
3424
- /**
3425
- * Delete an itinerary.
3426
- * DELETE /v1/itineraries/{itinerary_id}
3427
- * Requires a publishable key with the `studio-embedded` scope.
3428
- * Acts as the user its session token was minted for, so the token must name one.
3429
- * @see {@link deleteItinerary}
3430
- */
3431
- deleteItinerary: (args, options) => deleteItinerary(transport, args, options),
3432
- /**
3433
- * Take the itinerary's publication down.
3434
- * DELETE /v1/itineraries/{itinerary_id}/publication
3435
- * Requires a publishable key with the `studio-embedded` scope.
3436
- * Acts as the user its session token was minted for, so the token must name one.
3437
- * @see {@link deleteItineraryPublication}
3438
- */
3439
- deleteItineraryPublication: (args, options) => deleteItineraryPublication(transport, args, options),
3440
- /**
3441
- * Delete a segment from an itinerary.
3442
- * DELETE /v1/itineraries/{itinerary_id}/segments/{segment_id}
3443
- * Requires a publishable key with the `studio-embedded` scope.
3444
- * Acts as the user its session token was minted for, so the token must name one.
3445
- * @see {@link deleteItinerarySegment}
3446
- */
3447
- deleteItinerarySegment: (args, options) => deleteItinerarySegment(transport, args, options),
3448
- /**
3449
- * Delete a segment group.
3450
- * DELETE /v1/itineraries/{itinerary_id}/segment-groups/{group_id}
3451
- * Requires a publishable key with the `studio-embedded` scope.
3452
- * Acts as the user its session token was minted for, so the token must name one.
3453
- * @see {@link deleteItinerarySegmentGroup}
3454
- */
3455
- deleteItinerarySegmentGroup: (args, options) => deleteItinerarySegmentGroup(transport, args, options),
3456
- /**
3457
- * Remove the itinerary's share link.
3458
- * DELETE /v1/itineraries/{itinerary_id}/share-link
3459
- * Requires a publishable key with the `studio-embedded` scope.
3460
- * Acts as the user its session token was minted for, so the token must name one.
3461
- * @see {@link deleteItineraryShareLink}
3462
- */
3463
- deleteItineraryShareLink: (args, options) => deleteItineraryShareLink(transport, args, options),
3464
- /**
3465
- * Delete a waypoint from an itinerary.
3466
- * DELETE /v1/itineraries/{itinerary_id}/waypoints/{waypoint_id}
3467
- * Requires a publishable key with the `studio-embedded` scope.
3468
- * Acts as the user its session token was minted for, so the token must name one.
3469
- * @see {@link deleteItineraryWaypoint}
3470
- */
3471
- deleteItineraryWaypoint: (args, options) => deleteItineraryWaypoint(transport, args, options),
3472
- /**
3473
- * List the itineraries the credential reaches.
3474
- * GET /v1/itineraries
3475
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3476
- * @see {@link getItineraries}
3477
- */
3478
- getItineraries: (args, options) => getItineraries(transport, args, options),
3479
- /**
3480
- * Retrieve a single itinerary with its segments and waypoints.
3481
- * GET /v1/itineraries/{itinerary_id}
3482
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3483
- * @see {@link getItinerary}
3484
- */
3485
- getItinerary: (args, options) => getItinerary(transport, args, options),
3486
- /**
3487
- * Export an itinerary as a downloadable file.
3488
- * GET /v1/itineraries/{itinerary_id}/export
3489
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3490
- * @see {@link getItineraryExport}
3491
- */
3492
- getItineraryExport: (args, options) => getItineraryExport(transport, args, options),
3493
- /**
3494
- * Re-time an itinerary at a travel pace the caller names.
3495
- * GET /v1/itineraries/{itinerary_id}/pace
3496
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3497
- * @see {@link getItineraryPace}
3498
- */
3499
- getItineraryPace: (args, options) => getItineraryPace(transport, args, options),
3500
- /**
3501
- * Read the itinerary's share link.
3502
- * GET /v1/itineraries/{itinerary_id}/share-link
3503
- * Requires a publishable key with the `studio-embedded` scope.
3504
- * Acts as the user its session token was minted for, so the token must name one.
3505
- * @see {@link getItineraryShareLink}
3506
- */
3507
- getItineraryShareLink: (args, options) => getItineraryShareLink(transport, args, options),
3508
- /**
3509
- * Update an existing itinerary.
3510
- * PATCH /v1/itineraries/{itinerary_id}
3511
- * Requires a publishable key with the `studio-embedded` scope.
3512
- * Acts as the user its session token was minted for, so the token must name one.
3513
- * @see {@link patchItinerary}
3514
- */
3515
- patchItinerary: (args, options) => patchItinerary(transport, args, options),
3516
- /**
3517
- * Update an existing segment.
3518
- * PATCH /v1/itineraries/{itinerary_id}/segments/{segment_id}
3519
- * Requires a publishable key with the `studio-embedded` scope.
3520
- * Acts as the user its session token was minted for, so the token must name one.
3521
- * @see {@link patchItinerarySegment}
3522
- */
3523
- patchItinerarySegment: (args, options) => patchItinerarySegment(transport, args, options),
3524
- /**
3525
- * Update a segment group.
3526
- * PATCH /v1/itineraries/{itinerary_id}/segment-groups/{group_id}
3527
- * Requires a publishable key with the `studio-embedded` scope.
3528
- * Acts as the user its session token was minted for, so the token must name one.
3529
- * @see {@link patchItinerarySegmentGroup}
3530
- */
3531
- patchItinerarySegmentGroup: (args, options) => patchItinerarySegmentGroup(transport, args, options),
3532
- /**
3533
- * Update an existing waypoint.
3534
- * PATCH /v1/itineraries/{itinerary_id}/waypoints/{waypoint_id}
3535
- * Requires a publishable key with the `studio-embedded` scope.
3536
- * Acts as the user its session token was minted for, so the token must name one.
3537
- * @see {@link patchItineraryWaypoint}
3538
- */
3539
- patchItineraryWaypoint: (args, options) => patchItineraryWaypoint(transport, args, options),
3540
- /**
3541
- * Create a new itinerary.
3542
- * POST /v1/itineraries
3543
- * Requires a publishable key with the `studio-embedded` scope.
3544
- * Acts as the user its session token was minted for, so the token must name one.
3545
- * @see {@link postItinerary}
3546
- */
3547
- postItinerary: (args, options) => postItinerary(transport, args, options),
3548
- /**
3549
- * Duplicate an itinerary into the key's organization.
3550
- * POST /v1/itineraries/{itinerary_id}/duplicate
3551
- * Requires a publishable key with the `studio-embedded` scope.
3552
- * Acts as the user its session token was minted for, so the token must name one.
3553
- * @see {@link postItineraryDuplicate}
3554
- */
3555
- postItineraryDuplicate: (args, options) => postItineraryDuplicate(transport, args, options),
3556
- /**
3557
- * Confirm an itinerary import, persisting the reviewed draft.
3558
- * POST /v1/itineraries/import
3559
- * Requires a publishable key with the `studio-embedded` scope.
3560
- * Acts as the user its session token was minted for, so the token must name one.
3561
- * @see {@link postItineraryImport}
3562
- */
3563
- postItineraryImport: (args, options) => postItineraryImport(transport, args, options),
3564
- /**
3565
- * Preview an itinerary import without persisting it.
3566
- * POST /v1/itineraries/preview
3567
- * Requires a publishable key with the `studio-embedded` scope.
3568
- * Acts as the user its session token was minted for, so the token must name one.
3569
- * @see {@link postItineraryPreview}
3570
- */
3571
- postItineraryPreview: (args, options) => postItineraryPreview(transport, args, options),
3572
- /**
3573
- * Publish the itinerary's current draft.
3574
- * POST /v1/itineraries/{itinerary_id}/publication
3575
- * Requires a publishable key with the `studio-embedded` scope.
3576
- * Acts as the user its session token was minted for, so the token must name one.
3577
- * @see {@link postItineraryPublication}
3578
- */
3579
- postItineraryPublication: (args, options) => postItineraryPublication(transport, args, options),
3580
- /**
3581
- * Create a segment, at the end of the chain or before another.
3582
- * POST /v1/itineraries/{itinerary_id}/segments
3583
- * Requires a publishable key with the `studio-embedded` scope.
3584
- * Acts as the user its session token was minted for, so the token must name one.
3585
- * @see {@link postItinerarySegment}
3586
- */
3587
- postItinerarySegment: (args, options) => postItinerarySegment(transport, args, options),
3588
- /**
3589
- * Convert a segment between routed and freehand.
3590
- * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/convert
3591
- * Requires a publishable key with the `studio-embedded` scope.
3592
- * Acts as the user its session token was minted for, so the token must name one.
3593
- * @see {@link postItinerarySegmentConvert}
3594
- */
3595
- postItinerarySegmentConvert: (args, options) => postItinerarySegmentConvert(transport, args, options),
3596
- /**
3597
- * Group a contiguous run of an itinerary's segments.
3598
- * POST /v1/itineraries/{itinerary_id}/segment-groups
3599
- * Requires a publishable key with the `studio-embedded` scope.
3600
- * Acts as the user its session token was minted for, so the token must name one.
3601
- * @see {@link postItinerarySegmentGroup}
3602
- */
3603
- postItinerarySegmentGroup: (args, options) => postItinerarySegmentGroup(transport, args, options),
3604
- /**
3605
- * Merge a segment with the one that follows it.
3606
- * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/merge
3607
- * Requires a publishable key with the `studio-embedded` scope.
3608
- * Acts as the user its session token was minted for, so the token must name one.
3609
- * @see {@link postItinerarySegmentMerge}
3610
- */
3611
- postItinerarySegmentMerge: (args, options) => postItinerarySegmentMerge(transport, args, options),
3612
- /**
3613
- * Split a segment in two at a fraction of its length.
3614
- * POST /v1/itineraries/{itinerary_id}/segments/{segment_id}/split
3615
- * Requires a publishable key with the `studio-embedded` scope.
3616
- * Acts as the user its session token was minted for, so the token must name one.
3617
- * @see {@link postItinerarySegmentSplit}
3618
- */
3619
- postItinerarySegmentSplit: (args, options) => postItinerarySegmentSplit(transport, args, options),
3620
- /**
3621
- * Mint the itinerary's share link, or return the one it has.
3622
- * POST /v1/itineraries/{itinerary_id}/share-link
3623
- * Requires a publishable key with the `studio-embedded` scope.
3624
- * Acts as the user its session token was minted for, so the token must name one.
3625
- * @see {@link postItineraryShareLink}
3626
- */
3627
- postItineraryShareLink: (args, options) => postItineraryShareLink(transport, args, options),
3628
- /**
3629
- * Rotate the itinerary's share link.
3630
- * POST /v1/itineraries/{itinerary_id}/share-link/rotate
3631
- * Requires a publishable key with the `studio-embedded` scope.
3632
- * Acts as the user its session token was minted for, so the token must name one.
3633
- * @see {@link postItineraryShareLinkRotate}
3634
- */
3635
- postItineraryShareLinkRotate: (args, options) => postItineraryShareLinkRotate(transport, args, options),
3636
- /**
3637
- * Create a new waypoint within an itinerary.
3638
- * POST /v1/itineraries/{itinerary_id}/waypoints
3639
- * Requires a publishable key with the `studio-embedded` scope.
3640
- * Acts as the user its session token was minted for, so the token must name one.
3641
- * @see {@link postItineraryWaypoint}
3642
- */
3643
- postItineraryWaypoint: (args, options) => postItineraryWaypoint(transport, args, options)
3644
- },
3645
- layers: {
3646
- /**
3647
- * List terrains, overlays, and the zone layer.
3648
- * GET /v1/layers
3649
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3650
- * @see {@link getLayers}
3651
- */
3652
- getLayers: (args, options) => getLayers(transport, args, options)
3653
- },
3654
- organizations: {
3655
- /**
3656
- * Resolve the organization a publishable key belongs to.
3657
- * POST /v1/organizations/lookup
3658
- * Takes no credential.
3659
- * @see {@link postOrganizationLookup}
3660
- */
3661
- postOrganizationLookup: (args, options) => postOrganizationLookup(transport, args, options)
3662
- },
3663
- zones: {
3664
- /**
3665
- * Delete a zone.
3666
- * DELETE /v1/zones/{zone_id}
3667
- * Requires a publishable key with the `studio-embedded` scope.
3668
- * Acts as the user its session token was minted for, so the token must name one.
3669
- * @see {@link deleteZone}
3670
- */
3671
- deleteZone: (args, options) => deleteZone(transport, args, options),
3672
- /**
3673
- * Take the zone's publication down.
3674
- * DELETE /v1/zones/{zone_id}/publication
3675
- * Requires a publishable key with the `studio-embedded` scope.
3676
- * Acts as the user its session token was minted for, so the token must name one.
3677
- * @see {@link deleteZonePublication}
3678
- */
3679
- deleteZonePublication: (args, options) => deleteZonePublication(transport, args, options),
3680
- /**
3681
- * Retrieve a single zone with its geometry.
3682
- * GET /v1/zones/{zone_id}
3683
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3684
- * @see {@link getZone}
3685
- */
3686
- getZone: (args, options) => getZone(transport, args, options),
3687
- /**
3688
- * List zones.
3689
- * GET /v1/zones
3690
- * Requires a publishable key with the `publishing` scope, or the `studio-embedded` scope that includes it.
3691
- * @see {@link getZones}
3692
- */
3693
- getZones: (args, options) => getZones(transport, args, options),
3694
- /**
3695
- * Update an existing zone.
3696
- * PATCH /v1/zones/{zone_id}
3697
- * Requires a publishable key with the `studio-embedded` scope.
3698
- * Acts as the user its session token was minted for, so the token must name one.
3699
- * @see {@link patchZone}
3700
- */
3701
- patchZone: (args, options) => patchZone(transport, args, options),
3702
- /**
3703
- * Create a new zone.
3704
- * POST /v1/zones
3705
- * Requires a publishable key with the `studio-embedded` scope.
3706
- * Acts as the user its session token was minted for, so the token must name one.
3707
- * @see {@link postZone}
3708
- */
3709
- postZone: (args, options) => postZone(transport, args, options),
3710
- /**
3711
- * Publish the zone's current draft.
3712
- * POST /v1/zones/{zone_id}/publication
3713
- * Requires a publishable key with the `studio-embedded` scope.
3714
- * Acts as the user its session token was minted for, so the token must name one.
3715
- * @see {@link postZonePublication}
3716
- */
3717
- postZonePublication: (args, options) => postZonePublication(transport, args, options)
3718
- }
3719
- }
3720
- });
3721
-
3722
- // src/core/rules/nullMask.ts
3723
- var isHolding = (mask) => Array.isArray(mask) && mask.length === 2 && mask[0] === true;
3724
- var isVariants = (mask) => Array.isArray(mask) && mask.length === 2 && typeof mask[0] === "string";
3725
- var isListMask = (mask) => Array.isArray(mask) && mask.length === 1;
3726
- var isMembers = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3727
- var withAbsentNulls = (value, mask) => {
3728
- if (mask === void 0 || mask === true || isHolding(mask)) {
3729
- return value;
3730
- }
3731
- if (isListMask(mask)) {
3732
- if (!Array.isArray(value)) {
3733
- return value;
3734
- }
3735
- let copy2;
3736
- for (const [index, element] of value.entries()) {
3737
- const written = withAbsentNulls(element, mask[0]);
3738
- if (written !== element) {
3739
- copy2 ??= [...value];
3740
- copy2[index] = written;
3741
- }
3742
- }
3743
- return copy2 ?? value;
3744
- }
3745
- if (!isMembers(value)) {
3746
- return value;
3747
- }
3748
- if (isVariants(mask)) {
3749
- const [discriminator, variants] = mask;
3750
- const variant = value[discriminator];
3751
- return typeof variant === "string" && Object.hasOwn(variants, variant) ? withAbsentNulls(value, variants[variant]) : value;
3752
- }
3753
- let copy;
3754
- for (const [member, inner] of Object.entries(mask)) {
3755
- if (!Object.hasOwn(value, member)) {
3756
- if (inner === true || isHolding(inner)) {
3757
- copy ??= { ...value };
3758
- copy[member] = null;
3759
- }
3760
- continue;
3761
- }
3762
- const held = value[member];
3763
- const written = withAbsentNulls(held, isHolding(inner) ? inner[1] : inner);
3764
- if (written !== held) {
3765
- copy ??= { ...value };
3766
- copy[member] = written;
3767
- }
3768
- }
3769
- return copy ?? value;
3770
- };
3771
-
3772
- // src/core/rules/dates.ts
3773
- var isoDate = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|[+-](\d{2}):(\d{2}))$/;
3774
- var ISO_DATE_MIN_LENGTH = 20;
3775
- var ISO_DATE_SEPARATOR = 84;
3776
- var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
3777
- var isLeapYear = (year) => year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
3778
- var daysIn = (year, month) => month === 2 && isLeapYear(year) ? 29 : MONTH_DAYS[month - 1] ?? 0;
3779
- var instantOf = (value) => {
3780
- if (value.length < ISO_DATE_MIN_LENGTH || value.charCodeAt(10) !== ISO_DATE_SEPARATOR) {
3781
- return void 0;
3782
- }
3783
- const fields = isoDate.exec(value);
3784
- if (fields === null) {
3785
- return void 0;
3786
- }
3787
- const field = (index) => Number(fields[index] ?? 0);
3788
- const year = field(1);
3789
- const month = field(2);
3790
- const day = field(3);
3791
- const named = month >= 1 && month <= 12 && day >= 1 && day <= daysIn(year, month) && field(4) <= 23 && field(5) <= 59 && field(6) <= 59 && field(7) <= 23 && field(8) <= 59;
3792
- if (!named) {
3793
- return void 0;
3794
- }
3795
- const instant = new Date(value);
3796
- return Number.isNaN(instant.getTime()) ? void 0 : instant;
3797
- };
3798
- var isListMask2 = (mask) => Array.isArray(mask);
3799
- var isList = (value) => Array.isArray(value);
3800
- var decodeDates = (value, mask, field = "the answer") => {
3801
- if (mask === void 0) {
3802
- return value;
3803
- }
3804
- if (mask === true) {
3805
- if (typeof value !== "string") {
3806
- return value;
3807
- }
3808
- const instant = instantOf(value);
3809
- if (instant === void 0) {
3810
- throw new MountayaError(
3811
- `${field}, which the contract declares an instant, holds a string that names none: an instant is a full ISO 8601 timestamp carrying its zone.`
3812
- );
3813
- }
3814
- return instant;
3815
- }
3816
- if (isListMask2(mask)) {
3817
- if (isList(value)) {
3818
- const [element] = mask;
3819
- for (let index = 0; index < value.length; index += 1) {
3820
- value[index] = decodeDates(value[index], element, field);
3821
- }
3822
- }
3823
- return value;
3824
- }
3825
- if (typeof value === "object" && value !== null && !isList(value)) {
3826
- for (const [member, memberMask] of Object.entries(mask)) {
3827
- if (Object.hasOwn(value, member)) {
3828
- const current = Reflect.get(value, member);
3829
- const decoded = decodeDates(current, memberMask, member);
3830
- if (decoded !== current) {
3831
- Reflect.set(value, member, decoded);
3832
- }
3833
- }
3834
- }
3835
- }
3836
- return value;
3837
- };
3838
- var parseJsonWithDates = (text, mask) => text.length > 0 ? decodeDates(JSON.parse(text), mask) : void 0;
3839
-
3840
- export { CEILING_CODE, KEY_IN_USE_CODE, MountayaApiError, MountayaAuthenticationError, MountayaBadRequestError, MountayaBillingError, MountayaConfigurationError, MountayaConflictError, MountayaConnectionError, MountayaDataError, MountayaError, MountayaForbiddenError, MountayaIdempotencyKeyInUseError, MountayaIdempotentAnswerUnavailableError, MountayaMethodNotAllowedError, MountayaNotFoundError, MountayaPayloadTooLargeError, MountayaPreconditionFailedError, MountayaRateLimitError, MountayaServerError, PAYMENT_REQUIRED_CODE, __export, answerDetailsOf, bind, collabStreamEventDatesByType, decodeDates, deleteCollection, deleteCollectionItinerary, deleteCollectionShareLink, deleteCollectionZone, deleteItinerary, deleteItineraryPublication, deleteItinerarySegment, deleteItinerarySegmentGroup, deleteItineraryShareLink, deleteItineraryWaypoint, deleteMyInvitation, deleteOrganizationAiProviderConfig, deleteOrganizationBillingPaymentMethod, deleteOrganizationBillingSubscription, deleteOrganizationInvitation, deleteOrganizationMember, deleteOrganizationPublishableKey, deleteOrganizationWebhookEndpoint, deleteZone, deleteZonePublication, describeType, entriesOf, errorForStatus, errorFromBody, errorFromResponse, failureMessage, getActivities, getAgentRunEvents, getAiProviders, getBillingProducts, getCollection, getCollectionItineraries, getCollectionShareLink, getCollectionZones, getCollections, getItineraries, getItinerary, getItineraryEvents, getItineraryExport, getItineraryPace, getItineraryShareLink, getLayers, getMyInvitations, getMyOrganizationNotificationPreferences, getMyOrganizations, getMyPreferences, getOrganization, getOrganizationAiProviderConfig, getOrganizationBillingInfo, getOrganizationBillingInvoices, getOrganizationBillingPaymentMethods, getOrganizationBillingPromotionCode, getOrganizationBillingSubscription, getOrganizationEvents, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers, getOrganizationPublishableKey, getOrganizationPublishableKeys, getOrganizationSettings, getOrganizationUsageData, getOrganizationUsageTiles, getOrganizationWebhookDeliveries, getOrganizationWebhookDelivery, getOrganizationWebhookEndpoint, getOrganizationWebhookEndpoints, getOrganizationWebhookEvent, getOrganizationWebhookEvents, getOrganizationWebhookHealth, getWebhookEventTypes, getZone, getZoneEvents, getZones, instantOf, isMountayaApiError, isMountayaError, metadataOf, parseJsonWithDates, parseRateLimit, parseRetryAfter, patchCollection, patchCollectionItinerary, patchItinerary, patchItinerarySegment, patchItinerarySegmentGroup, patchItineraryWaypoint, patchMyOrganizationNotificationPreferences, patchMyPreferences, patchOrganization, patchOrganizationAiProviderConfig, patchOrganizationBillingInfo, patchOrganizationMember, patchOrganizationPublishableKey, patchOrganizationSettings, patchOrganizationWebhookEndpoint, patchZone, postAgentRun, postAgentRunFeedback, postAgentRunInput, postCollection, postCollectionItineraries, postCollectionShareLink, postCollectionShareLinkRotate, postCollectionZones, postItinerary, postItineraryCollab, postItineraryDuplicate, postItineraryImport, postItineraryPreview, postItineraryPublication, postItinerarySegment, postItinerarySegmentConvert, postItinerarySegmentGroup, postItinerarySegmentMerge, postItinerarySegmentSplit, postItineraryShareLink, postItineraryShareLinkRotate, postItineraryWaypoint, postMyInvitationAccept, postOrganization, postOrganizationAiProviderConfig, postOrganizationBillingPaymentMethod, postOrganizationBillingPaymentMethodSetDefault, postOrganizationBillingPaymentMethodSetup, postOrganizationBillingProvision, postOrganizationBillingSubscription, postOrganizationInvitation, postOrganizationLookup, postOrganizationPublishableKey, postOrganizationWebhookDelivery, postOrganizationWebhookEndpoint, postSession, postZone, postZoneCollab, postZonePublication, refuseOption, replayedOf, restSchemaDates, statesErrors, withAbsentNulls };
3841
- //# sourceMappingURL=chunk-TDTK2L5H.js.map
3842
- //# sourceMappingURL=chunk-TDTK2L5H.js.map