@great-detail/support-sdk 0.1.2 → 0.1.4
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-6W3IQ4KH.js +1 -0
- package/dist/{chunk-2RK4MX2V.js → chunk-ZZLBGP3J.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-BdOHDvcP.d.cts → index-DUbAUoWZ.d.cts} +101 -63
- package/dist/{index-BdOHDvcP.d.ts → index-DUbAUoWZ.d.ts} +101 -63
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/Action/ListActions.ts +1 -1
- package/src/Channel/ListChannels.ts +1 -1
- package/src/Client/index.ts +46 -42
- package/src/Contact/CreateContact.ts +3 -3
- package/src/Contact/GetContact.ts +1 -1
- package/src/Contact/ListContacts.ts +1 -1
- package/src/Contact/ListLabelContacts.ts +52 -0
- package/src/Contact/UpdateContact.ts +3 -3
- package/src/Conversation/GetConversation.ts +1 -1
- package/src/Conversation/ListConversations.ts +1 -1
- package/src/Conversation/UpdateConversation.ts +3 -3
- package/src/Label/CreateLabel.ts +3 -3
- package/src/Label/DeleteLabel.ts +1 -1
- package/src/Label/GetLabel.ts +1 -1
- package/src/Label/ListLabels.ts +1 -1
- package/src/Label/UpdateLabel.ts +3 -3
- package/src/Message/ListMessages.ts +1 -1
- package/src/Model/Correction/CreateCorrectionModel.ts +3 -3
- package/src/Model/GetModel.ts +1 -1
- package/src/Model/ListModels.ts +1 -1
- package/src/Model/Response/CreateResponseModel.ts +3 -3
- package/src/Source/GetSource.ts +1 -1
- package/src/Source/ListSources.ts +1 -1
- package/src/index.ts +1 -0
- package/dist/chunk-V75IMWOW.js +0 -1
|
@@ -21,7 +21,7 @@ interface RequestFilterable {
|
|
|
21
21
|
* @see https://greatdetail.com
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
interface Options$
|
|
24
|
+
interface Options$p {
|
|
25
25
|
requestFilterables: RequestFilterable[];
|
|
26
26
|
baseURL: string;
|
|
27
27
|
}
|
|
@@ -36,8 +36,8 @@ interface SendOptions {
|
|
|
36
36
|
fetch?: typeof fetch;
|
|
37
37
|
}
|
|
38
38
|
declare class Transport {
|
|
39
|
-
options: Options$
|
|
40
|
-
constructor({ baseURL, ...options }: Options$
|
|
39
|
+
options: Options$p;
|
|
40
|
+
constructor({ baseURL, ...options }: Options$p);
|
|
41
41
|
protected _filterRequest(request: RequestInit): Promise<RequestInit>;
|
|
42
42
|
send(url: string | URL, request: RequestInit, { fetch: fetchAlternative }?: SendOptions): Promise<Response>;
|
|
43
43
|
}
|
|
@@ -51,13 +51,13 @@ declare class Transport {
|
|
|
51
51
|
* @see https://greatdetail.com
|
|
52
52
|
*/
|
|
53
53
|
|
|
54
|
-
interface Options$
|
|
54
|
+
interface Options$o extends SendOptions {
|
|
55
55
|
request?: RequestInit;
|
|
56
56
|
}
|
|
57
|
-
declare class
|
|
57
|
+
declare class ListActions {
|
|
58
58
|
protected _transport: Transport;
|
|
59
59
|
constructor(_transport: Transport);
|
|
60
|
-
send({ request, ...options }?: Options$
|
|
60
|
+
send({ request, ...options }?: Options$o): Promise<ListActionsResponse>;
|
|
61
61
|
}
|
|
62
62
|
type ListActionsResponsePayload = {
|
|
63
63
|
actions: {
|
|
@@ -99,13 +99,13 @@ type Authentication = RequestFilterable;
|
|
|
99
99
|
* @see https://greatdetail.com
|
|
100
100
|
*/
|
|
101
101
|
|
|
102
|
-
interface Options$
|
|
102
|
+
interface Options$n extends SendOptions {
|
|
103
103
|
request?: RequestInit;
|
|
104
104
|
}
|
|
105
|
-
declare class
|
|
105
|
+
declare class ListChannels {
|
|
106
106
|
protected _transport: Transport;
|
|
107
107
|
constructor(_transport: Transport);
|
|
108
|
-
send({ request, ...options }?: Options$
|
|
108
|
+
send({ request, ...options }?: Options$n): Promise<ListChannelsResponse>;
|
|
109
109
|
}
|
|
110
110
|
type ListChannelsResponsePayload = {
|
|
111
111
|
channels: ({
|
|
@@ -146,11 +146,11 @@ declare class ListChannelsResponse {
|
|
|
146
146
|
* @see https://greatdetail.com
|
|
147
147
|
*/
|
|
148
148
|
|
|
149
|
-
interface Options$
|
|
150
|
-
body: z.infer<typeof
|
|
149
|
+
interface Options$m extends SendOptions {
|
|
150
|
+
body: z.infer<typeof CreateContact.SCHEMA>;
|
|
151
151
|
request?: RequestInit;
|
|
152
152
|
}
|
|
153
|
-
declare class
|
|
153
|
+
declare class CreateContact {
|
|
154
154
|
protected _transport: Transport;
|
|
155
155
|
static SCHEMA: z.ZodObject<{
|
|
156
156
|
name: z.ZodString;
|
|
@@ -169,7 +169,7 @@ declare class CreateContactRequest {
|
|
|
169
169
|
telephoneNumber?: string | undefined;
|
|
170
170
|
}>;
|
|
171
171
|
constructor(_transport: Transport);
|
|
172
|
-
send({ body, request, ...options }: Options$
|
|
172
|
+
send({ body, request, ...options }: Options$m): Promise<CreateContactResponse>;
|
|
173
173
|
}
|
|
174
174
|
type CreateContactResponsePayload = {
|
|
175
175
|
contact: {
|
|
@@ -197,14 +197,14 @@ declare class CreateContactResponse {
|
|
|
197
197
|
* @see https://greatdetail.com
|
|
198
198
|
*/
|
|
199
199
|
|
|
200
|
-
interface Options$
|
|
200
|
+
interface Options$l extends SendOptions {
|
|
201
201
|
id: string;
|
|
202
202
|
request?: RequestInit;
|
|
203
203
|
}
|
|
204
|
-
declare class
|
|
204
|
+
declare class GetContact {
|
|
205
205
|
protected _transport: Transport;
|
|
206
206
|
constructor(_transport: Transport);
|
|
207
|
-
send({ id, request, ...options }: Options$
|
|
207
|
+
send({ id, request, ...options }: Options$l): Promise<GetContactResponse>;
|
|
208
208
|
}
|
|
209
209
|
type GetContactResponsePayload = {
|
|
210
210
|
contact: {
|
|
@@ -232,13 +232,13 @@ declare class GetContactResponse {
|
|
|
232
232
|
* @see https://greatdetail.com
|
|
233
233
|
*/
|
|
234
234
|
|
|
235
|
-
interface Options$
|
|
235
|
+
interface Options$k extends SendOptions {
|
|
236
236
|
request?: RequestInit;
|
|
237
237
|
}
|
|
238
|
-
declare class
|
|
238
|
+
declare class ListContacts {
|
|
239
239
|
protected _transport: Transport;
|
|
240
240
|
constructor(_transport: Transport);
|
|
241
|
-
send({ request, ...options }?: Options$
|
|
241
|
+
send({ request, ...options }?: Options$k): Promise<ListContactsResponse>;
|
|
242
242
|
}
|
|
243
243
|
type ListContactsResponsePayload = {
|
|
244
244
|
contacts: {
|
|
@@ -257,6 +257,41 @@ declare class ListContactsResponse {
|
|
|
257
257
|
result(): Promise<ListContactsResponsePayload>;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Great Detail Support System.
|
|
262
|
+
*
|
|
263
|
+
* @copyright 2024 Great Detail Ltd
|
|
264
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
265
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
266
|
+
* @see https://greatdetail.com
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
interface Options$j extends SendOptions {
|
|
270
|
+
id: string;
|
|
271
|
+
request?: RequestInit;
|
|
272
|
+
}
|
|
273
|
+
declare class ListLabelContacts {
|
|
274
|
+
protected _transport: Transport;
|
|
275
|
+
constructor(_transport: Transport);
|
|
276
|
+
send({ id, request, ...options }: Options$j): Promise<ListLabelContactsResponse>;
|
|
277
|
+
}
|
|
278
|
+
type ListLabelContactsResponsePayload = {
|
|
279
|
+
contacts: {
|
|
280
|
+
id: string;
|
|
281
|
+
name?: string;
|
|
282
|
+
emailAddress?: string;
|
|
283
|
+
telephoneNumber?: string;
|
|
284
|
+
account: string;
|
|
285
|
+
createdAt: string;
|
|
286
|
+
updatedAt?: string;
|
|
287
|
+
}[];
|
|
288
|
+
};
|
|
289
|
+
declare class ListLabelContactsResponse {
|
|
290
|
+
response: Response;
|
|
291
|
+
constructor(response: Response);
|
|
292
|
+
result(): Promise<ListLabelContactsResponsePayload>;
|
|
293
|
+
}
|
|
294
|
+
|
|
260
295
|
/**
|
|
261
296
|
* Great Detail Support System.
|
|
262
297
|
*
|
|
@@ -268,10 +303,10 @@ declare class ListContactsResponse {
|
|
|
268
303
|
|
|
269
304
|
interface Options$i extends SendOptions {
|
|
270
305
|
id: string;
|
|
271
|
-
body: z.infer<typeof
|
|
306
|
+
body: z.infer<typeof UpdateContact.SCHEMA>;
|
|
272
307
|
request?: RequestInit;
|
|
273
308
|
}
|
|
274
|
-
declare class
|
|
309
|
+
declare class UpdateContact {
|
|
275
310
|
protected _transport: Transport;
|
|
276
311
|
static SCHEMA: z.ZodObject<{
|
|
277
312
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -319,7 +354,7 @@ interface Options$h extends SendOptions {
|
|
|
319
354
|
id: string;
|
|
320
355
|
request?: RequestInit;
|
|
321
356
|
}
|
|
322
|
-
declare class
|
|
357
|
+
declare class GetConversation {
|
|
323
358
|
protected _transport: Transport;
|
|
324
359
|
constructor(_transport: Transport);
|
|
325
360
|
send({ id, request, ...options }: Options$h): Promise<GetConversationResponse>;
|
|
@@ -353,7 +388,7 @@ declare class GetConversationResponse {
|
|
|
353
388
|
interface Options$g extends SendOptions {
|
|
354
389
|
request?: RequestInit;
|
|
355
390
|
}
|
|
356
|
-
declare class
|
|
391
|
+
declare class ListConversations {
|
|
357
392
|
protected _transport: Transport;
|
|
358
393
|
constructor(_transport: Transport);
|
|
359
394
|
send({ request, ...options }?: Options$g): Promise<ListConversationsResponse>;
|
|
@@ -421,10 +456,10 @@ declare class ListLabelConversationsResponse {
|
|
|
421
456
|
|
|
422
457
|
interface Options$e extends SendOptions {
|
|
423
458
|
id: string;
|
|
424
|
-
body: z.infer<typeof
|
|
459
|
+
body: z.infer<typeof UpdateConversation.SCHEMA>;
|
|
425
460
|
request?: RequestInit;
|
|
426
461
|
}
|
|
427
|
-
declare class
|
|
462
|
+
declare class UpdateConversation {
|
|
428
463
|
protected _transport: Transport;
|
|
429
464
|
static SCHEMA: z.ZodObject<{
|
|
430
465
|
hasEnded: z.ZodBoolean;
|
|
@@ -463,10 +498,10 @@ declare class UpdateConversationResponse {
|
|
|
463
498
|
*/
|
|
464
499
|
|
|
465
500
|
interface Options$d extends SendOptions {
|
|
466
|
-
body: z.infer<typeof
|
|
501
|
+
body: z.infer<typeof CreateLabel.SCHEMA>;
|
|
467
502
|
request?: RequestInit;
|
|
468
503
|
}
|
|
469
|
-
declare class
|
|
504
|
+
declare class CreateLabel {
|
|
470
505
|
protected _transport: Transport;
|
|
471
506
|
static SCHEMA: z.ZodObject<{
|
|
472
507
|
title: z.ZodString;
|
|
@@ -513,7 +548,7 @@ interface Options$c extends SendOptions {
|
|
|
513
548
|
id: string;
|
|
514
549
|
request?: RequestInit;
|
|
515
550
|
}
|
|
516
|
-
declare class
|
|
551
|
+
declare class DeleteLabel {
|
|
517
552
|
protected _transport: Transport;
|
|
518
553
|
constructor(_transport: Transport);
|
|
519
554
|
send({ id, request, ...options }: Options$c): Promise<DeleteLabelResponse>;
|
|
@@ -538,7 +573,7 @@ interface Options$b extends SendOptions {
|
|
|
538
573
|
id: string;
|
|
539
574
|
request?: RequestInit;
|
|
540
575
|
}
|
|
541
|
-
declare class
|
|
576
|
+
declare class GetLabel {
|
|
542
577
|
protected _transport: Transport;
|
|
543
578
|
constructor(_transport: Transport);
|
|
544
579
|
send({ id, request, ...options }: Options$b): Promise<GetLabelResponse>;
|
|
@@ -571,7 +606,7 @@ declare class GetLabelResponse {
|
|
|
571
606
|
interface Options$a extends SendOptions {
|
|
572
607
|
request?: RequestInit;
|
|
573
608
|
}
|
|
574
|
-
declare class
|
|
609
|
+
declare class ListLabels {
|
|
575
610
|
protected _transport: Transport;
|
|
576
611
|
constructor(_transport: Transport);
|
|
577
612
|
send({ request, ...options }?: Options$a): Promise<ListLabelsResponse>;
|
|
@@ -603,10 +638,10 @@ declare class ListLabelsResponse {
|
|
|
603
638
|
|
|
604
639
|
interface Options$9 extends SendOptions {
|
|
605
640
|
id: string;
|
|
606
|
-
body: z.infer<typeof
|
|
641
|
+
body: z.infer<typeof UpdateLabel.SCHEMA>;
|
|
607
642
|
request?: RequestInit;
|
|
608
643
|
}
|
|
609
|
-
declare class
|
|
644
|
+
declare class UpdateLabel {
|
|
610
645
|
protected _transport: Transport;
|
|
611
646
|
static SCHEMA: z.ZodObject<{
|
|
612
647
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -692,7 +727,7 @@ declare class ListConversationMessagesResponse {
|
|
|
692
727
|
interface Options$7 extends SendOptions {
|
|
693
728
|
request?: RequestInit;
|
|
694
729
|
}
|
|
695
|
-
declare class
|
|
730
|
+
declare class ListMessages {
|
|
696
731
|
protected _transport: Transport;
|
|
697
732
|
constructor(_transport: Transport);
|
|
698
733
|
send({ request, ...options }?: Options$7): Promise<ListMessagesResponse>;
|
|
@@ -733,10 +768,10 @@ declare class ListMessagesResponse {
|
|
|
733
768
|
|
|
734
769
|
interface Options$6 extends SendOptions {
|
|
735
770
|
id: string;
|
|
736
|
-
body: z.infer<typeof
|
|
771
|
+
body: z.infer<typeof CreateCorrectionModel.SCHEMA>;
|
|
737
772
|
request?: RequestInit;
|
|
738
773
|
}
|
|
739
|
-
declare class
|
|
774
|
+
declare class CreateCorrectionModel {
|
|
740
775
|
protected _transport: Transport;
|
|
741
776
|
static SCHEMA: z.ZodObject<{
|
|
742
777
|
input: z.ZodString;
|
|
@@ -774,7 +809,7 @@ interface Options$5 extends SendOptions {
|
|
|
774
809
|
id: string;
|
|
775
810
|
request?: RequestInit;
|
|
776
811
|
}
|
|
777
|
-
declare class
|
|
812
|
+
declare class GetModel {
|
|
778
813
|
protected _transport: Transport;
|
|
779
814
|
constructor(_transport: Transport);
|
|
780
815
|
send({ id, request, ...options }: Options$5): Promise<GetModelResponse>;
|
|
@@ -806,7 +841,7 @@ declare class GetModelResponse {
|
|
|
806
841
|
interface Options$4 extends SendOptions {
|
|
807
842
|
request?: RequestInit;
|
|
808
843
|
}
|
|
809
|
-
declare class
|
|
844
|
+
declare class ListModels {
|
|
810
845
|
protected _transport: Transport;
|
|
811
846
|
constructor(_transport: Transport);
|
|
812
847
|
send({ request, ...options }?: Options$4): Promise<ListModelsResponse>;
|
|
@@ -837,10 +872,10 @@ declare class ListModelsResponse {
|
|
|
837
872
|
|
|
838
873
|
interface Options$3 extends SendOptions {
|
|
839
874
|
id: string;
|
|
840
|
-
body: z.infer<typeof
|
|
875
|
+
body: z.infer<typeof CreateResponseModel.SCHEMA>;
|
|
841
876
|
request?: RequestInit;
|
|
842
877
|
}
|
|
843
|
-
declare class
|
|
878
|
+
declare class CreateResponseModel {
|
|
844
879
|
protected _transport: Transport;
|
|
845
880
|
static SCHEMA: z.ZodArray<z.ZodObject<{
|
|
846
881
|
role: z.ZodEnum<["user", "assistant"]>;
|
|
@@ -881,7 +916,7 @@ interface Options$2 extends SendOptions {
|
|
|
881
916
|
id: string;
|
|
882
917
|
request?: RequestInit;
|
|
883
918
|
}
|
|
884
|
-
declare class
|
|
919
|
+
declare class GetSource {
|
|
885
920
|
protected _transport: Transport;
|
|
886
921
|
constructor(_transport: Transport);
|
|
887
922
|
send({ id, request, ...options }: Options$2): Promise<GetSourceResponse>;
|
|
@@ -914,7 +949,7 @@ declare class GetSourceResponse {
|
|
|
914
949
|
interface Options$1 extends SendOptions {
|
|
915
950
|
request?: RequestInit;
|
|
916
951
|
}
|
|
917
|
-
declare class
|
|
952
|
+
declare class ListSources {
|
|
918
953
|
protected _transport: Transport;
|
|
919
954
|
constructor(_transport: Transport);
|
|
920
955
|
send({ request, ...options }?: Options$1): Promise<ListSourcesResponse>;
|
|
@@ -953,52 +988,55 @@ declare class Client {
|
|
|
953
988
|
constructor(authentication: Authentication, { baseURL, ...options }?: Options);
|
|
954
989
|
static getBaseURL(): string;
|
|
955
990
|
get action(): {
|
|
956
|
-
list:
|
|
991
|
+
list: ListActions;
|
|
957
992
|
};
|
|
958
993
|
get channel(): {
|
|
959
|
-
list:
|
|
994
|
+
list: ListChannels;
|
|
960
995
|
};
|
|
961
996
|
get contact(): {
|
|
962
|
-
get:
|
|
963
|
-
list:
|
|
964
|
-
update:
|
|
965
|
-
create:
|
|
997
|
+
get: GetContact;
|
|
998
|
+
list: ListContacts;
|
|
999
|
+
update: UpdateContact;
|
|
1000
|
+
create: CreateContact;
|
|
966
1001
|
};
|
|
967
1002
|
get conversation(): {
|
|
968
|
-
get:
|
|
969
|
-
list:
|
|
970
|
-
update:
|
|
1003
|
+
get: GetConversation;
|
|
1004
|
+
list: ListConversations;
|
|
1005
|
+
update: UpdateConversation;
|
|
971
1006
|
message: {
|
|
972
1007
|
list: ListConversationMessages;
|
|
973
1008
|
};
|
|
974
1009
|
};
|
|
975
1010
|
get label(): {
|
|
976
|
-
create:
|
|
977
|
-
get:
|
|
978
|
-
list:
|
|
979
|
-
update:
|
|
980
|
-
delete:
|
|
1011
|
+
create: CreateLabel;
|
|
1012
|
+
get: GetLabel;
|
|
1013
|
+
list: ListLabels;
|
|
1014
|
+
update: UpdateLabel;
|
|
1015
|
+
delete: DeleteLabel;
|
|
1016
|
+
contact: {
|
|
1017
|
+
list: ListLabelContacts;
|
|
1018
|
+
};
|
|
981
1019
|
conversation: {
|
|
982
1020
|
list: ListLabelConversations;
|
|
983
1021
|
};
|
|
984
1022
|
};
|
|
985
1023
|
get message(): {
|
|
986
|
-
list:
|
|
1024
|
+
list: ListMessages;
|
|
987
1025
|
};
|
|
988
1026
|
get model(): {
|
|
989
|
-
get:
|
|
990
|
-
list:
|
|
1027
|
+
get: GetModel;
|
|
1028
|
+
list: ListModels;
|
|
991
1029
|
response: {
|
|
992
|
-
create:
|
|
1030
|
+
create: CreateResponseModel;
|
|
993
1031
|
};
|
|
994
1032
|
correction: {
|
|
995
|
-
create:
|
|
1033
|
+
create: CreateCorrectionModel;
|
|
996
1034
|
};
|
|
997
1035
|
};
|
|
998
1036
|
get source(): {
|
|
999
|
-
get:
|
|
1000
|
-
list:
|
|
1037
|
+
get: GetSource;
|
|
1038
|
+
list: ListSources;
|
|
1001
1039
|
};
|
|
1002
1040
|
}
|
|
1003
1041
|
|
|
1004
|
-
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$
|
|
1042
|
+
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$p 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 };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var z=Object.defineProperty;var bt=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var xt=Object.prototype.hasOwnProperty;var At=(e,t)=>{for(var s in t)z(e,s,{get:t[s],enumerable:!0})},St=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Rt(t))!xt.call(e,r)&&r!==s&&z(e,r,{get:()=>t[r],enumerable:!(n=bt(t,r))||n.enumerable});return e};var Ot=e=>St(z({},"__esModule",{value:!0}),e);var Pt={};At(Pt,{Client:()=>p,DEFAULT_SUPPORT_BASE_URL:()=>G,KeyAuthentication:()=>M,PublicAuthentication:()=>H,TokenAuthentication:()=>D,default:()=>p});module.exports=Ot(Pt);var G="https://api.support.greatdetail.com",mt={"X-Powered-By":"GDSupport/JavaScript"},gt="api-key",yt="SUPPORT_ACCESS_TOKEN",ft="SUPPORT_API_KEY",ht="SUPPORT_KEY_NAME";var a=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/actions",{...t,method:"GET"},s).then(n=>new K(n))}},K=class{constructor(t){this.response=t}async result(){return this.response.json()}};var c=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/channels",{...t,method:"GET"},s).then(n=>new V(n))}},V=class{constructor(t){this.response=t}async result(){return this.response.json()}};var i=require("zod"),d=class e{constructor(t){this._transport=t}static SCHEMA=i.z.object({name:i.z.string(),account:i.z.string(),emailAddress:i.z.string().email().optional(),telephoneNumber:i.z.string().optional()});async send({body:t,request:s={},...n}){return this._transport.send("v1/contacts",{...s,method:"POST",headers:{...s.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(t))},n).then(r=>new B(r))}},B=class{constructor(t){this.response=t}async result(){return this.response.json()}};var u=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new J(r))}},J=class{constructor(t){this.response=t}async result(){return this.response.json()}};var l=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/contacts",{...t,method:"GET"},s).then(n=>new k(n))}},k=class{constructor(t){this.response=t}async result(){return this.response.json()}};var m=require("zod"),g=class e{constructor(t){this._transport=t}static SCHEMA=m.z.object({name:m.z.string().optional(),emailAddress:m.z.string().email().optional(),telephoneNumber:m.z.string().optional()});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...n,method:"PATCH",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new Y(o))}},Y=class{constructor(t){this.response=t}async result(){return this.response.json()}};var y=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new $(r))}},$=class{constructor(t){this.response=t}async result(){return this.response.json()}};var f=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/conversations",{...t,method:"GET"},s).then(n=>new W(n))}},W=class{constructor(t){this.response=t}async result(){return this.response.json()}};var h=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/labels/"+encodeURIComponent(t)+"/conversations",{...s,method:"GET"},n).then(r=>new X(r))}},X=class{constructor(t){this.response=t}async result(){return this.response.json()}};var Q=require("zod"),b=class e{constructor(t){this._transport=t}static SCHEMA=Q.z.object({hasEnded:Q.z.boolean()});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...n,method:"POST",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new Z(o))}},Z=class{constructor(t){this.response=t}async result(){return this.response.json()}};var R=require("zod"),x=class e{constructor(t){this._transport=t}static SCHEMA=R.z.object({title:R.z.string(),description:R.z.string().optional(),account:R.z.string()});async send({body:t,request:s={},...n}){return this._transport.send("v1/labels",{...s,method:"POST",headers:{...s.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(t))},n).then(r=>new tt(r))}},tt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var A=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...s,method:"DELETE"},n).then(r=>new et(r))}},et=class{constructor(t){this.response=t}async result(){return this.response.json()}};var S=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new st(r))}},st=class{constructor(t){this.response=t}async result(){return this.response.json()}};var O=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/labels",{...t,method:"GET"},s).then(n=>new nt(n))}},nt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var F=require("zod"),P=class e{constructor(t){this._transport=t}static SCHEMA=F.z.object({title:F.z.string().optional(),description:F.z.string().optional()});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...n,method:"PATCH",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new rt(o))}},rt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var C=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/messages",{...s,method:"GET"},n).then(r=>new ot(r))}},ot=class{constructor(t){this.response=t}async result(){return this.response.json()}};var _=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/messages",{...t,method:"GET"},s).then(n=>new it(n))}},it=class{constructor(t){this.response=t}async result(){return this.response.json()}};var T=require("zod"),E=class e{constructor(t){this._transport=t}static SCHEMA=T.z.object({input:T.z.string().max(65536),original:T.z.string().max(65536),correction:T.z.string().max(65536)});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/correction",{...n,method:"POST",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new pt(o))}},pt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var v=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/models/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new at(r))}},at=class{constructor(t){this.response=t}async result(){return this.response.json()}};var w=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/models",{...t,method:"GET"},s).then(n=>new ct(n))}},ct=class{constructor(t){this.response=t}async result(){return this.response.json()}};var q=require("zod"),L=class e{constructor(t){this._transport=t}static SCHEMA=q.z.array(q.z.object({role:q.z.enum(["user","assistant"]),content:q.z.string().max(65536).nullable()})).min(1);async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/response",{...n,method:"POST",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new dt(o))}},dt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var U=class e{constructor(t=e.STANDARD_HEADERS){this._standardHeaders=t}static STANDARD_HEADERS=mt;async filter(t){return{...t,headers:{...t.headers,...this._standardHeaders}}}};var I=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/sources/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new ut(r))}},ut=class{constructor(t){this.response=t}async result(){return this.response.json()}};var j=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/sources",{...t,method:"GET"},s).then(n=>new lt(n))}},lt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var N=class{options;constructor({baseURL:t,...s}){this.options={...s,baseURL:t}}async _filterRequest(t){for(let s of this.options.requestFilterables)t=await s.filter(t);return t}async send(t,s,{fetch:n=fetch}={}){return await n(new Request(new URL(t,this.options.baseURL),await this._filterRequest(s)))}};var p=class e{static DEFAULT_BASE_URL=G;_transport;constructor(t,{baseURL:s,...n}={}){this._transport=new N({requestFilterables:[new U,t],...n,baseURL:s?.toString()??e.getBaseURL()})}static getBaseURL(){return process.env.SUPPORT_BASE_URL??this.DEFAULT_BASE_URL}get action(){return{list:new a(this._transport)}}get channel(){return{list:new c(this._transport)}}get contact(){return{get:new u(this._transport),list:new l(this._transport),update:new g(this._transport),create:new d(this._transport)}}get conversation(){return{get:new y(this._transport),list:new f(this._transport),update:new b(this._transport),message:{list:new C(this._transport)}}}get label(){return{create:new x(this._transport),get:new S(this._transport),list:new O(this._transport),update:new P(this._transport),delete:new A(this._transport),conversation:{list:new h(this._transport)}}}get message(){return{list:new _(this._transport)}}get model(){return{get:new v(this._transport),list:new w(this._transport),response:{create:new L(this._transport)},correction:{create:new E(this._transport)}}}get source(){return{get:new I(this._transport),list:new j(this._transport)}}};var M=class e{static DEFAULT_NAME=gt;name;#t;constructor({name:t=process.env[ht]??e.DEFAULT_NAME,key:s=process.env[ft]}={}){if(!s)throw new Error("API Key option must be specified when using Key Authentication");this.name=t,this.#t=s}async filter(t){return{...t,headers:{...t.headers,Authorization:`Basic ${btoa(this.name+":"+this.#t)}`}}}};var D=class{#t;constructor({token:t=process.env[yt]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}async filter(t){return{...t,headers:{...t.headers,Authorization:`Bearer ${this.#t}`}}}};var H=class{async filter(t){return t}};0&&(module.exports={Client,DEFAULT_SUPPORT_BASE_URL,KeyAuthentication,PublicAuthentication,TokenAuthentication});
|
|
1
|
+
"use strict";var K=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var At=Object.getOwnPropertyNames;var St=Object.prototype.hasOwnProperty;var Ot=(e,t)=>{for(var s in t)K(e,s,{get:t[s],enumerable:!0})},Pt=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of At(t))!St.call(e,r)&&r!==s&&K(e,r,{get:()=>t[r],enumerable:!(n=Rt(t,r))||n.enumerable});return e};var Ct=e=>Pt(K({},"__esModule",{value:!0}),e);var _t={};Ot(_t,{Client:()=>p,DEFAULT_SUPPORT_BASE_URL:()=>F,KeyAuthentication:()=>D,PublicAuthentication:()=>G,TokenAuthentication:()=>H,default:()=>p});module.exports=Ct(_t);var F="https://api.support.greatdetail.com",yt={"X-Powered-By":"GDSupport/JavaScript"},ft="api-key",ht="SUPPORT_ACCESS_TOKEN",bt="SUPPORT_API_KEY",xt="SUPPORT_KEY_NAME";var a=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/actions",{...t,method:"GET"},s).then(n=>new V(n))}},V=class{constructor(t){this.response=t}async result(){return this.response.json()}};var c=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/channels",{...t,method:"GET"},s).then(n=>new B(n))}},B=class{constructor(t){this.response=t}async result(){return this.response.json()}};var i=require("zod"),d=class e{constructor(t){this._transport=t}static SCHEMA=i.z.object({name:i.z.string(),account:i.z.string(),emailAddress:i.z.string().email().optional(),telephoneNumber:i.z.string().optional()});async send({body:t,request:s={},...n}){return this._transport.send("v1/contacts",{...s,method:"POST",headers:{...s.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(t))},n).then(r=>new J(r))}},J=class{constructor(t){this.response=t}async result(){return this.response.json()}};var l=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new k(r))}},k=class{constructor(t){this.response=t}async result(){return this.response.json()}};var u=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/contacts",{...t,method:"GET"},s).then(n=>new Y(n))}},Y=class{constructor(t){this.response=t}async result(){return this.response.json()}};var m=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/labels/"+encodeURIComponent(t)+"/contacts",{...s,method:"GET"},n).then(r=>new $(r))}},$=class{constructor(t){this.response=t}async result(){return this.response.json()}};var g=require("zod"),y=class e{constructor(t){this._transport=t}static SCHEMA=g.z.object({name:g.z.string().optional(),emailAddress:g.z.string().email().optional(),telephoneNumber:g.z.string().optional()});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...n,method:"PATCH",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new W(o))}},W=class{constructor(t){this.response=t}async result(){return this.response.json()}};var f=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new X(r))}},X=class{constructor(t){this.response=t}async result(){return this.response.json()}};var h=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/conversations",{...t,method:"GET"},s).then(n=>new Q(n))}},Q=class{constructor(t){this.response=t}async result(){return this.response.json()}};var b=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/labels/"+encodeURIComponent(t)+"/conversations",{...s,method:"GET"},n).then(r=>new Z(r))}},Z=class{constructor(t){this.response=t}async result(){return this.response.json()}};var tt=require("zod"),x=class e{constructor(t){this._transport=t}static SCHEMA=tt.z.object({hasEnded:tt.z.boolean()});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...n,method:"POST",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new et(o))}},et=class{constructor(t){this.response=t}async result(){return this.response.json()}};var R=require("zod"),A=class e{constructor(t){this._transport=t}static SCHEMA=R.z.object({title:R.z.string(),description:R.z.string().optional(),account:R.z.string()});async send({body:t,request:s={},...n}){return this._transport.send("v1/labels",{...s,method:"POST",headers:{...s.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(t))},n).then(r=>new st(r))}},st=class{constructor(t){this.response=t}async result(){return this.response.json()}};var S=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...s,method:"DELETE"},n).then(r=>new nt(r))}},nt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var O=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new rt(r))}},rt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var P=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/labels",{...t,method:"GET"},s).then(n=>new ot(n))}},ot=class{constructor(t){this.response=t}async result(){return this.response.json()}};var z=require("zod"),C=class e{constructor(t){this._transport=t}static SCHEMA=z.z.object({title:z.z.string().optional(),description:z.z.string().optional()});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...n,method:"PATCH",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new it(o))}},it=class{constructor(t){this.response=t}async result(){return this.response.json()}};var _=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/messages",{...s,method:"GET"},n).then(r=>new pt(r))}},pt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var T=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/messages",{...t,method:"GET"},s).then(n=>new at(n))}},at=class{constructor(t){this.response=t}async result(){return this.response.json()}};var E=require("zod"),v=class e{constructor(t){this._transport=t}static SCHEMA=E.z.object({input:E.z.string().max(65536),original:E.z.string().max(65536),correction:E.z.string().max(65536)});async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/correction",{...n,method:"POST",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new ct(o))}},ct=class{constructor(t){this.response=t}async result(){return this.response.json()}};var w=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/models/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new dt(r))}},dt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var L=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/models",{...t,method:"GET"},s).then(n=>new lt(n))}},lt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var U=require("zod"),I=class e{constructor(t){this._transport=t}static SCHEMA=U.z.array(U.z.object({role:U.z.enum(["user","assistant"]),content:U.z.string().max(65536).nullable()})).min(1);async send({id:t,body:s,request:n={},...r}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/response",{...n,method:"POST",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify(e.SCHEMA.parse(s))},r).then(o=>new ut(o))}},ut=class{constructor(t){this.response=t}async result(){return this.response.json()}};var q=class e{constructor(t=e.STANDARD_HEADERS){this._standardHeaders=t}static STANDARD_HEADERS=yt;async filter(t){return{...t,headers:{...t.headers,...this._standardHeaders}}}};var j=class{constructor(t){this._transport=t}async send({id:t,request:s={},...n}){return this._transport.send("v1/sources/"+encodeURIComponent(t),{...s,method:"GET"},n).then(r=>new mt(r))}},mt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var N=class{constructor(t){this._transport=t}async send({request:t={},...s}={}){return this._transport.send("v1/sources",{...t,method:"GET"},s).then(n=>new gt(n))}},gt=class{constructor(t){this.response=t}async result(){return this.response.json()}};var M=class{options;constructor({baseURL:t,...s}){this.options={...s,baseURL:t}}async _filterRequest(t){for(let s of this.options.requestFilterables)t=await s.filter(t);return t}async send(t,s,{fetch:n=fetch}={}){return await n(new Request(new URL(t,this.options.baseURL),await this._filterRequest(s)))}};var p=class e{static DEFAULT_BASE_URL=F;_transport;constructor(t,{baseURL:s,...n}={}){this._transport=new M({requestFilterables:[new q,t],...n,baseURL:s?.toString()??e.getBaseURL()})}static getBaseURL(){return process.env.SUPPORT_BASE_URL??this.DEFAULT_BASE_URL}get action(){return{list:new a(this._transport)}}get channel(){return{list:new c(this._transport)}}get contact(){return{get:new l(this._transport),list:new u(this._transport),update:new y(this._transport),create:new d(this._transport)}}get conversation(){return{get:new f(this._transport),list:new h(this._transport),update:new x(this._transport),message:{list:new _(this._transport)}}}get label(){return{create:new A(this._transport),get:new O(this._transport),list:new P(this._transport),update:new C(this._transport),delete:new S(this._transport),contact:{list:new m(this._transport)},conversation:{list:new b(this._transport)}}}get message(){return{list:new T(this._transport)}}get model(){return{get:new w(this._transport),list:new L(this._transport),response:{create:new I(this._transport)},correction:{create:new v(this._transport)}}}get source(){return{get:new j(this._transport),list:new N(this._transport)}}};var D=class e{static DEFAULT_NAME=ft;name;#t;constructor({name:t=process.env[xt]??e.DEFAULT_NAME,key:s=process.env[bt]}={}){if(!s)throw new Error("API Key option must be specified when using Key Authentication");this.name=t,this.#t=s}async filter(t){return{...t,headers:{...t.headers,Authorization:`Basic ${btoa(this.name+":"+this.#t)}`}}}};var H=class{#t;constructor({token:t=process.env[ht]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}async filter(t){return{...t,headers:{...t.headers,Authorization:`Bearer ${this.#t}`}}}};var G=class{async filter(t){return t}};0&&(module.exports={Client,DEFAULT_SUPPORT_BASE_URL,KeyAuthentication,PublicAuthentication,TokenAuthentication});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Authentication } from './index-
|
|
2
|
-
export { C as Client,
|
|
1
|
+
import { A as Authentication } from './index-DUbAUoWZ.cjs';
|
|
2
|
+
export { C as Client, e as CreateContactResponsePayload, r as CreateCorrectionResponsePayload, j as CreateLabelResponsePayload, s as CreateResponseResponsePayload, D as DeleteLabelResponsePayload, G as GetContactResponsePayload, f as GetConversationResponsePayload, k as GetLabelResponsePayload, p as GetModelResponsePayload, t as GetSourceResponsePayload, L as ListActionsResponsePayload, b as ListChannelsResponsePayload, c as ListContactsResponsePayload, n as ListConversationMessagesResponsePayload, g as ListConversationsResponsePayload, d as ListLabelContactsResponsePayload, h as ListLabelConversationsResponsePayload, l as ListLabelsResponsePayload, o as ListMessagesResponsePayload, q as ListModelsResponsePayload, u as ListSourcesResponsePayload, O as Options, R as RequestFilterable, a as TransportOptions, S as TransportSendOptions, U as UpdateContactResponsePayload, i as UpdateConversationResponsePayload, m as UpdateLabelResponsePayload, C as default } from './index-DUbAUoWZ.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Authentication } from './index-
|
|
2
|
-
export { C as Client,
|
|
1
|
+
import { A as Authentication } from './index-DUbAUoWZ.js';
|
|
2
|
+
export { C as Client, e as CreateContactResponsePayload, r as CreateCorrectionResponsePayload, j as CreateLabelResponsePayload, s as CreateResponseResponsePayload, D as DeleteLabelResponsePayload, G as GetContactResponsePayload, f as GetConversationResponsePayload, k as GetLabelResponsePayload, p as GetModelResponsePayload, t as GetSourceResponsePayload, L as ListActionsResponsePayload, b as ListChannelsResponsePayload, c as ListContactsResponsePayload, n as ListConversationMessagesResponsePayload, g as ListConversationsResponsePayload, d as ListLabelContactsResponsePayload, h as ListLabelConversationsResponsePayload, l as ListLabelsResponsePayload, o as ListMessagesResponsePayload, q as ListModelsResponsePayload, u as ListSourcesResponsePayload, O as Options, R as RequestFilterable, a as TransportOptions, S as TransportSendOptions, U as UpdateContactResponsePayload, i as UpdateConversationResponsePayload, m as UpdateLabelResponsePayload, C as default } from './index-DUbAUoWZ.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y,b as a,c as p,d as n,e as i,f as l,g as f}from"./chunk-
|
|
1
|
+
import{a as y,b as a,c as p,d as n,e as i,f as l,g as f}from"./chunk-6W3IQ4KH.js";var t=class s{static DEFAULT_NAME=a;name;#e;constructor({name:e=process.env[i]??s.DEFAULT_NAME,key:r=process.env[n]}={}){if(!r)throw new Error("API Key option must be specified when using Key Authentication");this.name=e,this.#e=r}async filter(e){return{...e,headers:{...e.headers,Authorization:`Basic ${btoa(this.name+":"+this.#e)}`}}}};var o=class{#e;constructor({token:e=process.env[p]}={}){if(!e)throw new Error("Access Token option must be specified when using Token Authentication");this.#e=e}async filter(e){return{...e,headers:{...e.headers,Authorization:`Bearer ${this.#e}`}}}};export{l as Client,y as DEFAULT_SUPPORT_BASE_URL,t as KeyAuthentication,f as PublicAuthentication,o as TokenAuthentication,l as default};
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ export interface Options extends SendOptions {
|
|
|
13
13
|
request?: RequestInit;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export default class
|
|
16
|
+
export default class ListActions {
|
|
17
17
|
constructor(protected _transport: Transport) {}
|
|
18
18
|
|
|
19
19
|
public async send({ request = {}, ...options }: Options = {}) {
|
|
@@ -13,7 +13,7 @@ export interface Options extends SendOptions {
|
|
|
13
13
|
request?: RequestInit;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export default class
|
|
16
|
+
export default class ListChannels {
|
|
17
17
|
constructor(protected _transport: Transport) {}
|
|
18
18
|
|
|
19
19
|
public async send({ request = {}, ...options }: Options = {}) {
|