@great-detail/support-sdk 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-F7GYYFWQ.js +1 -0
- package/dist/chunk-POO5QTDO.js +1 -0
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.d.cts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/{index-DtLhj7uf.d.cts → index-EaleABGN.d.cts} +261 -86
- package/dist/{index-DtLhj7uf.d.ts → index-EaleABGN.d.ts} +261 -86
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/Action/ListActions.ts +4 -4
- package/src/Authentication/PublicAuthentication.ts +4 -0
- package/src/Channel/ListChannels.ts +4 -4
- package/src/Client/index.ts +74 -82
- package/src/Contact/GetContact.ts +4 -4
- package/src/Contact/ListContacts.ts +4 -4
- package/src/Contact/UpdateContact.ts +65 -0
- package/src/Conversation/GetConversation.ts +4 -4
- package/src/Conversation/ListConversations.ts +4 -4
- package/src/Conversation/ListLabelConversations.ts +56 -0
- package/src/Conversation/UpdateConversation.ts +4 -4
- package/src/Label/CreateLabel.ts +5 -5
- package/src/Label/DeleteLabel.ts +42 -0
- package/src/Label/GetLabel.ts +4 -4
- package/src/Label/ListLabels.ts +4 -4
- package/src/Label/UpdateLabel.ts +63 -0
- package/src/Message/ListConversationMessages.ts +4 -4
- package/src/Message/ListMessages.ts +4 -4
- package/src/Model/Correction/CreateCorrectionModel.ts +4 -4
- package/src/Model/GetModel.ts +4 -4
- package/src/Model/ListModels.ts +4 -4
- package/src/Model/Response/CreateResponseModel.ts +4 -4
- package/src/Source/GetSource.ts +4 -4
- package/src/Source/ListSources.ts +4 -4
- package/src/Transport/index.ts +59 -0
- package/src/cli/labels.ts +17 -0
- package/dist/chunk-5SRPGK6C.js +0 -1
- package/dist/chunk-XBTUUC2M.js +0 -1
|
@@ -32,13 +32,43 @@ type Authentication = RequestFilterable;
|
|
|
32
32
|
* @see https://greatdetail.com
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
interface
|
|
35
|
+
interface TransportOptions {
|
|
36
|
+
requestFilterables: RequestFilterable[];
|
|
37
|
+
baseURL: string;
|
|
38
|
+
}
|
|
39
|
+
interface SendOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Alternative Fetch Provider.
|
|
42
|
+
* Used to override the default fetch provider and use polyfills or other
|
|
43
|
+
* libraries.
|
|
44
|
+
*
|
|
45
|
+
* @since 1.0.0
|
|
46
|
+
*/
|
|
47
|
+
fetch?: typeof fetch;
|
|
48
|
+
}
|
|
49
|
+
declare class Transport {
|
|
50
|
+
options: TransportOptions;
|
|
51
|
+
constructor({ baseURL, ...options }: TransportOptions);
|
|
52
|
+
protected _filterRequest(request: RequestInit): Promise<RequestInit>;
|
|
53
|
+
send(url: string | URL, request: RequestInit, { fetch: fetchAlternative }?: SendOptions): Promise<Response>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Great Detail Support System.
|
|
58
|
+
*
|
|
59
|
+
* @copyright 2024 Great Detail Ltd
|
|
60
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
61
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
62
|
+
* @see https://greatdetail.com
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
interface Options$l extends SendOptions {
|
|
36
66
|
request?: RequestInit;
|
|
37
67
|
}
|
|
38
68
|
declare class ListActionsRequest {
|
|
39
|
-
protected
|
|
40
|
-
constructor(
|
|
41
|
-
send({ request, ...options }?: Options$
|
|
69
|
+
protected _transport: Transport;
|
|
70
|
+
constructor(_transport: Transport);
|
|
71
|
+
send({ request, ...options }?: Options$l): Promise<ListActionsResponse>;
|
|
42
72
|
}
|
|
43
73
|
type ListActionsResponsePayload = {
|
|
44
74
|
actions: {
|
|
@@ -69,13 +99,13 @@ declare class ListActionsResponse {
|
|
|
69
99
|
* @see https://greatdetail.com
|
|
70
100
|
*/
|
|
71
101
|
|
|
72
|
-
interface Options$
|
|
102
|
+
interface Options$k extends SendOptions {
|
|
73
103
|
request?: RequestInit;
|
|
74
104
|
}
|
|
75
105
|
declare class ListChannelsRequest {
|
|
76
|
-
protected
|
|
77
|
-
constructor(
|
|
78
|
-
send({ request, ...options }?: Options$
|
|
106
|
+
protected _transport: Transport;
|
|
107
|
+
constructor(_transport: Transport);
|
|
108
|
+
send({ request, ...options }?: Options$k): Promise<ListChannelsResponse>;
|
|
79
109
|
}
|
|
80
110
|
type ListChannelsResponsePayload = {
|
|
81
111
|
channels: ({
|
|
@@ -116,14 +146,14 @@ declare class ListChannelsResponse {
|
|
|
116
146
|
* @see https://greatdetail.com
|
|
117
147
|
*/
|
|
118
148
|
|
|
119
|
-
interface Options$
|
|
149
|
+
interface Options$j extends SendOptions {
|
|
120
150
|
id: string;
|
|
121
151
|
request?: RequestInit;
|
|
122
152
|
}
|
|
123
153
|
declare class GetContactRequest {
|
|
124
|
-
protected
|
|
125
|
-
constructor(
|
|
126
|
-
send({ id, request, ...options }: Options$
|
|
154
|
+
protected _transport: Transport;
|
|
155
|
+
constructor(_transport: Transport);
|
|
156
|
+
send({ id, request, ...options }: Options$j): Promise<GetContactResponse>;
|
|
127
157
|
}
|
|
128
158
|
type GetContactResponsePayload = {
|
|
129
159
|
contact: {
|
|
@@ -151,13 +181,13 @@ declare class GetContactResponse {
|
|
|
151
181
|
* @see https://greatdetail.com
|
|
152
182
|
*/
|
|
153
183
|
|
|
154
|
-
interface Options$
|
|
184
|
+
interface Options$i extends SendOptions {
|
|
155
185
|
request?: RequestInit;
|
|
156
186
|
}
|
|
157
187
|
declare class ListContactsRequest {
|
|
158
|
-
protected
|
|
159
|
-
constructor(
|
|
160
|
-
send({ request, ...options }?: Options$
|
|
188
|
+
protected _transport: Transport;
|
|
189
|
+
constructor(_transport: Transport);
|
|
190
|
+
send({ request, ...options }?: Options$i): Promise<ListContactsResponse>;
|
|
161
191
|
}
|
|
162
192
|
type ListContactsResponsePayload = {
|
|
163
193
|
contacts: {
|
|
@@ -185,14 +215,63 @@ declare class ListContactsResponse {
|
|
|
185
215
|
* @see https://greatdetail.com
|
|
186
216
|
*/
|
|
187
217
|
|
|
188
|
-
interface Options$
|
|
218
|
+
interface Options$h extends SendOptions {
|
|
219
|
+
id: string;
|
|
220
|
+
body: z.infer<typeof UpdateContactRequest.SCHEMA>;
|
|
221
|
+
request?: RequestInit;
|
|
222
|
+
}
|
|
223
|
+
declare class UpdateContactRequest {
|
|
224
|
+
protected _transport: Transport;
|
|
225
|
+
static SCHEMA: z.ZodObject<{
|
|
226
|
+
name: z.ZodOptional<z.ZodString>;
|
|
227
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
228
|
+
telephoneNumber: z.ZodOptional<z.ZodString>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
name?: string | undefined;
|
|
231
|
+
emailAddress?: string | undefined;
|
|
232
|
+
telephoneNumber?: string | undefined;
|
|
233
|
+
}, {
|
|
234
|
+
name?: string | undefined;
|
|
235
|
+
emailAddress?: string | undefined;
|
|
236
|
+
telephoneNumber?: string | undefined;
|
|
237
|
+
}>;
|
|
238
|
+
constructor(_transport: Transport);
|
|
239
|
+
send({ id, body, request, ...options }: Options$h): Promise<UpdateContactResponse>;
|
|
240
|
+
}
|
|
241
|
+
type UpdateContactResponsePayload = {
|
|
242
|
+
contact: {
|
|
243
|
+
id: string;
|
|
244
|
+
name?: string;
|
|
245
|
+
emailAddress?: string;
|
|
246
|
+
telephoneNumber?: string;
|
|
247
|
+
account: string;
|
|
248
|
+
createdAt: string;
|
|
249
|
+
updatedAt?: string;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
declare class UpdateContactResponse {
|
|
253
|
+
response: Response;
|
|
254
|
+
constructor(response: Response);
|
|
255
|
+
result(): Promise<UpdateContactResponsePayload>;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Great Detail Support System.
|
|
260
|
+
*
|
|
261
|
+
* @copyright 2024 Great Detail Ltd
|
|
262
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
263
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
264
|
+
* @see https://greatdetail.com
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
interface Options$g extends SendOptions {
|
|
189
268
|
id: string;
|
|
190
269
|
request?: RequestInit;
|
|
191
270
|
}
|
|
192
271
|
declare class GetConversationRequest {
|
|
193
|
-
protected
|
|
194
|
-
constructor(
|
|
195
|
-
send({ id, request, ...options }: Options$
|
|
272
|
+
protected _transport: Transport;
|
|
273
|
+
constructor(_transport: Transport);
|
|
274
|
+
send({ id, request, ...options }: Options$g): Promise<GetConversationResponse>;
|
|
196
275
|
}
|
|
197
276
|
type GetConversationResponsePayload = {
|
|
198
277
|
conversation: {
|
|
@@ -220,13 +299,13 @@ declare class GetConversationResponse {
|
|
|
220
299
|
* @see https://greatdetail.com
|
|
221
300
|
*/
|
|
222
301
|
|
|
223
|
-
interface Options$
|
|
302
|
+
interface Options$f extends SendOptions {
|
|
224
303
|
request?: RequestInit;
|
|
225
304
|
}
|
|
226
305
|
declare class ListConversationsRequest {
|
|
227
|
-
protected
|
|
228
|
-
constructor(
|
|
229
|
-
send({ request, ...options }?: Options$
|
|
306
|
+
protected _transport: Transport;
|
|
307
|
+
constructor(_transport: Transport);
|
|
308
|
+
send({ request, ...options }?: Options$f): Promise<ListConversationsResponse>;
|
|
230
309
|
}
|
|
231
310
|
type ListConversationsResponsePayload = {
|
|
232
311
|
conversations: {
|
|
@@ -254,13 +333,48 @@ declare class ListConversationsResponse {
|
|
|
254
333
|
* @see https://greatdetail.com
|
|
255
334
|
*/
|
|
256
335
|
|
|
257
|
-
interface Options$
|
|
336
|
+
interface Options$e extends SendOptions {
|
|
337
|
+
id: string;
|
|
338
|
+
request?: RequestInit;
|
|
339
|
+
}
|
|
340
|
+
declare class ListLabelConversations {
|
|
341
|
+
protected _transport: Transport;
|
|
342
|
+
constructor(_transport: Transport);
|
|
343
|
+
send({ id, request, ...options }: Options$e): Promise<ListLabelConversationsResponse>;
|
|
344
|
+
}
|
|
345
|
+
type ListLabelConversationsResponsePayload = {
|
|
346
|
+
conversations: {
|
|
347
|
+
id: string;
|
|
348
|
+
name?: string;
|
|
349
|
+
hasEnded: boolean;
|
|
350
|
+
conversationStatus: "AwaitingContactConversationStatus" | "AwaitingAgentConversationStatus" | "ResolvedConversationStatus" | "ClosedConversationStatus";
|
|
351
|
+
accountChannel: string;
|
|
352
|
+
createdAt: string;
|
|
353
|
+
updatedAt: string;
|
|
354
|
+
}[];
|
|
355
|
+
};
|
|
356
|
+
declare class ListLabelConversationsResponse {
|
|
357
|
+
response: Response;
|
|
358
|
+
constructor(response: Response);
|
|
359
|
+
result(): Promise<ListLabelConversationsResponsePayload>;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Great Detail Support System.
|
|
364
|
+
*
|
|
365
|
+
* @copyright 2024 Great Detail Ltd
|
|
366
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
367
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
368
|
+
* @see https://greatdetail.com
|
|
369
|
+
*/
|
|
370
|
+
|
|
371
|
+
interface Options$d extends SendOptions {
|
|
258
372
|
id: string;
|
|
259
373
|
body: z.infer<typeof UpdateConversationRequest.SCHEMA>;
|
|
260
374
|
request?: RequestInit;
|
|
261
375
|
}
|
|
262
376
|
declare class UpdateConversationRequest {
|
|
263
|
-
protected
|
|
377
|
+
protected _transport: Transport;
|
|
264
378
|
static SCHEMA: z.ZodObject<{
|
|
265
379
|
hasEnded: z.ZodBoolean;
|
|
266
380
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -268,8 +382,8 @@ declare class UpdateConversationRequest {
|
|
|
268
382
|
}, {
|
|
269
383
|
hasEnded: boolean;
|
|
270
384
|
}>;
|
|
271
|
-
constructor(
|
|
272
|
-
send({ id, body, request, ...options }: Options$
|
|
385
|
+
constructor(_transport: Transport);
|
|
386
|
+
send({ id, body, request, ...options }: Options$d): Promise<UpdateConversationResponse>;
|
|
273
387
|
}
|
|
274
388
|
type UpdateConversationResponsePayload = {
|
|
275
389
|
conversation: {
|
|
@@ -297,12 +411,12 @@ declare class UpdateConversationResponse {
|
|
|
297
411
|
* @see https://greatdetail.com
|
|
298
412
|
*/
|
|
299
413
|
|
|
300
|
-
interface Options$
|
|
414
|
+
interface Options$c extends SendOptions {
|
|
301
415
|
body: z.infer<typeof CreateLabelRequest.SCHEMA>;
|
|
302
416
|
request?: RequestInit;
|
|
303
417
|
}
|
|
304
418
|
declare class CreateLabelRequest {
|
|
305
|
-
protected
|
|
419
|
+
protected _transport: Transport;
|
|
306
420
|
static SCHEMA: z.ZodObject<{
|
|
307
421
|
title: z.ZodString;
|
|
308
422
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -316,10 +430,10 @@ declare class CreateLabelRequest {
|
|
|
316
430
|
account: string;
|
|
317
431
|
description?: string | undefined;
|
|
318
432
|
}>;
|
|
319
|
-
constructor(
|
|
320
|
-
send({ body, request, ...options }: Options$
|
|
433
|
+
constructor(_transport: Transport);
|
|
434
|
+
send({ body, request, ...options }: Options$c): Promise<CreateLabelResponse>;
|
|
321
435
|
}
|
|
322
|
-
type CreateLabelResponsePayload = {
|
|
436
|
+
type CreateLabelResponsePayload$1 = {
|
|
323
437
|
label: {
|
|
324
438
|
id: string;
|
|
325
439
|
title: string;
|
|
@@ -332,7 +446,7 @@ type CreateLabelResponsePayload = {
|
|
|
332
446
|
declare class CreateLabelResponse {
|
|
333
447
|
response: Response;
|
|
334
448
|
constructor(response: Response);
|
|
335
|
-
result(): Promise<CreateLabelResponsePayload>;
|
|
449
|
+
result(): Promise<CreateLabelResponsePayload$1>;
|
|
336
450
|
}
|
|
337
451
|
|
|
338
452
|
/**
|
|
@@ -344,14 +458,39 @@ declare class CreateLabelResponse {
|
|
|
344
458
|
* @see https://greatdetail.com
|
|
345
459
|
*/
|
|
346
460
|
|
|
347
|
-
interface Options$
|
|
461
|
+
interface Options$b extends SendOptions {
|
|
462
|
+
id: string;
|
|
463
|
+
request?: RequestInit;
|
|
464
|
+
}
|
|
465
|
+
declare class DeleteLabelRequest {
|
|
466
|
+
protected _transport: Transport;
|
|
467
|
+
constructor(_transport: Transport);
|
|
468
|
+
send({ id, request, ...options }: Options$b): Promise<DeleteLabelResponse>;
|
|
469
|
+
}
|
|
470
|
+
type DeleteLabelResponsePayload = Record<string, never>;
|
|
471
|
+
declare class DeleteLabelResponse {
|
|
472
|
+
response: Response;
|
|
473
|
+
constructor(response: Response);
|
|
474
|
+
result(): Promise<DeleteLabelResponsePayload>;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Great Detail Support System.
|
|
479
|
+
*
|
|
480
|
+
* @copyright 2024 Great Detail Ltd
|
|
481
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
482
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
483
|
+
* @see https://greatdetail.com
|
|
484
|
+
*/
|
|
485
|
+
|
|
486
|
+
interface Options$a extends SendOptions {
|
|
348
487
|
id: string;
|
|
349
488
|
request?: RequestInit;
|
|
350
489
|
}
|
|
351
490
|
declare class GetLabelRequest {
|
|
352
|
-
protected
|
|
353
|
-
constructor(
|
|
354
|
-
send({ id, request, ...options }: Options$
|
|
491
|
+
protected _transport: Transport;
|
|
492
|
+
constructor(_transport: Transport);
|
|
493
|
+
send({ id, request, ...options }: Options$a): Promise<GetLabelResponse>;
|
|
355
494
|
}
|
|
356
495
|
type GetLabelResponsePayload = {
|
|
357
496
|
label: {
|
|
@@ -378,13 +517,13 @@ declare class GetLabelResponse {
|
|
|
378
517
|
* @see https://greatdetail.com
|
|
379
518
|
*/
|
|
380
519
|
|
|
381
|
-
interface Options$
|
|
520
|
+
interface Options$9 extends SendOptions {
|
|
382
521
|
request?: RequestInit;
|
|
383
522
|
}
|
|
384
523
|
declare class ListLabelsRequest {
|
|
385
|
-
protected
|
|
386
|
-
constructor(
|
|
387
|
-
send({ request, ...options }?: Options$
|
|
524
|
+
protected _transport: Transport;
|
|
525
|
+
constructor(_transport: Transport);
|
|
526
|
+
send({ request, ...options }?: Options$9): Promise<ListLabelsResponse>;
|
|
388
527
|
}
|
|
389
528
|
type ListLabelsResponsePayload = {
|
|
390
529
|
labels: {
|
|
@@ -402,6 +541,51 @@ declare class ListLabelsResponse {
|
|
|
402
541
|
result(): Promise<ListLabelsResponsePayload>;
|
|
403
542
|
}
|
|
404
543
|
|
|
544
|
+
/**
|
|
545
|
+
* Great Detail Support System.
|
|
546
|
+
*
|
|
547
|
+
* @copyright 2024 Great Detail Ltd
|
|
548
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
549
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
550
|
+
* @see https://greatdetail.com
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
interface Options$8 extends SendOptions {
|
|
554
|
+
id: string;
|
|
555
|
+
body: z.infer<typeof UpdateLabelRequest.SCHEMA>;
|
|
556
|
+
request?: RequestInit;
|
|
557
|
+
}
|
|
558
|
+
declare class UpdateLabelRequest {
|
|
559
|
+
protected _transport: Transport;
|
|
560
|
+
static SCHEMA: z.ZodObject<{
|
|
561
|
+
title: z.ZodOptional<z.ZodString>;
|
|
562
|
+
description: z.ZodOptional<z.ZodString>;
|
|
563
|
+
}, "strip", z.ZodTypeAny, {
|
|
564
|
+
title?: string | undefined;
|
|
565
|
+
description?: string | undefined;
|
|
566
|
+
}, {
|
|
567
|
+
title?: string | undefined;
|
|
568
|
+
description?: string | undefined;
|
|
569
|
+
}>;
|
|
570
|
+
constructor(_transport: Transport);
|
|
571
|
+
send({ id, body, request, ...options }: Options$8): Promise<UpdateLabelResponse>;
|
|
572
|
+
}
|
|
573
|
+
type CreateLabelResponsePayload = {
|
|
574
|
+
label: {
|
|
575
|
+
id: string;
|
|
576
|
+
title: string;
|
|
577
|
+
description?: string;
|
|
578
|
+
account: string;
|
|
579
|
+
createdAt: string;
|
|
580
|
+
updatedAt?: string;
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
declare class UpdateLabelResponse {
|
|
584
|
+
response: Response;
|
|
585
|
+
constructor(response: Response);
|
|
586
|
+
result(): Promise<CreateLabelResponsePayload>;
|
|
587
|
+
}
|
|
588
|
+
|
|
405
589
|
/**
|
|
406
590
|
* Great Detail Support System.
|
|
407
591
|
*
|
|
@@ -416,8 +600,8 @@ interface Options$7 extends SendOptions {
|
|
|
416
600
|
request?: RequestInit;
|
|
417
601
|
}
|
|
418
602
|
declare class ListConversationMessages {
|
|
419
|
-
protected
|
|
420
|
-
constructor(
|
|
603
|
+
protected _transport: Transport;
|
|
604
|
+
constructor(_transport: Transport);
|
|
421
605
|
send({ id, request, ...options }: Options$7): Promise<ListConversationMessagesResponse>;
|
|
422
606
|
}
|
|
423
607
|
type ListConversationMessagesResponsePayload = {
|
|
@@ -458,8 +642,8 @@ interface Options$6 extends SendOptions {
|
|
|
458
642
|
request?: RequestInit;
|
|
459
643
|
}
|
|
460
644
|
declare class ListMessagesRequest {
|
|
461
|
-
protected
|
|
462
|
-
constructor(
|
|
645
|
+
protected _transport: Transport;
|
|
646
|
+
constructor(_transport: Transport);
|
|
463
647
|
send({ request, ...options }?: Options$6): Promise<ListMessagesResponse>;
|
|
464
648
|
}
|
|
465
649
|
type ListMessagesResponsePayload = {
|
|
@@ -502,7 +686,7 @@ interface Options$5 extends SendOptions {
|
|
|
502
686
|
request?: RequestInit;
|
|
503
687
|
}
|
|
504
688
|
declare class CreateCorrectionModelRequest {
|
|
505
|
-
protected
|
|
689
|
+
protected _transport: Transport;
|
|
506
690
|
static SCHEMA: z.ZodObject<{
|
|
507
691
|
input: z.ZodString;
|
|
508
692
|
original: z.ZodString;
|
|
@@ -516,7 +700,7 @@ declare class CreateCorrectionModelRequest {
|
|
|
516
700
|
original: string;
|
|
517
701
|
correction: string;
|
|
518
702
|
}>;
|
|
519
|
-
constructor(
|
|
703
|
+
constructor(_transport: Transport);
|
|
520
704
|
send({ id, body, request, ...options }: Options$5): Promise<CreateCorrectionModelResponse>;
|
|
521
705
|
}
|
|
522
706
|
type CreateCorrectionResponsePayload = unknown;
|
|
@@ -540,8 +724,8 @@ interface Options$4 extends SendOptions {
|
|
|
540
724
|
request?: RequestInit;
|
|
541
725
|
}
|
|
542
726
|
declare class GetModelRequest {
|
|
543
|
-
protected
|
|
544
|
-
constructor(
|
|
727
|
+
protected _transport: Transport;
|
|
728
|
+
constructor(_transport: Transport);
|
|
545
729
|
send({ id, request, ...options }: Options$4): Promise<GetModelResponse>;
|
|
546
730
|
}
|
|
547
731
|
type GetModelResponsePayload = {
|
|
@@ -572,8 +756,8 @@ interface Options$3 extends SendOptions {
|
|
|
572
756
|
request?: RequestInit;
|
|
573
757
|
}
|
|
574
758
|
declare class ListModelsRequest {
|
|
575
|
-
protected
|
|
576
|
-
constructor(
|
|
759
|
+
protected _transport: Transport;
|
|
760
|
+
constructor(_transport: Transport);
|
|
577
761
|
send({ request, ...options }?: Options$3): Promise<ListModelsResponse>;
|
|
578
762
|
}
|
|
579
763
|
type ListModelsResponsePayload = {
|
|
@@ -606,7 +790,7 @@ interface Options$2 extends SendOptions {
|
|
|
606
790
|
request?: RequestInit;
|
|
607
791
|
}
|
|
608
792
|
declare class CreateResponseModelRequest {
|
|
609
|
-
protected
|
|
793
|
+
protected _transport: Transport;
|
|
610
794
|
static SCHEMA: z.ZodArray<z.ZodObject<{
|
|
611
795
|
role: z.ZodEnum<["user", "assistant"]>;
|
|
612
796
|
content: z.ZodNullable<z.ZodString>;
|
|
@@ -617,7 +801,7 @@ declare class CreateResponseModelRequest {
|
|
|
617
801
|
role: "user" | "assistant";
|
|
618
802
|
content: string | null;
|
|
619
803
|
}>, "many">;
|
|
620
|
-
constructor(
|
|
804
|
+
constructor(_transport: Transport);
|
|
621
805
|
send({ id, body, request, ...options }: Options$2): Promise<CreateResponseModelResponse>;
|
|
622
806
|
}
|
|
623
807
|
type CreateResponseResponsePayload = {
|
|
@@ -647,8 +831,8 @@ interface Options$1 extends SendOptions {
|
|
|
647
831
|
request?: RequestInit;
|
|
648
832
|
}
|
|
649
833
|
declare class GetSourceRequest {
|
|
650
|
-
protected
|
|
651
|
-
constructor(
|
|
834
|
+
protected _transport: Transport;
|
|
835
|
+
constructor(_transport: Transport);
|
|
652
836
|
send({ id, request, ...options }: Options$1): Promise<GetSourceResponse>;
|
|
653
837
|
}
|
|
654
838
|
type GetSourceResponsePayload = {
|
|
@@ -680,8 +864,8 @@ interface Options extends SendOptions {
|
|
|
680
864
|
request?: RequestInit;
|
|
681
865
|
}
|
|
682
866
|
declare class ListSourcesRequest {
|
|
683
|
-
protected
|
|
684
|
-
constructor(
|
|
867
|
+
protected _transport: Transport;
|
|
868
|
+
constructor(_transport: Transport);
|
|
685
869
|
send({ request, ...options }?: Options): Promise<ListSourcesResponse>;
|
|
686
870
|
}
|
|
687
871
|
type ListSourcesResponsePayload = {
|
|
@@ -710,37 +894,25 @@ declare class ListSourcesResponse {
|
|
|
710
894
|
*/
|
|
711
895
|
|
|
712
896
|
interface ClientOptions {
|
|
713
|
-
|
|
714
|
-
baseURL: string;
|
|
715
|
-
}
|
|
716
|
-
interface InputClientOptions {
|
|
717
|
-
baseURL?: string;
|
|
718
|
-
}
|
|
719
|
-
interface SendOptions {
|
|
720
|
-
/**
|
|
721
|
-
* Alternative Fetch Provider.
|
|
722
|
-
* Used to override the default fetch provider and use polyfills or other
|
|
723
|
-
* libraries.
|
|
724
|
-
*
|
|
725
|
-
* @since 1.0.0
|
|
726
|
-
*/
|
|
727
|
-
fetch?: typeof fetch;
|
|
897
|
+
baseURL?: string | URL;
|
|
728
898
|
}
|
|
729
899
|
declare class Client {
|
|
730
900
|
static DEFAULT_BASE_URL: string;
|
|
731
|
-
|
|
732
|
-
constructor(authentication: Authentication, options?:
|
|
733
|
-
|
|
901
|
+
transport: Transport;
|
|
902
|
+
constructor(authentication: Authentication, { baseURL, ...options }?: ClientOptions);
|
|
903
|
+
static getBaseURL(): string;
|
|
904
|
+
get action(): {
|
|
734
905
|
list: ListActionsRequest;
|
|
735
906
|
};
|
|
736
|
-
channel: {
|
|
907
|
+
get channel(): {
|
|
737
908
|
list: ListChannelsRequest;
|
|
738
909
|
};
|
|
739
|
-
contact: {
|
|
910
|
+
get contact(): {
|
|
740
911
|
get: GetContactRequest;
|
|
741
912
|
list: ListContactsRequest;
|
|
913
|
+
update: UpdateContactRequest;
|
|
742
914
|
};
|
|
743
|
-
conversation: {
|
|
915
|
+
get conversation(): {
|
|
744
916
|
get: GetConversationRequest;
|
|
745
917
|
list: ListConversationsRequest;
|
|
746
918
|
update: UpdateConversationRequest;
|
|
@@ -748,15 +920,20 @@ declare class Client {
|
|
|
748
920
|
list: ListConversationMessages;
|
|
749
921
|
};
|
|
750
922
|
};
|
|
751
|
-
label: {
|
|
923
|
+
get label(): {
|
|
752
924
|
create: CreateLabelRequest;
|
|
753
925
|
get: GetLabelRequest;
|
|
754
926
|
list: ListLabelsRequest;
|
|
927
|
+
update: UpdateLabelRequest;
|
|
928
|
+
delete: DeleteLabelRequest;
|
|
929
|
+
conversation: {
|
|
930
|
+
list: ListLabelConversations;
|
|
931
|
+
};
|
|
755
932
|
};
|
|
756
|
-
message: {
|
|
933
|
+
get message(): {
|
|
757
934
|
list: ListMessagesRequest;
|
|
758
935
|
};
|
|
759
|
-
model: {
|
|
936
|
+
get model(): {
|
|
760
937
|
get: GetModelRequest;
|
|
761
938
|
list: ListModelsRequest;
|
|
762
939
|
response: {
|
|
@@ -766,12 +943,10 @@ declare class Client {
|
|
|
766
943
|
create: CreateCorrectionModelRequest;
|
|
767
944
|
};
|
|
768
945
|
};
|
|
769
|
-
source: {
|
|
946
|
+
get source(): {
|
|
770
947
|
get: GetSourceRequest;
|
|
771
948
|
list: ListSourcesRequest;
|
|
772
949
|
};
|
|
773
|
-
protected _filterRequest(request: RequestInit): Promise<RequestInit>;
|
|
774
|
-
send(url: string | URL, request: RequestInit, { fetch: fetchAlternative }?: SendOptions): Promise<Response>;
|
|
775
950
|
}
|
|
776
951
|
|
|
777
|
-
export { type Authentication as A, Client as C, type GetConversationResponsePayload as G, type ListActionsResponsePayload as L, type RequestFilterable as R, type ListChannelsResponsePayload as a, type ListContactsResponsePayload as b, type ListConversationsResponsePayload as c, type CreateLabelResponsePayload as d, type ListLabelsResponsePayload as e, type ListMessagesResponsePayload as f, type ListModelsResponsePayload as g, type CreateCorrectionResponsePayload as h, type CreateResponseResponsePayload as i, type ListSourcesResponsePayload as j };
|
|
952
|
+
export { type Authentication as A, Client as C, type GetConversationResponsePayload as G, type ListActionsResponsePayload as L, type RequestFilterable as R, type ListChannelsResponsePayload as a, type ListContactsResponsePayload as b, type ListConversationsResponsePayload as c, type CreateLabelResponsePayload$1 as d, type ListLabelsResponsePayload as e, type ListMessagesResponsePayload as f, type ListModelsResponsePayload as g, type CreateCorrectionResponsePayload as h, type CreateResponseResponsePayload as i, type ListSourcesResponsePayload as j };
|