@avallon-labs/sdk 49.1.0 → 49.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.
- package/dist/index.d.ts +2616 -1845
- package/dist/index.js +1326 -624
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import useSwr24 from 'swr';
|
|
2
|
+
import useSWRMutation20 from 'swr/mutation';
|
|
3
3
|
|
|
4
4
|
// src/fetcher.ts
|
|
5
5
|
var config = {
|
|
@@ -99,13 +99,7 @@ var getGetAnalyticsTimeSeriesUrl = (params) => {
|
|
|
99
99
|
const normalizedParams = new URLSearchParams();
|
|
100
100
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
101
101
|
if (value !== void 0) {
|
|
102
|
-
|
|
103
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
104
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
105
|
-
}
|
|
106
|
-
} else {
|
|
107
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
108
|
-
}
|
|
102
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
109
103
|
}
|
|
110
104
|
});
|
|
111
105
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -126,7 +120,7 @@ var useGetAnalyticsTimeSeries = (params, options) => {
|
|
|
126
120
|
const isEnabled = swrOptions?.enabled !== false;
|
|
127
121
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetAnalyticsTimeSeriesKey(params) : null);
|
|
128
122
|
const swrFn = () => getAnalyticsTimeSeries(params, requestOptions);
|
|
129
|
-
const query =
|
|
123
|
+
const query = useSwr24(
|
|
130
124
|
swrKey,
|
|
131
125
|
swrFn,
|
|
132
126
|
swrOptions
|
|
@@ -140,13 +134,7 @@ var getListApiKeysUrl = (params) => {
|
|
|
140
134
|
const normalizedParams = new URLSearchParams();
|
|
141
135
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
142
136
|
if (value !== void 0) {
|
|
143
|
-
|
|
144
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
145
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
146
|
-
}
|
|
147
|
-
} else {
|
|
148
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
149
|
-
}
|
|
137
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
150
138
|
}
|
|
151
139
|
});
|
|
152
140
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -164,7 +152,7 @@ var useListApiKeys = (params, options) => {
|
|
|
164
152
|
const isEnabled = swrOptions?.enabled !== false;
|
|
165
153
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListApiKeysKey(params) : null);
|
|
166
154
|
const swrFn = () => listApiKeys(params, requestOptions);
|
|
167
|
-
const query =
|
|
155
|
+
const query = useSwr24(
|
|
168
156
|
swrKey,
|
|
169
157
|
swrFn,
|
|
170
158
|
swrOptions
|
|
@@ -178,10 +166,19 @@ var getCreateApiKeyUrl = () => {
|
|
|
178
166
|
return `/platform/api-keys`;
|
|
179
167
|
};
|
|
180
168
|
var createApiKey = async (createApiKeyBody, options) => {
|
|
169
|
+
const getHeaders = (h) => {
|
|
170
|
+
if (!h) return {};
|
|
171
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
172
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
173
|
+
return h;
|
|
174
|
+
};
|
|
181
175
|
return customFetch(getCreateApiKeyUrl(), {
|
|
182
176
|
...options,
|
|
183
177
|
method: "POST",
|
|
184
|
-
headers: {
|
|
178
|
+
headers: {
|
|
179
|
+
"Content-Type": "application/json",
|
|
180
|
+
...getHeaders(options?.headers)
|
|
181
|
+
},
|
|
185
182
|
body: JSON.stringify(createApiKeyBody)
|
|
186
183
|
});
|
|
187
184
|
};
|
|
@@ -195,7 +192,7 @@ var useCreateApiKey = (options) => {
|
|
|
195
192
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
196
193
|
const swrKey = swrOptions?.swrKey ?? getCreateApiKeyMutationKey();
|
|
197
194
|
const swrFn = getCreateApiKeyMutationFetcher(requestOptions);
|
|
198
|
-
const query =
|
|
195
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
199
196
|
return {
|
|
200
197
|
swrKey,
|
|
201
198
|
...query
|
|
@@ -220,7 +217,7 @@ var useRevokeApiKey = (id, options) => {
|
|
|
220
217
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
221
218
|
const swrKey = swrOptions?.swrKey ?? getRevokeApiKeyMutationKey(id);
|
|
222
219
|
const swrFn = getRevokeApiKeyMutationFetcher(id, requestOptions);
|
|
223
|
-
const query =
|
|
220
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
224
221
|
return {
|
|
225
222
|
swrKey,
|
|
226
223
|
...query
|
|
@@ -230,10 +227,19 @@ var getUpdateApiKeyUrl = (id) => {
|
|
|
230
227
|
return `/platform/api-keys/${id}`;
|
|
231
228
|
};
|
|
232
229
|
var updateApiKey = async (id, updateApiKeyBody, options) => {
|
|
230
|
+
const getHeaders = (h) => {
|
|
231
|
+
if (!h) return {};
|
|
232
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
233
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
234
|
+
return h;
|
|
235
|
+
};
|
|
233
236
|
return customFetch(getUpdateApiKeyUrl(id), {
|
|
234
237
|
...options,
|
|
235
238
|
method: "PATCH",
|
|
236
|
-
headers: {
|
|
239
|
+
headers: {
|
|
240
|
+
"Content-Type": "application/json",
|
|
241
|
+
...getHeaders(options?.headers)
|
|
242
|
+
},
|
|
237
243
|
body: JSON.stringify(updateApiKeyBody)
|
|
238
244
|
});
|
|
239
245
|
};
|
|
@@ -247,7 +253,7 @@ var useUpdateApiKey = (id, options) => {
|
|
|
247
253
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
248
254
|
const swrKey = swrOptions?.swrKey ?? getUpdateApiKeyMutationKey(id);
|
|
249
255
|
const swrFn = getUpdateApiKeyMutationFetcher(id, requestOptions);
|
|
250
|
-
const query =
|
|
256
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
251
257
|
return {
|
|
252
258
|
swrKey,
|
|
253
259
|
...query
|
|
@@ -257,10 +263,19 @@ var getCreateArtifactUrl = () => {
|
|
|
257
263
|
return `/v1/artifacts`;
|
|
258
264
|
};
|
|
259
265
|
var createArtifact = async (createArtifactBody, options) => {
|
|
266
|
+
const getHeaders = (h) => {
|
|
267
|
+
if (!h) return {};
|
|
268
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
269
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
270
|
+
return h;
|
|
271
|
+
};
|
|
260
272
|
return customFetch(getCreateArtifactUrl(), {
|
|
261
273
|
...options,
|
|
262
274
|
method: "POST",
|
|
263
|
-
headers: {
|
|
275
|
+
headers: {
|
|
276
|
+
"Content-Type": "application/json",
|
|
277
|
+
...getHeaders(options?.headers)
|
|
278
|
+
},
|
|
264
279
|
body: JSON.stringify(createArtifactBody)
|
|
265
280
|
});
|
|
266
281
|
};
|
|
@@ -274,7 +289,7 @@ var useCreateArtifact = (options) => {
|
|
|
274
289
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
275
290
|
const swrKey = swrOptions?.swrKey ?? getCreateArtifactMutationKey();
|
|
276
291
|
const swrFn = getCreateArtifactMutationFetcher(requestOptions);
|
|
277
|
-
const query =
|
|
292
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
278
293
|
return {
|
|
279
294
|
swrKey,
|
|
280
295
|
...query
|
|
@@ -282,18 +297,27 @@ var useCreateArtifact = (options) => {
|
|
|
282
297
|
};
|
|
283
298
|
var getListArtifactsUrl = (params) => {
|
|
284
299
|
const normalizedParams = new URLSearchParams();
|
|
300
|
+
const deepObjectEntries = [];
|
|
285
301
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
302
|
+
const deepObjectParameters = ["metadata"];
|
|
303
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && deepObjectParameters.includes(key)) {
|
|
304
|
+
Object.entries(value).forEach(([subKey, subValue]) => {
|
|
305
|
+
if (subValue !== void 0) {
|
|
306
|
+
deepObjectEntries.push(
|
|
307
|
+
encodeURIComponent(key) + "[" + encodeURIComponent(subKey) + "]=" + (subValue === null ? "null" : encodeURIComponent(String(subValue)))
|
|
308
|
+
);
|
|
290
309
|
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
310
|
+
});
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
if (value !== void 0) {
|
|
314
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
294
315
|
}
|
|
295
316
|
});
|
|
296
|
-
const stringifiedParams =
|
|
317
|
+
const stringifiedParams = [
|
|
318
|
+
normalizedParams.toString(),
|
|
319
|
+
deepObjectEntries.join("&")
|
|
320
|
+
].filter(Boolean).join("&");
|
|
297
321
|
return stringifiedParams.length > 0 ? `/v1/artifacts?${stringifiedParams}` : `/v1/artifacts`;
|
|
298
322
|
};
|
|
299
323
|
var listArtifacts = async (params, options) => {
|
|
@@ -308,7 +332,7 @@ var useListArtifacts = (params, options) => {
|
|
|
308
332
|
const isEnabled = swrOptions?.enabled !== false;
|
|
309
333
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListArtifactsKey(params) : null);
|
|
310
334
|
const swrFn = () => listArtifacts(params, requestOptions);
|
|
311
|
-
const query =
|
|
335
|
+
const query = useSwr24(
|
|
312
336
|
swrKey,
|
|
313
337
|
swrFn,
|
|
314
338
|
swrOptions
|
|
@@ -330,10 +354,10 @@ var getArtifact = async (id, options) => {
|
|
|
330
354
|
var getGetArtifactKey = (id) => [`/v1/artifacts/${id}`];
|
|
331
355
|
var useGetArtifact = (id, options) => {
|
|
332
356
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
333
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
357
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
334
358
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetArtifactKey(id) : null);
|
|
335
359
|
const swrFn = () => getArtifact(id, requestOptions);
|
|
336
|
-
const query =
|
|
360
|
+
const query = useSwr24(
|
|
337
361
|
swrKey,
|
|
338
362
|
swrFn,
|
|
339
363
|
swrOptions
|
|
@@ -362,7 +386,7 @@ var useDeleteArtifact = (id, options) => {
|
|
|
362
386
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
363
387
|
const swrKey = swrOptions?.swrKey ?? getDeleteArtifactMutationKey(id);
|
|
364
388
|
const swrFn = getDeleteArtifactMutationFetcher(id, requestOptions);
|
|
365
|
-
const query =
|
|
389
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
366
390
|
return {
|
|
367
391
|
swrKey,
|
|
368
392
|
...query
|
|
@@ -372,13 +396,7 @@ var getGetArtifactMetadataKeysUrl = (params) => {
|
|
|
372
396
|
const normalizedParams = new URLSearchParams();
|
|
373
397
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
374
398
|
if (value !== void 0) {
|
|
375
|
-
|
|
376
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
377
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
378
|
-
}
|
|
379
|
-
} else {
|
|
380
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
381
|
-
}
|
|
399
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
382
400
|
}
|
|
383
401
|
});
|
|
384
402
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -399,7 +417,7 @@ var useGetArtifactMetadataKeys = (params, options) => {
|
|
|
399
417
|
const isEnabled = swrOptions?.enabled !== false;
|
|
400
418
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetArtifactMetadataKeysKey(params) : null);
|
|
401
419
|
const swrFn = () => getArtifactMetadataKeys(params, requestOptions);
|
|
402
|
-
const query =
|
|
420
|
+
const query = useSwr24(
|
|
403
421
|
swrKey,
|
|
404
422
|
swrFn,
|
|
405
423
|
swrOptions
|
|
@@ -411,18 +429,24 @@ var useGetArtifactMetadataKeys = (params, options) => {
|
|
|
411
429
|
};
|
|
412
430
|
var getGetArtifactStatusSummaryUrl = (params) => {
|
|
413
431
|
const normalizedParams = new URLSearchParams();
|
|
432
|
+
const deepObjectEntries = [];
|
|
414
433
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
434
|
+
const deepObjectParameters = ["scope"];
|
|
435
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && deepObjectParameters.includes(key)) {
|
|
436
|
+
Object.entries(value).forEach(([subKey, subValue]) => {
|
|
437
|
+
if (subValue !== void 0) {
|
|
438
|
+
deepObjectEntries.push(
|
|
439
|
+
encodeURIComponent(key) + "[" + encodeURIComponent(subKey) + "]=" + (subValue === null ? "null" : encodeURIComponent(String(subValue)))
|
|
440
|
+
);
|
|
419
441
|
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
}
|
|
442
|
+
});
|
|
443
|
+
return;
|
|
423
444
|
}
|
|
424
445
|
});
|
|
425
|
-
const stringifiedParams =
|
|
446
|
+
const stringifiedParams = [
|
|
447
|
+
normalizedParams.toString(),
|
|
448
|
+
deepObjectEntries.join("&")
|
|
449
|
+
].filter(Boolean).join("&");
|
|
426
450
|
return stringifiedParams.length > 0 ? `/v1/artifacts/status-summary?${stringifiedParams}` : `/v1/artifacts/status-summary`;
|
|
427
451
|
};
|
|
428
452
|
var getArtifactStatusSummary = async (params, options) => {
|
|
@@ -440,7 +464,7 @@ var useGetArtifactStatusSummary = (params, options) => {
|
|
|
440
464
|
const isEnabled = swrOptions?.enabled !== false;
|
|
441
465
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetArtifactStatusSummaryKey(params) : null);
|
|
442
466
|
const swrFn = () => getArtifactStatusSummary(params, requestOptions);
|
|
443
|
-
const query =
|
|
467
|
+
const query = useSwr24(
|
|
444
468
|
swrKey,
|
|
445
469
|
swrFn,
|
|
446
470
|
swrOptions
|
|
@@ -454,12 +478,21 @@ var getGetArtifactUploadUrlUrl = () => {
|
|
|
454
478
|
return `/v1/artifacts/get-upload-url`;
|
|
455
479
|
};
|
|
456
480
|
var getArtifactUploadUrl = async (getArtifactUploadUrlBody, options) => {
|
|
481
|
+
const getHeaders = (h) => {
|
|
482
|
+
if (!h) return {};
|
|
483
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
484
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
485
|
+
return h;
|
|
486
|
+
};
|
|
457
487
|
return customFetch(
|
|
458
488
|
getGetArtifactUploadUrlUrl(),
|
|
459
489
|
{
|
|
460
490
|
...options,
|
|
461
491
|
method: "POST",
|
|
462
|
-
headers: {
|
|
492
|
+
headers: {
|
|
493
|
+
"Content-Type": "application/json",
|
|
494
|
+
...getHeaders(options?.headers)
|
|
495
|
+
},
|
|
463
496
|
body: JSON.stringify(getArtifactUploadUrlBody)
|
|
464
497
|
}
|
|
465
498
|
);
|
|
@@ -474,7 +507,7 @@ var useGetArtifactUploadUrl = (options) => {
|
|
|
474
507
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
475
508
|
const swrKey = swrOptions?.swrKey ?? getGetArtifactUploadUrlMutationKey();
|
|
476
509
|
const swrFn = getGetArtifactUploadUrlMutationFetcher(requestOptions);
|
|
477
|
-
const query =
|
|
510
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
478
511
|
return {
|
|
479
512
|
swrKey,
|
|
480
513
|
...query
|
|
@@ -484,12 +517,21 @@ var getUpdateArtifactMetadataUrl = (id) => {
|
|
|
484
517
|
return `/v1/artifacts/${id}/metadata`;
|
|
485
518
|
};
|
|
486
519
|
var updateArtifactMetadata = async (id, updateArtifactMetadataBody, options) => {
|
|
520
|
+
const getHeaders = (h) => {
|
|
521
|
+
if (!h) return {};
|
|
522
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
523
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
524
|
+
return h;
|
|
525
|
+
};
|
|
487
526
|
return customFetch(
|
|
488
527
|
getUpdateArtifactMetadataUrl(id),
|
|
489
528
|
{
|
|
490
529
|
...options,
|
|
491
530
|
method: "PATCH",
|
|
492
|
-
headers: {
|
|
531
|
+
headers: {
|
|
532
|
+
"Content-Type": "application/json",
|
|
533
|
+
...getHeaders(options?.headers)
|
|
534
|
+
},
|
|
493
535
|
body: JSON.stringify(updateArtifactMetadataBody)
|
|
494
536
|
}
|
|
495
537
|
);
|
|
@@ -504,7 +546,7 @@ var useUpdateArtifactMetadata = (id, options) => {
|
|
|
504
546
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
505
547
|
const swrKey = swrOptions?.swrKey ?? getUpdateArtifactMetadataMutationKey(id);
|
|
506
548
|
const swrFn = getUpdateArtifactMetadataMutationFetcher(id, requestOptions);
|
|
507
|
-
const query =
|
|
549
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
508
550
|
return {
|
|
509
551
|
swrKey,
|
|
510
552
|
...query
|
|
@@ -514,10 +556,19 @@ var getUploadFileUrl = () => {
|
|
|
514
556
|
return `/v1/upload-file`;
|
|
515
557
|
};
|
|
516
558
|
var uploadFile = async (uploadFileBody, options) => {
|
|
559
|
+
const getHeaders = (h) => {
|
|
560
|
+
if (!h) return {};
|
|
561
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
562
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
563
|
+
return h;
|
|
564
|
+
};
|
|
517
565
|
return customFetch(getUploadFileUrl(), {
|
|
518
566
|
...options,
|
|
519
567
|
method: "POST",
|
|
520
|
-
headers: {
|
|
568
|
+
headers: {
|
|
569
|
+
"Content-Type": "application/json",
|
|
570
|
+
...getHeaders(options?.headers)
|
|
571
|
+
},
|
|
521
572
|
body: JSON.stringify(uploadFileBody)
|
|
522
573
|
});
|
|
523
574
|
};
|
|
@@ -531,7 +582,7 @@ var useUploadFile = (options) => {
|
|
|
531
582
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
532
583
|
const swrKey = swrOptions?.swrKey ?? getUploadFileMutationKey();
|
|
533
584
|
const swrFn = getUploadFileMutationFetcher(requestOptions);
|
|
534
|
-
const query =
|
|
585
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
535
586
|
return {
|
|
536
587
|
swrKey,
|
|
537
588
|
...query
|
|
@@ -541,10 +592,19 @@ var getSignUpUrl = () => {
|
|
|
541
592
|
return `/v1/auth/sign-up`;
|
|
542
593
|
};
|
|
543
594
|
var signUp = async (signUpBody, options) => {
|
|
595
|
+
const getHeaders = (h) => {
|
|
596
|
+
if (!h) return {};
|
|
597
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
598
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
599
|
+
return h;
|
|
600
|
+
};
|
|
544
601
|
return customFetchNoAuth(getSignUpUrl(), {
|
|
545
602
|
...options,
|
|
546
603
|
method: "POST",
|
|
547
|
-
headers: {
|
|
604
|
+
headers: {
|
|
605
|
+
"Content-Type": "application/json",
|
|
606
|
+
...getHeaders(options?.headers)
|
|
607
|
+
},
|
|
548
608
|
body: JSON.stringify(signUpBody)
|
|
549
609
|
});
|
|
550
610
|
};
|
|
@@ -558,7 +618,7 @@ var useSignUp = (options) => {
|
|
|
558
618
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
559
619
|
const swrKey = swrOptions?.swrKey ?? getSignUpMutationKey();
|
|
560
620
|
const swrFn = getSignUpMutationFetcher(requestOptions);
|
|
561
|
-
const query =
|
|
621
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
562
622
|
return {
|
|
563
623
|
swrKey,
|
|
564
624
|
...query
|
|
@@ -568,10 +628,19 @@ var getSignInUrl = () => {
|
|
|
568
628
|
return `/v1/auth/sign-in`;
|
|
569
629
|
};
|
|
570
630
|
var signIn = async (signInBody, options) => {
|
|
631
|
+
const getHeaders = (h) => {
|
|
632
|
+
if (!h) return {};
|
|
633
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
634
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
635
|
+
return h;
|
|
636
|
+
};
|
|
571
637
|
return customFetchNoAuth(getSignInUrl(), {
|
|
572
638
|
...options,
|
|
573
639
|
method: "POST",
|
|
574
|
-
headers: {
|
|
640
|
+
headers: {
|
|
641
|
+
"Content-Type": "application/json",
|
|
642
|
+
...getHeaders(options?.headers)
|
|
643
|
+
},
|
|
575
644
|
body: JSON.stringify(signInBody)
|
|
576
645
|
});
|
|
577
646
|
};
|
|
@@ -585,7 +654,7 @@ var useSignIn = (options) => {
|
|
|
585
654
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
586
655
|
const swrKey = swrOptions?.swrKey ?? getSignInMutationKey();
|
|
587
656
|
const swrFn = getSignInMutationFetcher(requestOptions);
|
|
588
|
-
const query =
|
|
657
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
589
658
|
return {
|
|
590
659
|
swrKey,
|
|
591
660
|
...query
|
|
@@ -595,12 +664,21 @@ var getRequestPasswordResetUrl = () => {
|
|
|
595
664
|
return `/v1/auth/request-password-reset`;
|
|
596
665
|
};
|
|
597
666
|
var requestPasswordReset = async (requestPasswordResetBody, options) => {
|
|
667
|
+
const getHeaders = (h) => {
|
|
668
|
+
if (!h) return {};
|
|
669
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
670
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
671
|
+
return h;
|
|
672
|
+
};
|
|
598
673
|
return customFetchNoAuth(
|
|
599
674
|
getRequestPasswordResetUrl(),
|
|
600
675
|
{
|
|
601
676
|
...options,
|
|
602
677
|
method: "POST",
|
|
603
|
-
headers: {
|
|
678
|
+
headers: {
|
|
679
|
+
"Content-Type": "application/json",
|
|
680
|
+
...getHeaders(options?.headers)
|
|
681
|
+
},
|
|
604
682
|
body: JSON.stringify(requestPasswordResetBody)
|
|
605
683
|
}
|
|
606
684
|
);
|
|
@@ -615,7 +693,7 @@ var useRequestPasswordReset = (options) => {
|
|
|
615
693
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
616
694
|
const swrKey = swrOptions?.swrKey ?? getRequestPasswordResetMutationKey();
|
|
617
695
|
const swrFn = getRequestPasswordResetMutationFetcher(requestOptions);
|
|
618
|
-
const query =
|
|
696
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
619
697
|
return {
|
|
620
698
|
swrKey,
|
|
621
699
|
...query
|
|
@@ -625,10 +703,19 @@ var getResetPasswordUrl = () => {
|
|
|
625
703
|
return `/v1/auth/reset-password`;
|
|
626
704
|
};
|
|
627
705
|
var resetPassword = async (resetPasswordBody, options) => {
|
|
706
|
+
const getHeaders = (h) => {
|
|
707
|
+
if (!h) return {};
|
|
708
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
709
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
710
|
+
return h;
|
|
711
|
+
};
|
|
628
712
|
return customFetchNoAuth(getResetPasswordUrl(), {
|
|
629
713
|
...options,
|
|
630
714
|
method: "POST",
|
|
631
|
-
headers: {
|
|
715
|
+
headers: {
|
|
716
|
+
"Content-Type": "application/json",
|
|
717
|
+
...getHeaders(options?.headers)
|
|
718
|
+
},
|
|
632
719
|
body: JSON.stringify(resetPasswordBody)
|
|
633
720
|
});
|
|
634
721
|
};
|
|
@@ -642,7 +729,7 @@ var useResetPassword = (options) => {
|
|
|
642
729
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
643
730
|
const swrKey = swrOptions?.swrKey ?? getResetPasswordMutationKey();
|
|
644
731
|
const swrFn = getResetPasswordMutationFetcher(requestOptions);
|
|
645
|
-
const query =
|
|
732
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
646
733
|
return {
|
|
647
734
|
swrKey,
|
|
648
735
|
...query
|
|
@@ -652,10 +739,19 @@ var getRefreshTokenUrl = () => {
|
|
|
652
739
|
return `/v1/auth/refresh-token`;
|
|
653
740
|
};
|
|
654
741
|
var refreshToken = async (refreshTokenBody, options) => {
|
|
742
|
+
const getHeaders = (h) => {
|
|
743
|
+
if (!h) return {};
|
|
744
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
745
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
746
|
+
return h;
|
|
747
|
+
};
|
|
655
748
|
return customFetchNoAuth(getRefreshTokenUrl(), {
|
|
656
749
|
...options,
|
|
657
750
|
method: "POST",
|
|
658
|
-
headers: {
|
|
751
|
+
headers: {
|
|
752
|
+
"Content-Type": "application/json",
|
|
753
|
+
...getHeaders(options?.headers)
|
|
754
|
+
},
|
|
659
755
|
body: JSON.stringify(refreshTokenBody)
|
|
660
756
|
});
|
|
661
757
|
};
|
|
@@ -669,7 +765,7 @@ var useRefreshToken = (options) => {
|
|
|
669
765
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
670
766
|
const swrKey = swrOptions?.swrKey ?? getRefreshTokenMutationKey();
|
|
671
767
|
const swrFn = getRefreshTokenMutationFetcher(requestOptions);
|
|
672
|
-
const query =
|
|
768
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
673
769
|
return {
|
|
674
770
|
swrKey,
|
|
675
771
|
...query
|
|
@@ -679,13 +775,7 @@ var getGetOAuthUrlUrl = (params) => {
|
|
|
679
775
|
const normalizedParams = new URLSearchParams();
|
|
680
776
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
681
777
|
if (value !== void 0) {
|
|
682
|
-
|
|
683
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
684
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
685
|
-
}
|
|
686
|
-
} else {
|
|
687
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
688
|
-
}
|
|
778
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
689
779
|
}
|
|
690
780
|
});
|
|
691
781
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -703,7 +793,7 @@ var useGetOAuthUrl = (params, options) => {
|
|
|
703
793
|
const isEnabled = swrOptions?.enabled !== false;
|
|
704
794
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetOAuthUrlKey(params) : null);
|
|
705
795
|
const swrFn = () => getOAuthUrl(params, requestOptions);
|
|
706
|
-
const query =
|
|
796
|
+
const query = useSwr24(
|
|
707
797
|
swrKey,
|
|
708
798
|
swrFn,
|
|
709
799
|
swrOptions
|
|
@@ -717,10 +807,19 @@ var getGetSessionTokenUrl = () => {
|
|
|
717
807
|
return `/v1/auth/session`;
|
|
718
808
|
};
|
|
719
809
|
var getSessionToken = async (getSessionTokenBody, options) => {
|
|
810
|
+
const getHeaders = (h) => {
|
|
811
|
+
if (!h) return {};
|
|
812
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
813
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
814
|
+
return h;
|
|
815
|
+
};
|
|
720
816
|
return customFetchNoAuth(getGetSessionTokenUrl(), {
|
|
721
817
|
...options,
|
|
722
818
|
method: "POST",
|
|
723
|
-
headers: {
|
|
819
|
+
headers: {
|
|
820
|
+
"Content-Type": "application/json",
|
|
821
|
+
...getHeaders(options?.headers)
|
|
822
|
+
},
|
|
724
823
|
body: JSON.stringify(getSessionTokenBody)
|
|
725
824
|
});
|
|
726
825
|
};
|
|
@@ -734,7 +833,7 @@ var useGetSessionToken = (options) => {
|
|
|
734
833
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
735
834
|
const swrKey = swrOptions?.swrKey ?? getGetSessionTokenMutationKey();
|
|
736
835
|
const swrFn = getGetSessionTokenMutationFetcher(requestOptions);
|
|
737
|
-
const query =
|
|
836
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
738
837
|
return {
|
|
739
838
|
swrKey,
|
|
740
839
|
...query
|
|
@@ -752,10 +851,10 @@ var getPartnerJwks = async (partner, options) => {
|
|
|
752
851
|
var getGetPartnerJwksKey = (partner) => [`/.well-known/partners/${partner}/jwks.json`];
|
|
753
852
|
var useGetPartnerJwks = (partner, options) => {
|
|
754
853
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
755
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
854
|
+
const isEnabled = swrOptions?.enabled !== false && partner !== null && partner !== void 0;
|
|
756
855
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetPartnerJwksKey(partner) : null);
|
|
757
856
|
const swrFn = () => getPartnerJwks(partner, requestOptions);
|
|
758
|
-
const query =
|
|
857
|
+
const query = useSwr24(
|
|
759
858
|
swrKey,
|
|
760
859
|
swrFn,
|
|
761
860
|
swrOptions
|
|
@@ -769,13 +868,7 @@ var getPartnerLaunchUrl = (params) => {
|
|
|
769
868
|
const normalizedParams = new URLSearchParams();
|
|
770
869
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
771
870
|
if (value !== void 0) {
|
|
772
|
-
|
|
773
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
774
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
775
|
-
}
|
|
776
|
-
} else {
|
|
777
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
778
|
-
}
|
|
871
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
779
872
|
}
|
|
780
873
|
});
|
|
781
874
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -797,7 +890,7 @@ var usePartnerLaunch = (params, options) => {
|
|
|
797
890
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
798
891
|
const swrKey = swrOptions?.swrKey ?? getPartnerLaunchMutationKey(params);
|
|
799
892
|
const swrFn = getPartnerLaunchMutationFetcher(params, requestOptions);
|
|
800
|
-
const query =
|
|
893
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
801
894
|
return {
|
|
802
895
|
swrKey,
|
|
803
896
|
...query
|
|
@@ -807,10 +900,19 @@ var getCreateCallFeedbackUrl = (id) => {
|
|
|
807
900
|
return `/v1/calls/${id}/feedback`;
|
|
808
901
|
};
|
|
809
902
|
var createCallFeedback = async (id, createFeedbackRequest, options) => {
|
|
903
|
+
const getHeaders = (h) => {
|
|
904
|
+
if (!h) return {};
|
|
905
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
906
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
907
|
+
return h;
|
|
908
|
+
};
|
|
810
909
|
return customFetch(getCreateCallFeedbackUrl(id), {
|
|
811
910
|
...options,
|
|
812
911
|
method: "POST",
|
|
813
|
-
headers: {
|
|
912
|
+
headers: {
|
|
913
|
+
"Content-Type": "application/json",
|
|
914
|
+
...getHeaders(options?.headers)
|
|
915
|
+
},
|
|
814
916
|
body: JSON.stringify(createFeedbackRequest)
|
|
815
917
|
});
|
|
816
918
|
};
|
|
@@ -824,7 +926,7 @@ var useCreateCallFeedback = (id, options) => {
|
|
|
824
926
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
825
927
|
const swrKey = swrOptions?.swrKey ?? getCreateCallFeedbackMutationKey(id);
|
|
826
928
|
const swrFn = getCreateCallFeedbackMutationFetcher(id, requestOptions);
|
|
827
|
-
const query =
|
|
929
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
828
930
|
return {
|
|
829
931
|
swrKey,
|
|
830
932
|
...query
|
|
@@ -834,13 +936,7 @@ var getListCallFeedbackUrl = (id, params) => {
|
|
|
834
936
|
const normalizedParams = new URLSearchParams();
|
|
835
937
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
836
938
|
if (value !== void 0) {
|
|
837
|
-
|
|
838
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
839
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
840
|
-
}
|
|
841
|
-
} else {
|
|
842
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
843
|
-
}
|
|
939
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
844
940
|
}
|
|
845
941
|
});
|
|
846
942
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -858,10 +954,10 @@ var listCallFeedback = async (id, params, options) => {
|
|
|
858
954
|
var getListCallFeedbackKey = (id, params) => [`/v1/calls/${id}/feedback`, ...params ? [params] : []];
|
|
859
955
|
var useListCallFeedback = (id, params, options) => {
|
|
860
956
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
861
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
957
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
862
958
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListCallFeedbackKey(id, params) : null);
|
|
863
959
|
const swrFn = () => listCallFeedback(id, params, requestOptions);
|
|
864
|
-
const query =
|
|
960
|
+
const query = useSwr24(
|
|
865
961
|
swrKey,
|
|
866
962
|
swrFn,
|
|
867
963
|
swrOptions
|
|
@@ -897,7 +993,7 @@ var useDeleteCallFeedback = (id, feedbackId, options) => {
|
|
|
897
993
|
feedbackId,
|
|
898
994
|
requestOptions
|
|
899
995
|
);
|
|
900
|
-
const query =
|
|
996
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
901
997
|
return {
|
|
902
998
|
swrKey,
|
|
903
999
|
...query
|
|
@@ -905,18 +1001,27 @@ var useDeleteCallFeedback = (id, feedbackId, options) => {
|
|
|
905
1001
|
};
|
|
906
1002
|
var getListCallsUrl = (params) => {
|
|
907
1003
|
const normalizedParams = new URLSearchParams();
|
|
1004
|
+
const deepObjectEntries = [];
|
|
908
1005
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
1006
|
+
const deepObjectParameters = ["metadata"];
|
|
1007
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && deepObjectParameters.includes(key)) {
|
|
1008
|
+
Object.entries(value).forEach(([subKey, subValue]) => {
|
|
1009
|
+
if (subValue !== void 0) {
|
|
1010
|
+
deepObjectEntries.push(
|
|
1011
|
+
encodeURIComponent(key) + "[" + encodeURIComponent(subKey) + "]=" + (subValue === null ? "null" : encodeURIComponent(String(subValue)))
|
|
1012
|
+
);
|
|
913
1013
|
}
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
|
|
1014
|
+
});
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
if (value !== void 0) {
|
|
1018
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
917
1019
|
}
|
|
918
1020
|
});
|
|
919
|
-
const stringifiedParams =
|
|
1021
|
+
const stringifiedParams = [
|
|
1022
|
+
normalizedParams.toString(),
|
|
1023
|
+
deepObjectEntries.join("&")
|
|
1024
|
+
].filter(Boolean).join("&");
|
|
920
1025
|
return stringifiedParams.length > 0 ? `/v1/calls?${stringifiedParams}` : `/v1/calls`;
|
|
921
1026
|
};
|
|
922
1027
|
var listCalls = async (params, options) => {
|
|
@@ -931,7 +1036,7 @@ var useListCalls = (params, options) => {
|
|
|
931
1036
|
const isEnabled = swrOptions?.enabled !== false;
|
|
932
1037
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListCallsKey(params) : null);
|
|
933
1038
|
const swrFn = () => listCalls(params, requestOptions);
|
|
934
|
-
const query =
|
|
1039
|
+
const query = useSwr24(
|
|
935
1040
|
swrKey,
|
|
936
1041
|
swrFn,
|
|
937
1042
|
swrOptions
|
|
@@ -945,13 +1050,7 @@ var getGetCallUrl = (id, params) => {
|
|
|
945
1050
|
const normalizedParams = new URLSearchParams();
|
|
946
1051
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
947
1052
|
if (value !== void 0) {
|
|
948
|
-
|
|
949
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
950
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
951
|
-
}
|
|
952
|
-
} else {
|
|
953
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
954
|
-
}
|
|
1053
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
955
1054
|
}
|
|
956
1055
|
});
|
|
957
1056
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -966,10 +1065,10 @@ var getCall = async (id, params, options) => {
|
|
|
966
1065
|
var getGetCallKey = (id, params) => [`/v1/calls/${id}`, ...params ? [params] : []];
|
|
967
1066
|
var useGetCall = (id, params, options) => {
|
|
968
1067
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
969
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1068
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
970
1069
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetCallKey(id, params) : null);
|
|
971
1070
|
const swrFn = () => getCall(id, params, requestOptions);
|
|
972
|
-
const query =
|
|
1071
|
+
const query = useSwr24(
|
|
973
1072
|
swrKey,
|
|
974
1073
|
swrFn,
|
|
975
1074
|
swrOptions
|
|
@@ -991,10 +1090,10 @@ var getCallEvaluation = async (id, options) => {
|
|
|
991
1090
|
var getGetCallEvaluationKey = (id) => [`/v1/calls/${id}/evaluation`];
|
|
992
1091
|
var useGetCallEvaluation = (id, options) => {
|
|
993
1092
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
994
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1093
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
995
1094
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetCallEvaluationKey(id) : null);
|
|
996
1095
|
const swrFn = () => getCallEvaluation(id, requestOptions);
|
|
997
|
-
const query =
|
|
1096
|
+
const query = useSwr24(
|
|
998
1097
|
swrKey,
|
|
999
1098
|
swrFn,
|
|
1000
1099
|
swrOptions
|
|
@@ -1008,13 +1107,7 @@ var getGetCallAnalyticsUrl = (params) => {
|
|
|
1008
1107
|
const normalizedParams = new URLSearchParams();
|
|
1009
1108
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1010
1109
|
if (value !== void 0) {
|
|
1011
|
-
|
|
1012
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1013
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1014
|
-
}
|
|
1015
|
-
} else {
|
|
1016
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1017
|
-
}
|
|
1110
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1018
1111
|
}
|
|
1019
1112
|
});
|
|
1020
1113
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1032,7 +1125,7 @@ var useGetCallAnalytics = (params, options) => {
|
|
|
1032
1125
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1033
1126
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetCallAnalyticsKey(params) : null);
|
|
1034
1127
|
const swrFn = () => getCallAnalytics(params, requestOptions);
|
|
1035
|
-
const query =
|
|
1128
|
+
const query = useSwr24(
|
|
1036
1129
|
swrKey,
|
|
1037
1130
|
swrFn,
|
|
1038
1131
|
swrOptions
|
|
@@ -1046,13 +1139,7 @@ var getListCasesUrl = (params) => {
|
|
|
1046
1139
|
const normalizedParams = new URLSearchParams();
|
|
1047
1140
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1048
1141
|
if (value !== void 0) {
|
|
1049
|
-
|
|
1050
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1051
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1052
|
-
}
|
|
1053
|
-
} else {
|
|
1054
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1055
|
-
}
|
|
1142
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1056
1143
|
}
|
|
1057
1144
|
});
|
|
1058
1145
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1070,7 +1157,7 @@ var useListCases = (params, options) => {
|
|
|
1070
1157
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1071
1158
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListCasesKey(params) : null);
|
|
1072
1159
|
const swrFn = () => listCases(params, requestOptions);
|
|
1073
|
-
const query =
|
|
1160
|
+
const query = useSwr24(
|
|
1074
1161
|
swrKey,
|
|
1075
1162
|
swrFn,
|
|
1076
1163
|
swrOptions
|
|
@@ -1084,10 +1171,19 @@ var getCreateCaseUrl = () => {
|
|
|
1084
1171
|
return `/v1/cases`;
|
|
1085
1172
|
};
|
|
1086
1173
|
var createCase = async (createCaseBody, options) => {
|
|
1174
|
+
const getHeaders = (h) => {
|
|
1175
|
+
if (!h) return {};
|
|
1176
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1177
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1178
|
+
return h;
|
|
1179
|
+
};
|
|
1087
1180
|
return customFetch(getCreateCaseUrl(), {
|
|
1088
1181
|
...options,
|
|
1089
1182
|
method: "POST",
|
|
1090
|
-
headers: {
|
|
1183
|
+
headers: {
|
|
1184
|
+
"Content-Type": "application/json",
|
|
1185
|
+
...getHeaders(options?.headers)
|
|
1186
|
+
},
|
|
1091
1187
|
body: JSON.stringify(createCaseBody)
|
|
1092
1188
|
});
|
|
1093
1189
|
};
|
|
@@ -1101,7 +1197,7 @@ var useCreateCase = (options) => {
|
|
|
1101
1197
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1102
1198
|
const swrKey = swrOptions?.swrKey ?? getCreateCaseMutationKey();
|
|
1103
1199
|
const swrFn = getCreateCaseMutationFetcher(requestOptions);
|
|
1104
|
-
const query =
|
|
1200
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1105
1201
|
return {
|
|
1106
1202
|
swrKey,
|
|
1107
1203
|
...query
|
|
@@ -1111,13 +1207,7 @@ var getSearchCasesUrl = (params) => {
|
|
|
1111
1207
|
const normalizedParams = new URLSearchParams();
|
|
1112
1208
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1113
1209
|
if (value !== void 0) {
|
|
1114
|
-
|
|
1115
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1116
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1117
|
-
}
|
|
1118
|
-
} else {
|
|
1119
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1120
|
-
}
|
|
1210
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1121
1211
|
}
|
|
1122
1212
|
});
|
|
1123
1213
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1135,7 +1225,7 @@ var useSearchCases = (params, options) => {
|
|
|
1135
1225
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1136
1226
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getSearchCasesKey(params) : null);
|
|
1137
1227
|
const swrFn = () => searchCases(params, requestOptions);
|
|
1138
|
-
const query =
|
|
1228
|
+
const query = useSwr24(
|
|
1139
1229
|
swrKey,
|
|
1140
1230
|
swrFn,
|
|
1141
1231
|
swrOptions
|
|
@@ -1149,13 +1239,7 @@ var getGetCaseUrl = (id, params) => {
|
|
|
1149
1239
|
const normalizedParams = new URLSearchParams();
|
|
1150
1240
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1151
1241
|
if (value !== void 0) {
|
|
1152
|
-
|
|
1153
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1154
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1155
|
-
}
|
|
1156
|
-
} else {
|
|
1157
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1158
|
-
}
|
|
1242
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1159
1243
|
}
|
|
1160
1244
|
});
|
|
1161
1245
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1170,10 +1254,10 @@ var getCase = async (id, params, options) => {
|
|
|
1170
1254
|
var getGetCaseKey = (id, params) => [`/v1/cases/${id}`, ...params ? [params] : []];
|
|
1171
1255
|
var useGetCase = (id, params, options) => {
|
|
1172
1256
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1173
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1257
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
1174
1258
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetCaseKey(id, params) : null);
|
|
1175
1259
|
const swrFn = () => getCase(id, params, requestOptions);
|
|
1176
|
-
const query =
|
|
1260
|
+
const query = useSwr24(
|
|
1177
1261
|
swrKey,
|
|
1178
1262
|
swrFn,
|
|
1179
1263
|
swrOptions
|
|
@@ -1187,23 +1271,26 @@ var getAddCaseLinksUrl = (id, params) => {
|
|
|
1187
1271
|
const normalizedParams = new URLSearchParams();
|
|
1188
1272
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1189
1273
|
if (value !== void 0) {
|
|
1190
|
-
|
|
1191
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1192
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1193
|
-
}
|
|
1194
|
-
} else {
|
|
1195
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1196
|
-
}
|
|
1274
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1197
1275
|
}
|
|
1198
1276
|
});
|
|
1199
1277
|
const stringifiedParams = normalizedParams.toString();
|
|
1200
1278
|
return stringifiedParams.length > 0 ? `/v1/cases/${id}/links?${stringifiedParams}` : `/v1/cases/${id}/links`;
|
|
1201
1279
|
};
|
|
1202
1280
|
var addCaseLinks = async (id, addCaseLinksBody, params, options) => {
|
|
1281
|
+
const getHeaders = (h) => {
|
|
1282
|
+
if (!h) return {};
|
|
1283
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1284
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1285
|
+
return h;
|
|
1286
|
+
};
|
|
1203
1287
|
return customFetch(getAddCaseLinksUrl(id, params), {
|
|
1204
1288
|
...options,
|
|
1205
1289
|
method: "POST",
|
|
1206
|
-
headers: {
|
|
1290
|
+
headers: {
|
|
1291
|
+
"Content-Type": "application/json",
|
|
1292
|
+
...getHeaders(options?.headers)
|
|
1293
|
+
},
|
|
1207
1294
|
body: JSON.stringify(addCaseLinksBody)
|
|
1208
1295
|
});
|
|
1209
1296
|
};
|
|
@@ -1217,7 +1304,7 @@ var useAddCaseLinks = (id, params, options) => {
|
|
|
1217
1304
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1218
1305
|
const swrKey = swrOptions?.swrKey ?? getAddCaseLinksMutationKey(id, params);
|
|
1219
1306
|
const swrFn = getAddCaseLinksMutationFetcher(id, params, requestOptions);
|
|
1220
|
-
const query =
|
|
1307
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1221
1308
|
return {
|
|
1222
1309
|
swrKey,
|
|
1223
1310
|
...query
|
|
@@ -1227,13 +1314,7 @@ var getListCaseLinksUrl = (id, params) => {
|
|
|
1227
1314
|
const normalizedParams = new URLSearchParams();
|
|
1228
1315
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1229
1316
|
if (value !== void 0) {
|
|
1230
|
-
|
|
1231
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1232
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1233
|
-
}
|
|
1234
|
-
} else {
|
|
1235
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1236
|
-
}
|
|
1317
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1237
1318
|
}
|
|
1238
1319
|
});
|
|
1239
1320
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1248,10 +1329,10 @@ var listCaseLinks = async (id, params, options) => {
|
|
|
1248
1329
|
var getListCaseLinksKey = (id, params) => [`/v1/cases/${id}/links`, ...params ? [params] : []];
|
|
1249
1330
|
var useListCaseLinks = (id, params, options) => {
|
|
1250
1331
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1251
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1332
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
1252
1333
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListCaseLinksKey(id, params) : null);
|
|
1253
1334
|
const swrFn = () => listCaseLinks(id, params, requestOptions);
|
|
1254
|
-
const query =
|
|
1335
|
+
const query = useSwr24(
|
|
1255
1336
|
swrKey,
|
|
1256
1337
|
swrFn,
|
|
1257
1338
|
swrOptions
|
|
@@ -1265,13 +1346,7 @@ var getRemoveCaseLinkUrl = (id, entityType, entityId, params) => {
|
|
|
1265
1346
|
const normalizedParams = new URLSearchParams();
|
|
1266
1347
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1267
1348
|
if (value !== void 0) {
|
|
1268
|
-
|
|
1269
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1270
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1271
|
-
}
|
|
1272
|
-
} else {
|
|
1273
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1274
|
-
}
|
|
1349
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1275
1350
|
}
|
|
1276
1351
|
});
|
|
1277
1352
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1305,7 +1380,7 @@ var useRemoveCaseLink = (id, entityType, entityId, params, options) => {
|
|
|
1305
1380
|
params,
|
|
1306
1381
|
requestOptions
|
|
1307
1382
|
);
|
|
1308
|
-
const query =
|
|
1383
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1309
1384
|
return {
|
|
1310
1385
|
swrKey,
|
|
1311
1386
|
...query
|
|
@@ -1315,10 +1390,19 @@ var getCreateChatAgentUrl = () => {
|
|
|
1315
1390
|
return `/v1/chat-agents`;
|
|
1316
1391
|
};
|
|
1317
1392
|
var createChatAgent = async (createChatAgentBody, options) => {
|
|
1393
|
+
const getHeaders = (h) => {
|
|
1394
|
+
if (!h) return {};
|
|
1395
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1396
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1397
|
+
return h;
|
|
1398
|
+
};
|
|
1318
1399
|
return customFetch(getCreateChatAgentUrl(), {
|
|
1319
1400
|
...options,
|
|
1320
1401
|
method: "POST",
|
|
1321
|
-
headers: {
|
|
1402
|
+
headers: {
|
|
1403
|
+
"Content-Type": "application/json",
|
|
1404
|
+
...getHeaders(options?.headers)
|
|
1405
|
+
},
|
|
1322
1406
|
body: JSON.stringify(createChatAgentBody)
|
|
1323
1407
|
});
|
|
1324
1408
|
};
|
|
@@ -1332,7 +1416,7 @@ var useCreateChatAgent = (options) => {
|
|
|
1332
1416
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1333
1417
|
const swrKey = swrOptions?.swrKey ?? getCreateChatAgentMutationKey();
|
|
1334
1418
|
const swrFn = getCreateChatAgentMutationFetcher(requestOptions);
|
|
1335
|
-
const query =
|
|
1419
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1336
1420
|
return {
|
|
1337
1421
|
swrKey,
|
|
1338
1422
|
...query
|
|
@@ -1342,13 +1426,7 @@ var getListChatAgentsUrl = (params) => {
|
|
|
1342
1426
|
const normalizedParams = new URLSearchParams();
|
|
1343
1427
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1344
1428
|
if (value !== void 0) {
|
|
1345
|
-
|
|
1346
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1347
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1348
|
-
}
|
|
1349
|
-
} else {
|
|
1350
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1351
|
-
}
|
|
1429
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1352
1430
|
}
|
|
1353
1431
|
});
|
|
1354
1432
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1366,7 +1444,7 @@ var useListChatAgents = (params, options) => {
|
|
|
1366
1444
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1367
1445
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListChatAgentsKey(params) : null);
|
|
1368
1446
|
const swrFn = () => listChatAgents(params, requestOptions);
|
|
1369
|
-
const query =
|
|
1447
|
+
const query = useSwr24(
|
|
1370
1448
|
swrKey,
|
|
1371
1449
|
swrFn,
|
|
1372
1450
|
swrOptions
|
|
@@ -1388,10 +1466,10 @@ var getChatAgent = async (chatAgentId, options) => {
|
|
|
1388
1466
|
var getGetChatAgentKey = (chatAgentId) => [`/v1/chat-agents/${chatAgentId}`];
|
|
1389
1467
|
var useGetChatAgent = (chatAgentId, options) => {
|
|
1390
1468
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1391
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1469
|
+
const isEnabled = swrOptions?.enabled !== false && chatAgentId !== null && chatAgentId !== void 0;
|
|
1392
1470
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetChatAgentKey(chatAgentId) : null);
|
|
1393
1471
|
const swrFn = () => getChatAgent(chatAgentId, requestOptions);
|
|
1394
|
-
const query =
|
|
1472
|
+
const query = useSwr24(
|
|
1395
1473
|
swrKey,
|
|
1396
1474
|
swrFn,
|
|
1397
1475
|
swrOptions
|
|
@@ -1405,12 +1483,21 @@ var getUpdateChatAgentUrl = (chatAgentId) => {
|
|
|
1405
1483
|
return `/v1/chat-agents/${chatAgentId}`;
|
|
1406
1484
|
};
|
|
1407
1485
|
var updateChatAgent = async (chatAgentId, updateChatAgentRequest, options) => {
|
|
1486
|
+
const getHeaders = (h) => {
|
|
1487
|
+
if (!h) return {};
|
|
1488
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1489
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1490
|
+
return h;
|
|
1491
|
+
};
|
|
1408
1492
|
return customFetch(
|
|
1409
1493
|
getUpdateChatAgentUrl(chatAgentId),
|
|
1410
1494
|
{
|
|
1411
1495
|
...options,
|
|
1412
1496
|
method: "PATCH",
|
|
1413
|
-
headers: {
|
|
1497
|
+
headers: {
|
|
1498
|
+
"Content-Type": "application/json",
|
|
1499
|
+
...getHeaders(options?.headers)
|
|
1500
|
+
},
|
|
1414
1501
|
body: JSON.stringify(updateChatAgentRequest)
|
|
1415
1502
|
}
|
|
1416
1503
|
);
|
|
@@ -1425,7 +1512,7 @@ var useUpdateChatAgent = (chatAgentId, options) => {
|
|
|
1425
1512
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1426
1513
|
const swrKey = swrOptions?.swrKey ?? getUpdateChatAgentMutationKey(chatAgentId);
|
|
1427
1514
|
const swrFn = getUpdateChatAgentMutationFetcher(chatAgentId, requestOptions);
|
|
1428
|
-
const query =
|
|
1515
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1429
1516
|
return {
|
|
1430
1517
|
swrKey,
|
|
1431
1518
|
...query
|
|
@@ -1453,7 +1540,7 @@ var useDeleteChatAgent = (chatAgentId, options) => {
|
|
|
1453
1540
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1454
1541
|
const swrKey = swrOptions?.swrKey ?? getDeleteChatAgentMutationKey(chatAgentId);
|
|
1455
1542
|
const swrFn = getDeleteChatAgentMutationFetcher(chatAgentId, requestOptions);
|
|
1456
|
-
const query =
|
|
1543
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1457
1544
|
return {
|
|
1458
1545
|
swrKey,
|
|
1459
1546
|
...query
|
|
@@ -1474,10 +1561,10 @@ var getChatAgentPrompt = async (chatAgentId, options) => {
|
|
|
1474
1561
|
var getGetChatAgentPromptKey = (chatAgentId) => [`/v1/chat-agents/${chatAgentId}/prompt`];
|
|
1475
1562
|
var useGetChatAgentPrompt = (chatAgentId, options) => {
|
|
1476
1563
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1477
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1564
|
+
const isEnabled = swrOptions?.enabled !== false && chatAgentId !== null && chatAgentId !== void 0;
|
|
1478
1565
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetChatAgentPromptKey(chatAgentId) : null);
|
|
1479
1566
|
const swrFn = () => getChatAgentPrompt(chatAgentId, requestOptions);
|
|
1480
|
-
const query =
|
|
1567
|
+
const query = useSwr24(
|
|
1481
1568
|
swrKey,
|
|
1482
1569
|
swrFn,
|
|
1483
1570
|
swrOptions
|
|
@@ -1491,12 +1578,21 @@ var getUpdateChatAgentPromptUrl = (chatAgentId) => {
|
|
|
1491
1578
|
return `/v1/chat-agents/${chatAgentId}/prompt`;
|
|
1492
1579
|
};
|
|
1493
1580
|
var updateChatAgentPrompt = async (chatAgentId, updateChatAgentPromptBody, options) => {
|
|
1581
|
+
const getHeaders = (h) => {
|
|
1582
|
+
if (!h) return {};
|
|
1583
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1584
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1585
|
+
return h;
|
|
1586
|
+
};
|
|
1494
1587
|
return customFetch(
|
|
1495
1588
|
getUpdateChatAgentPromptUrl(chatAgentId),
|
|
1496
1589
|
{
|
|
1497
1590
|
...options,
|
|
1498
1591
|
method: "PATCH",
|
|
1499
|
-
headers: {
|
|
1592
|
+
headers: {
|
|
1593
|
+
"Content-Type": "application/json",
|
|
1594
|
+
...getHeaders(options?.headers)
|
|
1595
|
+
},
|
|
1500
1596
|
body: JSON.stringify(updateChatAgentPromptBody)
|
|
1501
1597
|
}
|
|
1502
1598
|
);
|
|
@@ -1514,7 +1610,7 @@ var useUpdateChatAgentPrompt = (chatAgentId, options) => {
|
|
|
1514
1610
|
chatAgentId,
|
|
1515
1611
|
requestOptions
|
|
1516
1612
|
);
|
|
1517
|
-
const query =
|
|
1613
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1518
1614
|
return {
|
|
1519
1615
|
swrKey,
|
|
1520
1616
|
...query
|
|
@@ -1524,10 +1620,19 @@ var getCreateChatUrl = () => {
|
|
|
1524
1620
|
return `/public/v1/chats`;
|
|
1525
1621
|
};
|
|
1526
1622
|
var createChat = async (createChatBody, options) => {
|
|
1623
|
+
const getHeaders = (h) => {
|
|
1624
|
+
if (!h) return {};
|
|
1625
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1626
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1627
|
+
return h;
|
|
1628
|
+
};
|
|
1527
1629
|
return customFetch(getCreateChatUrl(), {
|
|
1528
1630
|
...options,
|
|
1529
1631
|
method: "POST",
|
|
1530
|
-
headers: {
|
|
1632
|
+
headers: {
|
|
1633
|
+
"Content-Type": "application/json",
|
|
1634
|
+
...getHeaders(options?.headers)
|
|
1635
|
+
},
|
|
1531
1636
|
body: JSON.stringify(createChatBody)
|
|
1532
1637
|
});
|
|
1533
1638
|
};
|
|
@@ -1541,7 +1646,7 @@ var useCreateChat = (options) => {
|
|
|
1541
1646
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1542
1647
|
const swrKey = swrOptions?.swrKey ?? getCreateChatMutationKey();
|
|
1543
1648
|
const swrFn = getCreateChatMutationFetcher(requestOptions);
|
|
1544
|
-
const query =
|
|
1649
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1545
1650
|
return {
|
|
1546
1651
|
swrKey,
|
|
1547
1652
|
...query
|
|
@@ -1559,10 +1664,10 @@ var getChat = async (chatId, options) => {
|
|
|
1559
1664
|
var getGetChatKey = (chatId) => [`/public/v1/chats/${chatId}`];
|
|
1560
1665
|
var useGetChat = (chatId, options) => {
|
|
1561
1666
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1562
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1667
|
+
const isEnabled = swrOptions?.enabled !== false && chatId !== null && chatId !== void 0;
|
|
1563
1668
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetChatKey(chatId) : null);
|
|
1564
1669
|
const swrFn = () => getChat(chatId, requestOptions);
|
|
1565
|
-
const query =
|
|
1670
|
+
const query = useSwr24(
|
|
1566
1671
|
swrKey,
|
|
1567
1672
|
swrFn,
|
|
1568
1673
|
swrOptions
|
|
@@ -1587,10 +1692,10 @@ var getPublicChatAgent = async (chatAgentId, options) => {
|
|
|
1587
1692
|
var getGetPublicChatAgentKey = (chatAgentId) => [`/public/v1/chat-agents/${chatAgentId}`];
|
|
1588
1693
|
var useGetPublicChatAgent = (chatAgentId, options) => {
|
|
1589
1694
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1590
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1695
|
+
const isEnabled = swrOptions?.enabled !== false && chatAgentId !== null && chatAgentId !== void 0;
|
|
1591
1696
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetPublicChatAgentKey(chatAgentId) : null);
|
|
1592
1697
|
const swrFn = () => getPublicChatAgent(chatAgentId, requestOptions);
|
|
1593
|
-
const query =
|
|
1698
|
+
const query = useSwr24(
|
|
1594
1699
|
swrKey,
|
|
1595
1700
|
swrFn,
|
|
1596
1701
|
swrOptions
|
|
@@ -1604,10 +1709,19 @@ var getPostChatMessageUrl = (chatId) => {
|
|
|
1604
1709
|
return `/public/v1/chats/${chatId}/messages`;
|
|
1605
1710
|
};
|
|
1606
1711
|
var postChatMessage = async (chatId, postChatMessageBody, options) => {
|
|
1712
|
+
const getHeaders = (h) => {
|
|
1713
|
+
if (!h) return {};
|
|
1714
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1715
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1716
|
+
return h;
|
|
1717
|
+
};
|
|
1607
1718
|
return customFetch(getPostChatMessageUrl(chatId), {
|
|
1608
1719
|
...options,
|
|
1609
1720
|
method: "POST",
|
|
1610
|
-
headers: {
|
|
1721
|
+
headers: {
|
|
1722
|
+
"Content-Type": "application/json",
|
|
1723
|
+
...getHeaders(options?.headers)
|
|
1724
|
+
},
|
|
1611
1725
|
body: JSON.stringify(postChatMessageBody)
|
|
1612
1726
|
});
|
|
1613
1727
|
};
|
|
@@ -1621,7 +1735,7 @@ var usePostChatMessage = (chatId, options) => {
|
|
|
1621
1735
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1622
1736
|
const swrKey = swrOptions?.swrKey ?? getPostChatMessageMutationKey(chatId);
|
|
1623
1737
|
const swrFn = getPostChatMessageMutationFetcher(chatId, requestOptions);
|
|
1624
|
-
const query =
|
|
1738
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1625
1739
|
return {
|
|
1626
1740
|
swrKey,
|
|
1627
1741
|
...query
|
|
@@ -1631,13 +1745,7 @@ var getListChatsUrl = (params) => {
|
|
|
1631
1745
|
const normalizedParams = new URLSearchParams();
|
|
1632
1746
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1633
1747
|
if (value !== void 0) {
|
|
1634
|
-
|
|
1635
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1636
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1637
|
-
}
|
|
1638
|
-
} else {
|
|
1639
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1640
|
-
}
|
|
1748
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1641
1749
|
}
|
|
1642
1750
|
});
|
|
1643
1751
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1655,7 +1763,7 @@ var useListChats = (params, options) => {
|
|
|
1655
1763
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1656
1764
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListChatsKey(params) : null);
|
|
1657
1765
|
const swrFn = () => listChats(params, requestOptions);
|
|
1658
|
-
const query =
|
|
1766
|
+
const query = useSwr24(
|
|
1659
1767
|
swrKey,
|
|
1660
1768
|
swrFn,
|
|
1661
1769
|
swrOptions
|
|
@@ -1669,13 +1777,7 @@ var getListChatMessagesUrl = (chatId, params) => {
|
|
|
1669
1777
|
const normalizedParams = new URLSearchParams();
|
|
1670
1778
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1671
1779
|
if (value !== void 0) {
|
|
1672
|
-
|
|
1673
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1674
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1675
|
-
}
|
|
1676
|
-
} else {
|
|
1677
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1678
|
-
}
|
|
1780
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1679
1781
|
}
|
|
1680
1782
|
});
|
|
1681
1783
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1693,10 +1795,10 @@ var listChatMessages = async (chatId, params, options) => {
|
|
|
1693
1795
|
var getListChatMessagesKey = (chatId, params) => [`/v1/chats/${chatId}/messages`, ...params ? [params] : []];
|
|
1694
1796
|
var useListChatMessages = (chatId, params, options) => {
|
|
1695
1797
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1696
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1798
|
+
const isEnabled = swrOptions?.enabled !== false && chatId !== null && chatId !== void 0;
|
|
1697
1799
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListChatMessagesKey(chatId, params) : null);
|
|
1698
1800
|
const swrFn = () => listChatMessages(chatId, params, requestOptions);
|
|
1699
|
-
const query =
|
|
1801
|
+
const query = useSwr24(
|
|
1700
1802
|
swrKey,
|
|
1701
1803
|
swrFn,
|
|
1702
1804
|
swrOptions
|
|
@@ -1710,13 +1812,7 @@ var getListDispatchesUrl = (params) => {
|
|
|
1710
1812
|
const normalizedParams = new URLSearchParams();
|
|
1711
1813
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1712
1814
|
if (value !== void 0) {
|
|
1713
|
-
|
|
1714
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1715
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1716
|
-
}
|
|
1717
|
-
} else {
|
|
1718
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1719
|
-
}
|
|
1815
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1720
1816
|
}
|
|
1721
1817
|
});
|
|
1722
1818
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1734,7 +1830,7 @@ var useListDispatches = (params, options) => {
|
|
|
1734
1830
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1735
1831
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListDispatchesKey(params) : null);
|
|
1736
1832
|
const swrFn = () => listDispatches(params, requestOptions);
|
|
1737
|
-
const query =
|
|
1833
|
+
const query = useSwr24(
|
|
1738
1834
|
swrKey,
|
|
1739
1835
|
swrFn,
|
|
1740
1836
|
swrOptions
|
|
@@ -1756,10 +1852,10 @@ var getEmail = async (emailId, options) => {
|
|
|
1756
1852
|
var getGetEmailKey = (emailId) => [`/v1/emails/${emailId}`];
|
|
1757
1853
|
var useGetEmail = (emailId, options) => {
|
|
1758
1854
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1759
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
1855
|
+
const isEnabled = swrOptions?.enabled !== false && emailId !== null && emailId !== void 0;
|
|
1760
1856
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetEmailKey(emailId) : null);
|
|
1761
1857
|
const swrFn = () => getEmail(emailId, requestOptions);
|
|
1762
|
-
const query =
|
|
1858
|
+
const query = useSwr24(
|
|
1763
1859
|
swrKey,
|
|
1764
1860
|
swrFn,
|
|
1765
1861
|
swrOptions
|
|
@@ -1788,7 +1884,7 @@ var useDeleteEmail = (emailId, options) => {
|
|
|
1788
1884
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1789
1885
|
const swrKey = swrOptions?.swrKey ?? getDeleteEmailMutationKey(emailId);
|
|
1790
1886
|
const swrFn = getDeleteEmailMutationFetcher(emailId, requestOptions);
|
|
1791
|
-
const query =
|
|
1887
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1792
1888
|
return {
|
|
1793
1889
|
swrKey,
|
|
1794
1890
|
...query
|
|
@@ -1798,13 +1894,7 @@ var getListEmailsUrl = (params) => {
|
|
|
1798
1894
|
const normalizedParams = new URLSearchParams();
|
|
1799
1895
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1800
1896
|
if (value !== void 0) {
|
|
1801
|
-
|
|
1802
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1803
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1804
|
-
}
|
|
1805
|
-
} else {
|
|
1806
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1807
|
-
}
|
|
1897
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1808
1898
|
}
|
|
1809
1899
|
});
|
|
1810
1900
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1822,7 +1912,7 @@ var useListEmails = (params, options) => {
|
|
|
1822
1912
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1823
1913
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListEmailsKey(params) : null);
|
|
1824
1914
|
const swrFn = () => listEmails(params, requestOptions);
|
|
1825
|
-
const query =
|
|
1915
|
+
const query = useSwr24(
|
|
1826
1916
|
swrKey,
|
|
1827
1917
|
swrFn,
|
|
1828
1918
|
swrOptions
|
|
@@ -1836,13 +1926,7 @@ var getListEmailThreadsUrl = (params) => {
|
|
|
1836
1926
|
const normalizedParams = new URLSearchParams();
|
|
1837
1927
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1838
1928
|
if (value !== void 0) {
|
|
1839
|
-
|
|
1840
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
1841
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1842
|
-
}
|
|
1843
|
-
} else {
|
|
1844
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1845
|
-
}
|
|
1929
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1846
1930
|
}
|
|
1847
1931
|
});
|
|
1848
1932
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -1860,7 +1944,7 @@ var useListEmailThreads = (params, options) => {
|
|
|
1860
1944
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1861
1945
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListEmailThreadsKey(params) : null);
|
|
1862
1946
|
const swrFn = () => listEmailThreads(params, requestOptions);
|
|
1863
|
-
const query =
|
|
1947
|
+
const query = useSwr24(
|
|
1864
1948
|
swrKey,
|
|
1865
1949
|
swrFn,
|
|
1866
1950
|
swrOptions
|
|
@@ -1874,10 +1958,19 @@ var getReplyToEmailUrl = (emailId) => {
|
|
|
1874
1958
|
return `/v1/emails/${emailId}/reply`;
|
|
1875
1959
|
};
|
|
1876
1960
|
var replyToEmail = async (emailId, replyToEmailBody, options) => {
|
|
1961
|
+
const getHeaders = (h) => {
|
|
1962
|
+
if (!h) return {};
|
|
1963
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1964
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
1965
|
+
return h;
|
|
1966
|
+
};
|
|
1877
1967
|
return customFetch(getReplyToEmailUrl(emailId), {
|
|
1878
1968
|
...options,
|
|
1879
1969
|
method: "POST",
|
|
1880
|
-
headers: {
|
|
1970
|
+
headers: {
|
|
1971
|
+
"Content-Type": "application/json",
|
|
1972
|
+
...getHeaders(options?.headers)
|
|
1973
|
+
},
|
|
1881
1974
|
body: JSON.stringify(replyToEmailBody)
|
|
1882
1975
|
});
|
|
1883
1976
|
};
|
|
@@ -1891,7 +1984,7 @@ var useReplyToEmail = (emailId, options) => {
|
|
|
1891
1984
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1892
1985
|
const swrKey = swrOptions?.swrKey ?? getReplyToEmailMutationKey(emailId);
|
|
1893
1986
|
const swrFn = getReplyToEmailMutationFetcher(emailId, requestOptions);
|
|
1894
|
-
const query =
|
|
1987
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1895
1988
|
return {
|
|
1896
1989
|
swrKey,
|
|
1897
1990
|
...query
|
|
@@ -1901,10 +1994,19 @@ var getSendEmailUrl = () => {
|
|
|
1901
1994
|
return `/v1/emails/send`;
|
|
1902
1995
|
};
|
|
1903
1996
|
var sendEmail = async (sendEmailBody, options) => {
|
|
1997
|
+
const getHeaders = (h) => {
|
|
1998
|
+
if (!h) return {};
|
|
1999
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2000
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2001
|
+
return h;
|
|
2002
|
+
};
|
|
1904
2003
|
return customFetch(getSendEmailUrl(), {
|
|
1905
2004
|
...options,
|
|
1906
2005
|
method: "POST",
|
|
1907
|
-
headers: {
|
|
2006
|
+
headers: {
|
|
2007
|
+
"Content-Type": "application/json",
|
|
2008
|
+
...getHeaders(options?.headers)
|
|
2009
|
+
},
|
|
1908
2010
|
body: JSON.stringify(sendEmailBody)
|
|
1909
2011
|
});
|
|
1910
2012
|
};
|
|
@@ -1918,7 +2020,99 @@ var useSendEmail = (options) => {
|
|
|
1918
2020
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1919
2021
|
const swrKey = swrOptions?.swrKey ?? getSendEmailMutationKey();
|
|
1920
2022
|
const swrFn = getSendEmailMutationFetcher(requestOptions);
|
|
1921
|
-
const query =
|
|
2023
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2024
|
+
return {
|
|
2025
|
+
swrKey,
|
|
2026
|
+
...query
|
|
2027
|
+
};
|
|
2028
|
+
};
|
|
2029
|
+
var getCreateWorkerEvalFromRunUrl = (workerRunId) => {
|
|
2030
|
+
return `/v1/worker-runs/${workerRunId}/evals`;
|
|
2031
|
+
};
|
|
2032
|
+
var createWorkerEvalFromRun = async (workerRunId, createWorkerEvalFromRunBody, options) => {
|
|
2033
|
+
const getHeaders = (h) => {
|
|
2034
|
+
if (!h) return {};
|
|
2035
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2036
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2037
|
+
return h;
|
|
2038
|
+
};
|
|
2039
|
+
return customFetch(
|
|
2040
|
+
getCreateWorkerEvalFromRunUrl(workerRunId),
|
|
2041
|
+
{
|
|
2042
|
+
...options,
|
|
2043
|
+
method: "POST",
|
|
2044
|
+
headers: {
|
|
2045
|
+
"Content-Type": "application/json",
|
|
2046
|
+
...getHeaders(options?.headers)
|
|
2047
|
+
},
|
|
2048
|
+
body: JSON.stringify(createWorkerEvalFromRunBody)
|
|
2049
|
+
}
|
|
2050
|
+
);
|
|
2051
|
+
};
|
|
2052
|
+
var getCreateWorkerEvalFromRunMutationFetcher = (workerRunId, options) => {
|
|
2053
|
+
return (_, { arg }) => {
|
|
2054
|
+
return createWorkerEvalFromRun(workerRunId, arg, options);
|
|
2055
|
+
};
|
|
2056
|
+
};
|
|
2057
|
+
var getCreateWorkerEvalFromRunMutationKey = (workerRunId) => [`/v1/worker-runs/${workerRunId}/evals`];
|
|
2058
|
+
var useCreateWorkerEvalFromRun = (workerRunId, options) => {
|
|
2059
|
+
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2060
|
+
const swrKey = swrOptions?.swrKey ?? getCreateWorkerEvalFromRunMutationKey(workerRunId);
|
|
2061
|
+
const swrFn = getCreateWorkerEvalFromRunMutationFetcher(
|
|
2062
|
+
workerRunId,
|
|
2063
|
+
requestOptions
|
|
2064
|
+
);
|
|
2065
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2066
|
+
return {
|
|
2067
|
+
swrKey,
|
|
2068
|
+
...query
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
var getRunEvalUrl = (evalId) => {
|
|
2072
|
+
return `/v1/evals/${evalId}/runs`;
|
|
2073
|
+
};
|
|
2074
|
+
var runEval = async (evalId, options) => {
|
|
2075
|
+
return customFetch(getRunEvalUrl(evalId), {
|
|
2076
|
+
...options,
|
|
2077
|
+
method: "POST"
|
|
2078
|
+
});
|
|
2079
|
+
};
|
|
2080
|
+
var getRunEvalMutationFetcher = (evalId, options) => {
|
|
2081
|
+
return (_, __) => {
|
|
2082
|
+
return runEval(evalId, options);
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2085
|
+
var getRunEvalMutationKey = (evalId) => [`/v1/evals/${evalId}/runs`];
|
|
2086
|
+
var useRunEval = (evalId, options) => {
|
|
2087
|
+
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2088
|
+
const swrKey = swrOptions?.swrKey ?? getRunEvalMutationKey(evalId);
|
|
2089
|
+
const swrFn = getRunEvalMutationFetcher(evalId, requestOptions);
|
|
2090
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2091
|
+
return {
|
|
2092
|
+
swrKey,
|
|
2093
|
+
...query
|
|
2094
|
+
};
|
|
2095
|
+
};
|
|
2096
|
+
var getGetEvalRunUrl = (evalRunId) => {
|
|
2097
|
+
return `/v1/eval-runs/${evalRunId}`;
|
|
2098
|
+
};
|
|
2099
|
+
var getEvalRun = async (evalRunId, options) => {
|
|
2100
|
+
return customFetch(getGetEvalRunUrl(evalRunId), {
|
|
2101
|
+
...options,
|
|
2102
|
+
method: "GET"
|
|
2103
|
+
});
|
|
2104
|
+
};
|
|
2105
|
+
var getGetEvalRunKey = (evalRunId) => [`/v1/eval-runs/${evalRunId}`];
|
|
2106
|
+
var useGetEvalRun = (evalRunId, options) => {
|
|
2107
|
+
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2108
|
+
const isEnabled = swrOptions?.enabled !== false && evalRunId !== null && evalRunId !== void 0;
|
|
2109
|
+
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetEvalRunKey(evalRunId) : null);
|
|
2110
|
+
const swrFn = () => getEvalRun(evalRunId, requestOptions);
|
|
2111
|
+
const query = useSwr24(
|
|
2112
|
+
swrKey,
|
|
2113
|
+
swrFn,
|
|
2114
|
+
swrOptions
|
|
2115
|
+
);
|
|
1922
2116
|
return {
|
|
1923
2117
|
swrKey,
|
|
1924
2118
|
...query
|
|
@@ -1926,18 +2120,27 @@ var useSendEmail = (options) => {
|
|
|
1926
2120
|
};
|
|
1927
2121
|
var getListExtractorJobsUrl = (params) => {
|
|
1928
2122
|
const normalizedParams = new URLSearchParams();
|
|
2123
|
+
const deepObjectEntries = [];
|
|
1929
2124
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
2125
|
+
const deepObjectParameters = ["scope"];
|
|
2126
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && deepObjectParameters.includes(key)) {
|
|
2127
|
+
Object.entries(value).forEach(([subKey, subValue]) => {
|
|
2128
|
+
if (subValue !== void 0) {
|
|
2129
|
+
deepObjectEntries.push(
|
|
2130
|
+
encodeURIComponent(key) + "[" + encodeURIComponent(subKey) + "]=" + (subValue === null ? "null" : encodeURIComponent(String(subValue)))
|
|
2131
|
+
);
|
|
1934
2132
|
}
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
|
|
2133
|
+
});
|
|
2134
|
+
return;
|
|
2135
|
+
}
|
|
2136
|
+
if (value !== void 0) {
|
|
2137
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1938
2138
|
}
|
|
1939
2139
|
});
|
|
1940
|
-
const stringifiedParams =
|
|
2140
|
+
const stringifiedParams = [
|
|
2141
|
+
normalizedParams.toString(),
|
|
2142
|
+
deepObjectEntries.join("&")
|
|
2143
|
+
].filter(Boolean).join("&");
|
|
1941
2144
|
return stringifiedParams.length > 0 ? `/v1/extractor-jobs?${stringifiedParams}` : `/v1/extractor-jobs`;
|
|
1942
2145
|
};
|
|
1943
2146
|
var listExtractorJobs = async (params, options) => {
|
|
@@ -1955,7 +2158,7 @@ var useListExtractorJobs = (params, options) => {
|
|
|
1955
2158
|
const isEnabled = swrOptions?.enabled !== false;
|
|
1956
2159
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListExtractorJobsKey(params) : null);
|
|
1957
2160
|
const swrFn = () => listExtractorJobs(params, requestOptions);
|
|
1958
|
-
const query =
|
|
2161
|
+
const query = useSwr24(
|
|
1959
2162
|
swrKey,
|
|
1960
2163
|
swrFn,
|
|
1961
2164
|
swrOptions
|
|
@@ -1969,10 +2172,19 @@ var getCreateExtractorJobUrl = () => {
|
|
|
1969
2172
|
return `/v1/extractor-jobs`;
|
|
1970
2173
|
};
|
|
1971
2174
|
var createExtractorJob = async (createExtractorJobBody, options) => {
|
|
2175
|
+
const getHeaders = (h) => {
|
|
2176
|
+
if (!h) return {};
|
|
2177
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2178
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2179
|
+
return h;
|
|
2180
|
+
};
|
|
1972
2181
|
return customFetch(getCreateExtractorJobUrl(), {
|
|
1973
2182
|
...options,
|
|
1974
2183
|
method: "POST",
|
|
1975
|
-
headers: {
|
|
2184
|
+
headers: {
|
|
2185
|
+
"Content-Type": "application/json",
|
|
2186
|
+
...getHeaders(options?.headers)
|
|
2187
|
+
},
|
|
1976
2188
|
body: JSON.stringify(createExtractorJobBody)
|
|
1977
2189
|
});
|
|
1978
2190
|
};
|
|
@@ -1986,7 +2198,7 @@ var useCreateExtractorJob = (options) => {
|
|
|
1986
2198
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
1987
2199
|
const swrKey = swrOptions?.swrKey ?? getCreateExtractorJobMutationKey();
|
|
1988
2200
|
const swrFn = getCreateExtractorJobMutationFetcher(requestOptions);
|
|
1989
|
-
const query =
|
|
2201
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
1990
2202
|
return {
|
|
1991
2203
|
swrKey,
|
|
1992
2204
|
...query
|
|
@@ -2004,10 +2216,10 @@ var getExtractorJob = async (id, options) => {
|
|
|
2004
2216
|
var getGetExtractorJobKey = (id) => [`/v1/extractor-jobs/${id}`];
|
|
2005
2217
|
var useGetExtractorJob = (id, options) => {
|
|
2006
2218
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2007
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
2219
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
2008
2220
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetExtractorJobKey(id) : null);
|
|
2009
2221
|
const swrFn = () => getExtractorJob(id, requestOptions);
|
|
2010
|
-
const query =
|
|
2222
|
+
const query = useSwr24(
|
|
2011
2223
|
swrKey,
|
|
2012
2224
|
swrFn,
|
|
2013
2225
|
swrOptions
|
|
@@ -2021,10 +2233,19 @@ var getCreateExtractorUrl = () => {
|
|
|
2021
2233
|
return `/v1/extractors`;
|
|
2022
2234
|
};
|
|
2023
2235
|
var createExtractor = async (createExtractorBody, options) => {
|
|
2236
|
+
const getHeaders = (h) => {
|
|
2237
|
+
if (!h) return {};
|
|
2238
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2239
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2240
|
+
return h;
|
|
2241
|
+
};
|
|
2024
2242
|
return customFetch(getCreateExtractorUrl(), {
|
|
2025
2243
|
...options,
|
|
2026
2244
|
method: "POST",
|
|
2027
|
-
headers: {
|
|
2245
|
+
headers: {
|
|
2246
|
+
"Content-Type": "application/json",
|
|
2247
|
+
...getHeaders(options?.headers)
|
|
2248
|
+
},
|
|
2028
2249
|
body: JSON.stringify(createExtractorBody)
|
|
2029
2250
|
});
|
|
2030
2251
|
};
|
|
@@ -2038,7 +2259,7 @@ var useCreateExtractor = (options) => {
|
|
|
2038
2259
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2039
2260
|
const swrKey = swrOptions?.swrKey ?? getCreateExtractorMutationKey();
|
|
2040
2261
|
const swrFn = getCreateExtractorMutationFetcher(requestOptions);
|
|
2041
|
-
const query =
|
|
2262
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2042
2263
|
return {
|
|
2043
2264
|
swrKey,
|
|
2044
2265
|
...query
|
|
@@ -2048,13 +2269,7 @@ var getListExtractorsUrl = (params) => {
|
|
|
2048
2269
|
const normalizedParams = new URLSearchParams();
|
|
2049
2270
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2050
2271
|
if (value !== void 0) {
|
|
2051
|
-
|
|
2052
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2053
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2054
|
-
}
|
|
2055
|
-
} else {
|
|
2056
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2057
|
-
}
|
|
2272
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2058
2273
|
}
|
|
2059
2274
|
});
|
|
2060
2275
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2072,7 +2287,7 @@ var useListExtractors = (params, options) => {
|
|
|
2072
2287
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2073
2288
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListExtractorsKey(params) : null);
|
|
2074
2289
|
const swrFn = () => listExtractors(params, requestOptions);
|
|
2075
|
-
const query =
|
|
2290
|
+
const query = useSwr24(
|
|
2076
2291
|
swrKey,
|
|
2077
2292
|
swrFn,
|
|
2078
2293
|
swrOptions
|
|
@@ -2094,10 +2309,10 @@ var getExtractor = async (id, options) => {
|
|
|
2094
2309
|
var getGetExtractorKey = (id) => [`/v1/extractors/${id}`];
|
|
2095
2310
|
var useGetExtractor = (id, options) => {
|
|
2096
2311
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2097
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
2312
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
2098
2313
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetExtractorKey(id) : null);
|
|
2099
2314
|
const swrFn = () => getExtractor(id, requestOptions);
|
|
2100
|
-
const query =
|
|
2315
|
+
const query = useSwr24(
|
|
2101
2316
|
swrKey,
|
|
2102
2317
|
swrFn,
|
|
2103
2318
|
swrOptions
|
|
@@ -2111,10 +2326,19 @@ var getUpdateExtractorUrl = (id) => {
|
|
|
2111
2326
|
return `/v1/extractors/${id}`;
|
|
2112
2327
|
};
|
|
2113
2328
|
var updateExtractor = async (id, updateExtractorBody, options) => {
|
|
2329
|
+
const getHeaders = (h) => {
|
|
2330
|
+
if (!h) return {};
|
|
2331
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2332
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2333
|
+
return h;
|
|
2334
|
+
};
|
|
2114
2335
|
return customFetch(getUpdateExtractorUrl(id), {
|
|
2115
2336
|
...options,
|
|
2116
2337
|
method: "PATCH",
|
|
2117
|
-
headers: {
|
|
2338
|
+
headers: {
|
|
2339
|
+
"Content-Type": "application/json",
|
|
2340
|
+
...getHeaders(options?.headers)
|
|
2341
|
+
},
|
|
2118
2342
|
body: JSON.stringify(updateExtractorBody)
|
|
2119
2343
|
});
|
|
2120
2344
|
};
|
|
@@ -2128,7 +2352,7 @@ var useUpdateExtractor = (id, options) => {
|
|
|
2128
2352
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2129
2353
|
const swrKey = swrOptions?.swrKey ?? getUpdateExtractorMutationKey(id);
|
|
2130
2354
|
const swrFn = getUpdateExtractorMutationFetcher(id, requestOptions);
|
|
2131
|
-
const query =
|
|
2355
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2132
2356
|
return {
|
|
2133
2357
|
swrKey,
|
|
2134
2358
|
...query
|
|
@@ -2153,7 +2377,7 @@ var useDeleteExtractor = (id, options) => {
|
|
|
2153
2377
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2154
2378
|
const swrKey = swrOptions?.swrKey ?? getDeleteExtractorMutationKey(id);
|
|
2155
2379
|
const swrFn = getDeleteExtractorMutationFetcher(id, requestOptions);
|
|
2156
|
-
const query =
|
|
2380
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2157
2381
|
return {
|
|
2158
2382
|
swrKey,
|
|
2159
2383
|
...query
|
|
@@ -2171,10 +2395,10 @@ var getExtract = async (id, options) => {
|
|
|
2171
2395
|
var getGetExtractKey = (id) => [`/v1/extracts/${id}`];
|
|
2172
2396
|
var useGetExtract = (id, options) => {
|
|
2173
2397
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2174
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
2398
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
2175
2399
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetExtractKey(id) : null);
|
|
2176
2400
|
const swrFn = () => getExtract(id, requestOptions);
|
|
2177
|
-
const query =
|
|
2401
|
+
const query = useSwr24(
|
|
2178
2402
|
swrKey,
|
|
2179
2403
|
swrFn,
|
|
2180
2404
|
swrOptions
|
|
@@ -2199,10 +2423,10 @@ var getExtractCitations = async (id, options) => {
|
|
|
2199
2423
|
var getGetExtractCitationsKey = (id) => [`/v1/extracts/${id}/citations`];
|
|
2200
2424
|
var useGetExtractCitations = (id, options) => {
|
|
2201
2425
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2202
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
2426
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
2203
2427
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetExtractCitationsKey(id) : null);
|
|
2204
2428
|
const swrFn = () => getExtractCitations(id, requestOptions);
|
|
2205
|
-
const query =
|
|
2429
|
+
const query = useSwr24(
|
|
2206
2430
|
swrKey,
|
|
2207
2431
|
swrFn,
|
|
2208
2432
|
swrOptions
|
|
@@ -2214,18 +2438,27 @@ var useGetExtractCitations = (id, options) => {
|
|
|
2214
2438
|
};
|
|
2215
2439
|
var getListExtractsUrl = (params) => {
|
|
2216
2440
|
const normalizedParams = new URLSearchParams();
|
|
2441
|
+
const deepObjectEntries = [];
|
|
2217
2442
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2443
|
+
const deepObjectParameters = ["scope"];
|
|
2444
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && deepObjectParameters.includes(key)) {
|
|
2445
|
+
Object.entries(value).forEach(([subKey, subValue]) => {
|
|
2446
|
+
if (subValue !== void 0) {
|
|
2447
|
+
deepObjectEntries.push(
|
|
2448
|
+
encodeURIComponent(key) + "[" + encodeURIComponent(subKey) + "]=" + (subValue === null ? "null" : encodeURIComponent(String(subValue)))
|
|
2449
|
+
);
|
|
2222
2450
|
}
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
|
|
2451
|
+
});
|
|
2452
|
+
return;
|
|
2453
|
+
}
|
|
2454
|
+
if (value !== void 0) {
|
|
2455
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2226
2456
|
}
|
|
2227
2457
|
});
|
|
2228
|
-
const stringifiedParams =
|
|
2458
|
+
const stringifiedParams = [
|
|
2459
|
+
normalizedParams.toString(),
|
|
2460
|
+
deepObjectEntries.join("&")
|
|
2461
|
+
].filter(Boolean).join("&");
|
|
2229
2462
|
return stringifiedParams.length > 0 ? `/v1/extracts?${stringifiedParams}` : `/v1/extracts`;
|
|
2230
2463
|
};
|
|
2231
2464
|
var listExtracts = async (params, options) => {
|
|
@@ -2240,7 +2473,7 @@ var useListExtracts = (params, options) => {
|
|
|
2240
2473
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2241
2474
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListExtractsKey(params) : null);
|
|
2242
2475
|
const swrFn = () => listExtracts(params, requestOptions);
|
|
2243
|
-
const query =
|
|
2476
|
+
const query = useSwr24(
|
|
2244
2477
|
swrKey,
|
|
2245
2478
|
swrFn,
|
|
2246
2479
|
swrOptions
|
|
@@ -2254,13 +2487,7 @@ var getCheckInboxAvailabilityUrl = (params) => {
|
|
|
2254
2487
|
const normalizedParams = new URLSearchParams();
|
|
2255
2488
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2256
2489
|
if (value !== void 0) {
|
|
2257
|
-
|
|
2258
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2259
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2260
|
-
}
|
|
2261
|
-
} else {
|
|
2262
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2263
|
-
}
|
|
2490
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2264
2491
|
}
|
|
2265
2492
|
});
|
|
2266
2493
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2281,7 +2508,7 @@ var useCheckInboxAvailability = (params, options) => {
|
|
|
2281
2508
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2282
2509
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getCheckInboxAvailabilityKey(params) : null);
|
|
2283
2510
|
const swrFn = () => checkInboxAvailability(params, requestOptions);
|
|
2284
|
-
const query =
|
|
2511
|
+
const query = useSwr24(
|
|
2285
2512
|
swrKey,
|
|
2286
2513
|
swrFn,
|
|
2287
2514
|
swrOptions
|
|
@@ -2295,10 +2522,19 @@ var getCreateInboxUrl = () => {
|
|
|
2295
2522
|
return `/v1/inboxes`;
|
|
2296
2523
|
};
|
|
2297
2524
|
var createInbox = async (createInboxBody, options) => {
|
|
2525
|
+
const getHeaders = (h) => {
|
|
2526
|
+
if (!h) return {};
|
|
2527
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2528
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2529
|
+
return h;
|
|
2530
|
+
};
|
|
2298
2531
|
return customFetch(getCreateInboxUrl(), {
|
|
2299
2532
|
...options,
|
|
2300
2533
|
method: "POST",
|
|
2301
|
-
headers: {
|
|
2534
|
+
headers: {
|
|
2535
|
+
"Content-Type": "application/json",
|
|
2536
|
+
...getHeaders(options?.headers)
|
|
2537
|
+
},
|
|
2302
2538
|
body: JSON.stringify(createInboxBody)
|
|
2303
2539
|
});
|
|
2304
2540
|
};
|
|
@@ -2312,7 +2548,7 @@ var useCreateInbox = (options) => {
|
|
|
2312
2548
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2313
2549
|
const swrKey = swrOptions?.swrKey ?? getCreateInboxMutationKey();
|
|
2314
2550
|
const swrFn = getCreateInboxMutationFetcher(requestOptions);
|
|
2315
|
-
const query =
|
|
2551
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2316
2552
|
return {
|
|
2317
2553
|
swrKey,
|
|
2318
2554
|
...query
|
|
@@ -2322,13 +2558,7 @@ var getListInboxesUrl = (params) => {
|
|
|
2322
2558
|
const normalizedParams = new URLSearchParams();
|
|
2323
2559
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2324
2560
|
if (value !== void 0) {
|
|
2325
|
-
|
|
2326
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2327
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2328
|
-
}
|
|
2329
|
-
} else {
|
|
2330
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2331
|
-
}
|
|
2561
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2332
2562
|
}
|
|
2333
2563
|
});
|
|
2334
2564
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2346,7 +2576,7 @@ var useListInboxes = (params, options) => {
|
|
|
2346
2576
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2347
2577
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListInboxesKey(params) : null);
|
|
2348
2578
|
const swrFn = () => listInboxes(params, requestOptions);
|
|
2349
|
-
const query =
|
|
2579
|
+
const query = useSwr24(
|
|
2350
2580
|
swrKey,
|
|
2351
2581
|
swrFn,
|
|
2352
2582
|
swrOptions
|
|
@@ -2360,10 +2590,19 @@ var getUpdateInboxUrl = (inboxId) => {
|
|
|
2360
2590
|
return `/v1/inboxes/${inboxId}`;
|
|
2361
2591
|
};
|
|
2362
2592
|
var updateInbox = async (inboxId, updateInboxBody, options) => {
|
|
2593
|
+
const getHeaders = (h) => {
|
|
2594
|
+
if (!h) return {};
|
|
2595
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2596
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2597
|
+
return h;
|
|
2598
|
+
};
|
|
2363
2599
|
return customFetch(getUpdateInboxUrl(inboxId), {
|
|
2364
2600
|
...options,
|
|
2365
2601
|
method: "PATCH",
|
|
2366
|
-
headers: {
|
|
2602
|
+
headers: {
|
|
2603
|
+
"Content-Type": "application/json",
|
|
2604
|
+
...getHeaders(options?.headers)
|
|
2605
|
+
},
|
|
2367
2606
|
body: JSON.stringify(updateInboxBody)
|
|
2368
2607
|
});
|
|
2369
2608
|
};
|
|
@@ -2377,7 +2616,7 @@ var useUpdateInbox = (inboxId, options) => {
|
|
|
2377
2616
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2378
2617
|
const swrKey = swrOptions?.swrKey ?? getUpdateInboxMutationKey(inboxId);
|
|
2379
2618
|
const swrFn = getUpdateInboxMutationFetcher(inboxId, requestOptions);
|
|
2380
|
-
const query =
|
|
2619
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2381
2620
|
return {
|
|
2382
2621
|
swrKey,
|
|
2383
2622
|
...query
|
|
@@ -2402,7 +2641,7 @@ var useDeleteInbox = (inboxId, options) => {
|
|
|
2402
2641
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2403
2642
|
const swrKey = swrOptions?.swrKey ?? getDeleteInboxMutationKey(inboxId);
|
|
2404
2643
|
const swrFn = getDeleteInboxMutationFetcher(inboxId, requestOptions);
|
|
2405
|
-
const query =
|
|
2644
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2406
2645
|
return {
|
|
2407
2646
|
swrKey,
|
|
2408
2647
|
...query
|
|
@@ -2412,12 +2651,21 @@ var getCreateInformationRequestUrl = () => {
|
|
|
2412
2651
|
return `/v1/information-requests`;
|
|
2413
2652
|
};
|
|
2414
2653
|
var createInformationRequest = async (createInformationRequestBody, options) => {
|
|
2654
|
+
const getHeaders = (h) => {
|
|
2655
|
+
if (!h) return {};
|
|
2656
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2657
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2658
|
+
return h;
|
|
2659
|
+
};
|
|
2415
2660
|
return customFetch(
|
|
2416
2661
|
getCreateInformationRequestUrl(),
|
|
2417
2662
|
{
|
|
2418
2663
|
...options,
|
|
2419
2664
|
method: "POST",
|
|
2420
|
-
headers: {
|
|
2665
|
+
headers: {
|
|
2666
|
+
"Content-Type": "application/json",
|
|
2667
|
+
...getHeaders(options?.headers)
|
|
2668
|
+
},
|
|
2421
2669
|
body: JSON.stringify(createInformationRequestBody)
|
|
2422
2670
|
}
|
|
2423
2671
|
);
|
|
@@ -2432,7 +2680,7 @@ var useCreateInformationRequest = (options) => {
|
|
|
2432
2680
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2433
2681
|
const swrKey = swrOptions?.swrKey ?? getCreateInformationRequestMutationKey();
|
|
2434
2682
|
const swrFn = getCreateInformationRequestMutationFetcher(requestOptions);
|
|
2435
|
-
const query =
|
|
2683
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2436
2684
|
return {
|
|
2437
2685
|
swrKey,
|
|
2438
2686
|
...query
|
|
@@ -2442,13 +2690,7 @@ var getListInformationRequestsUrl = (params) => {
|
|
|
2442
2690
|
const normalizedParams = new URLSearchParams();
|
|
2443
2691
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2444
2692
|
if (value !== void 0) {
|
|
2445
|
-
|
|
2446
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2447
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2448
|
-
}
|
|
2449
|
-
} else {
|
|
2450
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2451
|
-
}
|
|
2693
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2452
2694
|
}
|
|
2453
2695
|
});
|
|
2454
2696
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2469,7 +2711,7 @@ var useListInformationRequests = (params, options) => {
|
|
|
2469
2711
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2470
2712
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListInformationRequestsKey(params) : null);
|
|
2471
2713
|
const swrFn = () => listInformationRequests(params, requestOptions);
|
|
2472
|
-
const query =
|
|
2714
|
+
const query = useSwr24(
|
|
2473
2715
|
swrKey,
|
|
2474
2716
|
swrFn,
|
|
2475
2717
|
swrOptions
|
|
@@ -2494,10 +2736,10 @@ var getInformationRequest = async (informationRequestId, options) => {
|
|
|
2494
2736
|
var getGetInformationRequestKey = (informationRequestId) => [`/v1/information-requests/${informationRequestId}`];
|
|
2495
2737
|
var useGetInformationRequest = (informationRequestId, options) => {
|
|
2496
2738
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2497
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
2739
|
+
const isEnabled = swrOptions?.enabled !== false && informationRequestId !== null && informationRequestId !== void 0;
|
|
2498
2740
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetInformationRequestKey(informationRequestId) : null);
|
|
2499
2741
|
const swrFn = () => getInformationRequest(informationRequestId, requestOptions);
|
|
2500
|
-
const query =
|
|
2742
|
+
const query = useSwr24(
|
|
2501
2743
|
swrKey,
|
|
2502
2744
|
swrFn,
|
|
2503
2745
|
swrOptions
|
|
@@ -2511,12 +2753,21 @@ var getResolveInformationRequestUrl = (informationRequestId) => {
|
|
|
2511
2753
|
return `/v1/information-requests/${informationRequestId}/resolve`;
|
|
2512
2754
|
};
|
|
2513
2755
|
var resolveInformationRequest = async (informationRequestId, resolveInformationRequestBody, options) => {
|
|
2756
|
+
const getHeaders = (h) => {
|
|
2757
|
+
if (!h) return {};
|
|
2758
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2759
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2760
|
+
return h;
|
|
2761
|
+
};
|
|
2514
2762
|
return customFetch(
|
|
2515
2763
|
getResolveInformationRequestUrl(informationRequestId),
|
|
2516
2764
|
{
|
|
2517
2765
|
...options,
|
|
2518
2766
|
method: "POST",
|
|
2519
|
-
headers: {
|
|
2767
|
+
headers: {
|
|
2768
|
+
"Content-Type": "application/json",
|
|
2769
|
+
...getHeaders(options?.headers)
|
|
2770
|
+
},
|
|
2520
2771
|
body: JSON.stringify(resolveInformationRequestBody)
|
|
2521
2772
|
}
|
|
2522
2773
|
);
|
|
@@ -2534,7 +2785,7 @@ var useResolveInformationRequest = (informationRequestId, options) => {
|
|
|
2534
2785
|
informationRequestId,
|
|
2535
2786
|
requestOptions
|
|
2536
2787
|
);
|
|
2537
|
-
const query =
|
|
2788
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2538
2789
|
return {
|
|
2539
2790
|
swrKey,
|
|
2540
2791
|
...query
|
|
@@ -2544,10 +2795,19 @@ var getScheduleJobUrl = (voiceAgentId) => {
|
|
|
2544
2795
|
return `/v1/voice-agents/${voiceAgentId}/jobs`;
|
|
2545
2796
|
};
|
|
2546
2797
|
var scheduleJob = async (voiceAgentId, scheduleJobBody, options) => {
|
|
2798
|
+
const getHeaders = (h) => {
|
|
2799
|
+
if (!h) return {};
|
|
2800
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2801
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2802
|
+
return h;
|
|
2803
|
+
};
|
|
2547
2804
|
return customFetch(getScheduleJobUrl(voiceAgentId), {
|
|
2548
2805
|
...options,
|
|
2549
2806
|
method: "POST",
|
|
2550
|
-
headers: {
|
|
2807
|
+
headers: {
|
|
2808
|
+
"Content-Type": "application/json",
|
|
2809
|
+
...getHeaders(options?.headers)
|
|
2810
|
+
},
|
|
2551
2811
|
body: JSON.stringify(scheduleJobBody)
|
|
2552
2812
|
});
|
|
2553
2813
|
};
|
|
@@ -2561,7 +2821,7 @@ var useScheduleJob = (voiceAgentId, options) => {
|
|
|
2561
2821
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2562
2822
|
const swrKey = swrOptions?.swrKey ?? getScheduleJobMutationKey(voiceAgentId);
|
|
2563
2823
|
const swrFn = getScheduleJobMutationFetcher(voiceAgentId, requestOptions);
|
|
2564
|
-
const query =
|
|
2824
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2565
2825
|
return {
|
|
2566
2826
|
swrKey,
|
|
2567
2827
|
...query
|
|
@@ -2570,14 +2830,15 @@ var useScheduleJob = (voiceAgentId, options) => {
|
|
|
2570
2830
|
var getListJobsUrl = (params) => {
|
|
2571
2831
|
const normalizedParams = new URLSearchParams();
|
|
2572
2832
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2833
|
+
const explodeParameters = ["status"];
|
|
2834
|
+
if (Array.isArray(value) && explodeParameters.includes(key)) {
|
|
2835
|
+
value.forEach((v) => {
|
|
2836
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
2837
|
+
});
|
|
2838
|
+
return;
|
|
2839
|
+
}
|
|
2573
2840
|
if (value !== void 0) {
|
|
2574
|
-
|
|
2575
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2576
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2577
|
-
}
|
|
2578
|
-
} else {
|
|
2579
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2580
|
-
}
|
|
2841
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2581
2842
|
}
|
|
2582
2843
|
});
|
|
2583
2844
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2595,7 +2856,7 @@ var useListJobs = (params, options) => {
|
|
|
2595
2856
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2596
2857
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListJobsKey(params) : null);
|
|
2597
2858
|
const swrFn = () => listJobs(params, requestOptions);
|
|
2598
|
-
const query =
|
|
2859
|
+
const query = useSwr24(
|
|
2599
2860
|
swrKey,
|
|
2600
2861
|
swrFn,
|
|
2601
2862
|
swrOptions
|
|
@@ -2624,7 +2885,7 @@ var useCancelJob = (jobId, options) => {
|
|
|
2624
2885
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2625
2886
|
const swrKey = swrOptions?.swrKey ?? getCancelJobMutationKey(jobId);
|
|
2626
2887
|
const swrFn = getCancelJobMutationFetcher(jobId, requestOptions);
|
|
2627
|
-
const query =
|
|
2888
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2628
2889
|
return {
|
|
2629
2890
|
swrKey,
|
|
2630
2891
|
...query
|
|
@@ -2634,13 +2895,7 @@ var getListNotificationsUrl = (params) => {
|
|
|
2634
2895
|
const normalizedParams = new URLSearchParams();
|
|
2635
2896
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2636
2897
|
if (value !== void 0) {
|
|
2637
|
-
|
|
2638
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2639
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2640
|
-
}
|
|
2641
|
-
} else {
|
|
2642
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2643
|
-
}
|
|
2898
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2644
2899
|
}
|
|
2645
2900
|
});
|
|
2646
2901
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2661,7 +2916,7 @@ var useListNotifications = (params, options) => {
|
|
|
2661
2916
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2662
2917
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListNotificationsKey(params) : null);
|
|
2663
2918
|
const swrFn = () => listNotifications(params, requestOptions);
|
|
2664
|
-
const query =
|
|
2919
|
+
const query = useSwr24(
|
|
2665
2920
|
swrKey,
|
|
2666
2921
|
swrFn,
|
|
2667
2922
|
swrOptions
|
|
@@ -2686,7 +2941,7 @@ var useGetProfile = (options) => {
|
|
|
2686
2941
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2687
2942
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetProfileKey() : null);
|
|
2688
2943
|
const swrFn = () => getProfile(requestOptions);
|
|
2689
|
-
const query =
|
|
2944
|
+
const query = useSwr24(
|
|
2690
2945
|
swrKey,
|
|
2691
2946
|
swrFn,
|
|
2692
2947
|
swrOptions
|
|
@@ -2700,10 +2955,19 @@ var getCreateScheduleUrl = () => {
|
|
|
2700
2955
|
return `/v1/schedules`;
|
|
2701
2956
|
};
|
|
2702
2957
|
var createSchedule = async (createScheduleBody, options) => {
|
|
2958
|
+
const getHeaders = (h) => {
|
|
2959
|
+
if (!h) return {};
|
|
2960
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2961
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2962
|
+
return h;
|
|
2963
|
+
};
|
|
2703
2964
|
return customFetch(getCreateScheduleUrl(), {
|
|
2704
2965
|
...options,
|
|
2705
2966
|
method: "POST",
|
|
2706
|
-
headers: {
|
|
2967
|
+
headers: {
|
|
2968
|
+
"Content-Type": "application/json",
|
|
2969
|
+
...getHeaders(options?.headers)
|
|
2970
|
+
},
|
|
2707
2971
|
body: JSON.stringify(createScheduleBody)
|
|
2708
2972
|
});
|
|
2709
2973
|
};
|
|
@@ -2717,7 +2981,7 @@ var useCreateSchedule = (options) => {
|
|
|
2717
2981
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2718
2982
|
const swrKey = swrOptions?.swrKey ?? getCreateScheduleMutationKey();
|
|
2719
2983
|
const swrFn = getCreateScheduleMutationFetcher(requestOptions);
|
|
2720
|
-
const query =
|
|
2984
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2721
2985
|
return {
|
|
2722
2986
|
swrKey,
|
|
2723
2987
|
...query
|
|
@@ -2727,13 +2991,7 @@ var getListSchedulesUrl = (params) => {
|
|
|
2727
2991
|
const normalizedParams = new URLSearchParams();
|
|
2728
2992
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2729
2993
|
if (value !== void 0) {
|
|
2730
|
-
|
|
2731
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2732
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2733
|
-
}
|
|
2734
|
-
} else {
|
|
2735
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2736
|
-
}
|
|
2994
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2737
2995
|
}
|
|
2738
2996
|
});
|
|
2739
2997
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2751,7 +3009,7 @@ var useListSchedules = (params, options) => {
|
|
|
2751
3009
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2752
3010
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListSchedulesKey(params) : null);
|
|
2753
3011
|
const swrFn = () => listSchedules(params, requestOptions);
|
|
2754
|
-
const query =
|
|
3012
|
+
const query = useSwr24(
|
|
2755
3013
|
swrKey,
|
|
2756
3014
|
swrFn,
|
|
2757
3015
|
swrOptions
|
|
@@ -2773,10 +3031,10 @@ var getSchedule = async (scheduleId, options) => {
|
|
|
2773
3031
|
var getGetScheduleKey = (scheduleId) => [`/v1/schedules/${scheduleId}`];
|
|
2774
3032
|
var useGetSchedule = (scheduleId, options) => {
|
|
2775
3033
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2776
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3034
|
+
const isEnabled = swrOptions?.enabled !== false && scheduleId !== null && scheduleId !== void 0;
|
|
2777
3035
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetScheduleKey(scheduleId) : null);
|
|
2778
3036
|
const swrFn = () => getSchedule(scheduleId, requestOptions);
|
|
2779
|
-
const query =
|
|
3037
|
+
const query = useSwr24(
|
|
2780
3038
|
swrKey,
|
|
2781
3039
|
swrFn,
|
|
2782
3040
|
swrOptions
|
|
@@ -2790,10 +3048,19 @@ var getUpdateScheduleUrl = (scheduleId) => {
|
|
|
2790
3048
|
return `/v1/schedules/${scheduleId}`;
|
|
2791
3049
|
};
|
|
2792
3050
|
var updateSchedule = async (scheduleId, updateScheduleBody, options) => {
|
|
3051
|
+
const getHeaders = (h) => {
|
|
3052
|
+
if (!h) return {};
|
|
3053
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3054
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3055
|
+
return h;
|
|
3056
|
+
};
|
|
2793
3057
|
return customFetch(getUpdateScheduleUrl(scheduleId), {
|
|
2794
3058
|
...options,
|
|
2795
3059
|
method: "PATCH",
|
|
2796
|
-
headers: {
|
|
3060
|
+
headers: {
|
|
3061
|
+
"Content-Type": "application/json",
|
|
3062
|
+
...getHeaders(options?.headers)
|
|
3063
|
+
},
|
|
2797
3064
|
body: JSON.stringify(updateScheduleBody)
|
|
2798
3065
|
});
|
|
2799
3066
|
};
|
|
@@ -2807,7 +3074,7 @@ var useUpdateSchedule = (scheduleId, options) => {
|
|
|
2807
3074
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2808
3075
|
const swrKey = swrOptions?.swrKey ?? getUpdateScheduleMutationKey(scheduleId);
|
|
2809
3076
|
const swrFn = getUpdateScheduleMutationFetcher(scheduleId, requestOptions);
|
|
2810
|
-
const query =
|
|
3077
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2811
3078
|
return {
|
|
2812
3079
|
swrKey,
|
|
2813
3080
|
...query
|
|
@@ -2832,7 +3099,7 @@ var useDeleteSchedule = (scheduleId, options) => {
|
|
|
2832
3099
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2833
3100
|
const swrKey = swrOptions?.swrKey ?? getDeleteScheduleMutationKey(scheduleId);
|
|
2834
3101
|
const swrFn = getDeleteScheduleMutationFetcher(scheduleId, requestOptions);
|
|
2835
|
-
const query =
|
|
3102
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2836
3103
|
return {
|
|
2837
3104
|
swrKey,
|
|
2838
3105
|
...query
|
|
@@ -2842,10 +3109,19 @@ var getCreateSecretUrl = () => {
|
|
|
2842
3109
|
return `/v1/secrets`;
|
|
2843
3110
|
};
|
|
2844
3111
|
var createSecret = async (createSecretBody, options) => {
|
|
3112
|
+
const getHeaders = (h) => {
|
|
3113
|
+
if (!h) return {};
|
|
3114
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3115
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3116
|
+
return h;
|
|
3117
|
+
};
|
|
2845
3118
|
return customFetch(getCreateSecretUrl(), {
|
|
2846
3119
|
...options,
|
|
2847
3120
|
method: "POST",
|
|
2848
|
-
headers: {
|
|
3121
|
+
headers: {
|
|
3122
|
+
"Content-Type": "application/json",
|
|
3123
|
+
...getHeaders(options?.headers)
|
|
3124
|
+
},
|
|
2849
3125
|
body: JSON.stringify(createSecretBody)
|
|
2850
3126
|
});
|
|
2851
3127
|
};
|
|
@@ -2859,7 +3135,7 @@ var useCreateSecret = (options) => {
|
|
|
2859
3135
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2860
3136
|
const swrKey = swrOptions?.swrKey ?? getCreateSecretMutationKey();
|
|
2861
3137
|
const swrFn = getCreateSecretMutationFetcher(requestOptions);
|
|
2862
|
-
const query =
|
|
3138
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2863
3139
|
return {
|
|
2864
3140
|
swrKey,
|
|
2865
3141
|
...query
|
|
@@ -2869,13 +3145,7 @@ var getListSecretsUrl = (params) => {
|
|
|
2869
3145
|
const normalizedParams = new URLSearchParams();
|
|
2870
3146
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2871
3147
|
if (value !== void 0) {
|
|
2872
|
-
|
|
2873
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
2874
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
2875
|
-
}
|
|
2876
|
-
} else {
|
|
2877
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2878
|
-
}
|
|
3148
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2879
3149
|
}
|
|
2880
3150
|
});
|
|
2881
3151
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -2893,7 +3163,7 @@ var useListSecrets = (params, options) => {
|
|
|
2893
3163
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2894
3164
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListSecretsKey(params) : null);
|
|
2895
3165
|
const swrFn = () => listSecrets(params, requestOptions);
|
|
2896
|
-
const query =
|
|
3166
|
+
const query = useSwr24(
|
|
2897
3167
|
swrKey,
|
|
2898
3168
|
swrFn,
|
|
2899
3169
|
swrOptions
|
|
@@ -2915,10 +3185,10 @@ var getSecret = async (secretId, options) => {
|
|
|
2915
3185
|
var getGetSecretKey = (secretId) => [`/v1/secrets/${secretId}`];
|
|
2916
3186
|
var useGetSecret = (secretId, options) => {
|
|
2917
3187
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2918
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3188
|
+
const isEnabled = swrOptions?.enabled !== false && secretId !== null && secretId !== void 0;
|
|
2919
3189
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetSecretKey(secretId) : null);
|
|
2920
3190
|
const swrFn = () => getSecret(secretId, requestOptions);
|
|
2921
|
-
const query =
|
|
3191
|
+
const query = useSwr24(
|
|
2922
3192
|
swrKey,
|
|
2923
3193
|
swrFn,
|
|
2924
3194
|
swrOptions
|
|
@@ -2932,10 +3202,19 @@ var getUpdateSecretUrl = (secretId) => {
|
|
|
2932
3202
|
return `/v1/secrets/${secretId}`;
|
|
2933
3203
|
};
|
|
2934
3204
|
var updateSecret = async (secretId, updateSecretBody, options) => {
|
|
3205
|
+
const getHeaders = (h) => {
|
|
3206
|
+
if (!h) return {};
|
|
3207
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3208
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3209
|
+
return h;
|
|
3210
|
+
};
|
|
2935
3211
|
return customFetch(getUpdateSecretUrl(secretId), {
|
|
2936
3212
|
...options,
|
|
2937
3213
|
method: "PATCH",
|
|
2938
|
-
headers: {
|
|
3214
|
+
headers: {
|
|
3215
|
+
"Content-Type": "application/json",
|
|
3216
|
+
...getHeaders(options?.headers)
|
|
3217
|
+
},
|
|
2939
3218
|
body: JSON.stringify(updateSecretBody)
|
|
2940
3219
|
});
|
|
2941
3220
|
};
|
|
@@ -2949,7 +3228,7 @@ var useUpdateSecret = (secretId, options) => {
|
|
|
2949
3228
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2950
3229
|
const swrKey = swrOptions?.swrKey ?? getUpdateSecretMutationKey(secretId);
|
|
2951
3230
|
const swrFn = getUpdateSecretMutationFetcher(secretId, requestOptions);
|
|
2952
|
-
const query =
|
|
3231
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2953
3232
|
return {
|
|
2954
3233
|
swrKey,
|
|
2955
3234
|
...query
|
|
@@ -2974,7 +3253,7 @@ var useDeleteSecret = (secretId, options) => {
|
|
|
2974
3253
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
2975
3254
|
const swrKey = swrOptions?.swrKey ?? getDeleteSecretMutationKey(secretId);
|
|
2976
3255
|
const swrFn = getDeleteSecretMutationFetcher(secretId, requestOptions);
|
|
2977
|
-
const query =
|
|
3256
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
2978
3257
|
return {
|
|
2979
3258
|
swrKey,
|
|
2980
3259
|
...query
|
|
@@ -2995,7 +3274,7 @@ var useListTeamMembers = (options) => {
|
|
|
2995
3274
|
const isEnabled = swrOptions?.enabled !== false;
|
|
2996
3275
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListTeamMembersKey() : null);
|
|
2997
3276
|
const swrFn = () => listTeamMembers(requestOptions);
|
|
2998
|
-
const query =
|
|
3277
|
+
const query = useSwr24(
|
|
2999
3278
|
swrKey,
|
|
3000
3279
|
swrFn,
|
|
3001
3280
|
swrOptions
|
|
@@ -3009,10 +3288,19 @@ var getInviteTeamMemberUrl = () => {
|
|
|
3009
3288
|
return `/v1/team/invitations`;
|
|
3010
3289
|
};
|
|
3011
3290
|
var inviteTeamMember = async (inviteTeamMemberBody, options) => {
|
|
3291
|
+
const getHeaders = (h) => {
|
|
3292
|
+
if (!h) return {};
|
|
3293
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3294
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3295
|
+
return h;
|
|
3296
|
+
};
|
|
3012
3297
|
return customFetch(getInviteTeamMemberUrl(), {
|
|
3013
3298
|
...options,
|
|
3014
3299
|
method: "POST",
|
|
3015
|
-
headers: {
|
|
3300
|
+
headers: {
|
|
3301
|
+
"Content-Type": "application/json",
|
|
3302
|
+
...getHeaders(options?.headers)
|
|
3303
|
+
},
|
|
3016
3304
|
body: JSON.stringify(inviteTeamMemberBody)
|
|
3017
3305
|
});
|
|
3018
3306
|
};
|
|
@@ -3026,7 +3314,7 @@ var useInviteTeamMember = (options) => {
|
|
|
3026
3314
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3027
3315
|
const swrKey = swrOptions?.swrKey ?? getInviteTeamMemberMutationKey();
|
|
3028
3316
|
const swrFn = getInviteTeamMemberMutationFetcher(requestOptions);
|
|
3029
|
-
const query =
|
|
3317
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3030
3318
|
return {
|
|
3031
3319
|
swrKey,
|
|
3032
3320
|
...query
|
|
@@ -3047,7 +3335,7 @@ var useListTeamInvitations = (options) => {
|
|
|
3047
3335
|
const isEnabled = swrOptions?.enabled !== false;
|
|
3048
3336
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListTeamInvitationsKey() : null);
|
|
3049
3337
|
const swrFn = () => listTeamInvitations(requestOptions);
|
|
3050
|
-
const query =
|
|
3338
|
+
const query = useSwr24(
|
|
3051
3339
|
swrKey,
|
|
3052
3340
|
swrFn,
|
|
3053
3341
|
swrOptions
|
|
@@ -3079,7 +3367,7 @@ var useRevokeTeamInvitation = (invitationId, options) => {
|
|
|
3079
3367
|
invitationId,
|
|
3080
3368
|
requestOptions
|
|
3081
3369
|
);
|
|
3082
|
-
const query =
|
|
3370
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3083
3371
|
return {
|
|
3084
3372
|
swrKey,
|
|
3085
3373
|
...query
|
|
@@ -3110,7 +3398,7 @@ var useResendTeamInvitation = (invitationId, options) => {
|
|
|
3110
3398
|
invitationId,
|
|
3111
3399
|
requestOptions
|
|
3112
3400
|
);
|
|
3113
|
-
const query =
|
|
3401
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3114
3402
|
return {
|
|
3115
3403
|
swrKey,
|
|
3116
3404
|
...query
|
|
@@ -3120,10 +3408,19 @@ var getUpdateMemberRoleUrl = (id) => {
|
|
|
3120
3408
|
return `/v1/team/members/${id}`;
|
|
3121
3409
|
};
|
|
3122
3410
|
var updateMemberRole = async (id, updateMemberRoleBody, options) => {
|
|
3411
|
+
const getHeaders = (h) => {
|
|
3412
|
+
if (!h) return {};
|
|
3413
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3414
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3415
|
+
return h;
|
|
3416
|
+
};
|
|
3123
3417
|
return customFetch(getUpdateMemberRoleUrl(id), {
|
|
3124
3418
|
...options,
|
|
3125
3419
|
method: "PATCH",
|
|
3126
|
-
headers: {
|
|
3420
|
+
headers: {
|
|
3421
|
+
"Content-Type": "application/json",
|
|
3422
|
+
...getHeaders(options?.headers)
|
|
3423
|
+
},
|
|
3127
3424
|
body: JSON.stringify(updateMemberRoleBody)
|
|
3128
3425
|
});
|
|
3129
3426
|
};
|
|
@@ -3137,7 +3434,7 @@ var useUpdateMemberRole = (id, options) => {
|
|
|
3137
3434
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3138
3435
|
const swrKey = swrOptions?.swrKey ?? getUpdateMemberRoleMutationKey(id);
|
|
3139
3436
|
const swrFn = getUpdateMemberRoleMutationFetcher(id, requestOptions);
|
|
3140
|
-
const query =
|
|
3437
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3141
3438
|
return {
|
|
3142
3439
|
swrKey,
|
|
3143
3440
|
...query
|
|
@@ -3162,7 +3459,7 @@ var useRemoveMember = (id, options) => {
|
|
|
3162
3459
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3163
3460
|
const swrKey = swrOptions?.swrKey ?? getRemoveMemberMutationKey(id);
|
|
3164
3461
|
const swrFn = getRemoveMemberMutationFetcher(id, requestOptions);
|
|
3165
|
-
const query =
|
|
3462
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3166
3463
|
return {
|
|
3167
3464
|
swrKey,
|
|
3168
3465
|
...query
|
|
@@ -3172,10 +3469,19 @@ var getCreateToolUrl = () => {
|
|
|
3172
3469
|
return `/v1/tools`;
|
|
3173
3470
|
};
|
|
3174
3471
|
var createTool = async (createToolBody, options) => {
|
|
3472
|
+
const getHeaders = (h) => {
|
|
3473
|
+
if (!h) return {};
|
|
3474
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3475
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3476
|
+
return h;
|
|
3477
|
+
};
|
|
3175
3478
|
return customFetch(getCreateToolUrl(), {
|
|
3176
3479
|
...options,
|
|
3177
3480
|
method: "POST",
|
|
3178
|
-
headers: {
|
|
3481
|
+
headers: {
|
|
3482
|
+
"Content-Type": "application/json",
|
|
3483
|
+
...getHeaders(options?.headers)
|
|
3484
|
+
},
|
|
3179
3485
|
body: JSON.stringify(createToolBody)
|
|
3180
3486
|
});
|
|
3181
3487
|
};
|
|
@@ -3189,7 +3495,7 @@ var useCreateTool = (options) => {
|
|
|
3189
3495
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3190
3496
|
const swrKey = swrOptions?.swrKey ?? getCreateToolMutationKey();
|
|
3191
3497
|
const swrFn = getCreateToolMutationFetcher(requestOptions);
|
|
3192
|
-
const query =
|
|
3498
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3193
3499
|
return {
|
|
3194
3500
|
swrKey,
|
|
3195
3501
|
...query
|
|
@@ -3199,13 +3505,7 @@ var getListToolsUrl = (params) => {
|
|
|
3199
3505
|
const normalizedParams = new URLSearchParams();
|
|
3200
3506
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3201
3507
|
if (value !== void 0) {
|
|
3202
|
-
|
|
3203
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
3204
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
3205
|
-
}
|
|
3206
|
-
} else {
|
|
3207
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3208
|
-
}
|
|
3508
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3209
3509
|
}
|
|
3210
3510
|
});
|
|
3211
3511
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -3223,7 +3523,7 @@ var useListTools = (params, options) => {
|
|
|
3223
3523
|
const isEnabled = swrOptions?.enabled !== false;
|
|
3224
3524
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListToolsKey(params) : null);
|
|
3225
3525
|
const swrFn = () => listTools(params, requestOptions);
|
|
3226
|
-
const query =
|
|
3526
|
+
const query = useSwr24(
|
|
3227
3527
|
swrKey,
|
|
3228
3528
|
swrFn,
|
|
3229
3529
|
swrOptions
|
|
@@ -3252,7 +3552,7 @@ var useDeleteTool = (id, options) => {
|
|
|
3252
3552
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3253
3553
|
const swrKey = swrOptions?.swrKey ?? getDeleteToolMutationKey(id);
|
|
3254
3554
|
const swrFn = getDeleteToolMutationFetcher(id, requestOptions);
|
|
3255
|
-
const query =
|
|
3555
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3256
3556
|
return {
|
|
3257
3557
|
swrKey,
|
|
3258
3558
|
...query
|
|
@@ -3270,10 +3570,10 @@ var getTool = async (id, options) => {
|
|
|
3270
3570
|
var getGetToolKey = (id) => [`/v1/tools/${id}`];
|
|
3271
3571
|
var useGetTool = (id, options) => {
|
|
3272
3572
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3273
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3573
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
3274
3574
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetToolKey(id) : null);
|
|
3275
3575
|
const swrFn = () => getTool(id, requestOptions);
|
|
3276
|
-
const query =
|
|
3576
|
+
const query = useSwr24(
|
|
3277
3577
|
swrKey,
|
|
3278
3578
|
swrFn,
|
|
3279
3579
|
swrOptions
|
|
@@ -3287,10 +3587,19 @@ var getUpdateToolUrl = (id) => {
|
|
|
3287
3587
|
return `/v1/tools/${id}`;
|
|
3288
3588
|
};
|
|
3289
3589
|
var updateTool = async (id, updateToolBody, options) => {
|
|
3590
|
+
const getHeaders = (h) => {
|
|
3591
|
+
if (!h) return {};
|
|
3592
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3593
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3594
|
+
return h;
|
|
3595
|
+
};
|
|
3290
3596
|
return customFetch(getUpdateToolUrl(id), {
|
|
3291
3597
|
...options,
|
|
3292
3598
|
method: "PATCH",
|
|
3293
|
-
headers: {
|
|
3599
|
+
headers: {
|
|
3600
|
+
"Content-Type": "application/json",
|
|
3601
|
+
...getHeaders(options?.headers)
|
|
3602
|
+
},
|
|
3294
3603
|
body: JSON.stringify(updateToolBody)
|
|
3295
3604
|
});
|
|
3296
3605
|
};
|
|
@@ -3304,7 +3613,7 @@ var useUpdateTool = (id, options) => {
|
|
|
3304
3613
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3305
3614
|
const swrKey = swrOptions?.swrKey ?? getUpdateToolMutationKey(id);
|
|
3306
3615
|
const swrFn = getUpdateToolMutationFetcher(id, requestOptions);
|
|
3307
|
-
const query =
|
|
3616
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3308
3617
|
return {
|
|
3309
3618
|
swrKey,
|
|
3310
3619
|
...query
|
|
@@ -3314,10 +3623,19 @@ var getExecuteCodeUrl = (id) => {
|
|
|
3314
3623
|
return `/v1/tools/${id}/execute`;
|
|
3315
3624
|
};
|
|
3316
3625
|
var executeCode = async (id, executeCodeBody, options) => {
|
|
3626
|
+
const getHeaders = (h) => {
|
|
3627
|
+
if (!h) return {};
|
|
3628
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3629
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3630
|
+
return h;
|
|
3631
|
+
};
|
|
3317
3632
|
return customFetch(getExecuteCodeUrl(id), {
|
|
3318
3633
|
...options,
|
|
3319
3634
|
method: "POST",
|
|
3320
|
-
headers: {
|
|
3635
|
+
headers: {
|
|
3636
|
+
"Content-Type": "application/json",
|
|
3637
|
+
...getHeaders(options?.headers)
|
|
3638
|
+
},
|
|
3321
3639
|
body: JSON.stringify(executeCodeBody)
|
|
3322
3640
|
});
|
|
3323
3641
|
};
|
|
@@ -3331,7 +3649,7 @@ var useExecuteCode = (id, options) => {
|
|
|
3331
3649
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3332
3650
|
const swrKey = swrOptions?.swrKey ?? getExecuteCodeMutationKey(id);
|
|
3333
3651
|
const swrFn = getExecuteCodeMutationFetcher(id, requestOptions);
|
|
3334
|
-
const query =
|
|
3652
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3335
3653
|
return {
|
|
3336
3654
|
swrKey,
|
|
3337
3655
|
...query
|
|
@@ -3341,13 +3659,7 @@ var getListToolVersionsUrl = (id, params) => {
|
|
|
3341
3659
|
const normalizedParams = new URLSearchParams();
|
|
3342
3660
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3343
3661
|
if (value !== void 0) {
|
|
3344
|
-
|
|
3345
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
3346
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
3347
|
-
}
|
|
3348
|
-
} else {
|
|
3349
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3350
|
-
}
|
|
3662
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3351
3663
|
}
|
|
3352
3664
|
});
|
|
3353
3665
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -3365,10 +3677,10 @@ var listToolVersions = async (id, params, options) => {
|
|
|
3365
3677
|
var getListToolVersionsKey = (id, params) => [`/v1/tools/${id}/versions`, ...params ? [params] : []];
|
|
3366
3678
|
var useListToolVersions = (id, params, options) => {
|
|
3367
3679
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3368
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3680
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
3369
3681
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListToolVersionsKey(id, params) : null);
|
|
3370
3682
|
const swrFn = () => listToolVersions(id, params, requestOptions);
|
|
3371
|
-
const query =
|
|
3683
|
+
const query = useSwr24(
|
|
3372
3684
|
swrKey,
|
|
3373
3685
|
swrFn,
|
|
3374
3686
|
swrOptions
|
|
@@ -3393,10 +3705,10 @@ var getToolVersion = async (id, version, options) => {
|
|
|
3393
3705
|
var getGetToolVersionKey = (id, version) => [`/v1/tools/${id}/versions/${version}`];
|
|
3394
3706
|
var useGetToolVersion = (id, version, options) => {
|
|
3395
3707
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3396
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3708
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0 && version !== null && version !== void 0;
|
|
3397
3709
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetToolVersionKey(id, version) : null);
|
|
3398
3710
|
const swrFn = () => getToolVersion(id, version, requestOptions);
|
|
3399
|
-
const query =
|
|
3711
|
+
const query = useSwr24(
|
|
3400
3712
|
swrKey,
|
|
3401
3713
|
swrFn,
|
|
3402
3714
|
swrOptions
|
|
@@ -3410,12 +3722,21 @@ var getPromoteToolVersionUrl = (id, version) => {
|
|
|
3410
3722
|
return `/v1/tools/${id}/versions/${version}/promote`;
|
|
3411
3723
|
};
|
|
3412
3724
|
var promoteToolVersion = async (id, version, promoteToolVersionBody, options) => {
|
|
3725
|
+
const getHeaders = (h) => {
|
|
3726
|
+
if (!h) return {};
|
|
3727
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3728
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3729
|
+
return h;
|
|
3730
|
+
};
|
|
3413
3731
|
return customFetch(
|
|
3414
3732
|
getPromoteToolVersionUrl(id, version),
|
|
3415
3733
|
{
|
|
3416
3734
|
...options,
|
|
3417
3735
|
method: "POST",
|
|
3418
|
-
headers: {
|
|
3736
|
+
headers: {
|
|
3737
|
+
"Content-Type": "application/json",
|
|
3738
|
+
...getHeaders(options?.headers)
|
|
3739
|
+
},
|
|
3419
3740
|
body: JSON.stringify(promoteToolVersionBody)
|
|
3420
3741
|
}
|
|
3421
3742
|
);
|
|
@@ -3434,7 +3755,7 @@ var usePromoteToolVersion = (id, version, options) => {
|
|
|
3434
3755
|
version,
|
|
3435
3756
|
requestOptions
|
|
3436
3757
|
);
|
|
3437
|
-
const query =
|
|
3758
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3438
3759
|
return {
|
|
3439
3760
|
swrKey,
|
|
3440
3761
|
...query
|
|
@@ -3455,10 +3776,10 @@ var getToolVersionChangeSummary = async (id, version, options) => {
|
|
|
3455
3776
|
var getGetToolVersionChangeSummaryKey = (id, version) => [`/v1/tools/${id}/versions/${version}/change-summary`];
|
|
3456
3777
|
var useGetToolVersionChangeSummary = (id, version, options) => {
|
|
3457
3778
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3458
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3779
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0 && version !== null && version !== void 0;
|
|
3459
3780
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetToolVersionChangeSummaryKey(id, version) : null);
|
|
3460
3781
|
const swrFn = () => getToolVersionChangeSummary(id, version, requestOptions);
|
|
3461
|
-
const query =
|
|
3782
|
+
const query = useSwr24(
|
|
3462
3783
|
swrKey,
|
|
3463
3784
|
swrFn,
|
|
3464
3785
|
swrOptions
|
|
@@ -3472,13 +3793,7 @@ var getWorkerListToolsUrl = (params) => {
|
|
|
3472
3793
|
const normalizedParams = new URLSearchParams();
|
|
3473
3794
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3474
3795
|
if (value !== void 0) {
|
|
3475
|
-
|
|
3476
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
3477
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
3478
|
-
}
|
|
3479
|
-
} else {
|
|
3480
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3481
|
-
}
|
|
3796
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3482
3797
|
}
|
|
3483
3798
|
});
|
|
3484
3799
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -3496,7 +3811,7 @@ var useWorkerListTools = (params, options) => {
|
|
|
3496
3811
|
const isEnabled = swrOptions?.enabled !== false;
|
|
3497
3812
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getWorkerListToolsKey(params) : null);
|
|
3498
3813
|
const swrFn = () => workerListTools(params, requestOptions);
|
|
3499
|
-
const query =
|
|
3814
|
+
const query = useSwr24(
|
|
3500
3815
|
swrKey,
|
|
3501
3816
|
swrFn,
|
|
3502
3817
|
swrOptions
|
|
@@ -3518,10 +3833,10 @@ var workerGetTool = async (id, options) => {
|
|
|
3518
3833
|
var getWorkerGetToolKey = (id) => [`/worker/v1/tools/${id}`];
|
|
3519
3834
|
var useWorkerGetTool = (id, options) => {
|
|
3520
3835
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3521
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3836
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
3522
3837
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getWorkerGetToolKey(id) : null);
|
|
3523
3838
|
const swrFn = () => workerGetTool(id, requestOptions);
|
|
3524
|
-
const query =
|
|
3839
|
+
const query = useSwr24(
|
|
3525
3840
|
swrKey,
|
|
3526
3841
|
swrFn,
|
|
3527
3842
|
swrOptions
|
|
@@ -3535,10 +3850,19 @@ var getWorkerExecuteToolUrl = (id) => {
|
|
|
3535
3850
|
return `/worker/v1/tools/${id}/execute`;
|
|
3536
3851
|
};
|
|
3537
3852
|
var workerExecuteTool = async (id, workerExecuteToolBody, options) => {
|
|
3853
|
+
const getHeaders = (h) => {
|
|
3854
|
+
if (!h) return {};
|
|
3855
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3856
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3857
|
+
return h;
|
|
3858
|
+
};
|
|
3538
3859
|
return customFetch(getWorkerExecuteToolUrl(id), {
|
|
3539
3860
|
...options,
|
|
3540
3861
|
method: "POST",
|
|
3541
|
-
headers: {
|
|
3862
|
+
headers: {
|
|
3863
|
+
"Content-Type": "application/json",
|
|
3864
|
+
...getHeaders(options?.headers)
|
|
3865
|
+
},
|
|
3542
3866
|
body: JSON.stringify(workerExecuteToolBody)
|
|
3543
3867
|
});
|
|
3544
3868
|
};
|
|
@@ -3552,7 +3876,7 @@ var useWorkerExecuteTool = (id, options) => {
|
|
|
3552
3876
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3553
3877
|
const swrKey = swrOptions?.swrKey ?? getWorkerExecuteToolMutationKey(id);
|
|
3554
3878
|
const swrFn = getWorkerExecuteToolMutationFetcher(id, requestOptions);
|
|
3555
|
-
const query =
|
|
3879
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3556
3880
|
return {
|
|
3557
3881
|
swrKey,
|
|
3558
3882
|
...query
|
|
@@ -3562,13 +3886,7 @@ var getListVoiceAgentsUrl = (params) => {
|
|
|
3562
3886
|
const normalizedParams = new URLSearchParams();
|
|
3563
3887
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3564
3888
|
if (value !== void 0) {
|
|
3565
|
-
|
|
3566
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
3567
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
3568
|
-
}
|
|
3569
|
-
} else {
|
|
3570
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3571
|
-
}
|
|
3889
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3572
3890
|
}
|
|
3573
3891
|
});
|
|
3574
3892
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -3586,7 +3904,7 @@ var useListVoiceAgents = (params, options) => {
|
|
|
3586
3904
|
const isEnabled = swrOptions?.enabled !== false;
|
|
3587
3905
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListVoiceAgentsKey(params) : null);
|
|
3588
3906
|
const swrFn = () => listVoiceAgents(params, requestOptions);
|
|
3589
|
-
const query =
|
|
3907
|
+
const query = useSwr24(
|
|
3590
3908
|
swrKey,
|
|
3591
3909
|
swrFn,
|
|
3592
3910
|
swrOptions
|
|
@@ -3600,10 +3918,19 @@ var getCreateVoiceAgentUrl = () => {
|
|
|
3600
3918
|
return `/v1/voice-agents`;
|
|
3601
3919
|
};
|
|
3602
3920
|
var createVoiceAgent = async (createVoiceAgentBody, options) => {
|
|
3921
|
+
const getHeaders = (h) => {
|
|
3922
|
+
if (!h) return {};
|
|
3923
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3924
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3925
|
+
return h;
|
|
3926
|
+
};
|
|
3603
3927
|
return customFetch(getCreateVoiceAgentUrl(), {
|
|
3604
3928
|
...options,
|
|
3605
3929
|
method: "POST",
|
|
3606
|
-
headers: {
|
|
3930
|
+
headers: {
|
|
3931
|
+
"Content-Type": "application/json",
|
|
3932
|
+
...getHeaders(options?.headers)
|
|
3933
|
+
},
|
|
3607
3934
|
body: JSON.stringify(createVoiceAgentBody)
|
|
3608
3935
|
});
|
|
3609
3936
|
};
|
|
@@ -3617,7 +3944,7 @@ var useCreateVoiceAgent = (options) => {
|
|
|
3617
3944
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3618
3945
|
const swrKey = swrOptions?.swrKey ?? getCreateVoiceAgentMutationKey();
|
|
3619
3946
|
const swrFn = getCreateVoiceAgentMutationFetcher(requestOptions);
|
|
3620
|
-
const query =
|
|
3947
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3621
3948
|
return {
|
|
3622
3949
|
swrKey,
|
|
3623
3950
|
...query
|
|
@@ -3635,10 +3962,10 @@ var getVoiceAgent = async (voiceAgentId, options) => {
|
|
|
3635
3962
|
var getGetVoiceAgentKey = (voiceAgentId) => [`/v1/voice-agents/${voiceAgentId}`];
|
|
3636
3963
|
var useGetVoiceAgent = (voiceAgentId, options) => {
|
|
3637
3964
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3638
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
3965
|
+
const isEnabled = swrOptions?.enabled !== false && voiceAgentId !== null && voiceAgentId !== void 0;
|
|
3639
3966
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetVoiceAgentKey(voiceAgentId) : null);
|
|
3640
3967
|
const swrFn = () => getVoiceAgent(voiceAgentId, requestOptions);
|
|
3641
|
-
const query =
|
|
3968
|
+
const query = useSwr24(
|
|
3642
3969
|
swrKey,
|
|
3643
3970
|
swrFn,
|
|
3644
3971
|
swrOptions
|
|
@@ -3652,12 +3979,21 @@ var getUpdateVoiceAgentUrl = (voiceAgentId) => {
|
|
|
3652
3979
|
return `/v1/voice-agents/${voiceAgentId}`;
|
|
3653
3980
|
};
|
|
3654
3981
|
var updateVoiceAgent = async (voiceAgentId, updateVoiceAgentBody, options) => {
|
|
3982
|
+
const getHeaders = (h) => {
|
|
3983
|
+
if (!h) return {};
|
|
3984
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3985
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3986
|
+
return h;
|
|
3987
|
+
};
|
|
3655
3988
|
return customFetch(
|
|
3656
3989
|
getUpdateVoiceAgentUrl(voiceAgentId),
|
|
3657
3990
|
{
|
|
3658
3991
|
...options,
|
|
3659
3992
|
method: "PATCH",
|
|
3660
|
-
headers: {
|
|
3993
|
+
headers: {
|
|
3994
|
+
"Content-Type": "application/json",
|
|
3995
|
+
...getHeaders(options?.headers)
|
|
3996
|
+
},
|
|
3661
3997
|
body: JSON.stringify(updateVoiceAgentBody)
|
|
3662
3998
|
}
|
|
3663
3999
|
);
|
|
@@ -3675,7 +4011,7 @@ var useUpdateVoiceAgent = (voiceAgentId, options) => {
|
|
|
3675
4011
|
voiceAgentId,
|
|
3676
4012
|
requestOptions
|
|
3677
4013
|
);
|
|
3678
|
-
const query =
|
|
4014
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3679
4015
|
return {
|
|
3680
4016
|
swrKey,
|
|
3681
4017
|
...query
|
|
@@ -3706,7 +4042,7 @@ var useDeleteVoiceAgent = (voiceAgentId, options) => {
|
|
|
3706
4042
|
voiceAgentId,
|
|
3707
4043
|
requestOptions
|
|
3708
4044
|
);
|
|
3709
|
-
const query =
|
|
4045
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3710
4046
|
return {
|
|
3711
4047
|
swrKey,
|
|
3712
4048
|
...query
|
|
@@ -3716,13 +4052,7 @@ var getListVoiceAgentVersionsUrl = (voiceAgentId, params) => {
|
|
|
3716
4052
|
const normalizedParams = new URLSearchParams();
|
|
3717
4053
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3718
4054
|
if (value !== void 0) {
|
|
3719
|
-
|
|
3720
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
3721
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
3722
|
-
}
|
|
3723
|
-
} else {
|
|
3724
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3725
|
-
}
|
|
4055
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3726
4056
|
}
|
|
3727
4057
|
});
|
|
3728
4058
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -3743,10 +4073,10 @@ var getListVoiceAgentVersionsKey = (voiceAgentId, params) => [
|
|
|
3743
4073
|
];
|
|
3744
4074
|
var useListVoiceAgentVersions = (voiceAgentId, params, options) => {
|
|
3745
4075
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3746
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4076
|
+
const isEnabled = swrOptions?.enabled !== false && voiceAgentId !== null && voiceAgentId !== void 0;
|
|
3747
4077
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListVoiceAgentVersionsKey(voiceAgentId, params) : null);
|
|
3748
4078
|
const swrFn = () => listVoiceAgentVersions(voiceAgentId, params, requestOptions);
|
|
3749
|
-
const query =
|
|
4079
|
+
const query = useSwr24(
|
|
3750
4080
|
swrKey,
|
|
3751
4081
|
swrFn,
|
|
3752
4082
|
swrOptions
|
|
@@ -3771,10 +4101,10 @@ var getVoiceAgentVersion = async (voiceAgentId, version, options) => {
|
|
|
3771
4101
|
var getGetVoiceAgentVersionKey = (voiceAgentId, version) => [`/v1/voice-agents/${voiceAgentId}/versions/${version}`];
|
|
3772
4102
|
var useGetVoiceAgentVersion = (voiceAgentId, version, options) => {
|
|
3773
4103
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3774
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4104
|
+
const isEnabled = swrOptions?.enabled !== false && voiceAgentId !== null && voiceAgentId !== void 0 && version !== null && version !== void 0;
|
|
3775
4105
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetVoiceAgentVersionKey(voiceAgentId, version) : null);
|
|
3776
4106
|
const swrFn = () => getVoiceAgentVersion(voiceAgentId, version, requestOptions);
|
|
3777
|
-
const query =
|
|
4107
|
+
const query = useSwr24(
|
|
3778
4108
|
swrKey,
|
|
3779
4109
|
swrFn,
|
|
3780
4110
|
swrOptions
|
|
@@ -3788,12 +4118,21 @@ var getPromoteVoiceAgentVersionUrl = (voiceAgentId, version) => {
|
|
|
3788
4118
|
return `/v1/voice-agents/${voiceAgentId}/versions/${version}/promote`;
|
|
3789
4119
|
};
|
|
3790
4120
|
var promoteVoiceAgentVersion = async (voiceAgentId, version, promoteVoiceAgentVersionBody, options) => {
|
|
4121
|
+
const getHeaders = (h) => {
|
|
4122
|
+
if (!h) return {};
|
|
4123
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4124
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4125
|
+
return h;
|
|
4126
|
+
};
|
|
3791
4127
|
return customFetch(
|
|
3792
4128
|
getPromoteVoiceAgentVersionUrl(voiceAgentId, version),
|
|
3793
4129
|
{
|
|
3794
4130
|
...options,
|
|
3795
4131
|
method: "POST",
|
|
3796
|
-
headers: {
|
|
4132
|
+
headers: {
|
|
4133
|
+
"Content-Type": "application/json",
|
|
4134
|
+
...getHeaders(options?.headers)
|
|
4135
|
+
},
|
|
3797
4136
|
body: JSON.stringify(promoteVoiceAgentVersionBody)
|
|
3798
4137
|
}
|
|
3799
4138
|
);
|
|
@@ -3812,7 +4151,7 @@ var usePromoteVoiceAgentVersion = (voiceAgentId, version, options) => {
|
|
|
3812
4151
|
version,
|
|
3813
4152
|
requestOptions
|
|
3814
4153
|
);
|
|
3815
|
-
const query =
|
|
4154
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3816
4155
|
return {
|
|
3817
4156
|
swrKey,
|
|
3818
4157
|
...query
|
|
@@ -3835,10 +4174,10 @@ var getGetVoiceAgentVersionChangeSummaryKey = (voiceAgentId, version) => [
|
|
|
3835
4174
|
];
|
|
3836
4175
|
var useGetVoiceAgentVersionChangeSummary = (voiceAgentId, version, options) => {
|
|
3837
4176
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3838
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4177
|
+
const isEnabled = swrOptions?.enabled !== false && voiceAgentId !== null && voiceAgentId !== void 0 && version !== null && version !== void 0;
|
|
3839
4178
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetVoiceAgentVersionChangeSummaryKey(voiceAgentId, version) : null);
|
|
3840
4179
|
const swrFn = () => getVoiceAgentVersionChangeSummary(voiceAgentId, version, requestOptions);
|
|
3841
|
-
const query =
|
|
4180
|
+
const query = useSwr24(
|
|
3842
4181
|
swrKey,
|
|
3843
4182
|
swrFn,
|
|
3844
4183
|
swrOptions
|
|
@@ -3863,10 +4202,10 @@ var getVoiceAgentPlaceholders = async (voiceAgentId, options) => {
|
|
|
3863
4202
|
var getGetVoiceAgentPlaceholdersKey = (voiceAgentId) => [`/v1/voice-agents/${voiceAgentId}/placeholders`];
|
|
3864
4203
|
var useGetVoiceAgentPlaceholders = (voiceAgentId, options) => {
|
|
3865
4204
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3866
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4205
|
+
const isEnabled = swrOptions?.enabled !== false && voiceAgentId !== null && voiceAgentId !== void 0;
|
|
3867
4206
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetVoiceAgentPlaceholdersKey(voiceAgentId) : null);
|
|
3868
4207
|
const swrFn = () => getVoiceAgentPlaceholders(voiceAgentId, requestOptions);
|
|
3869
|
-
const query =
|
|
4208
|
+
const query = useSwr24(
|
|
3870
4209
|
swrKey,
|
|
3871
4210
|
swrFn,
|
|
3872
4211
|
swrOptions
|
|
@@ -3880,13 +4219,7 @@ var getGetVoiceAgentPromptUrl = (voiceAgentId, params) => {
|
|
|
3880
4219
|
const normalizedParams = new URLSearchParams();
|
|
3881
4220
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3882
4221
|
if (value !== void 0) {
|
|
3883
|
-
|
|
3884
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
3885
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
3886
|
-
}
|
|
3887
|
-
} else {
|
|
3888
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3889
|
-
}
|
|
4222
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3890
4223
|
}
|
|
3891
4224
|
});
|
|
3892
4225
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -3907,10 +4240,10 @@ var getGetVoiceAgentPromptKey = (voiceAgentId, params) => [
|
|
|
3907
4240
|
];
|
|
3908
4241
|
var useGetVoiceAgentPrompt = (voiceAgentId, params, options) => {
|
|
3909
4242
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
3910
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4243
|
+
const isEnabled = swrOptions?.enabled !== false && voiceAgentId !== null && voiceAgentId !== void 0;
|
|
3911
4244
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetVoiceAgentPromptKey(voiceAgentId, params) : null);
|
|
3912
4245
|
const swrFn = () => getVoiceAgentPrompt(voiceAgentId, params, requestOptions);
|
|
3913
|
-
const query =
|
|
4246
|
+
const query = useSwr24(
|
|
3914
4247
|
swrKey,
|
|
3915
4248
|
swrFn,
|
|
3916
4249
|
swrOptions
|
|
@@ -3924,12 +4257,21 @@ var getUpdateVoiceAgentPromptUrl = (voiceAgentId) => {
|
|
|
3924
4257
|
return `/v1/voice-agents/${voiceAgentId}/prompt`;
|
|
3925
4258
|
};
|
|
3926
4259
|
var updateVoiceAgentPrompt = async (voiceAgentId, updateVoiceAgentPromptBody, options) => {
|
|
4260
|
+
const getHeaders = (h) => {
|
|
4261
|
+
if (!h) return {};
|
|
4262
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4263
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4264
|
+
return h;
|
|
4265
|
+
};
|
|
3927
4266
|
return customFetch(
|
|
3928
4267
|
getUpdateVoiceAgentPromptUrl(voiceAgentId),
|
|
3929
4268
|
{
|
|
3930
4269
|
...options,
|
|
3931
4270
|
method: "PATCH",
|
|
3932
|
-
headers: {
|
|
4271
|
+
headers: {
|
|
4272
|
+
"Content-Type": "application/json",
|
|
4273
|
+
...getHeaders(options?.headers)
|
|
4274
|
+
},
|
|
3933
4275
|
body: JSON.stringify(updateVoiceAgentPromptBody)
|
|
3934
4276
|
}
|
|
3935
4277
|
);
|
|
@@ -3947,7 +4289,7 @@ var useUpdateVoiceAgentPrompt = (voiceAgentId, options) => {
|
|
|
3947
4289
|
voiceAgentId,
|
|
3948
4290
|
requestOptions
|
|
3949
4291
|
);
|
|
3950
|
-
const query =
|
|
4292
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3951
4293
|
return {
|
|
3952
4294
|
swrKey,
|
|
3953
4295
|
...query
|
|
@@ -3957,12 +4299,21 @@ var getUpdateVoiceAgentModelsUrl = (voiceAgentId) => {
|
|
|
3957
4299
|
return `/v1/voice-agents/${voiceAgentId}/models`;
|
|
3958
4300
|
};
|
|
3959
4301
|
var updateVoiceAgentModels = async (voiceAgentId, updateVoiceAgentModelsBody, options) => {
|
|
4302
|
+
const getHeaders = (h) => {
|
|
4303
|
+
if (!h) return {};
|
|
4304
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4305
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4306
|
+
return h;
|
|
4307
|
+
};
|
|
3960
4308
|
return customFetch(
|
|
3961
4309
|
getUpdateVoiceAgentModelsUrl(voiceAgentId),
|
|
3962
4310
|
{
|
|
3963
4311
|
...options,
|
|
3964
4312
|
method: "PATCH",
|
|
3965
|
-
headers: {
|
|
4313
|
+
headers: {
|
|
4314
|
+
"Content-Type": "application/json",
|
|
4315
|
+
...getHeaders(options?.headers)
|
|
4316
|
+
},
|
|
3966
4317
|
body: JSON.stringify(updateVoiceAgentModelsBody)
|
|
3967
4318
|
}
|
|
3968
4319
|
);
|
|
@@ -3980,7 +4331,7 @@ var useUpdateVoiceAgentModels = (voiceAgentId, options) => {
|
|
|
3980
4331
|
voiceAgentId,
|
|
3981
4332
|
requestOptions
|
|
3982
4333
|
);
|
|
3983
|
-
const query =
|
|
4334
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
3984
4335
|
return {
|
|
3985
4336
|
swrKey,
|
|
3986
4337
|
...query
|
|
@@ -3990,12 +4341,21 @@ var getUpdateCallControlsUrl = (voiceAgentId) => {
|
|
|
3990
4341
|
return `/v1/voice-agents/${voiceAgentId}/call-controls`;
|
|
3991
4342
|
};
|
|
3992
4343
|
var updateCallControls = async (voiceAgentId, updateCallControlsBody, options) => {
|
|
4344
|
+
const getHeaders = (h) => {
|
|
4345
|
+
if (!h) return {};
|
|
4346
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4347
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4348
|
+
return h;
|
|
4349
|
+
};
|
|
3993
4350
|
return customFetch(
|
|
3994
4351
|
getUpdateCallControlsUrl(voiceAgentId),
|
|
3995
4352
|
{
|
|
3996
4353
|
...options,
|
|
3997
4354
|
method: "PUT",
|
|
3998
|
-
headers: {
|
|
4355
|
+
headers: {
|
|
4356
|
+
"Content-Type": "application/json",
|
|
4357
|
+
...getHeaders(options?.headers)
|
|
4358
|
+
},
|
|
3999
4359
|
body: JSON.stringify(updateCallControlsBody)
|
|
4000
4360
|
}
|
|
4001
4361
|
);
|
|
@@ -4013,7 +4373,7 @@ var useUpdateCallControls = (voiceAgentId, options) => {
|
|
|
4013
4373
|
voiceAgentId,
|
|
4014
4374
|
requestOptions
|
|
4015
4375
|
);
|
|
4016
|
-
const query =
|
|
4376
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4017
4377
|
return {
|
|
4018
4378
|
swrKey,
|
|
4019
4379
|
...query
|
|
@@ -4023,12 +4383,21 @@ var getCreateWorkerWebhookUrl = (workerId) => {
|
|
|
4023
4383
|
return `/v1/workers/${workerId}/webhooks`;
|
|
4024
4384
|
};
|
|
4025
4385
|
var createWorkerWebhook = async (workerId, createWorkerWebhookBody, options) => {
|
|
4386
|
+
const getHeaders = (h) => {
|
|
4387
|
+
if (!h) return {};
|
|
4388
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4389
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4390
|
+
return h;
|
|
4391
|
+
};
|
|
4026
4392
|
return customFetch(
|
|
4027
4393
|
getCreateWorkerWebhookUrl(workerId),
|
|
4028
4394
|
{
|
|
4029
4395
|
...options,
|
|
4030
4396
|
method: "POST",
|
|
4031
|
-
headers: {
|
|
4397
|
+
headers: {
|
|
4398
|
+
"Content-Type": "application/json",
|
|
4399
|
+
...getHeaders(options?.headers)
|
|
4400
|
+
},
|
|
4032
4401
|
body: JSON.stringify(createWorkerWebhookBody)
|
|
4033
4402
|
}
|
|
4034
4403
|
);
|
|
@@ -4043,7 +4412,7 @@ var useCreateWorkerWebhook = (workerId, options) => {
|
|
|
4043
4412
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4044
4413
|
const swrKey = swrOptions?.swrKey ?? getCreateWorkerWebhookMutationKey(workerId);
|
|
4045
4414
|
const swrFn = getCreateWorkerWebhookMutationFetcher(workerId, requestOptions);
|
|
4046
|
-
const query =
|
|
4415
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4047
4416
|
return {
|
|
4048
4417
|
swrKey,
|
|
4049
4418
|
...query
|
|
@@ -4053,13 +4422,7 @@ var getListWorkerWebhooksUrl = (workerId, params) => {
|
|
|
4053
4422
|
const normalizedParams = new URLSearchParams();
|
|
4054
4423
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4055
4424
|
if (value !== void 0) {
|
|
4056
|
-
|
|
4057
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4058
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4059
|
-
}
|
|
4060
|
-
} else {
|
|
4061
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4062
|
-
}
|
|
4425
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4063
4426
|
}
|
|
4064
4427
|
});
|
|
4065
4428
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4077,10 +4440,10 @@ var listWorkerWebhooks = async (workerId, params, options) => {
|
|
|
4077
4440
|
var getListWorkerWebhooksKey = (workerId, params) => [`/v1/workers/${workerId}/webhooks`, ...params ? [params] : []];
|
|
4078
4441
|
var useListWorkerWebhooks = (workerId, params, options) => {
|
|
4079
4442
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4080
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4443
|
+
const isEnabled = swrOptions?.enabled !== false && workerId !== null && workerId !== void 0;
|
|
4081
4444
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWorkerWebhooksKey(workerId, params) : null);
|
|
4082
4445
|
const swrFn = () => listWorkerWebhooks(workerId, params, requestOptions);
|
|
4083
|
-
const query =
|
|
4446
|
+
const query = useSwr24(
|
|
4084
4447
|
swrKey,
|
|
4085
4448
|
swrFn,
|
|
4086
4449
|
swrOptions
|
|
@@ -4094,12 +4457,21 @@ var getCreateAgentWebhookUrl = (voiceAgentId) => {
|
|
|
4094
4457
|
return `/v1/voice-agents/${voiceAgentId}/webhooks`;
|
|
4095
4458
|
};
|
|
4096
4459
|
var createAgentWebhook = async (voiceAgentId, createAgentWebhookBody, options) => {
|
|
4460
|
+
const getHeaders = (h) => {
|
|
4461
|
+
if (!h) return {};
|
|
4462
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4463
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4464
|
+
return h;
|
|
4465
|
+
};
|
|
4097
4466
|
return customFetch(
|
|
4098
4467
|
getCreateAgentWebhookUrl(voiceAgentId),
|
|
4099
4468
|
{
|
|
4100
4469
|
...options,
|
|
4101
4470
|
method: "POST",
|
|
4102
|
-
headers: {
|
|
4471
|
+
headers: {
|
|
4472
|
+
"Content-Type": "application/json",
|
|
4473
|
+
...getHeaders(options?.headers)
|
|
4474
|
+
},
|
|
4103
4475
|
body: JSON.stringify(createAgentWebhookBody)
|
|
4104
4476
|
}
|
|
4105
4477
|
);
|
|
@@ -4117,7 +4489,7 @@ var useCreateAgentWebhook = (voiceAgentId, options) => {
|
|
|
4117
4489
|
voiceAgentId,
|
|
4118
4490
|
requestOptions
|
|
4119
4491
|
);
|
|
4120
|
-
const query =
|
|
4492
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4121
4493
|
return {
|
|
4122
4494
|
swrKey,
|
|
4123
4495
|
...query
|
|
@@ -4127,13 +4499,7 @@ var getListAgentWebhooksUrl = (voiceAgentId, params) => {
|
|
|
4127
4499
|
const normalizedParams = new URLSearchParams();
|
|
4128
4500
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4129
4501
|
if (value !== void 0) {
|
|
4130
|
-
|
|
4131
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4132
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4133
|
-
}
|
|
4134
|
-
} else {
|
|
4135
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4136
|
-
}
|
|
4502
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4137
4503
|
}
|
|
4138
4504
|
});
|
|
4139
4505
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4154,10 +4520,10 @@ var getListAgentWebhooksKey = (voiceAgentId, params) => [
|
|
|
4154
4520
|
];
|
|
4155
4521
|
var useListAgentWebhooks = (voiceAgentId, params, options) => {
|
|
4156
4522
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4157
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4523
|
+
const isEnabled = swrOptions?.enabled !== false && voiceAgentId !== null && voiceAgentId !== void 0;
|
|
4158
4524
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListAgentWebhooksKey(voiceAgentId, params) : null);
|
|
4159
4525
|
const swrFn = () => listAgentWebhooks(voiceAgentId, params, requestOptions);
|
|
4160
|
-
const query =
|
|
4526
|
+
const query = useSwr24(
|
|
4161
4527
|
swrKey,
|
|
4162
4528
|
swrFn,
|
|
4163
4529
|
swrOptions
|
|
@@ -4171,12 +4537,21 @@ var getCreateInboxWebhookUrl = (inboxId) => {
|
|
|
4171
4537
|
return `/v1/inboxes/${inboxId}/webhooks`;
|
|
4172
4538
|
};
|
|
4173
4539
|
var createInboxWebhook = async (inboxId, createInboxWebhookBody, options) => {
|
|
4540
|
+
const getHeaders = (h) => {
|
|
4541
|
+
if (!h) return {};
|
|
4542
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4543
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4544
|
+
return h;
|
|
4545
|
+
};
|
|
4174
4546
|
return customFetch(
|
|
4175
4547
|
getCreateInboxWebhookUrl(inboxId),
|
|
4176
4548
|
{
|
|
4177
4549
|
...options,
|
|
4178
4550
|
method: "POST",
|
|
4179
|
-
headers: {
|
|
4551
|
+
headers: {
|
|
4552
|
+
"Content-Type": "application/json",
|
|
4553
|
+
...getHeaders(options?.headers)
|
|
4554
|
+
},
|
|
4180
4555
|
body: JSON.stringify(createInboxWebhookBody)
|
|
4181
4556
|
}
|
|
4182
4557
|
);
|
|
@@ -4191,7 +4566,7 @@ var useCreateInboxWebhook = (inboxId, options) => {
|
|
|
4191
4566
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4192
4567
|
const swrKey = swrOptions?.swrKey ?? getCreateInboxWebhookMutationKey(inboxId);
|
|
4193
4568
|
const swrFn = getCreateInboxWebhookMutationFetcher(inboxId, requestOptions);
|
|
4194
|
-
const query =
|
|
4569
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4195
4570
|
return {
|
|
4196
4571
|
swrKey,
|
|
4197
4572
|
...query
|
|
@@ -4201,13 +4576,7 @@ var getListInboxWebhooksUrl = (inboxId, params) => {
|
|
|
4201
4576
|
const normalizedParams = new URLSearchParams();
|
|
4202
4577
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4203
4578
|
if (value !== void 0) {
|
|
4204
|
-
|
|
4205
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4206
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4207
|
-
}
|
|
4208
|
-
} else {
|
|
4209
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4210
|
-
}
|
|
4579
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4211
4580
|
}
|
|
4212
4581
|
});
|
|
4213
4582
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4225,10 +4594,10 @@ var listInboxWebhooks = async (inboxId, params, options) => {
|
|
|
4225
4594
|
var getListInboxWebhooksKey = (inboxId, params) => [`/v1/inboxes/${inboxId}/webhooks`, ...params ? [params] : []];
|
|
4226
4595
|
var useListInboxWebhooks = (inboxId, params, options) => {
|
|
4227
4596
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4228
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4597
|
+
const isEnabled = swrOptions?.enabled !== false && inboxId !== null && inboxId !== void 0;
|
|
4229
4598
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListInboxWebhooksKey(inboxId, params) : null);
|
|
4230
4599
|
const swrFn = () => listInboxWebhooks(inboxId, params, requestOptions);
|
|
4231
|
-
const query =
|
|
4600
|
+
const query = useSwr24(
|
|
4232
4601
|
swrKey,
|
|
4233
4602
|
swrFn,
|
|
4234
4603
|
swrOptions
|
|
@@ -4242,12 +4611,21 @@ var getCreateExtractorWebhookUrl = (id) => {
|
|
|
4242
4611
|
return `/v1/extractors/${id}/webhooks`;
|
|
4243
4612
|
};
|
|
4244
4613
|
var createExtractorWebhook = async (id, createExtractorWebhookBody, options) => {
|
|
4614
|
+
const getHeaders = (h) => {
|
|
4615
|
+
if (!h) return {};
|
|
4616
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4617
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4618
|
+
return h;
|
|
4619
|
+
};
|
|
4245
4620
|
return customFetch(
|
|
4246
4621
|
getCreateExtractorWebhookUrl(id),
|
|
4247
4622
|
{
|
|
4248
4623
|
...options,
|
|
4249
4624
|
method: "POST",
|
|
4250
|
-
headers: {
|
|
4625
|
+
headers: {
|
|
4626
|
+
"Content-Type": "application/json",
|
|
4627
|
+
...getHeaders(options?.headers)
|
|
4628
|
+
},
|
|
4251
4629
|
body: JSON.stringify(createExtractorWebhookBody)
|
|
4252
4630
|
}
|
|
4253
4631
|
);
|
|
@@ -4262,7 +4640,7 @@ var useCreateExtractorWebhook = (id, options) => {
|
|
|
4262
4640
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4263
4641
|
const swrKey = swrOptions?.swrKey ?? getCreateExtractorWebhookMutationKey(id);
|
|
4264
4642
|
const swrFn = getCreateExtractorWebhookMutationFetcher(id, requestOptions);
|
|
4265
|
-
const query =
|
|
4643
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4266
4644
|
return {
|
|
4267
4645
|
swrKey,
|
|
4268
4646
|
...query
|
|
@@ -4272,13 +4650,7 @@ var getListWebhooksUrl = (id, params) => {
|
|
|
4272
4650
|
const normalizedParams = new URLSearchParams();
|
|
4273
4651
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4274
4652
|
if (value !== void 0) {
|
|
4275
|
-
|
|
4276
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4277
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4278
|
-
}
|
|
4279
|
-
} else {
|
|
4280
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4281
|
-
}
|
|
4653
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4282
4654
|
}
|
|
4283
4655
|
});
|
|
4284
4656
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4293,10 +4665,10 @@ var listWebhooks = async (id, params, options) => {
|
|
|
4293
4665
|
var getListWebhooksKey = (id, params) => [`/v1/extractors/${id}/webhooks`, ...params ? [params] : []];
|
|
4294
4666
|
var useListWebhooks = (id, params, options) => {
|
|
4295
4667
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4296
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4668
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
4297
4669
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWebhooksKey(id, params) : null);
|
|
4298
4670
|
const swrFn = () => listWebhooks(id, params, requestOptions);
|
|
4299
|
-
const query =
|
|
4671
|
+
const query = useSwr24(
|
|
4300
4672
|
swrKey,
|
|
4301
4673
|
swrFn,
|
|
4302
4674
|
swrOptions
|
|
@@ -4310,12 +4682,21 @@ var getCreateNotificationWebhookUrl = () => {
|
|
|
4310
4682
|
return `/v1/notifications/webhooks`;
|
|
4311
4683
|
};
|
|
4312
4684
|
var createNotificationWebhook = async (createNotificationWebhookBody, options) => {
|
|
4685
|
+
const getHeaders = (h) => {
|
|
4686
|
+
if (!h) return {};
|
|
4687
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4688
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4689
|
+
return h;
|
|
4690
|
+
};
|
|
4313
4691
|
return customFetch(
|
|
4314
4692
|
getCreateNotificationWebhookUrl(),
|
|
4315
4693
|
{
|
|
4316
4694
|
...options,
|
|
4317
4695
|
method: "POST",
|
|
4318
|
-
headers: {
|
|
4696
|
+
headers: {
|
|
4697
|
+
"Content-Type": "application/json",
|
|
4698
|
+
...getHeaders(options?.headers)
|
|
4699
|
+
},
|
|
4319
4700
|
body: JSON.stringify(createNotificationWebhookBody)
|
|
4320
4701
|
}
|
|
4321
4702
|
);
|
|
@@ -4330,7 +4711,7 @@ var useCreateNotificationWebhook = (options) => {
|
|
|
4330
4711
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4331
4712
|
const swrKey = swrOptions?.swrKey ?? getCreateNotificationWebhookMutationKey();
|
|
4332
4713
|
const swrFn = getCreateNotificationWebhookMutationFetcher(requestOptions);
|
|
4333
|
-
const query =
|
|
4714
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4334
4715
|
return {
|
|
4335
4716
|
swrKey,
|
|
4336
4717
|
...query
|
|
@@ -4340,13 +4721,7 @@ var getListNotificationWebhooksUrl = (params) => {
|
|
|
4340
4721
|
const normalizedParams = new URLSearchParams();
|
|
4341
4722
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4342
4723
|
if (value !== void 0) {
|
|
4343
|
-
|
|
4344
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4345
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4346
|
-
}
|
|
4347
|
-
} else {
|
|
4348
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4349
|
-
}
|
|
4724
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4350
4725
|
}
|
|
4351
4726
|
});
|
|
4352
4727
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4367,7 +4742,7 @@ var useListNotificationWebhooks = (params, options) => {
|
|
|
4367
4742
|
const isEnabled = swrOptions?.enabled !== false;
|
|
4368
4743
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListNotificationWebhooksKey(params) : null);
|
|
4369
4744
|
const swrFn = () => listNotificationWebhooks(params, requestOptions);
|
|
4370
|
-
const query =
|
|
4745
|
+
const query = useSwr24(
|
|
4371
4746
|
swrKey,
|
|
4372
4747
|
swrFn,
|
|
4373
4748
|
swrOptions
|
|
@@ -4396,7 +4771,7 @@ var useDeleteWebhook = (id, options) => {
|
|
|
4396
4771
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4397
4772
|
const swrKey = swrOptions?.swrKey ?? getDeleteWebhookMutationKey(id);
|
|
4398
4773
|
const swrFn = getDeleteWebhookMutationFetcher(id, requestOptions);
|
|
4399
|
-
const query =
|
|
4774
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4400
4775
|
return {
|
|
4401
4776
|
swrKey,
|
|
4402
4777
|
...query
|
|
@@ -4414,10 +4789,10 @@ var getWebhook = async (id, options) => {
|
|
|
4414
4789
|
var getGetWebhookKey = (id) => [`/v1/webhooks/${id}`];
|
|
4415
4790
|
var useGetWebhook = (id, options) => {
|
|
4416
4791
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4417
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4792
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
4418
4793
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetWebhookKey(id) : null);
|
|
4419
4794
|
const swrFn = () => getWebhook(id, requestOptions);
|
|
4420
|
-
const query =
|
|
4795
|
+
const query = useSwr24(
|
|
4421
4796
|
swrKey,
|
|
4422
4797
|
swrFn,
|
|
4423
4798
|
swrOptions
|
|
@@ -4431,10 +4806,19 @@ var getUpdateWebhookUrl = (id) => {
|
|
|
4431
4806
|
return `/v1/webhooks/${id}`;
|
|
4432
4807
|
};
|
|
4433
4808
|
var updateWebhook = async (id, updateWebhookBody, options) => {
|
|
4809
|
+
const getHeaders = (h) => {
|
|
4810
|
+
if (!h) return {};
|
|
4811
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4812
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4813
|
+
return h;
|
|
4814
|
+
};
|
|
4434
4815
|
return customFetch(getUpdateWebhookUrl(id), {
|
|
4435
4816
|
...options,
|
|
4436
4817
|
method: "PATCH",
|
|
4437
|
-
headers: {
|
|
4818
|
+
headers: {
|
|
4819
|
+
"Content-Type": "application/json",
|
|
4820
|
+
...getHeaders(options?.headers)
|
|
4821
|
+
},
|
|
4438
4822
|
body: JSON.stringify(updateWebhookBody)
|
|
4439
4823
|
});
|
|
4440
4824
|
};
|
|
@@ -4448,7 +4832,7 @@ var useUpdateWebhook = (id, options) => {
|
|
|
4448
4832
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4449
4833
|
const swrKey = swrOptions?.swrKey ?? getUpdateWebhookMutationKey(id);
|
|
4450
4834
|
const swrFn = getUpdateWebhookMutationFetcher(id, requestOptions);
|
|
4451
|
-
const query =
|
|
4835
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4452
4836
|
return {
|
|
4453
4837
|
swrKey,
|
|
4454
4838
|
...query
|
|
@@ -4458,13 +4842,7 @@ var getListWebhookDeliveriesUrl = (id, params) => {
|
|
|
4458
4842
|
const normalizedParams = new URLSearchParams();
|
|
4459
4843
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4460
4844
|
if (value !== void 0) {
|
|
4461
|
-
|
|
4462
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4463
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4464
|
-
}
|
|
4465
|
-
} else {
|
|
4466
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4467
|
-
}
|
|
4845
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4468
4846
|
}
|
|
4469
4847
|
});
|
|
4470
4848
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4482,10 +4860,10 @@ var listWebhookDeliveries = async (id, params, options) => {
|
|
|
4482
4860
|
var getListWebhookDeliveriesKey = (id, params) => [`/v1/webhooks/${id}/deliveries`, ...params ? [params] : []];
|
|
4483
4861
|
var useListWebhookDeliveries = (id, params, options) => {
|
|
4484
4862
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4485
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
4863
|
+
const isEnabled = swrOptions?.enabled !== false && id !== null && id !== void 0;
|
|
4486
4864
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWebhookDeliveriesKey(id, params) : null);
|
|
4487
4865
|
const swrFn = () => listWebhookDeliveries(id, params, requestOptions);
|
|
4488
|
-
const query =
|
|
4866
|
+
const query = useSwr24(
|
|
4489
4867
|
swrKey,
|
|
4490
4868
|
swrFn,
|
|
4491
4869
|
swrOptions
|
|
@@ -4499,10 +4877,19 @@ var getTestWebhookUrl = (id) => {
|
|
|
4499
4877
|
return `/v1/webhooks/${id}/test`;
|
|
4500
4878
|
};
|
|
4501
4879
|
var testWebhook = async (id, testWebhookBody, options) => {
|
|
4880
|
+
const getHeaders = (h) => {
|
|
4881
|
+
if (!h) return {};
|
|
4882
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4883
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4884
|
+
return h;
|
|
4885
|
+
};
|
|
4502
4886
|
return customFetch(getTestWebhookUrl(id), {
|
|
4503
4887
|
...options,
|
|
4504
4888
|
method: "POST",
|
|
4505
|
-
headers: {
|
|
4889
|
+
headers: {
|
|
4890
|
+
"Content-Type": "application/json",
|
|
4891
|
+
...getHeaders(options?.headers)
|
|
4892
|
+
},
|
|
4506
4893
|
body: JSON.stringify(testWebhookBody)
|
|
4507
4894
|
});
|
|
4508
4895
|
};
|
|
@@ -4516,7 +4903,7 @@ var useTestWebhook = (id, options) => {
|
|
|
4516
4903
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4517
4904
|
const swrKey = swrOptions?.swrKey ?? getTestWebhookMutationKey(id);
|
|
4518
4905
|
const swrFn = getTestWebhookMutationFetcher(id, requestOptions);
|
|
4519
|
-
const query =
|
|
4906
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4520
4907
|
return {
|
|
4521
4908
|
swrKey,
|
|
4522
4909
|
...query
|
|
@@ -4524,18 +4911,27 @@ var useTestWebhook = (id, options) => {
|
|
|
4524
4911
|
};
|
|
4525
4912
|
var getListWorkerRunsUrl = (params) => {
|
|
4526
4913
|
const normalizedParams = new URLSearchParams();
|
|
4914
|
+
const deepObjectEntries = [];
|
|
4527
4915
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4916
|
+
const deepObjectParameters = ["scope"];
|
|
4917
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && deepObjectParameters.includes(key)) {
|
|
4918
|
+
Object.entries(value).forEach(([subKey, subValue]) => {
|
|
4919
|
+
if (subValue !== void 0) {
|
|
4920
|
+
deepObjectEntries.push(
|
|
4921
|
+
encodeURIComponent(key) + "[" + encodeURIComponent(subKey) + "]=" + (subValue === null ? "null" : encodeURIComponent(String(subValue)))
|
|
4922
|
+
);
|
|
4532
4923
|
}
|
|
4533
|
-
}
|
|
4534
|
-
|
|
4535
|
-
|
|
4924
|
+
});
|
|
4925
|
+
return;
|
|
4926
|
+
}
|
|
4927
|
+
if (value !== void 0) {
|
|
4928
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4536
4929
|
}
|
|
4537
4930
|
});
|
|
4538
|
-
const stringifiedParams =
|
|
4931
|
+
const stringifiedParams = [
|
|
4932
|
+
normalizedParams.toString(),
|
|
4933
|
+
deepObjectEntries.join("&")
|
|
4934
|
+
].filter(Boolean).join("&");
|
|
4539
4935
|
return stringifiedParams.length > 0 ? `/v1/worker-runs?${stringifiedParams}` : `/v1/worker-runs`;
|
|
4540
4936
|
};
|
|
4541
4937
|
var listWorkerRuns = async (params, options) => {
|
|
@@ -4550,7 +4946,7 @@ var useListWorkerRuns = (params, options) => {
|
|
|
4550
4946
|
const isEnabled = swrOptions?.enabled !== false;
|
|
4551
4947
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWorkerRunsKey(params) : null);
|
|
4552
4948
|
const swrFn = () => listWorkerRuns(params, requestOptions);
|
|
4553
|
-
const query =
|
|
4949
|
+
const query = useSwr24(
|
|
4554
4950
|
swrKey,
|
|
4555
4951
|
swrFn,
|
|
4556
4952
|
swrOptions
|
|
@@ -4564,10 +4960,19 @@ var getCreateWorkerRunUrl = () => {
|
|
|
4564
4960
|
return `/v1/worker-runs`;
|
|
4565
4961
|
};
|
|
4566
4962
|
var createWorkerRun = async (createWorkerRunBody, options) => {
|
|
4963
|
+
const getHeaders = (h) => {
|
|
4964
|
+
if (!h) return {};
|
|
4965
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4966
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
4967
|
+
return h;
|
|
4968
|
+
};
|
|
4567
4969
|
return customFetch(getCreateWorkerRunUrl(), {
|
|
4568
4970
|
...options,
|
|
4569
4971
|
method: "POST",
|
|
4570
|
-
headers: {
|
|
4972
|
+
headers: {
|
|
4973
|
+
"Content-Type": "application/json",
|
|
4974
|
+
...getHeaders(options?.headers)
|
|
4975
|
+
},
|
|
4571
4976
|
body: JSON.stringify(createWorkerRunBody)
|
|
4572
4977
|
});
|
|
4573
4978
|
};
|
|
@@ -4581,7 +4986,7 @@ var useCreateWorkerRun = (options) => {
|
|
|
4581
4986
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4582
4987
|
const swrKey = swrOptions?.swrKey ?? getCreateWorkerRunMutationKey();
|
|
4583
4988
|
const swrFn = getCreateWorkerRunMutationFetcher(requestOptions);
|
|
4584
|
-
const query =
|
|
4989
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4585
4990
|
return {
|
|
4586
4991
|
swrKey,
|
|
4587
4992
|
...query
|
|
@@ -4599,10 +5004,10 @@ var getWorkerRun = async (workerRunId, options) => {
|
|
|
4599
5004
|
var getGetWorkerRunKey = (workerRunId) => [`/v1/worker-runs/${workerRunId}`];
|
|
4600
5005
|
var useGetWorkerRun = (workerRunId, options) => {
|
|
4601
5006
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4602
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
5007
|
+
const isEnabled = swrOptions?.enabled !== false && workerRunId !== null && workerRunId !== void 0;
|
|
4603
5008
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetWorkerRunKey(workerRunId) : null);
|
|
4604
5009
|
const swrFn = () => getWorkerRun(workerRunId, requestOptions);
|
|
4605
|
-
const query =
|
|
5010
|
+
const query = useSwr24(
|
|
4606
5011
|
swrKey,
|
|
4607
5012
|
swrFn,
|
|
4608
5013
|
swrOptions
|
|
@@ -4616,13 +5021,7 @@ var getListWorkerRunMessagesUrl = (workerRunId, params) => {
|
|
|
4616
5021
|
const normalizedParams = new URLSearchParams();
|
|
4617
5022
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4618
5023
|
if (value !== void 0) {
|
|
4619
|
-
|
|
4620
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4621
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4622
|
-
}
|
|
4623
|
-
} else {
|
|
4624
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4625
|
-
}
|
|
5024
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4626
5025
|
}
|
|
4627
5026
|
});
|
|
4628
5027
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4643,10 +5042,10 @@ var getListWorkerRunMessagesKey = (workerRunId, params) => [
|
|
|
4643
5042
|
];
|
|
4644
5043
|
var useListWorkerRunMessages = (workerRunId, params, options) => {
|
|
4645
5044
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4646
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
5045
|
+
const isEnabled = swrOptions?.enabled !== false && workerRunId !== null && workerRunId !== void 0;
|
|
4647
5046
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWorkerRunMessagesKey(workerRunId, params) : null);
|
|
4648
5047
|
const swrFn = () => listWorkerRunMessages(workerRunId, params, requestOptions);
|
|
4649
|
-
const query =
|
|
5048
|
+
const query = useSwr24(
|
|
4650
5049
|
swrKey,
|
|
4651
5050
|
swrFn,
|
|
4652
5051
|
swrOptions
|
|
@@ -4678,7 +5077,7 @@ var useCancelWorkerRun = (workerRunId, options) => {
|
|
|
4678
5077
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4679
5078
|
const swrKey = swrOptions?.swrKey ?? getCancelWorkerRunMutationKey(workerRunId);
|
|
4680
5079
|
const swrFn = getCancelWorkerRunMutationFetcher(workerRunId, requestOptions);
|
|
4681
|
-
const query =
|
|
5080
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4682
5081
|
return {
|
|
4683
5082
|
swrKey,
|
|
4684
5083
|
...query
|
|
@@ -4688,10 +5087,19 @@ var getNotifyAdminUrl = () => {
|
|
|
4688
5087
|
return `/worker/v1/notifications`;
|
|
4689
5088
|
};
|
|
4690
5089
|
var notifyAdmin = async (notifyAdminBody, options) => {
|
|
5090
|
+
const getHeaders = (h) => {
|
|
5091
|
+
if (!h) return {};
|
|
5092
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5093
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
5094
|
+
return h;
|
|
5095
|
+
};
|
|
4691
5096
|
return customFetch(getNotifyAdminUrl(), {
|
|
4692
5097
|
...options,
|
|
4693
5098
|
method: "POST",
|
|
4694
|
-
headers: {
|
|
5099
|
+
headers: {
|
|
5100
|
+
"Content-Type": "application/json",
|
|
5101
|
+
...getHeaders(options?.headers)
|
|
5102
|
+
},
|
|
4695
5103
|
body: JSON.stringify(notifyAdminBody)
|
|
4696
5104
|
});
|
|
4697
5105
|
};
|
|
@@ -4705,7 +5113,7 @@ var useNotifyAdmin = (options) => {
|
|
|
4705
5113
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4706
5114
|
const swrKey = swrOptions?.swrKey ?? getNotifyAdminMutationKey();
|
|
4707
5115
|
const swrFn = getNotifyAdminMutationFetcher(requestOptions);
|
|
4708
|
-
const query =
|
|
5116
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4709
5117
|
return {
|
|
4710
5118
|
swrKey,
|
|
4711
5119
|
...query
|
|
@@ -4715,10 +5123,19 @@ var getCreateWorkerUrl = () => {
|
|
|
4715
5123
|
return `/v1/workers`;
|
|
4716
5124
|
};
|
|
4717
5125
|
var createWorker = async (createWorkerBody, options) => {
|
|
5126
|
+
const getHeaders = (h) => {
|
|
5127
|
+
if (!h) return {};
|
|
5128
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5129
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
5130
|
+
return h;
|
|
5131
|
+
};
|
|
4718
5132
|
return customFetch(getCreateWorkerUrl(), {
|
|
4719
5133
|
...options,
|
|
4720
5134
|
method: "POST",
|
|
4721
|
-
headers: {
|
|
5135
|
+
headers: {
|
|
5136
|
+
"Content-Type": "application/json",
|
|
5137
|
+
...getHeaders(options?.headers)
|
|
5138
|
+
},
|
|
4722
5139
|
body: JSON.stringify(createWorkerBody)
|
|
4723
5140
|
});
|
|
4724
5141
|
};
|
|
@@ -4732,7 +5149,7 @@ var useCreateWorker = (options) => {
|
|
|
4732
5149
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4733
5150
|
const swrKey = swrOptions?.swrKey ?? getCreateWorkerMutationKey();
|
|
4734
5151
|
const swrFn = getCreateWorkerMutationFetcher(requestOptions);
|
|
4735
|
-
const query =
|
|
5152
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4736
5153
|
return {
|
|
4737
5154
|
swrKey,
|
|
4738
5155
|
...query
|
|
@@ -4742,13 +5159,7 @@ var getListWorkersUrl = (params) => {
|
|
|
4742
5159
|
const normalizedParams = new URLSearchParams();
|
|
4743
5160
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4744
5161
|
if (value !== void 0) {
|
|
4745
|
-
|
|
4746
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4747
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4748
|
-
}
|
|
4749
|
-
} else {
|
|
4750
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4751
|
-
}
|
|
5162
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4752
5163
|
}
|
|
4753
5164
|
});
|
|
4754
5165
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4766,7 +5177,7 @@ var useListWorkers = (params, options) => {
|
|
|
4766
5177
|
const isEnabled = swrOptions?.enabled !== false;
|
|
4767
5178
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWorkersKey(params) : null);
|
|
4768
5179
|
const swrFn = () => listWorkers(params, requestOptions);
|
|
4769
|
-
const query =
|
|
5180
|
+
const query = useSwr24(
|
|
4770
5181
|
swrKey,
|
|
4771
5182
|
swrFn,
|
|
4772
5183
|
swrOptions
|
|
@@ -4788,10 +5199,10 @@ var getWorker = async (workerId, options) => {
|
|
|
4788
5199
|
var getGetWorkerKey = (workerId) => [`/v1/workers/${workerId}`];
|
|
4789
5200
|
var useGetWorker = (workerId, options) => {
|
|
4790
5201
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4791
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
5202
|
+
const isEnabled = swrOptions?.enabled !== false && workerId !== null && workerId !== void 0;
|
|
4792
5203
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetWorkerKey(workerId) : null);
|
|
4793
5204
|
const swrFn = () => getWorker(workerId, requestOptions);
|
|
4794
|
-
const query =
|
|
5205
|
+
const query = useSwr24(
|
|
4795
5206
|
swrKey,
|
|
4796
5207
|
swrFn,
|
|
4797
5208
|
swrOptions
|
|
@@ -4820,7 +5231,7 @@ var useDeleteWorker = (workerId, options) => {
|
|
|
4820
5231
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4821
5232
|
const swrKey = swrOptions?.swrKey ?? getDeleteWorkerMutationKey(workerId);
|
|
4822
5233
|
const swrFn = getDeleteWorkerMutationFetcher(workerId, requestOptions);
|
|
4823
|
-
const query =
|
|
5234
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4824
5235
|
return {
|
|
4825
5236
|
swrKey,
|
|
4826
5237
|
...query
|
|
@@ -4830,10 +5241,19 @@ var getUpdateWorkerUrl = (workerId) => {
|
|
|
4830
5241
|
return `/v1/workers/${workerId}`;
|
|
4831
5242
|
};
|
|
4832
5243
|
var updateWorker = async (workerId, updateWorkerBody, options) => {
|
|
5244
|
+
const getHeaders = (h) => {
|
|
5245
|
+
if (!h) return {};
|
|
5246
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5247
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
5248
|
+
return h;
|
|
5249
|
+
};
|
|
4833
5250
|
return customFetch(getUpdateWorkerUrl(workerId), {
|
|
4834
5251
|
...options,
|
|
4835
5252
|
method: "PATCH",
|
|
4836
|
-
headers: {
|
|
5253
|
+
headers: {
|
|
5254
|
+
"Content-Type": "application/json",
|
|
5255
|
+
...getHeaders(options?.headers)
|
|
5256
|
+
},
|
|
4837
5257
|
body: JSON.stringify(updateWorkerBody)
|
|
4838
5258
|
});
|
|
4839
5259
|
};
|
|
@@ -4847,7 +5267,7 @@ var useUpdateWorker = (workerId, options) => {
|
|
|
4847
5267
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4848
5268
|
const swrKey = swrOptions?.swrKey ?? getUpdateWorkerMutationKey(workerId);
|
|
4849
5269
|
const swrFn = getUpdateWorkerMutationFetcher(workerId, requestOptions);
|
|
4850
|
-
const query =
|
|
5270
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4851
5271
|
return {
|
|
4852
5272
|
swrKey,
|
|
4853
5273
|
...query
|
|
@@ -4857,13 +5277,7 @@ var getGetWorkerPromptUrl = (workerId, params) => {
|
|
|
4857
5277
|
const normalizedParams = new URLSearchParams();
|
|
4858
5278
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4859
5279
|
if (value !== void 0) {
|
|
4860
|
-
|
|
4861
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4862
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4863
|
-
}
|
|
4864
|
-
} else {
|
|
4865
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4866
|
-
}
|
|
5280
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4867
5281
|
}
|
|
4868
5282
|
});
|
|
4869
5283
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -4881,10 +5295,10 @@ var getWorkerPrompt = async (workerId, params, options) => {
|
|
|
4881
5295
|
var getGetWorkerPromptKey = (workerId, params) => [`/v1/workers/${workerId}/prompt`, ...params ? [params] : []];
|
|
4882
5296
|
var useGetWorkerPrompt = (workerId, params, options) => {
|
|
4883
5297
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4884
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
5298
|
+
const isEnabled = swrOptions?.enabled !== false && workerId !== null && workerId !== void 0;
|
|
4885
5299
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetWorkerPromptKey(workerId, params) : null);
|
|
4886
5300
|
const swrFn = () => getWorkerPrompt(workerId, params, requestOptions);
|
|
4887
|
-
const query =
|
|
5301
|
+
const query = useSwr24(
|
|
4888
5302
|
swrKey,
|
|
4889
5303
|
swrFn,
|
|
4890
5304
|
swrOptions
|
|
@@ -4898,12 +5312,21 @@ var getUpdateWorkerPromptUrl = (workerId) => {
|
|
|
4898
5312
|
return `/v1/workers/${workerId}/prompt`;
|
|
4899
5313
|
};
|
|
4900
5314
|
var updateWorkerPrompt = async (workerId, updateWorkerPromptBody, options) => {
|
|
5315
|
+
const getHeaders = (h) => {
|
|
5316
|
+
if (!h) return {};
|
|
5317
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5318
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
5319
|
+
return h;
|
|
5320
|
+
};
|
|
4901
5321
|
return customFetch(
|
|
4902
5322
|
getUpdateWorkerPromptUrl(workerId),
|
|
4903
5323
|
{
|
|
4904
5324
|
...options,
|
|
4905
5325
|
method: "PATCH",
|
|
4906
|
-
headers: {
|
|
5326
|
+
headers: {
|
|
5327
|
+
"Content-Type": "application/json",
|
|
5328
|
+
...getHeaders(options?.headers)
|
|
5329
|
+
},
|
|
4907
5330
|
body: JSON.stringify(updateWorkerPromptBody)
|
|
4908
5331
|
}
|
|
4909
5332
|
);
|
|
@@ -4918,7 +5341,7 @@ var useUpdateWorkerPrompt = (workerId, options) => {
|
|
|
4918
5341
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4919
5342
|
const swrKey = swrOptions?.swrKey ?? getUpdateWorkerPromptMutationKey(workerId);
|
|
4920
5343
|
const swrFn = getUpdateWorkerPromptMutationFetcher(workerId, requestOptions);
|
|
4921
|
-
const query =
|
|
5344
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4922
5345
|
return {
|
|
4923
5346
|
swrKey,
|
|
4924
5347
|
...query
|
|
@@ -4939,7 +5362,7 @@ var useListWorkerModels = (options) => {
|
|
|
4939
5362
|
const isEnabled = swrOptions?.enabled !== false;
|
|
4940
5363
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWorkerModelsKey() : null);
|
|
4941
5364
|
const swrFn = () => listWorkerModels(requestOptions);
|
|
4942
|
-
const query =
|
|
5365
|
+
const query = useSwr24(
|
|
4943
5366
|
swrKey,
|
|
4944
5367
|
swrFn,
|
|
4945
5368
|
swrOptions
|
|
@@ -4953,12 +5376,21 @@ var getUpdateWorkerMcpsUrl = (workerId) => {
|
|
|
4953
5376
|
return `/v1/workers/${workerId}/mcps`;
|
|
4954
5377
|
};
|
|
4955
5378
|
var updateWorkerMcps = async (workerId, updateWorkerMcpsBody, options) => {
|
|
5379
|
+
const getHeaders = (h) => {
|
|
5380
|
+
if (!h) return {};
|
|
5381
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5382
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
5383
|
+
return h;
|
|
5384
|
+
};
|
|
4956
5385
|
return customFetch(
|
|
4957
5386
|
getUpdateWorkerMcpsUrl(workerId),
|
|
4958
5387
|
{
|
|
4959
5388
|
...options,
|
|
4960
5389
|
method: "PATCH",
|
|
4961
|
-
headers: {
|
|
5390
|
+
headers: {
|
|
5391
|
+
"Content-Type": "application/json",
|
|
5392
|
+
...getHeaders(options?.headers)
|
|
5393
|
+
},
|
|
4962
5394
|
body: JSON.stringify(updateWorkerMcpsBody)
|
|
4963
5395
|
}
|
|
4964
5396
|
);
|
|
@@ -4973,7 +5405,7 @@ var useUpdateWorkerMcps = (workerId, options) => {
|
|
|
4973
5405
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
4974
5406
|
const swrKey = swrOptions?.swrKey ?? getUpdateWorkerMcpsMutationKey(workerId);
|
|
4975
5407
|
const swrFn = getUpdateWorkerMcpsMutationFetcher(workerId, requestOptions);
|
|
4976
|
-
const query =
|
|
5408
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
4977
5409
|
return {
|
|
4978
5410
|
swrKey,
|
|
4979
5411
|
...query
|
|
@@ -4983,13 +5415,7 @@ var getListWorkerVersionsUrl = (workerId, params) => {
|
|
|
4983
5415
|
const normalizedParams = new URLSearchParams();
|
|
4984
5416
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4985
5417
|
if (value !== void 0) {
|
|
4986
|
-
|
|
4987
|
-
for (const [sk, sv] of Object.entries(value)) {
|
|
4988
|
-
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
4989
|
-
}
|
|
4990
|
-
} else {
|
|
4991
|
-
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4992
|
-
}
|
|
5418
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
4993
5419
|
}
|
|
4994
5420
|
});
|
|
4995
5421
|
const stringifiedParams = normalizedParams.toString();
|
|
@@ -5007,10 +5433,10 @@ var listWorkerVersions = async (workerId, params, options) => {
|
|
|
5007
5433
|
var getListWorkerVersionsKey = (workerId, params) => [`/v1/workers/${workerId}/versions`, ...params ? [params] : []];
|
|
5008
5434
|
var useListWorkerVersions = (workerId, params, options) => {
|
|
5009
5435
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
5010
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
5436
|
+
const isEnabled = swrOptions?.enabled !== false && workerId !== null && workerId !== void 0;
|
|
5011
5437
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListWorkerVersionsKey(workerId, params) : null);
|
|
5012
5438
|
const swrFn = () => listWorkerVersions(workerId, params, requestOptions);
|
|
5013
|
-
const query =
|
|
5439
|
+
const query = useSwr24(
|
|
5014
5440
|
swrKey,
|
|
5015
5441
|
swrFn,
|
|
5016
5442
|
swrOptions
|
|
@@ -5035,10 +5461,10 @@ var getWorkerVersion = async (workerId, version, options) => {
|
|
|
5035
5461
|
var getGetWorkerVersionKey = (workerId, version) => [`/v1/workers/${workerId}/versions/${version}`];
|
|
5036
5462
|
var useGetWorkerVersion = (workerId, version, options) => {
|
|
5037
5463
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
5038
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
5464
|
+
const isEnabled = swrOptions?.enabled !== false && workerId !== null && workerId !== void 0 && version !== null && version !== void 0;
|
|
5039
5465
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetWorkerVersionKey(workerId, version) : null);
|
|
5040
5466
|
const swrFn = () => getWorkerVersion(workerId, version, requestOptions);
|
|
5041
|
-
const query =
|
|
5467
|
+
const query = useSwr24(
|
|
5042
5468
|
swrKey,
|
|
5043
5469
|
swrFn,
|
|
5044
5470
|
swrOptions
|
|
@@ -5052,12 +5478,21 @@ var getPromoteWorkerVersionUrl = (workerId, version) => {
|
|
|
5052
5478
|
return `/v1/workers/${workerId}/versions/${version}/promote`;
|
|
5053
5479
|
};
|
|
5054
5480
|
var promoteWorkerVersion = async (workerId, version, promoteWorkerVersionBody, options) => {
|
|
5481
|
+
const getHeaders = (h) => {
|
|
5482
|
+
if (!h) return {};
|
|
5483
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5484
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
5485
|
+
return h;
|
|
5486
|
+
};
|
|
5055
5487
|
return customFetch(
|
|
5056
5488
|
getPromoteWorkerVersionUrl(workerId, version),
|
|
5057
5489
|
{
|
|
5058
5490
|
...options,
|
|
5059
5491
|
method: "POST",
|
|
5060
|
-
headers: {
|
|
5492
|
+
headers: {
|
|
5493
|
+
"Content-Type": "application/json",
|
|
5494
|
+
...getHeaders(options?.headers)
|
|
5495
|
+
},
|
|
5061
5496
|
body: JSON.stringify(promoteWorkerVersionBody)
|
|
5062
5497
|
}
|
|
5063
5498
|
);
|
|
@@ -5076,7 +5511,7 @@ var usePromoteWorkerVersion = (workerId, version, options) => {
|
|
|
5076
5511
|
version,
|
|
5077
5512
|
requestOptions
|
|
5078
5513
|
);
|
|
5079
|
-
const query =
|
|
5514
|
+
const query = useSWRMutation20(swrKey, swrFn, swrOptions);
|
|
5080
5515
|
return {
|
|
5081
5516
|
swrKey,
|
|
5082
5517
|
...query
|
|
@@ -5097,10 +5532,10 @@ var getWorkerVersionChangeSummary = async (workerId, version, options) => {
|
|
|
5097
5532
|
var getGetWorkerVersionChangeSummaryKey = (workerId, version) => [`/v1/workers/${workerId}/versions/${version}/change-summary`];
|
|
5098
5533
|
var useGetWorkerVersionChangeSummary = (workerId, version, options) => {
|
|
5099
5534
|
const { swr: swrOptions, request: requestOptions } = options ?? {};
|
|
5100
|
-
const isEnabled = swrOptions?.enabled !== false &&
|
|
5535
|
+
const isEnabled = swrOptions?.enabled !== false && workerId !== null && workerId !== void 0 && version !== null && version !== void 0;
|
|
5101
5536
|
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetWorkerVersionChangeSummaryKey(workerId, version) : null);
|
|
5102
5537
|
const swrFn = () => getWorkerVersionChangeSummary(workerId, version, requestOptions);
|
|
5103
|
-
const query =
|
|
5538
|
+
const query = useSwr24(
|
|
5104
5539
|
swrKey,
|
|
5105
5540
|
swrFn,
|
|
5106
5541
|
swrOptions
|
|
@@ -5136,6 +5571,11 @@ var AnalyticsTimeSeriesGranularity = {
|
|
|
5136
5571
|
month: "month"
|
|
5137
5572
|
};
|
|
5138
5573
|
|
|
5574
|
+
// generated/models/analyticsTimeSeriesGroupBy.ts
|
|
5575
|
+
var AnalyticsTimeSeriesGroupBy = {
|
|
5576
|
+
worker_id: "worker_id"
|
|
5577
|
+
};
|
|
5578
|
+
|
|
5139
5579
|
// generated/models/analyticsTimeSeriesMetric.ts
|
|
5140
5580
|
var AnalyticsTimeSeriesMetric = {
|
|
5141
5581
|
worker_runs: "worker_runs",
|
|
@@ -5349,6 +5789,30 @@ var CreateVoiceAgentBodyTtsProvider = {
|
|
|
5349
5789
|
"aws-polly": "aws-polly"
|
|
5350
5790
|
};
|
|
5351
5791
|
|
|
5792
|
+
// generated/models/createWorkerBodyMcpType.ts
|
|
5793
|
+
var CreateWorkerBodyMcpType = {
|
|
5794
|
+
ventiv: "ventiv",
|
|
5795
|
+
klear: "klear",
|
|
5796
|
+
"klear-browser": "klear-browser",
|
|
5797
|
+
"demo-browser": "demo-browser",
|
|
5798
|
+
"demo-claims": "demo-claims",
|
|
5799
|
+
"filehandler-browser": "filehandler-browser"
|
|
5800
|
+
};
|
|
5801
|
+
|
|
5802
|
+
// generated/models/createWorkerEvalFromRunEnvelopeDataSourceType.ts
|
|
5803
|
+
var CreateWorkerEvalFromRunEnvelopeDataSourceType = {
|
|
5804
|
+
worker_run: "worker_run",
|
|
5805
|
+
chat: "chat",
|
|
5806
|
+
call: "call"
|
|
5807
|
+
};
|
|
5808
|
+
|
|
5809
|
+
// generated/models/createWorkerEvalFromRunEnvelopeDataTargetType.ts
|
|
5810
|
+
var CreateWorkerEvalFromRunEnvelopeDataTargetType = {
|
|
5811
|
+
worker: "worker",
|
|
5812
|
+
chat_agent: "chat_agent",
|
|
5813
|
+
voice_agent: "voice_agent"
|
|
5814
|
+
};
|
|
5815
|
+
|
|
5352
5816
|
// generated/models/createWorkerRunBodyEnvironment.ts
|
|
5353
5817
|
var CreateWorkerRunBodyEnvironment = {
|
|
5354
5818
|
live: "live",
|
|
@@ -5399,6 +5863,13 @@ var EmailDetailEnvironment = {
|
|
|
5399
5863
|
test: "test"
|
|
5400
5864
|
};
|
|
5401
5865
|
|
|
5866
|
+
// generated/models/emailDetailIgnoredReason.ts
|
|
5867
|
+
var EmailDetailIgnoredReason = {
|
|
5868
|
+
sender_domain_not_allowed: "sender_domain_not_allowed",
|
|
5869
|
+
received_via_cc_or_bcc: "received_via_cc_or_bcc",
|
|
5870
|
+
sent_from_own_inbox: "sent_from_own_inbox"
|
|
5871
|
+
};
|
|
5872
|
+
|
|
5402
5873
|
// generated/models/emailDirection.ts
|
|
5403
5874
|
var EmailDirection = {
|
|
5404
5875
|
inbound: "inbound",
|
|
@@ -5411,6 +5882,13 @@ var EmailEnvironment = {
|
|
|
5411
5882
|
test: "test"
|
|
5412
5883
|
};
|
|
5413
5884
|
|
|
5885
|
+
// generated/models/emailIgnoredReason.ts
|
|
5886
|
+
var EmailIgnoredReason = {
|
|
5887
|
+
sender_domain_not_allowed: "sender_domain_not_allowed",
|
|
5888
|
+
received_via_cc_or_bcc: "received_via_cc_or_bcc",
|
|
5889
|
+
sent_from_own_inbox: "sent_from_own_inbox"
|
|
5890
|
+
};
|
|
5891
|
+
|
|
5414
5892
|
// generated/models/emailReplyResult.ts
|
|
5415
5893
|
var EmailReplyResultValue = {
|
|
5416
5894
|
sent: true
|
|
@@ -5453,6 +5931,15 @@ var GetCaseEnvironment = {
|
|
|
5453
5931
|
test: "test"
|
|
5454
5932
|
};
|
|
5455
5933
|
|
|
5934
|
+
// generated/models/getEvalRunEnvelopeDataStatus.ts
|
|
5935
|
+
var GetEvalRunEnvelopeDataStatus = {
|
|
5936
|
+
queued: "queued",
|
|
5937
|
+
running: "running",
|
|
5938
|
+
passed: "passed",
|
|
5939
|
+
failed: "failed",
|
|
5940
|
+
error: "error"
|
|
5941
|
+
};
|
|
5942
|
+
|
|
5456
5943
|
// generated/models/getOAuthUrlCodeChallengeMethod.ts
|
|
5457
5944
|
var GetOAuthUrlCodeChallengeMethod = {
|
|
5458
5945
|
plain: "plain",
|
|
@@ -6037,6 +6524,15 @@ var RemoveCaseLinkEnvironment = {
|
|
|
6037
6524
|
test: "test"
|
|
6038
6525
|
};
|
|
6039
6526
|
|
|
6527
|
+
// generated/models/runEvalEnvelopeDataStatus.ts
|
|
6528
|
+
var RunEvalEnvelopeDataStatus = {
|
|
6529
|
+
queued: "queued",
|
|
6530
|
+
running: "running",
|
|
6531
|
+
passed: "passed",
|
|
6532
|
+
failed: "failed",
|
|
6533
|
+
error: "error"
|
|
6534
|
+
};
|
|
6535
|
+
|
|
6040
6536
|
// generated/models/scheduleEnvironmentsItem.ts
|
|
6041
6537
|
var ScheduleEnvironmentsItem = {
|
|
6042
6538
|
live: "live",
|
|
@@ -6121,6 +6617,53 @@ var UpdateVoiceAgentBodyNoiseCancellation = {
|
|
|
6121
6617
|
BVC_TELEPHONY: "BVC_TELEPHONY"
|
|
6122
6618
|
};
|
|
6123
6619
|
|
|
6620
|
+
// generated/models/updateVoiceAgentModelsBodyFallbackLlmModel.ts
|
|
6621
|
+
var UpdateVoiceAgentModelsBodyFallbackLlmModel = {
|
|
6622
|
+
GPT41: "GPT4.1",
|
|
6623
|
+
"AZURE-GPT4o": "AZURE-GPT4o",
|
|
6624
|
+
"AZURE-GPT41": "AZURE-GPT4.1",
|
|
6625
|
+
"GPT-5": "GPT-5",
|
|
6626
|
+
"GPT-5-low": "GPT-5-low",
|
|
6627
|
+
"GPT-5-high": "GPT-5-high",
|
|
6628
|
+
"GPT-51-chat-latest": "GPT-5.1-chat-latest",
|
|
6629
|
+
"GPT-51-no-reasoning": "GPT-5.1-no-reasoning",
|
|
6630
|
+
"GEMINI-15-flash": "GEMINI-1.5-flash",
|
|
6631
|
+
"GEMINI-25-flash": "GEMINI-2.5-flash",
|
|
6632
|
+
"GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite",
|
|
6633
|
+
"GEMINI-3-flash": "GEMINI-3-flash",
|
|
6634
|
+
"CLAUDE-sonnet-46": "CLAUDE-sonnet-4.6",
|
|
6635
|
+
"CLAUDE-haiku-45": "CLAUDE-haiku-4.5",
|
|
6636
|
+
"GPT-54-mini": "GPT-5.4-mini"
|
|
6637
|
+
};
|
|
6638
|
+
|
|
6639
|
+
// generated/models/updateVoiceAgentModelsBodyFallbackSttModel.ts
|
|
6640
|
+
var UpdateVoiceAgentModelsBodyFallbackSttModel = {
|
|
6641
|
+
"DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL",
|
|
6642
|
+
"DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL",
|
|
6643
|
+
"AWS-TRANSCRIBE": "AWS-TRANSCRIBE",
|
|
6644
|
+
"ELEVENLABS-SCRIBE-V2-REALTIME": "ELEVENLABS-SCRIBE-V2-REALTIME",
|
|
6645
|
+
"CARTESIA-INK-2": "CARTESIA-INK-2"
|
|
6646
|
+
};
|
|
6647
|
+
|
|
6648
|
+
// generated/models/updateVoiceAgentModelsBodyFallbackTtsModel.ts
|
|
6649
|
+
var UpdateVoiceAgentModelsBodyFallbackTtsModel = {
|
|
6650
|
+
eleven_flash_v2_5: "eleven_flash_v2_5",
|
|
6651
|
+
eleven_turbo_v2_5: "eleven_turbo_v2_5",
|
|
6652
|
+
"sonic-3": "sonic-3",
|
|
6653
|
+
"sonic-35": "sonic-3.5",
|
|
6654
|
+
"sonic-36": "sonic-3.6",
|
|
6655
|
+
chirp_3: "chirp_3",
|
|
6656
|
+
"polly-neural": "polly-neural"
|
|
6657
|
+
};
|
|
6658
|
+
|
|
6659
|
+
// generated/models/updateVoiceAgentModelsBodyFallbackTtsProvider.ts
|
|
6660
|
+
var UpdateVoiceAgentModelsBodyFallbackTtsProvider = {
|
|
6661
|
+
elevenlabs: "elevenlabs",
|
|
6662
|
+
cartesia: "cartesia",
|
|
6663
|
+
google: "google",
|
|
6664
|
+
"aws-polly": "aws-polly"
|
|
6665
|
+
};
|
|
6666
|
+
|
|
6124
6667
|
// generated/models/updateVoiceAgentModelsBodyLanguage.ts
|
|
6125
6668
|
var UpdateVoiceAgentModelsBodyLanguage = {
|
|
6126
6669
|
"en-US": "en-US",
|
|
@@ -6186,12 +6729,65 @@ var VoiceAgentBackgroundSounds = {
|
|
|
6186
6729
|
disabled: "disabled"
|
|
6187
6730
|
};
|
|
6188
6731
|
|
|
6732
|
+
// generated/models/voiceAgentCallProcessorType.ts
|
|
6733
|
+
var VoiceAgentCallProcessorType = {
|
|
6734
|
+
extractor: "extractor",
|
|
6735
|
+
worker: "worker"
|
|
6736
|
+
};
|
|
6737
|
+
|
|
6189
6738
|
// generated/models/voiceAgentDirection.ts
|
|
6190
6739
|
var VoiceAgentDirection = {
|
|
6191
6740
|
INBOUND: "INBOUND",
|
|
6192
6741
|
OUTBOUND: "OUTBOUND"
|
|
6193
6742
|
};
|
|
6194
6743
|
|
|
6744
|
+
// generated/models/voiceAgentFallbackLlmModel.ts
|
|
6745
|
+
var VoiceAgentFallbackLlmModel = {
|
|
6746
|
+
GPT41: "GPT4.1",
|
|
6747
|
+
"AZURE-GPT4o": "AZURE-GPT4o",
|
|
6748
|
+
"AZURE-GPT41": "AZURE-GPT4.1",
|
|
6749
|
+
"GPT-5": "GPT-5",
|
|
6750
|
+
"GPT-5-low": "GPT-5-low",
|
|
6751
|
+
"GPT-5-high": "GPT-5-high",
|
|
6752
|
+
"GPT-51-chat-latest": "GPT-5.1-chat-latest",
|
|
6753
|
+
"GPT-51-no-reasoning": "GPT-5.1-no-reasoning",
|
|
6754
|
+
"GEMINI-15-flash": "GEMINI-1.5-flash",
|
|
6755
|
+
"GEMINI-25-flash": "GEMINI-2.5-flash",
|
|
6756
|
+
"GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite",
|
|
6757
|
+
"GEMINI-3-flash": "GEMINI-3-flash",
|
|
6758
|
+
"CLAUDE-sonnet-46": "CLAUDE-sonnet-4.6",
|
|
6759
|
+
"CLAUDE-haiku-45": "CLAUDE-haiku-4.5",
|
|
6760
|
+
"GPT-54-mini": "GPT-5.4-mini"
|
|
6761
|
+
};
|
|
6762
|
+
|
|
6763
|
+
// generated/models/voiceAgentFallbackSttModel.ts
|
|
6764
|
+
var VoiceAgentFallbackSttModel = {
|
|
6765
|
+
"DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL",
|
|
6766
|
+
"DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL",
|
|
6767
|
+
"AWS-TRANSCRIBE": "AWS-TRANSCRIBE",
|
|
6768
|
+
"ELEVENLABS-SCRIBE-V2-REALTIME": "ELEVENLABS-SCRIBE-V2-REALTIME",
|
|
6769
|
+
"CARTESIA-INK-2": "CARTESIA-INK-2"
|
|
6770
|
+
};
|
|
6771
|
+
|
|
6772
|
+
// generated/models/voiceAgentFallbackTtsModel.ts
|
|
6773
|
+
var VoiceAgentFallbackTtsModel = {
|
|
6774
|
+
eleven_flash_v2_5: "eleven_flash_v2_5",
|
|
6775
|
+
eleven_turbo_v2_5: "eleven_turbo_v2_5",
|
|
6776
|
+
"sonic-3": "sonic-3",
|
|
6777
|
+
"sonic-35": "sonic-3.5",
|
|
6778
|
+
"sonic-36": "sonic-3.6",
|
|
6779
|
+
chirp_3: "chirp_3",
|
|
6780
|
+
"polly-neural": "polly-neural"
|
|
6781
|
+
};
|
|
6782
|
+
|
|
6783
|
+
// generated/models/voiceAgentFallbackTtsProvider.ts
|
|
6784
|
+
var VoiceAgentFallbackTtsProvider = {
|
|
6785
|
+
elevenlabs: "elevenlabs",
|
|
6786
|
+
cartesia: "cartesia",
|
|
6787
|
+
google: "google",
|
|
6788
|
+
"aws-polly": "aws-polly"
|
|
6789
|
+
};
|
|
6790
|
+
|
|
6195
6791
|
// generated/models/voiceAgentLanguage.ts
|
|
6196
6792
|
var VoiceAgentLanguage = {
|
|
6197
6793
|
"en-US": "en-US",
|
|
@@ -6271,12 +6867,65 @@ var VoiceAgentVersionDetailBackgroundSounds = {
|
|
|
6271
6867
|
disabled: "disabled"
|
|
6272
6868
|
};
|
|
6273
6869
|
|
|
6870
|
+
// generated/models/voiceAgentVersionDetailCallProcessorType.ts
|
|
6871
|
+
var VoiceAgentVersionDetailCallProcessorType = {
|
|
6872
|
+
extractor: "extractor",
|
|
6873
|
+
worker: "worker"
|
|
6874
|
+
};
|
|
6875
|
+
|
|
6274
6876
|
// generated/models/voiceAgentVersionDetailDirection.ts
|
|
6275
6877
|
var VoiceAgentVersionDetailDirection = {
|
|
6276
6878
|
INBOUND: "INBOUND",
|
|
6277
6879
|
OUTBOUND: "OUTBOUND"
|
|
6278
6880
|
};
|
|
6279
6881
|
|
|
6882
|
+
// generated/models/voiceAgentVersionDetailFallbackLlmModel.ts
|
|
6883
|
+
var VoiceAgentVersionDetailFallbackLlmModel = {
|
|
6884
|
+
GPT41: "GPT4.1",
|
|
6885
|
+
"AZURE-GPT4o": "AZURE-GPT4o",
|
|
6886
|
+
"AZURE-GPT41": "AZURE-GPT4.1",
|
|
6887
|
+
"GPT-5": "GPT-5",
|
|
6888
|
+
"GPT-5-low": "GPT-5-low",
|
|
6889
|
+
"GPT-5-high": "GPT-5-high",
|
|
6890
|
+
"GPT-51-chat-latest": "GPT-5.1-chat-latest",
|
|
6891
|
+
"GPT-51-no-reasoning": "GPT-5.1-no-reasoning",
|
|
6892
|
+
"GEMINI-15-flash": "GEMINI-1.5-flash",
|
|
6893
|
+
"GEMINI-25-flash": "GEMINI-2.5-flash",
|
|
6894
|
+
"GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite",
|
|
6895
|
+
"GEMINI-3-flash": "GEMINI-3-flash",
|
|
6896
|
+
"CLAUDE-sonnet-46": "CLAUDE-sonnet-4.6",
|
|
6897
|
+
"CLAUDE-haiku-45": "CLAUDE-haiku-4.5",
|
|
6898
|
+
"GPT-54-mini": "GPT-5.4-mini"
|
|
6899
|
+
};
|
|
6900
|
+
|
|
6901
|
+
// generated/models/voiceAgentVersionDetailFallbackSttModel.ts
|
|
6902
|
+
var VoiceAgentVersionDetailFallbackSttModel = {
|
|
6903
|
+
"DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL",
|
|
6904
|
+
"DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL",
|
|
6905
|
+
"AWS-TRANSCRIBE": "AWS-TRANSCRIBE",
|
|
6906
|
+
"ELEVENLABS-SCRIBE-V2-REALTIME": "ELEVENLABS-SCRIBE-V2-REALTIME",
|
|
6907
|
+
"CARTESIA-INK-2": "CARTESIA-INK-2"
|
|
6908
|
+
};
|
|
6909
|
+
|
|
6910
|
+
// generated/models/voiceAgentVersionDetailFallbackTtsModel.ts
|
|
6911
|
+
var VoiceAgentVersionDetailFallbackTtsModel = {
|
|
6912
|
+
eleven_flash_v2_5: "eleven_flash_v2_5",
|
|
6913
|
+
eleven_turbo_v2_5: "eleven_turbo_v2_5",
|
|
6914
|
+
"sonic-3": "sonic-3",
|
|
6915
|
+
"sonic-35": "sonic-3.5",
|
|
6916
|
+
"sonic-36": "sonic-3.6",
|
|
6917
|
+
chirp_3: "chirp_3",
|
|
6918
|
+
"polly-neural": "polly-neural"
|
|
6919
|
+
};
|
|
6920
|
+
|
|
6921
|
+
// generated/models/voiceAgentVersionDetailFallbackTtsProvider.ts
|
|
6922
|
+
var VoiceAgentVersionDetailFallbackTtsProvider = {
|
|
6923
|
+
elevenlabs: "elevenlabs",
|
|
6924
|
+
cartesia: "cartesia",
|
|
6925
|
+
google: "google",
|
|
6926
|
+
"aws-polly": "aws-polly"
|
|
6927
|
+
};
|
|
6928
|
+
|
|
6280
6929
|
// generated/models/voiceAgentVersionDetailLanguage.ts
|
|
6281
6930
|
var VoiceAgentVersionDetailLanguage = {
|
|
6282
6931
|
"en-US": "en-US",
|
|
@@ -6344,12 +6993,65 @@ var VoiceAgentWithTestPhoneNumberBackgroundSounds = {
|
|
|
6344
6993
|
disabled: "disabled"
|
|
6345
6994
|
};
|
|
6346
6995
|
|
|
6996
|
+
// generated/models/voiceAgentWithTestPhoneNumberCallProcessorType.ts
|
|
6997
|
+
var VoiceAgentWithTestPhoneNumberCallProcessorType = {
|
|
6998
|
+
extractor: "extractor",
|
|
6999
|
+
worker: "worker"
|
|
7000
|
+
};
|
|
7001
|
+
|
|
6347
7002
|
// generated/models/voiceAgentWithTestPhoneNumberDirection.ts
|
|
6348
7003
|
var VoiceAgentWithTestPhoneNumberDirection = {
|
|
6349
7004
|
INBOUND: "INBOUND",
|
|
6350
7005
|
OUTBOUND: "OUTBOUND"
|
|
6351
7006
|
};
|
|
6352
7007
|
|
|
7008
|
+
// generated/models/voiceAgentWithTestPhoneNumberFallbackLlmModel.ts
|
|
7009
|
+
var VoiceAgentWithTestPhoneNumberFallbackLlmModel = {
|
|
7010
|
+
GPT41: "GPT4.1",
|
|
7011
|
+
"AZURE-GPT4o": "AZURE-GPT4o",
|
|
7012
|
+
"AZURE-GPT41": "AZURE-GPT4.1",
|
|
7013
|
+
"GPT-5": "GPT-5",
|
|
7014
|
+
"GPT-5-low": "GPT-5-low",
|
|
7015
|
+
"GPT-5-high": "GPT-5-high",
|
|
7016
|
+
"GPT-51-chat-latest": "GPT-5.1-chat-latest",
|
|
7017
|
+
"GPT-51-no-reasoning": "GPT-5.1-no-reasoning",
|
|
7018
|
+
"GEMINI-15-flash": "GEMINI-1.5-flash",
|
|
7019
|
+
"GEMINI-25-flash": "GEMINI-2.5-flash",
|
|
7020
|
+
"GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite",
|
|
7021
|
+
"GEMINI-3-flash": "GEMINI-3-flash",
|
|
7022
|
+
"CLAUDE-sonnet-46": "CLAUDE-sonnet-4.6",
|
|
7023
|
+
"CLAUDE-haiku-45": "CLAUDE-haiku-4.5",
|
|
7024
|
+
"GPT-54-mini": "GPT-5.4-mini"
|
|
7025
|
+
};
|
|
7026
|
+
|
|
7027
|
+
// generated/models/voiceAgentWithTestPhoneNumberFallbackSttModel.ts
|
|
7028
|
+
var VoiceAgentWithTestPhoneNumberFallbackSttModel = {
|
|
7029
|
+
"DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL",
|
|
7030
|
+
"DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL",
|
|
7031
|
+
"AWS-TRANSCRIBE": "AWS-TRANSCRIBE",
|
|
7032
|
+
"ELEVENLABS-SCRIBE-V2-REALTIME": "ELEVENLABS-SCRIBE-V2-REALTIME",
|
|
7033
|
+
"CARTESIA-INK-2": "CARTESIA-INK-2"
|
|
7034
|
+
};
|
|
7035
|
+
|
|
7036
|
+
// generated/models/voiceAgentWithTestPhoneNumberFallbackTtsModel.ts
|
|
7037
|
+
var VoiceAgentWithTestPhoneNumberFallbackTtsModel = {
|
|
7038
|
+
eleven_flash_v2_5: "eleven_flash_v2_5",
|
|
7039
|
+
eleven_turbo_v2_5: "eleven_turbo_v2_5",
|
|
7040
|
+
"sonic-3": "sonic-3",
|
|
7041
|
+
"sonic-35": "sonic-3.5",
|
|
7042
|
+
"sonic-36": "sonic-3.6",
|
|
7043
|
+
chirp_3: "chirp_3",
|
|
7044
|
+
"polly-neural": "polly-neural"
|
|
7045
|
+
};
|
|
7046
|
+
|
|
7047
|
+
// generated/models/voiceAgentWithTestPhoneNumberFallbackTtsProvider.ts
|
|
7048
|
+
var VoiceAgentWithTestPhoneNumberFallbackTtsProvider = {
|
|
7049
|
+
elevenlabs: "elevenlabs",
|
|
7050
|
+
cartesia: "cartesia",
|
|
7051
|
+
google: "google",
|
|
7052
|
+
"aws-polly": "aws-polly"
|
|
7053
|
+
};
|
|
7054
|
+
|
|
6353
7055
|
// generated/models/voiceAgentWithTestPhoneNumberLanguage.ts
|
|
6354
7056
|
var VoiceAgentWithTestPhoneNumberLanguage = {
|
|
6355
7057
|
"en-US": "en-US",
|
|
@@ -6507,6 +7209,6 @@ var WorkerRunStatus = {
|
|
|
6507
7209
|
canceled: "canceled"
|
|
6508
7210
|
};
|
|
6509
7211
|
|
|
6510
|
-
export { AddCaseLinksBodyEntitiesItemEntityType, AddCaseLinksEnvironment, AnalyticsTimeSeriesGranularity, AnalyticsTimeSeriesMetric, ApiKeyCreatedRole, ApiKeyRole, ArtifactDetailDataStatus, ArtifactStatus, AvallonError, CallDetailDirection, CallDetailEnvironment, CallDirection, CallEnvironment, CaseLinkEntityType, CaseSummaryEnvironment, ChatHistoryMessagesItemRole, ChatMessageRole, CreateAgentWebhookBodyEnvironmentsItem, CreateApiKeyBodyEnvironment, CreateApiKeyBodyRole, CreateCaseBodyEnvironment, CreateExtractorWebhookBodyEnvironmentsItem, CreateInboxBodyProcessorType, CreateInboxWebhookBodyEnvironmentsItem, CreateNotificationWebhookBodyEnvironmentsItem, CreateScheduleBodyEnvironmentsItem, CreateVoiceAgentBodyCallProcessorType, CreateVoiceAgentBodyDirection, CreateVoiceAgentBodyLanguage, CreateVoiceAgentBodyLlmModel, CreateVoiceAgentBodySttModel, CreateVoiceAgentBodyTtsModel, CreateVoiceAgentBodyTtsProvider, CreateWorkerRunBodyEnvironment, CreateWorkerWebhookBodyEnvironmentsItem, DispatchEnvironment, DispatchStatus, DispatchTargetType, DispatchTriggerType, EmailDetailDirection, EmailDetailEnvironment, EmailDirection, EmailEnvironment, EmailReplyResultValue, EmailThreadEnvironment, ExecuteCodeBodyEnvironment, GetAnalyticsTimeSeriesGranularity, GetAnalyticsTimeSeriesGroupBy, GetAnalyticsTimeSeriesMetric, GetCaseEnvironment, GetOAuthUrlCodeChallengeMethod, GetOAuthUrlProvider, InboxProcessorType, InformationRequestEnvironment, ListAgentWebhooksEnvironment, ListApiKeysIncludeRevoked, ListArtifactsEnvironment, ListArtifactsSortBy, ListArtifactsSortOrder, ListArtifactsStatus, ListCallFeedbackSortBy, ListCallFeedbackSortOrder, ListCallsDirection, ListCallsEnvironment, ListCallsSortBy, ListCallsSortOrder, ListCallsStatus, ListCaseLinksEntityType, ListCaseLinksEnvironment, ListCaseLinksSortBy, ListCaseLinksSortOrder, ListCasesEnvironment, ListCasesSortBy, ListCasesSortOrder, ListChatAgentsSortBy, ListChatAgentsSortOrder, ListChatMessagesSortBy, ListChatMessagesSortOrder, ListChatsEnvironment, ListChatsSortBy, ListChatsSortOrder, ListDispatchesSortBy, ListDispatchesSortOrder, ListDispatchesTriggerType, ListEmailThreadsEnvironment, ListEmailThreadsSortBy, ListEmailThreadsSortOrder, ListEmailsEnvironment, ListEmailsSortBy, ListEmailsSortOrder, ListExtractorJobsSortBy, ListExtractorJobsSortOrder, ListExtractorJobsStatus, ListExtractorsSortBy, ListExtractorsSortOrder, ListExtractsEnvironment, ListExtractsSortBy, ListExtractsSortOrder, ListInboxWebhooksEnvironment, ListInboxesSortBy, ListInboxesSortOrder, ListInformationRequestsEnvironment, ListInformationRequestsResolved, ListInformationRequestsSortBy, ListInformationRequestsSortOrder, ListJobsStatusItem, ListNotificationWebhooksEnvironment, ListNotificationsSortBy, ListNotificationsSortOrder, ListSchedulesEnvironment, ListSchedulesRuleType, ListSchedulesSortBy, ListSchedulesSortOrder, ListSecretsSortBy, ListSecretsSortOrder, ListToolVersionsSortBy, ListToolVersionsSortOrder, ListToolsSortBy, ListToolsSortOrder, ListVoiceAgentVersionsSortBy, ListVoiceAgentVersionsSortOrder, ListWebhookDeliveriesSortOrder, ListWebhooksEnvironment, ListWorkerRunsEnvironment, ListWorkerRunsSortBy, ListWorkerRunsSortOrder, ListWorkerRunsStatus, ListWorkerVersionsSortBy, ListWorkerVersionsSortOrder, ListWorkerWebhooksEnvironment, ListWorkersSortBy, ListWorkersSortOrder, OutboundJobEnvironment, OutboundJobStatus, ProfilePermissionsItem, ProfileRole, PromoteVoiceAgentVersionBodyEnvironment, PromotedVoiceAgentVersionEnvironment, RemoveCaseLinkEnvironment, ScheduleEnvironmentsItem, ScheduleJobBodyEnvironment, SendEmailBodyEnvironment, TeamInvitationState, TeamMemberRole, TestWebhookBodyEnvironment, ToolEnvironment, UpdateApiKeyBodyRole, UpdateInboxBodyProcessorType, UpdateMemberRoleBodyRole, UpdateScheduleBodyEnvironmentsItem, UpdateVoiceAgentBodyCallProcessorType, UpdateVoiceAgentBodyNoiseCancellation, UpdateVoiceAgentModelsBodyLanguage, UpdateVoiceAgentModelsBodyLlmModel, UpdateVoiceAgentModelsBodySttModel, UpdateVoiceAgentModelsBodyTtsModel, UpdateVoiceAgentModelsBodyTtsProvider, UpdateWebhookBodyEnvironmentsItem, VoiceAgentBackgroundSounds, VoiceAgentDirection, VoiceAgentLanguage, VoiceAgentLlmModel, VoiceAgentNoiseCancellation, VoiceAgentSttModel, VoiceAgentTtsModel, VoiceAgentTtsProvider, VoiceAgentVersionActiveEnvironmentsItem, VoiceAgentVersionDetailActiveEnvironmentsItem, VoiceAgentVersionDetailBackgroundSounds, VoiceAgentVersionDetailDirection, VoiceAgentVersionDetailLanguage, VoiceAgentVersionDetailLlmModel, VoiceAgentVersionDetailNoiseCancellation, VoiceAgentVersionDetailSttModel, VoiceAgentVersionDetailTtsModel, VoiceAgentVersionDetailTtsProvider, VoiceAgentWithTestPhoneNumberBackgroundSounds, VoiceAgentWithTestPhoneNumberDirection, VoiceAgentWithTestPhoneNumberLanguage, VoiceAgentWithTestPhoneNumberLlmModel, VoiceAgentWithTestPhoneNumberNoiseCancellation, VoiceAgentWithTestPhoneNumberSttModel, VoiceAgentWithTestPhoneNumberTtsModel, VoiceAgentWithTestPhoneNumberTtsProvider, WebhookEnvironmentsItem, WorkerEnvironment, WorkerExecuteToolBodyEnvironment, WorkerListToolsSortBy, WorkerListToolsSortOrder, WorkerMcpName, WorkerMcpOutputName, WorkerPermission, WorkerRunCreatedEnvironment, WorkerRunCreatedStatus, WorkerRunEnvironment, WorkerRunStatus, addCaseLinks, cancelJob, cancelWorkerRun, checkInboxAvailability, configure, createAgentWebhook, createApiKey, createArtifact, createCallFeedback, createCase, createChat, createChatAgent, createExtractor, createExtractorJob, createExtractorWebhook, createInbox, createInboxWebhook, createInformationRequest, createNotificationWebhook, createSchedule, createSecret, createTool, createVoiceAgent, createWorker, createWorkerRun, createWorkerWebhook, deleteArtifact, deleteCallFeedback, deleteChatAgent, deleteEmail, deleteExtractor, deleteInbox, deleteSchedule, deleteSecret, deleteTool, deleteVoiceAgent, deleteWebhook, deleteWorker, executeCode, generateCodeChallenge, generateCodeVerifier, getAddCaseLinksMutationFetcher, getAddCaseLinksMutationKey, getAddCaseLinksUrl, getAnalyticsTimeSeries, getArtifact, getArtifactMetadataKeys, getArtifactStatusSummary, getArtifactUploadUrl, getCall, getCallAnalytics, getCallEvaluation, getCancelJobMutationFetcher, getCancelJobMutationKey, getCancelJobUrl, getCancelWorkerRunMutationFetcher, getCancelWorkerRunMutationKey, getCancelWorkerRunUrl, getCase, getChat, getChatAgent, getChatAgentPrompt, getCheckInboxAvailabilityKey, getCheckInboxAvailabilityUrl, getConfig, getCreateAgentWebhookMutationFetcher, getCreateAgentWebhookMutationKey, getCreateAgentWebhookUrl, getCreateApiKeyMutationFetcher, getCreateApiKeyMutationKey, getCreateApiKeyUrl, getCreateArtifactMutationFetcher, getCreateArtifactMutationKey, getCreateArtifactUrl, getCreateCallFeedbackMutationFetcher, getCreateCallFeedbackMutationKey, getCreateCallFeedbackUrl, getCreateCaseMutationFetcher, getCreateCaseMutationKey, getCreateCaseUrl, getCreateChatAgentMutationFetcher, getCreateChatAgentMutationKey, getCreateChatAgentUrl, getCreateChatMutationFetcher, getCreateChatMutationKey, getCreateChatUrl, getCreateExtractorJobMutationFetcher, getCreateExtractorJobMutationKey, getCreateExtractorJobUrl, getCreateExtractorMutationFetcher, getCreateExtractorMutationKey, getCreateExtractorUrl, getCreateExtractorWebhookMutationFetcher, getCreateExtractorWebhookMutationKey, getCreateExtractorWebhookUrl, getCreateInboxMutationFetcher, getCreateInboxMutationKey, getCreateInboxUrl, getCreateInboxWebhookMutationFetcher, getCreateInboxWebhookMutationKey, getCreateInboxWebhookUrl, getCreateInformationRequestMutationFetcher, getCreateInformationRequestMutationKey, getCreateInformationRequestUrl, getCreateNotificationWebhookMutationFetcher, getCreateNotificationWebhookMutationKey, getCreateNotificationWebhookUrl, getCreateScheduleMutationFetcher, getCreateScheduleMutationKey, getCreateScheduleUrl, getCreateSecretMutationFetcher, getCreateSecretMutationKey, getCreateSecretUrl, getCreateToolMutationFetcher, getCreateToolMutationKey, getCreateToolUrl, getCreateVoiceAgentMutationFetcher, getCreateVoiceAgentMutationKey, getCreateVoiceAgentUrl, getCreateWorkerMutationFetcher, getCreateWorkerMutationKey, getCreateWorkerRunMutationFetcher, getCreateWorkerRunMutationKey, getCreateWorkerRunUrl, getCreateWorkerUrl, getCreateWorkerWebhookMutationFetcher, getCreateWorkerWebhookMutationKey, getCreateWorkerWebhookUrl, getDeleteArtifactMutationFetcher, getDeleteArtifactMutationKey, getDeleteArtifactUrl, getDeleteCallFeedbackMutationFetcher, getDeleteCallFeedbackMutationKey, getDeleteCallFeedbackUrl, getDeleteChatAgentMutationFetcher, getDeleteChatAgentMutationKey, getDeleteChatAgentUrl, getDeleteEmailMutationFetcher, getDeleteEmailMutationKey, getDeleteEmailUrl, getDeleteExtractorMutationFetcher, getDeleteExtractorMutationKey, getDeleteExtractorUrl, getDeleteInboxMutationFetcher, getDeleteInboxMutationKey, getDeleteInboxUrl, getDeleteScheduleMutationFetcher, getDeleteScheduleMutationKey, getDeleteScheduleUrl, getDeleteSecretMutationFetcher, getDeleteSecretMutationKey, getDeleteSecretUrl, getDeleteToolMutationFetcher, getDeleteToolMutationKey, getDeleteToolUrl, getDeleteVoiceAgentMutationFetcher, getDeleteVoiceAgentMutationKey, getDeleteVoiceAgentUrl, getDeleteWebhookMutationFetcher, getDeleteWebhookMutationKey, getDeleteWebhookUrl, getDeleteWorkerMutationFetcher, getDeleteWorkerMutationKey, getDeleteWorkerUrl, getEmail, getExecuteCodeMutationFetcher, getExecuteCodeMutationKey, getExecuteCodeUrl, getExtract, getExtractCitations, getExtractor, getExtractorJob, getGetAnalyticsTimeSeriesKey, getGetAnalyticsTimeSeriesUrl, getGetArtifactKey, getGetArtifactMetadataKeysKey, getGetArtifactMetadataKeysUrl, getGetArtifactStatusSummaryKey, getGetArtifactStatusSummaryUrl, getGetArtifactUploadUrlMutationFetcher, getGetArtifactUploadUrlMutationKey, getGetArtifactUploadUrlUrl, getGetArtifactUrl, getGetCallAnalyticsKey, getGetCallAnalyticsUrl, getGetCallEvaluationKey, getGetCallEvaluationUrl, getGetCallKey, getGetCallUrl, getGetCaseKey, getGetCaseUrl, getGetChatAgentKey, getGetChatAgentPromptKey, getGetChatAgentPromptUrl, getGetChatAgentUrl, getGetChatKey, getGetChatUrl, getGetEmailKey, getGetEmailUrl, getGetExtractCitationsKey, getGetExtractCitationsUrl, getGetExtractKey, getGetExtractUrl, getGetExtractorJobKey, getGetExtractorJobUrl, getGetExtractorKey, getGetExtractorUrl, getGetInformationRequestKey, getGetInformationRequestUrl, getGetOAuthUrlKey, getGetOAuthUrlUrl, getGetPartnerJwksKey, getGetPartnerJwksUrl, getGetProfileKey, getGetProfileUrl, getGetPublicChatAgentKey, getGetPublicChatAgentUrl, getGetScheduleKey, getGetScheduleUrl, getGetSecretKey, getGetSecretUrl, getGetSessionTokenMutationFetcher, getGetSessionTokenMutationKey, getGetSessionTokenUrl, getGetToolKey, getGetToolUrl, getGetToolVersionChangeSummaryKey, getGetToolVersionChangeSummaryUrl, getGetToolVersionKey, getGetToolVersionUrl, getGetVoiceAgentKey, getGetVoiceAgentPlaceholdersKey, getGetVoiceAgentPlaceholdersUrl, getGetVoiceAgentPromptKey, getGetVoiceAgentPromptUrl, getGetVoiceAgentUrl, getGetVoiceAgentVersionChangeSummaryKey, getGetVoiceAgentVersionChangeSummaryUrl, getGetVoiceAgentVersionKey, getGetVoiceAgentVersionUrl, getGetWebhookKey, getGetWebhookUrl, getGetWorkerKey, getGetWorkerPromptKey, getGetWorkerPromptUrl, getGetWorkerRunKey, getGetWorkerRunUrl, getGetWorkerUrl, getGetWorkerVersionChangeSummaryKey, getGetWorkerVersionChangeSummaryUrl, getGetWorkerVersionKey, getGetWorkerVersionUrl, getInformationRequest, getInviteTeamMemberMutationFetcher, getInviteTeamMemberMutationKey, getInviteTeamMemberUrl, getListAgentWebhooksKey, getListAgentWebhooksUrl, getListApiKeysKey, getListApiKeysUrl, getListArtifactsKey, getListArtifactsUrl, getListCallFeedbackKey, getListCallFeedbackUrl, getListCallsKey, getListCallsUrl, getListCaseLinksKey, getListCaseLinksUrl, getListCasesKey, getListCasesUrl, getListChatAgentsKey, getListChatAgentsUrl, getListChatMessagesKey, getListChatMessagesUrl, getListChatsKey, getListChatsUrl, getListDispatchesKey, getListDispatchesUrl, getListEmailThreadsKey, getListEmailThreadsUrl, getListEmailsKey, getListEmailsUrl, getListExtractorJobsKey, getListExtractorJobsUrl, getListExtractorsKey, getListExtractorsUrl, getListExtractsKey, getListExtractsUrl, getListInboxWebhooksKey, getListInboxWebhooksUrl, getListInboxesKey, getListInboxesUrl, getListInformationRequestsKey, getListInformationRequestsUrl, getListJobsKey, getListJobsUrl, getListNotificationWebhooksKey, getListNotificationWebhooksUrl, getListNotificationsKey, getListNotificationsUrl, getListSchedulesKey, getListSchedulesUrl, getListSecretsKey, getListSecretsUrl, getListTeamInvitationsKey, getListTeamInvitationsUrl, getListTeamMembersKey, getListTeamMembersUrl, getListToolVersionsKey, getListToolVersionsUrl, getListToolsKey, getListToolsUrl, getListVoiceAgentVersionsKey, getListVoiceAgentVersionsUrl, getListVoiceAgentsKey, getListVoiceAgentsUrl, getListWebhookDeliveriesKey, getListWebhookDeliveriesUrl, getListWebhooksKey, getListWebhooksUrl, getListWorkerModelsKey, getListWorkerModelsUrl, getListWorkerRunMessagesKey, getListWorkerRunMessagesUrl, getListWorkerRunsKey, getListWorkerRunsUrl, getListWorkerVersionsKey, getListWorkerVersionsUrl, getListWorkerWebhooksKey, getListWorkerWebhooksUrl, getListWorkersKey, getListWorkersUrl, getNotifyAdminMutationFetcher, getNotifyAdminMutationKey, getNotifyAdminUrl, getOAuthUrl, getPartnerJwks, getPartnerLaunchMutationFetcher, getPartnerLaunchMutationKey, getPartnerLaunchUrl, getPostChatMessageMutationFetcher, getPostChatMessageMutationKey, getPostChatMessageUrl, getProfile, getPromoteToolVersionMutationFetcher, getPromoteToolVersionMutationKey, getPromoteToolVersionUrl, getPromoteVoiceAgentVersionMutationFetcher, getPromoteVoiceAgentVersionMutationKey, getPromoteVoiceAgentVersionUrl, getPromoteWorkerVersionMutationFetcher, getPromoteWorkerVersionMutationKey, getPromoteWorkerVersionUrl, getPublicChatAgent, getRefreshTokenMutationFetcher, getRefreshTokenMutationKey, getRefreshTokenUrl, getRemoveCaseLinkMutationFetcher, getRemoveCaseLinkMutationKey, getRemoveCaseLinkUrl, getRemoveMemberMutationFetcher, getRemoveMemberMutationKey, getRemoveMemberUrl, getReplyToEmailMutationFetcher, getReplyToEmailMutationKey, getReplyToEmailUrl, getRequestPasswordResetMutationFetcher, getRequestPasswordResetMutationKey, getRequestPasswordResetUrl, getResendTeamInvitationMutationFetcher, getResendTeamInvitationMutationKey, getResendTeamInvitationUrl, getResetPasswordMutationFetcher, getResetPasswordMutationKey, getResetPasswordUrl, getResolveInformationRequestMutationFetcher, getResolveInformationRequestMutationKey, getResolveInformationRequestUrl, getRevokeApiKeyMutationFetcher, getRevokeApiKeyMutationKey, getRevokeApiKeyUrl, getRevokeTeamInvitationMutationFetcher, getRevokeTeamInvitationMutationKey, getRevokeTeamInvitationUrl, getSchedule, getScheduleJobMutationFetcher, getScheduleJobMutationKey, getScheduleJobUrl, getSearchCasesKey, getSearchCasesUrl, getSecret, getSendEmailMutationFetcher, getSendEmailMutationKey, getSendEmailUrl, getSessionToken, getSignInMutationFetcher, getSignInMutationKey, getSignInUrl, getSignUpMutationFetcher, getSignUpMutationKey, getSignUpUrl, getTestWebhookMutationFetcher, getTestWebhookMutationKey, getTestWebhookUrl, getTool, getToolVersion, getToolVersionChangeSummary, getUpdateApiKeyMutationFetcher, getUpdateApiKeyMutationKey, getUpdateApiKeyUrl, getUpdateArtifactMetadataMutationFetcher, getUpdateArtifactMetadataMutationKey, getUpdateArtifactMetadataUrl, getUpdateCallControlsMutationFetcher, getUpdateCallControlsMutationKey, getUpdateCallControlsUrl, getUpdateChatAgentMutationFetcher, getUpdateChatAgentMutationKey, getUpdateChatAgentPromptMutationFetcher, getUpdateChatAgentPromptMutationKey, getUpdateChatAgentPromptUrl, getUpdateChatAgentUrl, getUpdateExtractorMutationFetcher, getUpdateExtractorMutationKey, getUpdateExtractorUrl, getUpdateInboxMutationFetcher, getUpdateInboxMutationKey, getUpdateInboxUrl, getUpdateMemberRoleMutationFetcher, getUpdateMemberRoleMutationKey, getUpdateMemberRoleUrl, getUpdateScheduleMutationFetcher, getUpdateScheduleMutationKey, getUpdateScheduleUrl, getUpdateSecretMutationFetcher, getUpdateSecretMutationKey, getUpdateSecretUrl, getUpdateToolMutationFetcher, getUpdateToolMutationKey, getUpdateToolUrl, getUpdateVoiceAgentModelsMutationFetcher, getUpdateVoiceAgentModelsMutationKey, getUpdateVoiceAgentModelsUrl, getUpdateVoiceAgentMutationFetcher, getUpdateVoiceAgentMutationKey, getUpdateVoiceAgentPromptMutationFetcher, getUpdateVoiceAgentPromptMutationKey, getUpdateVoiceAgentPromptUrl, getUpdateVoiceAgentUrl, getUpdateWebhookMutationFetcher, getUpdateWebhookMutationKey, getUpdateWebhookUrl, getUpdateWorkerMcpsMutationFetcher, getUpdateWorkerMcpsMutationKey, getUpdateWorkerMcpsUrl, getUpdateWorkerMutationFetcher, getUpdateWorkerMutationKey, getUpdateWorkerPromptMutationFetcher, getUpdateWorkerPromptMutationKey, getUpdateWorkerPromptUrl, getUpdateWorkerUrl, getUploadFileMutationFetcher, getUploadFileMutationKey, getUploadFileUrl, getVoiceAgent, getVoiceAgentPlaceholders, getVoiceAgentPrompt, getVoiceAgentVersion, getVoiceAgentVersionChangeSummary, getWebhook, getWorker, getWorkerExecuteToolMutationFetcher, getWorkerExecuteToolMutationKey, getWorkerExecuteToolUrl, getWorkerGetToolKey, getWorkerGetToolUrl, getWorkerListToolsKey, getWorkerListToolsUrl, getWorkerPrompt, getWorkerRun, getWorkerVersion, getWorkerVersionChangeSummary, inviteTeamMember, listAgentWebhooks, listApiKeys, listArtifacts, listCallFeedback, listCalls, listCaseLinks, listCases, listChatAgents, listChatMessages, listChats, listDispatches, listEmailThreads, listEmails, listExtractorJobs, listExtractors, listExtracts, listInboxWebhooks, listInboxes, listInformationRequests, listJobs, listNotificationWebhooks, listNotifications, listSchedules, listSecrets, listTeamInvitations, listTeamMembers, listToolVersions, listTools, listVoiceAgentVersions, listVoiceAgents, listWebhookDeliveries, listWebhooks, listWorkerModels, listWorkerRunMessages, listWorkerRuns, listWorkerVersions, listWorkerWebhooks, listWorkers, notifyAdmin, partnerLaunch, postChatMessage, promoteToolVersion, promoteVoiceAgentVersion, promoteWorkerVersion, refreshToken, removeCaseLink, removeMember, replyToEmail, requestPasswordReset, resendTeamInvitation, resetPassword, resolveInformationRequest, revokeApiKey, revokeTeamInvitation, scheduleJob, searchCases, sendEmail, signIn, signUp, testWebhook, updateApiKey, updateArtifactMetadata, updateCallControls, updateChatAgent, updateChatAgentPrompt, updateExtractor, updateInbox, updateMemberRole, updateSchedule, updateSecret, updateTool, updateVoiceAgent, updateVoiceAgentModels, updateVoiceAgentPrompt, updateWebhook, updateWorker, updateWorkerMcps, updateWorkerPrompt, uploadFile, useAddCaseLinks, useCancelJob, useCancelWorkerRun, useCheckInboxAvailability, useCreateAgentWebhook, useCreateApiKey, useCreateArtifact, useCreateCallFeedback, useCreateCase, useCreateChat, useCreateChatAgent, useCreateExtractor, useCreateExtractorJob, useCreateExtractorWebhook, useCreateInbox, useCreateInboxWebhook, useCreateInformationRequest, useCreateNotificationWebhook, useCreateSchedule, useCreateSecret, useCreateTool, useCreateVoiceAgent, useCreateWorker, useCreateWorkerRun, useCreateWorkerWebhook, useDeleteArtifact, useDeleteCallFeedback, useDeleteChatAgent, useDeleteEmail, useDeleteExtractor, useDeleteInbox, useDeleteSchedule, useDeleteSecret, useDeleteTool, useDeleteVoiceAgent, useDeleteWebhook, useDeleteWorker, useExecuteCode, useGetAnalyticsTimeSeries, useGetArtifact, useGetArtifactMetadataKeys, useGetArtifactStatusSummary, useGetArtifactUploadUrl, useGetCall, useGetCallAnalytics, useGetCallEvaluation, useGetCase, useGetChat, useGetChatAgent, useGetChatAgentPrompt, useGetEmail, useGetExtract, useGetExtractCitations, useGetExtractor, useGetExtractorJob, useGetInformationRequest, useGetOAuthUrl, useGetPartnerJwks, useGetProfile, useGetPublicChatAgent, useGetSchedule, useGetSecret, useGetSessionToken, useGetTool, useGetToolVersion, useGetToolVersionChangeSummary, useGetVoiceAgent, useGetVoiceAgentPlaceholders, useGetVoiceAgentPrompt, useGetVoiceAgentVersion, useGetVoiceAgentVersionChangeSummary, useGetWebhook, useGetWorker, useGetWorkerPrompt, useGetWorkerRun, useGetWorkerVersion, useGetWorkerVersionChangeSummary, useInviteTeamMember, useListAgentWebhooks, useListApiKeys, useListArtifacts, useListCallFeedback, useListCalls, useListCaseLinks, useListCases, useListChatAgents, useListChatMessages, useListChats, useListDispatches, useListEmailThreads, useListEmails, useListExtractorJobs, useListExtractors, useListExtracts, useListInboxWebhooks, useListInboxes, useListInformationRequests, useListJobs, useListNotificationWebhooks, useListNotifications, useListSchedules, useListSecrets, useListTeamInvitations, useListTeamMembers, useListToolVersions, useListTools, useListVoiceAgentVersions, useListVoiceAgents, useListWebhookDeliveries, useListWebhooks, useListWorkerModels, useListWorkerRunMessages, useListWorkerRuns, useListWorkerVersions, useListWorkerWebhooks, useListWorkers, useNotifyAdmin, usePartnerLaunch, usePostChatMessage, usePromoteToolVersion, usePromoteVoiceAgentVersion, usePromoteWorkerVersion, useRefreshToken, useRemoveCaseLink, useRemoveMember, useReplyToEmail, useRequestPasswordReset, useResendTeamInvitation, useResetPassword, useResolveInformationRequest, useRevokeApiKey, useRevokeTeamInvitation, useScheduleJob, useSearchCases, useSendEmail, useSignIn, useSignUp, useTestWebhook, useUpdateApiKey, useUpdateArtifactMetadata, useUpdateCallControls, useUpdateChatAgent, useUpdateChatAgentPrompt, useUpdateExtractor, useUpdateInbox, useUpdateMemberRole, useUpdateSchedule, useUpdateSecret, useUpdateTool, useUpdateVoiceAgent, useUpdateVoiceAgentModels, useUpdateVoiceAgentPrompt, useUpdateWebhook, useUpdateWorker, useUpdateWorkerMcps, useUpdateWorkerPrompt, useUploadFile, useWorkerExecuteTool, useWorkerGetTool, useWorkerListTools, workerExecuteTool, workerGetTool, workerListTools };
|
|
7212
|
+
export { AddCaseLinksBodyEntitiesItemEntityType, AddCaseLinksEnvironment, AnalyticsTimeSeriesGranularity, AnalyticsTimeSeriesGroupBy, AnalyticsTimeSeriesMetric, ApiKeyCreatedRole, ApiKeyRole, ArtifactDetailDataStatus, ArtifactStatus, AvallonError, CallDetailDirection, CallDetailEnvironment, CallDirection, CallEnvironment, CaseLinkEntityType, CaseSummaryEnvironment, ChatHistoryMessagesItemRole, ChatMessageRole, CreateAgentWebhookBodyEnvironmentsItem, CreateApiKeyBodyEnvironment, CreateApiKeyBodyRole, CreateCaseBodyEnvironment, CreateExtractorWebhookBodyEnvironmentsItem, CreateInboxBodyProcessorType, CreateInboxWebhookBodyEnvironmentsItem, CreateNotificationWebhookBodyEnvironmentsItem, CreateScheduleBodyEnvironmentsItem, CreateVoiceAgentBodyCallProcessorType, CreateVoiceAgentBodyDirection, CreateVoiceAgentBodyLanguage, CreateVoiceAgentBodyLlmModel, CreateVoiceAgentBodySttModel, CreateVoiceAgentBodyTtsModel, CreateVoiceAgentBodyTtsProvider, CreateWorkerBodyMcpType, CreateWorkerEvalFromRunEnvelopeDataSourceType, CreateWorkerEvalFromRunEnvelopeDataTargetType, CreateWorkerRunBodyEnvironment, CreateWorkerWebhookBodyEnvironmentsItem, DispatchEnvironment, DispatchStatus, DispatchTargetType, DispatchTriggerType, EmailDetailDirection, EmailDetailEnvironment, EmailDetailIgnoredReason, EmailDirection, EmailEnvironment, EmailIgnoredReason, EmailReplyResultValue, EmailThreadEnvironment, ExecuteCodeBodyEnvironment, GetAnalyticsTimeSeriesGranularity, GetAnalyticsTimeSeriesGroupBy, GetAnalyticsTimeSeriesMetric, GetCaseEnvironment, GetEvalRunEnvelopeDataStatus, GetOAuthUrlCodeChallengeMethod, GetOAuthUrlProvider, InboxProcessorType, InformationRequestEnvironment, ListAgentWebhooksEnvironment, ListApiKeysIncludeRevoked, ListArtifactsEnvironment, ListArtifactsSortBy, ListArtifactsSortOrder, ListArtifactsStatus, ListCallFeedbackSortBy, ListCallFeedbackSortOrder, ListCallsDirection, ListCallsEnvironment, ListCallsSortBy, ListCallsSortOrder, ListCallsStatus, ListCaseLinksEntityType, ListCaseLinksEnvironment, ListCaseLinksSortBy, ListCaseLinksSortOrder, ListCasesEnvironment, ListCasesSortBy, ListCasesSortOrder, ListChatAgentsSortBy, ListChatAgentsSortOrder, ListChatMessagesSortBy, ListChatMessagesSortOrder, ListChatsEnvironment, ListChatsSortBy, ListChatsSortOrder, ListDispatchesSortBy, ListDispatchesSortOrder, ListDispatchesTriggerType, ListEmailThreadsEnvironment, ListEmailThreadsSortBy, ListEmailThreadsSortOrder, ListEmailsEnvironment, ListEmailsSortBy, ListEmailsSortOrder, ListExtractorJobsSortBy, ListExtractorJobsSortOrder, ListExtractorJobsStatus, ListExtractorsSortBy, ListExtractorsSortOrder, ListExtractsEnvironment, ListExtractsSortBy, ListExtractsSortOrder, ListInboxWebhooksEnvironment, ListInboxesSortBy, ListInboxesSortOrder, ListInformationRequestsEnvironment, ListInformationRequestsResolved, ListInformationRequestsSortBy, ListInformationRequestsSortOrder, ListJobsStatusItem, ListNotificationWebhooksEnvironment, ListNotificationsSortBy, ListNotificationsSortOrder, ListSchedulesEnvironment, ListSchedulesRuleType, ListSchedulesSortBy, ListSchedulesSortOrder, ListSecretsSortBy, ListSecretsSortOrder, ListToolVersionsSortBy, ListToolVersionsSortOrder, ListToolsSortBy, ListToolsSortOrder, ListVoiceAgentVersionsSortBy, ListVoiceAgentVersionsSortOrder, ListWebhookDeliveriesSortOrder, ListWebhooksEnvironment, ListWorkerRunsEnvironment, ListWorkerRunsSortBy, ListWorkerRunsSortOrder, ListWorkerRunsStatus, ListWorkerVersionsSortBy, ListWorkerVersionsSortOrder, ListWorkerWebhooksEnvironment, ListWorkersSortBy, ListWorkersSortOrder, OutboundJobEnvironment, OutboundJobStatus, ProfilePermissionsItem, ProfileRole, PromoteVoiceAgentVersionBodyEnvironment, PromotedVoiceAgentVersionEnvironment, RemoveCaseLinkEnvironment, RunEvalEnvelopeDataStatus, ScheduleEnvironmentsItem, ScheduleJobBodyEnvironment, SendEmailBodyEnvironment, TeamInvitationState, TeamMemberRole, TestWebhookBodyEnvironment, ToolEnvironment, UpdateApiKeyBodyRole, UpdateInboxBodyProcessorType, UpdateMemberRoleBodyRole, UpdateScheduleBodyEnvironmentsItem, UpdateVoiceAgentBodyCallProcessorType, UpdateVoiceAgentBodyNoiseCancellation, UpdateVoiceAgentModelsBodyFallbackLlmModel, UpdateVoiceAgentModelsBodyFallbackSttModel, UpdateVoiceAgentModelsBodyFallbackTtsModel, UpdateVoiceAgentModelsBodyFallbackTtsProvider, UpdateVoiceAgentModelsBodyLanguage, UpdateVoiceAgentModelsBodyLlmModel, UpdateVoiceAgentModelsBodySttModel, UpdateVoiceAgentModelsBodyTtsModel, UpdateVoiceAgentModelsBodyTtsProvider, UpdateWebhookBodyEnvironmentsItem, VoiceAgentBackgroundSounds, VoiceAgentCallProcessorType, VoiceAgentDirection, VoiceAgentFallbackLlmModel, VoiceAgentFallbackSttModel, VoiceAgentFallbackTtsModel, VoiceAgentFallbackTtsProvider, VoiceAgentLanguage, VoiceAgentLlmModel, VoiceAgentNoiseCancellation, VoiceAgentSttModel, VoiceAgentTtsModel, VoiceAgentTtsProvider, VoiceAgentVersionActiveEnvironmentsItem, VoiceAgentVersionDetailActiveEnvironmentsItem, VoiceAgentVersionDetailBackgroundSounds, VoiceAgentVersionDetailCallProcessorType, VoiceAgentVersionDetailDirection, VoiceAgentVersionDetailFallbackLlmModel, VoiceAgentVersionDetailFallbackSttModel, VoiceAgentVersionDetailFallbackTtsModel, VoiceAgentVersionDetailFallbackTtsProvider, VoiceAgentVersionDetailLanguage, VoiceAgentVersionDetailLlmModel, VoiceAgentVersionDetailNoiseCancellation, VoiceAgentVersionDetailSttModel, VoiceAgentVersionDetailTtsModel, VoiceAgentVersionDetailTtsProvider, VoiceAgentWithTestPhoneNumberBackgroundSounds, VoiceAgentWithTestPhoneNumberCallProcessorType, VoiceAgentWithTestPhoneNumberDirection, VoiceAgentWithTestPhoneNumberFallbackLlmModel, VoiceAgentWithTestPhoneNumberFallbackSttModel, VoiceAgentWithTestPhoneNumberFallbackTtsModel, VoiceAgentWithTestPhoneNumberFallbackTtsProvider, VoiceAgentWithTestPhoneNumberLanguage, VoiceAgentWithTestPhoneNumberLlmModel, VoiceAgentWithTestPhoneNumberNoiseCancellation, VoiceAgentWithTestPhoneNumberSttModel, VoiceAgentWithTestPhoneNumberTtsModel, VoiceAgentWithTestPhoneNumberTtsProvider, WebhookEnvironmentsItem, WorkerEnvironment, WorkerExecuteToolBodyEnvironment, WorkerListToolsSortBy, WorkerListToolsSortOrder, WorkerMcpName, WorkerMcpOutputName, WorkerPermission, WorkerRunCreatedEnvironment, WorkerRunCreatedStatus, WorkerRunEnvironment, WorkerRunStatus, addCaseLinks, cancelJob, cancelWorkerRun, checkInboxAvailability, configure, createAgentWebhook, createApiKey, createArtifact, createCallFeedback, createCase, createChat, createChatAgent, createExtractor, createExtractorJob, createExtractorWebhook, createInbox, createInboxWebhook, createInformationRequest, createNotificationWebhook, createSchedule, createSecret, createTool, createVoiceAgent, createWorker, createWorkerEvalFromRun, createWorkerRun, createWorkerWebhook, deleteArtifact, deleteCallFeedback, deleteChatAgent, deleteEmail, deleteExtractor, deleteInbox, deleteSchedule, deleteSecret, deleteTool, deleteVoiceAgent, deleteWebhook, deleteWorker, executeCode, generateCodeChallenge, generateCodeVerifier, getAddCaseLinksMutationFetcher, getAddCaseLinksMutationKey, getAddCaseLinksUrl, getAnalyticsTimeSeries, getArtifact, getArtifactMetadataKeys, getArtifactStatusSummary, getArtifactUploadUrl, getCall, getCallAnalytics, getCallEvaluation, getCancelJobMutationFetcher, getCancelJobMutationKey, getCancelJobUrl, getCancelWorkerRunMutationFetcher, getCancelWorkerRunMutationKey, getCancelWorkerRunUrl, getCase, getChat, getChatAgent, getChatAgentPrompt, getCheckInboxAvailabilityKey, getCheckInboxAvailabilityUrl, getConfig, getCreateAgentWebhookMutationFetcher, getCreateAgentWebhookMutationKey, getCreateAgentWebhookUrl, getCreateApiKeyMutationFetcher, getCreateApiKeyMutationKey, getCreateApiKeyUrl, getCreateArtifactMutationFetcher, getCreateArtifactMutationKey, getCreateArtifactUrl, getCreateCallFeedbackMutationFetcher, getCreateCallFeedbackMutationKey, getCreateCallFeedbackUrl, getCreateCaseMutationFetcher, getCreateCaseMutationKey, getCreateCaseUrl, getCreateChatAgentMutationFetcher, getCreateChatAgentMutationKey, getCreateChatAgentUrl, getCreateChatMutationFetcher, getCreateChatMutationKey, getCreateChatUrl, getCreateExtractorJobMutationFetcher, getCreateExtractorJobMutationKey, getCreateExtractorJobUrl, getCreateExtractorMutationFetcher, getCreateExtractorMutationKey, getCreateExtractorUrl, getCreateExtractorWebhookMutationFetcher, getCreateExtractorWebhookMutationKey, getCreateExtractorWebhookUrl, getCreateInboxMutationFetcher, getCreateInboxMutationKey, getCreateInboxUrl, getCreateInboxWebhookMutationFetcher, getCreateInboxWebhookMutationKey, getCreateInboxWebhookUrl, getCreateInformationRequestMutationFetcher, getCreateInformationRequestMutationKey, getCreateInformationRequestUrl, getCreateNotificationWebhookMutationFetcher, getCreateNotificationWebhookMutationKey, getCreateNotificationWebhookUrl, getCreateScheduleMutationFetcher, getCreateScheduleMutationKey, getCreateScheduleUrl, getCreateSecretMutationFetcher, getCreateSecretMutationKey, getCreateSecretUrl, getCreateToolMutationFetcher, getCreateToolMutationKey, getCreateToolUrl, getCreateVoiceAgentMutationFetcher, getCreateVoiceAgentMutationKey, getCreateVoiceAgentUrl, getCreateWorkerEvalFromRunMutationFetcher, getCreateWorkerEvalFromRunMutationKey, getCreateWorkerEvalFromRunUrl, getCreateWorkerMutationFetcher, getCreateWorkerMutationKey, getCreateWorkerRunMutationFetcher, getCreateWorkerRunMutationKey, getCreateWorkerRunUrl, getCreateWorkerUrl, getCreateWorkerWebhookMutationFetcher, getCreateWorkerWebhookMutationKey, getCreateWorkerWebhookUrl, getDeleteArtifactMutationFetcher, getDeleteArtifactMutationKey, getDeleteArtifactUrl, getDeleteCallFeedbackMutationFetcher, getDeleteCallFeedbackMutationKey, getDeleteCallFeedbackUrl, getDeleteChatAgentMutationFetcher, getDeleteChatAgentMutationKey, getDeleteChatAgentUrl, getDeleteEmailMutationFetcher, getDeleteEmailMutationKey, getDeleteEmailUrl, getDeleteExtractorMutationFetcher, getDeleteExtractorMutationKey, getDeleteExtractorUrl, getDeleteInboxMutationFetcher, getDeleteInboxMutationKey, getDeleteInboxUrl, getDeleteScheduleMutationFetcher, getDeleteScheduleMutationKey, getDeleteScheduleUrl, getDeleteSecretMutationFetcher, getDeleteSecretMutationKey, getDeleteSecretUrl, getDeleteToolMutationFetcher, getDeleteToolMutationKey, getDeleteToolUrl, getDeleteVoiceAgentMutationFetcher, getDeleteVoiceAgentMutationKey, getDeleteVoiceAgentUrl, getDeleteWebhookMutationFetcher, getDeleteWebhookMutationKey, getDeleteWebhookUrl, getDeleteWorkerMutationFetcher, getDeleteWorkerMutationKey, getDeleteWorkerUrl, getEmail, getEvalRun, getExecuteCodeMutationFetcher, getExecuteCodeMutationKey, getExecuteCodeUrl, getExtract, getExtractCitations, getExtractor, getExtractorJob, getGetAnalyticsTimeSeriesKey, getGetAnalyticsTimeSeriesUrl, getGetArtifactKey, getGetArtifactMetadataKeysKey, getGetArtifactMetadataKeysUrl, getGetArtifactStatusSummaryKey, getGetArtifactStatusSummaryUrl, getGetArtifactUploadUrlMutationFetcher, getGetArtifactUploadUrlMutationKey, getGetArtifactUploadUrlUrl, getGetArtifactUrl, getGetCallAnalyticsKey, getGetCallAnalyticsUrl, getGetCallEvaluationKey, getGetCallEvaluationUrl, getGetCallKey, getGetCallUrl, getGetCaseKey, getGetCaseUrl, getGetChatAgentKey, getGetChatAgentPromptKey, getGetChatAgentPromptUrl, getGetChatAgentUrl, getGetChatKey, getGetChatUrl, getGetEmailKey, getGetEmailUrl, getGetEvalRunKey, getGetEvalRunUrl, getGetExtractCitationsKey, getGetExtractCitationsUrl, getGetExtractKey, getGetExtractUrl, getGetExtractorJobKey, getGetExtractorJobUrl, getGetExtractorKey, getGetExtractorUrl, getGetInformationRequestKey, getGetInformationRequestUrl, getGetOAuthUrlKey, getGetOAuthUrlUrl, getGetPartnerJwksKey, getGetPartnerJwksUrl, getGetProfileKey, getGetProfileUrl, getGetPublicChatAgentKey, getGetPublicChatAgentUrl, getGetScheduleKey, getGetScheduleUrl, getGetSecretKey, getGetSecretUrl, getGetSessionTokenMutationFetcher, getGetSessionTokenMutationKey, getGetSessionTokenUrl, getGetToolKey, getGetToolUrl, getGetToolVersionChangeSummaryKey, getGetToolVersionChangeSummaryUrl, getGetToolVersionKey, getGetToolVersionUrl, getGetVoiceAgentKey, getGetVoiceAgentPlaceholdersKey, getGetVoiceAgentPlaceholdersUrl, getGetVoiceAgentPromptKey, getGetVoiceAgentPromptUrl, getGetVoiceAgentUrl, getGetVoiceAgentVersionChangeSummaryKey, getGetVoiceAgentVersionChangeSummaryUrl, getGetVoiceAgentVersionKey, getGetVoiceAgentVersionUrl, getGetWebhookKey, getGetWebhookUrl, getGetWorkerKey, getGetWorkerPromptKey, getGetWorkerPromptUrl, getGetWorkerRunKey, getGetWorkerRunUrl, getGetWorkerUrl, getGetWorkerVersionChangeSummaryKey, getGetWorkerVersionChangeSummaryUrl, getGetWorkerVersionKey, getGetWorkerVersionUrl, getInformationRequest, getInviteTeamMemberMutationFetcher, getInviteTeamMemberMutationKey, getInviteTeamMemberUrl, getListAgentWebhooksKey, getListAgentWebhooksUrl, getListApiKeysKey, getListApiKeysUrl, getListArtifactsKey, getListArtifactsUrl, getListCallFeedbackKey, getListCallFeedbackUrl, getListCallsKey, getListCallsUrl, getListCaseLinksKey, getListCaseLinksUrl, getListCasesKey, getListCasesUrl, getListChatAgentsKey, getListChatAgentsUrl, getListChatMessagesKey, getListChatMessagesUrl, getListChatsKey, getListChatsUrl, getListDispatchesKey, getListDispatchesUrl, getListEmailThreadsKey, getListEmailThreadsUrl, getListEmailsKey, getListEmailsUrl, getListExtractorJobsKey, getListExtractorJobsUrl, getListExtractorsKey, getListExtractorsUrl, getListExtractsKey, getListExtractsUrl, getListInboxWebhooksKey, getListInboxWebhooksUrl, getListInboxesKey, getListInboxesUrl, getListInformationRequestsKey, getListInformationRequestsUrl, getListJobsKey, getListJobsUrl, getListNotificationWebhooksKey, getListNotificationWebhooksUrl, getListNotificationsKey, getListNotificationsUrl, getListSchedulesKey, getListSchedulesUrl, getListSecretsKey, getListSecretsUrl, getListTeamInvitationsKey, getListTeamInvitationsUrl, getListTeamMembersKey, getListTeamMembersUrl, getListToolVersionsKey, getListToolVersionsUrl, getListToolsKey, getListToolsUrl, getListVoiceAgentVersionsKey, getListVoiceAgentVersionsUrl, getListVoiceAgentsKey, getListVoiceAgentsUrl, getListWebhookDeliveriesKey, getListWebhookDeliveriesUrl, getListWebhooksKey, getListWebhooksUrl, getListWorkerModelsKey, getListWorkerModelsUrl, getListWorkerRunMessagesKey, getListWorkerRunMessagesUrl, getListWorkerRunsKey, getListWorkerRunsUrl, getListWorkerVersionsKey, getListWorkerVersionsUrl, getListWorkerWebhooksKey, getListWorkerWebhooksUrl, getListWorkersKey, getListWorkersUrl, getNotifyAdminMutationFetcher, getNotifyAdminMutationKey, getNotifyAdminUrl, getOAuthUrl, getPartnerJwks, getPartnerLaunchMutationFetcher, getPartnerLaunchMutationKey, getPartnerLaunchUrl, getPostChatMessageMutationFetcher, getPostChatMessageMutationKey, getPostChatMessageUrl, getProfile, getPromoteToolVersionMutationFetcher, getPromoteToolVersionMutationKey, getPromoteToolVersionUrl, getPromoteVoiceAgentVersionMutationFetcher, getPromoteVoiceAgentVersionMutationKey, getPromoteVoiceAgentVersionUrl, getPromoteWorkerVersionMutationFetcher, getPromoteWorkerVersionMutationKey, getPromoteWorkerVersionUrl, getPublicChatAgent, getRefreshTokenMutationFetcher, getRefreshTokenMutationKey, getRefreshTokenUrl, getRemoveCaseLinkMutationFetcher, getRemoveCaseLinkMutationKey, getRemoveCaseLinkUrl, getRemoveMemberMutationFetcher, getRemoveMemberMutationKey, getRemoveMemberUrl, getReplyToEmailMutationFetcher, getReplyToEmailMutationKey, getReplyToEmailUrl, getRequestPasswordResetMutationFetcher, getRequestPasswordResetMutationKey, getRequestPasswordResetUrl, getResendTeamInvitationMutationFetcher, getResendTeamInvitationMutationKey, getResendTeamInvitationUrl, getResetPasswordMutationFetcher, getResetPasswordMutationKey, getResetPasswordUrl, getResolveInformationRequestMutationFetcher, getResolveInformationRequestMutationKey, getResolveInformationRequestUrl, getRevokeApiKeyMutationFetcher, getRevokeApiKeyMutationKey, getRevokeApiKeyUrl, getRevokeTeamInvitationMutationFetcher, getRevokeTeamInvitationMutationKey, getRevokeTeamInvitationUrl, getRunEvalMutationFetcher, getRunEvalMutationKey, getRunEvalUrl, getSchedule, getScheduleJobMutationFetcher, getScheduleJobMutationKey, getScheduleJobUrl, getSearchCasesKey, getSearchCasesUrl, getSecret, getSendEmailMutationFetcher, getSendEmailMutationKey, getSendEmailUrl, getSessionToken, getSignInMutationFetcher, getSignInMutationKey, getSignInUrl, getSignUpMutationFetcher, getSignUpMutationKey, getSignUpUrl, getTestWebhookMutationFetcher, getTestWebhookMutationKey, getTestWebhookUrl, getTool, getToolVersion, getToolVersionChangeSummary, getUpdateApiKeyMutationFetcher, getUpdateApiKeyMutationKey, getUpdateApiKeyUrl, getUpdateArtifactMetadataMutationFetcher, getUpdateArtifactMetadataMutationKey, getUpdateArtifactMetadataUrl, getUpdateCallControlsMutationFetcher, getUpdateCallControlsMutationKey, getUpdateCallControlsUrl, getUpdateChatAgentMutationFetcher, getUpdateChatAgentMutationKey, getUpdateChatAgentPromptMutationFetcher, getUpdateChatAgentPromptMutationKey, getUpdateChatAgentPromptUrl, getUpdateChatAgentUrl, getUpdateExtractorMutationFetcher, getUpdateExtractorMutationKey, getUpdateExtractorUrl, getUpdateInboxMutationFetcher, getUpdateInboxMutationKey, getUpdateInboxUrl, getUpdateMemberRoleMutationFetcher, getUpdateMemberRoleMutationKey, getUpdateMemberRoleUrl, getUpdateScheduleMutationFetcher, getUpdateScheduleMutationKey, getUpdateScheduleUrl, getUpdateSecretMutationFetcher, getUpdateSecretMutationKey, getUpdateSecretUrl, getUpdateToolMutationFetcher, getUpdateToolMutationKey, getUpdateToolUrl, getUpdateVoiceAgentModelsMutationFetcher, getUpdateVoiceAgentModelsMutationKey, getUpdateVoiceAgentModelsUrl, getUpdateVoiceAgentMutationFetcher, getUpdateVoiceAgentMutationKey, getUpdateVoiceAgentPromptMutationFetcher, getUpdateVoiceAgentPromptMutationKey, getUpdateVoiceAgentPromptUrl, getUpdateVoiceAgentUrl, getUpdateWebhookMutationFetcher, getUpdateWebhookMutationKey, getUpdateWebhookUrl, getUpdateWorkerMcpsMutationFetcher, getUpdateWorkerMcpsMutationKey, getUpdateWorkerMcpsUrl, getUpdateWorkerMutationFetcher, getUpdateWorkerMutationKey, getUpdateWorkerPromptMutationFetcher, getUpdateWorkerPromptMutationKey, getUpdateWorkerPromptUrl, getUpdateWorkerUrl, getUploadFileMutationFetcher, getUploadFileMutationKey, getUploadFileUrl, getVoiceAgent, getVoiceAgentPlaceholders, getVoiceAgentPrompt, getVoiceAgentVersion, getVoiceAgentVersionChangeSummary, getWebhook, getWorker, getWorkerExecuteToolMutationFetcher, getWorkerExecuteToolMutationKey, getWorkerExecuteToolUrl, getWorkerGetToolKey, getWorkerGetToolUrl, getWorkerListToolsKey, getWorkerListToolsUrl, getWorkerPrompt, getWorkerRun, getWorkerVersion, getWorkerVersionChangeSummary, inviteTeamMember, listAgentWebhooks, listApiKeys, listArtifacts, listCallFeedback, listCalls, listCaseLinks, listCases, listChatAgents, listChatMessages, listChats, listDispatches, listEmailThreads, listEmails, listExtractorJobs, listExtractors, listExtracts, listInboxWebhooks, listInboxes, listInformationRequests, listJobs, listNotificationWebhooks, listNotifications, listSchedules, listSecrets, listTeamInvitations, listTeamMembers, listToolVersions, listTools, listVoiceAgentVersions, listVoiceAgents, listWebhookDeliveries, listWebhooks, listWorkerModels, listWorkerRunMessages, listWorkerRuns, listWorkerVersions, listWorkerWebhooks, listWorkers, notifyAdmin, partnerLaunch, postChatMessage, promoteToolVersion, promoteVoiceAgentVersion, promoteWorkerVersion, refreshToken, removeCaseLink, removeMember, replyToEmail, requestPasswordReset, resendTeamInvitation, resetPassword, resolveInformationRequest, revokeApiKey, revokeTeamInvitation, runEval, scheduleJob, searchCases, sendEmail, signIn, signUp, testWebhook, updateApiKey, updateArtifactMetadata, updateCallControls, updateChatAgent, updateChatAgentPrompt, updateExtractor, updateInbox, updateMemberRole, updateSchedule, updateSecret, updateTool, updateVoiceAgent, updateVoiceAgentModels, updateVoiceAgentPrompt, updateWebhook, updateWorker, updateWorkerMcps, updateWorkerPrompt, uploadFile, useAddCaseLinks, useCancelJob, useCancelWorkerRun, useCheckInboxAvailability, useCreateAgentWebhook, useCreateApiKey, useCreateArtifact, useCreateCallFeedback, useCreateCase, useCreateChat, useCreateChatAgent, useCreateExtractor, useCreateExtractorJob, useCreateExtractorWebhook, useCreateInbox, useCreateInboxWebhook, useCreateInformationRequest, useCreateNotificationWebhook, useCreateSchedule, useCreateSecret, useCreateTool, useCreateVoiceAgent, useCreateWorker, useCreateWorkerEvalFromRun, useCreateWorkerRun, useCreateWorkerWebhook, useDeleteArtifact, useDeleteCallFeedback, useDeleteChatAgent, useDeleteEmail, useDeleteExtractor, useDeleteInbox, useDeleteSchedule, useDeleteSecret, useDeleteTool, useDeleteVoiceAgent, useDeleteWebhook, useDeleteWorker, useExecuteCode, useGetAnalyticsTimeSeries, useGetArtifact, useGetArtifactMetadataKeys, useGetArtifactStatusSummary, useGetArtifactUploadUrl, useGetCall, useGetCallAnalytics, useGetCallEvaluation, useGetCase, useGetChat, useGetChatAgent, useGetChatAgentPrompt, useGetEmail, useGetEvalRun, useGetExtract, useGetExtractCitations, useGetExtractor, useGetExtractorJob, useGetInformationRequest, useGetOAuthUrl, useGetPartnerJwks, useGetProfile, useGetPublicChatAgent, useGetSchedule, useGetSecret, useGetSessionToken, useGetTool, useGetToolVersion, useGetToolVersionChangeSummary, useGetVoiceAgent, useGetVoiceAgentPlaceholders, useGetVoiceAgentPrompt, useGetVoiceAgentVersion, useGetVoiceAgentVersionChangeSummary, useGetWebhook, useGetWorker, useGetWorkerPrompt, useGetWorkerRun, useGetWorkerVersion, useGetWorkerVersionChangeSummary, useInviteTeamMember, useListAgentWebhooks, useListApiKeys, useListArtifacts, useListCallFeedback, useListCalls, useListCaseLinks, useListCases, useListChatAgents, useListChatMessages, useListChats, useListDispatches, useListEmailThreads, useListEmails, useListExtractorJobs, useListExtractors, useListExtracts, useListInboxWebhooks, useListInboxes, useListInformationRequests, useListJobs, useListNotificationWebhooks, useListNotifications, useListSchedules, useListSecrets, useListTeamInvitations, useListTeamMembers, useListToolVersions, useListTools, useListVoiceAgentVersions, useListVoiceAgents, useListWebhookDeliveries, useListWebhooks, useListWorkerModels, useListWorkerRunMessages, useListWorkerRuns, useListWorkerVersions, useListWorkerWebhooks, useListWorkers, useNotifyAdmin, usePartnerLaunch, usePostChatMessage, usePromoteToolVersion, usePromoteVoiceAgentVersion, usePromoteWorkerVersion, useRefreshToken, useRemoveCaseLink, useRemoveMember, useReplyToEmail, useRequestPasswordReset, useResendTeamInvitation, useResetPassword, useResolveInformationRequest, useRevokeApiKey, useRevokeTeamInvitation, useRunEval, useScheduleJob, useSearchCases, useSendEmail, useSignIn, useSignUp, useTestWebhook, useUpdateApiKey, useUpdateArtifactMetadata, useUpdateCallControls, useUpdateChatAgent, useUpdateChatAgentPrompt, useUpdateExtractor, useUpdateInbox, useUpdateMemberRole, useUpdateSchedule, useUpdateSecret, useUpdateTool, useUpdateVoiceAgent, useUpdateVoiceAgentModels, useUpdateVoiceAgentPrompt, useUpdateWebhook, useUpdateWorker, useUpdateWorkerMcps, useUpdateWorkerPrompt, useUploadFile, useWorkerExecuteTool, useWorkerGetTool, useWorkerListTools, workerExecuteTool, workerGetTool, workerListTools };
|
|
6511
7213
|
//# sourceMappingURL=index.js.map
|
|
6512
7214
|
//# sourceMappingURL=index.js.map
|