@great-detail/support-sdk 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-IXJNWCJL.js +1 -0
- package/dist/{chunk-PTKKI5PQ.js → chunk-SRYAEALQ.js} +1 -1
- 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-Dm8jdpkD.d.cts → index-Dj17QRj0.d.cts} +141 -111
- package/dist/{index-Dm8jdpkD.d.ts → index-Dj17QRj0.d.ts} +141 -111
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +63 -6
- package/dist/index.d.ts +63 -6
- package/dist/index.js +1 -1
- package/package.json +2 -1
- package/src/Action/ListActions.ts +8 -12
- package/src/Authentication/KeyAuthentication.ts +10 -11
- package/src/Authentication/PublicAuthentication.ts +8 -2
- package/src/Authentication/TokenAuthentication.ts +9 -7
- package/src/Channel/ListChannels.ts +8 -12
- package/src/Client/index.ts +6 -5
- package/src/Contact/ContactVCF/GetContactVCF.ts +24 -5
- package/src/Contact/CreateContact.ts +12 -16
- package/src/Contact/GetContact.ts +8 -12
- package/src/Contact/ListContacts.ts +8 -12
- package/src/Contact/ListLabelContacts.ts +8 -12
- package/src/Contact/UpdateContact.ts +12 -16
- package/src/Conversation/GetConversation.ts +8 -12
- package/src/Conversation/ListConversations.ts +8 -12
- package/src/Conversation/ListLabelConversations.ts +8 -12
- package/src/Conversation/UpdateConversation.ts +12 -16
- package/src/Error/AuthError.ts +12 -0
- package/src/Error/AuthenticationError.ts +16 -0
- package/src/Error/AuthorizationError.ts +16 -0
- package/src/Error/LogicError.ts +20 -0
- package/src/Error/NetworkError.ts +12 -0
- package/src/Error/SupportError.ts +10 -0
- package/src/Error/ValidationError.ts +16 -0
- package/src/Error/index.ts +11 -0
- package/src/Label/CreateLabel.ts +12 -16
- package/src/Label/DeleteLabel.ts +8 -12
- package/src/Label/GetLabel.ts +8 -12
- package/src/Label/ListLabels.ts +8 -12
- package/src/Label/UpdateLabel.ts +12 -16
- package/src/Message/ListConversationMessages.ts +8 -12
- package/src/Message/ListMessages.ts +8 -12
- package/src/Model/Correction/CreateCorrectionModel.ts +12 -16
- package/src/Model/GetModel.ts +8 -12
- package/src/Model/ListModels.ts +8 -12
- package/src/Model/Response/CreateResponseModel.ts +12 -16
- package/src/Request/RequestFilterable.ts +5 -1
- package/src/Request/RequestStandardHeaders.ts +6 -6
- package/src/Source/GetSource.ts +8 -12
- package/src/Source/ListSources.ts +8 -12
- package/src/Transport/FetchTransport.ts +112 -0
- package/src/Transport/index.ts +2 -44
- package/src/__tests__/Client/Client.test.ts +38 -0
- package/src/constants/environment.ts +36 -0
- package/src/constants/index.ts +0 -21
- package/src/index.ts +4 -4
- package/dist/chunk-2LKRKCHH.js +0 -1
- package/src/__tests__/Authentication/KeyAuthentication.test.ts +0 -79
- package/src/__tests__/Authentication/TokenAuthentication.test.ts +0 -79
|
@@ -9,7 +9,13 @@ import { z } from 'zod';
|
|
|
9
9
|
* @see https://greatdetail.com
|
|
10
10
|
*/
|
|
11
11
|
interface RequestFilterable {
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
filter(...options: unknown[]): Promise<{
|
|
16
|
+
headers: Record<string, string>;
|
|
17
|
+
}>;
|
|
18
|
+
getHeaders(): Record<string, string>;
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
/**
|
|
@@ -21,11 +27,24 @@ interface RequestFilterable {
|
|
|
21
27
|
* @see https://greatdetail.com
|
|
22
28
|
*/
|
|
23
29
|
|
|
24
|
-
interface Options$
|
|
30
|
+
interface Options$r {
|
|
25
31
|
requestFilterables: RequestFilterable[];
|
|
26
|
-
baseURL: string;
|
|
27
32
|
}
|
|
28
|
-
interface
|
|
33
|
+
interface Transport {
|
|
34
|
+
getURL(url: string): string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Great Detail Support System.
|
|
39
|
+
*
|
|
40
|
+
* @copyright 2024 Great Detail Ltd
|
|
41
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
42
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
43
|
+
* @see https://greatdetail.com
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
interface InputOptions extends Options$r {
|
|
47
|
+
baseURL: string;
|
|
29
48
|
/**
|
|
30
49
|
* Alternative Fetch Provider.
|
|
31
50
|
* Used to override the default fetch provider and use polyfills or other
|
|
@@ -35,12 +54,16 @@ interface SendOptions {
|
|
|
35
54
|
*/
|
|
36
55
|
fetch?: typeof fetch;
|
|
37
56
|
}
|
|
38
|
-
|
|
57
|
+
interface Options$q extends Options$r {
|
|
58
|
+
baseURL: string;
|
|
59
|
+
fetch: typeof fetch;
|
|
60
|
+
}
|
|
61
|
+
declare class FetchTransport implements Transport {
|
|
39
62
|
options: Options$q;
|
|
40
|
-
constructor({ baseURL, ...options }:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
send(url: string
|
|
63
|
+
constructor({ baseURL, fetch: fetchAlternative, ...options }: InputOptions);
|
|
64
|
+
getURL(url: string): string;
|
|
65
|
+
getRequest(url: string, request: RequestInit): Request;
|
|
66
|
+
send(url: string, request: RequestInit): Promise<Response>;
|
|
44
67
|
}
|
|
45
68
|
|
|
46
69
|
/**
|
|
@@ -52,13 +75,13 @@ declare class Transport {
|
|
|
52
75
|
* @see https://greatdetail.com
|
|
53
76
|
*/
|
|
54
77
|
|
|
55
|
-
interface Options$p
|
|
78
|
+
interface Options$p {
|
|
56
79
|
request?: RequestInit;
|
|
57
80
|
}
|
|
58
81
|
declare class ListActions {
|
|
59
|
-
protected _transport:
|
|
60
|
-
constructor(_transport:
|
|
61
|
-
send({ request
|
|
82
|
+
protected _transport: FetchTransport;
|
|
83
|
+
constructor(_transport: FetchTransport);
|
|
84
|
+
send({ request }?: Options$p): Promise<ListActionsResponse>;
|
|
62
85
|
}
|
|
63
86
|
type ListActionsResponsePayload = {
|
|
64
87
|
actions: {
|
|
@@ -100,13 +123,13 @@ type Authentication = RequestFilterable;
|
|
|
100
123
|
* @see https://greatdetail.com
|
|
101
124
|
*/
|
|
102
125
|
|
|
103
|
-
interface Options$o
|
|
126
|
+
interface Options$o {
|
|
104
127
|
request?: RequestInit;
|
|
105
128
|
}
|
|
106
129
|
declare class ListChannels {
|
|
107
|
-
protected _transport:
|
|
108
|
-
constructor(_transport:
|
|
109
|
-
send({ request
|
|
130
|
+
protected _transport: FetchTransport;
|
|
131
|
+
constructor(_transport: FetchTransport);
|
|
132
|
+
send({ request }?: Options$o): Promise<ListChannelsResponse>;
|
|
110
133
|
}
|
|
111
134
|
type ListChannelsResponsePayload = {
|
|
112
135
|
channels: ({
|
|
@@ -149,11 +172,18 @@ declare class ListChannelsResponse {
|
|
|
149
172
|
|
|
150
173
|
interface Options$n {
|
|
151
174
|
id: string;
|
|
175
|
+
vcf?: {
|
|
176
|
+
variant?: "vcard";
|
|
177
|
+
format?: "vcf" | "qr";
|
|
178
|
+
} | {
|
|
179
|
+
variant: "jcard";
|
|
180
|
+
format?: "json";
|
|
181
|
+
};
|
|
152
182
|
}
|
|
153
183
|
declare class GetContactVCFURL {
|
|
154
|
-
protected _transport:
|
|
155
|
-
constructor(_transport:
|
|
156
|
-
|
|
184
|
+
protected _transport: FetchTransport;
|
|
185
|
+
constructor(_transport: FetchTransport);
|
|
186
|
+
getURL({ id, vcf }: Options$n): string;
|
|
157
187
|
}
|
|
158
188
|
|
|
159
189
|
/**
|
|
@@ -165,12 +195,12 @@ declare class GetContactVCFURL {
|
|
|
165
195
|
* @see https://greatdetail.com
|
|
166
196
|
*/
|
|
167
197
|
|
|
168
|
-
interface Options$m
|
|
198
|
+
interface Options$m {
|
|
169
199
|
body: z.infer<typeof CreateContact.SCHEMA>;
|
|
170
200
|
request?: RequestInit;
|
|
171
201
|
}
|
|
172
202
|
declare class CreateContact {
|
|
173
|
-
protected _transport:
|
|
203
|
+
protected _transport: FetchTransport;
|
|
174
204
|
static SCHEMA: z.ZodObject<{
|
|
175
205
|
name: z.ZodString;
|
|
176
206
|
account: z.ZodString;
|
|
@@ -187,8 +217,8 @@ declare class CreateContact {
|
|
|
187
217
|
emailAddress?: string | undefined;
|
|
188
218
|
telephoneNumber?: string | undefined;
|
|
189
219
|
}>;
|
|
190
|
-
constructor(_transport:
|
|
191
|
-
send({ body, request
|
|
220
|
+
constructor(_transport: FetchTransport);
|
|
221
|
+
send({ body, request }: Options$m): Promise<CreateContactResponse>;
|
|
192
222
|
}
|
|
193
223
|
type CreateContactResponsePayload = {
|
|
194
224
|
contact: {
|
|
@@ -216,14 +246,14 @@ declare class CreateContactResponse {
|
|
|
216
246
|
* @see https://greatdetail.com
|
|
217
247
|
*/
|
|
218
248
|
|
|
219
|
-
interface Options$l
|
|
249
|
+
interface Options$l {
|
|
220
250
|
id: string;
|
|
221
251
|
request?: RequestInit;
|
|
222
252
|
}
|
|
223
253
|
declare class GetContact {
|
|
224
|
-
protected _transport:
|
|
225
|
-
constructor(_transport:
|
|
226
|
-
send({ id, request
|
|
254
|
+
protected _transport: FetchTransport;
|
|
255
|
+
constructor(_transport: FetchTransport);
|
|
256
|
+
send({ id, request }: Options$l): Promise<GetContactResponse>;
|
|
227
257
|
}
|
|
228
258
|
type GetContactResponsePayload = {
|
|
229
259
|
contact: {
|
|
@@ -251,13 +281,13 @@ declare class GetContactResponse {
|
|
|
251
281
|
* @see https://greatdetail.com
|
|
252
282
|
*/
|
|
253
283
|
|
|
254
|
-
interface Options$k
|
|
284
|
+
interface Options$k {
|
|
255
285
|
request?: RequestInit;
|
|
256
286
|
}
|
|
257
287
|
declare class ListContacts {
|
|
258
|
-
protected _transport:
|
|
259
|
-
constructor(_transport:
|
|
260
|
-
send({ request
|
|
288
|
+
protected _transport: FetchTransport;
|
|
289
|
+
constructor(_transport: FetchTransport);
|
|
290
|
+
send({ request }?: Options$k): Promise<ListContactsResponse>;
|
|
261
291
|
}
|
|
262
292
|
type ListContactsResponsePayload = {
|
|
263
293
|
contacts: {
|
|
@@ -285,14 +315,14 @@ declare class ListContactsResponse {
|
|
|
285
315
|
* @see https://greatdetail.com
|
|
286
316
|
*/
|
|
287
317
|
|
|
288
|
-
interface Options$j
|
|
318
|
+
interface Options$j {
|
|
289
319
|
id: string;
|
|
290
320
|
request?: RequestInit;
|
|
291
321
|
}
|
|
292
322
|
declare class ListLabelContacts {
|
|
293
|
-
protected _transport:
|
|
294
|
-
constructor(_transport:
|
|
295
|
-
send({ id, request
|
|
323
|
+
protected _transport: FetchTransport;
|
|
324
|
+
constructor(_transport: FetchTransport);
|
|
325
|
+
send({ id, request }: Options$j): Promise<ListLabelContactsResponse>;
|
|
296
326
|
}
|
|
297
327
|
type ListLabelContactsResponsePayload = {
|
|
298
328
|
contacts: {
|
|
@@ -320,13 +350,13 @@ declare class ListLabelContactsResponse {
|
|
|
320
350
|
* @see https://greatdetail.com
|
|
321
351
|
*/
|
|
322
352
|
|
|
323
|
-
interface Options$i
|
|
353
|
+
interface Options$i {
|
|
324
354
|
id: string;
|
|
325
355
|
body: z.infer<typeof UpdateContact.SCHEMA>;
|
|
326
356
|
request?: RequestInit;
|
|
327
357
|
}
|
|
328
358
|
declare class UpdateContact {
|
|
329
|
-
protected _transport:
|
|
359
|
+
protected _transport: FetchTransport;
|
|
330
360
|
static SCHEMA: z.ZodObject<{
|
|
331
361
|
name: z.ZodOptional<z.ZodString>;
|
|
332
362
|
emailAddress: z.ZodOptional<z.ZodString>;
|
|
@@ -340,8 +370,8 @@ declare class UpdateContact {
|
|
|
340
370
|
emailAddress?: string | undefined;
|
|
341
371
|
telephoneNumber?: string | undefined;
|
|
342
372
|
}>;
|
|
343
|
-
constructor(_transport:
|
|
344
|
-
send({ id, body, request
|
|
373
|
+
constructor(_transport: FetchTransport);
|
|
374
|
+
send({ id, body, request }: Options$i): Promise<UpdateContactResponse>;
|
|
345
375
|
}
|
|
346
376
|
type UpdateContactResponsePayload = {
|
|
347
377
|
contact: {
|
|
@@ -369,14 +399,14 @@ declare class UpdateContactResponse {
|
|
|
369
399
|
* @see https://greatdetail.com
|
|
370
400
|
*/
|
|
371
401
|
|
|
372
|
-
interface Options$h
|
|
402
|
+
interface Options$h {
|
|
373
403
|
id: string;
|
|
374
404
|
request?: RequestInit;
|
|
375
405
|
}
|
|
376
406
|
declare class GetConversation {
|
|
377
|
-
protected _transport:
|
|
378
|
-
constructor(_transport:
|
|
379
|
-
send({ id, request
|
|
407
|
+
protected _transport: FetchTransport;
|
|
408
|
+
constructor(_transport: FetchTransport);
|
|
409
|
+
send({ id, request }: Options$h): Promise<GetConversationResponse>;
|
|
380
410
|
}
|
|
381
411
|
type GetConversationResponsePayload = {
|
|
382
412
|
conversation: {
|
|
@@ -404,13 +434,13 @@ declare class GetConversationResponse {
|
|
|
404
434
|
* @see https://greatdetail.com
|
|
405
435
|
*/
|
|
406
436
|
|
|
407
|
-
interface Options$g
|
|
437
|
+
interface Options$g {
|
|
408
438
|
request?: RequestInit;
|
|
409
439
|
}
|
|
410
440
|
declare class ListConversations {
|
|
411
|
-
protected _transport:
|
|
412
|
-
constructor(_transport:
|
|
413
|
-
send({ request
|
|
441
|
+
protected _transport: FetchTransport;
|
|
442
|
+
constructor(_transport: FetchTransport);
|
|
443
|
+
send({ request }?: Options$g): Promise<ListConversationsResponse>;
|
|
414
444
|
}
|
|
415
445
|
type ListConversationsResponsePayload = {
|
|
416
446
|
conversations: {
|
|
@@ -438,14 +468,14 @@ declare class ListConversationsResponse {
|
|
|
438
468
|
* @see https://greatdetail.com
|
|
439
469
|
*/
|
|
440
470
|
|
|
441
|
-
interface Options$f
|
|
471
|
+
interface Options$f {
|
|
442
472
|
id: string;
|
|
443
473
|
request?: RequestInit;
|
|
444
474
|
}
|
|
445
475
|
declare class ListLabelConversations {
|
|
446
|
-
protected _transport:
|
|
447
|
-
constructor(_transport:
|
|
448
|
-
send({ id, request
|
|
476
|
+
protected _transport: FetchTransport;
|
|
477
|
+
constructor(_transport: FetchTransport);
|
|
478
|
+
send({ id, request }: Options$f): Promise<ListLabelConversationsResponse>;
|
|
449
479
|
}
|
|
450
480
|
type ListLabelConversationsResponsePayload = {
|
|
451
481
|
conversations: {
|
|
@@ -473,13 +503,13 @@ declare class ListLabelConversationsResponse {
|
|
|
473
503
|
* @see https://greatdetail.com
|
|
474
504
|
*/
|
|
475
505
|
|
|
476
|
-
interface Options$e
|
|
506
|
+
interface Options$e {
|
|
477
507
|
id: string;
|
|
478
508
|
body: z.infer<typeof UpdateConversation.SCHEMA>;
|
|
479
509
|
request?: RequestInit;
|
|
480
510
|
}
|
|
481
511
|
declare class UpdateConversation {
|
|
482
|
-
protected _transport:
|
|
512
|
+
protected _transport: FetchTransport;
|
|
483
513
|
static SCHEMA: z.ZodObject<{
|
|
484
514
|
hasEnded: z.ZodBoolean;
|
|
485
515
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -487,8 +517,8 @@ declare class UpdateConversation {
|
|
|
487
517
|
}, {
|
|
488
518
|
hasEnded: boolean;
|
|
489
519
|
}>;
|
|
490
|
-
constructor(_transport:
|
|
491
|
-
send({ id, body, request
|
|
520
|
+
constructor(_transport: FetchTransport);
|
|
521
|
+
send({ id, body, request }: Options$e): Promise<UpdateConversationResponse>;
|
|
492
522
|
}
|
|
493
523
|
type UpdateConversationResponsePayload = {
|
|
494
524
|
conversation: {
|
|
@@ -516,12 +546,12 @@ declare class UpdateConversationResponse {
|
|
|
516
546
|
* @see https://greatdetail.com
|
|
517
547
|
*/
|
|
518
548
|
|
|
519
|
-
interface Options$d
|
|
549
|
+
interface Options$d {
|
|
520
550
|
body: z.infer<typeof CreateLabel.SCHEMA>;
|
|
521
551
|
request?: RequestInit;
|
|
522
552
|
}
|
|
523
553
|
declare class CreateLabel {
|
|
524
|
-
protected _transport:
|
|
554
|
+
protected _transport: FetchTransport;
|
|
525
555
|
static SCHEMA: z.ZodObject<{
|
|
526
556
|
title: z.ZodString;
|
|
527
557
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -535,8 +565,8 @@ declare class CreateLabel {
|
|
|
535
565
|
title: string;
|
|
536
566
|
description?: string | undefined;
|
|
537
567
|
}>;
|
|
538
|
-
constructor(_transport:
|
|
539
|
-
send({ body, request
|
|
568
|
+
constructor(_transport: FetchTransport);
|
|
569
|
+
send({ body, request }: Options$d): Promise<CreateLabelResponse>;
|
|
540
570
|
}
|
|
541
571
|
type CreateLabelResponsePayload = {
|
|
542
572
|
label: {
|
|
@@ -563,14 +593,14 @@ declare class CreateLabelResponse {
|
|
|
563
593
|
* @see https://greatdetail.com
|
|
564
594
|
*/
|
|
565
595
|
|
|
566
|
-
interface Options$c
|
|
596
|
+
interface Options$c {
|
|
567
597
|
id: string;
|
|
568
598
|
request?: RequestInit;
|
|
569
599
|
}
|
|
570
600
|
declare class DeleteLabel {
|
|
571
|
-
protected _transport:
|
|
572
|
-
constructor(_transport:
|
|
573
|
-
send({ id, request
|
|
601
|
+
protected _transport: FetchTransport;
|
|
602
|
+
constructor(_transport: FetchTransport);
|
|
603
|
+
send({ id, request }: Options$c): Promise<DeleteLabelResponse>;
|
|
574
604
|
}
|
|
575
605
|
type DeleteLabelResponsePayload = Record<string, never>;
|
|
576
606
|
declare class DeleteLabelResponse {
|
|
@@ -588,14 +618,14 @@ declare class DeleteLabelResponse {
|
|
|
588
618
|
* @see https://greatdetail.com
|
|
589
619
|
*/
|
|
590
620
|
|
|
591
|
-
interface Options$b
|
|
621
|
+
interface Options$b {
|
|
592
622
|
id: string;
|
|
593
623
|
request?: RequestInit;
|
|
594
624
|
}
|
|
595
625
|
declare class GetLabel {
|
|
596
|
-
protected _transport:
|
|
597
|
-
constructor(_transport:
|
|
598
|
-
send({ id, request
|
|
626
|
+
protected _transport: FetchTransport;
|
|
627
|
+
constructor(_transport: FetchTransport);
|
|
628
|
+
send({ id, request }: Options$b): Promise<GetLabelResponse>;
|
|
599
629
|
}
|
|
600
630
|
type GetLabelResponsePayload = {
|
|
601
631
|
label: {
|
|
@@ -622,13 +652,13 @@ declare class GetLabelResponse {
|
|
|
622
652
|
* @see https://greatdetail.com
|
|
623
653
|
*/
|
|
624
654
|
|
|
625
|
-
interface Options$a
|
|
655
|
+
interface Options$a {
|
|
626
656
|
request?: RequestInit;
|
|
627
657
|
}
|
|
628
658
|
declare class ListLabels {
|
|
629
|
-
protected _transport:
|
|
630
|
-
constructor(_transport:
|
|
631
|
-
send({ request
|
|
659
|
+
protected _transport: FetchTransport;
|
|
660
|
+
constructor(_transport: FetchTransport);
|
|
661
|
+
send({ request }?: Options$a): Promise<ListLabelsResponse>;
|
|
632
662
|
}
|
|
633
663
|
type ListLabelsResponsePayload = {
|
|
634
664
|
labels: {
|
|
@@ -655,13 +685,13 @@ declare class ListLabelsResponse {
|
|
|
655
685
|
* @see https://greatdetail.com
|
|
656
686
|
*/
|
|
657
687
|
|
|
658
|
-
interface Options$9
|
|
688
|
+
interface Options$9 {
|
|
659
689
|
id: string;
|
|
660
690
|
body: z.infer<typeof UpdateLabel.SCHEMA>;
|
|
661
691
|
request?: RequestInit;
|
|
662
692
|
}
|
|
663
693
|
declare class UpdateLabel {
|
|
664
|
-
protected _transport:
|
|
694
|
+
protected _transport: FetchTransport;
|
|
665
695
|
static SCHEMA: z.ZodObject<{
|
|
666
696
|
title: z.ZodOptional<z.ZodString>;
|
|
667
697
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -672,8 +702,8 @@ declare class UpdateLabel {
|
|
|
672
702
|
title?: string | undefined;
|
|
673
703
|
description?: string | undefined;
|
|
674
704
|
}>;
|
|
675
|
-
constructor(_transport:
|
|
676
|
-
send({ id, body, request
|
|
705
|
+
constructor(_transport: FetchTransport);
|
|
706
|
+
send({ id, body, request }: Options$9): Promise<UpdateLabelResponse>;
|
|
677
707
|
}
|
|
678
708
|
type UpdateLabelResponsePayload = {
|
|
679
709
|
label: {
|
|
@@ -700,14 +730,14 @@ declare class UpdateLabelResponse {
|
|
|
700
730
|
* @see https://greatdetail.com
|
|
701
731
|
*/
|
|
702
732
|
|
|
703
|
-
interface Options$8
|
|
733
|
+
interface Options$8 {
|
|
704
734
|
id: string;
|
|
705
735
|
request?: RequestInit;
|
|
706
736
|
}
|
|
707
737
|
declare class ListConversationMessages {
|
|
708
|
-
protected _transport:
|
|
709
|
-
constructor(_transport:
|
|
710
|
-
send({ id, request
|
|
738
|
+
protected _transport: FetchTransport;
|
|
739
|
+
constructor(_transport: FetchTransport);
|
|
740
|
+
send({ id, request }: Options$8): Promise<ListConversationMessagesResponse>;
|
|
711
741
|
}
|
|
712
742
|
type ListConversationMessagesResponsePayload = {
|
|
713
743
|
messages: {
|
|
@@ -743,13 +773,13 @@ declare class ListConversationMessagesResponse {
|
|
|
743
773
|
* @see https://greatdetail.com
|
|
744
774
|
*/
|
|
745
775
|
|
|
746
|
-
interface Options$7
|
|
776
|
+
interface Options$7 {
|
|
747
777
|
request?: RequestInit;
|
|
748
778
|
}
|
|
749
779
|
declare class ListMessages {
|
|
750
|
-
protected _transport:
|
|
751
|
-
constructor(_transport:
|
|
752
|
-
send({ request
|
|
780
|
+
protected _transport: FetchTransport;
|
|
781
|
+
constructor(_transport: FetchTransport);
|
|
782
|
+
send({ request }?: Options$7): Promise<ListMessagesResponse>;
|
|
753
783
|
}
|
|
754
784
|
type ListMessagesResponsePayload = {
|
|
755
785
|
messages: {
|
|
@@ -785,13 +815,13 @@ declare class ListMessagesResponse {
|
|
|
785
815
|
* @see https://greatdetail.com
|
|
786
816
|
*/
|
|
787
817
|
|
|
788
|
-
interface Options$6
|
|
818
|
+
interface Options$6 {
|
|
789
819
|
id: string;
|
|
790
820
|
body: z.infer<typeof CreateCorrectionModel.SCHEMA>;
|
|
791
821
|
request?: RequestInit;
|
|
792
822
|
}
|
|
793
823
|
declare class CreateCorrectionModel {
|
|
794
|
-
protected _transport:
|
|
824
|
+
protected _transport: FetchTransport;
|
|
795
825
|
static SCHEMA: z.ZodObject<{
|
|
796
826
|
input: z.ZodString;
|
|
797
827
|
original: z.ZodString;
|
|
@@ -805,8 +835,8 @@ declare class CreateCorrectionModel {
|
|
|
805
835
|
original: string;
|
|
806
836
|
correction: string;
|
|
807
837
|
}>;
|
|
808
|
-
constructor(_transport:
|
|
809
|
-
send({ id, body, request
|
|
838
|
+
constructor(_transport: FetchTransport);
|
|
839
|
+
send({ id, body, request }: Options$6): Promise<CreateCorrectionModelResponse>;
|
|
810
840
|
}
|
|
811
841
|
type CreateCorrectionResponsePayload = unknown;
|
|
812
842
|
declare class CreateCorrectionModelResponse {
|
|
@@ -824,14 +854,14 @@ declare class CreateCorrectionModelResponse {
|
|
|
824
854
|
* @see https://greatdetail.com
|
|
825
855
|
*/
|
|
826
856
|
|
|
827
|
-
interface Options$5
|
|
857
|
+
interface Options$5 {
|
|
828
858
|
id: string;
|
|
829
859
|
request?: RequestInit;
|
|
830
860
|
}
|
|
831
861
|
declare class GetModel {
|
|
832
|
-
protected _transport:
|
|
833
|
-
constructor(_transport:
|
|
834
|
-
send({ id, request
|
|
862
|
+
protected _transport: FetchTransport;
|
|
863
|
+
constructor(_transport: FetchTransport);
|
|
864
|
+
send({ id, request }: Options$5): Promise<GetModelResponse>;
|
|
835
865
|
}
|
|
836
866
|
type GetModelResponsePayload = {
|
|
837
867
|
model: {
|
|
@@ -857,13 +887,13 @@ declare class GetModelResponse {
|
|
|
857
887
|
* @see https://greatdetail.com
|
|
858
888
|
*/
|
|
859
889
|
|
|
860
|
-
interface Options$4
|
|
890
|
+
interface Options$4 {
|
|
861
891
|
request?: RequestInit;
|
|
862
892
|
}
|
|
863
893
|
declare class ListModels {
|
|
864
|
-
protected _transport:
|
|
865
|
-
constructor(_transport:
|
|
866
|
-
send({ request
|
|
894
|
+
protected _transport: FetchTransport;
|
|
895
|
+
constructor(_transport: FetchTransport);
|
|
896
|
+
send({ request }?: Options$4): Promise<ListModelsResponse>;
|
|
867
897
|
}
|
|
868
898
|
type ListModelsResponsePayload = {
|
|
869
899
|
models: {
|
|
@@ -889,13 +919,13 @@ declare class ListModelsResponse {
|
|
|
889
919
|
* @see https://greatdetail.com
|
|
890
920
|
*/
|
|
891
921
|
|
|
892
|
-
interface Options$3
|
|
922
|
+
interface Options$3 {
|
|
893
923
|
id: string;
|
|
894
924
|
body: z.infer<typeof CreateResponseModel.SCHEMA>;
|
|
895
925
|
request?: RequestInit;
|
|
896
926
|
}
|
|
897
927
|
declare class CreateResponseModel {
|
|
898
|
-
protected _transport:
|
|
928
|
+
protected _transport: FetchTransport;
|
|
899
929
|
static SCHEMA: z.ZodArray<z.ZodObject<{
|
|
900
930
|
role: z.ZodEnum<["user", "assistant"]>;
|
|
901
931
|
content: z.ZodNullable<z.ZodString>;
|
|
@@ -906,8 +936,8 @@ declare class CreateResponseModel {
|
|
|
906
936
|
role: "user" | "assistant";
|
|
907
937
|
content: string | null;
|
|
908
938
|
}>, "many">;
|
|
909
|
-
constructor(_transport:
|
|
910
|
-
send({ id, body, request
|
|
939
|
+
constructor(_transport: FetchTransport);
|
|
940
|
+
send({ id, body, request }: Options$3): Promise<CreateResponseModelResponse>;
|
|
911
941
|
}
|
|
912
942
|
type CreateResponseResponsePayload = {
|
|
913
943
|
message: string | null;
|
|
@@ -931,14 +961,14 @@ declare class CreateResponseModelResponse {
|
|
|
931
961
|
* @see https://greatdetail.com
|
|
932
962
|
*/
|
|
933
963
|
|
|
934
|
-
interface Options$2
|
|
964
|
+
interface Options$2 {
|
|
935
965
|
id: string;
|
|
936
966
|
request?: RequestInit;
|
|
937
967
|
}
|
|
938
968
|
declare class GetSource {
|
|
939
|
-
protected _transport:
|
|
940
|
-
constructor(_transport:
|
|
941
|
-
send({ id, request
|
|
969
|
+
protected _transport: FetchTransport;
|
|
970
|
+
constructor(_transport: FetchTransport);
|
|
971
|
+
send({ id, request }: Options$2): Promise<GetSourceResponse>;
|
|
942
972
|
}
|
|
943
973
|
type GetSourceResponsePayload = {
|
|
944
974
|
source: {
|
|
@@ -965,13 +995,13 @@ declare class GetSourceResponse {
|
|
|
965
995
|
* @see https://greatdetail.com
|
|
966
996
|
*/
|
|
967
997
|
|
|
968
|
-
interface Options$1
|
|
998
|
+
interface Options$1 {
|
|
969
999
|
request?: RequestInit;
|
|
970
1000
|
}
|
|
971
1001
|
declare class ListSources {
|
|
972
|
-
protected _transport:
|
|
973
|
-
constructor(_transport:
|
|
974
|
-
send({ request
|
|
1002
|
+
protected _transport: FetchTransport;
|
|
1003
|
+
constructor(_transport: FetchTransport);
|
|
1004
|
+
send({ request }?: Options$1): Promise<ListSourcesResponse>;
|
|
975
1005
|
}
|
|
976
1006
|
type ListSourcesResponsePayload = {
|
|
977
1007
|
sources: {
|
|
@@ -1003,7 +1033,7 @@ interface Options {
|
|
|
1003
1033
|
}
|
|
1004
1034
|
declare class Client {
|
|
1005
1035
|
static DEFAULT_BASE_URL: string;
|
|
1006
|
-
_transport:
|
|
1036
|
+
_transport: FetchTransport;
|
|
1007
1037
|
constructor(authentication: Authentication, { baseURL, ...options }?: Options);
|
|
1008
1038
|
static getBaseURL(): string;
|
|
1009
1039
|
get action(): {
|
|
@@ -1018,7 +1048,7 @@ declare class Client {
|
|
|
1018
1048
|
update: UpdateContact;
|
|
1019
1049
|
create: CreateContact;
|
|
1020
1050
|
vcf: {
|
|
1021
|
-
|
|
1051
|
+
get: GetContactVCFURL;
|
|
1022
1052
|
};
|
|
1023
1053
|
};
|
|
1024
1054
|
get conversation(): {
|
|
@@ -1061,4 +1091,4 @@ declare class Client {
|
|
|
1061
1091
|
};
|
|
1062
1092
|
}
|
|
1063
1093
|
|
|
1064
|
-
export { type Authentication as A, Client as C, type DeleteLabelResponsePayload as D, type GetContactResponsePayload as G, type ListActionsResponsePayload as L, type Options as O, type RequestFilterable as R, type
|
|
1094
|
+
export { type Authentication as A, Client as C, type DeleteLabelResponsePayload as D, type GetContactResponsePayload as G, type ListActionsResponsePayload as L, type Options as O, type RequestFilterable as R, type UpdateContactResponsePayload as U, type Options$r as a, type ListChannelsResponsePayload as b, type ListContactsResponsePayload as c, type ListLabelContactsResponsePayload as d, type CreateContactResponsePayload as e, type GetConversationResponsePayload as f, type ListConversationsResponsePayload as g, type ListLabelConversationsResponsePayload as h, type UpdateConversationResponsePayload as i, type CreateLabelResponsePayload as j, type GetLabelResponsePayload as k, type ListLabelsResponsePayload as l, type UpdateLabelResponsePayload as m, type ListConversationMessagesResponsePayload as n, type ListMessagesResponsePayload as o, type GetModelResponsePayload as p, type ListModelsResponsePayload as q, type CreateCorrectionResponsePayload as r, type CreateResponseResponsePayload as s, type GetSourceResponsePayload as t, type ListSourcesResponsePayload as u };
|