@great-detail/support-sdk 0.18.0 → 0.18.2
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/{Client-BdaQvx-z.d.cts → Client-DZnura3y.d.cts} +13 -8
- package/dist/{Client-BdaQvx-z.d.ts → Client-DZnura3y.d.ts} +13 -8
- package/dist/cli/index.d.cts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +60 -2
- package/dist/index.d.ts +60 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -363,10 +363,12 @@ type GetAccountConversationSettingsResponse = {
|
|
|
363
363
|
*/
|
|
364
364
|
|
|
365
365
|
type UpdateAccountConversationSettingsPayload = {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
366
|
+
conversationSettings: {
|
|
367
|
+
defaultName?: Nullable<string>;
|
|
368
|
+
responseDuration?: Nullable<string>;
|
|
369
|
+
resolveDuration?: Nullable<string>;
|
|
370
|
+
enableAutoLabel?: boolean;
|
|
371
|
+
};
|
|
370
372
|
};
|
|
371
373
|
interface UpdateAccountConversationSettingsOptions {
|
|
372
374
|
body: UpdateAccountConversationSettingsPayload;
|
|
@@ -1198,9 +1200,12 @@ type GetChannelConversationSettingsResponse = {
|
|
|
1198
1200
|
*/
|
|
1199
1201
|
|
|
1200
1202
|
type UpdateChannelConversationSettingsPayload = {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1203
|
+
conversationSettings: {
|
|
1204
|
+
defaultName?: Nullable<string>;
|
|
1205
|
+
responseDuration?: Nullable<string>;
|
|
1206
|
+
resolveDuration?: Nullable<string>;
|
|
1207
|
+
enableAutoLabel?: boolean;
|
|
1208
|
+
};
|
|
1204
1209
|
};
|
|
1205
1210
|
interface UpdateChannelConversationSettingsOptions {
|
|
1206
1211
|
body: UpdateChannelConversationSettingsPayload;
|
|
@@ -3181,4 +3186,4 @@ declare class Client {
|
|
|
3181
3186
|
static getBaseURL(): string;
|
|
3182
3187
|
}
|
|
3183
3188
|
|
|
3184
|
-
export { type
|
|
3189
|
+
export { type UpdateBoilerplateContentPayload as $, type Account as A, type UpdateAccountConversationSettingsResponse as B, Client as C, type DeleteAccountAccessTokenPayload as D, type Action as E, type ActionID as F, type GetAccountOptions as G, type SortOptions as H, type ListActionsOptions as I, type ListActionsResponse as J, type BoilerplateContent as K, type ListAccountAccessTokensOptions as L, type BoilerplateContentID as M, type Nullable as N, type Options as O, type CreateBoilerplateContentPayload as P, type CreateBoilerplateContentOptions as Q, type ResponseTimestamp as R, type SendOptions as S, type CreateBoilerplateContentResponse as T, type UpdateAccountPayload as U, type GetBoilerplateContentOptions as V, type GetBoilerplateContentResponse as W, type ListBoilerplateCategoryBoilerplateContentsOptions as X, type ListBoilerplateCategoryBoilerplateContentsResponse as Y, type ListBoilerplateContentsOptions as Z, type ListBoilerplateContentsResponse as _, type ConversationID as a, type GetContactVCFOptions as a$, type UpdateBoilerplateContentOptions as a0, type UpdateBoilerplateContentResponse as a1, type BoilerplateCategory as a2, type BoilerplateCategoryID as a3, type CreateBoilerplateCategoryPayload as a4, type CreateBoilerplateCategoryOptions as a5, type CreateBoilerplateCategoryResponse as a6, type GetBoilerplateCategoryOptions as a7, type GetBoilerplateCategoryResponse as a8, type ListBoilerplateCategoriesIncludeOptions as a9, type UpdateChannelConversationSettingsOptions as aA, type UpdateChannelConversationSettingsResponse as aB, type CompositionSection as aC, type CompositionSectionID as aD, type CreateCompositionSectionPayload as aE, type CreateCompositionSectionOptions as aF, type CreateCompositionSectionResponse as aG, type GetCompositionSectionOptions as aH, type GetCompositionSectionResponse as aI, type ListChannelCompositionSectionsOptions as aJ, type ListChannelCompositionSectionsResponse as aK, type ListCompositionSectionsOptions as aL, type ListCompositionSectionsResponse as aM, type UpdateCompositionSectionPayload as aN, type UpdateCompositionSectionOptions as aO, type UpdateCompositionSectionResponse as aP, type Contact as aQ, type ContactID as aR, type ContactCustomMetadata as aS, type CreateContactPayload as aT, type CreateContactOptions as aU, type CreateContactResponse as aV, type DeleteContactOptions as aW, type DeleteContactResponse as aX, type GetContactIncludeOptions as aY, type GetContactOptions as aZ, type GetContactResponse as a_, type ListBoilerplateCategoriesOptions as aa, type ListBoilerplateCategoriesResponse as ab, type UpdateBoilerplateCategoryPayload as ac, type UpdateBoilerplateCategoryOptions as ad, type UpdateBoilerplateCategoryResponse as ae, type Channel as af, type ChannelID as ag, type CreateChannelPayload as ah, type CreateChannelOptions as ai, type CreateChannelResponse as aj, type GetChannelOptions as ak, type GetChannelResponse as al, type ListChannelsOptions as am, type ListChannelsResponse as an, type MetaWhatsappChannelGetBusinessProfileOptions as ao, type MetaWhatsappChannelGetBusinessProfileResponse as ap, type TwilioSendChannelSyncPayload as aq, type TwilioSendgridChannelSyncOptions as ar, type TwilioSendgridChannelSyncResponse as as, type UpdateChannelPayload as at, type UpdateChannelOptions as au, type UpdateChannelResponse as av, type ChannelConversationSettings as aw, type GetChannelConversationSettingsOptions as ax, type GetChannelConversationSettingsResponse as ay, type UpdateChannelConversationSettingsPayload as az, type RequestFilterable as b, type ListChannelMessagesResponse as b$, type ListContactsOptions as b0, type ListContactsResponse as b1, type ListLabelContactsOptions as b2, type ListLabelContactsResponse as b3, type UpdateContactPayload as b4, type UpdateContactOptions as b5, type UpdateContactResponse as b6, type Conversation as b7, type ConversationCustomMetadata as b8, type ActiveConversationStatus as b9, type CreateLabelOptions as bA, type CreateLabelResponse as bB, type DeleteLabelOptions as bC, type DeleteLabelResponse as bD, type GetLabelOptions as bE, type GetLabelResponse as bF, type LabelID as bG, type ListContactLabelsOptions as bH, type ListContactLabelsResponse as bI, type ListConversationLabelsOptions as bJ, type ListConversationLabelsResponse as bK, type ListLabelsIncludeOptions as bL, type ListLabelsOptions as bM, type ListLabelsResponse as bN, type UpdateLabelPayload as bO, type UpdateLabelOptions as bP, type UpdateLabelResponse as bQ, type Message as bR, type CreateMessagePayload as bS, type CreateMessageOptions as bT, type CreateMessageResponse as bU, type DeleteMessageOptions as bV, type DeleteMessageResponse as bW, type GetMessageOptions as bX, type GetMessageResponse as bY, type ListChannelMessagesIncludeOptions as bZ, type ListChannelMessagesOptions as b_, type ConcludedConversationStatus as ba, type ConversationStatus as bb, type CreateConversationPayload as bc, type CreateConversationOptions as bd, type CreateConversationResponse as be, type DeleteConversationOptions as bf, type DeleteConversationResponse as bg, type GetConversationIncludeOptions as bh, type GetConversationOptions as bi, type GetConversationResponse as bj, type ListChannelConversationsOptions as bk, type ListChannelConversationsResponse as bl, type ListContactConversationsOptions as bm, type ListContactConversationsResponse as bn, type ListConversationsIncludeOptions as bo, type FilterOptions as bp, type ListConversationOptions as bq, type ListConversationsResponse as br, type ListLabelConversationsOptions as bs, type ListLabelConversationsResponse as bt, type UpdateConversationPayload as bu, type UpdateConversationOptions as bv, type UpdateConversationResponse as bw, type ConversationSettings as bx, type Label as by, type CreateLabelPayload as bz, type Options$4 as c, type MessageWebhookEventType as c$, type ListConversationMessagesIncludeOptions as c0, type ListConversationMessagesOptions as c1, type ListConversationMessagesResponse as c2, type ListMessagesIncludeOptions as c3, type ListMessagesOptions as c4, type ListMessagesResponse as c5, type MessageID as c6, type MessageRole as c7, type MessageStatus as c8, type MessageEventType as c9, type Source as cA, type GetSourceOptions as cB, type GetSourceResponse as cC, type ListSourcesOptions as cD, type ListSourcesResponse as cE, type SourceID as cF, type Upload as cG, type CreateUploadOptions as cH, type CreateUploadResponse as cI, type DeleteUploadOptions as cJ, type DeleteUploadResponse as cK, type GetUploadOptions as cL, type GetUploadResponse as cM, type ListUploadsOptions as cN, type ListUploadsResponse as cO, type UploadID as cP, type User as cQ, type GetUserOptions as cR, type GetUserResponse as cS, type UserID as cT, type EventWebhookOptions as cU, eventWebhookSchema as cV, type WebhookEventType as cW, type AccountWebhookWebhookEventType as cX, type AccountAccessTokenWebhookEventType as cY, type ContactWebhookEventType as cZ, type ConversationWebhookEventType as c_, type Model as ca, type CreateCorrectionModelPayload as cb, type CreateCorrectionModelOptions as cc, type CreateCorrectionResponse as cd, type CreateResponseModelPayload as ce, type CreateResponseModelOptions as cf, type CreateResponseResponse as cg, type GetModelOptions as ch, type GetModelResponse as ci, type ListModelsOptions as cj, type ListModelsResponse as ck, type ModelID as cl, type Note as cm, type CreateNotePayload as cn, type CreateNoteOptions as co, type CreateNoteResponse as cp, type GetNoteOptions as cq, type GetNoteResponse as cr, type ListContactNotesOptions as cs, type ListContactNotesResponse as ct, type ListConversationNotesOptions as cu, type ListConversationNotesResponse as cv, type NoteID as cw, type UpdateNotePayload as cx, type UpdateNoteOptions as cy, type UpdateNoteResponse as cz, type CurrentAccountID as d, type WebhookSubscriptionWebhookEventType as d0, type WebhookEventPayload as d1, type WebhookResponse as d2, type WebhookSubscription as d3, type CreateWebhookSubscriptionPayload as d4, type CreateWebhookSubscriptionOptions as d5, type CreateWebhookSubscriptionResponse as d6, type DeleteWebhookSubscriptionOptions as d7, type DeleteWebhookSubscriptionResponse as d8, type GetWebhookSubscriptionOptions as d9, type GetWebhookSubscriptionResponse as da, type ListWebhookSubscriptionsOptions as db, type ListWebhookSubscriptionsResponse as dc, type TestWebhookSubscriptionOptions as dd, type TestWebhookSubscriptionResponse as de, type WebhookSubscriptionID as df, type AccountID as e, type CreateAccountPayload as f, type CreateAccountOptions as g, type CreateAccountResponse as h, type GetAccountResponse as i, type UpdateAccountOptions as j, type UpdateAccountResponse as k, type AccountAccessToken as l, type AccountAccessTokenID as m, type CreateAccountAccessTokenPayload as n, type CreateAccountAccessTokenOptions as o, type CreateAccountAccessTokenResponse as p, type DeleteAccountAccessTokenOptions as q, type DeleteAccountAccessTokenResponse as r, type GetAccountAccessTokenOptions as s, type GetAccountAccessTokenResponse as t, type ListAccountAccessTokensResponse as u, type AccountConversationSettings as v, type GetAccountConversationSettingsOptions as w, type GetAccountConversationSettingsResponse as x, type UpdateAccountConversationSettingsPayload as y, type UpdateAccountConversationSettingsOptions as z };
|
|
@@ -363,10 +363,12 @@ type GetAccountConversationSettingsResponse = {
|
|
|
363
363
|
*/
|
|
364
364
|
|
|
365
365
|
type UpdateAccountConversationSettingsPayload = {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
366
|
+
conversationSettings: {
|
|
367
|
+
defaultName?: Nullable<string>;
|
|
368
|
+
responseDuration?: Nullable<string>;
|
|
369
|
+
resolveDuration?: Nullable<string>;
|
|
370
|
+
enableAutoLabel?: boolean;
|
|
371
|
+
};
|
|
370
372
|
};
|
|
371
373
|
interface UpdateAccountConversationSettingsOptions {
|
|
372
374
|
body: UpdateAccountConversationSettingsPayload;
|
|
@@ -1198,9 +1200,12 @@ type GetChannelConversationSettingsResponse = {
|
|
|
1198
1200
|
*/
|
|
1199
1201
|
|
|
1200
1202
|
type UpdateChannelConversationSettingsPayload = {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1203
|
+
conversationSettings: {
|
|
1204
|
+
defaultName?: Nullable<string>;
|
|
1205
|
+
responseDuration?: Nullable<string>;
|
|
1206
|
+
resolveDuration?: Nullable<string>;
|
|
1207
|
+
enableAutoLabel?: boolean;
|
|
1208
|
+
};
|
|
1204
1209
|
};
|
|
1205
1210
|
interface UpdateChannelConversationSettingsOptions {
|
|
1206
1211
|
body: UpdateChannelConversationSettingsPayload;
|
|
@@ -3181,4 +3186,4 @@ declare class Client {
|
|
|
3181
3186
|
static getBaseURL(): string;
|
|
3182
3187
|
}
|
|
3183
3188
|
|
|
3184
|
-
export { type
|
|
3189
|
+
export { type UpdateBoilerplateContentPayload as $, type Account as A, type UpdateAccountConversationSettingsResponse as B, Client as C, type DeleteAccountAccessTokenPayload as D, type Action as E, type ActionID as F, type GetAccountOptions as G, type SortOptions as H, type ListActionsOptions as I, type ListActionsResponse as J, type BoilerplateContent as K, type ListAccountAccessTokensOptions as L, type BoilerplateContentID as M, type Nullable as N, type Options as O, type CreateBoilerplateContentPayload as P, type CreateBoilerplateContentOptions as Q, type ResponseTimestamp as R, type SendOptions as S, type CreateBoilerplateContentResponse as T, type UpdateAccountPayload as U, type GetBoilerplateContentOptions as V, type GetBoilerplateContentResponse as W, type ListBoilerplateCategoryBoilerplateContentsOptions as X, type ListBoilerplateCategoryBoilerplateContentsResponse as Y, type ListBoilerplateContentsOptions as Z, type ListBoilerplateContentsResponse as _, type ConversationID as a, type GetContactVCFOptions as a$, type UpdateBoilerplateContentOptions as a0, type UpdateBoilerplateContentResponse as a1, type BoilerplateCategory as a2, type BoilerplateCategoryID as a3, type CreateBoilerplateCategoryPayload as a4, type CreateBoilerplateCategoryOptions as a5, type CreateBoilerplateCategoryResponse as a6, type GetBoilerplateCategoryOptions as a7, type GetBoilerplateCategoryResponse as a8, type ListBoilerplateCategoriesIncludeOptions as a9, type UpdateChannelConversationSettingsOptions as aA, type UpdateChannelConversationSettingsResponse as aB, type CompositionSection as aC, type CompositionSectionID as aD, type CreateCompositionSectionPayload as aE, type CreateCompositionSectionOptions as aF, type CreateCompositionSectionResponse as aG, type GetCompositionSectionOptions as aH, type GetCompositionSectionResponse as aI, type ListChannelCompositionSectionsOptions as aJ, type ListChannelCompositionSectionsResponse as aK, type ListCompositionSectionsOptions as aL, type ListCompositionSectionsResponse as aM, type UpdateCompositionSectionPayload as aN, type UpdateCompositionSectionOptions as aO, type UpdateCompositionSectionResponse as aP, type Contact as aQ, type ContactID as aR, type ContactCustomMetadata as aS, type CreateContactPayload as aT, type CreateContactOptions as aU, type CreateContactResponse as aV, type DeleteContactOptions as aW, type DeleteContactResponse as aX, type GetContactIncludeOptions as aY, type GetContactOptions as aZ, type GetContactResponse as a_, type ListBoilerplateCategoriesOptions as aa, type ListBoilerplateCategoriesResponse as ab, type UpdateBoilerplateCategoryPayload as ac, type UpdateBoilerplateCategoryOptions as ad, type UpdateBoilerplateCategoryResponse as ae, type Channel as af, type ChannelID as ag, type CreateChannelPayload as ah, type CreateChannelOptions as ai, type CreateChannelResponse as aj, type GetChannelOptions as ak, type GetChannelResponse as al, type ListChannelsOptions as am, type ListChannelsResponse as an, type MetaWhatsappChannelGetBusinessProfileOptions as ao, type MetaWhatsappChannelGetBusinessProfileResponse as ap, type TwilioSendChannelSyncPayload as aq, type TwilioSendgridChannelSyncOptions as ar, type TwilioSendgridChannelSyncResponse as as, type UpdateChannelPayload as at, type UpdateChannelOptions as au, type UpdateChannelResponse as av, type ChannelConversationSettings as aw, type GetChannelConversationSettingsOptions as ax, type GetChannelConversationSettingsResponse as ay, type UpdateChannelConversationSettingsPayload as az, type RequestFilterable as b, type ListChannelMessagesResponse as b$, type ListContactsOptions as b0, type ListContactsResponse as b1, type ListLabelContactsOptions as b2, type ListLabelContactsResponse as b3, type UpdateContactPayload as b4, type UpdateContactOptions as b5, type UpdateContactResponse as b6, type Conversation as b7, type ConversationCustomMetadata as b8, type ActiveConversationStatus as b9, type CreateLabelOptions as bA, type CreateLabelResponse as bB, type DeleteLabelOptions as bC, type DeleteLabelResponse as bD, type GetLabelOptions as bE, type GetLabelResponse as bF, type LabelID as bG, type ListContactLabelsOptions as bH, type ListContactLabelsResponse as bI, type ListConversationLabelsOptions as bJ, type ListConversationLabelsResponse as bK, type ListLabelsIncludeOptions as bL, type ListLabelsOptions as bM, type ListLabelsResponse as bN, type UpdateLabelPayload as bO, type UpdateLabelOptions as bP, type UpdateLabelResponse as bQ, type Message as bR, type CreateMessagePayload as bS, type CreateMessageOptions as bT, type CreateMessageResponse as bU, type DeleteMessageOptions as bV, type DeleteMessageResponse as bW, type GetMessageOptions as bX, type GetMessageResponse as bY, type ListChannelMessagesIncludeOptions as bZ, type ListChannelMessagesOptions as b_, type ConcludedConversationStatus as ba, type ConversationStatus as bb, type CreateConversationPayload as bc, type CreateConversationOptions as bd, type CreateConversationResponse as be, type DeleteConversationOptions as bf, type DeleteConversationResponse as bg, type GetConversationIncludeOptions as bh, type GetConversationOptions as bi, type GetConversationResponse as bj, type ListChannelConversationsOptions as bk, type ListChannelConversationsResponse as bl, type ListContactConversationsOptions as bm, type ListContactConversationsResponse as bn, type ListConversationsIncludeOptions as bo, type FilterOptions as bp, type ListConversationOptions as bq, type ListConversationsResponse as br, type ListLabelConversationsOptions as bs, type ListLabelConversationsResponse as bt, type UpdateConversationPayload as bu, type UpdateConversationOptions as bv, type UpdateConversationResponse as bw, type ConversationSettings as bx, type Label as by, type CreateLabelPayload as bz, type Options$4 as c, type MessageWebhookEventType as c$, type ListConversationMessagesIncludeOptions as c0, type ListConversationMessagesOptions as c1, type ListConversationMessagesResponse as c2, type ListMessagesIncludeOptions as c3, type ListMessagesOptions as c4, type ListMessagesResponse as c5, type MessageID as c6, type MessageRole as c7, type MessageStatus as c8, type MessageEventType as c9, type Source as cA, type GetSourceOptions as cB, type GetSourceResponse as cC, type ListSourcesOptions as cD, type ListSourcesResponse as cE, type SourceID as cF, type Upload as cG, type CreateUploadOptions as cH, type CreateUploadResponse as cI, type DeleteUploadOptions as cJ, type DeleteUploadResponse as cK, type GetUploadOptions as cL, type GetUploadResponse as cM, type ListUploadsOptions as cN, type ListUploadsResponse as cO, type UploadID as cP, type User as cQ, type GetUserOptions as cR, type GetUserResponse as cS, type UserID as cT, type EventWebhookOptions as cU, eventWebhookSchema as cV, type WebhookEventType as cW, type AccountWebhookWebhookEventType as cX, type AccountAccessTokenWebhookEventType as cY, type ContactWebhookEventType as cZ, type ConversationWebhookEventType as c_, type Model as ca, type CreateCorrectionModelPayload as cb, type CreateCorrectionModelOptions as cc, type CreateCorrectionResponse as cd, type CreateResponseModelPayload as ce, type CreateResponseModelOptions as cf, type CreateResponseResponse as cg, type GetModelOptions as ch, type GetModelResponse as ci, type ListModelsOptions as cj, type ListModelsResponse as ck, type ModelID as cl, type Note as cm, type CreateNotePayload as cn, type CreateNoteOptions as co, type CreateNoteResponse as cp, type GetNoteOptions as cq, type GetNoteResponse as cr, type ListContactNotesOptions as cs, type ListContactNotesResponse as ct, type ListConversationNotesOptions as cu, type ListConversationNotesResponse as cv, type NoteID as cw, type UpdateNotePayload as cx, type UpdateNoteOptions as cy, type UpdateNoteResponse as cz, type CurrentAccountID as d, type WebhookSubscriptionWebhookEventType as d0, type WebhookEventPayload as d1, type WebhookResponse as d2, type WebhookSubscription as d3, type CreateWebhookSubscriptionPayload as d4, type CreateWebhookSubscriptionOptions as d5, type CreateWebhookSubscriptionResponse as d6, type DeleteWebhookSubscriptionOptions as d7, type DeleteWebhookSubscriptionResponse as d8, type GetWebhookSubscriptionOptions as d9, type GetWebhookSubscriptionResponse as da, type ListWebhookSubscriptionsOptions as db, type ListWebhookSubscriptionsResponse as dc, type TestWebhookSubscriptionOptions as dd, type TestWebhookSubscriptionResponse as de, type WebhookSubscriptionID as df, type AccountID as e, type CreateAccountPayload as f, type CreateAccountOptions as g, type CreateAccountResponse as h, type GetAccountResponse as i, type UpdateAccountOptions as j, type UpdateAccountResponse as k, type AccountAccessToken as l, type AccountAccessTokenID as m, type CreateAccountAccessTokenPayload as n, type CreateAccountAccessTokenOptions as o, type CreateAccountAccessTokenResponse as p, type DeleteAccountAccessTokenOptions as q, type DeleteAccountAccessTokenResponse as r, type GetAccountAccessTokenOptions as s, type GetAccountAccessTokenResponse as t, type ListAccountAccessTokensResponse as u, type AccountConversationSettings as v, type GetAccountConversationSettingsOptions as w, type GetAccountConversationSettingsResponse as x, type UpdateAccountConversationSettingsPayload as y, type UpdateAccountConversationSettingsOptions as z };
|
package/dist/cli/index.d.cts
CHANGED
package/dist/cli/index.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=Object.create;var B=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var et=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var Q=(s,t)=>{for(var e in t)B(s,e,{get:t[e],enumerable:!0})},j=(s,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of tt(t))!ot.call(s,n)&&n!==e&&B(s,n,{get:()=>t[n],enumerable:!(o=Z(t,n))||o.enumerable});return s};var H=(s,t,e)=>(e=s!=null?X(et(s)):{},j(t||!s||!s.__esModule?B(e,"default",{value:s,enumerable:!0}):e,s)),st=s=>j(B({},"__esModule",{value:!0}),s);var nt={};Q(nt,{Client:()=>c,DEFAULT_SUPPORT_BASE_URL:()=>w,Error:()=>N,SupportError:()=>a,default:()=>c,eventWebhookSchema:()=>W});module.exports=st(nt);var w="https://api.support.greatdetail.com",V={"X-Powered-By":"GDSupport/JavaScript"};var m=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t),{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/accounts/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}create({body:t,request:e={}}){return this._transport.send("v1/accounts",{...e,method:"POST",json:t})}};var l=class{constructor(t){this._transport=t}get(t,e,{request:o={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...o,method:"GET"})}list(t,{request:e={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...e,method:"GET"})}delete(t,e,{body:o,request:n={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...n,method:"DELETE",json:o})}create(t,{body:e={},request:o={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...o,method:"POST",json:e})}};var d=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/conversation-settings",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/conversation-settings",{...o,method:"PATCH",json:e})}};var u=class{constructor(t){this._transport=t}list({limit:t,sort:e,request:o={}}={}){return this._transport.send("v1/actions",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.sortQuery(e)]})}};var q="SUPPORT_ACCESS_TOKEN",K="SUPPORT_KEY_NAME",Y="SUPPORT_KEY_PASSWORD",F="SUPPORT_SIGNING_KEY",z="SUPPORT_BASE_URL";var h=class{name;#t;constructor({name:t=process.env[K],password:e=process.env[Y]}={}){if(!t)throw new Error("Name option must be specified when using Basic Authentication");if(!e)throw new Error("Password option must be specified when using Basic Authentication");this.name=t,this.#t=e}getHeaders(){return{Authorization:`Basic ${btoa(this.name+":"+this.#t)}`}}};var C=class{#t;constructor({token:t=process.env[q]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${this.#t}`}}};var f=class{getHeaders(){return{}}};var R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,include:e,request:o={}}={}){return this._transport.send("v1/boilerplates/categories",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.includeQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/boilerplates/categories",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var b=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,query:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e)]})}listByCategory=this.listByBoilerplateCategory;listByBoilerplateCategory(t,{limit:e,request:o={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t)+"/contents",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/boilerplates/contents",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var g=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,query:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e)]})}update(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}create({body:t,request:e={}}){return this._transport.send("v1/channels",{...e,method:"POST",json:t})}metaWhatsappGetBusinessProfile(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/meta-whatsapp/business-profile",{...e,method:"GET"})}twilioSendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/twilio-sendgrid/sync",{...o,method:"POST",json:e})}};var v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/conversation-settings",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/conversation-settings",{...o,method:"PATCH",json:e})}};var O=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,request:e={}}={}){return this._transport.send("v1/composition-sections",{...e,method:"GET",searchParams:[...this._transport.limitQuery(t)]})}listByChannel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/composition-sections",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/composition-sections",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var x=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:[...this._transport.includeQuery(e??{})]})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",n=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(n)}getVCFURL(t,e={}){return this._transport.getURL(this.getRelativeVCFURL(t,e))}getVCF(t,e={}){return this._transport.send(this.getVCFURL(t,e),{method:"GET"})}list({limit:t,query:e,request:o={}}={}){return this._transport.send("v1/contacts",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e)]})}listByLabel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t)+"/contacts",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/contacts",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var T=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...o,method:"GET",searchParams:[...this._transport.includeQuery(e??{})]})}list({query:t,limit:e,filter:o,include:n,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:[...this._transport.queryQuery(t),...this._transport.limitQuery(e),...o?[["filter",o]]:[],...this._transport.includeQuery(n??{})]})}listByLabel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t)+"/conversations",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}listByContact(t,{limit:e,request:o={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t)+"/conversations",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}listByChannel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/conversations",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/conversations",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var _=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,query:e,include:o,request:n={}}={}){return this._transport.send("v1/labels",{...n,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e),...this._transport.includeQuery(o??{})]})}listByContact(t,{limit:e,request:o={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t)+"/labels",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}listByConversation(t,{limit:e,request:o={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/labels",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/labels",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/messages/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,include:e,request:o={}}={}){return this._transport.send("v1/messages",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.includeQuery(e??{})]})}listByConversation(t,{limit:e,include:o,request:n={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/messages",{...n,method:"GET",searchParams:[...this._transport.limitQuery(e),...this._transport.includeQuery(o??{})]})}listByChannel(t,{limit:e,include:o,request:n={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/messages",{...n,method:"GET",searchParams:[...this._transport.limitQuery(e),...this._transport.includeQuery(o)]})}create({body:t,request:e={}}){return this._transport.send("v1/messages",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/messages/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var I=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models",{...t,method:"GET"})}createResponse(t,{body:e,request:o={}}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/response",{...o,method:"POST",timeout:12e4,json:e})}createCorrection(t,{body:e,request:o={}}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/correction",{...o,method:"POST",json:e})}};var A=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}listByContact(t,{request:e={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t)+"/notes",{...e,method:"GET"})}listByConversation(t,{request:e={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/notes",{...e,method:"GET"})}create({body:t,request:e={}}){return this._transport.send("v1/notes",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var L=class s{constructor(t=s.STANDARD_HEADERS){this._standardHeaders=t}static STANDARD_HEADERS=V;async filter(){return{headers:this.getHeaders()}}getHeaders(){return this._standardHeaders}};var U=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/sources/"+encodeURIComponent(t),{...e,method:"GET"})}list({featured:t,category:e,request:o={}}={}){let n=[];if(e){let r=Array.isArray(e)?e:[e];for(let p of r)n.push(["category",p])}return t!==void 0&&n.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:n})}};var S=class{constructor(t){this._transport=t}getMessageFrequency({request:t={}}={}){return this._transport.send("v1/statistics/message-frequency",{...t,method:"GET"})}getChannelMessageFrequency(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/statistics/message-frequency",{...e,method:"GET"})}getModelUsage({request:t={}}={}){return this._transport.send("v1/statistics/model-usage",{...t,method:"GET"})}};var J=H(require("is-network-error"),1),M=H(require("ky"),1);var a=class extends Error{constructor(e,o){super("Support Error",{cause:o});this.response=e}};var D=class{client;options;constructor({baseURL:t,...e}){this.options={...e,baseURL:t},this.client=M.default.create({prefixUrl:this.options.baseURL,timeout:12e3,hooks:{beforeRequest:[o=>{for(let n of this.options.requestFilterables){let r=n.getHeaders();for(let[p,$]of Object.entries(r))o.headers.has(p)||o.headers.set(p,$)}}]}})}getURL(t){return new URL(t,this.options.baseURL).toString()}sortQuery(t){let e=[];if(t===void 0)return e;for(let[o,n]of Object.entries(t))n!==void 0&&e.push(["sort",n+o]);return e}limitQuery(t){let e=[];return t===void 0||e.push(["limit",t.toString()]),e}includeQuery(t){let e=[];if(t===void 0)return e;for(let o of Object.keys(t))e.push(["include",o]);return e}queryQuery(t){let e=[];return t===void 0||e.push(["query",t]),e}send(t,e={}){let o=this.client(t,e).catch(async n=>{throw(0,J.default)(n)?new Error("A network error occurred",{cause:n}):n instanceof M.HTTPError?new a(n.response,n):n});return{response:()=>o,json:async()=>(await o).json()}}};var E=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/uploads",{...t,method:"GET"})}create({files:t,request:e={}}){let o=new FormData;for(let n of t)o.append("file",n);return this._transport.send("v1/uploads",{...e,method:"POST",body:o})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var G=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/users/"+encodeURIComponent(t),{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/users/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var i=require("zod"),W=i.z.object({data:i.z.object({event:i.z.object({id:i.z.string(),type:i.z.string(),payload:i.z.record(i.z.string()),createdAt:i.z.string().datetime()})})});var k=class{constructor(t){this._transport=t}async event({key:t=process.env[F],maxSignatures:e=3,request:o}){let n=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+F);if(!n)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(n)?n.slice(0,e):[n]))throw new Error("Untrusted signature")}let{data:r}=W.parse(o.body);return{event:r.event}}async _verifySignature(t,e,o){let n=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign","verify"]);for(let r of o)if(await crypto.subtle.verify("HMAC",n,new TextEncoder().encode(atob(r)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...t,method:"GET"})}test(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t)+"/test",{...e,method:"POST"})}create({body:t,request:e={}}){return this._transport.send("v1/webhooks/subscriptions",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var c=class s{static DEFAULT_BASE_URL=w;static PublicAuthentication=f;static BasicAuthentication=h;static BearerAuthentication=C;_transport;account;accountAccessToken;accountConversationSettings;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;label;message;model;note;source;statistics;upload;user;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new D({requestFilterables:[new L,t],...o,baseURL:e?.toString()??s.getBaseURL()}),this.account=new m(this._transport),this.accountAccessToken=new l(this._transport),this.accountConversationSettings=new d(this._transport),this.action=new u(this._transport),this.boilerplateCategory=new R(this._transport),this.boilerplateContent=new b(this._transport),this.channel=new g(this._transport),this.channelConversationSettings=new v(this._transport),this.compositionSection=new O(this._transport),this.contact=new x(this._transport),this.conversation=new T(this._transport),this.label=new _(this._transport),this.message=new y(this._transport),this.model=new I(this._transport),this.note=new A(this._transport),this.source=new U(this._transport),this.statistics=new S(this._transport),this.upload=new E(this._transport),this.user=new G(this._transport),this.webhook=new k(this._transport),this.webhookSubscription=new P(this._transport)}static getBaseURL(){return process.env[z]??this.DEFAULT_BASE_URL}};var N={};Q(N,{SupportError:()=>a});0&&(module.exports={Client,DEFAULT_SUPPORT_BASE_URL,Error,SupportError,eventWebhookSchema});
|
|
1
|
+
"use strict";var X=Object.create;var B=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var et=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var Q=(s,t)=>{for(var e in t)B(s,e,{get:t[e],enumerable:!0})},j=(s,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of tt(t))!ot.call(s,n)&&n!==e&&B(s,n,{get:()=>t[n],enumerable:!(o=Z(t,n))||o.enumerable});return s};var H=(s,t,e)=>(e=s!=null?X(et(s)):{},j(t||!s||!s.__esModule?B(e,"default",{value:s,enumerable:!0}):e,s)),st=s=>j(B({},"__esModule",{value:!0}),s);var nt={};Q(nt,{Client:()=>c,DEFAULT_SUPPORT_BASE_URL:()=>w,Error:()=>N,SupportError:()=>a,default:()=>c,eventWebhookSchema:()=>W});module.exports=st(nt);var w="https://api.support.greatdetail.com",V={"X-Powered-By":"GDSupport/JavaScript"};var m=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t),{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/accounts/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}create({body:t,request:e={}}){return this._transport.send("v1/accounts",{...e,method:"POST",json:t})}};var l=class{constructor(t){this._transport=t}get(t,e,{request:o={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...o,method:"GET"})}list(t,{request:e={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...e,method:"GET"})}delete(t,e,{body:o,request:n={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...n,method:"DELETE",json:o})}create(t,{body:e={},request:o={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...o,method:"POST",json:e})}};var d=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/conversation-settings",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/conversation-settings",{...o,method:"PATCH",json:e})}};var u=class{constructor(t){this._transport=t}list({limit:t,sort:e,request:o={}}={}){return this._transport.send("v1/actions",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.sortQuery(e)]})}};var q="SUPPORT_ACCESS_TOKEN",K="SUPPORT_KEY_NAME",Y="SUPPORT_KEY_PASSWORD",F="SUPPORT_SIGNING_KEY",z="SUPPORT_BASE_URL";var h=class{name;#t;constructor({name:t=process.env[K],password:e=process.env[Y]}={}){if(!t)throw new Error("Name option must be specified when using Basic Authentication");if(!e)throw new Error("Password option must be specified when using Basic Authentication");this.name=t,this.#t=e}getHeaders(){return{Authorization:`Basic ${btoa(this.name+":"+this.#t)}`}}};var C=class{#t;constructor({token:t=process.env[q]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${this.#t}`}}};var f=class{getHeaders(){return{}}};var R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,include:e,request:o={}}={}){return this._transport.send("v1/boilerplates/categories",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.includeQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/boilerplates/categories",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var b=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,query:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e)]})}listByCategory=this.listByBoilerplateCategory;listByBoilerplateCategory(t,{limit:e,request:o={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t)+"/contents",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/boilerplates/contents",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var g=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,query:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e)]})}update(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}create({body:t,request:e={}}){return this._transport.send("v1/channels",{...e,method:"POST",json:t})}metaWhatsappGetBusinessProfile(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/meta-whatsapp/business-profile",{...e,method:"GET"})}twilioSendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/twilio-sendgrid/sync",{...o,method:"POST",json:e})}};var v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/conversation-settings",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/conversation-settings",{...o,method:"PATCH",json:e})}};var O=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,request:e={}}={}){return this._transport.send("v1/composition-sections",{...e,method:"GET",searchParams:[...this._transport.limitQuery(t)]})}listByChannel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/composition-sections",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/composition-sections",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var x=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:[...this._transport.includeQuery(e??{})]})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",n=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(n)}getVCFURL(t,e={}){return this._transport.getURL(this.getRelativeVCFURL(t,e))}getVCF(t,e={}){return this._transport.send(this.getVCFURL(t,e),{method:"GET"})}list({limit:t,query:e,request:o={}}={}){return this._transport.send("v1/contacts",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e)]})}listByLabel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t)+"/contacts",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/contacts",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var T=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...o,method:"GET",searchParams:[...this._transport.includeQuery(e??{})]})}list({query:t,limit:e,filter:o,include:n,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:[...this._transport.queryQuery(t),...this._transport.limitQuery(e),...o?[["filter",o]]:[],...this._transport.includeQuery(n??{})]})}listByLabel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t)+"/conversations",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}listByContact(t,{limit:e,request:o={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t)+"/conversations",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}listByChannel(t,{limit:e,request:o={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/conversations",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/conversations",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var _=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,query:e,include:o,request:n={}}={}){return this._transport.send("v1/labels",{...n,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.queryQuery(e),...this._transport.includeQuery(o??{})]})}listByContact(t,{limit:e,request:o={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t)+"/labels",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}listByConversation(t,{limit:e,request:o={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/labels",{...o,method:"GET",searchParams:[...this._transport.limitQuery(e)]})}create({body:t,request:e={}}){return this._transport.send("v1/labels",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/messages/"+encodeURIComponent(t),{...e,method:"GET"})}list({limit:t,include:e,request:o={}}={}){return this._transport.send("v1/messages",{...o,method:"GET",searchParams:[...this._transport.limitQuery(t),...this._transport.includeQuery(e??{})]})}listByConversation(t,{limit:e,include:o,request:n={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/messages",{...n,method:"GET",searchParams:[...this._transport.limitQuery(e),...this._transport.includeQuery(o??{})]})}listByChannel(t,{limit:e,include:o,request:n={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/messages",{...n,method:"GET",searchParams:[...this._transport.limitQuery(e),...this._transport.includeQuery(o)]})}create({body:t,request:e={}}){return this._transport.send("v1/messages",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/messages/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var I=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models",{...t,method:"GET"})}createResponse(t,{body:e,request:o={}}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/response",{...o,method:"POST",timeout:12e4,json:e})}createCorrection(t,{body:e,request:o={}}){return this._transport.send("v1/models/"+encodeURIComponent(t)+"/correction",{...o,method:"POST",json:e})}};var L=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}listByContact(t,{request:e={}}={}){return this._transport.send("v1/contacts/"+encodeURIComponent(t)+"/notes",{...e,method:"GET"})}listByConversation(t,{request:e={}}={}){return this._transport.send("v1/conversations/"+encodeURIComponent(t)+"/notes",{...e,method:"GET"})}create({body:t,request:e={}}){return this._transport.send("v1/notes",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var A=class s{constructor(t=s.STANDARD_HEADERS){this._standardHeaders=t}static STANDARD_HEADERS=V;async filter(){return{headers:this.getHeaders()}}getHeaders(){return this._standardHeaders}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/sources/"+encodeURIComponent(t),{...e,method:"GET"})}list({featured:t,category:e,request:o={}}={}){let n=[];if(e){let r=Array.isArray(e)?e:[e];for(let p of r)n.push(["category",p])}return t!==void 0&&n.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:n})}};var U=class{constructor(t){this._transport=t}getMessageFrequency({request:t={}}={}){return this._transport.send("v1/statistics/message-frequency",{...t,method:"GET"})}getChannelMessageFrequency(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/statistics/message-frequency",{...e,method:"GET"})}getModelUsage({request:t={}}={}){return this._transport.send("v1/statistics/model-usage",{...t,method:"GET"})}};var J=H(require("is-network-error"),1),M=H(require("ky"),1);var a=class extends Error{constructor(e,o){super("Support Error",{cause:o});this.response=e}};var E=class{client;options;constructor({baseURL:t,...e}){this.options={...e,baseURL:t},this.client=M.default.create({prefixUrl:this.options.baseURL,timeout:12e3,hooks:{beforeRequest:[o=>{for(let n of this.options.requestFilterables){let r=n.getHeaders();for(let[p,$]of Object.entries(r))o.headers.has(p)||o.headers.set(p,$)}}]}})}getURL(t){return new URL(t,this.options.baseURL).toString()}sortQuery(t){let e=[];if(t===void 0)return e;for(let[o,n]of Object.entries(t))n!==void 0&&e.push(["sort",n+o]);return e}limitQuery(t){let e=[];return t===void 0||e.push(["limit",t.toString()]),e}includeQuery(t){let e=[];if(t===void 0)return e;for(let o of Object.keys(t))e.push(["include",o]);return e}queryQuery(t){let e=[];return t===void 0||e.push(["query",t]),e}send(t,e={}){let o=this.client(t,e).catch(async n=>{throw(0,J.default)(n)?new Error("A network error occurred",{cause:n}):n instanceof M.HTTPError?new a(n.response,n):n});return{response:()=>o,json:async()=>(await o).json()}}};var D=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/uploads",{...t,method:"GET"})}create({files:t,request:e={}}){let o=new FormData;for(let n of t)o.append("file",n);return this._transport.send("v1/uploads",{...e,method:"POST",body:o})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var G=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/users/"+encodeURIComponent(t),{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/users/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}};var i=require("zod"),W=i.z.object({data:i.z.object({event:i.z.object({id:i.z.string(),type:i.z.string(),payload:i.z.record(i.z.string()),createdAt:i.z.string().datetime()})})});var k=class{constructor(t){this._transport=t}async event({key:t=process.env[F],maxSignatures:e=3,request:o}){let n=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+F);if(!n)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(n)?n.slice(0,e):[n]))throw new Error("Untrusted signature")}let{data:r}=W.parse(o.body);return{event:r.event}}async _verifySignature(t,e,o){let n=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign","verify"]);for(let r of o)if(await crypto.subtle.verify("HMAC",n,new TextEncoder().encode(atob(r)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...t,method:"GET"})}test(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t)+"/test",{...e,method:"POST"})}create({body:t,request:e={}}){return this._transport.send("v1/webhooks/subscriptions",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var c=class s{static DEFAULT_BASE_URL=w;static PublicAuthentication=f;static BasicAuthentication=h;static BearerAuthentication=C;_transport;account;accountAccessToken;accountConversationSettings;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;label;message;model;note;source;statistics;upload;user;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new E({requestFilterables:[new A,t],...o,baseURL:e?.toString()??s.getBaseURL()}),this.account=new m(this._transport),this.accountAccessToken=new l(this._transport),this.accountConversationSettings=new d(this._transport),this.action=new u(this._transport),this.boilerplateCategory=new R(this._transport),this.boilerplateContent=new b(this._transport),this.channel=new g(this._transport),this.channelConversationSettings=new v(this._transport),this.compositionSection=new O(this._transport),this.contact=new x(this._transport),this.conversation=new T(this._transport),this.label=new _(this._transport),this.message=new y(this._transport),this.model=new I(this._transport),this.note=new L(this._transport),this.source=new S(this._transport),this.statistics=new U(this._transport),this.upload=new D(this._transport),this.user=new G(this._transport),this.webhook=new k(this._transport),this.webhookSubscription=new P(this._transport)}static getBaseURL(){return process.env[z]??this.DEFAULT_BASE_URL}};var N={};Q(N,{SupportError:()=>a});0&&(module.exports={Client,DEFAULT_SUPPORT_BASE_URL,Error,SupportError,eventWebhookSchema});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as ConversationID, N as Nullable, R as ResponseTimestamp, S as SendOptions } from './Client-DZnura3y.cjs';
|
|
2
|
+
export { A as Account, l as AccountAccessToken, m as AccountAccessTokenID, cY as AccountAccessTokenWebhookEventType, v as AccountConversationSettings, e as AccountID, cX as AccountWebhookWebhookEventType, E as Action, F as ActionID, b9 as ActiveConversationStatus, a2 as BoilerplateCategory, a3 as BoilerplateCategoryID, K as BoilerplateContent, M as BoilerplateContentID, af as Channel, aw as ChannelConversationSettings, ag as ChannelID, C as Client, aC as CompositionSection, aD as CompositionSectionID, ba as ConcludedConversationStatus, aQ as Contact, aS as ContactCustomMetadata, aR as ContactID, cZ as ContactWebhookEventType, b7 as Conversation, b8 as ConversationCustomMetadata, bx as ConversationSettings, bb as ConversationStatus, c_ as ConversationWebhookEventType, o as CreateAccountAccessTokenOptions, n as CreateAccountAccessTokenPayload, p as CreateAccountAccessTokenResponse, g as CreateAccountOptions, f as CreateAccountPayload, h as CreateAccountResponse, a5 as CreateBoilerplateCategoryOptions, a4 as CreateBoilerplateCategoryPayload, a6 as CreateBoilerplateCategoryResponse, Q as CreateBoilerplateContentOptions, P as CreateBoilerplateContentPayload, T as CreateBoilerplateContentResponse, ai as CreateChannelOptions, ah as CreateChannelPayload, aj as CreateChannelResponse, aF as CreateCompositionSectionOptions, aE as CreateCompositionSectionPayload, aG as CreateCompositionSectionResponse, aU as CreateContactOptions, aT as CreateContactPayload, aV as CreateContactResponse, bd as CreateConversationOptions, bc as CreateConversationPayload, be as CreateConversationResponse, cc as CreateCorrectionModelOptions, cb as CreateCorrectionModelPayload, cd as CreateCorrectionResponse, bA as CreateLabelOptions, bz as CreateLabelPayload, bB as CreateLabelResponse, bT as CreateMessageOptions, bS as CreateMessagePayload, bU as CreateMessageResponse, co as CreateNoteOptions, cn as CreateNotePayload, cp as CreateNoteResponse, cf as CreateResponseModelOptions, ce as CreateResponseModelPayload, cg as CreateResponseResponse, cH as CreateUploadOptions, cI as CreateUploadResponse, d5 as CreateWebhookSubscriptionOptions, d4 as CreateWebhookSubscriptionPayload, d6 as CreateWebhookSubscriptionResponse, d as CurrentAccountID, q as DeleteAccountAccessTokenOptions, D as DeleteAccountAccessTokenPayload, r as DeleteAccountAccessTokenResponse, aW as DeleteContactOptions, aX as DeleteContactResponse, bf as DeleteConversationOptions, bg as DeleteConversationResponse, bC as DeleteLabelOptions, bD as DeleteLabelResponse, bV as DeleteMessageOptions, bW as DeleteMessageResponse, cJ as DeleteUploadOptions, cK as DeleteUploadResponse, d7 as DeleteWebhookSubscriptionOptions, d8 as DeleteWebhookSubscriptionResponse, cU as EventWebhookOptions, bp as FilterOptions, s as GetAccountAccessTokenOptions, t as GetAccountAccessTokenResponse, w as GetAccountConversationSettingsOptions, x as GetAccountConversationSettingsResponse, G as GetAccountOptions, i as GetAccountResponse, a7 as GetBoilerplateCategoryOptions, a8 as GetBoilerplateCategoryResponse, V as GetBoilerplateContentOptions, W as GetBoilerplateContentResponse, ax as GetChannelConversationSettingsOptions, ay as GetChannelConversationSettingsResponse, ak as GetChannelOptions, al as GetChannelResponse, aH as GetCompositionSectionOptions, aI as GetCompositionSectionResponse, aY as GetContactIncludeOptions, aZ as GetContactOptions, a_ as GetContactResponse, a$ as GetContactVCFOptions, bh as GetConversationIncludeOptions, bi as GetConversationOptions, bj as GetConversationResponse, bE as GetLabelOptions, bF as GetLabelResponse, bX as GetMessageOptions, bY as GetMessageResponse, ch as GetModelOptions, ci as GetModelResponse, cq as GetNoteOptions, cr as GetNoteResponse, cB as GetSourceOptions, cC as GetSourceResponse, cL as GetUploadOptions, cM as GetUploadResponse, cR as GetUserOptions, cS as GetUserResponse, d9 as GetWebhookSubscriptionOptions, da as GetWebhookSubscriptionResponse, by as Label, bG as LabelID, L as ListAccountAccessTokensOptions, u as ListAccountAccessTokensResponse, I as ListActionsOptions, J as ListActionsResponse, a9 as ListBoilerplateCategoriesIncludeOptions, aa as ListBoilerplateCategoriesOptions, ab as ListBoilerplateCategoriesResponse, X as ListBoilerplateCategoryBoilerplateContentsOptions, Y as ListBoilerplateCategoryBoilerplateContentsResponse, Z as ListBoilerplateContentsOptions, _ as ListBoilerplateContentsResponse, aJ as ListChannelCompositionSectionsOptions, aK as ListChannelCompositionSectionsResponse, bk as ListChannelConversationsOptions, bl as ListChannelConversationsResponse, bZ as ListChannelMessagesIncludeOptions, b_ as ListChannelMessagesOptions, b$ as ListChannelMessagesResponse, am as ListChannelsOptions, an as ListChannelsResponse, aL as ListCompositionSectionsOptions, aM as ListCompositionSectionsResponse, bm as ListContactConversationsOptions, bn as ListContactConversationsResponse, bH as ListContactLabelsOptions, bI as ListContactLabelsResponse, cs as ListContactNotesOptions, ct as ListContactNotesResponse, b0 as ListContactsOptions, b1 as ListContactsResponse, bJ as ListConversationLabelsOptions, bK as ListConversationLabelsResponse, c0 as ListConversationMessagesIncludeOptions, c1 as ListConversationMessagesOptions, c2 as ListConversationMessagesResponse, cu as ListConversationNotesOptions, cv as ListConversationNotesResponse, bq as ListConversationOptions, bo as ListConversationsIncludeOptions, br as ListConversationsResponse, b2 as ListLabelContactsOptions, b3 as ListLabelContactsResponse, bs as ListLabelConversationsOptions, bt as ListLabelConversationsResponse, bL as ListLabelsIncludeOptions, bM as ListLabelsOptions, bN as ListLabelsResponse, c3 as ListMessagesIncludeOptions, c4 as ListMessagesOptions, c5 as ListMessagesResponse, cj as ListModelsOptions, ck as ListModelsResponse, cD as ListSourcesOptions, cE as ListSourcesResponse, cN as ListUploadsOptions, cO as ListUploadsResponse, db as ListWebhookSubscriptionsOptions, dc as ListWebhookSubscriptionsResponse, bR as Message, c9 as MessageEventType, c6 as MessageID, c7 as MessageRole, c8 as MessageStatus, c$ as MessageWebhookEventType, ao as MetaWhatsappChannelGetBusinessProfileOptions, ap as MetaWhatsappChannelGetBusinessProfileResponse, ca as Model, cl as ModelID, cm as Note, cw as NoteID, O as Options, b as RequestFilterable, H as SortOptions, cA as Source, cF as SourceID, dd as TestWebhookSubscriptionOptions, de as TestWebhookSubscriptionResponse, c as TransportOptions, aq as TwilioSendChannelSyncPayload, ar as TwilioSendgridChannelSyncOptions, as as TwilioSendgridChannelSyncResponse, z as UpdateAccountConversationSettingsOptions, y as UpdateAccountConversationSettingsPayload, B as UpdateAccountConversationSettingsResponse, j as UpdateAccountOptions, U as UpdateAccountPayload, k as UpdateAccountResponse, ad as UpdateBoilerplateCategoryOptions, ac as UpdateBoilerplateCategoryPayload, ae as UpdateBoilerplateCategoryResponse, a0 as UpdateBoilerplateContentOptions, $ as UpdateBoilerplateContentPayload, a1 as UpdateBoilerplateContentResponse, aA as UpdateChannelConversationSettingsOptions, az as UpdateChannelConversationSettingsPayload, aB as UpdateChannelConversationSettingsResponse, au as UpdateChannelOptions, at as UpdateChannelPayload, av as UpdateChannelResponse, aO as UpdateCompositionSectionOptions, aN as UpdateCompositionSectionPayload, aP as UpdateCompositionSectionResponse, b5 as UpdateContactOptions, b4 as UpdateContactPayload, b6 as UpdateContactResponse, bv as UpdateConversationOptions, bu as UpdateConversationPayload, bw as UpdateConversationResponse, bP as UpdateLabelOptions, bO as UpdateLabelPayload, bQ as UpdateLabelResponse, cy as UpdateNoteOptions, cx as UpdateNotePayload, cz as UpdateNoteResponse, cG as Upload, cP as UploadID, cQ as User, cT as UserID, d1 as WebhookEventPayload, cW as WebhookEventType, d2 as WebhookResponse, d3 as WebhookSubscription, df as WebhookSubscriptionID, d0 as WebhookSubscriptionWebhookEventType, C as default, cV as eventWebhookSchema } from './Client-DZnura3y.cjs';
|
|
2
3
|
import { KyResponse } from 'ky';
|
|
3
4
|
import 'zod';
|
|
4
5
|
|
|
@@ -56,4 +57,61 @@ declare namespace index {
|
|
|
56
57
|
export { type index_ErrorResponse as ErrorResponse, index_SupportError as SupportError };
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Great Detail Support System.
|
|
62
|
+
*
|
|
63
|
+
* @copyright 2025 Great Detail Ltd
|
|
64
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
65
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
66
|
+
* @see https://greatdetail.com
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
type EscalationID = `esc${string}` | (string & NonNullable<unknown>);
|
|
70
|
+
type Escalation = {
|
|
71
|
+
id: EscalationID;
|
|
72
|
+
conversation: ConversationID;
|
|
73
|
+
reason?: Nullable<string>;
|
|
74
|
+
} & ResponseTimestamp;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Great Detail Support System.
|
|
78
|
+
*
|
|
79
|
+
* @copyright 2025 Great Detail Ltd
|
|
80
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
81
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
82
|
+
* @see https://greatdetail.com
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
type CreateEscalationPayload = {
|
|
86
|
+
conversation: ConversationID;
|
|
87
|
+
reason?: Nullable<string>;
|
|
88
|
+
};
|
|
89
|
+
interface CreateEscalationOptions {
|
|
90
|
+
body: CreateEscalationPayload;
|
|
91
|
+
request?: SendOptions;
|
|
92
|
+
}
|
|
93
|
+
type CreateEscalationResponse = {
|
|
94
|
+
data: {
|
|
95
|
+
escalation: Escalation;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Great Detail Support System.
|
|
101
|
+
*
|
|
102
|
+
* @copyright 2025 Great Detail Ltd
|
|
103
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
104
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
105
|
+
* @see https://greatdetail.com
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
interface ListEscalationsOptions {
|
|
109
|
+
request?: SendOptions;
|
|
110
|
+
}
|
|
111
|
+
type ListEscalationsResponse = {
|
|
112
|
+
data: {
|
|
113
|
+
escalation: Escalation;
|
|
114
|
+
}[];
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export { ConversationID, type CreateEscalationOptions, type CreateEscalationPayload, type CreateEscalationResponse, DEFAULT_SUPPORT_BASE_URL, index as Error, type ErrorResponse, type Escalation, type ListEscalationsOptions, type ListEscalationsResponse, SupportError };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as ConversationID, N as Nullable, R as ResponseTimestamp, S as SendOptions } from './Client-DZnura3y.js';
|
|
2
|
+
export { A as Account, l as AccountAccessToken, m as AccountAccessTokenID, cY as AccountAccessTokenWebhookEventType, v as AccountConversationSettings, e as AccountID, cX as AccountWebhookWebhookEventType, E as Action, F as ActionID, b9 as ActiveConversationStatus, a2 as BoilerplateCategory, a3 as BoilerplateCategoryID, K as BoilerplateContent, M as BoilerplateContentID, af as Channel, aw as ChannelConversationSettings, ag as ChannelID, C as Client, aC as CompositionSection, aD as CompositionSectionID, ba as ConcludedConversationStatus, aQ as Contact, aS as ContactCustomMetadata, aR as ContactID, cZ as ContactWebhookEventType, b7 as Conversation, b8 as ConversationCustomMetadata, bx as ConversationSettings, bb as ConversationStatus, c_ as ConversationWebhookEventType, o as CreateAccountAccessTokenOptions, n as CreateAccountAccessTokenPayload, p as CreateAccountAccessTokenResponse, g as CreateAccountOptions, f as CreateAccountPayload, h as CreateAccountResponse, a5 as CreateBoilerplateCategoryOptions, a4 as CreateBoilerplateCategoryPayload, a6 as CreateBoilerplateCategoryResponse, Q as CreateBoilerplateContentOptions, P as CreateBoilerplateContentPayload, T as CreateBoilerplateContentResponse, ai as CreateChannelOptions, ah as CreateChannelPayload, aj as CreateChannelResponse, aF as CreateCompositionSectionOptions, aE as CreateCompositionSectionPayload, aG as CreateCompositionSectionResponse, aU as CreateContactOptions, aT as CreateContactPayload, aV as CreateContactResponse, bd as CreateConversationOptions, bc as CreateConversationPayload, be as CreateConversationResponse, cc as CreateCorrectionModelOptions, cb as CreateCorrectionModelPayload, cd as CreateCorrectionResponse, bA as CreateLabelOptions, bz as CreateLabelPayload, bB as CreateLabelResponse, bT as CreateMessageOptions, bS as CreateMessagePayload, bU as CreateMessageResponse, co as CreateNoteOptions, cn as CreateNotePayload, cp as CreateNoteResponse, cf as CreateResponseModelOptions, ce as CreateResponseModelPayload, cg as CreateResponseResponse, cH as CreateUploadOptions, cI as CreateUploadResponse, d5 as CreateWebhookSubscriptionOptions, d4 as CreateWebhookSubscriptionPayload, d6 as CreateWebhookSubscriptionResponse, d as CurrentAccountID, q as DeleteAccountAccessTokenOptions, D as DeleteAccountAccessTokenPayload, r as DeleteAccountAccessTokenResponse, aW as DeleteContactOptions, aX as DeleteContactResponse, bf as DeleteConversationOptions, bg as DeleteConversationResponse, bC as DeleteLabelOptions, bD as DeleteLabelResponse, bV as DeleteMessageOptions, bW as DeleteMessageResponse, cJ as DeleteUploadOptions, cK as DeleteUploadResponse, d7 as DeleteWebhookSubscriptionOptions, d8 as DeleteWebhookSubscriptionResponse, cU as EventWebhookOptions, bp as FilterOptions, s as GetAccountAccessTokenOptions, t as GetAccountAccessTokenResponse, w as GetAccountConversationSettingsOptions, x as GetAccountConversationSettingsResponse, G as GetAccountOptions, i as GetAccountResponse, a7 as GetBoilerplateCategoryOptions, a8 as GetBoilerplateCategoryResponse, V as GetBoilerplateContentOptions, W as GetBoilerplateContentResponse, ax as GetChannelConversationSettingsOptions, ay as GetChannelConversationSettingsResponse, ak as GetChannelOptions, al as GetChannelResponse, aH as GetCompositionSectionOptions, aI as GetCompositionSectionResponse, aY as GetContactIncludeOptions, aZ as GetContactOptions, a_ as GetContactResponse, a$ as GetContactVCFOptions, bh as GetConversationIncludeOptions, bi as GetConversationOptions, bj as GetConversationResponse, bE as GetLabelOptions, bF as GetLabelResponse, bX as GetMessageOptions, bY as GetMessageResponse, ch as GetModelOptions, ci as GetModelResponse, cq as GetNoteOptions, cr as GetNoteResponse, cB as GetSourceOptions, cC as GetSourceResponse, cL as GetUploadOptions, cM as GetUploadResponse, cR as GetUserOptions, cS as GetUserResponse, d9 as GetWebhookSubscriptionOptions, da as GetWebhookSubscriptionResponse, by as Label, bG as LabelID, L as ListAccountAccessTokensOptions, u as ListAccountAccessTokensResponse, I as ListActionsOptions, J as ListActionsResponse, a9 as ListBoilerplateCategoriesIncludeOptions, aa as ListBoilerplateCategoriesOptions, ab as ListBoilerplateCategoriesResponse, X as ListBoilerplateCategoryBoilerplateContentsOptions, Y as ListBoilerplateCategoryBoilerplateContentsResponse, Z as ListBoilerplateContentsOptions, _ as ListBoilerplateContentsResponse, aJ as ListChannelCompositionSectionsOptions, aK as ListChannelCompositionSectionsResponse, bk as ListChannelConversationsOptions, bl as ListChannelConversationsResponse, bZ as ListChannelMessagesIncludeOptions, b_ as ListChannelMessagesOptions, b$ as ListChannelMessagesResponse, am as ListChannelsOptions, an as ListChannelsResponse, aL as ListCompositionSectionsOptions, aM as ListCompositionSectionsResponse, bm as ListContactConversationsOptions, bn as ListContactConversationsResponse, bH as ListContactLabelsOptions, bI as ListContactLabelsResponse, cs as ListContactNotesOptions, ct as ListContactNotesResponse, b0 as ListContactsOptions, b1 as ListContactsResponse, bJ as ListConversationLabelsOptions, bK as ListConversationLabelsResponse, c0 as ListConversationMessagesIncludeOptions, c1 as ListConversationMessagesOptions, c2 as ListConversationMessagesResponse, cu as ListConversationNotesOptions, cv as ListConversationNotesResponse, bq as ListConversationOptions, bo as ListConversationsIncludeOptions, br as ListConversationsResponse, b2 as ListLabelContactsOptions, b3 as ListLabelContactsResponse, bs as ListLabelConversationsOptions, bt as ListLabelConversationsResponse, bL as ListLabelsIncludeOptions, bM as ListLabelsOptions, bN as ListLabelsResponse, c3 as ListMessagesIncludeOptions, c4 as ListMessagesOptions, c5 as ListMessagesResponse, cj as ListModelsOptions, ck as ListModelsResponse, cD as ListSourcesOptions, cE as ListSourcesResponse, cN as ListUploadsOptions, cO as ListUploadsResponse, db as ListWebhookSubscriptionsOptions, dc as ListWebhookSubscriptionsResponse, bR as Message, c9 as MessageEventType, c6 as MessageID, c7 as MessageRole, c8 as MessageStatus, c$ as MessageWebhookEventType, ao as MetaWhatsappChannelGetBusinessProfileOptions, ap as MetaWhatsappChannelGetBusinessProfileResponse, ca as Model, cl as ModelID, cm as Note, cw as NoteID, O as Options, b as RequestFilterable, H as SortOptions, cA as Source, cF as SourceID, dd as TestWebhookSubscriptionOptions, de as TestWebhookSubscriptionResponse, c as TransportOptions, aq as TwilioSendChannelSyncPayload, ar as TwilioSendgridChannelSyncOptions, as as TwilioSendgridChannelSyncResponse, z as UpdateAccountConversationSettingsOptions, y as UpdateAccountConversationSettingsPayload, B as UpdateAccountConversationSettingsResponse, j as UpdateAccountOptions, U as UpdateAccountPayload, k as UpdateAccountResponse, ad as UpdateBoilerplateCategoryOptions, ac as UpdateBoilerplateCategoryPayload, ae as UpdateBoilerplateCategoryResponse, a0 as UpdateBoilerplateContentOptions, $ as UpdateBoilerplateContentPayload, a1 as UpdateBoilerplateContentResponse, aA as UpdateChannelConversationSettingsOptions, az as UpdateChannelConversationSettingsPayload, aB as UpdateChannelConversationSettingsResponse, au as UpdateChannelOptions, at as UpdateChannelPayload, av as UpdateChannelResponse, aO as UpdateCompositionSectionOptions, aN as UpdateCompositionSectionPayload, aP as UpdateCompositionSectionResponse, b5 as UpdateContactOptions, b4 as UpdateContactPayload, b6 as UpdateContactResponse, bv as UpdateConversationOptions, bu as UpdateConversationPayload, bw as UpdateConversationResponse, bP as UpdateLabelOptions, bO as UpdateLabelPayload, bQ as UpdateLabelResponse, cy as UpdateNoteOptions, cx as UpdateNotePayload, cz as UpdateNoteResponse, cG as Upload, cP as UploadID, cQ as User, cT as UserID, d1 as WebhookEventPayload, cW as WebhookEventType, d2 as WebhookResponse, d3 as WebhookSubscription, df as WebhookSubscriptionID, d0 as WebhookSubscriptionWebhookEventType, C as default, cV as eventWebhookSchema } from './Client-DZnura3y.js';
|
|
2
3
|
import { KyResponse } from 'ky';
|
|
3
4
|
import 'zod';
|
|
4
5
|
|
|
@@ -56,4 +57,61 @@ declare namespace index {
|
|
|
56
57
|
export { type index_ErrorResponse as ErrorResponse, index_SupportError as SupportError };
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Great Detail Support System.
|
|
62
|
+
*
|
|
63
|
+
* @copyright 2025 Great Detail Ltd
|
|
64
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
65
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
66
|
+
* @see https://greatdetail.com
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
type EscalationID = `esc${string}` | (string & NonNullable<unknown>);
|
|
70
|
+
type Escalation = {
|
|
71
|
+
id: EscalationID;
|
|
72
|
+
conversation: ConversationID;
|
|
73
|
+
reason?: Nullable<string>;
|
|
74
|
+
} & ResponseTimestamp;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Great Detail Support System.
|
|
78
|
+
*
|
|
79
|
+
* @copyright 2025 Great Detail Ltd
|
|
80
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
81
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
82
|
+
* @see https://greatdetail.com
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
type CreateEscalationPayload = {
|
|
86
|
+
conversation: ConversationID;
|
|
87
|
+
reason?: Nullable<string>;
|
|
88
|
+
};
|
|
89
|
+
interface CreateEscalationOptions {
|
|
90
|
+
body: CreateEscalationPayload;
|
|
91
|
+
request?: SendOptions;
|
|
92
|
+
}
|
|
93
|
+
type CreateEscalationResponse = {
|
|
94
|
+
data: {
|
|
95
|
+
escalation: Escalation;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Great Detail Support System.
|
|
101
|
+
*
|
|
102
|
+
* @copyright 2025 Great Detail Ltd
|
|
103
|
+
* @author Great Detail Ltd <info@greatdetail.com>
|
|
104
|
+
* @author Dom Webber <dom.webber@greatdetail.com>
|
|
105
|
+
* @see https://greatdetail.com
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
interface ListEscalationsOptions {
|
|
109
|
+
request?: SendOptions;
|
|
110
|
+
}
|
|
111
|
+
type ListEscalationsResponse = {
|
|
112
|
+
data: {
|
|
113
|
+
escalation: Escalation;
|
|
114
|
+
}[];
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export { ConversationID, type CreateEscalationOptions, type CreateEscalationPayload, type CreateEscalationResponse, DEFAULT_SUPPORT_BASE_URL, index as Error, type ErrorResponse, type Escalation, type ListEscalationsOptions, type ListEscalationsResponse, SupportError };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as t,c as e,d as p,e as f,f as o}from"./chunk-WIUEWWCB.js";var r={};t(r,{SupportError:()=>p});export{o as Client,e as DEFAULT_SUPPORT_BASE_URL,r as Error,p as SupportError,o as default,f as eventWebhookSchema};
|