@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.
Files changed (63) hide show
  1. package/dist/chunk-IXJNWCJL.js +1 -0
  2. package/dist/{chunk-PTKKI5PQ.js → chunk-SRYAEALQ.js} +1 -1
  3. package/dist/cli/index.cjs +1 -1
  4. package/dist/cli/index.d.cts +1 -1
  5. package/dist/cli/index.d.ts +1 -1
  6. package/dist/cli/index.js +1 -1
  7. package/dist/cli.cjs +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/{index-Dm8jdpkD.d.cts → index-Dj17QRj0.d.cts} +141 -111
  10. package/dist/{index-Dm8jdpkD.d.ts → index-Dj17QRj0.d.ts} +141 -111
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.d.cts +63 -6
  13. package/dist/index.d.ts +63 -6
  14. package/dist/index.js +1 -1
  15. package/package.json +2 -1
  16. package/src/Action/ListActions.ts +8 -12
  17. package/src/Authentication/KeyAuthentication.ts +10 -11
  18. package/src/Authentication/PublicAuthentication.ts +8 -2
  19. package/src/Authentication/TokenAuthentication.ts +9 -7
  20. package/src/Channel/ListChannels.ts +8 -12
  21. package/src/Client/index.ts +6 -5
  22. package/src/Contact/ContactVCF/GetContactVCF.ts +24 -5
  23. package/src/Contact/CreateContact.ts +12 -16
  24. package/src/Contact/GetContact.ts +8 -12
  25. package/src/Contact/ListContacts.ts +8 -12
  26. package/src/Contact/ListLabelContacts.ts +8 -12
  27. package/src/Contact/UpdateContact.ts +12 -16
  28. package/src/Conversation/GetConversation.ts +8 -12
  29. package/src/Conversation/ListConversations.ts +8 -12
  30. package/src/Conversation/ListLabelConversations.ts +8 -12
  31. package/src/Conversation/UpdateConversation.ts +12 -16
  32. package/src/Error/AuthError.ts +12 -0
  33. package/src/Error/AuthenticationError.ts +16 -0
  34. package/src/Error/AuthorizationError.ts +16 -0
  35. package/src/Error/LogicError.ts +20 -0
  36. package/src/Error/NetworkError.ts +12 -0
  37. package/src/Error/SupportError.ts +10 -0
  38. package/src/Error/ValidationError.ts +16 -0
  39. package/src/Error/index.ts +11 -0
  40. package/src/Label/CreateLabel.ts +12 -16
  41. package/src/Label/DeleteLabel.ts +8 -12
  42. package/src/Label/GetLabel.ts +8 -12
  43. package/src/Label/ListLabels.ts +8 -12
  44. package/src/Label/UpdateLabel.ts +12 -16
  45. package/src/Message/ListConversationMessages.ts +8 -12
  46. package/src/Message/ListMessages.ts +8 -12
  47. package/src/Model/Correction/CreateCorrectionModel.ts +12 -16
  48. package/src/Model/GetModel.ts +8 -12
  49. package/src/Model/ListModels.ts +8 -12
  50. package/src/Model/Response/CreateResponseModel.ts +12 -16
  51. package/src/Request/RequestFilterable.ts +5 -1
  52. package/src/Request/RequestStandardHeaders.ts +6 -6
  53. package/src/Source/GetSource.ts +8 -12
  54. package/src/Source/ListSources.ts +8 -12
  55. package/src/Transport/FetchTransport.ts +112 -0
  56. package/src/Transport/index.ts +2 -44
  57. package/src/__tests__/Client/Client.test.ts +38 -0
  58. package/src/constants/environment.ts +36 -0
  59. package/src/constants/index.ts +0 -21
  60. package/src/index.ts +4 -4
  61. package/dist/chunk-2LKRKCHH.js +0 -1
  62. package/src/__tests__/Authentication/KeyAuthentication.test.ts +0 -79
  63. 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
