@great-detail/support-sdk 0.7.2 → 0.7.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-AIPFHQNB.js +1 -0
- package/dist/{chunk-TGF4KRMR.js → chunk-PJP2MKIR.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-CzSzQtiU.d.cts → index-D-OqS58j.d.cts} +126 -42
- package/dist/{index-CzSzQtiU.d.ts → index-D-OqS58j.d.ts} +126 -42
- 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/dist/chunk-YT5DKYBN.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ky from 'ky';
|
|
2
|
-
import { KyInstance, Options as Options$
|
|
2
|
+
import { KyInstance, Options as Options$X } from 'ky';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -29,28 +29,28 @@ interface RequestFilterable {
|
|
|
29
29
|
* @see https://greatdetail.com
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
interface Options$
|
|
32
|
+
interface Options$W {
|
|
33
33
|
requestFilterables: RequestFilterable[];
|
|
34
34
|
}
|
|
35
35
|
interface Transport {
|
|
36
36
|
getURL(url: string): string;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
interface InputOptions extends Options$
|
|
39
|
+
interface InputOptions extends Options$W {
|
|
40
40
|
baseURL: string;
|
|
41
41
|
}
|
|
42
|
-
interface Options$
|
|
42
|
+
interface Options$V extends Options$W {
|
|
43
43
|
baseURL: string;
|
|
44
44
|
}
|
|
45
45
|
declare class FetchTransport implements Transport {
|
|
46
46
|
client: KyInstance;
|
|
47
|
-
options: Options$
|
|
47
|
+
options: Options$V;
|
|
48
48
|
constructor({ baseURL, ...options }: InputOptions);
|
|
49
49
|
getURL(url: string): string;
|
|
50
|
-
send<T = unknown>(url: string, request: Options$
|
|
50
|
+
send<T = unknown>(url: string, request: Options$X): Promise<ky.KyResponse<T>>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
interface Options$
|
|
53
|
+
interface Options$U {
|
|
54
54
|
request?: RequestInit;
|
|
55
55
|
}
|
|
56
56
|
type ListActionsResponse = {
|
|
@@ -72,7 +72,7 @@ type ListActionsResponse = {
|
|
|
72
72
|
declare class ListActions {
|
|
73
73
|
protected _transport: FetchTransport;
|
|
74
74
|
constructor(_transport: FetchTransport);
|
|
75
|
-
send({ request }?: Options$
|
|
75
|
+
send({ request }?: Options$U): Promise<ky.KyResponse<ListActionsResponse>>;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -86,7 +86,7 @@ declare class ListActions {
|
|
|
86
86
|
|
|
87
87
|
type Authentication = RequestFilterable;
|
|
88
88
|
|
|
89
|
-
interface Options$
|
|
89
|
+
interface Options$T {
|
|
90
90
|
body: z.infer<typeof CreateBoilerplate.SCHEMA>;
|
|
91
91
|
request?: RequestInit;
|
|
92
92
|
}
|
|
@@ -121,10 +121,10 @@ declare class CreateBoilerplate {
|
|
|
121
121
|
boilerplateCategory: string;
|
|
122
122
|
}>;
|
|
123
123
|
constructor(_transport: FetchTransport);
|
|
124
|
-
send({ body, request }: Options$
|
|
124
|
+
send({ body, request }: Options$T): Promise<ky.KyResponse<CreateBoilerplateResponse>>;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
interface Options$
|
|
127
|
+
interface Options$S {
|
|
128
128
|
id: string;
|
|
129
129
|
request?: RequestInit;
|
|
130
130
|
}
|
|
@@ -144,10 +144,10 @@ type GetBoilerplateResponse = {
|
|
|
144
144
|
declare class GetBoilerplate {
|
|
145
145
|
protected _transport: FetchTransport;
|
|
146
146
|
constructor(_transport: FetchTransport);
|
|
147
|
-
send({ id, request }: Options$
|
|
147
|
+
send({ id, request }: Options$S): Promise<ky.KyResponse<GetBoilerplateResponse>>;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
interface Options$
|
|
150
|
+
interface Options$R {
|
|
151
151
|
id: string;
|
|
152
152
|
request?: RequestInit;
|
|
153
153
|
}
|
|
@@ -167,10 +167,10 @@ type ListBoilerplateCategoryBoilerplatesResponse = {
|
|
|
167
167
|
declare class ListBoilerplateCategoryBoilerplates {
|
|
168
168
|
protected _transport: FetchTransport;
|
|
169
169
|
constructor(_transport: FetchTransport);
|
|
170
|
-
send({ id, request }: Options$
|
|
170
|
+
send({ id, request }: Options$R): Promise<ky.KyResponse<ListBoilerplateCategoryBoilerplatesResponse>>;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
interface Options$
|
|
173
|
+
interface Options$Q {
|
|
174
174
|
query?: string;
|
|
175
175
|
request?: RequestInit;
|
|
176
176
|
}
|
|
@@ -190,10 +190,10 @@ type ListBoilerplatesResponse = {
|
|
|
190
190
|
declare class ListBoilerplates {
|
|
191
191
|
protected _transport: FetchTransport;
|
|
192
192
|
constructor(_transport: FetchTransport);
|
|
193
|
-
send({ query, request }?: Options$
|
|
193
|
+
send({ query, request }?: Options$Q): Promise<ky.KyResponse<ListBoilerplatesResponse>>;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
interface Options$
|
|
196
|
+
interface Options$P {
|
|
197
197
|
id: string;
|
|
198
198
|
body: z.infer<typeof UpdateBoilerplate.SCHEMA>;
|
|
199
199
|
request?: RequestInit;
|
|
@@ -224,10 +224,10 @@ declare class UpdateBoilerplate {
|
|
|
224
224
|
content?: string | undefined;
|
|
225
225
|
}>;
|
|
226
226
|
constructor(_transport: FetchTransport);
|
|
227
|
-
send({ id, body, request }: Options$
|
|
227
|
+
send({ id, body, request }: Options$P): Promise<ky.KyResponse<UpdateBoilerplateResponse>>;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
interface Options$
|
|
230
|
+
interface Options$O {
|
|
231
231
|
body: z.infer<typeof CreateBoilerplateCategory.SCHEMA>;
|
|
232
232
|
request?: RequestInit;
|
|
233
233
|
}
|
|
@@ -259,10 +259,10 @@ declare class CreateBoilerplateCategory {
|
|
|
259
259
|
description?: string | undefined;
|
|
260
260
|
}>;
|
|
261
261
|
constructor(_transport: FetchTransport);
|
|
262
|
-
send({ body, request }: Options$
|
|
262
|
+
send({ body, request }: Options$O): Promise<ky.KyResponse<CreateBoilerplateCategoryResponse>>;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
interface Options$
|
|
265
|
+
interface Options$N {
|
|
266
266
|
id: string;
|
|
267
267
|
request?: RequestInit;
|
|
268
268
|
}
|
|
@@ -281,17 +281,17 @@ type GetBoilerplateCategoryResponse = {
|
|
|
281
281
|
declare class GetBoilerplateCategory {
|
|
282
282
|
protected _transport: FetchTransport;
|
|
283
283
|
constructor(_transport: FetchTransport);
|
|
284
|
-
send({ id, request }: Options$
|
|
284
|
+
send({ id, request }: Options$N): Promise<ky.KyResponse<GetBoilerplateCategoryResponse>>;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
interface IncludeOptions$
|
|
287
|
+
interface IncludeOptions$4 {
|
|
288
288
|
boilerplateCount?: boolean;
|
|
289
289
|
}
|
|
290
|
-
interface Options$
|
|
290
|
+
interface Options$M<C extends IncludeOptions$4> {
|
|
291
291
|
include?: C;
|
|
292
292
|
request?: RequestInit;
|
|
293
293
|
}
|
|
294
|
-
type ListBoilerplateCategoriesResponse<C extends IncludeOptions$
|
|
294
|
+
type ListBoilerplateCategoriesResponse<C extends IncludeOptions$4> = {
|
|
295
295
|
data: {
|
|
296
296
|
boilerplateCategory: {
|
|
297
297
|
id: string;
|
|
@@ -309,10 +309,10 @@ type ListBoilerplateCategoriesResponse<C extends IncludeOptions$3> = {
|
|
|
309
309
|
declare class ListBoilerplateCategories {
|
|
310
310
|
protected _transport: FetchTransport;
|
|
311
311
|
constructor(_transport: FetchTransport);
|
|
312
|
-
send<C extends IncludeOptions$
|
|
312
|
+
send<C extends IncludeOptions$4>({ include, request, }?: Options$M<C>): Promise<ky.KyResponse<ListBoilerplateCategoriesResponse<C>>>;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
interface Options$
|
|
315
|
+
interface Options$L {
|
|
316
316
|
id: string;
|
|
317
317
|
body: z.infer<typeof UpdateBoilerplateCategory.SCHEMA>;
|
|
318
318
|
request?: RequestInit;
|
|
@@ -342,10 +342,10 @@ declare class UpdateBoilerplateCategory {
|
|
|
342
342
|
description?: string | undefined;
|
|
343
343
|
}>;
|
|
344
344
|
constructor(_transport: FetchTransport);
|
|
345
|
-
send({ id, body, request }: Options$
|
|
345
|
+
send({ id, body, request }: Options$L): Promise<ky.KyResponse<UpdateBoilerplateCategoryResponse>>;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
interface Options$
|
|
348
|
+
interface Options$K {
|
|
349
349
|
body: z.infer<typeof CreateChannel.SCHEMA>;
|
|
350
350
|
request?: RequestInit;
|
|
351
351
|
}
|
|
@@ -442,10 +442,10 @@ declare class CreateChannel {
|
|
|
442
442
|
};
|
|
443
443
|
}>]>>;
|
|
444
444
|
constructor(_transport: FetchTransport);
|
|
445
|
-
send({ body, request }: Options$
|
|
445
|
+
send({ body, request }: Options$K): Promise<ky.KyResponse<CreateChannelResponse>>;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
interface Options$
|
|
448
|
+
interface Options$J {
|
|
449
449
|
id: string;
|
|
450
450
|
request?: RequestInit;
|
|
451
451
|
}
|
|
@@ -487,10 +487,10 @@ type GetChannelResponse = {
|
|
|
487
487
|
declare class GetChannel {
|
|
488
488
|
protected _transport: FetchTransport;
|
|
489
489
|
constructor(_transport: FetchTransport);
|
|
490
|
-
send({ id, request }: Options$
|
|
490
|
+
send({ id, request }: Options$J): Promise<ky.KyResponse<GetChannelResponse>>;
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
-
interface Options$
|
|
493
|
+
interface Options$I {
|
|
494
494
|
request?: RequestInit;
|
|
495
495
|
}
|
|
496
496
|
type ListChannelsResponse = {
|
|
@@ -531,7 +531,51 @@ type ListChannelsResponse = {
|
|
|
531
531
|
declare class ListChannels {
|
|
532
532
|
protected _transport: FetchTransport;
|
|
533
533
|
constructor(_transport: FetchTransport);
|
|
534
|
-
send({ request }?: Options$
|
|
534
|
+
send({ request }?: Options$I): Promise<ky.KyResponse<ListChannelsResponse>>;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
interface Options$H {
|
|
538
|
+
id: string;
|
|
539
|
+
body: z.infer<typeof TwilioSendgridChannelSync.SCHEMA>;
|
|
540
|
+
request?: RequestInit;
|
|
541
|
+
}
|
|
542
|
+
type TwilioSendgridChannelSyncResponse = {
|
|
543
|
+
data: {
|
|
544
|
+
channel: {
|
|
545
|
+
id: string;
|
|
546
|
+
name?: string;
|
|
547
|
+
status: "ActiveChannelStatus" | "PotentialChannelStatus";
|
|
548
|
+
account: string;
|
|
549
|
+
createdAt: string;
|
|
550
|
+
updatedAt: string;
|
|
551
|
+
source: "twilio-sendgrid";
|
|
552
|
+
twilioSendgrid: {
|
|
553
|
+
id: string;
|
|
554
|
+
displayName: string;
|
|
555
|
+
outboundEmailAddress: string;
|
|
556
|
+
replyEmailAddress?: string;
|
|
557
|
+
inboundHostname: string;
|
|
558
|
+
apiKey: string;
|
|
559
|
+
secrets: {
|
|
560
|
+
id: string;
|
|
561
|
+
isActive: boolean;
|
|
562
|
+
secretExcerpt: string;
|
|
563
|
+
}[];
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
declare class TwilioSendgridChannelSync {
|
|
569
|
+
protected _transport: FetchTransport;
|
|
570
|
+
static SCHEMA: z.ZodObject<{
|
|
571
|
+
overwrite: z.ZodOptional<z.ZodBoolean>;
|
|
572
|
+
}, "strip", z.ZodTypeAny, {
|
|
573
|
+
overwrite?: boolean | undefined;
|
|
574
|
+
}, {
|
|
575
|
+
overwrite?: boolean | undefined;
|
|
576
|
+
}>;
|
|
577
|
+
constructor(_transport: FetchTransport);
|
|
578
|
+
send({ id, body, request }: Options$H): Promise<ky.KyResponse<TwilioSendgridChannelSyncResponse>>;
|
|
535
579
|
}
|
|
536
580
|
|
|
537
581
|
interface Options$G {
|
|
@@ -835,16 +879,16 @@ declare class CreateContact {
|
|
|
835
879
|
send({ body, request }: Options$z): Promise<ky.KyResponse<CreateContactResponse>>;
|
|
836
880
|
}
|
|
837
881
|
|
|
838
|
-
interface IncludeOptions$
|
|
882
|
+
interface IncludeOptions$3 {
|
|
839
883
|
messageCount?: boolean;
|
|
840
884
|
conversationCount?: boolean;
|
|
841
885
|
}
|
|
842
|
-
interface Options$y<C extends IncludeOptions$
|
|
886
|
+
interface Options$y<C extends IncludeOptions$3> {
|
|
843
887
|
id: string;
|
|
844
888
|
include?: C;
|
|
845
889
|
request?: RequestInit;
|
|
846
890
|
}
|
|
847
|
-
type GetContactResponse<C extends IncludeOptions$
|
|
891
|
+
type GetContactResponse<C extends IncludeOptions$3> = {
|
|
848
892
|
data: {
|
|
849
893
|
contact: {
|
|
850
894
|
id: string;
|
|
@@ -866,7 +910,7 @@ type GetContactResponse<C extends IncludeOptions$2> = {
|
|
|
866
910
|
declare class GetContact {
|
|
867
911
|
protected _transport: FetchTransport;
|
|
868
912
|
constructor(_transport: FetchTransport);
|
|
869
|
-
send<C extends IncludeOptions$
|
|
913
|
+
send<C extends IncludeOptions$3>({ id, include, request, }: Options$y<C>): Promise<ky.KyResponse<GetContactResponse<C>>>;
|
|
870
914
|
}
|
|
871
915
|
|
|
872
916
|
interface Options$x {
|
|
@@ -951,11 +995,15 @@ declare class UpdateContact {
|
|
|
951
995
|
send({ id, body, request }: Options$v): Promise<ky.KyResponse<UpdateContactResponse>>;
|
|
952
996
|
}
|
|
953
997
|
|
|
954
|
-
interface
|
|
998
|
+
interface IncludeOptions$2 {
|
|
999
|
+
channel?: boolean;
|
|
1000
|
+
}
|
|
1001
|
+
interface Options$u<C extends IncludeOptions$2> {
|
|
955
1002
|
id: string;
|
|
1003
|
+
include?: C;
|
|
956
1004
|
request?: RequestInit;
|
|
957
1005
|
}
|
|
958
|
-
type GetConversationResponse = {
|
|
1006
|
+
type GetConversationResponse<C extends IncludeOptions$2> = {
|
|
959
1007
|
data: {
|
|
960
1008
|
conversation: {
|
|
961
1009
|
id: string;
|
|
@@ -966,12 +1014,45 @@ type GetConversationResponse = {
|
|
|
966
1014
|
createdAt: string;
|
|
967
1015
|
updatedAt: string;
|
|
968
1016
|
};
|
|
1017
|
+
channel: C extends {
|
|
1018
|
+
channel: true;
|
|
1019
|
+
} ? {
|
|
1020
|
+
id: string;
|
|
1021
|
+
name?: string;
|
|
1022
|
+
status: "ActiveChannelStatus" | "PotentialChannelStatus";
|
|
1023
|
+
account: string;
|
|
1024
|
+
createdAt: string;
|
|
1025
|
+
updatedAt: string;
|
|
1026
|
+
} & ({
|
|
1027
|
+
source: "meta-whatsapp";
|
|
1028
|
+
metaWhatsapp: {
|
|
1029
|
+
id: string;
|
|
1030
|
+
whatsappAccountID: string;
|
|
1031
|
+
whatsappPhoneNumberID: string;
|
|
1032
|
+
accessToken: string;
|
|
1033
|
+
};
|
|
1034
|
+
} | {
|
|
1035
|
+
source: "twilio-sendgrid";
|
|
1036
|
+
twilioSendgrid: {
|
|
1037
|
+
id: string;
|
|
1038
|
+
displayName: string;
|
|
1039
|
+
outboundEmailAddress: string;
|
|
1040
|
+
replyEmailAddress?: string;
|
|
1041
|
+
inboundHostname: string;
|
|
1042
|
+
apiKey: string;
|
|
1043
|
+
secrets: {
|
|
1044
|
+
id: string;
|
|
1045
|
+
isActive: boolean;
|
|
1046
|
+
secretExcerpt: string;
|
|
1047
|
+
}[];
|
|
1048
|
+
};
|
|
1049
|
+
}) : never;
|
|
969
1050
|
};
|
|
970
1051
|
};
|
|
971
1052
|
declare class GetConversation {
|
|
972
1053
|
protected _transport: FetchTransport;
|
|
973
1054
|
constructor(_transport: FetchTransport);
|
|
974
|
-
send({ id, request }: Options$u): Promise<ky.KyResponse<GetConversationResponse
|
|
1055
|
+
send<C extends IncludeOptions$2>({ id, include, request, }: Options$u<C>): Promise<ky.KyResponse<GetConversationResponse<C>>>;
|
|
975
1056
|
}
|
|
976
1057
|
|
|
977
1058
|
interface Options$t {
|
|
@@ -1848,6 +1929,9 @@ declare class Client {
|
|
|
1848
1929
|
message: {
|
|
1849
1930
|
list: ListChannelMessages;
|
|
1850
1931
|
};
|
|
1932
|
+
twilioSendgrid: {
|
|
1933
|
+
sync: TwilioSendgridChannelSync;
|
|
1934
|
+
};
|
|
1851
1935
|
};
|
|
1852
1936
|
get compositionSection(): {
|
|
1853
1937
|
get: GetCompositionSection;
|
|
@@ -1929,4 +2013,4 @@ declare class Client {
|
|
|
1929
2013
|
get webhook(): Webhook;
|
|
1930
2014
|
}
|
|
1931
2015
|
|
|
1932
|
-
export { type
|
|
2016
|
+
export { type UpdateNoteResponse as $, type Authentication as A, type ListContactConversationsResponse as B, Client as C, type CreateLabelResponse as D, type DeleteLabelResponse as E, type GetLabelResponse as F, type GetBoilerplateResponse as G, type ListLabelsResponse as H, type UpdateLabelResponse as I, type ListConversationMessagesResponse as J, type ListMessagesResponse as K, type ListActionsResponse as L, type ListChannelMessagesResponse as M, type GetModelResponse as N, type Options as O, type ListModelsResponse as P, type CreateCorrectionResponse as Q, type RequestFilterable as R, type CreateResponseResponse as S, type TwilioSendgridChannelSyncResponse as T, type UpdateBoilerplateResponse as U, type CreateContactNoteResponse as V, type WebhookResponse as W, type CreateConversationNoteResponse as X, type GetNoteResponse as Y, type ListContactNotesResponse as Z, type ListConversationNotesResponse as _, type Options$W as a, type GetSourceResponse as a0, type ListSourcesResponse as a1, type CreateContactNotificationSubscriptionResponse as a2, type CreateUploadResponse as a3, type GetUploadResponse as a4, type DeleteUploadResponse as a5, type CreateBoilerplateResponse as b, type ListBoilerplateCategoryBoilerplatesResponse as c, type ListBoilerplatesResponse as d, type CreateBoilerplateCategoryResponse as e, type GetBoilerplateCategoryResponse as f, type ListBoilerplateCategoriesResponse as g, type UpdateBoilerplateCategoryResponse as h, type ListChannelsResponse as i, type GetChannelResponse as j, type UpdateChannelResponse as k, type CreateChannelResponse as l, type GetCompositionSectionResponse as m, type ListCompositionSectionsResponse as n, type CreateCompositionSectionResponse as o, type ListChannelCompositionSectionsResponse as p, type UpdateCompositionSectionResponse as q, type CreateContactResponse as r, type GetContactResponse as s, type ListContactsResponse as t, type ListLabelContactsResponse as u, type UpdateContactResponse as v, type GetConversationResponse as w, type ListConversationsResponse as x, type ListLabelConversationsResponse as y, type UpdateConversationResponse as z };
|