@great-detail/support-sdk 0.24.1 → 0.24.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.
@@ -912,6 +912,9 @@ type Message = {
912
912
  messageEmail: {
913
913
  subject?: Nullable<string>;
914
914
  bodyText?: Nullable<string>;
915
+ bodyRichtext?: Nullable<{
916
+ root: LexicalRootNode;
917
+ }>;
915
918
  bodyHTML?: Nullable<string>;
916
919
  rawEML: string;
917
920
  };
@@ -2786,13 +2789,20 @@ type WhatsappPhoneNumberDetail = {
2786
2789
  * @see https://greatdetail.com
2787
2790
  */
2788
2791
 
2789
- interface GetWhatsappPhoneNumberOptions {
2792
+ interface GetWhatsappPhoneNumberIncludeOptions {
2793
+ detail?: boolean;
2794
+ [key: string]: boolean | undefined;
2795
+ }
2796
+ interface GetWhatsappPhoneNumberOptions<C extends GetWhatsappPhoneNumberIncludeOptions> {
2790
2797
  request?: SendOptions;
2798
+ include?: C;
2791
2799
  }
2792
- type GetWhatsappPhoneNumberResponse = ResponseData<{
2800
+ type GetWhatsappPhoneNumberResponse<C extends GetWhatsappPhoneNumberIncludeOptions> = ResponseData<{
2793
2801
  whatsappPhoneNumber: WhatsappPhoneNumber;
2794
2802
  whatsappAccount: WhatsappAccount;
2795
- detail: WhatsappPhoneNumberDetail;
2803
+ detail?: C extends {
2804
+ detail: true;
2805
+ } ? WhatsappPhoneNumberDetail : never;
2796
2806
  }>;
2797
2807
 
2798
2808
  /**
@@ -2816,10 +2826,10 @@ type ListWhatsappPhoneNumbersResponse = ResponseData<{
2816
2826
  declare class WhatsappPhoneNumberAPI {
2817
2827
  protected _transport: FetchTransport;
2818
2828
  constructor(_transport: FetchTransport);
2819
- get(id: string, { request }?: GetWhatsappPhoneNumberOptions): {
2829
+ get<C extends GetWhatsappPhoneNumberIncludeOptions>(id: string, { include, request }?: GetWhatsappPhoneNumberOptions<C>): {
2820
2830
  requestID: string;
2821
- response: () => Promise<ky.KyResponse<GetWhatsappPhoneNumberResponse>>;
2822
- json: () => Promise<GetWhatsappPhoneNumberResponse>;
2831
+ response: () => Promise<ky.KyResponse<GetWhatsappPhoneNumberResponse<C>>>;
2832
+ json: () => Promise<GetWhatsappPhoneNumberResponse<C>>;
2823
2833
  };
2824
2834
  list({ whatsappAccount, channel, request, }?: ListWhatsappPhoneNumbersOptions): {
2825
2835
  requestID: string;
@@ -3196,6 +3206,9 @@ type CreateMessagePayload = {
3196
3206
  messageEmail: {
3197
3207
  subject?: Nullable<string>;
3198
3208
  bodyText?: Nullable<string>;
3209
+ bodyRichtext?: Nullable<{
3210
+ root: LexicalRootNode;
3211
+ }>;
3199
3212
  bodyHTML?: Nullable<string>;
3200
3213
  rawEML: string;
3201
3214
  };
@@ -4342,4 +4355,4 @@ declare class Client {
4342
4355
  };
4343
4356
  }
4344
4357
 
4345
- export { type BoilerplateContentID as $, type Account as A, type AccountConversationSettings as B, Client as C, type DeleteAccountAccessTokenPayload as D, type GetAccountConversationSettingsOptions as E, type GetAccountConversationSettingsResponse as F, type GetAccountOptions as G, type UpdateAccountConversationSettingsPayload as H, type UpdateAccountConversationSettingsOptions as I, type UpdateAccountConversationSettingsResponse as J, type AccountNotificationEvent as K, type ListAccountsOptions as L, type GetAccountNotificationEventOptions as M, type GetAccountNotificationEventResponse as N, type Options as O, type ListAccountNotificationEventsFilterOptions as P, type ListAccountNotificationEventsOptions as Q, type ResponseData as R, type ListAccountNotificationEventsResponse as S, type Action as T, type UpdateAccountPayload as U, type ActionID as V, type ActionStatus as W, type SortOptions as X, type ListActionsOptions as Y, type ListActionsResponse as Z, type BoilerplateContent as _, type Options$4 as a, type CreateEscalationOptions as a$, type CreateBoilerplateContentPayload as a0, type CreateBoilerplateContentOptions as a1, type CreateBoilerplateContentResponse as a2, type GetBoilerplateContentOptions as a3, type GetBoilerplateContentResponse as a4, type ListBoilerplateContentsOptions as a5, type ListBoilerplateContentsResponse as a6, type UpdateBoilerplateContentPayload as a7, type UpdateBoilerplateContentOptions as a8, type UpdateBoilerplateContentResponse as a9, type SendChannelSyncPayload as aA, type SendgridChannelSyncOptions as aB, type SendgridChannelSyncResponse as aC, type UpdateChannelPayload as aD, type UpdateChannelOptions as aE, type UpdateChannelResponse as aF, type ChannelConversationSettings as aG, type GetChannelConversationSettingsOptions as aH, type GetChannelConversationSettingsResponse as aI, type UpdateChannelConversationSettingsPayload as aJ, type UpdateChannelConversationSettingsOptions as aK, type UpdateChannelConversationSettingsResponse as aL, type CompositionSection as aM, type CompositionSectionID as aN, type CompositionSectionLocation as aO, type CreateCompositionSectionPayload as aP, type CreateCompositionSectionOptions as aQ, type CreateCompositionSectionResponse as aR, type GetCompositionSectionOptions as aS, type GetCompositionSectionResponse as aT, type ListCompositionSectionsOptions as aU, type ListCompositionSectionsResponse as aV, type UpdateCompositionSectionPayload as aW, type UpdateCompositionSectionOptions as aX, type UpdateCompositionSectionResponse as aY, type Escalation as aZ, type CreateEscalationPayload as a_, type BoilerplateCategory as aa, type BoilerplateCategoryID as ab, type CreateBoilerplateCategoryPayload as ac, type CreateBoilerplateCategoryOptions as ad, type CreateBoilerplateCategoryResponse as ae, type GetBoilerplateCategoryOptions as af, type GetBoilerplateCategoryResponse as ag, type ListBoilerplateCategoriesIncludeOptions as ah, type ListBoilerplateCategoriesOptions as ai, type ListBoilerplateCategoriesResponse as aj, type UpdateBoilerplateCategoryPayload as ak, type UpdateBoilerplateCategoryOptions as al, type UpdateBoilerplateCategoryResponse as am, type Channel as an, type ChannelID as ao, type ChannelStatus as ap, type CustomChannelCustomMetadata as aq, type CreateChannelPayload as ar, type CreateChannelOptions as as, type CreateChannelResponse as at, type DeleteChannelOptions as au, type DeleteChannelResponse as av, type GetChannelOptions as aw, type GetChannelResponse as ax, type ListChannelsOptions as ay, type ListChannelsResponse as az, type ResponseMeta as b, type CreateLabelResponse as b$, type CreateEscalationResponse as b0, type GetEscalationOptions as b1, type GetEscalationResponse as b2, type ListEscalationsOptions as b3, type ListEscalationsResponse as b4, type DeleteEscalationOptions as b5, type DeleteEscalationResponse as b6, type Contact as b7, type ContactID as b8, type ContactType as b9, type DeleteConversationResponse as bA, type GetConversationIncludeOptions as bB, type GetConversationOptions as bC, type GetConversationResponse as bD, type ListConversationsIncludeOptions as bE, type ListConversationsFilterOptions as bF, type ListConversationOptions as bG, type ListConversationsResponse as bH, type UpdateConversationPayload as bI, type UpdateConversationOptions as bJ, type UpdateConversationResponse as bK, type TriggerResponseConversationOptions as bL, type TriggerResponseConversationResponse as bM, type ConversationSettings as bN, type ConversationFeedback as bO, type CreateConversationFeedbackPayload as bP, type CreateConversationFeedbackOptions as bQ, type CreateConversationFeedbackResponse as bR, type DeleteConversationFeedbackOptions as bS, type DeleteConversationFeedbackResponse as bT, type GetConversationFeedbackOptions as bU, type GetConversationFeedbackResponse as bV, type ListConversationFeedbackOptions as bW, type ListConversationFeedbackResponse as bX, type Label as bY, type CreateLabelPayload as bZ, type CreateLabelOptions as b_, type ContactStatus as ba, type ContactCustomMetadata as bb, type CreateContactPayload as bc, type CreateContactOptions as bd, type CreateContactResponse as be, type DeleteContactOptions as bf, type DeleteContactResponse as bg, type GetContactIncludeOptions as bh, type GetContactOptions as bi, type GetContactResponse as bj, type GetContactVCFOptions as bk, type ListContactsOptions as bl, type ListContactsResponse as bm, type UpdateContactPayload as bn, type UpdateContactOptions as bo, type UpdateContactResponse as bp, type Conversation as bq, type ConversationID as br, type ConversationCustomMetadata as bs, type ActiveConversationStatus as bt, type ConcludedConversationStatus as bu, type ConversationStatus as bv, type CreateConversationPayload as bw, type CreateConversationOptions as bx, type CreateConversationResponse as by, type DeleteConversationOptions as bz, type ResponseTimestamp as c, type WhatsappTemplateRejectionReason as c$, type DeleteLabelOptions as c0, type DeleteLabelResponse as c1, type GetLabelOptions as c2, type GetLabelResponse as c3, type LabelID as c4, type ListLabelsIncludeOptions as c5, type ListLabelsOptions as c6, type ListLabelsResponse as c7, type UpdateLabelPayload as c8, type UpdateLabelOptions as c9, type WhatsappPhoneNumber as cA, type GetWhatsappPhoneNumberOptions as cB, type GetWhatsappPhoneNumberResponse as cC, type ListWhatsappPhoneNumbersOptions as cD, type ListWhatsappPhoneNumbersResponse as cE, type DeleteWhatsappAccountTemplateOptions as cF, type DeleteWhatsappAccountTemplateResponse as cG, type GetWhatsappAccountTemplateOptions as cH, type GetWhatsappAccountTemplateResponse as cI, type ListWhatsappAccountTemplatesOptions as cJ, type ListWhatsappAccountTemplatesResponse as cK, WHATSAPP_TEMPLATE_STATUSES as cL, type WhatsappTemplateStatus as cM, WHATSAPP_TEMPLATE_LANGUAGES as cN, type WhatsappTemplateLanguage as cO, WHATSAPP_TEMPLATE_CATEGORIES as cP, type WhatsappTemplateCategory as cQ, WHATSAPP_TEMPLATE_SUBCATEGORIES as cR, type WhatsappTemplateSubcategory as cS, WHATSAPP_TEMPLATE_INDUSTRIES as cT, type WhatsappTemplateIndustry as cU, WHATSAPP_TEMPLATE_TOPICS as cV, type WhatsappTemplateTopic as cW, WHATSAPP_TEMPLATE_USECASES as cX, type WhatsappTemplateUseCase as cY, WHATSAPP_TEMPLATE_QUALITY_SCORES as cZ, type WhatsappTemplateQualityScore as c_, type UpdateLabelResponse as ca, type Import as cb, type CreateImportPayload as cc, type CreateImportOptions as cd, type CreateImportResponse as ce, type GetImportOptions as cf, type GetImportResponse as cg, type ListImportsOptions as ch, type ListImportsResponse as ci, type ImportID as cj, type ImportType as ck, type ImportStatus as cl, type WhatsappAccount as cm, type WhatsappAccountDetail as cn, type GetWhatsappAccountIncludeOptions as co, type GetWhatsappAccountOptions as cp, type GetWhatsappAccountResponse as cq, type ListWhatsappAccountsOptions as cr, type ListWhatsappAccountsResponse as cs, WHATSAPP_BUSINESS_PROFILE_VERTICAL as ct, type WhatsappBusinessProfileDetail as cu, type GetWhatsappBusinessProfileOptions as cv, type GetWhatsappBusinessProfileResponse as cw, type UpdateWhatsappBusinessProfilePayload as cx, type UpdateWhatsappBusinessProfileOptions as cy, type UpdateWhatsappBusinessProfileResponse as cz, type CursorResponsePagination as d, type UpdateNotePayload as d$, type WhatsappTemplateParameterFormat as d0, type WhatsappTemplateButton as d1, type WhatsappAccountTemplate as d2, type WhatsappLibraryTemplate as d3, type Message as d4, type LexicalDirection as d5, type LexicalIndent as d6, type LexicalTextNode as d7, type LexicalLinkNode as d8, type LexicalQuoteNode as d9, type CreateModelConfigPayload as dA, type CreateModelConfigOptions as dB, type CreateModelConfigResponse as dC, type DeleteModelConfigOptions as dD, type DeleteModelConfigResponse as dE, type UpdateModelConfigPayload as dF, type UpdateModelConfigOptions as dG, type UpdateModelConfigResponse as dH, type GetModelConfigOptions as dI, type GetModelConfigResponse as dJ, type ListModelConfigsOptions as dK, type ListModelConfigsResponse as dL, type ModelInterface as dM, type GetModelInterfaceOptions as dN, type GetModelInterfaceResponse as dO, type ListModelInterfacesOptions as dP, type ListModelInterfacesResponse as dQ, type ModelInterfaceID as dR, type Note as dS, type CreateNotePayload as dT, type CreateNoteOptions as dU, type CreateNoteResponse as dV, type GetNoteOptions as dW, type GetNoteResponse as dX, type ListNotesOptions as dY, type ListNotesResponse as dZ, type NoteID as d_, type LexicalHeadingNode as da, type LexicalParagraphNode as db, type LexicalListItemNode as dc, type LexicalListNode as dd, type LexicalHorizontalRuleNode as de, type LexicalUploadNode as df, type LexicalRootNode as dg, type CreateMessagePayload as dh, type CreateMessageOptions as di, type CreateMessageResponse as dj, type DeleteMessageOptions as dk, type DeleteMessageResponse as dl, type GetMessageOptions as dm, type GetMessageResponse as dn, type ListMessagesIncludeOptions as dp, type ListMessagesOptions as dq, type ListMessagesResponse as dr, type MessageID as ds, type MessageRole as dt, type MessageType as du, type MessageStatus as dv, type MessageVisibility as dw, type MessageEventType as dx, type MessageCustomMetadata as dy, type ModelConfig as dz, type CountResponsePagination as e, type UpdateNoteOptions as e0, type UpdateNoteResponse as e1, type NotificationEvent as e2, type Source as e3, type GetSourceOptions as e4, type GetSourceResponse as e5, type ListSourcesOptions as e6, type ListSourcesResponse as e7, type SourceID as e8, type SourceAdornment as e9, type WebhookSubscription as eA, type CreateWebhookSubscriptionPayload as eB, type CreateWebhookSubscriptionOptions as eC, type CreateWebhookSubscriptionResponse as eD, type DeleteWebhookSubscriptionOptions as eE, type DeleteWebhookSubscriptionResponse as eF, type GetWebhookSubscriptionOptions as eG, type GetWebhookSubscriptionResponse as eH, type ListWebhookSubscriptionsOptions as eI, type ListWebhookSubscriptionsResponse as eJ, type TestWebhookSubscriptionOptions as eK, type TestWebhookSubscriptionResponse as eL, type WebhookSubscriptionID as eM, type Upload as ea, type CreateUploadIncludeOptions as eb, type CreateUploadOptions as ec, type CreateUploadResponse as ed, type DeleteUploadOptions as ee, type DeleteUploadResponse as ef, type GetUploadIncludeOptions as eg, type GetUploadOptions as eh, type GetUploadResponse as ei, type ListUploadsIncludeOptions as ej, type ListUploadsOptions as ek, type ListUploadsResponse as el, type UploadID as em, type EventWebhookOptions as en, eventWebhookSchema as eo, type WebhookEventType as ep, type AccountWebhookWebhookEventType as eq, type AccountAccessTokenWebhookEventType as er, type AccountNotificationEventEventType as es, type ContactWebhookEventType as et, type ConversationWebhookEventType as eu, type MessageWebhookEventType as ev, type ImportWebhookEventType as ew, type WebhookSubscriptionWebhookEventType as ex, type WebhookEventPayload as ey, type WebhookResponse as ez, type CurrentAccountID as f, type AccountStatus as g, type AccountID as h, type CreateAccountPayload as i, type CreateAccountOptions as j, type CreateAccountResponse as k, type GetAccountResponse as l, type UpdateAccountOptions as m, type UpdateAccountResponse as n, type ListAccountsResponse as o, type AccountAccessToken as p, type AccountAccessTokenID as q, type CreateAccountAccessTokenPayload as r, type CreateAccountAccessTokenOptions as s, type CreateAccountAccessTokenResponse as t, type DeleteAccountAccessTokenOptions as u, type DeleteAccountAccessTokenResponse as v, type GetAccountAccessTokenOptions as w, type GetAccountAccessTokenResponse as x, type ListAccountAccessTokensOptions as y, type ListAccountAccessTokensResponse as z };
4358
+ export { type BoilerplateContentID as $, type Account as A, type AccountConversationSettings as B, Client as C, type DeleteAccountAccessTokenPayload as D, type GetAccountConversationSettingsOptions as E, type GetAccountConversationSettingsResponse as F, type GetAccountOptions as G, type UpdateAccountConversationSettingsPayload as H, type UpdateAccountConversationSettingsOptions as I, type UpdateAccountConversationSettingsResponse as J, type AccountNotificationEvent as K, type ListAccountsOptions as L, type GetAccountNotificationEventOptions as M, type GetAccountNotificationEventResponse as N, type Options as O, type ListAccountNotificationEventsFilterOptions as P, type ListAccountNotificationEventsOptions as Q, type ResponseData as R, type ListAccountNotificationEventsResponse as S, type Action as T, type UpdateAccountPayload as U, type ActionID as V, type ActionStatus as W, type SortOptions as X, type ListActionsOptions as Y, type ListActionsResponse as Z, type BoilerplateContent as _, type Options$4 as a, type CreateEscalationOptions as a$, type CreateBoilerplateContentPayload as a0, type CreateBoilerplateContentOptions as a1, type CreateBoilerplateContentResponse as a2, type GetBoilerplateContentOptions as a3, type GetBoilerplateContentResponse as a4, type ListBoilerplateContentsOptions as a5, type ListBoilerplateContentsResponse as a6, type UpdateBoilerplateContentPayload as a7, type UpdateBoilerplateContentOptions as a8, type UpdateBoilerplateContentResponse as a9, type SendChannelSyncPayload as aA, type SendgridChannelSyncOptions as aB, type SendgridChannelSyncResponse as aC, type UpdateChannelPayload as aD, type UpdateChannelOptions as aE, type UpdateChannelResponse as aF, type ChannelConversationSettings as aG, type GetChannelConversationSettingsOptions as aH, type GetChannelConversationSettingsResponse as aI, type UpdateChannelConversationSettingsPayload as aJ, type UpdateChannelConversationSettingsOptions as aK, type UpdateChannelConversationSettingsResponse as aL, type CompositionSection as aM, type CompositionSectionID as aN, type CompositionSectionLocation as aO, type CreateCompositionSectionPayload as aP, type CreateCompositionSectionOptions as aQ, type CreateCompositionSectionResponse as aR, type GetCompositionSectionOptions as aS, type GetCompositionSectionResponse as aT, type ListCompositionSectionsOptions as aU, type ListCompositionSectionsResponse as aV, type UpdateCompositionSectionPayload as aW, type UpdateCompositionSectionOptions as aX, type UpdateCompositionSectionResponse as aY, type Escalation as aZ, type CreateEscalationPayload as a_, type BoilerplateCategory as aa, type BoilerplateCategoryID as ab, type CreateBoilerplateCategoryPayload as ac, type CreateBoilerplateCategoryOptions as ad, type CreateBoilerplateCategoryResponse as ae, type GetBoilerplateCategoryOptions as af, type GetBoilerplateCategoryResponse as ag, type ListBoilerplateCategoriesIncludeOptions as ah, type ListBoilerplateCategoriesOptions as ai, type ListBoilerplateCategoriesResponse as aj, type UpdateBoilerplateCategoryPayload as ak, type UpdateBoilerplateCategoryOptions as al, type UpdateBoilerplateCategoryResponse as am, type Channel as an, type ChannelID as ao, type ChannelStatus as ap, type CustomChannelCustomMetadata as aq, type CreateChannelPayload as ar, type CreateChannelOptions as as, type CreateChannelResponse as at, type DeleteChannelOptions as au, type DeleteChannelResponse as av, type GetChannelOptions as aw, type GetChannelResponse as ax, type ListChannelsOptions as ay, type ListChannelsResponse as az, type ResponseMeta as b, type CreateLabelResponse as b$, type CreateEscalationResponse as b0, type GetEscalationOptions as b1, type GetEscalationResponse as b2, type ListEscalationsOptions as b3, type ListEscalationsResponse as b4, type DeleteEscalationOptions as b5, type DeleteEscalationResponse as b6, type Contact as b7, type ContactID as b8, type ContactType as b9, type DeleteConversationResponse as bA, type GetConversationIncludeOptions as bB, type GetConversationOptions as bC, type GetConversationResponse as bD, type ListConversationsIncludeOptions as bE, type ListConversationsFilterOptions as bF, type ListConversationOptions as bG, type ListConversationsResponse as bH, type UpdateConversationPayload as bI, type UpdateConversationOptions as bJ, type UpdateConversationResponse as bK, type TriggerResponseConversationOptions as bL, type TriggerResponseConversationResponse as bM, type ConversationSettings as bN, type ConversationFeedback as bO, type CreateConversationFeedbackPayload as bP, type CreateConversationFeedbackOptions as bQ, type CreateConversationFeedbackResponse as bR, type DeleteConversationFeedbackOptions as bS, type DeleteConversationFeedbackResponse as bT, type GetConversationFeedbackOptions as bU, type GetConversationFeedbackResponse as bV, type ListConversationFeedbackOptions as bW, type ListConversationFeedbackResponse as bX, type Label as bY, type CreateLabelPayload as bZ, type CreateLabelOptions as b_, type ContactStatus as ba, type ContactCustomMetadata as bb, type CreateContactPayload as bc, type CreateContactOptions as bd, type CreateContactResponse as be, type DeleteContactOptions as bf, type DeleteContactResponse as bg, type GetContactIncludeOptions as bh, type GetContactOptions as bi, type GetContactResponse as bj, type GetContactVCFOptions as bk, type ListContactsOptions as bl, type ListContactsResponse as bm, type UpdateContactPayload as bn, type UpdateContactOptions as bo, type UpdateContactResponse as bp, type Conversation as bq, type ConversationID as br, type ConversationCustomMetadata as bs, type ActiveConversationStatus as bt, type ConcludedConversationStatus as bu, type ConversationStatus as bv, type CreateConversationPayload as bw, type CreateConversationOptions as bx, type CreateConversationResponse as by, type DeleteConversationOptions as bz, type ResponseTimestamp as c, type WhatsappTemplateQualityScore as c$, type DeleteLabelOptions as c0, type DeleteLabelResponse as c1, type GetLabelOptions as c2, type GetLabelResponse as c3, type LabelID as c4, type ListLabelsIncludeOptions as c5, type ListLabelsOptions as c6, type ListLabelsResponse as c7, type UpdateLabelPayload as c8, type UpdateLabelOptions as c9, type WhatsappPhoneNumber as cA, type GetWhatsappPhoneNumberIncludeOptions as cB, type GetWhatsappPhoneNumberOptions as cC, type GetWhatsappPhoneNumberResponse as cD, type ListWhatsappPhoneNumbersOptions as cE, type ListWhatsappPhoneNumbersResponse as cF, type DeleteWhatsappAccountTemplateOptions as cG, type DeleteWhatsappAccountTemplateResponse as cH, type GetWhatsappAccountTemplateOptions as cI, type GetWhatsappAccountTemplateResponse as cJ, type ListWhatsappAccountTemplatesOptions as cK, type ListWhatsappAccountTemplatesResponse as cL, WHATSAPP_TEMPLATE_STATUSES as cM, type WhatsappTemplateStatus as cN, WHATSAPP_TEMPLATE_LANGUAGES as cO, type WhatsappTemplateLanguage as cP, WHATSAPP_TEMPLATE_CATEGORIES as cQ, type WhatsappTemplateCategory as cR, WHATSAPP_TEMPLATE_SUBCATEGORIES as cS, type WhatsappTemplateSubcategory as cT, WHATSAPP_TEMPLATE_INDUSTRIES as cU, type WhatsappTemplateIndustry as cV, WHATSAPP_TEMPLATE_TOPICS as cW, type WhatsappTemplateTopic as cX, WHATSAPP_TEMPLATE_USECASES as cY, type WhatsappTemplateUseCase as cZ, WHATSAPP_TEMPLATE_QUALITY_SCORES as c_, type UpdateLabelResponse as ca, type Import as cb, type CreateImportPayload as cc, type CreateImportOptions as cd, type CreateImportResponse as ce, type GetImportOptions as cf, type GetImportResponse as cg, type ListImportsOptions as ch, type ListImportsResponse as ci, type ImportID as cj, type ImportType as ck, type ImportStatus as cl, type WhatsappAccount as cm, type WhatsappAccountDetail as cn, type GetWhatsappAccountIncludeOptions as co, type GetWhatsappAccountOptions as cp, type GetWhatsappAccountResponse as cq, type ListWhatsappAccountsOptions as cr, type ListWhatsappAccountsResponse as cs, WHATSAPP_BUSINESS_PROFILE_VERTICAL as ct, type WhatsappBusinessProfileDetail as cu, type GetWhatsappBusinessProfileOptions as cv, type GetWhatsappBusinessProfileResponse as cw, type UpdateWhatsappBusinessProfilePayload as cx, type UpdateWhatsappBusinessProfileOptions as cy, type UpdateWhatsappBusinessProfileResponse as cz, type CursorResponsePagination as d, type NoteID as d$, type WhatsappTemplateRejectionReason as d0, type WhatsappTemplateParameterFormat as d1, type WhatsappTemplateButton as d2, type WhatsappAccountTemplate as d3, type WhatsappLibraryTemplate as d4, type Message as d5, type LexicalDirection as d6, type LexicalIndent as d7, type LexicalTextNode as d8, type LexicalLinkNode as d9, type ModelConfig as dA, type CreateModelConfigPayload as dB, type CreateModelConfigOptions as dC, type CreateModelConfigResponse as dD, type DeleteModelConfigOptions as dE, type DeleteModelConfigResponse as dF, type UpdateModelConfigPayload as dG, type UpdateModelConfigOptions as dH, type UpdateModelConfigResponse as dI, type GetModelConfigOptions as dJ, type GetModelConfigResponse as dK, type ListModelConfigsOptions as dL, type ListModelConfigsResponse as dM, type ModelInterface as dN, type GetModelInterfaceOptions as dO, type GetModelInterfaceResponse as dP, type ListModelInterfacesOptions as dQ, type ListModelInterfacesResponse as dR, type ModelInterfaceID as dS, type Note as dT, type CreateNotePayload as dU, type CreateNoteOptions as dV, type CreateNoteResponse as dW, type GetNoteOptions as dX, type GetNoteResponse as dY, type ListNotesOptions as dZ, type ListNotesResponse as d_, type LexicalQuoteNode as da, type LexicalHeadingNode as db, type LexicalParagraphNode as dc, type LexicalListItemNode as dd, type LexicalListNode as de, type LexicalHorizontalRuleNode as df, type LexicalUploadNode as dg, type LexicalRootNode as dh, type CreateMessagePayload as di, type CreateMessageOptions as dj, type CreateMessageResponse as dk, type DeleteMessageOptions as dl, type DeleteMessageResponse as dm, type GetMessageOptions as dn, type GetMessageResponse as dp, type ListMessagesIncludeOptions as dq, type ListMessagesOptions as dr, type ListMessagesResponse as ds, type MessageID as dt, type MessageRole as du, type MessageType as dv, type MessageStatus as dw, type MessageVisibility as dx, type MessageEventType as dy, type MessageCustomMetadata as dz, type CountResponsePagination as e, type UpdateNotePayload as e0, type UpdateNoteOptions as e1, type UpdateNoteResponse as e2, type NotificationEvent as e3, type Source as e4, type GetSourceOptions as e5, type GetSourceResponse as e6, type ListSourcesOptions as e7, type ListSourcesResponse as e8, type SourceID as e9, type WebhookResponse as eA, type WebhookSubscription as eB, type CreateWebhookSubscriptionPayload as eC, type CreateWebhookSubscriptionOptions as eD, type CreateWebhookSubscriptionResponse as eE, type DeleteWebhookSubscriptionOptions as eF, type DeleteWebhookSubscriptionResponse as eG, type GetWebhookSubscriptionOptions as eH, type GetWebhookSubscriptionResponse as eI, type ListWebhookSubscriptionsOptions as eJ, type ListWebhookSubscriptionsResponse as eK, type TestWebhookSubscriptionOptions as eL, type TestWebhookSubscriptionResponse as eM, type WebhookSubscriptionID as eN, type SourceAdornment as ea, type Upload as eb, type CreateUploadIncludeOptions as ec, type CreateUploadOptions as ed, type CreateUploadResponse as ee, type DeleteUploadOptions as ef, type DeleteUploadResponse as eg, type GetUploadIncludeOptions as eh, type GetUploadOptions as ei, type GetUploadResponse as ej, type ListUploadsIncludeOptions as ek, type ListUploadsOptions as el, type ListUploadsResponse as em, type UploadID as en, type EventWebhookOptions as eo, eventWebhookSchema as ep, type WebhookEventType as eq, type AccountWebhookWebhookEventType as er, type AccountAccessTokenWebhookEventType as es, type AccountNotificationEventEventType as et, type ContactWebhookEventType as eu, type ConversationWebhookEventType as ev, type MessageWebhookEventType as ew, type ImportWebhookEventType as ex, type WebhookSubscriptionWebhookEventType as ey, type WebhookEventPayload as ez, type CurrentAccountID as f, type AccountStatus as g, type AccountID as h, type CreateAccountPayload as i, type CreateAccountOptions as j, type CreateAccountResponse as k, type GetAccountResponse as l, type UpdateAccountOptions as m, type UpdateAccountResponse as n, type ListAccountsResponse as o, type AccountAccessToken as p, type AccountAccessTokenID as q, type CreateAccountAccessTokenPayload as r, type CreateAccountAccessTokenOptions as s, type CreateAccountAccessTokenResponse as t, type DeleteAccountAccessTokenOptions as u, type DeleteAccountAccessTokenResponse as v, type GetAccountAccessTokenOptions as w, type GetAccountAccessTokenResponse as x, type ListAccountAccessTokensOptions as y, type ListAccountAccessTokensResponse as z };
@@ -912,6 +912,9 @@ type Message = {
912
912
  messageEmail: {
913
913
  subject?: Nullable<string>;
914
914
  bodyText?: Nullable<string>;
915
+ bodyRichtext?: Nullable<{
916
+ root: LexicalRootNode;
917
+ }>;
915
918
  bodyHTML?: Nullable<string>;
916
919
  rawEML: string;
917
920
  };
@@ -2786,13 +2789,20 @@ type WhatsappPhoneNumberDetail = {
2786
2789
  * @see https://greatdetail.com
2787
2790
  */
2788
2791
 
2789
- interface GetWhatsappPhoneNumberOptions {
2792
+ interface GetWhatsappPhoneNumberIncludeOptions {
2793
+ detail?: boolean;
2794
+ [key: string]: boolean | undefined;
2795
+ }
2796
+ interface GetWhatsappPhoneNumberOptions<C extends GetWhatsappPhoneNumberIncludeOptions> {
2790
2797
  request?: SendOptions;
2798
+ include?: C;
2791
2799
  }
2792
- type GetWhatsappPhoneNumberResponse = ResponseData<{
2800
+ type GetWhatsappPhoneNumberResponse<C extends GetWhatsappPhoneNumberIncludeOptions> = ResponseData<{
2793
2801
  whatsappPhoneNumber: WhatsappPhoneNumber;
2794
2802
  whatsappAccount: WhatsappAccount;
2795
- detail: WhatsappPhoneNumberDetail;
2803
+ detail?: C extends {
2804
+ detail: true;
2805
+ } ? WhatsappPhoneNumberDetail : never;
2796
2806
  }>;
2797
2807
 
2798
2808
  /**
@@ -2816,10 +2826,10 @@ type ListWhatsappPhoneNumbersResponse = ResponseData<{
2816
2826
  declare class WhatsappPhoneNumberAPI {
2817
2827
  protected _transport: FetchTransport;
2818
2828
  constructor(_transport: FetchTransport);
2819
- get(id: string, { request }?: GetWhatsappPhoneNumberOptions): {
2829
+ get<C extends GetWhatsappPhoneNumberIncludeOptions>(id: string, { include, request }?: GetWhatsappPhoneNumberOptions<C>): {
2820
2830
  requestID: string;
2821
- response: () => Promise<ky.KyResponse<GetWhatsappPhoneNumberResponse>>;
2822
- json: () => Promise<GetWhatsappPhoneNumberResponse>;
2831
+ response: () => Promise<ky.KyResponse<GetWhatsappPhoneNumberResponse<C>>>;
2832
+ json: () => Promise<GetWhatsappPhoneNumberResponse<C>>;
2823
2833
  };
2824
2834
  list({ whatsappAccount, channel, request, }?: ListWhatsappPhoneNumbersOptions): {
2825
2835
  requestID: string;
@@ -3196,6 +3206,9 @@ type CreateMessagePayload = {
3196
3206
  messageEmail: {
3197
3207
  subject?: Nullable<string>;
3198
3208
  bodyText?: Nullable<string>;
3209
+ bodyRichtext?: Nullable<{
3210
+ root: LexicalRootNode;
3211
+ }>;
3199
3212
  bodyHTML?: Nullable<string>;
3200
3213
  rawEML: string;
3201
3214
  };
@@ -4342,4 +4355,4 @@ declare class Client {
4342
4355
  };
4343
4356
  }
4344
4357
 
4345
- export { type BoilerplateContentID as $, type Account as A, type AccountConversationSettings as B, Client as C, type DeleteAccountAccessTokenPayload as D, type GetAccountConversationSettingsOptions as E, type GetAccountConversationSettingsResponse as F, type GetAccountOptions as G, type UpdateAccountConversationSettingsPayload as H, type UpdateAccountConversationSettingsOptions as I, type UpdateAccountConversationSettingsResponse as J, type AccountNotificationEvent as K, type ListAccountsOptions as L, type GetAccountNotificationEventOptions as M, type GetAccountNotificationEventResponse as N, type Options as O, type ListAccountNotificationEventsFilterOptions as P, type ListAccountNotificationEventsOptions as Q, type ResponseData as R, type ListAccountNotificationEventsResponse as S, type Action as T, type UpdateAccountPayload as U, type ActionID as V, type ActionStatus as W, type SortOptions as X, type ListActionsOptions as Y, type ListActionsResponse as Z, type BoilerplateContent as _, type Options$4 as a, type CreateEscalationOptions as a$, type CreateBoilerplateContentPayload as a0, type CreateBoilerplateContentOptions as a1, type CreateBoilerplateContentResponse as a2, type GetBoilerplateContentOptions as a3, type GetBoilerplateContentResponse as a4, type ListBoilerplateContentsOptions as a5, type ListBoilerplateContentsResponse as a6, type UpdateBoilerplateContentPayload as a7, type UpdateBoilerplateContentOptions as a8, type UpdateBoilerplateContentResponse as a9, type SendChannelSyncPayload as aA, type SendgridChannelSyncOptions as aB, type SendgridChannelSyncResponse as aC, type UpdateChannelPayload as aD, type UpdateChannelOptions as aE, type UpdateChannelResponse as aF, type ChannelConversationSettings as aG, type GetChannelConversationSettingsOptions as aH, type GetChannelConversationSettingsResponse as aI, type UpdateChannelConversationSettingsPayload as aJ, type UpdateChannelConversationSettingsOptions as aK, type UpdateChannelConversationSettingsResponse as aL, type CompositionSection as aM, type CompositionSectionID as aN, type CompositionSectionLocation as aO, type CreateCompositionSectionPayload as aP, type CreateCompositionSectionOptions as aQ, type CreateCompositionSectionResponse as aR, type GetCompositionSectionOptions as aS, type GetCompositionSectionResponse as aT, type ListCompositionSectionsOptions as aU, type ListCompositionSectionsResponse as aV, type UpdateCompositionSectionPayload as aW, type UpdateCompositionSectionOptions as aX, type UpdateCompositionSectionResponse as aY, type Escalation as aZ, type CreateEscalationPayload as a_, type BoilerplateCategory as aa, type BoilerplateCategoryID as ab, type CreateBoilerplateCategoryPayload as ac, type CreateBoilerplateCategoryOptions as ad, type CreateBoilerplateCategoryResponse as ae, type GetBoilerplateCategoryOptions as af, type GetBoilerplateCategoryResponse as ag, type ListBoilerplateCategoriesIncludeOptions as ah, type ListBoilerplateCategoriesOptions as ai, type ListBoilerplateCategoriesResponse as aj, type UpdateBoilerplateCategoryPayload as ak, type UpdateBoilerplateCategoryOptions as al, type UpdateBoilerplateCategoryResponse as am, type Channel as an, type ChannelID as ao, type ChannelStatus as ap, type CustomChannelCustomMetadata as aq, type CreateChannelPayload as ar, type CreateChannelOptions as as, type CreateChannelResponse as at, type DeleteChannelOptions as au, type DeleteChannelResponse as av, type GetChannelOptions as aw, type GetChannelResponse as ax, type ListChannelsOptions as ay, type ListChannelsResponse as az, type ResponseMeta as b, type CreateLabelResponse as b$, type CreateEscalationResponse as b0, type GetEscalationOptions as b1, type GetEscalationResponse as b2, type ListEscalationsOptions as b3, type ListEscalationsResponse as b4, type DeleteEscalationOptions as b5, type DeleteEscalationResponse as b6, type Contact as b7, type ContactID as b8, type ContactType as b9, type DeleteConversationResponse as bA, type GetConversationIncludeOptions as bB, type GetConversationOptions as bC, type GetConversationResponse as bD, type ListConversationsIncludeOptions as bE, type ListConversationsFilterOptions as bF, type ListConversationOptions as bG, type ListConversationsResponse as bH, type UpdateConversationPayload as bI, type UpdateConversationOptions as bJ, type UpdateConversationResponse as bK, type TriggerResponseConversationOptions as bL, type TriggerResponseConversationResponse as bM, type ConversationSettings as bN, type ConversationFeedback as bO, type CreateConversationFeedbackPayload as bP, type CreateConversationFeedbackOptions as bQ, type CreateConversationFeedbackResponse as bR, type DeleteConversationFeedbackOptions as bS, type DeleteConversationFeedbackResponse as bT, type GetConversationFeedbackOptions as bU, type GetConversationFeedbackResponse as bV, type ListConversationFeedbackOptions as bW, type ListConversationFeedbackResponse as bX, type Label as bY, type CreateLabelPayload as bZ, type CreateLabelOptions as b_, type ContactStatus as ba, type ContactCustomMetadata as bb, type CreateContactPayload as bc, type CreateContactOptions as bd, type CreateContactResponse as be, type DeleteContactOptions as bf, type DeleteContactResponse as bg, type GetContactIncludeOptions as bh, type GetContactOptions as bi, type GetContactResponse as bj, type GetContactVCFOptions as bk, type ListContactsOptions as bl, type ListContactsResponse as bm, type UpdateContactPayload as bn, type UpdateContactOptions as bo, type UpdateContactResponse as bp, type Conversation as bq, type ConversationID as br, type ConversationCustomMetadata as bs, type ActiveConversationStatus as bt, type ConcludedConversationStatus as bu, type ConversationStatus as bv, type CreateConversationPayload as bw, type CreateConversationOptions as bx, type CreateConversationResponse as by, type DeleteConversationOptions as bz, type ResponseTimestamp as c, type WhatsappTemplateRejectionReason as c$, type DeleteLabelOptions as c0, type DeleteLabelResponse as c1, type GetLabelOptions as c2, type GetLabelResponse as c3, type LabelID as c4, type ListLabelsIncludeOptions as c5, type ListLabelsOptions as c6, type ListLabelsResponse as c7, type UpdateLabelPayload as c8, type UpdateLabelOptions as c9, type WhatsappPhoneNumber as cA, type GetWhatsappPhoneNumberOptions as cB, type GetWhatsappPhoneNumberResponse as cC, type ListWhatsappPhoneNumbersOptions as cD, type ListWhatsappPhoneNumbersResponse as cE, type DeleteWhatsappAccountTemplateOptions as cF, type DeleteWhatsappAccountTemplateResponse as cG, type GetWhatsappAccountTemplateOptions as cH, type GetWhatsappAccountTemplateResponse as cI, type ListWhatsappAccountTemplatesOptions as cJ, type ListWhatsappAccountTemplatesResponse as cK, WHATSAPP_TEMPLATE_STATUSES as cL, type WhatsappTemplateStatus as cM, WHATSAPP_TEMPLATE_LANGUAGES as cN, type WhatsappTemplateLanguage as cO, WHATSAPP_TEMPLATE_CATEGORIES as cP, type WhatsappTemplateCategory as cQ, WHATSAPP_TEMPLATE_SUBCATEGORIES as cR, type WhatsappTemplateSubcategory as cS, WHATSAPP_TEMPLATE_INDUSTRIES as cT, type WhatsappTemplateIndustry as cU, WHATSAPP_TEMPLATE_TOPICS as cV, type WhatsappTemplateTopic as cW, WHATSAPP_TEMPLATE_USECASES as cX, type WhatsappTemplateUseCase as cY, WHATSAPP_TEMPLATE_QUALITY_SCORES as cZ, type WhatsappTemplateQualityScore as c_, type UpdateLabelResponse as ca, type Import as cb, type CreateImportPayload as cc, type CreateImportOptions as cd, type CreateImportResponse as ce, type GetImportOptions as cf, type GetImportResponse as cg, type ListImportsOptions as ch, type ListImportsResponse as ci, type ImportID as cj, type ImportType as ck, type ImportStatus as cl, type WhatsappAccount as cm, type WhatsappAccountDetail as cn, type GetWhatsappAccountIncludeOptions as co, type GetWhatsappAccountOptions as cp, type GetWhatsappAccountResponse as cq, type ListWhatsappAccountsOptions as cr, type ListWhatsappAccountsResponse as cs, WHATSAPP_BUSINESS_PROFILE_VERTICAL as ct, type WhatsappBusinessProfileDetail as cu, type GetWhatsappBusinessProfileOptions as cv, type GetWhatsappBusinessProfileResponse as cw, type UpdateWhatsappBusinessProfilePayload as cx, type UpdateWhatsappBusinessProfileOptions as cy, type UpdateWhatsappBusinessProfileResponse as cz, type CursorResponsePagination as d, type UpdateNotePayload as d$, type WhatsappTemplateParameterFormat as d0, type WhatsappTemplateButton as d1, type WhatsappAccountTemplate as d2, type WhatsappLibraryTemplate as d3, type Message as d4, type LexicalDirection as d5, type LexicalIndent as d6, type LexicalTextNode as d7, type LexicalLinkNode as d8, type LexicalQuoteNode as d9, type CreateModelConfigPayload as dA, type CreateModelConfigOptions as dB, type CreateModelConfigResponse as dC, type DeleteModelConfigOptions as dD, type DeleteModelConfigResponse as dE, type UpdateModelConfigPayload as dF, type UpdateModelConfigOptions as dG, type UpdateModelConfigResponse as dH, type GetModelConfigOptions as dI, type GetModelConfigResponse as dJ, type ListModelConfigsOptions as dK, type ListModelConfigsResponse as dL, type ModelInterface as dM, type GetModelInterfaceOptions as dN, type GetModelInterfaceResponse as dO, type ListModelInterfacesOptions as dP, type ListModelInterfacesResponse as dQ, type ModelInterfaceID as dR, type Note as dS, type CreateNotePayload as dT, type CreateNoteOptions as dU, type CreateNoteResponse as dV, type GetNoteOptions as dW, type GetNoteResponse as dX, type ListNotesOptions as dY, type ListNotesResponse as dZ, type NoteID as d_, type LexicalHeadingNode as da, type LexicalParagraphNode as db, type LexicalListItemNode as dc, type LexicalListNode as dd, type LexicalHorizontalRuleNode as de, type LexicalUploadNode as df, type LexicalRootNode as dg, type CreateMessagePayload as dh, type CreateMessageOptions as di, type CreateMessageResponse as dj, type DeleteMessageOptions as dk, type DeleteMessageResponse as dl, type GetMessageOptions as dm, type GetMessageResponse as dn, type ListMessagesIncludeOptions as dp, type ListMessagesOptions as dq, type ListMessagesResponse as dr, type MessageID as ds, type MessageRole as dt, type MessageType as du, type MessageStatus as dv, type MessageVisibility as dw, type MessageEventType as dx, type MessageCustomMetadata as dy, type ModelConfig as dz, type CountResponsePagination as e, type UpdateNoteOptions as e0, type UpdateNoteResponse as e1, type NotificationEvent as e2, type Source as e3, type GetSourceOptions as e4, type GetSourceResponse as e5, type ListSourcesOptions as e6, type ListSourcesResponse as e7, type SourceID as e8, type SourceAdornment as e9, type WebhookSubscription as eA, type CreateWebhookSubscriptionPayload as eB, type CreateWebhookSubscriptionOptions as eC, type CreateWebhookSubscriptionResponse as eD, type DeleteWebhookSubscriptionOptions as eE, type DeleteWebhookSubscriptionResponse as eF, type GetWebhookSubscriptionOptions as eG, type GetWebhookSubscriptionResponse as eH, type ListWebhookSubscriptionsOptions as eI, type ListWebhookSubscriptionsResponse as eJ, type TestWebhookSubscriptionOptions as eK, type TestWebhookSubscriptionResponse as eL, type WebhookSubscriptionID as eM, type Upload as ea, type CreateUploadIncludeOptions as eb, type CreateUploadOptions as ec, type CreateUploadResponse as ed, type DeleteUploadOptions as ee, type DeleteUploadResponse as ef, type GetUploadIncludeOptions as eg, type GetUploadOptions as eh, type GetUploadResponse as ei, type ListUploadsIncludeOptions as ej, type ListUploadsOptions as ek, type ListUploadsResponse as el, type UploadID as em, type EventWebhookOptions as en, eventWebhookSchema as eo, type WebhookEventType as ep, type AccountWebhookWebhookEventType as eq, type AccountAccessTokenWebhookEventType as er, type AccountNotificationEventEventType as es, type ContactWebhookEventType as et, type ConversationWebhookEventType as eu, type MessageWebhookEventType as ev, type ImportWebhookEventType as ew, type WebhookSubscriptionWebhookEventType as ex, type WebhookEventPayload as ey, type WebhookResponse as ez, type CurrentAccountID as f, type AccountStatus as g, type AccountID as h, type CreateAccountPayload as i, type CreateAccountOptions as j, type CreateAccountResponse as k, type GetAccountResponse as l, type UpdateAccountOptions as m, type UpdateAccountResponse as n, type ListAccountsResponse as o, type AccountAccessToken as p, type AccountAccessTokenID as q, type CreateAccountAccessTokenPayload as r, type CreateAccountAccessTokenOptions as s, type CreateAccountAccessTokenResponse as t, type DeleteAccountAccessTokenOptions as u, type DeleteAccountAccessTokenResponse as v, type GetAccountAccessTokenOptions as w, type GetAccountAccessTokenResponse as x, type ListAccountAccessTokensOptions as y, type ListAccountAccessTokensResponse as z };
4358
+ export { type BoilerplateContentID as $, type Account as A, type AccountConversationSettings as B, Client as C, type DeleteAccountAccessTokenPayload as D, type GetAccountConversationSettingsOptions as E, type GetAccountConversationSettingsResponse as F, type GetAccountOptions as G, type UpdateAccountConversationSettingsPayload as H, type UpdateAccountConversationSettingsOptions as I, type UpdateAccountConversationSettingsResponse as J, type AccountNotificationEvent as K, type ListAccountsOptions as L, type GetAccountNotificationEventOptions as M, type GetAccountNotificationEventResponse as N, type Options as O, type ListAccountNotificationEventsFilterOptions as P, type ListAccountNotificationEventsOptions as Q, type ResponseData as R, type ListAccountNotificationEventsResponse as S, type Action as T, type UpdateAccountPayload as U, type ActionID as V, type ActionStatus as W, type SortOptions as X, type ListActionsOptions as Y, type ListActionsResponse as Z, type BoilerplateContent as _, type Options$4 as a, type CreateEscalationOptions as a$, type CreateBoilerplateContentPayload as a0, type CreateBoilerplateContentOptions as a1, type CreateBoilerplateContentResponse as a2, type GetBoilerplateContentOptions as a3, type GetBoilerplateContentResponse as a4, type ListBoilerplateContentsOptions as a5, type ListBoilerplateContentsResponse as a6, type UpdateBoilerplateContentPayload as a7, type UpdateBoilerplateContentOptions as a8, type UpdateBoilerplateContentResponse as a9, type SendChannelSyncPayload as aA, type SendgridChannelSyncOptions as aB, type SendgridChannelSyncResponse as aC, type UpdateChannelPayload as aD, type UpdateChannelOptions as aE, type UpdateChannelResponse as aF, type ChannelConversationSettings as aG, type GetChannelConversationSettingsOptions as aH, type GetChannelConversationSettingsResponse as aI, type UpdateChannelConversationSettingsPayload as aJ, type UpdateChannelConversationSettingsOptions as aK, type UpdateChannelConversationSettingsResponse as aL, type CompositionSection as aM, type CompositionSectionID as aN, type CompositionSectionLocation as aO, type CreateCompositionSectionPayload as aP, type CreateCompositionSectionOptions as aQ, type CreateCompositionSectionResponse as aR, type GetCompositionSectionOptions as aS, type GetCompositionSectionResponse as aT, type ListCompositionSectionsOptions as aU, type ListCompositionSectionsResponse as aV, type UpdateCompositionSectionPayload as aW, type UpdateCompositionSectionOptions as aX, type UpdateCompositionSectionResponse as aY, type Escalation as aZ, type CreateEscalationPayload as a_, type BoilerplateCategory as aa, type BoilerplateCategoryID as ab, type CreateBoilerplateCategoryPayload as ac, type CreateBoilerplateCategoryOptions as ad, type CreateBoilerplateCategoryResponse as ae, type GetBoilerplateCategoryOptions as af, type GetBoilerplateCategoryResponse as ag, type ListBoilerplateCategoriesIncludeOptions as ah, type ListBoilerplateCategoriesOptions as ai, type ListBoilerplateCategoriesResponse as aj, type UpdateBoilerplateCategoryPayload as ak, type UpdateBoilerplateCategoryOptions as al, type UpdateBoilerplateCategoryResponse as am, type Channel as an, type ChannelID as ao, type ChannelStatus as ap, type CustomChannelCustomMetadata as aq, type CreateChannelPayload as ar, type CreateChannelOptions as as, type CreateChannelResponse as at, type DeleteChannelOptions as au, type DeleteChannelResponse as av, type GetChannelOptions as aw, type GetChannelResponse as ax, type ListChannelsOptions as ay, type ListChannelsResponse as az, type ResponseMeta as b, type CreateLabelResponse as b$, type CreateEscalationResponse as b0, type GetEscalationOptions as b1, type GetEscalationResponse as b2, type ListEscalationsOptions as b3, type ListEscalationsResponse as b4, type DeleteEscalationOptions as b5, type DeleteEscalationResponse as b6, type Contact as b7, type ContactID as b8, type ContactType as b9, type DeleteConversationResponse as bA, type GetConversationIncludeOptions as bB, type GetConversationOptions as bC, type GetConversationResponse as bD, type ListConversationsIncludeOptions as bE, type ListConversationsFilterOptions as bF, type ListConversationOptions as bG, type ListConversationsResponse as bH, type UpdateConversationPayload as bI, type UpdateConversationOptions as bJ, type UpdateConversationResponse as bK, type TriggerResponseConversationOptions as bL, type TriggerResponseConversationResponse as bM, type ConversationSettings as bN, type ConversationFeedback as bO, type CreateConversationFeedbackPayload as bP, type CreateConversationFeedbackOptions as bQ, type CreateConversationFeedbackResponse as bR, type DeleteConversationFeedbackOptions as bS, type DeleteConversationFeedbackResponse as bT, type GetConversationFeedbackOptions as bU, type GetConversationFeedbackResponse as bV, type ListConversationFeedbackOptions as bW, type ListConversationFeedbackResponse as bX, type Label as bY, type CreateLabelPayload as bZ, type CreateLabelOptions as b_, type ContactStatus as ba, type ContactCustomMetadata as bb, type CreateContactPayload as bc, type CreateContactOptions as bd, type CreateContactResponse as be, type DeleteContactOptions as bf, type DeleteContactResponse as bg, type GetContactIncludeOptions as bh, type GetContactOptions as bi, type GetContactResponse as bj, type GetContactVCFOptions as bk, type ListContactsOptions as bl, type ListContactsResponse as bm, type UpdateContactPayload as bn, type UpdateContactOptions as bo, type UpdateContactResponse as bp, type Conversation as bq, type ConversationID as br, type ConversationCustomMetadata as bs, type ActiveConversationStatus as bt, type ConcludedConversationStatus as bu, type ConversationStatus as bv, type CreateConversationPayload as bw, type CreateConversationOptions as bx, type CreateConversationResponse as by, type DeleteConversationOptions as bz, type ResponseTimestamp as c, type WhatsappTemplateQualityScore as c$, type DeleteLabelOptions as c0, type DeleteLabelResponse as c1, type GetLabelOptions as c2, type GetLabelResponse as c3, type LabelID as c4, type ListLabelsIncludeOptions as c5, type ListLabelsOptions as c6, type ListLabelsResponse as c7, type UpdateLabelPayload as c8, type UpdateLabelOptions as c9, type WhatsappPhoneNumber as cA, type GetWhatsappPhoneNumberIncludeOptions as cB, type GetWhatsappPhoneNumberOptions as cC, type GetWhatsappPhoneNumberResponse as cD, type ListWhatsappPhoneNumbersOptions as cE, type ListWhatsappPhoneNumbersResponse as cF, type DeleteWhatsappAccountTemplateOptions as cG, type DeleteWhatsappAccountTemplateResponse as cH, type GetWhatsappAccountTemplateOptions as cI, type GetWhatsappAccountTemplateResponse as cJ, type ListWhatsappAccountTemplatesOptions as cK, type ListWhatsappAccountTemplatesResponse as cL, WHATSAPP_TEMPLATE_STATUSES as cM, type WhatsappTemplateStatus as cN, WHATSAPP_TEMPLATE_LANGUAGES as cO, type WhatsappTemplateLanguage as cP, WHATSAPP_TEMPLATE_CATEGORIES as cQ, type WhatsappTemplateCategory as cR, WHATSAPP_TEMPLATE_SUBCATEGORIES as cS, type WhatsappTemplateSubcategory as cT, WHATSAPP_TEMPLATE_INDUSTRIES as cU, type WhatsappTemplateIndustry as cV, WHATSAPP_TEMPLATE_TOPICS as cW, type WhatsappTemplateTopic as cX, WHATSAPP_TEMPLATE_USECASES as cY, type WhatsappTemplateUseCase as cZ, WHATSAPP_TEMPLATE_QUALITY_SCORES as c_, type UpdateLabelResponse as ca, type Import as cb, type CreateImportPayload as cc, type CreateImportOptions as cd, type CreateImportResponse as ce, type GetImportOptions as cf, type GetImportResponse as cg, type ListImportsOptions as ch, type ListImportsResponse as ci, type ImportID as cj, type ImportType as ck, type ImportStatus as cl, type WhatsappAccount as cm, type WhatsappAccountDetail as cn, type GetWhatsappAccountIncludeOptions as co, type GetWhatsappAccountOptions as cp, type GetWhatsappAccountResponse as cq, type ListWhatsappAccountsOptions as cr, type ListWhatsappAccountsResponse as cs, WHATSAPP_BUSINESS_PROFILE_VERTICAL as ct, type WhatsappBusinessProfileDetail as cu, type GetWhatsappBusinessProfileOptions as cv, type GetWhatsappBusinessProfileResponse as cw, type UpdateWhatsappBusinessProfilePayload as cx, type UpdateWhatsappBusinessProfileOptions as cy, type UpdateWhatsappBusinessProfileResponse as cz, type CursorResponsePagination as d, type NoteID as d$, type WhatsappTemplateRejectionReason as d0, type WhatsappTemplateParameterFormat as d1, type WhatsappTemplateButton as d2, type WhatsappAccountTemplate as d3, type WhatsappLibraryTemplate as d4, type Message as d5, type LexicalDirection as d6, type LexicalIndent as d7, type LexicalTextNode as d8, type LexicalLinkNode as d9, type ModelConfig as dA, type CreateModelConfigPayload as dB, type CreateModelConfigOptions as dC, type CreateModelConfigResponse as dD, type DeleteModelConfigOptions as dE, type DeleteModelConfigResponse as dF, type UpdateModelConfigPayload as dG, type UpdateModelConfigOptions as dH, type UpdateModelConfigResponse as dI, type GetModelConfigOptions as dJ, type GetModelConfigResponse as dK, type ListModelConfigsOptions as dL, type ListModelConfigsResponse as dM, type ModelInterface as dN, type GetModelInterfaceOptions as dO, type GetModelInterfaceResponse as dP, type ListModelInterfacesOptions as dQ, type ListModelInterfacesResponse as dR, type ModelInterfaceID as dS, type Note as dT, type CreateNotePayload as dU, type CreateNoteOptions as dV, type CreateNoteResponse as dW, type GetNoteOptions as dX, type GetNoteResponse as dY, type ListNotesOptions as dZ, type ListNotesResponse as d_, type LexicalQuoteNode as da, type LexicalHeadingNode as db, type LexicalParagraphNode as dc, type LexicalListItemNode as dd, type LexicalListNode as de, type LexicalHorizontalRuleNode as df, type LexicalUploadNode as dg, type LexicalRootNode as dh, type CreateMessagePayload as di, type CreateMessageOptions as dj, type CreateMessageResponse as dk, type DeleteMessageOptions as dl, type DeleteMessageResponse as dm, type GetMessageOptions as dn, type GetMessageResponse as dp, type ListMessagesIncludeOptions as dq, type ListMessagesOptions as dr, type ListMessagesResponse as ds, type MessageID as dt, type MessageRole as du, type MessageType as dv, type MessageStatus as dw, type MessageVisibility as dx, type MessageEventType as dy, type MessageCustomMetadata as dz, type CountResponsePagination as e, type UpdateNotePayload as e0, type UpdateNoteOptions as e1, type UpdateNoteResponse as e2, type NotificationEvent as e3, type Source as e4, type GetSourceOptions as e5, type GetSourceResponse as e6, type ListSourcesOptions as e7, type ListSourcesResponse as e8, type SourceID as e9, type WebhookResponse as eA, type WebhookSubscription as eB, type CreateWebhookSubscriptionPayload as eC, type CreateWebhookSubscriptionOptions as eD, type CreateWebhookSubscriptionResponse as eE, type DeleteWebhookSubscriptionOptions as eF, type DeleteWebhookSubscriptionResponse as eG, type GetWebhookSubscriptionOptions as eH, type GetWebhookSubscriptionResponse as eI, type ListWebhookSubscriptionsOptions as eJ, type ListWebhookSubscriptionsResponse as eK, type TestWebhookSubscriptionOptions as eL, type TestWebhookSubscriptionResponse as eM, type WebhookSubscriptionID as eN, type SourceAdornment as ea, type Upload as eb, type CreateUploadIncludeOptions as ec, type CreateUploadOptions as ed, type CreateUploadResponse as ee, type DeleteUploadOptions as ef, type DeleteUploadResponse as eg, type GetUploadIncludeOptions as eh, type GetUploadOptions as ei, type GetUploadResponse as ej, type ListUploadsIncludeOptions as ek, type ListUploadsOptions as el, type ListUploadsResponse as em, type UploadID as en, type EventWebhookOptions as eo, eventWebhookSchema as ep, type WebhookEventType as eq, type AccountWebhookWebhookEventType as er, type AccountAccessTokenWebhookEventType as es, type AccountNotificationEventEventType as et, type ContactWebhookEventType as eu, type ConversationWebhookEventType as ev, type MessageWebhookEventType as ew, type ImportWebhookEventType as ex, type WebhookSubscriptionWebhookEventType as ey, type WebhookEventPayload as ez, type CurrentAccountID as f, type AccountStatus as g, type AccountID as h, type CreateAccountPayload as i, type CreateAccountOptions as j, type CreateAccountResponse as k, type GetAccountResponse as l, type UpdateAccountOptions as m, type UpdateAccountResponse as n, type ListAccountsResponse as o, type AccountAccessToken as p, type AccountAccessTokenID as q, type CreateAccountAccessTokenPayload as r, type CreateAccountAccessTokenOptions as s, type CreateAccountAccessTokenResponse as t, type DeleteAccountAccessTokenOptions as u, type DeleteAccountAccessTokenResponse as v, type GetAccountAccessTokenOptions as w, type GetAccountAccessTokenResponse as x, type ListAccountAccessTokensOptions as y, type ListAccountAccessTokensResponse as z };
@@ -1 +1 @@
1
- import{b as O,f as g}from"./chunk-N4I2NDDN.js";import{Command as j}from"commander";import{Command as w}from"commander";function i({client:t}){let o=new w("actions").description("Actions");return o.addCommand(new w("list").description("List actions").action(async()=>{let n=await t.action.list().json();console.log(n)})),o}import{Command as y}from"commander";function m({client:t}){let o=new y("channels").description("Channels");return o.addCommand(new y("list").description("List channels").action(async()=>{let n=await t.channel.list().json();console.log(n)})),o}import{Command as e}from"commander";function c({client:t}){let o=new e("contacts").description("Contacts");return o.addCommand(new e("get").description("Find contact").argument("<contact>","Contact ID").action(async n=>{let s=await t.contact.get(n).json();console.log(s)})),o.addCommand(new e("list").description("List contacts").action(async()=>{let n=await t.contact.list().json();console.log(n)})),o.addCommand(new e("get-vcf").description("Export Contact as VCF").argument("<contact>","Contact ID").action(async n=>{let s=await t.contact.getVCF(n).response();console.log(s)})),o}import{Command as r}from"commander";function d({client:t}){let o=new r("conversations").description("Conversations");return o.addCommand(new r("get").description("Find conversation").argument("<conversation>","Conversation ID").action(async n=>{let s=await t.conversation.get(n).json();console.log(s)})),o.addCommand(new r("list").description("List conversations").action(async()=>{let n=await t.conversation.list().json();console.log(n)})),o}import{Command as p}from"commander";function l({client:t}){let o=new p("labels").description("Labels");return o.addCommand(new p("get").description("Find label").argument("<label>","Label ID").action(async n=>{let s=await t.label.get(n).json();console.log(s)})),o.addCommand(new p("list").description("List labels").action(async()=>{let n=await t.label.list().json();console.log(n)})),o}import{Command as x}from"commander";function u({client:t}){let o=new x("messages").description("Messages");return o.addCommand(new x("list").description("List messages").action(async()=>{let n=await t.message.list().json();console.log(n)})),o}import{Command as C}from"commander";function f({client:t}){let o=new C("sources").description("Sources");return o.addCommand(new C("get").description("Find source").argument("<source>","Source ID").action(async n=>{let s=await t.source.get(n).json();console.log(s)})),o.addCommand(new C("list").description("List sources").action(async()=>{let n=await t.source.list().json();console.log(n)})),o}var a={client:new g(new O)},b=new j("gds").description("Great Detail Support System").addCommand(i(a)).addCommand(m(a)).addCommand(c(a)).addCommand(d(a)).addCommand(l(a)).addCommand(u(a)).addCommand(f(a)),U=b;export{U as a};
1
+ import{b as O,f as g}from"./chunk-PGAG3XUU.js";import{Command as j}from"commander";import{Command as w}from"commander";function i({client:t}){let o=new w("actions").description("Actions");return o.addCommand(new w("list").description("List actions").action(async()=>{let n=await t.action.list().json();console.log(n)})),o}import{Command as y}from"commander";function m({client:t}){let o=new y("channels").description("Channels");return o.addCommand(new y("list").description("List channels").action(async()=>{let n=await t.channel.list().json();console.log(n)})),o}import{Command as e}from"commander";function c({client:t}){let o=new e("contacts").description("Contacts");return o.addCommand(new e("get").description("Find contact").argument("<contact>","Contact ID").action(async n=>{let s=await t.contact.get(n).json();console.log(s)})),o.addCommand(new e("list").description("List contacts").action(async()=>{let n=await t.contact.list().json();console.log(n)})),o.addCommand(new e("get-vcf").description("Export Contact as VCF").argument("<contact>","Contact ID").action(async n=>{let s=await t.contact.getVCF(n).response();console.log(s)})),o}import{Command as r}from"commander";function d({client:t}){let o=new r("conversations").description("Conversations");return o.addCommand(new r("get").description("Find conversation").argument("<conversation>","Conversation ID").action(async n=>{let s=await t.conversation.get(n).json();console.log(s)})),o.addCommand(new r("list").description("List conversations").action(async()=>{let n=await t.conversation.list().json();console.log(n)})),o}import{Command as p}from"commander";function l({client:t}){let o=new p("labels").description("Labels");return o.addCommand(new p("get").description("Find label").argument("<label>","Label ID").action(async n=>{let s=await t.label.get(n).json();console.log(s)})),o.addCommand(new p("list").description("List labels").action(async()=>{let n=await t.label.list().json();console.log(n)})),o}import{Command as x}from"commander";function u({client:t}){let o=new x("messages").description("Messages");return o.addCommand(new x("list").description("List messages").action(async()=>{let n=await t.message.list().json();console.log(n)})),o}import{Command as C}from"commander";function f({client:t}){let o=new C("sources").description("Sources");return o.addCommand(new C("get").description("Find source").argument("<source>","Source ID").action(async n=>{let s=await t.source.get(n).json();console.log(s)})),o.addCommand(new C("list").description("List sources").action(async()=>{let n=await t.source.list().json();console.log(n)})),o}var a={client:new g(new O)},b=new j("gds").description("Great Detail Support System").addCommand(i(a)).addCommand(m(a)).addCommand(c(a)).addCommand(d(a)).addCommand(l(a)).addCommand(u(a)).addCommand(f(a)),U=b;export{U as a};
@@ -1 +1 @@
1
- var et=Object.defineProperty;var st=(s,t)=>{for(var e in t)et(s,e,{get:t[e],enumerable:!0})};var m=class{getHeaders(){return{}}};var z="SUPPORT_ACCESS_TOKEN",Y="SUPPORT_KEY_NAME",Q="SUPPORT_KEY_PASSWORD",H="SUPPORT_SIGNING_KEY",J="SUPPORT_BASE_URL";var u=class{name;#t;constructor({name:t=process.env[Y],password:e=process.env[Q]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var d=class{#t;constructor({token:t=process.env[z]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var X="https://api.support.greatdetail.com",Z={"x-powered-by":"GDS/JavaScript"};var V=class extends Error{constructor(e,o,{requestID:n,body:r,cause:i}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${r?" - "+r:""}`,{cause:i});this.response=e;this.request=o;this.requestID=n}requestID};import{z as a}from"zod/v4";var tt=a.object({data:a.object({event:a.object({id:a.string(),type:a.string(),payload:a.record(a.string(),a.string()),createdAt:a.iso.datetime()})})});var l=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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 h=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,{filter:e,pagination:o,request:n={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...n,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}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 C=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 f=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:n={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...n,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var g=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:n={}}={}){return this._transport.send("v1/actions",{...n,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var b=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:n={}}={}){return this._transport.send("v1/boilerplates/categories",{...n,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var O=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 T=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 I=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.query.build({include: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({pagination:t,filter:e,sort:o,request:n={}}={}){return this._transport.send("v1/contacts",{...n,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var A=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:n,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:n})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var _=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var E=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var U=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var G=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var D=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...e,method:"GET"})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var L=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:n,category:r,language:i,request:p={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...p,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:n,category:r,language:i}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var k=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:n={}}={}){return this._transport.send("v1/labels",{...n,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:n={}}={}){return this._transport.send("v1/messages",{...n,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var x=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 w=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 i of r)n.push(["category",i])}return t!==void 0&&n.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:n})}};var M=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"})}};import ot,{HTTPError as nt}from"ky";function c(s){return typeof s=="function"&&(s=s()),typeof s.toString=="function"?s.toString():typeof s=="string"?s:String(s)}var N=class s{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:n,custom:r}){return[...Object.entries(o??{}).flatMap(([i,p])=>s._filterExemptColumns.includes(i)?[]:this.query(`filter[${i}]`,p)),...this.query("filter",o?.filter),...Object.entries(n??{}).flatMap(([i,p])=>p?this.query("include",i):[]),...Object.entries(t??{}).flatMap(([i,p])=>p===void 0?[]:this.query("sort",(p==="desc"?"-":"")+c(i))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(r??{}).flatMap(([i,p])=>this.query(i,p))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let n of Array.isArray(e)?e:[e])o.push([t,c(n)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let n=[];if(t===void 0&&e===void 0)return n;let r=t?{dir:"before",value:c(t)}:void 0,i=e?{dir:"after",value:c(e)}:void 0,p=o==="after"?i||r:r||i;return p&&n.push([`page[${p.dir}]`,p.value]),n}};var B=class{client;options;query=N;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=ot.create({prefixUrl:this.options.baseURL,headers:Z,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="r:";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let n=new Uint8Array(21);return globalThis.crypto.getRandomValues(n),t+Array.from(n,r=>r.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),n=e.authentication??this.options.authentication,i=this.client.extend({headers:{...n.getHeaders(),"x-request-id":o}})(t,e).catch(async p=>{throw p instanceof nt?new V(p.response,p.request,{requestID:o,body:await p.response.text(),cause:p}):p});return{requestID:o,response:()=>i,json:async()=>(await i).json()}}};var q=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:n={}}={}){return this._transport.send("v1/uploads",{...n,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let n=new FormData;for(let r of t)n.append("file",r);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:n})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var j=class{constructor(t){this._transport=t}async event({key:t=process.env[H],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."+H);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}=tt.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 $=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 K=class s{static DEFAULT_BASE_URL=X;static PublicAuthentication=m;static BasicAuthentication=u;static BearerAuthentication=d;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new B({authentication:t,...o,baseURL:e?.toString()??s.getBaseURL()}),this.account=new l(this._transport),this.accountAccessToken=new h(this._transport),this.accountConversationSettings=new C(this._transport),this.accountNotificationEvent=new f(this._transport),this.action=new g(this._transport),this.boilerplateCategory=new b(this._transport),this.boilerplateContent=new R(this._transport),this.channel=new v(this._transport),this.channelConversationSettings=new O(this._transport),this.compositionSection=new T(this._transport),this.contact=new I(this._transport),this.conversation=new A(this._transport),this.conversationContext=new _(this._transport),this.conversationFeedback=new E(this._transport),this.escalation=new y(this._transport),this.label=new k(this._transport),this.import=new S(this._transport),this.integration={whatsapp:{account:new U(this._transport),phoneNumber:new D(this._transport),businessProfile:new G(this._transport),template:new L(this._transport)}},this.message=new P(this._transport),this.modelConfig=new F(this._transport),this.modelInterface=new x(this._transport),this.note=new W(this._transport),this.source=new w(this._transport),this.statistics=new M(this._transport),this.upload=new q(this._transport),this.webhook=new j(this._transport),this.webhookSubscription=new $(this._transport)}static getBaseURL(){return process.env[J]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};export{st as a,m as b,X as c,V as d,tt as e,K as f};
1
+ var et=Object.defineProperty;var st=(s,t)=>{for(var e in t)et(s,e,{get:t[e],enumerable:!0})};var m=class{getHeaders(){return{}}};var z="SUPPORT_ACCESS_TOKEN",Y="SUPPORT_KEY_NAME",Q="SUPPORT_KEY_PASSWORD",H="SUPPORT_SIGNING_KEY",J="SUPPORT_BASE_URL";var u=class{name;#t;constructor({name:t=process.env[Y],password:e=process.env[Q]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var d=class{#t;constructor({token:t=process.env[z]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var X="https://api.support.greatdetail.com",Z={"x-powered-by":"GDS/JavaScript"};var V=class extends Error{constructor(e,o,{requestID:n,body:r,cause:i}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${r?" - "+r:""}`,{cause:i});this.response=e;this.request=o;this.requestID=n}requestID};import{z as a}from"zod/v4";var tt=a.object({data:a.object({event:a.object({id:a.string(),type:a.string(),payload:a.record(a.string(),a.string()),createdAt:a.iso.datetime()})})});var l=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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 h=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,{filter:e,pagination:o,request:n={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...n,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}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 C=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 f=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:n={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...n,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var g=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:n={}}={}){return this._transport.send("v1/actions",{...n,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var b=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:n={}}={}){return this._transport.send("v1/boilerplates/categories",{...n,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var O=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 T=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 I=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.query.build({include: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({pagination:t,filter:e,sort:o,request:n={}}={}){return this._transport.send("v1/contacts",{...n,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var A=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:n,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:n})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var _=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var E=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var U=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var G=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var D=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var L=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:n,category:r,language:i,request:p={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...p,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:n,category:r,language:i}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var k=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:n={}}={}){return this._transport.send("v1/labels",{...n,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:n={}}={}){return this._transport.send("v1/messages",{...n,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var x=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 w=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 i of r)n.push(["category",i])}return t!==void 0&&n.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:n})}};var N=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"})}};import ot,{HTTPError as nt}from"ky";function c(s){return typeof s=="function"&&(s=s()),typeof s.toString=="function"?s.toString():typeof s=="string"?s:String(s)}var M=class s{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:n,custom:r}){return[...Object.entries(o??{}).flatMap(([i,p])=>s._filterExemptColumns.includes(i)?[]:this.query(`filter[${i}]`,p)),...this.query("filter",o?.filter),...Object.entries(n??{}).flatMap(([i,p])=>p?this.query("include",i):[]),...Object.entries(t??{}).flatMap(([i,p])=>p===void 0?[]:this.query("sort",(p==="desc"?"-":"")+c(i))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(r??{}).flatMap(([i,p])=>this.query(i,p))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let n of Array.isArray(e)?e:[e])o.push([t,c(n)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let n=[];if(t===void 0&&e===void 0)return n;let r=t?{dir:"before",value:c(t)}:void 0,i=e?{dir:"after",value:c(e)}:void 0,p=o==="after"?i||r:r||i;return p&&n.push([`page[${p.dir}]`,p.value]),n}};var B=class{client;options;query=M;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=ot.create({prefixUrl:this.options.baseURL,headers:Z,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let n=new Uint8Array(21);return globalThis.crypto.getRandomValues(n),t+Array.from(n,r=>r.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),n=e.authentication??this.options.authentication,i=this.client.extend({headers:{...n.getHeaders(),"x-request-id":o}})(t,e).catch(async p=>{throw p instanceof nt?new V(p.response,p.request,{requestID:o,body:await p.response.text(),cause:p}):p});return{requestID:o,response:()=>i,json:async()=>(await i).json()}}};var q=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:n={}}={}){return this._transport.send("v1/uploads",{...n,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let n=new FormData;for(let r of t)n.append("file",r);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:n})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var j=class{constructor(t){this._transport=t}async event({key:t=process.env[H],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."+H);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}=tt.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 $=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 K=class s{static DEFAULT_BASE_URL=X;static PublicAuthentication=m;static BasicAuthentication=u;static BearerAuthentication=d;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new B({authentication:t,...o,baseURL:e?.toString()??s.getBaseURL()}),this.account=new l(this._transport),this.accountAccessToken=new h(this._transport),this.accountConversationSettings=new C(this._transport),this.accountNotificationEvent=new f(this._transport),this.action=new g(this._transport),this.boilerplateCategory=new b(this._transport),this.boilerplateContent=new R(this._transport),this.channel=new v(this._transport),this.channelConversationSettings=new O(this._transport),this.compositionSection=new T(this._transport),this.contact=new I(this._transport),this.conversation=new A(this._transport),this.conversationContext=new _(this._transport),this.conversationFeedback=new E(this._transport),this.escalation=new y(this._transport),this.label=new k(this._transport),this.import=new S(this._transport),this.integration={whatsapp:{account:new U(this._transport),phoneNumber:new D(this._transport),businessProfile:new G(this._transport),template:new L(this._transport)}},this.message=new P(this._transport),this.modelConfig=new F(this._transport),this.modelInterface=new x(this._transport),this.note=new W(this._transport),this.source=new w(this._transport),this.statistics=new N(this._transport),this.upload=new q(this._transport),this.webhook=new j(this._transport),this.webhookSubscription=new $(this._transport)}static getBaseURL(){return process.env[J]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};export{st as a,m as b,X as c,V as d,tt as e,K as f};
@@ -1 +1 @@
1
- "use strict";var Rt=Object.create;var z=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var It=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var _t=(n,t)=>{for(var e in t)z(n,e,{get:t[e],enumerable:!0})},dt=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Tt(t))!At.call(n,s)&&s!==e&&z(n,s,{get:()=>t[s],enumerable:!(o=vt(t,s))||o.enumerable});return n};var yt=(n,t,e)=>(e=n!=null?Rt(It(n)):{},dt(t||!n||!n.__esModule?z(e,"default",{value:n,enumerable:!0}):e,n)),Et=n=>dt(z({},"__esModule",{value:!0}),n);var Gt={};_t(Gt,{default:()=>Ut});module.exports=Et(Gt);var Ot=require("commander");var c=class{getHeaders(){return{}}};var u=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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,{filter:e,pagination:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}delete(t,e,{body:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...s,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 h=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 C=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:s={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var f=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:s={}}={}){return this._transport.send("v1/actions",{...s,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var ut="SUPPORT_ACCESS_TOKEN",lt="SUPPORT_KEY_NAME",ht="SUPPORT_KEY_PASSWORD",tt="SUPPORT_SIGNING_KEY",Ct="SUPPORT_BASE_URL";var g=class{name;#t;constructor({name:t=process.env[lt],password:e=process.env[ht]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var b=class{#t;constructor({token:t=process.env[ut]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var O=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/boilerplates/categories",{...s,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var T=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 I=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 ft="https://api.support.greatdetail.com",gt={"x-powered-by":"GDS/JavaScript"};var A=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.query.build({include:e})})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",s=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(s)}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({pagination:t,filter:e,sort:o,request:s={}}={}){return this._transport.send("v1/contacts",{...s,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var _=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:s,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:s})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var E=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var U=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var G=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var D=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var L=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...e,method:"GET"})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var k=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:s,category:r,language:i,request:p={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...p,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:s,category:r,language:i}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/labels",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 x=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/messages",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var w=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 M=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 s=[];if(e){let r=Array.isArray(e)?e:[e];for(let i of r)s.push(["category",i])}return t!==void 0&&s.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:s})}};var N=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 Q=yt(require("ky"),1);var Y=class extends Error{constructor(e,o,{requestID:s,body:r,cause:i}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${r?" - "+r:""}`,{cause:i});this.response=e;this.request=o;this.requestID=s}requestID};function d(n){return typeof n=="function"&&(n=n()),typeof n.toString=="function"?n.toString():typeof n=="string"?n:String(n)}var B=class n{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:s,custom:r}){return[...Object.entries(o??{}).flatMap(([i,p])=>n._filterExemptColumns.includes(i)?[]:this.query(`filter[${i}]`,p)),...this.query("filter",o?.filter),...Object.entries(s??{}).flatMap(([i,p])=>p?this.query("include",i):[]),...Object.entries(t??{}).flatMap(([i,p])=>p===void 0?[]:this.query("sort",(p==="desc"?"-":"")+d(i))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(r??{}).flatMap(([i,p])=>this.query(i,p))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let s of Array.isArray(e)?e:[e])o.push([t,d(s)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let s=[];if(t===void 0&&e===void 0)return s;let r=t?{dir:"before",value:d(t)}:void 0,i=e?{dir:"after",value:d(e)}:void 0,p=o==="after"?i||r:r||i;return p&&s.push([`page[${p.dir}]`,p.value]),s}};var j=class{client;options;query=B;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=Q.default.create({prefixUrl:this.options.baseURL,headers:gt,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="r:";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let s=new Uint8Array(21);return globalThis.crypto.getRandomValues(s),t+Array.from(s,r=>r.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),s=e.authentication??this.options.authentication,i=this.client.extend({headers:{...s.getHeaders(),"x-request-id":o}})(t,e).catch(async p=>{throw p instanceof Q.HTTPError?new Y(p.response,p.request,{requestID:o,body:await p.response.text(),cause:p}):p});return{requestID:o,response:()=>i,json:async()=>(await i).json()}}};var q=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:s={}}={}){return this._transport.send("v1/uploads",{...s,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let s=new FormData;for(let r of t)s.append("file",r);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:s})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var a=require("zod/v4"),bt=a.z.object({data:a.z.object({event:a.z.object({id:a.z.string(),type:a.z.string(),payload:a.z.record(a.z.string(),a.z.string()),createdAt:a.z.iso.datetime()})})});var $=class{constructor(t){this._transport=t}async event({key:t=process.env[tt],maxSignatures:e=3,request:o}){let s=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+tt);if(!s)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(s)?s.slice(0,e):[s]))throw new Error("Untrusted signature")}let{data:r}=bt.parse(o.body);return{event:r.event}}async _verifySignature(t,e,o){let s=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",s,new TextEncoder().encode(atob(r)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var V=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 H=class n{static DEFAULT_BASE_URL=ft;static PublicAuthentication=c;static BasicAuthentication=g;static BearerAuthentication=b;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new j({authentication:t,...o,baseURL:e?.toString()??n.getBaseURL()}),this.account=new u(this._transport),this.accountAccessToken=new l(this._transport),this.accountConversationSettings=new h(this._transport),this.accountNotificationEvent=new C(this._transport),this.action=new f(this._transport),this.boilerplateCategory=new O(this._transport),this.boilerplateContent=new R(this._transport),this.channel=new v(this._transport),this.channelConversationSettings=new T(this._transport),this.compositionSection=new I(this._transport),this.contact=new A(this._transport),this.conversation=new _(this._transport),this.conversationContext=new y(this._transport),this.conversationFeedback=new E(this._transport),this.escalation=new S(this._transport),this.label=new P(this._transport),this.import=new U(this._transport),this.integration={whatsapp:{account:new G(this._transport),phoneNumber:new L(this._transport),businessProfile:new D(this._transport),template:new k(this._transport)}},this.message=new x(this._transport),this.modelConfig=new F(this._transport),this.modelInterface=new w(this._transport),this.note=new W(this._transport),this.source=new M(this._transport),this.statistics=new N(this._transport),this.upload=new q(this._transport),this.webhook=new $(this._transport),this.webhookSubscription=new V(this._transport)}static getBaseURL(){return process.env[Ct]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};var et=require("commander");function ot({client:n}){let t=new et.Command("actions").description("Actions");return t.addCommand(new et.Command("list").description("List actions").action(async()=>{let e=await n.action.list().json();console.log(e)})),t}var nt=require("commander");function st({client:n}){let t=new nt.Command("channels").description("Channels");return t.addCommand(new nt.Command("list").description("List channels").action(async()=>{let e=await n.channel.list().json();console.log(e)})),t}var K=require("commander");function rt({client:n}){let t=new K.Command("contacts").description("Contacts");return t.addCommand(new K.Command("get").description("Find contact").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.get(e).json();console.log(o)})),t.addCommand(new K.Command("list").description("List contacts").action(async()=>{let e=await n.contact.list().json();console.log(e)})),t.addCommand(new K.Command("get-vcf").description("Export Contact as VCF").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.getVCF(e).response();console.log(o)})),t}var J=require("commander");function it({client:n}){let t=new J.Command("conversations").description("Conversations");return t.addCommand(new J.Command("get").description("Find conversation").argument("<conversation>","Conversation ID").action(async e=>{let o=await n.conversation.get(e).json();console.log(o)})),t.addCommand(new J.Command("list").description("List conversations").action(async()=>{let e=await n.conversation.list().json();console.log(e)})),t}var X=require("commander");function pt({client:n}){let t=new X.Command("labels").description("Labels");return t.addCommand(new X.Command("get").description("Find label").argument("<label>","Label ID").action(async e=>{let o=await n.label.get(e).json();console.log(o)})),t.addCommand(new X.Command("list").description("List labels").action(async()=>{let e=await n.label.list().json();console.log(e)})),t}var at=require("commander");function ct({client:n}){let t=new at.Command("messages").description("Messages");return t.addCommand(new at.Command("list").description("List messages").action(async()=>{let e=await n.message.list().json();console.log(e)})),t}var Z=require("commander");function mt({client:n}){let t=new Z.Command("sources").description("Sources");return t.addCommand(new Z.Command("get").description("Find source").argument("<source>","Source ID").action(async e=>{let o=await n.source.get(e).json();console.log(o)})),t.addCommand(new Z.Command("list").description("List sources").action(async()=>{let e=await n.source.list().json();console.log(e)})),t}var m={client:new H(new c)},St=new Ot.Command("gds").description("Great Detail Support System").addCommand(ot(m)).addCommand(st(m)).addCommand(rt(m)).addCommand(it(m)).addCommand(pt(m)).addCommand(ct(m)).addCommand(mt(m)),Ut=St;
1
+ "use strict";var Rt=Object.create;var z=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var It=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var _t=(n,t)=>{for(var e in t)z(n,e,{get:t[e],enumerable:!0})},dt=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Tt(t))!At.call(n,s)&&s!==e&&z(n,s,{get:()=>t[s],enumerable:!(o=vt(t,s))||o.enumerable});return n};var yt=(n,t,e)=>(e=n!=null?Rt(It(n)):{},dt(t||!n||!n.__esModule?z(e,"default",{value:n,enumerable:!0}):e,n)),Et=n=>dt(z({},"__esModule",{value:!0}),n);var Gt={};_t(Gt,{default:()=>Ut});module.exports=Et(Gt);var Ot=require("commander");var c=class{getHeaders(){return{}}};var u=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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,{filter:e,pagination:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}delete(t,e,{body:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...s,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 h=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 C=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:s={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var f=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:s={}}={}){return this._transport.send("v1/actions",{...s,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var ut="SUPPORT_ACCESS_TOKEN",lt="SUPPORT_KEY_NAME",ht="SUPPORT_KEY_PASSWORD",tt="SUPPORT_SIGNING_KEY",Ct="SUPPORT_BASE_URL";var g=class{name;#t;constructor({name:t=process.env[lt],password:e=process.env[ht]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var b=class{#t;constructor({token:t=process.env[ut]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var O=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/boilerplates/categories",{...s,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var T=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 I=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 ft="https://api.support.greatdetail.com",gt={"x-powered-by":"GDS/JavaScript"};var A=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.query.build({include:e})})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",s=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(s)}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({pagination:t,filter:e,sort:o,request:s={}}={}){return this._transport.send("v1/contacts",{...s,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var _=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:s,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:s})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var E=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var U=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var G=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var D=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var L=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var k=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:s,category:r,language:i,request:p={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...p,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:s,category:r,language:i}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/labels",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 x=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/messages",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var w=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 M=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 s=[];if(e){let r=Array.isArray(e)?e:[e];for(let i of r)s.push(["category",i])}return t!==void 0&&s.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:s})}};var N=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 Q=yt(require("ky"),1);var Y=class extends Error{constructor(e,o,{requestID:s,body:r,cause:i}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${r?" - "+r:""}`,{cause:i});this.response=e;this.request=o;this.requestID=s}requestID};function d(n){return typeof n=="function"&&(n=n()),typeof n.toString=="function"?n.toString():typeof n=="string"?n:String(n)}var B=class n{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:s,custom:r}){return[...Object.entries(o??{}).flatMap(([i,p])=>n._filterExemptColumns.includes(i)?[]:this.query(`filter[${i}]`,p)),...this.query("filter",o?.filter),...Object.entries(s??{}).flatMap(([i,p])=>p?this.query("include",i):[]),...Object.entries(t??{}).flatMap(([i,p])=>p===void 0?[]:this.query("sort",(p==="desc"?"-":"")+d(i))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(r??{}).flatMap(([i,p])=>this.query(i,p))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let s of Array.isArray(e)?e:[e])o.push([t,d(s)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let s=[];if(t===void 0&&e===void 0)return s;let r=t?{dir:"before",value:d(t)}:void 0,i=e?{dir:"after",value:d(e)}:void 0,p=o==="after"?i||r:r||i;return p&&s.push([`page[${p.dir}]`,p.value]),s}};var j=class{client;options;query=B;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=Q.default.create({prefixUrl:this.options.baseURL,headers:gt,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let s=new Uint8Array(21);return globalThis.crypto.getRandomValues(s),t+Array.from(s,r=>r.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),s=e.authentication??this.options.authentication,i=this.client.extend({headers:{...s.getHeaders(),"x-request-id":o}})(t,e).catch(async p=>{throw p instanceof Q.HTTPError?new Y(p.response,p.request,{requestID:o,body:await p.response.text(),cause:p}):p});return{requestID:o,response:()=>i,json:async()=>(await i).json()}}};var q=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:s={}}={}){return this._transport.send("v1/uploads",{...s,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let s=new FormData;for(let r of t)s.append("file",r);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:s})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var a=require("zod/v4"),bt=a.z.object({data:a.z.object({event:a.z.object({id:a.z.string(),type:a.z.string(),payload:a.z.record(a.z.string(),a.z.string()),createdAt:a.z.iso.datetime()})})});var $=class{constructor(t){this._transport=t}async event({key:t=process.env[tt],maxSignatures:e=3,request:o}){let s=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+tt);if(!s)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(s)?s.slice(0,e):[s]))throw new Error("Untrusted signature")}let{data:r}=bt.parse(o.body);return{event:r.event}}async _verifySignature(t,e,o){let s=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",s,new TextEncoder().encode(atob(r)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var V=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 H=class n{static DEFAULT_BASE_URL=ft;static PublicAuthentication=c;static BasicAuthentication=g;static BearerAuthentication=b;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new j({authentication:t,...o,baseURL:e?.toString()??n.getBaseURL()}),this.account=new u(this._transport),this.accountAccessToken=new l(this._transport),this.accountConversationSettings=new h(this._transport),this.accountNotificationEvent=new C(this._transport),this.action=new f(this._transport),this.boilerplateCategory=new O(this._transport),this.boilerplateContent=new R(this._transport),this.channel=new v(this._transport),this.channelConversationSettings=new T(this._transport),this.compositionSection=new I(this._transport),this.contact=new A(this._transport),this.conversation=new _(this._transport),this.conversationContext=new y(this._transport),this.conversationFeedback=new E(this._transport),this.escalation=new S(this._transport),this.label=new P(this._transport),this.import=new U(this._transport),this.integration={whatsapp:{account:new G(this._transport),phoneNumber:new L(this._transport),businessProfile:new D(this._transport),template:new k(this._transport)}},this.message=new x(this._transport),this.modelConfig=new F(this._transport),this.modelInterface=new w(this._transport),this.note=new W(this._transport),this.source=new M(this._transport),this.statistics=new N(this._transport),this.upload=new q(this._transport),this.webhook=new $(this._transport),this.webhookSubscription=new V(this._transport)}static getBaseURL(){return process.env[Ct]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};var et=require("commander");function ot({client:n}){let t=new et.Command("actions").description("Actions");return t.addCommand(new et.Command("list").description("List actions").action(async()=>{let e=await n.action.list().json();console.log(e)})),t}var nt=require("commander");function st({client:n}){let t=new nt.Command("channels").description("Channels");return t.addCommand(new nt.Command("list").description("List channels").action(async()=>{let e=await n.channel.list().json();console.log(e)})),t}var K=require("commander");function rt({client:n}){let t=new K.Command("contacts").description("Contacts");return t.addCommand(new K.Command("get").description("Find contact").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.get(e).json();console.log(o)})),t.addCommand(new K.Command("list").description("List contacts").action(async()=>{let e=await n.contact.list().json();console.log(e)})),t.addCommand(new K.Command("get-vcf").description("Export Contact as VCF").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.getVCF(e).response();console.log(o)})),t}var J=require("commander");function it({client:n}){let t=new J.Command("conversations").description("Conversations");return t.addCommand(new J.Command("get").description("Find conversation").argument("<conversation>","Conversation ID").action(async e=>{let o=await n.conversation.get(e).json();console.log(o)})),t.addCommand(new J.Command("list").description("List conversations").action(async()=>{let e=await n.conversation.list().json();console.log(e)})),t}var X=require("commander");function pt({client:n}){let t=new X.Command("labels").description("Labels");return t.addCommand(new X.Command("get").description("Find label").argument("<label>","Label ID").action(async e=>{let o=await n.label.get(e).json();console.log(o)})),t.addCommand(new X.Command("list").description("List labels").action(async()=>{let e=await n.label.list().json();console.log(e)})),t}var at=require("commander");function ct({client:n}){let t=new at.Command("messages").description("Messages");return t.addCommand(new at.Command("list").description("List messages").action(async()=>{let e=await n.message.list().json();console.log(e)})),t}var Z=require("commander");function mt({client:n}){let t=new Z.Command("sources").description("Sources");return t.addCommand(new Z.Command("get").description("Find source").argument("<source>","Source ID").action(async e=>{let o=await n.source.get(e).json();console.log(o)})),t.addCommand(new Z.Command("list").description("List sources").action(async()=>{let e=await n.source.list().json();console.log(e)})),t}var m={client:new H(new c)},St=new Ot.Command("gds").description("Great Detail Support System").addCommand(ot(m)).addCommand(st(m)).addCommand(rt(m)).addCommand(it(m)).addCommand(pt(m)).addCommand(ct(m)).addCommand(mt(m)),Ut=St;
@@ -1,5 +1,5 @@
1
1
  import { Command } from 'commander';
2
- import { C as Client } from '../Client-Cwoc4b6_.cjs';
2
+ import { C as Client } from '../Client-BJAma6C3.cjs';
3
3
  import 'ky';
4
4
  import 'zod/v4';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Command } from 'commander';
2
- import { C as Client } from '../Client-Cwoc4b6_.js';
2
+ import { C as Client } from '../Client-BJAma6C3.js';
3
3
  import 'ky';
4
4
  import 'zod/v4';
5
5
 
package/dist/cli/index.js CHANGED
@@ -1 +1 @@
1
- import{a}from"../chunk-7GUEPOYA.js";import"../chunk-N4I2NDDN.js";export{a as default};
1
+ import{a}from"../chunk-AWVYHDG4.js";import"../chunk-PGAG3XUU.js";export{a as default};
package/dist/cli.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Rt=Object.create;var mt=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var It=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var _t=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Tt(t))!At.call(n,s)&&s!==e&&mt(n,s,{get:()=>t[s],enumerable:!(o=vt(t,s))||o.enumerable});return n};var yt=(n,t,e)=>(e=n!=null?Rt(It(n)):{},_t(t||!n||!n.__esModule?mt(e,"default",{value:n,enumerable:!0}):e,n));var bt=require("commander");var c=class{getHeaders(){return{}}};var u=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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,{filter:e,pagination:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}delete(t,e,{body:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...s,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 h=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 C=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:s={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var f=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:s={}}={}){return this._transport.send("v1/actions",{...s,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var dt="SUPPORT_ACCESS_TOKEN",ut="SUPPORT_KEY_NAME",lt="SUPPORT_KEY_PASSWORD",Z="SUPPORT_SIGNING_KEY",ht="SUPPORT_BASE_URL";var g=class{name;#t;constructor({name:t=process.env[ut],password:e=process.env[lt]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var b=class{#t;constructor({token:t=process.env[dt]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var O=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/boilerplates/categories",{...s,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var T=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 I=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 Ct="https://api.support.greatdetail.com",ft={"x-powered-by":"GDS/JavaScript"};var A=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.query.build({include:e})})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",s=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(s)}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({pagination:t,filter:e,sort:o,request:s={}}={}){return this._transport.send("v1/contacts",{...s,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var _=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:s,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:s})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var E=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var U=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var G=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var D=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var L=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...e,method:"GET"})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var k=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:s,category:r,language:i,request:p={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...p,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:s,category:r,language:i}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/labels",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 x=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/messages",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var w=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 M=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 s=[];if(e){let r=Array.isArray(e)?e:[e];for(let i of r)s.push(["category",i])}return t!==void 0&&s.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:s})}};var N=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 Y=yt(require("ky"),1);var z=class extends Error{constructor(e,o,{requestID:s,body:r,cause:i}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${r?" - "+r:""}`,{cause:i});this.response=e;this.request=o;this.requestID=s}requestID};function d(n){return typeof n=="function"&&(n=n()),typeof n.toString=="function"?n.toString():typeof n=="string"?n:String(n)}var B=class n{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:s,custom:r}){return[...Object.entries(o??{}).flatMap(([i,p])=>n._filterExemptColumns.includes(i)?[]:this.query(`filter[${i}]`,p)),...this.query("filter",o?.filter),...Object.entries(s??{}).flatMap(([i,p])=>p?this.query("include",i):[]),...Object.entries(t??{}).flatMap(([i,p])=>p===void 0?[]:this.query("sort",(p==="desc"?"-":"")+d(i))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(r??{}).flatMap(([i,p])=>this.query(i,p))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let s of Array.isArray(e)?e:[e])o.push([t,d(s)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let s=[];if(t===void 0&&e===void 0)return s;let r=t?{dir:"before",value:d(t)}:void 0,i=e?{dir:"after",value:d(e)}:void 0,p=o==="after"?i||r:r||i;return p&&s.push([`page[${p.dir}]`,p.value]),s}};var j=class{client;options;query=B;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=Y.default.create({prefixUrl:this.options.baseURL,headers:ft,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="r:";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let s=new Uint8Array(21);return globalThis.crypto.getRandomValues(s),t+Array.from(s,r=>r.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),s=e.authentication??this.options.authentication,i=this.client.extend({headers:{...s.getHeaders(),"x-request-id":o}})(t,e).catch(async p=>{throw p instanceof Y.HTTPError?new z(p.response,p.request,{requestID:o,body:await p.response.text(),cause:p}):p});return{requestID:o,response:()=>i,json:async()=>(await i).json()}}};var q=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:s={}}={}){return this._transport.send("v1/uploads",{...s,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let s=new FormData;for(let r of t)s.append("file",r);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:s})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var a=require("zod/v4"),gt=a.z.object({data:a.z.object({event:a.z.object({id:a.z.string(),type:a.z.string(),payload:a.z.record(a.z.string(),a.z.string()),createdAt:a.z.iso.datetime()})})});var $=class{constructor(t){this._transport=t}async event({key:t=process.env[Z],maxSignatures:e=3,request:o}){let s=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+Z);if(!s)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(s)?s.slice(0,e):[s]))throw new Error("Untrusted signature")}let{data:r}=gt.parse(o.body);return{event:r.event}}async _verifySignature(t,e,o){let s=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",s,new TextEncoder().encode(atob(r)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var V=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 H=class n{static DEFAULT_BASE_URL=Ct;static PublicAuthentication=c;static BasicAuthentication=g;static BearerAuthentication=b;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new j({authentication:t,...o,baseURL:e?.toString()??n.getBaseURL()}),this.account=new u(this._transport),this.accountAccessToken=new l(this._transport),this.accountConversationSettings=new h(this._transport),this.accountNotificationEvent=new C(this._transport),this.action=new f(this._transport),this.boilerplateCategory=new O(this._transport),this.boilerplateContent=new R(this._transport),this.channel=new v(this._transport),this.channelConversationSettings=new T(this._transport),this.compositionSection=new I(this._transport),this.contact=new A(this._transport),this.conversation=new _(this._transport),this.conversationContext=new y(this._transport),this.conversationFeedback=new E(this._transport),this.escalation=new S(this._transport),this.label=new P(this._transport),this.import=new U(this._transport),this.integration={whatsapp:{account:new G(this._transport),phoneNumber:new L(this._transport),businessProfile:new D(this._transport),template:new k(this._transport)}},this.message=new x(this._transport),this.modelConfig=new F(this._transport),this.modelInterface=new w(this._transport),this.note=new W(this._transport),this.source=new M(this._transport),this.statistics=new N(this._transport),this.upload=new q(this._transport),this.webhook=new $(this._transport),this.webhookSubscription=new V(this._transport)}static getBaseURL(){return process.env[ht]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};var tt=require("commander");function et({client:n}){let t=new tt.Command("actions").description("Actions");return t.addCommand(new tt.Command("list").description("List actions").action(async()=>{let e=await n.action.list().json();console.log(e)})),t}var ot=require("commander");function nt({client:n}){let t=new ot.Command("channels").description("Channels");return t.addCommand(new ot.Command("list").description("List channels").action(async()=>{let e=await n.channel.list().json();console.log(e)})),t}var K=require("commander");function st({client:n}){let t=new K.Command("contacts").description("Contacts");return t.addCommand(new K.Command("get").description("Find contact").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.get(e).json();console.log(o)})),t.addCommand(new K.Command("list").description("List contacts").action(async()=>{let e=await n.contact.list().json();console.log(e)})),t.addCommand(new K.Command("get-vcf").description("Export Contact as VCF").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.getVCF(e).response();console.log(o)})),t}var Q=require("commander");function rt({client:n}){let t=new Q.Command("conversations").description("Conversations");return t.addCommand(new Q.Command("get").description("Find conversation").argument("<conversation>","Conversation ID").action(async e=>{let o=await n.conversation.get(e).json();console.log(o)})),t.addCommand(new Q.Command("list").description("List conversations").action(async()=>{let e=await n.conversation.list().json();console.log(e)})),t}var J=require("commander");function it({client:n}){let t=new J.Command("labels").description("Labels");return t.addCommand(new J.Command("get").description("Find label").argument("<label>","Label ID").action(async e=>{let o=await n.label.get(e).json();console.log(o)})),t.addCommand(new J.Command("list").description("List labels").action(async()=>{let e=await n.label.list().json();console.log(e)})),t}var pt=require("commander");function at({client:n}){let t=new pt.Command("messages").description("Messages");return t.addCommand(new pt.Command("list").description("List messages").action(async()=>{let e=await n.message.list().json();console.log(e)})),t}var X=require("commander");function ct({client:n}){let t=new X.Command("sources").description("Sources");return t.addCommand(new X.Command("get").description("Find source").argument("<source>","Source ID").action(async e=>{let o=await n.source.get(e).json();console.log(o)})),t.addCommand(new X.Command("list").description("List sources").action(async()=>{let e=await n.source.list().json();console.log(e)})),t}var m={client:new H(new c)},Et=new bt.Command("gds").description("Great Detail Support System").addCommand(et(m)).addCommand(nt(m)).addCommand(st(m)).addCommand(rt(m)).addCommand(it(m)).addCommand(at(m)).addCommand(ct(m)),Ot=Et;Ot.parseAsync(process.argv);
2
+ "use strict";var Rt=Object.create;var mt=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var It=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var _t=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Tt(t))!At.call(n,s)&&s!==e&&mt(n,s,{get:()=>t[s],enumerable:!(o=vt(t,s))||o.enumerable});return n};var yt=(n,t,e)=>(e=n!=null?Rt(It(n)):{},_t(t||!n||!n.__esModule?mt(e,"default",{value:n,enumerable:!0}):e,n));var bt=require("commander");var c=class{getHeaders(){return{}}};var u=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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,{filter:e,pagination:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}delete(t,e,{body:o,request:s={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...s,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 h=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 C=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:s={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...s,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var f=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:s={}}={}){return this._transport.send("v1/actions",{...s,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var dt="SUPPORT_ACCESS_TOKEN",ut="SUPPORT_KEY_NAME",lt="SUPPORT_KEY_PASSWORD",Z="SUPPORT_SIGNING_KEY",ht="SUPPORT_BASE_URL";var g=class{name;#t;constructor({name:t=process.env[ut],password:e=process.env[lt]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var b=class{#t;constructor({token:t=process.env[dt]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var O=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/categories/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/boilerplates/categories",{...s,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 R=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var T=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 I=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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 Ct="https://api.support.greatdetail.com",ft={"x-powered-by":"GDS/JavaScript"};var A=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.query.build({include:e})})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",s=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(s)}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({pagination:t,filter:e,sort:o,request:s={}}={}){return this._transport.send("v1/contacts",{...s,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var _=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:s,request:r={}}={}){return this._transport.send("v1/conversations",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:s})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var E=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var U=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var G=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var D=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var L=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var k=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:s,category:r,language:i,request:p={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...p,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:s,category:r,language:i}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/labels",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 x=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:s={}}={}){return this._transport.send("v1/messages",{...s,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var w=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 M=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 s=[];if(e){let r=Array.isArray(e)?e:[e];for(let i of r)s.push(["category",i])}return t!==void 0&&s.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:s})}};var N=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 Y=yt(require("ky"),1);var z=class extends Error{constructor(e,o,{requestID:s,body:r,cause:i}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${r?" - "+r:""}`,{cause:i});this.response=e;this.request=o;this.requestID=s}requestID};function d(n){return typeof n=="function"&&(n=n()),typeof n.toString=="function"?n.toString():typeof n=="string"?n:String(n)}var B=class n{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:s,custom:r}){return[...Object.entries(o??{}).flatMap(([i,p])=>n._filterExemptColumns.includes(i)?[]:this.query(`filter[${i}]`,p)),...this.query("filter",o?.filter),...Object.entries(s??{}).flatMap(([i,p])=>p?this.query("include",i):[]),...Object.entries(t??{}).flatMap(([i,p])=>p===void 0?[]:this.query("sort",(p==="desc"?"-":"")+d(i))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(r??{}).flatMap(([i,p])=>this.query(i,p))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let s of Array.isArray(e)?e:[e])o.push([t,d(s)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let s=[];if(t===void 0&&e===void 0)return s;let r=t?{dir:"before",value:d(t)}:void 0,i=e?{dir:"after",value:d(e)}:void 0,p=o==="after"?i||r:r||i;return p&&s.push([`page[${p.dir}]`,p.value]),s}};var j=class{client;options;query=B;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=Y.default.create({prefixUrl:this.options.baseURL,headers:ft,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let s=new Uint8Array(21);return globalThis.crypto.getRandomValues(s),t+Array.from(s,r=>r.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),s=e.authentication??this.options.authentication,i=this.client.extend({headers:{...s.getHeaders(),"x-request-id":o}})(t,e).catch(async p=>{throw p instanceof Y.HTTPError?new z(p.response,p.request,{requestID:o,body:await p.response.text(),cause:p}):p});return{requestID:o,response:()=>i,json:async()=>(await i).json()}}};var q=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:s={}}={}){return this._transport.send("v1/uploads",{...s,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let s=new FormData;for(let r of t)s.append("file",r);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:s})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var a=require("zod/v4"),gt=a.z.object({data:a.z.object({event:a.z.object({id:a.z.string(),type:a.z.string(),payload:a.z.record(a.z.string(),a.z.string()),createdAt:a.z.iso.datetime()})})});var $=class{constructor(t){this._transport=t}async event({key:t=process.env[Z],maxSignatures:e=3,request:o}){let s=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+Z);if(!s)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(s)?s.slice(0,e):[s]))throw new Error("Untrusted signature")}let{data:r}=gt.parse(o.body);return{event:r.event}}async _verifySignature(t,e,o){let s=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",s,new TextEncoder().encode(atob(r)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var V=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 H=class n{static DEFAULT_BASE_URL=Ct;static PublicAuthentication=c;static BasicAuthentication=g;static BearerAuthentication=b;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new j({authentication:t,...o,baseURL:e?.toString()??n.getBaseURL()}),this.account=new u(this._transport),this.accountAccessToken=new l(this._transport),this.accountConversationSettings=new h(this._transport),this.accountNotificationEvent=new C(this._transport),this.action=new f(this._transport),this.boilerplateCategory=new O(this._transport),this.boilerplateContent=new R(this._transport),this.channel=new v(this._transport),this.channelConversationSettings=new T(this._transport),this.compositionSection=new I(this._transport),this.contact=new A(this._transport),this.conversation=new _(this._transport),this.conversationContext=new y(this._transport),this.conversationFeedback=new E(this._transport),this.escalation=new S(this._transport),this.label=new P(this._transport),this.import=new U(this._transport),this.integration={whatsapp:{account:new G(this._transport),phoneNumber:new L(this._transport),businessProfile:new D(this._transport),template:new k(this._transport)}},this.message=new x(this._transport),this.modelConfig=new F(this._transport),this.modelInterface=new w(this._transport),this.note=new W(this._transport),this.source=new M(this._transport),this.statistics=new N(this._transport),this.upload=new q(this._transport),this.webhook=new $(this._transport),this.webhookSubscription=new V(this._transport)}static getBaseURL(){return process.env[ht]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};var tt=require("commander");function et({client:n}){let t=new tt.Command("actions").description("Actions");return t.addCommand(new tt.Command("list").description("List actions").action(async()=>{let e=await n.action.list().json();console.log(e)})),t}var ot=require("commander");function nt({client:n}){let t=new ot.Command("channels").description("Channels");return t.addCommand(new ot.Command("list").description("List channels").action(async()=>{let e=await n.channel.list().json();console.log(e)})),t}var K=require("commander");function st({client:n}){let t=new K.Command("contacts").description("Contacts");return t.addCommand(new K.Command("get").description("Find contact").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.get(e).json();console.log(o)})),t.addCommand(new K.Command("list").description("List contacts").action(async()=>{let e=await n.contact.list().json();console.log(e)})),t.addCommand(new K.Command("get-vcf").description("Export Contact as VCF").argument("<contact>","Contact ID").action(async e=>{let o=await n.contact.getVCF(e).response();console.log(o)})),t}var Q=require("commander");function rt({client:n}){let t=new Q.Command("conversations").description("Conversations");return t.addCommand(new Q.Command("get").description("Find conversation").argument("<conversation>","Conversation ID").action(async e=>{let o=await n.conversation.get(e).json();console.log(o)})),t.addCommand(new Q.Command("list").description("List conversations").action(async()=>{let e=await n.conversation.list().json();console.log(e)})),t}var J=require("commander");function it({client:n}){let t=new J.Command("labels").description("Labels");return t.addCommand(new J.Command("get").description("Find label").argument("<label>","Label ID").action(async e=>{let o=await n.label.get(e).json();console.log(o)})),t.addCommand(new J.Command("list").description("List labels").action(async()=>{let e=await n.label.list().json();console.log(e)})),t}var pt=require("commander");function at({client:n}){let t=new pt.Command("messages").description("Messages");return t.addCommand(new pt.Command("list").description("List messages").action(async()=>{let e=await n.message.list().json();console.log(e)})),t}var X=require("commander");function ct({client:n}){let t=new X.Command("sources").description("Sources");return t.addCommand(new X.Command("get").description("Find source").argument("<source>","Source ID").action(async e=>{let o=await n.source.get(e).json();console.log(o)})),t.addCommand(new X.Command("list").description("List sources").action(async()=>{let e=await n.source.list().json();console.log(e)})),t}var m={client:new H(new c)},Et=new bt.Command("gds").description("Great Detail Support System").addCommand(et(m)).addCommand(nt(m)).addCommand(st(m)).addCommand(rt(m)).addCommand(it(m)).addCommand(at(m)).addCommand(ct(m)),Ot=Et;Ot.parseAsync(process.argv);
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as r}from"./chunk-7GUEPOYA.js";import"./chunk-N4I2NDDN.js";r.parseAsync(process.argv);
2
+ import{a as r}from"./chunk-AWVYHDG4.js";import"./chunk-PGAG3XUU.js";r.parseAsync(process.argv);
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var pt=Object.create;var Y=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var ct=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty;var Z=(n,t)=>{for(var e in t)Y(n,e,{get:t[e],enumerable:!0})},tt=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of at(t))!mt.call(n,r)&&r!==e&&Y(n,r,{get:()=>t[r],enumerable:!(o=it(t,r))||o.enumerable});return n};var ut=(n,t,e)=>(e=n!=null?pt(ct(n)):{},tt(t||!n||!n.__esModule?Y(e,"default",{value:n,enumerable:!0}):e,n)),lt=n=>tt(Y({},"__esModule",{value:!0}),n);var gt={};Z(gt,{Client:()=>u,DEFAULT_SUPPORT_BASE_URL:()=>K,Error:()=>X,SupportError:()=>c,WHATSAPP_BUSINESS_PROFILE_VERTICAL:()=>dt,WHATSAPP_TEMPLATE_CATEGORIES:()=>Ct,WHATSAPP_TEMPLATE_INDUSTRIES:()=>At,WHATSAPP_TEMPLATE_LANGUAGES:()=>ht,WHATSAPP_TEMPLATE_QUALITY_SCORES:()=>_t,WHATSAPP_TEMPLATE_STATUSES:()=>ft,WHATSAPP_TEMPLATE_SUBCATEGORIES:()=>Tt,WHATSAPP_TEMPLATE_TOPICS:()=>Et,WHATSAPP_TEMPLATE_USECASES:()=>Rt,default:()=>u,eventWebhookSchema:()=>J});module.exports=lt(gt);var K="https://api.support.greatdetail.com",et={"x-powered-by":"GDS/JavaScript"};var l=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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 d=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,{filter:e,pagination:o,request:r={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...r,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}delete(t,e,{body:o,request:r={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...r,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 f=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 h=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:r={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...r,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var C=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:r={}}={}){return this._transport.send("v1/actions",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var ot="SUPPORT_ACCESS_TOKEN",nt="SUPPORT_KEY_NAME",rt="SUPPORT_KEY_PASSWORD",Q="SUPPORT_SIGNING_KEY",st="SUPPORT_BASE_URL";var T=class{name;#t;constructor({name:t=process.env[nt],password:e=process.env[rt]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var A=class{#t;constructor({token:t=process.env[ot]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var E=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({filter:t,pagination:e,include:o,request:r={}}={}){return this._transport.send("v1/boilerplates/categories",{...r,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 _=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var O=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 b=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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.query.build({include:e})})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",r=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(r)}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({pagination:t,filter:e,sort:o,request:r={}}={}){return this._transport.send("v1/contacts",{...r,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var I=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:r,request:s={}}={}){return this._transport.send("v1/conversations",{...s,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:r})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var U=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var L=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var D=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...e,method:"GET"})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var G=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:r,category:s,language:p,request:i={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...i,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:r,category:s,language:p}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var N=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:r={}}={}){return this._transport.send("v1/labels",{...r,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 k=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:r={}}={}){return this._transport.send("v1/messages",{...r,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var M=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 w=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 r=[];if(e){let s=Array.isArray(e)?e:[e];for(let p of s)r.push(["category",p])}return t!==void 0&&r.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:r})}};var B=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 z=ut(require("ky"),1);var c=class extends Error{constructor(e,o,{requestID:r,body:s,cause:p}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${s?" - "+s:""}`,{cause:p});this.response=e;this.request=o;this.requestID=r}requestID};function m(n){return typeof n=="function"&&(n=n()),typeof n.toString=="function"?n.toString():typeof n=="string"?n:String(n)}var H=class n{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:r,custom:s}){return[...Object.entries(o??{}).flatMap(([p,i])=>n._filterExemptColumns.includes(p)?[]:this.query(`filter[${p}]`,i)),...this.query("filter",o?.filter),...Object.entries(r??{}).flatMap(([p,i])=>i?this.query("include",p):[]),...Object.entries(t??{}).flatMap(([p,i])=>i===void 0?[]:this.query("sort",(i==="desc"?"-":"")+m(p))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(s??{}).flatMap(([p,i])=>this.query(p,i))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let r of Array.isArray(e)?e:[e])o.push([t,m(r)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let r=[];if(t===void 0&&e===void 0)return r;let s=t?{dir:"before",value:m(t)}:void 0,p=e?{dir:"after",value:m(e)}:void 0,i=o==="after"?p||s:s||p;return i&&r.push([`page[${i.dir}]`,i.value]),r}};var q=class{client;options;query=H;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=z.default.create({prefixUrl:this.options.baseURL,headers:et,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="r:";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let r=new Uint8Array(21);return globalThis.crypto.getRandomValues(r),t+Array.from(r,s=>s.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),r=e.authentication??this.options.authentication,p=this.client.extend({headers:{...r.getHeaders(),"x-request-id":o}})(t,e).catch(async i=>{throw i instanceof z.HTTPError?new c(i.response,i.request,{requestID:o,body:await i.response.text(),cause:i}):i});return{requestID:o,response:()=>p,json:async()=>(await p).json()}}};var j=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:r={}}={}){return this._transport.send("v1/uploads",{...r,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let r=new FormData;for(let s of t)r.append("file",s);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:r})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var a=require("zod/v4"),J=a.z.object({data:a.z.object({event:a.z.object({id:a.z.string(),type:a.z.string(),payload:a.z.record(a.z.string(),a.z.string()),createdAt:a.z.iso.datetime()})})});var V=class{constructor(t){this._transport=t}async event({key:t=process.env[Q],maxSignatures:e=3,request:o}){let r=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+Q);if(!r)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(r)?r.slice(0,e):[r]))throw new Error("Untrusted signature")}let{data:s}=J.parse(o.body);return{event:s.event}}async _verifySignature(t,e,o){let r=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign","verify"]);for(let s of o)if(await crypto.subtle.verify("HMAC",r,new TextEncoder().encode(atob(s)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var $=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 u=class n{static DEFAULT_BASE_URL=K;static PublicAuthentication=E;static BasicAuthentication=T;static BearerAuthentication=A;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new q({authentication:t,...o,baseURL:e?.toString()??n.getBaseURL()}),this.account=new l(this._transport),this.accountAccessToken=new d(this._transport),this.accountConversationSettings=new f(this._transport),this.accountNotificationEvent=new h(this._transport),this.action=new C(this._transport),this.boilerplateCategory=new R(this._transport),this.boilerplateContent=new _(this._transport),this.channel=new g(this._transport),this.channelConversationSettings=new O(this._transport),this.compositionSection=new b(this._transport),this.contact=new x(this._transport),this.conversation=new I(this._transport),this.conversationContext=new v(this._transport),this.conversationFeedback=new S(this._transport),this.escalation=new y(this._transport),this.label=new N(this._transport),this.import=new U(this._transport),this.integration={whatsapp:{account:new L(this._transport),phoneNumber:new D(this._transport),businessProfile:new P(this._transport),template:new G(this._transport)}},this.message=new k(this._transport),this.modelConfig=new W(this._transport),this.modelInterface=new M(this._transport),this.note=new F(this._transport),this.source=new w(this._transport),this.statistics=new B(this._transport),this.upload=new j(this._transport),this.webhook=new V(this._transport),this.webhookSubscription=new $(this._transport)}static getBaseURL(){return process.env[st]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};var X={};Z(X,{SupportError:()=>c});var dt=["ALCOHOL","APPAREL","AUTO","BEAUTY","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GOVT","GROCERY","HEALTH","HOTEL","NONPROFIT","ONLINE_GAMBLING","OTC_DRUGS","OTHER","PHYSICAL_GAMBLING","PROF_SERVICES","RESTAURANT","RETAIL","TRAVEL"];var ft=["PENDING","APPROVED","REJECTED","IN_APPEAL","PAUSED","PENDING_DELETION","DELETED","DISABLED","LIMIT_EXCEEDED"],ht=["af","sq","ar","ar_EG","ar_AE","ar_LB","ar_MA","ar_QA","az","be_BY","bn","bn_IN","bg","ca","zh_CN","zh_HK","zh_TW","hr","cs","da","prs_AF","nl","nl_BE","en","en_GB","en_US","en_AE","en_AU","en_CA","en_GH","en_IE","en_IN","en_JM","en_MY","en_NZ","en_QA","en_SG","en_UG","en_ZA","et","fil","fi","fr","fr_BE","fr_CA","fr_CH","fr_CI","fr_MA","ka","de","de_AT","de_CH","el","gu","ha","he","hi","hu","id","ga","it","ja","kn","kk","rw_RW","ko","ky_KG","lo","lv","lt","mk","ms","ml","mr","nb","ps_AF","fa","pl","pt_BR","pt_PT","pa","ro","ru","sr","si_LK","sk","sl","es","es_AR","es_CL","es_CO","es_CR","es_DO","es_EC","es_HN","es_MX","es_PA","es_PE","es_ES","es_UY","sw","sv","ta","te","th","th","tr","uk","ur","uz","vi","zu"],Ct=["AUTHENTICATION","MARKETING","UTILITY"],Tt=["ORDER_DETAILS","ORDER_STATUS"],At=["E_COMMERCE","FINANCIAL_SERVICES"],Et=["ACCOUNT_UPDATES","CUSTOMER_FEEDBACK","EVENT_REMINDER","FIXED_TEMPLATE_PRICE_TEST","IDENTITY_VERIFICATION","ORDER_MANAGEMENT","PAYMENTS"],Rt=["ACCOUNT_CREATION_CONFIRMATION","PAYMENT_DUE_REMINDER","FEEDBACK_SURVEY","PAYMENT_ACTION_REQUIRED","SHIPMENT_CONFIRMATION","PAYMENT_OVERDUE","DELIVERY_UPDATE","PAYMENT_CONFIRMATION","ORDER_DELAY","FRAUD_ALERT","DELIVERY_FAILED","AUTO_PAY_REMINDER","DELIVERY_CONFIRMATION","PAYMENT_SCHEDULED","ORDER_PICK_UP","PAYMENT_REJECT_FAIL","ORDER_ACTION_NEEDED","STATEMENT_AVAILABLE","ORDER_CONFIRMATION","LOW_BALANCE_WARNING","ORDER_OR_TRANSACTION_CANCEL","RECEIPT_ATTACHMENT","RETURN_CONFIRMATION","STATEMENT_ATTACHMENT","TRANSACTION_ALERT"],_t=["GREEN","YELLOW","RED","UNKNOWN"];0&&(module.exports={Client,DEFAULT_SUPPORT_BASE_URL,Error,SupportError,WHATSAPP_BUSINESS_PROFILE_VERTICAL,WHATSAPP_TEMPLATE_CATEGORIES,WHATSAPP_TEMPLATE_INDUSTRIES,WHATSAPP_TEMPLATE_LANGUAGES,WHATSAPP_TEMPLATE_QUALITY_SCORES,WHATSAPP_TEMPLATE_STATUSES,WHATSAPP_TEMPLATE_SUBCATEGORIES,WHATSAPP_TEMPLATE_TOPICS,WHATSAPP_TEMPLATE_USECASES,eventWebhookSchema});
1
+ "use strict";var pt=Object.create;var Y=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var ct=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty;var Z=(n,t)=>{for(var e in t)Y(n,e,{get:t[e],enumerable:!0})},tt=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of at(t))!mt.call(n,r)&&r!==e&&Y(n,r,{get:()=>t[r],enumerable:!(o=it(t,r))||o.enumerable});return n};var ut=(n,t,e)=>(e=n!=null?pt(ct(n)):{},tt(t||!n||!n.__esModule?Y(e,"default",{value:n,enumerable:!0}):e,n)),lt=n=>tt(Y({},"__esModule",{value:!0}),n);var gt={};Z(gt,{Client:()=>u,DEFAULT_SUPPORT_BASE_URL:()=>K,Error:()=>X,SupportError:()=>c,WHATSAPP_BUSINESS_PROFILE_VERTICAL:()=>dt,WHATSAPP_TEMPLATE_CATEGORIES:()=>Ct,WHATSAPP_TEMPLATE_INDUSTRIES:()=>At,WHATSAPP_TEMPLATE_LANGUAGES:()=>ht,WHATSAPP_TEMPLATE_QUALITY_SCORES:()=>_t,WHATSAPP_TEMPLATE_STATUSES:()=>ft,WHATSAPP_TEMPLATE_SUBCATEGORIES:()=>Tt,WHATSAPP_TEMPLATE_TOPICS:()=>Et,WHATSAPP_TEMPLATE_USECASES:()=>Rt,default:()=>u,eventWebhookSchema:()=>J});module.exports=lt(gt);var K="https://api.support.greatdetail.com",et={"x-powered-by":"GDS/JavaScript"};var l=class{constructor(t){this._transport=t}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/accounts",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter: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 d=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,{filter:e,pagination:o,request:r={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens",{...r,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}delete(t,e,{body:o,request:r={}}={}){return this._transport.send("v1/accounts/"+encodeURIComponent(t)+"/access-tokens/"+encodeURIComponent(e),{...r,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 f=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 h=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...e,method:"GET"})}listByAccount(t,{filter:e,pagination:o,request:r={}}={}){return this._transport.send(`v1/accounts/${encodeURIComponent(t)}/notifications/events`,{...r,method:"GET",searchParams:this._transport.query.build({pagination:o,filter:e})})}update(t,{body:e,request:o={}}){return this._transport.send("v1/notifications/events/account/"+encodeURIComponent(t),{...o,method:"PATCH",json:{...e,readAt:e.readAt instanceof Date&&typeof e.readAt.getMonth=="function"?e.readAt.toISOString():e.readAt}})}};var C=class{constructor(t){this._transport=t}list({filter:t,sort:e,pagination:o,request:r={}}={}){return this._transport.send("v1/actions",{...r,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t})})}};var ot="SUPPORT_ACCESS_TOKEN",nt="SUPPORT_KEY_NAME",rt="SUPPORT_KEY_PASSWORD",Q="SUPPORT_SIGNING_KEY",st="SUPPORT_BASE_URL";var T=class{name;#t;constructor({name:t=process.env[nt],password:e=process.env[rt]}={}){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(){let t=typeof this.name=="function"?this.name():this.name,e=typeof this.#t=="function"?this.#t():this.#t;return{Authorization:`Basic ${btoa(t+":"+e)}`}}};var A=class{#t;constructor({token:t=process.env[ot]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}getHeaders(){return{Authorization:`Bearer ${typeof this.#t=="function"?this.#t():this.#t}`}}};var E=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({filter:t,pagination:e,include:o,request:r={}}={}){return this._transport.send("v1/boilerplates/categories",{...r,method:"GET",searchParams:this._transport.query.build({include:o,pagination:e,filter:t})})}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 _=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/boilerplates/contents/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/boilerplates/contents",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/channels",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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})}delete(t,{request:e={}}={}){return this._transport.send("v1/channels/"+encodeURIComponent(t),{...e,method:"DELETE"})}sendgridChannelSync(t,{body:e,request:o={}}){return this._transport.send("v1/channels/"+encodeURIComponent(t)+"/sendgrid/sync",{...o,method:"POST",json:e})}};var O=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 b=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/composition-sections/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/composition-sections",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}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.query.build({include:e})})}getRelativeVCFURL(t,{vcf:e={}}={}){let o=e.variant??"vcard",r=e.format??(o==="vcard"?"vcf":"json");return"v1/contacts/"+encodeURIComponent(t)+"/vcf?variant="+encodeURIComponent(o)+"&format="+encodeURIComponent(r)}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({pagination:t,filter:e,sort:o,request:r={}}={}){return this._transport.send("v1/contacts",{...r,method:"GET",searchParams:this._transport.query.build({pagination:t,sort:o,filter: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"})}merge(t,e,{request:o={}}={}){return this._transport.send(`v1/contacts/${encodeURIComponent(t)}/merge`,{...o,method:"POST",json:{contact:e}})}};var I=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.query.build({include:e})})}list({filter:t,sort:e,pagination:o,include:r,request:s={}}={}){return this._transport.send("v1/conversations",{...s,method:"GET",searchParams:this._transport.query.build({sort:e,pagination:o,filter:t,include:r})})}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"})}triggerResponse(t,{request:e={}}={}){return this._transport.send(`v1/conversations/${encodeURIComponent(t)}/response`,{...e,method:"POST"})}};var v=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send(`v1/conversation/${encodeURIComponent(t)}/context`,{...o,method:"PATCH",json:e})}};var S=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/feedback/conversation",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/feedback/conversation",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send("v1/feedback/conversation/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var y=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/escalations/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/escalations",{...o,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t})})}create({body:t,request:e={}}){return this._transport.send("v1/escalations",{...e,method:"POST",json:t})}delete(t,{request:e={}}={}){return this._transport.send(`v1/escalations/${encodeURIComponent(t)}`,{...e,method:"DELETE"})}};var P=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/imports",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/imports",{...e,method:"POST",json:t})}delete(t,{body:e,request:o={}}){return this._transport.send("v1/imports/"+encodeURIComponent(t),{...o,method:"DELETE",json:e})}};var U=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({request:t={}}={}){return this._transport.send("v1/integrations/whatsapp/accounts",{...t,method:"GET"})}};var L=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...e,method:"GET"})}update(t,{body:e,request:o={}}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t)+"/business-profile",{...o,method:"PATCH",json:e})}};var D=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({whatsappAccount:t,channel:e,request:o={}}={}){return this._transport.send("v1/integrations/whatsapp/phone-numbers",{...o,method:"GET",searchParams:this._transport.query.build({filter:{whatsappAccount:t,channel:e}})})}};var G=class{constructor(t){this._transport=t}listByAccount(t,{search:e,status:o,quality:r,category:s,language:p,request:i={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates`,{...i,method:"GET",searchParams:this._transport.query.build({filter:{search:e,status:o,quality:r,category:s,language:p}})})}getByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"GET"})}deleteByAccount(t,e,{request:o={}}={}){return this._transport.send(`v1/integrations/whatsapp/accounts/${t}/templates/${e}`,{...o,method:"DELETE"})}};var N=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/labels/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:r={}}={}){return this._transport.send("v1/labels",{...r,method:"GET",searchParams:this._transport.query.build({pagination:e,filter:t,include:o})})}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 W=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send(`v1/messages/${encodeURIComponent(t)}`,{...e,method:"GET"})}list({filter:t,pagination:e,include:o,request:r={}}={}){return this._transport.send("v1/messages",{...r,method:"GET",searchParams:this._transport.query.build({pagination:e,include:o,filter:t})})}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 k=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/models/configs",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}create({body:t,request:e={}}){return this._transport.send("v1/models/configs",{...e,method:"POST",json:t})}update(t,{body:e,request:o={}}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...o,method:"PATCH",json:e})}delete(t,{request:e={}}={}){return this._transport.send("v1/models/configs/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var M=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/models/interfaces/"+encodeURIComponent(t),{...e,method:"GET"})}list({request:t={}}={}){return this._transport.send("v1/models/interfaces",{...t,method:"GET"})}};var F=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/notes/"+encodeURIComponent(t),{...e,method:"GET"})}list({filter:t,pagination:e,request:o={}}={}){return this._transport.send("v1/notes",{...o,method:"GET",searchParams:this._transport.query.build({filter:t,pagination:e})})}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 w=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 r=[];if(e){let s=Array.isArray(e)?e:[e];for(let p of s)r.push(["category",p])}return t!==void 0&&r.push(["featured",String(t)]),this._transport.send("v1/sources",{...o,method:"GET",searchParams:r})}};var B=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 z=ut(require("ky"),1);var c=class extends Error{constructor(e,o,{requestID:r,body:s,cause:p}){super(`GDS(ERR): [${e.status}] ${o.method}:${e.url}${s?" - "+s:""}`,{cause:p});this.response=e;this.request=o;this.requestID=r}requestID};function m(n){return typeof n=="function"&&(n=n()),typeof n.toString=="function"?n.toString():typeof n=="string"?n:String(n)}var H=class n{static _filterExemptColumns=["filter"];static build({sort:t,pagination:e,filter:o,include:r,custom:s}){return[...Object.entries(o??{}).flatMap(([p,i])=>n._filterExemptColumns.includes(p)?[]:this.query(`filter[${p}]`,i)),...this.query("filter",o?.filter),...Object.entries(r??{}).flatMap(([p,i])=>i?this.query("include",p):[]),...Object.entries(t??{}).flatMap(([p,i])=>i===void 0?[]:this.query("sort",(i==="desc"?"-":"")+m(p))),...this.paginationCursor(e),...this.query("page[size]",e?.size),...Object.entries(s??{}).flatMap(([p,i])=>this.query(p,i))]}static query(t,e){let o=[];if(e===void 0)return o;if(e===null)return[...o,[t,"null"]];for(let r of Array.isArray(e)?e:[e])o.push([t,m(r)]);return o}static paginationCursor({before:t,after:e,preferred:o="after"}={}){let r=[];if(t===void 0&&e===void 0)return r;let s=t?{dir:"before",value:m(t)}:void 0,p=e?{dir:"after",value:m(e)}:void 0,i=o==="after"?p||s:s||p;return i&&r.push([`page[${i.dir}]`,i.value]),r}};var q=class{client;options;query=H;constructor({baseURL:t,authentication:e,...o}){this.options={authentication:e,baseURL:t},this.client=z.default.create({prefixUrl:this.options.baseURL,headers:et,timeout:12e3,...o.request})}getURL(t){return new URL(t,this.options.baseURL).toString()}_generateRequestId(){let t="";if(globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"){let r=new Uint8Array(21);return globalThis.crypto.getRandomValues(r),t+Array.from(r,s=>s.toString(16).padStart(2,"0")).join("")}if(globalThis.crypto&&typeof globalThis.crypto.randomUUID=="function")return t+globalThis.crypto.randomUUID();let e=Date.now().toString(36),o=Math.random().toString(36).slice(2);return`${t}${e}-${o}`}send(t,e={}){let o=this._generateRequestId(),r=e.authentication??this.options.authentication,p=this.client.extend({headers:{...r.getHeaders(),"x-request-id":o}})(t,e).catch(async i=>{throw i instanceof z.HTTPError?new c(i.response,i.request,{requestID:o,body:await i.response.text(),cause:i}):i});return{requestID:o,response:()=>p,json:async()=>(await p).json()}}};var j=class{constructor(t){this._transport=t}get(t,{include:e,request:o={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...o,method:"GET",searchParams:this._transport.query.build({include:e})})}list({filter:t,include:e,pagination:o,request:r={}}={}){return this._transport.send("v1/uploads",{...r,method:"GET",searchParams:this._transport.query.build({filter:t,include:e,pagination:o})})}create({files:t,include:e,request:o={}}){let r=new FormData;for(let s of t)r.append("file",s);return this._transport.send("v1/uploads",{...o,method:"POST",searchParams:this._transport.query.build({include:e}),body:r})}delete(t,{request:e={}}={}){return this._transport.send("v1/uploads/"+encodeURIComponent(t),{...e,method:"DELETE"})}};var a=require("zod/v4"),J=a.z.object({data:a.z.object({event:a.z.object({id:a.z.string(),type:a.z.string(),payload:a.z.record(a.z.string(),a.z.string()),createdAt:a.z.iso.datetime()})})});var V=class{constructor(t){this._transport=t}async event({key:t=process.env[Q],maxSignatures:e=3,request:o}){let r=o.headers["gds-signature"];if(t!==!1){if(t===void 0)throw new Error("Missing webhook signing key in process.env."+Q);if(!r)throw new Error("Missing signature header");if(!this._verifySignature(t,o.body,Array.isArray(r)?r.slice(0,e):[r]))throw new Error("Untrusted signature")}let{data:s}=J.parse(o.body);return{event:s.event}}async _verifySignature(t,e,o){let r=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign","verify"]);for(let s of o)if(await crypto.subtle.verify("HMAC",r,new TextEncoder().encode(atob(s)),new TextEncoder().encode(JSON.stringify(e))))return!0;return!1}};var $=class{constructor(t){this._transport=t}get(t,{request:e={}}={}){return this._transport.send("v1/webhooks/subscriptions/"+encodeURIComponent(t),{...e,method:"GET"})}list({pagination:t,filter:e,request:o={}}={}){return this._transport.send("v1/webhooks/subscriptions",{...o,method:"GET",searchParams:this._transport.query.build({filter:e,pagination:t})})}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 u=class n{static DEFAULT_BASE_URL=K;static PublicAuthentication=E;static BasicAuthentication=T;static BearerAuthentication=A;_transport;account;accountAccessToken;accountConversationSettings;accountNotificationEvent;action;boilerplateCategory;boilerplateContent;channel;channelConversationSettings;compositionSection;contact;conversation;conversationContext;conversationFeedback;escalation;label;import;integration;message;modelConfig;modelInterface;note;source;statistics;upload;webhook;webhookSubscription;constructor(t,{baseURL:e,...o}={}){this._transport=new q({authentication:t,...o,baseURL:e?.toString()??n.getBaseURL()}),this.account=new l(this._transport),this.accountAccessToken=new d(this._transport),this.accountConversationSettings=new f(this._transport),this.accountNotificationEvent=new h(this._transport),this.action=new C(this._transport),this.boilerplateCategory=new R(this._transport),this.boilerplateContent=new _(this._transport),this.channel=new g(this._transport),this.channelConversationSettings=new O(this._transport),this.compositionSection=new b(this._transport),this.contact=new x(this._transport),this.conversation=new I(this._transport),this.conversationContext=new v(this._transport),this.conversationFeedback=new S(this._transport),this.escalation=new y(this._transport),this.label=new N(this._transport),this.import=new P(this._transport),this.integration={whatsapp:{account:new U(this._transport),phoneNumber:new D(this._transport),businessProfile:new L(this._transport),template:new G(this._transport)}},this.message=new W(this._transport),this.modelConfig=new k(this._transport),this.modelInterface=new M(this._transport),this.note=new F(this._transport),this.source=new w(this._transport),this.statistics=new B(this._transport),this.upload=new j(this._transport),this.webhook=new V(this._transport),this.webhookSubscription=new $(this._transport)}static getBaseURL(){return process.env[st]??this.DEFAULT_BASE_URL}$request(t,e){return this._transport.send(t,e)}};var X={};Z(X,{SupportError:()=>c});var dt=["ALCOHOL","APPAREL","AUTO","BEAUTY","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GOVT","GROCERY","HEALTH","HOTEL","NONPROFIT","ONLINE_GAMBLING","OTC_DRUGS","OTHER","PHYSICAL_GAMBLING","PROF_SERVICES","RESTAURANT","RETAIL","TRAVEL"];var ft=["PENDING","APPROVED","REJECTED","IN_APPEAL","PAUSED","PENDING_DELETION","DELETED","DISABLED","LIMIT_EXCEEDED"],ht=["af","sq","ar","ar_EG","ar_AE","ar_LB","ar_MA","ar_QA","az","be_BY","bn","bn_IN","bg","ca","zh_CN","zh_HK","zh_TW","hr","cs","da","prs_AF","nl","nl_BE","en","en_GB","en_US","en_AE","en_AU","en_CA","en_GH","en_IE","en_IN","en_JM","en_MY","en_NZ","en_QA","en_SG","en_UG","en_ZA","et","fil","fi","fr","fr_BE","fr_CA","fr_CH","fr_CI","fr_MA","ka","de","de_AT","de_CH","el","gu","ha","he","hi","hu","id","ga","it","ja","kn","kk","rw_RW","ko","ky_KG","lo","lv","lt","mk","ms","ml","mr","nb","ps_AF","fa","pl","pt_BR","pt_PT","pa","ro","ru","sr","si_LK","sk","sl","es","es_AR","es_CL","es_CO","es_CR","es_DO","es_EC","es_HN","es_MX","es_PA","es_PE","es_ES","es_UY","sw","sv","ta","te","th","th","tr","uk","ur","uz","vi","zu"],Ct=["AUTHENTICATION","MARKETING","UTILITY"],Tt=["ORDER_DETAILS","ORDER_STATUS"],At=["E_COMMERCE","FINANCIAL_SERVICES"],Et=["ACCOUNT_UPDATES","CUSTOMER_FEEDBACK","EVENT_REMINDER","FIXED_TEMPLATE_PRICE_TEST","IDENTITY_VERIFICATION","ORDER_MANAGEMENT","PAYMENTS"],Rt=["ACCOUNT_CREATION_CONFIRMATION","PAYMENT_DUE_REMINDER","FEEDBACK_SURVEY","PAYMENT_ACTION_REQUIRED","SHIPMENT_CONFIRMATION","PAYMENT_OVERDUE","DELIVERY_UPDATE","PAYMENT_CONFIRMATION","ORDER_DELAY","FRAUD_ALERT","DELIVERY_FAILED","AUTO_PAY_REMINDER","DELIVERY_CONFIRMATION","PAYMENT_SCHEDULED","ORDER_PICK_UP","PAYMENT_REJECT_FAIL","ORDER_ACTION_NEEDED","STATEMENT_AVAILABLE","ORDER_CONFIRMATION","LOW_BALANCE_WARNING","ORDER_OR_TRANSACTION_CANCEL","RECEIPT_ATTACHMENT","RETURN_CONFIRMATION","STATEMENT_ATTACHMENT","TRANSACTION_ALERT"],_t=["GREEN","YELLOW","RED","UNKNOWN"];0&&(module.exports={Client,DEFAULT_SUPPORT_BASE_URL,Error,SupportError,WHATSAPP_BUSINESS_PROFILE_VERTICAL,WHATSAPP_TEMPLATE_CATEGORIES,WHATSAPP_TEMPLATE_INDUSTRIES,WHATSAPP_TEMPLATE_LANGUAGES,WHATSAPP_TEMPLATE_QUALITY_SCORES,WHATSAPP_TEMPLATE_STATUSES,WHATSAPP_TEMPLATE_SUBCATEGORIES,WHATSAPP_TEMPLATE_TOPICS,WHATSAPP_TEMPLATE_USECASES,eventWebhookSchema});
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as Account, p as AccountAccessToken, q as AccountAccessTokenID, er as AccountAccessTokenWebhookEventType, B as AccountConversationSettings, h as AccountID, K as AccountNotificationEvent, es as AccountNotificationEventEventType, g as AccountStatus, eq as AccountWebhookWebhookEventType, T as Action, V as ActionID, W as ActionStatus, bt as ActiveConversationStatus, aa as BoilerplateCategory, ab as BoilerplateCategoryID, _ as BoilerplateContent, $ as BoilerplateContentID, an as Channel, aG as ChannelConversationSettings, ao as ChannelID, ap as ChannelStatus, C as Client, aM as CompositionSection, aN as CompositionSectionID, aO as CompositionSectionLocation, bu as ConcludedConversationStatus, b7 as Contact, bb as ContactCustomMetadata, b8 as ContactID, ba as ContactStatus, b9 as ContactType, et as ContactWebhookEventType, bq as Conversation, bs as ConversationCustomMetadata, bO as ConversationFeedback, br as ConversationID, bN as ConversationSettings, bv as ConversationStatus, eu as ConversationWebhookEventType, e as CountResponsePagination, s as CreateAccountAccessTokenOptions, r as CreateAccountAccessTokenPayload, t as CreateAccountAccessTokenResponse, j as CreateAccountOptions, i as CreateAccountPayload, k as CreateAccountResponse, ad as CreateBoilerplateCategoryOptions, ac as CreateBoilerplateCategoryPayload, ae as CreateBoilerplateCategoryResponse, a1 as CreateBoilerplateContentOptions, a0 as CreateBoilerplateContentPayload, a2 as CreateBoilerplateContentResponse, as as CreateChannelOptions, ar as CreateChannelPayload, at as CreateChannelResponse, aQ as CreateCompositionSectionOptions, aP as CreateCompositionSectionPayload, aR as CreateCompositionSectionResponse, bd as CreateContactOptions, bc as CreateContactPayload, be as CreateContactResponse, bQ as CreateConversationFeedbackOptions, bP as CreateConversationFeedbackPayload, bR as CreateConversationFeedbackResponse, bx as CreateConversationOptions, bw as CreateConversationPayload, by as CreateConversationResponse, a$ as CreateEscalationOptions, a_ as CreateEscalationPayload, b0 as CreateEscalationResponse, cd as CreateImportOptions, cc as CreateImportPayload, ce as CreateImportResponse, b_ as CreateLabelOptions, bZ as CreateLabelPayload, b$ as CreateLabelResponse, di as CreateMessageOptions, dh as CreateMessagePayload, dj as CreateMessageResponse, dB as CreateModelConfigOptions, dA as CreateModelConfigPayload, dC as CreateModelConfigResponse, dU as CreateNoteOptions, dT as CreateNotePayload, dV as CreateNoteResponse, eb as CreateUploadIncludeOptions, ec as CreateUploadOptions, ed as CreateUploadResponse, eC as CreateWebhookSubscriptionOptions, eB as CreateWebhookSubscriptionPayload, eD as CreateWebhookSubscriptionResponse, f as CurrentAccountID, d as CursorResponsePagination, aq as CustomChannelCustomMetadata, u as DeleteAccountAccessTokenOptions, D as DeleteAccountAccessTokenPayload, v as DeleteAccountAccessTokenResponse, au as DeleteChannelOptions, av as DeleteChannelResponse, bf as DeleteContactOptions, bg as DeleteContactResponse, bS as DeleteConversationFeedbackOptions, bT as DeleteConversationFeedbackResponse, bz as DeleteConversationOptions, bA as DeleteConversationResponse, b5 as DeleteEscalationOptions, b6 as DeleteEscalationResponse, c0 as DeleteLabelOptions, c1 as DeleteLabelResponse, dk as DeleteMessageOptions, dl as DeleteMessageResponse, dD as DeleteModelConfigOptions, dE as DeleteModelConfigResponse, ee as DeleteUploadOptions, ef as DeleteUploadResponse, eE as DeleteWebhookSubscriptionOptions, eF as DeleteWebhookSubscriptionResponse, cF as DeleteWhatsappAccountTemplateOptions, cG as DeleteWhatsappAccountTemplateResponse, aZ as Escalation, en as EventWebhookOptions, w as GetAccountAccessTokenOptions, x as GetAccountAccessTokenResponse, E as GetAccountConversationSettingsOptions, F as GetAccountConversationSettingsResponse, M as GetAccountNotificationEventOptions, N as GetAccountNotificationEventResponse, G as GetAccountOptions, l as GetAccountResponse, af as GetBoilerplateCategoryOptions, ag as GetBoilerplateCategoryResponse, a3 as GetBoilerplateContentOptions, a4 as GetBoilerplateContentResponse, aH as GetChannelConversationSettingsOptions, aI as GetChannelConversationSettingsResponse, aw as GetChannelOptions, ax as GetChannelResponse, aS as GetCompositionSectionOptions, aT as GetCompositionSectionResponse, bh as GetContactIncludeOptions, bi as GetContactOptions, bj as GetContactResponse, bk as GetContactVCFOptions, bU as GetConversationFeedbackOptions, bV as GetConversationFeedbackResponse, bB as GetConversationIncludeOptions, bC as GetConversationOptions, bD as GetConversationResponse, b1 as GetEscalationOptions, b2 as GetEscalationResponse, cf as GetImportOptions, cg as GetImportResponse, c2 as GetLabelOptions, c3 as GetLabelResponse, dm as GetMessageOptions, dn as GetMessageResponse, dI as GetModelConfigOptions, dJ as GetModelConfigResponse, dN as GetModelInterfaceOptions, dO as GetModelInterfaceResponse, dW as GetNoteOptions, dX as GetNoteResponse, e4 as GetSourceOptions, e5 as GetSourceResponse, eg as GetUploadIncludeOptions, eh as GetUploadOptions, ei as GetUploadResponse, eG as GetWebhookSubscriptionOptions, eH as GetWebhookSubscriptionResponse, co as GetWhatsappAccountIncludeOptions, cp as GetWhatsappAccountOptions, cq as GetWhatsappAccountResponse, cH as GetWhatsappAccountTemplateOptions, cI as GetWhatsappAccountTemplateResponse, cv as GetWhatsappBusinessProfileOptions, cw as GetWhatsappBusinessProfileResponse, cB as GetWhatsappPhoneNumberOptions, cC as GetWhatsappPhoneNumberResponse, cb as Import, cj as ImportID, cl as ImportStatus, ck as ImportType, ew as ImportWebhookEventType, bY as Label, c4 as LabelID, d5 as LexicalDirection, da as LexicalHeadingNode, de as LexicalHorizontalRuleNode, d6 as LexicalIndent, d8 as LexicalLinkNode, dc as LexicalListItemNode, dd as LexicalListNode, db as LexicalParagraphNode, d9 as LexicalQuoteNode, dg as LexicalRootNode, d7 as LexicalTextNode, df as LexicalUploadNode, y as ListAccountAccessTokensOptions, z as ListAccountAccessTokensResponse, P as ListAccountNotificationEventsFilterOptions, Q as ListAccountNotificationEventsOptions, S as ListAccountNotificationEventsResponse, L as ListAccountsOptions, o as ListAccountsResponse, Y as ListActionsOptions, Z as ListActionsResponse, ah as ListBoilerplateCategoriesIncludeOptions, ai as ListBoilerplateCategoriesOptions, aj as ListBoilerplateCategoriesResponse, a5 as ListBoilerplateContentsOptions, a6 as ListBoilerplateContentsResponse, ay as ListChannelsOptions, az as ListChannelsResponse, aU as ListCompositionSectionsOptions, aV as ListCompositionSectionsResponse, bl as ListContactsOptions, bm as ListContactsResponse, bW as ListConversationFeedbackOptions, bX as ListConversationFeedbackResponse, bG as ListConversationOptions, bF as ListConversationsFilterOptions, bE as ListConversationsIncludeOptions, bH as ListConversationsResponse, b3 as ListEscalationsOptions, b4 as ListEscalationsResponse, ch as ListImportsOptions, ci as ListImportsResponse, c5 as ListLabelsIncludeOptions, c6 as ListLabelsOptions, c7 as ListLabelsResponse, dp as ListMessagesIncludeOptions, dq as ListMessagesOptions, dr as ListMessagesResponse, dK as ListModelConfigsOptions, dL as ListModelConfigsResponse, dP as ListModelInterfacesOptions, dQ as ListModelInterfacesResponse, dY as ListNotesOptions, dZ as ListNotesResponse, e6 as ListSourcesOptions, e7 as ListSourcesResponse, ej as ListUploadsIncludeOptions, ek as ListUploadsOptions, el as ListUploadsResponse, eI as ListWebhookSubscriptionsOptions, eJ as ListWebhookSubscriptionsResponse, cJ as ListWhatsappAccountTemplatesOptions, cK as ListWhatsappAccountTemplatesResponse, cr as ListWhatsappAccountsOptions, cs as ListWhatsappAccountsResponse, cD as ListWhatsappPhoneNumbersOptions, cE as ListWhatsappPhoneNumbersResponse, d4 as Message, dy as MessageCustomMetadata, dx as MessageEventType, ds as MessageID, dt as MessageRole, dv as MessageStatus, du as MessageType, dw as MessageVisibility, ev as MessageWebhookEventType, dz as ModelConfig, dM as ModelInterface, dR as ModelInterfaceID, dS as Note, d_ as NoteID, e2 as NotificationEvent, O as Options, R as ResponseData, b as ResponseMeta, c as ResponseTimestamp, aA as SendChannelSyncPayload, aB as SendgridChannelSyncOptions, aC as SendgridChannelSyncResponse, X as SortOptions, e3 as Source, e9 as SourceAdornment, e8 as SourceID, eK as TestWebhookSubscriptionOptions, eL as TestWebhookSubscriptionResponse, a as TransportOptions, bL as TriggerResponseConversationOptions, bM as TriggerResponseConversationResponse, I as UpdateAccountConversationSettingsOptions, H as UpdateAccountConversationSettingsPayload, J as UpdateAccountConversationSettingsResponse, m as UpdateAccountOptions, U as UpdateAccountPayload, n as UpdateAccountResponse, al as UpdateBoilerplateCategoryOptions, ak as UpdateBoilerplateCategoryPayload, am as UpdateBoilerplateCategoryResponse, a8 as UpdateBoilerplateContentOptions, a7 as UpdateBoilerplateContentPayload, a9 as UpdateBoilerplateContentResponse, aK as UpdateChannelConversationSettingsOptions, aJ as UpdateChannelConversationSettingsPayload, aL as UpdateChannelConversationSettingsResponse, aE as UpdateChannelOptions, aD as UpdateChannelPayload, aF as UpdateChannelResponse, aX as UpdateCompositionSectionOptions, aW as UpdateCompositionSectionPayload, aY as UpdateCompositionSectionResponse, bo as UpdateContactOptions, bn as UpdateContactPayload, bp as UpdateContactResponse, bJ as UpdateConversationOptions, bI as UpdateConversationPayload, bK as UpdateConversationResponse, c9 as UpdateLabelOptions, c8 as UpdateLabelPayload, ca as UpdateLabelResponse, dG as UpdateModelConfigOptions, dF as UpdateModelConfigPayload, dH as UpdateModelConfigResponse, e0 as UpdateNoteOptions, d$ as UpdateNotePayload, e1 as UpdateNoteResponse, cy as UpdateWhatsappBusinessProfileOptions, cx as UpdateWhatsappBusinessProfilePayload, cz as UpdateWhatsappBusinessProfileResponse, ea as Upload, em as UploadID, ct as WHATSAPP_BUSINESS_PROFILE_VERTICAL, cP as WHATSAPP_TEMPLATE_CATEGORIES, cT as WHATSAPP_TEMPLATE_INDUSTRIES, cN as WHATSAPP_TEMPLATE_LANGUAGES, cZ as WHATSAPP_TEMPLATE_QUALITY_SCORES, cL as WHATSAPP_TEMPLATE_STATUSES, cR as WHATSAPP_TEMPLATE_SUBCATEGORIES, cV as WHATSAPP_TEMPLATE_TOPICS, cX as WHATSAPP_TEMPLATE_USECASES, ey as WebhookEventPayload, ep as WebhookEventType, ez as WebhookResponse, eA as WebhookSubscription, eM as WebhookSubscriptionID, ex as WebhookSubscriptionWebhookEventType, cm as WhatsappAccount, cn as WhatsappAccountDetail, d2 as WhatsappAccountTemplate, cu as WhatsappBusinessProfileDetail, d3 as WhatsappLibraryTemplate, cA as WhatsappPhoneNumber, d1 as WhatsappTemplateButton, cQ as WhatsappTemplateCategory, cU as WhatsappTemplateIndustry, cO as WhatsappTemplateLanguage, d0 as WhatsappTemplateParameterFormat, c_ as WhatsappTemplateQualityScore, c$ as WhatsappTemplateRejectionReason, cM as WhatsappTemplateStatus, cS as WhatsappTemplateSubcategory, cW as WhatsappTemplateTopic, cY as WhatsappTemplateUseCase, C as default, eo as eventWebhookSchema } from './Client-Cwoc4b6_.cjs';
1
+ export { A as Account, p as AccountAccessToken, q as AccountAccessTokenID, es as AccountAccessTokenWebhookEventType, B as AccountConversationSettings, h as AccountID, K as AccountNotificationEvent, et as AccountNotificationEventEventType, g as AccountStatus, er as AccountWebhookWebhookEventType, T as Action, V as ActionID, W as ActionStatus, bt as ActiveConversationStatus, aa as BoilerplateCategory, ab as BoilerplateCategoryID, _ as BoilerplateContent, $ as BoilerplateContentID, an as Channel, aG as ChannelConversationSettings, ao as ChannelID, ap as ChannelStatus, C as Client, aM as CompositionSection, aN as CompositionSectionID, aO as CompositionSectionLocation, bu as ConcludedConversationStatus, b7 as Contact, bb as ContactCustomMetadata, b8 as ContactID, ba as ContactStatus, b9 as ContactType, eu as ContactWebhookEventType, bq as Conversation, bs as ConversationCustomMetadata, bO as ConversationFeedback, br as ConversationID, bN as ConversationSettings, bv as ConversationStatus, ev as ConversationWebhookEventType, e as CountResponsePagination, s as CreateAccountAccessTokenOptions, r as CreateAccountAccessTokenPayload, t as CreateAccountAccessTokenResponse, j as CreateAccountOptions, i as CreateAccountPayload, k as CreateAccountResponse, ad as CreateBoilerplateCategoryOptions, ac as CreateBoilerplateCategoryPayload, ae as CreateBoilerplateCategoryResponse, a1 as CreateBoilerplateContentOptions, a0 as CreateBoilerplateContentPayload, a2 as CreateBoilerplateContentResponse, as as CreateChannelOptions, ar as CreateChannelPayload, at as CreateChannelResponse, aQ as CreateCompositionSectionOptions, aP as CreateCompositionSectionPayload, aR as CreateCompositionSectionResponse, bd as CreateContactOptions, bc as CreateContactPayload, be as CreateContactResponse, bQ as CreateConversationFeedbackOptions, bP as CreateConversationFeedbackPayload, bR as CreateConversationFeedbackResponse, bx as CreateConversationOptions, bw as CreateConversationPayload, by as CreateConversationResponse, a$ as CreateEscalationOptions, a_ as CreateEscalationPayload, b0 as CreateEscalationResponse, cd as CreateImportOptions, cc as CreateImportPayload, ce as CreateImportResponse, b_ as CreateLabelOptions, bZ as CreateLabelPayload, b$ as CreateLabelResponse, dj as CreateMessageOptions, di as CreateMessagePayload, dk as CreateMessageResponse, dC as CreateModelConfigOptions, dB as CreateModelConfigPayload, dD as CreateModelConfigResponse, dV as CreateNoteOptions, dU as CreateNotePayload, dW as CreateNoteResponse, ec as CreateUploadIncludeOptions, ed as CreateUploadOptions, ee as CreateUploadResponse, eD as CreateWebhookSubscriptionOptions, eC as CreateWebhookSubscriptionPayload, eE as CreateWebhookSubscriptionResponse, f as CurrentAccountID, d as CursorResponsePagination, aq as CustomChannelCustomMetadata, u as DeleteAccountAccessTokenOptions, D as DeleteAccountAccessTokenPayload, v as DeleteAccountAccessTokenResponse, au as DeleteChannelOptions, av as DeleteChannelResponse, bf as DeleteContactOptions, bg as DeleteContactResponse, bS as DeleteConversationFeedbackOptions, bT as DeleteConversationFeedbackResponse, bz as DeleteConversationOptions, bA as DeleteConversationResponse, b5 as DeleteEscalationOptions, b6 as DeleteEscalationResponse, c0 as DeleteLabelOptions, c1 as DeleteLabelResponse, dl as DeleteMessageOptions, dm as DeleteMessageResponse, dE as DeleteModelConfigOptions, dF as DeleteModelConfigResponse, ef as DeleteUploadOptions, eg as DeleteUploadResponse, eF as DeleteWebhookSubscriptionOptions, eG as DeleteWebhookSubscriptionResponse, cG as DeleteWhatsappAccountTemplateOptions, cH as DeleteWhatsappAccountTemplateResponse, aZ as Escalation, eo as EventWebhookOptions, w as GetAccountAccessTokenOptions, x as GetAccountAccessTokenResponse, E as GetAccountConversationSettingsOptions, F as GetAccountConversationSettingsResponse, M as GetAccountNotificationEventOptions, N as GetAccountNotificationEventResponse, G as GetAccountOptions, l as GetAccountResponse, af as GetBoilerplateCategoryOptions, ag as GetBoilerplateCategoryResponse, a3 as GetBoilerplateContentOptions, a4 as GetBoilerplateContentResponse, aH as GetChannelConversationSettingsOptions, aI as GetChannelConversationSettingsResponse, aw as GetChannelOptions, ax as GetChannelResponse, aS as GetCompositionSectionOptions, aT as GetCompositionSectionResponse, bh as GetContactIncludeOptions, bi as GetContactOptions, bj as GetContactResponse, bk as GetContactVCFOptions, bU as GetConversationFeedbackOptions, bV as GetConversationFeedbackResponse, bB as GetConversationIncludeOptions, bC as GetConversationOptions, bD as GetConversationResponse, b1 as GetEscalationOptions, b2 as GetEscalationResponse, cf as GetImportOptions, cg as GetImportResponse, c2 as GetLabelOptions, c3 as GetLabelResponse, dn as GetMessageOptions, dp as GetMessageResponse, dJ as GetModelConfigOptions, dK as GetModelConfigResponse, dO as GetModelInterfaceOptions, dP as GetModelInterfaceResponse, dX as GetNoteOptions, dY as GetNoteResponse, e5 as GetSourceOptions, e6 as GetSourceResponse, eh as GetUploadIncludeOptions, ei as GetUploadOptions, ej as GetUploadResponse, eH as GetWebhookSubscriptionOptions, eI as GetWebhookSubscriptionResponse, co as GetWhatsappAccountIncludeOptions, cp as GetWhatsappAccountOptions, cq as GetWhatsappAccountResponse, cI as GetWhatsappAccountTemplateOptions, cJ as GetWhatsappAccountTemplateResponse, cv as GetWhatsappBusinessProfileOptions, cw as GetWhatsappBusinessProfileResponse, cB as GetWhatsappPhoneNumberIncludeOptions, cC as GetWhatsappPhoneNumberOptions, cD as GetWhatsappPhoneNumberResponse, cb as Import, cj as ImportID, cl as ImportStatus, ck as ImportType, ex as ImportWebhookEventType, bY as Label, c4 as LabelID, d6 as LexicalDirection, db as LexicalHeadingNode, df as LexicalHorizontalRuleNode, d7 as LexicalIndent, d9 as LexicalLinkNode, dd as LexicalListItemNode, de as LexicalListNode, dc as LexicalParagraphNode, da as LexicalQuoteNode, dh as LexicalRootNode, d8 as LexicalTextNode, dg as LexicalUploadNode, y as ListAccountAccessTokensOptions, z as ListAccountAccessTokensResponse, P as ListAccountNotificationEventsFilterOptions, Q as ListAccountNotificationEventsOptions, S as ListAccountNotificationEventsResponse, L as ListAccountsOptions, o as ListAccountsResponse, Y as ListActionsOptions, Z as ListActionsResponse, ah as ListBoilerplateCategoriesIncludeOptions, ai as ListBoilerplateCategoriesOptions, aj as ListBoilerplateCategoriesResponse, a5 as ListBoilerplateContentsOptions, a6 as ListBoilerplateContentsResponse, ay as ListChannelsOptions, az as ListChannelsResponse, aU as ListCompositionSectionsOptions, aV as ListCompositionSectionsResponse, bl as ListContactsOptions, bm as ListContactsResponse, bW as ListConversationFeedbackOptions, bX as ListConversationFeedbackResponse, bG as ListConversationOptions, bF as ListConversationsFilterOptions, bE as ListConversationsIncludeOptions, bH as ListConversationsResponse, b3 as ListEscalationsOptions, b4 as ListEscalationsResponse, ch as ListImportsOptions, ci as ListImportsResponse, c5 as ListLabelsIncludeOptions, c6 as ListLabelsOptions, c7 as ListLabelsResponse, dq as ListMessagesIncludeOptions, dr as ListMessagesOptions, ds as ListMessagesResponse, dL as ListModelConfigsOptions, dM as ListModelConfigsResponse, dQ as ListModelInterfacesOptions, dR as ListModelInterfacesResponse, dZ as ListNotesOptions, d_ as ListNotesResponse, e7 as ListSourcesOptions, e8 as ListSourcesResponse, ek as ListUploadsIncludeOptions, el as ListUploadsOptions, em as ListUploadsResponse, eJ as ListWebhookSubscriptionsOptions, eK as ListWebhookSubscriptionsResponse, cK as ListWhatsappAccountTemplatesOptions, cL as ListWhatsappAccountTemplatesResponse, cr as ListWhatsappAccountsOptions, cs as ListWhatsappAccountsResponse, cE as ListWhatsappPhoneNumbersOptions, cF as ListWhatsappPhoneNumbersResponse, d5 as Message, dz as MessageCustomMetadata, dy as MessageEventType, dt as MessageID, du as MessageRole, dw as MessageStatus, dv as MessageType, dx as MessageVisibility, ew as MessageWebhookEventType, dA as ModelConfig, dN as ModelInterface, dS as ModelInterfaceID, dT as Note, d$ as NoteID, e3 as NotificationEvent, O as Options, R as ResponseData, b as ResponseMeta, c as ResponseTimestamp, aA as SendChannelSyncPayload, aB as SendgridChannelSyncOptions, aC as SendgridChannelSyncResponse, X as SortOptions, e4 as Source, ea as SourceAdornment, e9 as SourceID, eL as TestWebhookSubscriptionOptions, eM as TestWebhookSubscriptionResponse, a as TransportOptions, bL as TriggerResponseConversationOptions, bM as TriggerResponseConversationResponse, I as UpdateAccountConversationSettingsOptions, H as UpdateAccountConversationSettingsPayload, J as UpdateAccountConversationSettingsResponse, m as UpdateAccountOptions, U as UpdateAccountPayload, n as UpdateAccountResponse, al as UpdateBoilerplateCategoryOptions, ak as UpdateBoilerplateCategoryPayload, am as UpdateBoilerplateCategoryResponse, a8 as UpdateBoilerplateContentOptions, a7 as UpdateBoilerplateContentPayload, a9 as UpdateBoilerplateContentResponse, aK as UpdateChannelConversationSettingsOptions, aJ as UpdateChannelConversationSettingsPayload, aL as UpdateChannelConversationSettingsResponse, aE as UpdateChannelOptions, aD as UpdateChannelPayload, aF as UpdateChannelResponse, aX as UpdateCompositionSectionOptions, aW as UpdateCompositionSectionPayload, aY as UpdateCompositionSectionResponse, bo as UpdateContactOptions, bn as UpdateContactPayload, bp as UpdateContactResponse, bJ as UpdateConversationOptions, bI as UpdateConversationPayload, bK as UpdateConversationResponse, c9 as UpdateLabelOptions, c8 as UpdateLabelPayload, ca as UpdateLabelResponse, dH as UpdateModelConfigOptions, dG as UpdateModelConfigPayload, dI as UpdateModelConfigResponse, e1 as UpdateNoteOptions, e0 as UpdateNotePayload, e2 as UpdateNoteResponse, cy as UpdateWhatsappBusinessProfileOptions, cx as UpdateWhatsappBusinessProfilePayload, cz as UpdateWhatsappBusinessProfileResponse, eb as Upload, en as UploadID, ct as WHATSAPP_BUSINESS_PROFILE_VERTICAL, cQ as WHATSAPP_TEMPLATE_CATEGORIES, cU as WHATSAPP_TEMPLATE_INDUSTRIES, cO as WHATSAPP_TEMPLATE_LANGUAGES, c_ as WHATSAPP_TEMPLATE_QUALITY_SCORES, cM as WHATSAPP_TEMPLATE_STATUSES, cS as WHATSAPP_TEMPLATE_SUBCATEGORIES, cW as WHATSAPP_TEMPLATE_TOPICS, cY as WHATSAPP_TEMPLATE_USECASES, ez as WebhookEventPayload, eq as WebhookEventType, eA as WebhookResponse, eB as WebhookSubscription, eN as WebhookSubscriptionID, ey as WebhookSubscriptionWebhookEventType, cm as WhatsappAccount, cn as WhatsappAccountDetail, d3 as WhatsappAccountTemplate, cu as WhatsappBusinessProfileDetail, d4 as WhatsappLibraryTemplate, cA as WhatsappPhoneNumber, d2 as WhatsappTemplateButton, cR as WhatsappTemplateCategory, cV as WhatsappTemplateIndustry, cP as WhatsappTemplateLanguage, d1 as WhatsappTemplateParameterFormat, c$ as WhatsappTemplateQualityScore, d0 as WhatsappTemplateRejectionReason, cN as WhatsappTemplateStatus, cT as WhatsappTemplateSubcategory, cX as WhatsappTemplateTopic, cZ as WhatsappTemplateUseCase, C as default, ep as eventWebhookSchema } from './Client-BJAma6C3.cjs';
2
2
  import { KyResponse, KyRequest } from 'ky';
3
3
  import 'zod/v4';
4
4
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as Account, p as AccountAccessToken, q as AccountAccessTokenID, er as AccountAccessTokenWebhookEventType, B as AccountConversationSettings, h as AccountID, K as AccountNotificationEvent, es as AccountNotificationEventEventType, g as AccountStatus, eq as AccountWebhookWebhookEventType, T as Action, V as ActionID, W as ActionStatus, bt as ActiveConversationStatus, aa as BoilerplateCategory, ab as BoilerplateCategoryID, _ as BoilerplateContent, $ as BoilerplateContentID, an as Channel, aG as ChannelConversationSettings, ao as ChannelID, ap as ChannelStatus, C as Client, aM as CompositionSection, aN as CompositionSectionID, aO as CompositionSectionLocation, bu as ConcludedConversationStatus, b7 as Contact, bb as ContactCustomMetadata, b8 as ContactID, ba as ContactStatus, b9 as ContactType, et as ContactWebhookEventType, bq as Conversation, bs as ConversationCustomMetadata, bO as ConversationFeedback, br as ConversationID, bN as ConversationSettings, bv as ConversationStatus, eu as ConversationWebhookEventType, e as CountResponsePagination, s as CreateAccountAccessTokenOptions, r as CreateAccountAccessTokenPayload, t as CreateAccountAccessTokenResponse, j as CreateAccountOptions, i as CreateAccountPayload, k as CreateAccountResponse, ad as CreateBoilerplateCategoryOptions, ac as CreateBoilerplateCategoryPayload, ae as CreateBoilerplateCategoryResponse, a1 as CreateBoilerplateContentOptions, a0 as CreateBoilerplateContentPayload, a2 as CreateBoilerplateContentResponse, as as CreateChannelOptions, ar as CreateChannelPayload, at as CreateChannelResponse, aQ as CreateCompositionSectionOptions, aP as CreateCompositionSectionPayload, aR as CreateCompositionSectionResponse, bd as CreateContactOptions, bc as CreateContactPayload, be as CreateContactResponse, bQ as CreateConversationFeedbackOptions, bP as CreateConversationFeedbackPayload, bR as CreateConversationFeedbackResponse, bx as CreateConversationOptions, bw as CreateConversationPayload, by as CreateConversationResponse, a$ as CreateEscalationOptions, a_ as CreateEscalationPayload, b0 as CreateEscalationResponse, cd as CreateImportOptions, cc as CreateImportPayload, ce as CreateImportResponse, b_ as CreateLabelOptions, bZ as CreateLabelPayload, b$ as CreateLabelResponse, di as CreateMessageOptions, dh as CreateMessagePayload, dj as CreateMessageResponse, dB as CreateModelConfigOptions, dA as CreateModelConfigPayload, dC as CreateModelConfigResponse, dU as CreateNoteOptions, dT as CreateNotePayload, dV as CreateNoteResponse, eb as CreateUploadIncludeOptions, ec as CreateUploadOptions, ed as CreateUploadResponse, eC as CreateWebhookSubscriptionOptions, eB as CreateWebhookSubscriptionPayload, eD as CreateWebhookSubscriptionResponse, f as CurrentAccountID, d as CursorResponsePagination, aq as CustomChannelCustomMetadata, u as DeleteAccountAccessTokenOptions, D as DeleteAccountAccessTokenPayload, v as DeleteAccountAccessTokenResponse, au as DeleteChannelOptions, av as DeleteChannelResponse, bf as DeleteContactOptions, bg as DeleteContactResponse, bS as DeleteConversationFeedbackOptions, bT as DeleteConversationFeedbackResponse, bz as DeleteConversationOptions, bA as DeleteConversationResponse, b5 as DeleteEscalationOptions, b6 as DeleteEscalationResponse, c0 as DeleteLabelOptions, c1 as DeleteLabelResponse, dk as DeleteMessageOptions, dl as DeleteMessageResponse, dD as DeleteModelConfigOptions, dE as DeleteModelConfigResponse, ee as DeleteUploadOptions, ef as DeleteUploadResponse, eE as DeleteWebhookSubscriptionOptions, eF as DeleteWebhookSubscriptionResponse, cF as DeleteWhatsappAccountTemplateOptions, cG as DeleteWhatsappAccountTemplateResponse, aZ as Escalation, en as EventWebhookOptions, w as GetAccountAccessTokenOptions, x as GetAccountAccessTokenResponse, E as GetAccountConversationSettingsOptions, F as GetAccountConversationSettingsResponse, M as GetAccountNotificationEventOptions, N as GetAccountNotificationEventResponse, G as GetAccountOptions, l as GetAccountResponse, af as GetBoilerplateCategoryOptions, ag as GetBoilerplateCategoryResponse, a3 as GetBoilerplateContentOptions, a4 as GetBoilerplateContentResponse, aH as GetChannelConversationSettingsOptions, aI as GetChannelConversationSettingsResponse, aw as GetChannelOptions, ax as GetChannelResponse, aS as GetCompositionSectionOptions, aT as GetCompositionSectionResponse, bh as GetContactIncludeOptions, bi as GetContactOptions, bj as GetContactResponse, bk as GetContactVCFOptions, bU as GetConversationFeedbackOptions, bV as GetConversationFeedbackResponse, bB as GetConversationIncludeOptions, bC as GetConversationOptions, bD as GetConversationResponse, b1 as GetEscalationOptions, b2 as GetEscalationResponse, cf as GetImportOptions, cg as GetImportResponse, c2 as GetLabelOptions, c3 as GetLabelResponse, dm as GetMessageOptions, dn as GetMessageResponse, dI as GetModelConfigOptions, dJ as GetModelConfigResponse, dN as GetModelInterfaceOptions, dO as GetModelInterfaceResponse, dW as GetNoteOptions, dX as GetNoteResponse, e4 as GetSourceOptions, e5 as GetSourceResponse, eg as GetUploadIncludeOptions, eh as GetUploadOptions, ei as GetUploadResponse, eG as GetWebhookSubscriptionOptions, eH as GetWebhookSubscriptionResponse, co as GetWhatsappAccountIncludeOptions, cp as GetWhatsappAccountOptions, cq as GetWhatsappAccountResponse, cH as GetWhatsappAccountTemplateOptions, cI as GetWhatsappAccountTemplateResponse, cv as GetWhatsappBusinessProfileOptions, cw as GetWhatsappBusinessProfileResponse, cB as GetWhatsappPhoneNumberOptions, cC as GetWhatsappPhoneNumberResponse, cb as Import, cj as ImportID, cl as ImportStatus, ck as ImportType, ew as ImportWebhookEventType, bY as Label, c4 as LabelID, d5 as LexicalDirection, da as LexicalHeadingNode, de as LexicalHorizontalRuleNode, d6 as LexicalIndent, d8 as LexicalLinkNode, dc as LexicalListItemNode, dd as LexicalListNode, db as LexicalParagraphNode, d9 as LexicalQuoteNode, dg as LexicalRootNode, d7 as LexicalTextNode, df as LexicalUploadNode, y as ListAccountAccessTokensOptions, z as ListAccountAccessTokensResponse, P as ListAccountNotificationEventsFilterOptions, Q as ListAccountNotificationEventsOptions, S as ListAccountNotificationEventsResponse, L as ListAccountsOptions, o as ListAccountsResponse, Y as ListActionsOptions, Z as ListActionsResponse, ah as ListBoilerplateCategoriesIncludeOptions, ai as ListBoilerplateCategoriesOptions, aj as ListBoilerplateCategoriesResponse, a5 as ListBoilerplateContentsOptions, a6 as ListBoilerplateContentsResponse, ay as ListChannelsOptions, az as ListChannelsResponse, aU as ListCompositionSectionsOptions, aV as ListCompositionSectionsResponse, bl as ListContactsOptions, bm as ListContactsResponse, bW as ListConversationFeedbackOptions, bX as ListConversationFeedbackResponse, bG as ListConversationOptions, bF as ListConversationsFilterOptions, bE as ListConversationsIncludeOptions, bH as ListConversationsResponse, b3 as ListEscalationsOptions, b4 as ListEscalationsResponse, ch as ListImportsOptions, ci as ListImportsResponse, c5 as ListLabelsIncludeOptions, c6 as ListLabelsOptions, c7 as ListLabelsResponse, dp as ListMessagesIncludeOptions, dq as ListMessagesOptions, dr as ListMessagesResponse, dK as ListModelConfigsOptions, dL as ListModelConfigsResponse, dP as ListModelInterfacesOptions, dQ as ListModelInterfacesResponse, dY as ListNotesOptions, dZ as ListNotesResponse, e6 as ListSourcesOptions, e7 as ListSourcesResponse, ej as ListUploadsIncludeOptions, ek as ListUploadsOptions, el as ListUploadsResponse, eI as ListWebhookSubscriptionsOptions, eJ as ListWebhookSubscriptionsResponse, cJ as ListWhatsappAccountTemplatesOptions, cK as ListWhatsappAccountTemplatesResponse, cr as ListWhatsappAccountsOptions, cs as ListWhatsappAccountsResponse, cD as ListWhatsappPhoneNumbersOptions, cE as ListWhatsappPhoneNumbersResponse, d4 as Message, dy as MessageCustomMetadata, dx as MessageEventType, ds as MessageID, dt as MessageRole, dv as MessageStatus, du as MessageType, dw as MessageVisibility, ev as MessageWebhookEventType, dz as ModelConfig, dM as ModelInterface, dR as ModelInterfaceID, dS as Note, d_ as NoteID, e2 as NotificationEvent, O as Options, R as ResponseData, b as ResponseMeta, c as ResponseTimestamp, aA as SendChannelSyncPayload, aB as SendgridChannelSyncOptions, aC as SendgridChannelSyncResponse, X as SortOptions, e3 as Source, e9 as SourceAdornment, e8 as SourceID, eK as TestWebhookSubscriptionOptions, eL as TestWebhookSubscriptionResponse, a as TransportOptions, bL as TriggerResponseConversationOptions, bM as TriggerResponseConversationResponse, I as UpdateAccountConversationSettingsOptions, H as UpdateAccountConversationSettingsPayload, J as UpdateAccountConversationSettingsResponse, m as UpdateAccountOptions, U as UpdateAccountPayload, n as UpdateAccountResponse, al as UpdateBoilerplateCategoryOptions, ak as UpdateBoilerplateCategoryPayload, am as UpdateBoilerplateCategoryResponse, a8 as UpdateBoilerplateContentOptions, a7 as UpdateBoilerplateContentPayload, a9 as UpdateBoilerplateContentResponse, aK as UpdateChannelConversationSettingsOptions, aJ as UpdateChannelConversationSettingsPayload, aL as UpdateChannelConversationSettingsResponse, aE as UpdateChannelOptions, aD as UpdateChannelPayload, aF as UpdateChannelResponse, aX as UpdateCompositionSectionOptions, aW as UpdateCompositionSectionPayload, aY as UpdateCompositionSectionResponse, bo as UpdateContactOptions, bn as UpdateContactPayload, bp as UpdateContactResponse, bJ as UpdateConversationOptions, bI as UpdateConversationPayload, bK as UpdateConversationResponse, c9 as UpdateLabelOptions, c8 as UpdateLabelPayload, ca as UpdateLabelResponse, dG as UpdateModelConfigOptions, dF as UpdateModelConfigPayload, dH as UpdateModelConfigResponse, e0 as UpdateNoteOptions, d$ as UpdateNotePayload, e1 as UpdateNoteResponse, cy as UpdateWhatsappBusinessProfileOptions, cx as UpdateWhatsappBusinessProfilePayload, cz as UpdateWhatsappBusinessProfileResponse, ea as Upload, em as UploadID, ct as WHATSAPP_BUSINESS_PROFILE_VERTICAL, cP as WHATSAPP_TEMPLATE_CATEGORIES, cT as WHATSAPP_TEMPLATE_INDUSTRIES, cN as WHATSAPP_TEMPLATE_LANGUAGES, cZ as WHATSAPP_TEMPLATE_QUALITY_SCORES, cL as WHATSAPP_TEMPLATE_STATUSES, cR as WHATSAPP_TEMPLATE_SUBCATEGORIES, cV as WHATSAPP_TEMPLATE_TOPICS, cX as WHATSAPP_TEMPLATE_USECASES, ey as WebhookEventPayload, ep as WebhookEventType, ez as WebhookResponse, eA as WebhookSubscription, eM as WebhookSubscriptionID, ex as WebhookSubscriptionWebhookEventType, cm as WhatsappAccount, cn as WhatsappAccountDetail, d2 as WhatsappAccountTemplate, cu as WhatsappBusinessProfileDetail, d3 as WhatsappLibraryTemplate, cA as WhatsappPhoneNumber, d1 as WhatsappTemplateButton, cQ as WhatsappTemplateCategory, cU as WhatsappTemplateIndustry, cO as WhatsappTemplateLanguage, d0 as WhatsappTemplateParameterFormat, c_ as WhatsappTemplateQualityScore, c$ as WhatsappTemplateRejectionReason, cM as WhatsappTemplateStatus, cS as WhatsappTemplateSubcategory, cW as WhatsappTemplateTopic, cY as WhatsappTemplateUseCase, C as default, eo as eventWebhookSchema } from './Client-Cwoc4b6_.js';
1
+ export { A as Account, p as AccountAccessToken, q as AccountAccessTokenID, es as AccountAccessTokenWebhookEventType, B as AccountConversationSettings, h as AccountID, K as AccountNotificationEvent, et as AccountNotificationEventEventType, g as AccountStatus, er as AccountWebhookWebhookEventType, T as Action, V as ActionID, W as ActionStatus, bt as ActiveConversationStatus, aa as BoilerplateCategory, ab as BoilerplateCategoryID, _ as BoilerplateContent, $ as BoilerplateContentID, an as Channel, aG as ChannelConversationSettings, ao as ChannelID, ap as ChannelStatus, C as Client, aM as CompositionSection, aN as CompositionSectionID, aO as CompositionSectionLocation, bu as ConcludedConversationStatus, b7 as Contact, bb as ContactCustomMetadata, b8 as ContactID, ba as ContactStatus, b9 as ContactType, eu as ContactWebhookEventType, bq as Conversation, bs as ConversationCustomMetadata, bO as ConversationFeedback, br as ConversationID, bN as ConversationSettings, bv as ConversationStatus, ev as ConversationWebhookEventType, e as CountResponsePagination, s as CreateAccountAccessTokenOptions, r as CreateAccountAccessTokenPayload, t as CreateAccountAccessTokenResponse, j as CreateAccountOptions, i as CreateAccountPayload, k as CreateAccountResponse, ad as CreateBoilerplateCategoryOptions, ac as CreateBoilerplateCategoryPayload, ae as CreateBoilerplateCategoryResponse, a1 as CreateBoilerplateContentOptions, a0 as CreateBoilerplateContentPayload, a2 as CreateBoilerplateContentResponse, as as CreateChannelOptions, ar as CreateChannelPayload, at as CreateChannelResponse, aQ as CreateCompositionSectionOptions, aP as CreateCompositionSectionPayload, aR as CreateCompositionSectionResponse, bd as CreateContactOptions, bc as CreateContactPayload, be as CreateContactResponse, bQ as CreateConversationFeedbackOptions, bP as CreateConversationFeedbackPayload, bR as CreateConversationFeedbackResponse, bx as CreateConversationOptions, bw as CreateConversationPayload, by as CreateConversationResponse, a$ as CreateEscalationOptions, a_ as CreateEscalationPayload, b0 as CreateEscalationResponse, cd as CreateImportOptions, cc as CreateImportPayload, ce as CreateImportResponse, b_ as CreateLabelOptions, bZ as CreateLabelPayload, b$ as CreateLabelResponse, dj as CreateMessageOptions, di as CreateMessagePayload, dk as CreateMessageResponse, dC as CreateModelConfigOptions, dB as CreateModelConfigPayload, dD as CreateModelConfigResponse, dV as CreateNoteOptions, dU as CreateNotePayload, dW as CreateNoteResponse, ec as CreateUploadIncludeOptions, ed as CreateUploadOptions, ee as CreateUploadResponse, eD as CreateWebhookSubscriptionOptions, eC as CreateWebhookSubscriptionPayload, eE as CreateWebhookSubscriptionResponse, f as CurrentAccountID, d as CursorResponsePagination, aq as CustomChannelCustomMetadata, u as DeleteAccountAccessTokenOptions, D as DeleteAccountAccessTokenPayload, v as DeleteAccountAccessTokenResponse, au as DeleteChannelOptions, av as DeleteChannelResponse, bf as DeleteContactOptions, bg as DeleteContactResponse, bS as DeleteConversationFeedbackOptions, bT as DeleteConversationFeedbackResponse, bz as DeleteConversationOptions, bA as DeleteConversationResponse, b5 as DeleteEscalationOptions, b6 as DeleteEscalationResponse, c0 as DeleteLabelOptions, c1 as DeleteLabelResponse, dl as DeleteMessageOptions, dm as DeleteMessageResponse, dE as DeleteModelConfigOptions, dF as DeleteModelConfigResponse, ef as DeleteUploadOptions, eg as DeleteUploadResponse, eF as DeleteWebhookSubscriptionOptions, eG as DeleteWebhookSubscriptionResponse, cG as DeleteWhatsappAccountTemplateOptions, cH as DeleteWhatsappAccountTemplateResponse, aZ as Escalation, eo as EventWebhookOptions, w as GetAccountAccessTokenOptions, x as GetAccountAccessTokenResponse, E as GetAccountConversationSettingsOptions, F as GetAccountConversationSettingsResponse, M as GetAccountNotificationEventOptions, N as GetAccountNotificationEventResponse, G as GetAccountOptions, l as GetAccountResponse, af as GetBoilerplateCategoryOptions, ag as GetBoilerplateCategoryResponse, a3 as GetBoilerplateContentOptions, a4 as GetBoilerplateContentResponse, aH as GetChannelConversationSettingsOptions, aI as GetChannelConversationSettingsResponse, aw as GetChannelOptions, ax as GetChannelResponse, aS as GetCompositionSectionOptions, aT as GetCompositionSectionResponse, bh as GetContactIncludeOptions, bi as GetContactOptions, bj as GetContactResponse, bk as GetContactVCFOptions, bU as GetConversationFeedbackOptions, bV as GetConversationFeedbackResponse, bB as GetConversationIncludeOptions, bC as GetConversationOptions, bD as GetConversationResponse, b1 as GetEscalationOptions, b2 as GetEscalationResponse, cf as GetImportOptions, cg as GetImportResponse, c2 as GetLabelOptions, c3 as GetLabelResponse, dn as GetMessageOptions, dp as GetMessageResponse, dJ as GetModelConfigOptions, dK as GetModelConfigResponse, dO as GetModelInterfaceOptions, dP as GetModelInterfaceResponse, dX as GetNoteOptions, dY as GetNoteResponse, e5 as GetSourceOptions, e6 as GetSourceResponse, eh as GetUploadIncludeOptions, ei as GetUploadOptions, ej as GetUploadResponse, eH as GetWebhookSubscriptionOptions, eI as GetWebhookSubscriptionResponse, co as GetWhatsappAccountIncludeOptions, cp as GetWhatsappAccountOptions, cq as GetWhatsappAccountResponse, cI as GetWhatsappAccountTemplateOptions, cJ as GetWhatsappAccountTemplateResponse, cv as GetWhatsappBusinessProfileOptions, cw as GetWhatsappBusinessProfileResponse, cB as GetWhatsappPhoneNumberIncludeOptions, cC as GetWhatsappPhoneNumberOptions, cD as GetWhatsappPhoneNumberResponse, cb as Import, cj as ImportID, cl as ImportStatus, ck as ImportType, ex as ImportWebhookEventType, bY as Label, c4 as LabelID, d6 as LexicalDirection, db as LexicalHeadingNode, df as LexicalHorizontalRuleNode, d7 as LexicalIndent, d9 as LexicalLinkNode, dd as LexicalListItemNode, de as LexicalListNode, dc as LexicalParagraphNode, da as LexicalQuoteNode, dh as LexicalRootNode, d8 as LexicalTextNode, dg as LexicalUploadNode, y as ListAccountAccessTokensOptions, z as ListAccountAccessTokensResponse, P as ListAccountNotificationEventsFilterOptions, Q as ListAccountNotificationEventsOptions, S as ListAccountNotificationEventsResponse, L as ListAccountsOptions, o as ListAccountsResponse, Y as ListActionsOptions, Z as ListActionsResponse, ah as ListBoilerplateCategoriesIncludeOptions, ai as ListBoilerplateCategoriesOptions, aj as ListBoilerplateCategoriesResponse, a5 as ListBoilerplateContentsOptions, a6 as ListBoilerplateContentsResponse, ay as ListChannelsOptions, az as ListChannelsResponse, aU as ListCompositionSectionsOptions, aV as ListCompositionSectionsResponse, bl as ListContactsOptions, bm as ListContactsResponse, bW as ListConversationFeedbackOptions, bX as ListConversationFeedbackResponse, bG as ListConversationOptions, bF as ListConversationsFilterOptions, bE as ListConversationsIncludeOptions, bH as ListConversationsResponse, b3 as ListEscalationsOptions, b4 as ListEscalationsResponse, ch as ListImportsOptions, ci as ListImportsResponse, c5 as ListLabelsIncludeOptions, c6 as ListLabelsOptions, c7 as ListLabelsResponse, dq as ListMessagesIncludeOptions, dr as ListMessagesOptions, ds as ListMessagesResponse, dL as ListModelConfigsOptions, dM as ListModelConfigsResponse, dQ as ListModelInterfacesOptions, dR as ListModelInterfacesResponse, dZ as ListNotesOptions, d_ as ListNotesResponse, e7 as ListSourcesOptions, e8 as ListSourcesResponse, ek as ListUploadsIncludeOptions, el as ListUploadsOptions, em as ListUploadsResponse, eJ as ListWebhookSubscriptionsOptions, eK as ListWebhookSubscriptionsResponse, cK as ListWhatsappAccountTemplatesOptions, cL as ListWhatsappAccountTemplatesResponse, cr as ListWhatsappAccountsOptions, cs as ListWhatsappAccountsResponse, cE as ListWhatsappPhoneNumbersOptions, cF as ListWhatsappPhoneNumbersResponse, d5 as Message, dz as MessageCustomMetadata, dy as MessageEventType, dt as MessageID, du as MessageRole, dw as MessageStatus, dv as MessageType, dx as MessageVisibility, ew as MessageWebhookEventType, dA as ModelConfig, dN as ModelInterface, dS as ModelInterfaceID, dT as Note, d$ as NoteID, e3 as NotificationEvent, O as Options, R as ResponseData, b as ResponseMeta, c as ResponseTimestamp, aA as SendChannelSyncPayload, aB as SendgridChannelSyncOptions, aC as SendgridChannelSyncResponse, X as SortOptions, e4 as Source, ea as SourceAdornment, e9 as SourceID, eL as TestWebhookSubscriptionOptions, eM as TestWebhookSubscriptionResponse, a as TransportOptions, bL as TriggerResponseConversationOptions, bM as TriggerResponseConversationResponse, I as UpdateAccountConversationSettingsOptions, H as UpdateAccountConversationSettingsPayload, J as UpdateAccountConversationSettingsResponse, m as UpdateAccountOptions, U as UpdateAccountPayload, n as UpdateAccountResponse, al as UpdateBoilerplateCategoryOptions, ak as UpdateBoilerplateCategoryPayload, am as UpdateBoilerplateCategoryResponse, a8 as UpdateBoilerplateContentOptions, a7 as UpdateBoilerplateContentPayload, a9 as UpdateBoilerplateContentResponse, aK as UpdateChannelConversationSettingsOptions, aJ as UpdateChannelConversationSettingsPayload, aL as UpdateChannelConversationSettingsResponse, aE as UpdateChannelOptions, aD as UpdateChannelPayload, aF as UpdateChannelResponse, aX as UpdateCompositionSectionOptions, aW as UpdateCompositionSectionPayload, aY as UpdateCompositionSectionResponse, bo as UpdateContactOptions, bn as UpdateContactPayload, bp as UpdateContactResponse, bJ as UpdateConversationOptions, bI as UpdateConversationPayload, bK as UpdateConversationResponse, c9 as UpdateLabelOptions, c8 as UpdateLabelPayload, ca as UpdateLabelResponse, dH as UpdateModelConfigOptions, dG as UpdateModelConfigPayload, dI as UpdateModelConfigResponse, e1 as UpdateNoteOptions, e0 as UpdateNotePayload, e2 as UpdateNoteResponse, cy as UpdateWhatsappBusinessProfileOptions, cx as UpdateWhatsappBusinessProfilePayload, cz as UpdateWhatsappBusinessProfileResponse, eb as Upload, en as UploadID, ct as WHATSAPP_BUSINESS_PROFILE_VERTICAL, cQ as WHATSAPP_TEMPLATE_CATEGORIES, cU as WHATSAPP_TEMPLATE_INDUSTRIES, cO as WHATSAPP_TEMPLATE_LANGUAGES, c_ as WHATSAPP_TEMPLATE_QUALITY_SCORES, cM as WHATSAPP_TEMPLATE_STATUSES, cS as WHATSAPP_TEMPLATE_SUBCATEGORIES, cW as WHATSAPP_TEMPLATE_TOPICS, cY as WHATSAPP_TEMPLATE_USECASES, ez as WebhookEventPayload, eq as WebhookEventType, eA as WebhookResponse, eB as WebhookSubscription, eN as WebhookSubscriptionID, ey as WebhookSubscriptionWebhookEventType, cm as WhatsappAccount, cn as WhatsappAccountDetail, d3 as WhatsappAccountTemplate, cu as WhatsappBusinessProfileDetail, d4 as WhatsappLibraryTemplate, cA as WhatsappPhoneNumber, d2 as WhatsappTemplateButton, cR as WhatsappTemplateCategory, cV as WhatsappTemplateIndustry, cP as WhatsappTemplateLanguage, d1 as WhatsappTemplateParameterFormat, c$ as WhatsappTemplateQualityScore, d0 as WhatsappTemplateRejectionReason, cN as WhatsappTemplateStatus, cT as WhatsappTemplateSubcategory, cX as WhatsappTemplateTopic, cZ as WhatsappTemplateUseCase, C as default, ep as eventWebhookSchema } from './Client-BJAma6C3.js';
2
2
  import { KyResponse, KyRequest } from 'ky';
3
3
  import 'zod/v4';
4
4
 
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as o,c as t,d as p,e as m,f as r}from"./chunk-N4I2NDDN.js";var e={};o(e,{SupportError:()=>p});var jr=["ALCOHOL","APPAREL","AUTO","BEAUTY","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GOVT","GROCERY","HEALTH","HOTEL","NONPROFIT","ONLINE_GAMBLING","OTC_DRUGS","OTHER","PHYSICAL_GAMBLING","PROF_SERVICES","RESTAURANT","RETAIL","TRAVEL"];var te=["PENDING","APPROVED","REJECTED","IN_APPEAL","PAUSED","PENDING_DELETION","DELETED","DISABLED","LIMIT_EXCEEDED"],pe=["af","sq","ar","ar_EG","ar_AE","ar_LB","ar_MA","ar_QA","az","be_BY","bn","bn_IN","bg","ca","zh_CN","zh_HK","zh_TW","hr","cs","da","prs_AF","nl","nl_BE","en","en_GB","en_US","en_AE","en_AU","en_CA","en_GH","en_IE","en_IN","en_JM","en_MY","en_NZ","en_QA","en_SG","en_UG","en_ZA","et","fil","fi","fr","fr_BE","fr_CA","fr_CH","fr_CI","fr_MA","ka","de","de_AT","de_CH","el","gu","ha","he","hi","hu","id","ga","it","ja","kn","kk","rw_RW","ko","ky_KG","lo","lv","lt","mk","ms","ml","mr","nb","ps_AF","fa","pl","pt_BR","pt_PT","pa","ro","ru","sr","si_LK","sk","sl","es","es_AR","es_CL","es_CO","es_CR","es_DO","es_EC","es_HN","es_MX","es_PA","es_PE","es_ES","es_UY","sw","sv","ta","te","th","th","tr","uk","ur","uz","vi","zu"],me=["AUTHENTICATION","MARKETING","UTILITY"],ae=["ORDER_DETAILS","ORDER_STATUS"],fe=["E_COMMERCE","FINANCIAL_SERVICES"],xe=["ACCOUNT_UPDATES","CUSTOMER_FEEDBACK","EVENT_REMINDER","FIXED_TEMPLATE_PRICE_TEST","IDENTITY_VERIFICATION","ORDER_MANAGEMENT","PAYMENTS"],Ee=["ACCOUNT_CREATION_CONFIRMATION","PAYMENT_DUE_REMINDER","FEEDBACK_SURVEY","PAYMENT_ACTION_REQUIRED","SHIPMENT_CONFIRMATION","PAYMENT_OVERDUE","DELIVERY_UPDATE","PAYMENT_CONFIRMATION","ORDER_DELAY","FRAUD_ALERT","DELIVERY_FAILED","AUTO_PAY_REMINDER","DELIVERY_CONFIRMATION","PAYMENT_SCHEDULED","ORDER_PICK_UP","PAYMENT_REJECT_FAIL","ORDER_ACTION_NEEDED","STATEMENT_AVAILABLE","ORDER_CONFIRMATION","LOW_BALANCE_WARNING","ORDER_OR_TRANSACTION_CANCEL","RECEIPT_ATTACHMENT","RETURN_CONFIRMATION","STATEMENT_ATTACHMENT","TRANSACTION_ALERT"],se=["GREEN","YELLOW","RED","UNKNOWN"];export{r as Client,t as DEFAULT_SUPPORT_BASE_URL,e as Error,p as SupportError,jr as WHATSAPP_BUSINESS_PROFILE_VERTICAL,me as WHATSAPP_TEMPLATE_CATEGORIES,fe as WHATSAPP_TEMPLATE_INDUSTRIES,pe as WHATSAPP_TEMPLATE_LANGUAGES,se as WHATSAPP_TEMPLATE_QUALITY_SCORES,te as WHATSAPP_TEMPLATE_STATUSES,ae as WHATSAPP_TEMPLATE_SUBCATEGORIES,xe as WHATSAPP_TEMPLATE_TOPICS,Ee as WHATSAPP_TEMPLATE_USECASES,r as default,m as eventWebhookSchema};
1
+ import{a as o,c as t,d as p,e as m,f as r}from"./chunk-PGAG3XUU.js";var e={};o(e,{SupportError:()=>p});var jr=["ALCOHOL","APPAREL","AUTO","BEAUTY","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GOVT","GROCERY","HEALTH","HOTEL","NONPROFIT","ONLINE_GAMBLING","OTC_DRUGS","OTHER","PHYSICAL_GAMBLING","PROF_SERVICES","RESTAURANT","RETAIL","TRAVEL"];var te=["PENDING","APPROVED","REJECTED","IN_APPEAL","PAUSED","PENDING_DELETION","DELETED","DISABLED","LIMIT_EXCEEDED"],pe=["af","sq","ar","ar_EG","ar_AE","ar_LB","ar_MA","ar_QA","az","be_BY","bn","bn_IN","bg","ca","zh_CN","zh_HK","zh_TW","hr","cs","da","prs_AF","nl","nl_BE","en","en_GB","en_US","en_AE","en_AU","en_CA","en_GH","en_IE","en_IN","en_JM","en_MY","en_NZ","en_QA","en_SG","en_UG","en_ZA","et","fil","fi","fr","fr_BE","fr_CA","fr_CH","fr_CI","fr_MA","ka","de","de_AT","de_CH","el","gu","ha","he","hi","hu","id","ga","it","ja","kn","kk","rw_RW","ko","ky_KG","lo","lv","lt","mk","ms","ml","mr","nb","ps_AF","fa","pl","pt_BR","pt_PT","pa","ro","ru","sr","si_LK","sk","sl","es","es_AR","es_CL","es_CO","es_CR","es_DO","es_EC","es_HN","es_MX","es_PA","es_PE","es_ES","es_UY","sw","sv","ta","te","th","th","tr","uk","ur","uz","vi","zu"],me=["AUTHENTICATION","MARKETING","UTILITY"],ae=["ORDER_DETAILS","ORDER_STATUS"],fe=["E_COMMERCE","FINANCIAL_SERVICES"],xe=["ACCOUNT_UPDATES","CUSTOMER_FEEDBACK","EVENT_REMINDER","FIXED_TEMPLATE_PRICE_TEST","IDENTITY_VERIFICATION","ORDER_MANAGEMENT","PAYMENTS"],Ee=["ACCOUNT_CREATION_CONFIRMATION","PAYMENT_DUE_REMINDER","FEEDBACK_SURVEY","PAYMENT_ACTION_REQUIRED","SHIPMENT_CONFIRMATION","PAYMENT_OVERDUE","DELIVERY_UPDATE","PAYMENT_CONFIRMATION","ORDER_DELAY","FRAUD_ALERT","DELIVERY_FAILED","AUTO_PAY_REMINDER","DELIVERY_CONFIRMATION","PAYMENT_SCHEDULED","ORDER_PICK_UP","PAYMENT_REJECT_FAIL","ORDER_ACTION_NEEDED","STATEMENT_AVAILABLE","ORDER_CONFIRMATION","LOW_BALANCE_WARNING","ORDER_OR_TRANSACTION_CANCEL","RECEIPT_ATTACHMENT","RETURN_CONFIRMATION","STATEMENT_ATTACHMENT","TRANSACTION_ALERT"],se=["GREEN","YELLOW","RED","UNKNOWN"];export{r as Client,t as DEFAULT_SUPPORT_BASE_URL,e as Error,p as SupportError,jr as WHATSAPP_BUSINESS_PROFILE_VERTICAL,me as WHATSAPP_TEMPLATE_CATEGORIES,fe as WHATSAPP_TEMPLATE_INDUSTRIES,pe as WHATSAPP_TEMPLATE_LANGUAGES,se as WHATSAPP_TEMPLATE_QUALITY_SCORES,te as WHATSAPP_TEMPLATE_STATUSES,ae as WHATSAPP_TEMPLATE_SUBCATEGORIES,xe as WHATSAPP_TEMPLATE_TOPICS,Ee as WHATSAPP_TEMPLATE_USECASES,r as default,m as eventWebhookSchema};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@great-detail/support-sdk",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "type": "module",
5
5
  "description": "JavaScript SDK for the Great Detail Support System",
6
6
  "author": "Great Detail Ltd <info@greatdetail.com>",