- filter(request: RequestInit): Promise<RequestInit>;
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$q {
30
+ interface Options$r {
25
31
  requestFilterables: RequestFilterable[];
26
- baseURL: string;
27
32
  }
28
- interface SendOptions {
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
- declare class Transport {
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 }: Options$q);
41
- protected _filterRequest(request: RequestInit): Promise<RequestInit>;
42
- getURL(url: string | URL): URL;
43
- send(url: string | URL, request: RequestInit, { fetch: fetchAlternative }?: SendOptions): Promise<Response>;
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 extends SendOptions {
78
+ interface Options$p {
56
79
  request?: RequestInit;
57
80
  }
58
81
  declare class ListActions {
59
- protected _transport: Transport;
60
- constructor(_transport: Transport);
61
- send({ request, ...options }?: Options$p): Promise<ListActionsResponse>;
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 extends SendOptions {
126
+ interface Options$o {
104
127
  request?: RequestInit;
105
128
  }
106
129
  declare class ListChannels {
107
- protected _transport: Transport;
108
- constructor(_transport: Transport);
109
- send({ request, ...options }?: Options$o): Promise<ListChannelsResponse>;
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: Transport;
155
- constructor(_transport: Transport);
156
- send({ id }: Options$n): Promise<URL>;
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 extends SendOptions {
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: 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: Transport);
191
- send({ body, request, ...options }: Options$m): Promise<CreateContactResponse>;
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 extends SendOptions {
249
+ interface Options$l {
220
250
  id: string;
221
251
  request?: RequestInit;
222
252
  }
223
253
  declare class GetContact {
224
- protected _transport: Transport;
225
- constructor(_transport: Transport);
226
- send({ id, request, ...options }: Options$l): Promise<GetContactResponse>;
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 extends SendOptions {
284
+ interface Options$k {
255
285
  request?: RequestInit;
256
286
  }
257
287
  declare class ListContacts {
258
- protected _transport: Transport;
259
- constructor(_transport: Transport);
260
- send({ request, ...options }?: Options$k): Promise<ListContactsResponse>;
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 extends SendOptions {
318
+ interface Options$j {
289
319
  id: string;
290
320
  request?: RequestInit;
291
321
  }
292
322
  declare class ListLabelContacts {
293
- protected _transport: Transport;
294
- constructor(_transport: Transport);
295
- send({ id, request, ...options }: Options$j): Promise<ListLabelContactsResponse>;
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 extends SendOptions {
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: 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: Transport);
344
- send({ id, body, request, ...options }: Options$i): Promise<UpdateContactResponse>;
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 extends SendOptions {
402
+ interface Options$h {
373
403
  id: string;
374
404
  request?: RequestInit;
375
405
  }
376
406
  declare class GetConversation {
377
- protected _transport: Transport;
378
- constructor(_transport: Transport);
379
- send({ id, request, ...options }: Options$h): Promise<GetConversationResponse>;
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 extends SendOptions {
437
+ interface Options$g {
408
438
  request?: RequestInit;
409
439
  }
410
440
  declare class ListConversations {
411
- protected _transport: Transport;
412
- constructor(_transport: Transport);
413
- send({ request, ...options }?: Options$g): Promise<ListConversationsResponse>;
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 extends SendOptions {
471
+ interface Options$f {
442
472
  id: string;
443
473
  request?: RequestInit;
444
474
  }
445
475
  declare class ListLabelConversations {
446
- protected _transport: Transport;
447
- constructor(_transport: Transport);
448
- send({ id, request, ...options }: Options$f): Promise<ListLabelConversationsResponse>;
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 extends SendOptions {
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: 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: Transport);
491
- send({ id, body, request, ...options }: Options$e): Promise<UpdateConversationResponse>;
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 extends SendOptions {
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: 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: Transport);
539
- send({ body, request, ...options }: Options$d): Promise<CreateLabelResponse>;
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 extends SendOptions {
596
+ interface Options$c {
567
597
  id: string;
568
598
  request?: RequestInit;
569
599
  }
570
600
  declare class DeleteLabel {
571
- protected _transport: Transport;
572
- constructor(_transport: Transport);
573
- send({ id, request, ...options }: Options$c): Promise<DeleteLabelResponse>;
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 extends SendOptions {
621
+ interface Options$b {
592
622
  id: string;
593
623
  request?: RequestInit;
594
624
  }
595
625
  declare class GetLabel {
596
- protected _transport: Transport;
597
- constructor(_transport: Transport);
598
- send({ id, request, ...options }: Options$b): Promise<GetLabelResponse>;
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 extends SendOptions {
655
+ interface Options$a {
626
656
  request?: RequestInit;
627
657
  }
628
658
  declare class ListLabels {
629
- protected _transport: Transport;
630
- constructor(_transport: Transport);
631
- send({ request, ...options }?: Options$a): Promise<ListLabelsResponse>;
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 extends SendOptions {
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: 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: Transport);
676
- send({ id, body, request, ...options }: Options$9): Promise<UpdateLabelResponse>;
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 extends SendOptions {
733
+ interface Options$8 {
704
734
  id: string;
705
735
  request?: RequestInit;
706
736
  }
707
737
  declare class ListConversationMessages {
708
- protected _transport: Transport;
709
- constructor(_transport: Transport);
710
- send({ id, request, ...options }: Options$8): Promise<ListConversationMessagesResponse>;
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 extends SendOptions {
776
+ interface Options$7 {
747
777
  request?: RequestInit;
748
778
  }
749
779
  declare class ListMessages {
750
- protected _transport: Transport;
751
- constructor(_transport: Transport);
752
- send({ request, ...options }?: Options$7): Promise<ListMessagesResponse>;
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 extends SendOptions {
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: 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: Transport);
809
- send({ id, body, request, ...options }: Options$6): Promise<CreateCorrectionModelResponse>;
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 extends SendOptions {
857
+ interface Options$5 {
828
858
  id: string;
829
859
  request?: RequestInit;
830
860
  }
831
861
  declare class GetModel {
832
- protected _transport: Transport;
833
- constructor(_transport: Transport);
834
- send({ id, request, ...options }: Options$5): Promise<GetModelResponse>;
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 extends SendOptions {
890
+ interface Options$4 {
861
891
  request?: RequestInit;
862
892
  }
863
893
  declare class ListModels {
864
- protected _transport: Transport;
865
- constructor(_transport: Transport);
866
- send({ request, ...options }?: Options$4): Promise<ListModelsResponse>;
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 extends SendOptions {
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: 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: Transport);
910
- send({ id, body, request, ...options }: Options$3): Promise<CreateResponseModelResponse>;
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 extends SendOptions {
964
+ interface Options$2 {
935
965
  id: string;
936
966
  request?: RequestInit;
937
967
  }
938
968
  declare class GetSource {
939
- protected _transport: Transport;
940
- constructor(_transport: Transport);
941
- send({ id, request, ...options }: Options$2): Promise<GetSourceResponse>;
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 extends SendOptions {
998
+ interface Options$1 {
969
999
  request?: RequestInit;
970
1000
  }
971
1001
  declare class ListSources {
972
- protected _transport: Transport;
973
- constructor(_transport: Transport);
974
- send({ request, ...options }?: Options$1): Promise<ListSourcesResponse>;
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: 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
- getURL: GetContactVCFURL;
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 SendOptions as S, type UpdateContactResponsePayload as U, type Options$q 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 };
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 };