@sendly/node 3.24.0 → 3.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +33 -0
- package/dist/index.mjs +33 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1730,6 +1730,7 @@ interface ProvisionWorkspaceOptions {
|
|
|
1730
1730
|
keyType?: "test" | "live";
|
|
1731
1731
|
webhookUrl?: string;
|
|
1732
1732
|
generateOptInPage?: boolean;
|
|
1733
|
+
generateBusinessPage?: boolean;
|
|
1733
1734
|
}
|
|
1734
1735
|
interface ProvisionWorkspaceResult {
|
|
1735
1736
|
workspace: {
|
|
@@ -2001,6 +2002,20 @@ interface QuotaSettings {
|
|
|
2001
2002
|
interface UpdateQuotaOptions {
|
|
2002
2003
|
monthlyMessageQuota: number | null;
|
|
2003
2004
|
}
|
|
2005
|
+
interface GenerateBusinessPageOptions {
|
|
2006
|
+
businessName: string;
|
|
2007
|
+
useCase?: string;
|
|
2008
|
+
useCaseSummary?: string;
|
|
2009
|
+
contactEmail?: string;
|
|
2010
|
+
contactPhone?: string;
|
|
2011
|
+
businessAddress?: string;
|
|
2012
|
+
socialUrl?: string;
|
|
2013
|
+
}
|
|
2014
|
+
interface GenerateBusinessPageResponse {
|
|
2015
|
+
slug: string;
|
|
2016
|
+
url: string;
|
|
2017
|
+
pageId: string;
|
|
2018
|
+
}
|
|
2004
2019
|
|
|
2005
2020
|
/**
|
|
2006
2021
|
* HTTP Client Utility
|
|
@@ -3677,6 +3692,15 @@ declare class EnterpriseResource {
|
|
|
3677
3692
|
constructor(http: HttpClient);
|
|
3678
3693
|
getAccount(): Promise<EnterpriseAccount>;
|
|
3679
3694
|
provision(options: ProvisionWorkspaceOptions): Promise<ProvisionWorkspaceResult>;
|
|
3695
|
+
generateBusinessPage(options: GenerateBusinessPageOptions): Promise<GenerateBusinessPageResponse>;
|
|
3696
|
+
uploadVerificationDocument(file: Buffer | Blob, options?: {
|
|
3697
|
+
workspaceId?: string;
|
|
3698
|
+
verificationId?: string;
|
|
3699
|
+
filename?: string;
|
|
3700
|
+
}): Promise<{
|
|
3701
|
+
url: string;
|
|
3702
|
+
id: string;
|
|
3703
|
+
}>;
|
|
3680
3704
|
}
|
|
3681
3705
|
|
|
3682
3706
|
declare class ConversationsResource {
|
|
@@ -4375,4 +4399,4 @@ declare class Webhooks {
|
|
|
4375
4399
|
*/
|
|
4376
4400
|
type WebhookMessageData = WebhookMessageObject;
|
|
4377
4401
|
|
|
4378
|
-
export { ALL_SUPPORTED_COUNTRIES, type Account, type AddLabelsRequest, type AnalyticsOverview, type AnalyticsPeriod, type ApiErrorResponse, type ApiKey, AuthenticationError, type AutoTopUpSettings, type BatchListResponse, type BatchMessageItem, type BatchMessageRequest, type BatchMessageResponse, type BatchMessageResult, type BatchStatus, type BillingBreakdown, type BillingBreakdownOptions, type BulkProvisionResult, type BulkProvisionResultItem, type BulkProvisionWorkspace, CREDITS_PER_SMS, type Campaign, type CampaignListResponse, type CampaignPreview, type CampaignStatus, type CancelledMessageResponse, type CheckVerificationRequest, type CheckVerificationResponse, type CircuitState, type Contact, type ContactList, type ContactListResponse, type ContactListsResponse, type Conversation, type ConversationListResponse, type ConversationStatus, type ConversationWithMessages, type CreateCampaignRequest, type CreateContactListRequest, type CreateContactRequest, type CreateDraftRequest, type CreateKeyOptions, type CreateLabelRequest, type CreateOptInPageOptions, type CreateOptInPageResult, type CreateTemplateRequest, type CreateVerifySessionRequest, type CreateWebhookOptions, type CreateWorkspaceOptions, type CreatedApiKey, type CreditAnalytics, type CreditAnalyticsDataPoint, type CreditTransaction, type Credits, type DeliveryAnalyticsItem, type DeliveryStatus, type DnsRecord, type DraftListResponse, type DraftStatus, type EnterpriseAccount, type EnterpriseWebhook, type EnterpriseWebhookTestResult, type EnterpriseWorkspace, type EnterpriseWorkspaceDetail, type EnterpriseWorkspaceSummary, type GetConversationOptions, type ImportContactItem, type ImportContactsError, type ImportContactsRequest, type ImportContactsResponse, InsufficientCreditsError, type Invitation, type Label, type LabelListResponse, type ListBatchesOptions, type ListCampaignsOptions, type ListContactsOptions, type ListConversationsOptions, type ListDraftsOptions, type ListMessagesOptions, type ListScheduledMessagesOptions, type ListVerificationsOptions, type MediaFile, type MediaUploadOptions, type Message, type MessageAnalytics, type MessageAnalyticsDataPoint, type MessageDraft, type MessageListResponse, type MessageStatus, type MessageType, NetworkError, NotFoundError, type OptInPage, type PricingTier, type ProvisionWorkspaceOptions, type ProvisionWorkspaceResult, type QuotaSettings, RateLimitError, type RateLimitInfo, type ReplyToConversationRequest, type ResumeWorkspaceResult, SANDBOX_TEST_NUMBERS, SUPPORTED_COUNTRIES, type ScheduleCampaignRequest, type ScheduleMessageRequest, type ScheduledMessage, type ScheduledMessageListResponse, type ScheduledMessageStatus, type SendInvitationOptions, type SendMessageRequest, type SendVerificationRequest, type SendVerificationResponse, type SenderType, Sendly, type SendlyConfig, SendlyError, type SendlyErrorCode, type SetCustomDomainResult, type SetWorkspaceWebhookOptions, type SetWorkspaceWebhookResult, type SuggestRepliesResponse, type SuggestedReply, type SuspendWorkspaceOptions, type SuspendWorkspaceResult, type Template, type TemplateListResponse, type TemplatePreview, type TemplateStatus, type TemplateVariable, TimeoutError, type TransferCreditsOptions, type TransferCreditsResult, type UpdateAutoTopUpOptions, type UpdateCampaignRequest, type UpdateContactListRequest, type UpdateContactRequest, type UpdateConversationRequest, type UpdateDraftRequest, type UpdateOptInPageOptions, type UpdateQuotaOptions, type UpdateTemplateRequest, type UpdateWebhookOptions, type ValidateSessionTokenRequest, type ValidateSessionTokenResponse, ValidationError, type Verification, type VerificationDeliveryStatus, type VerificationListResponse, type VerificationStatus, type VerifySession, type VerifySessionStatus, type Webhook, type WebhookCreatedResponse, type WebhookDelivery, type WebhookEvent, type WebhookEventType, type WebhookMessageData, type WebhookMessageStatus, type WebhookSecretRotation, WebhookSignatureError, type WebhookTestResult, Webhooks, type WorkspaceBillingItem, type WorkspaceCredits, type WorkspaceWebhook, calculateSegments, Sendly as default, generateWebhookSignature, getCountryFromPhone, isCountrySupported, parseWebhookEvent, validateMessageText, validatePhoneNumber, validateSenderId, verifyWebhookSignature };
|
|
4402
|
+
export { ALL_SUPPORTED_COUNTRIES, type Account, type AddLabelsRequest, type AnalyticsOverview, type AnalyticsPeriod, type ApiErrorResponse, type ApiKey, AuthenticationError, type AutoTopUpSettings, type BatchListResponse, type BatchMessageItem, type BatchMessageRequest, type BatchMessageResponse, type BatchMessageResult, type BatchStatus, type BillingBreakdown, type BillingBreakdownOptions, type BulkProvisionResult, type BulkProvisionResultItem, type BulkProvisionWorkspace, CREDITS_PER_SMS, type Campaign, type CampaignListResponse, type CampaignPreview, type CampaignStatus, type CancelledMessageResponse, type CheckVerificationRequest, type CheckVerificationResponse, type CircuitState, type Contact, type ContactList, type ContactListResponse, type ContactListsResponse, type Conversation, type ConversationListResponse, type ConversationStatus, type ConversationWithMessages, type CreateCampaignRequest, type CreateContactListRequest, type CreateContactRequest, type CreateDraftRequest, type CreateKeyOptions, type CreateLabelRequest, type CreateOptInPageOptions, type CreateOptInPageResult, type CreateTemplateRequest, type CreateVerifySessionRequest, type CreateWebhookOptions, type CreateWorkspaceOptions, type CreatedApiKey, type CreditAnalytics, type CreditAnalyticsDataPoint, type CreditTransaction, type Credits, type DeliveryAnalyticsItem, type DeliveryStatus, type DnsRecord, type DraftListResponse, type DraftStatus, type EnterpriseAccount, type EnterpriseWebhook, type EnterpriseWebhookTestResult, type EnterpriseWorkspace, type EnterpriseWorkspaceDetail, type EnterpriseWorkspaceSummary, type GenerateBusinessPageOptions, type GenerateBusinessPageResponse, type GetConversationOptions, type ImportContactItem, type ImportContactsError, type ImportContactsRequest, type ImportContactsResponse, InsufficientCreditsError, type Invitation, type Label, type LabelListResponse, type ListBatchesOptions, type ListCampaignsOptions, type ListContactsOptions, type ListConversationsOptions, type ListDraftsOptions, type ListMessagesOptions, type ListScheduledMessagesOptions, type ListVerificationsOptions, type MediaFile, type MediaUploadOptions, type Message, type MessageAnalytics, type MessageAnalyticsDataPoint, type MessageDraft, type MessageListResponse, type MessageStatus, type MessageType, NetworkError, NotFoundError, type OptInPage, type PricingTier, type ProvisionWorkspaceOptions, type ProvisionWorkspaceResult, type QuotaSettings, RateLimitError, type RateLimitInfo, type ReplyToConversationRequest, type ResumeWorkspaceResult, SANDBOX_TEST_NUMBERS, SUPPORTED_COUNTRIES, type ScheduleCampaignRequest, type ScheduleMessageRequest, type ScheduledMessage, type ScheduledMessageListResponse, type ScheduledMessageStatus, type SendInvitationOptions, type SendMessageRequest, type SendVerificationRequest, type SendVerificationResponse, type SenderType, Sendly, type SendlyConfig, SendlyError, type SendlyErrorCode, type SetCustomDomainResult, type SetWorkspaceWebhookOptions, type SetWorkspaceWebhookResult, type SuggestRepliesResponse, type SuggestedReply, type SuspendWorkspaceOptions, type SuspendWorkspaceResult, type Template, type TemplateListResponse, type TemplatePreview, type TemplateStatus, type TemplateVariable, TimeoutError, type TransferCreditsOptions, type TransferCreditsResult, type UpdateAutoTopUpOptions, type UpdateCampaignRequest, type UpdateContactListRequest, type UpdateContactRequest, type UpdateConversationRequest, type UpdateDraftRequest, type UpdateOptInPageOptions, type UpdateQuotaOptions, type UpdateTemplateRequest, type UpdateWebhookOptions, type ValidateSessionTokenRequest, type ValidateSessionTokenResponse, ValidationError, type Verification, type VerificationDeliveryStatus, type VerificationListResponse, type VerificationStatus, type VerifySession, type VerifySessionStatus, type Webhook, type WebhookCreatedResponse, type WebhookDelivery, type WebhookEvent, type WebhookEventType, type WebhookMessageData, type WebhookMessageStatus, type WebhookSecretRotation, WebhookSignatureError, type WebhookTestResult, Webhooks, type WorkspaceBillingItem, type WorkspaceCredits, type WorkspaceWebhook, calculateSegments, Sendly as default, generateWebhookSignature, getCountryFromPhone, isCountrySupported, parseWebhookEvent, validateMessageText, validatePhoneNumber, validateSenderId, verifyWebhookSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -1730,6 +1730,7 @@ interface ProvisionWorkspaceOptions {
|
|
|
1730
1730
|
keyType?: "test" | "live";
|
|
1731
1731
|
webhookUrl?: string;
|
|
1732
1732
|
generateOptInPage?: boolean;
|
|
1733
|
+
generateBusinessPage?: boolean;
|
|
1733
1734
|
}
|
|
1734
1735
|
interface ProvisionWorkspaceResult {
|
|
1735
1736
|
workspace: {
|
|
@@ -2001,6 +2002,20 @@ interface QuotaSettings {
|
|
|
2001
2002
|
interface UpdateQuotaOptions {
|
|
2002
2003
|
monthlyMessageQuota: number | null;
|
|
2003
2004
|
}
|
|
2005
|
+
interface GenerateBusinessPageOptions {
|
|
2006
|
+
businessName: string;
|
|
2007
|
+
useCase?: string;
|
|
2008
|
+
useCaseSummary?: string;
|
|
2009
|
+
contactEmail?: string;
|
|
2010
|
+
contactPhone?: string;
|
|
2011
|
+
businessAddress?: string;
|
|
2012
|
+
socialUrl?: string;
|
|
2013
|
+
}
|
|
2014
|
+
interface GenerateBusinessPageResponse {
|
|
2015
|
+
slug: string;
|
|
2016
|
+
url: string;
|
|
2017
|
+
pageId: string;
|
|
2018
|
+
}
|
|
2004
2019
|
|
|
2005
2020
|
/**
|
|
2006
2021
|
* HTTP Client Utility
|
|
@@ -3677,6 +3692,15 @@ declare class EnterpriseResource {
|
|
|
3677
3692
|
constructor(http: HttpClient);
|
|
3678
3693
|
getAccount(): Promise<EnterpriseAccount>;
|
|
3679
3694
|
provision(options: ProvisionWorkspaceOptions): Promise<ProvisionWorkspaceResult>;
|
|
3695
|
+
generateBusinessPage(options: GenerateBusinessPageOptions): Promise<GenerateBusinessPageResponse>;
|
|
3696
|
+
uploadVerificationDocument(file: Buffer | Blob, options?: {
|
|
3697
|
+
workspaceId?: string;
|
|
3698
|
+
verificationId?: string;
|
|
3699
|
+
filename?: string;
|
|
3700
|
+
}): Promise<{
|
|
3701
|
+
url: string;
|
|
3702
|
+
id: string;
|
|
3703
|
+
}>;
|
|
3680
3704
|
}
|
|
3681
3705
|
|
|
3682
3706
|
declare class ConversationsResource {
|
|
@@ -4375,4 +4399,4 @@ declare class Webhooks {
|
|
|
4375
4399
|
*/
|
|
4376
4400
|
type WebhookMessageData = WebhookMessageObject;
|
|
4377
4401
|
|
|
4378
|
-
export { ALL_SUPPORTED_COUNTRIES, type Account, type AddLabelsRequest, type AnalyticsOverview, type AnalyticsPeriod, type ApiErrorResponse, type ApiKey, AuthenticationError, type AutoTopUpSettings, type BatchListResponse, type BatchMessageItem, type BatchMessageRequest, type BatchMessageResponse, type BatchMessageResult, type BatchStatus, type BillingBreakdown, type BillingBreakdownOptions, type BulkProvisionResult, type BulkProvisionResultItem, type BulkProvisionWorkspace, CREDITS_PER_SMS, type Campaign, type CampaignListResponse, type CampaignPreview, type CampaignStatus, type CancelledMessageResponse, type CheckVerificationRequest, type CheckVerificationResponse, type CircuitState, type Contact, type ContactList, type ContactListResponse, type ContactListsResponse, type Conversation, type ConversationListResponse, type ConversationStatus, type ConversationWithMessages, type CreateCampaignRequest, type CreateContactListRequest, type CreateContactRequest, type CreateDraftRequest, type CreateKeyOptions, type CreateLabelRequest, type CreateOptInPageOptions, type CreateOptInPageResult, type CreateTemplateRequest, type CreateVerifySessionRequest, type CreateWebhookOptions, type CreateWorkspaceOptions, type CreatedApiKey, type CreditAnalytics, type CreditAnalyticsDataPoint, type CreditTransaction, type Credits, type DeliveryAnalyticsItem, type DeliveryStatus, type DnsRecord, type DraftListResponse, type DraftStatus, type EnterpriseAccount, type EnterpriseWebhook, type EnterpriseWebhookTestResult, type EnterpriseWorkspace, type EnterpriseWorkspaceDetail, type EnterpriseWorkspaceSummary, type GetConversationOptions, type ImportContactItem, type ImportContactsError, type ImportContactsRequest, type ImportContactsResponse, InsufficientCreditsError, type Invitation, type Label, type LabelListResponse, type ListBatchesOptions, type ListCampaignsOptions, type ListContactsOptions, type ListConversationsOptions, type ListDraftsOptions, type ListMessagesOptions, type ListScheduledMessagesOptions, type ListVerificationsOptions, type MediaFile, type MediaUploadOptions, type Message, type MessageAnalytics, type MessageAnalyticsDataPoint, type MessageDraft, type MessageListResponse, type MessageStatus, type MessageType, NetworkError, NotFoundError, type OptInPage, type PricingTier, type ProvisionWorkspaceOptions, type ProvisionWorkspaceResult, type QuotaSettings, RateLimitError, type RateLimitInfo, type ReplyToConversationRequest, type ResumeWorkspaceResult, SANDBOX_TEST_NUMBERS, SUPPORTED_COUNTRIES, type ScheduleCampaignRequest, type ScheduleMessageRequest, type ScheduledMessage, type ScheduledMessageListResponse, type ScheduledMessageStatus, type SendInvitationOptions, type SendMessageRequest, type SendVerificationRequest, type SendVerificationResponse, type SenderType, Sendly, type SendlyConfig, SendlyError, type SendlyErrorCode, type SetCustomDomainResult, type SetWorkspaceWebhookOptions, type SetWorkspaceWebhookResult, type SuggestRepliesResponse, type SuggestedReply, type SuspendWorkspaceOptions, type SuspendWorkspaceResult, type Template, type TemplateListResponse, type TemplatePreview, type TemplateStatus, type TemplateVariable, TimeoutError, type TransferCreditsOptions, type TransferCreditsResult, type UpdateAutoTopUpOptions, type UpdateCampaignRequest, type UpdateContactListRequest, type UpdateContactRequest, type UpdateConversationRequest, type UpdateDraftRequest, type UpdateOptInPageOptions, type UpdateQuotaOptions, type UpdateTemplateRequest, type UpdateWebhookOptions, type ValidateSessionTokenRequest, type ValidateSessionTokenResponse, ValidationError, type Verification, type VerificationDeliveryStatus, type VerificationListResponse, type VerificationStatus, type VerifySession, type VerifySessionStatus, type Webhook, type WebhookCreatedResponse, type WebhookDelivery, type WebhookEvent, type WebhookEventType, type WebhookMessageData, type WebhookMessageStatus, type WebhookSecretRotation, WebhookSignatureError, type WebhookTestResult, Webhooks, type WorkspaceBillingItem, type WorkspaceCredits, type WorkspaceWebhook, calculateSegments, Sendly as default, generateWebhookSignature, getCountryFromPhone, isCountrySupported, parseWebhookEvent, validateMessageText, validatePhoneNumber, validateSenderId, verifyWebhookSignature };
|
|
4402
|
+
export { ALL_SUPPORTED_COUNTRIES, type Account, type AddLabelsRequest, type AnalyticsOverview, type AnalyticsPeriod, type ApiErrorResponse, type ApiKey, AuthenticationError, type AutoTopUpSettings, type BatchListResponse, type BatchMessageItem, type BatchMessageRequest, type BatchMessageResponse, type BatchMessageResult, type BatchStatus, type BillingBreakdown, type BillingBreakdownOptions, type BulkProvisionResult, type BulkProvisionResultItem, type BulkProvisionWorkspace, CREDITS_PER_SMS, type Campaign, type CampaignListResponse, type CampaignPreview, type CampaignStatus, type CancelledMessageResponse, type CheckVerificationRequest, type CheckVerificationResponse, type CircuitState, type Contact, type ContactList, type ContactListResponse, type ContactListsResponse, type Conversation, type ConversationListResponse, type ConversationStatus, type ConversationWithMessages, type CreateCampaignRequest, type CreateContactListRequest, type CreateContactRequest, type CreateDraftRequest, type CreateKeyOptions, type CreateLabelRequest, type CreateOptInPageOptions, type CreateOptInPageResult, type CreateTemplateRequest, type CreateVerifySessionRequest, type CreateWebhookOptions, type CreateWorkspaceOptions, type CreatedApiKey, type CreditAnalytics, type CreditAnalyticsDataPoint, type CreditTransaction, type Credits, type DeliveryAnalyticsItem, type DeliveryStatus, type DnsRecord, type DraftListResponse, type DraftStatus, type EnterpriseAccount, type EnterpriseWebhook, type EnterpriseWebhookTestResult, type EnterpriseWorkspace, type EnterpriseWorkspaceDetail, type EnterpriseWorkspaceSummary, type GenerateBusinessPageOptions, type GenerateBusinessPageResponse, type GetConversationOptions, type ImportContactItem, type ImportContactsError, type ImportContactsRequest, type ImportContactsResponse, InsufficientCreditsError, type Invitation, type Label, type LabelListResponse, type ListBatchesOptions, type ListCampaignsOptions, type ListContactsOptions, type ListConversationsOptions, type ListDraftsOptions, type ListMessagesOptions, type ListScheduledMessagesOptions, type ListVerificationsOptions, type MediaFile, type MediaUploadOptions, type Message, type MessageAnalytics, type MessageAnalyticsDataPoint, type MessageDraft, type MessageListResponse, type MessageStatus, type MessageType, NetworkError, NotFoundError, type OptInPage, type PricingTier, type ProvisionWorkspaceOptions, type ProvisionWorkspaceResult, type QuotaSettings, RateLimitError, type RateLimitInfo, type ReplyToConversationRequest, type ResumeWorkspaceResult, SANDBOX_TEST_NUMBERS, SUPPORTED_COUNTRIES, type ScheduleCampaignRequest, type ScheduleMessageRequest, type ScheduledMessage, type ScheduledMessageListResponse, type ScheduledMessageStatus, type SendInvitationOptions, type SendMessageRequest, type SendVerificationRequest, type SendVerificationResponse, type SenderType, Sendly, type SendlyConfig, SendlyError, type SendlyErrorCode, type SetCustomDomainResult, type SetWorkspaceWebhookOptions, type SetWorkspaceWebhookResult, type SuggestRepliesResponse, type SuggestedReply, type SuspendWorkspaceOptions, type SuspendWorkspaceResult, type Template, type TemplateListResponse, type TemplatePreview, type TemplateStatus, type TemplateVariable, TimeoutError, type TransferCreditsOptions, type TransferCreditsResult, type UpdateAutoTopUpOptions, type UpdateCampaignRequest, type UpdateContactListRequest, type UpdateContactRequest, type UpdateConversationRequest, type UpdateDraftRequest, type UpdateOptInPageOptions, type UpdateQuotaOptions, type UpdateTemplateRequest, type UpdateWebhookOptions, type ValidateSessionTokenRequest, type ValidateSessionTokenResponse, ValidationError, type Verification, type VerificationDeliveryStatus, type VerificationListResponse, type VerificationStatus, type VerifySession, type VerifySessionStatus, type Webhook, type WebhookCreatedResponse, type WebhookDelivery, type WebhookEvent, type WebhookEventType, type WebhookMessageData, type WebhookMessageStatus, type WebhookSecretRotation, WebhookSignatureError, type WebhookTestResult, Webhooks, type WorkspaceBillingItem, type WorkspaceCredits, type WorkspaceWebhook, calculateSegments, Sendly as default, generateWebhookSignature, getCountryFromPhone, isCountrySupported, parseWebhookEvent, validateMessageText, validatePhoneNumber, validateSenderId, verifyWebhookSignature };
|
package/dist/index.js
CHANGED
|
@@ -3341,6 +3341,9 @@ var EnterpriseResource = class {
|
|
|
3341
3341
|
if (options.generateOptInPage !== void 0) {
|
|
3342
3342
|
body.generateOptInPage = options.generateOptInPage;
|
|
3343
3343
|
}
|
|
3344
|
+
if (options.generateBusinessPage !== void 0) {
|
|
3345
|
+
body.generateBusinessPage = options.generateBusinessPage;
|
|
3346
|
+
}
|
|
3344
3347
|
const response = await this.http.request({
|
|
3345
3348
|
method: "POST",
|
|
3346
3349
|
path: "/enterprise/workspaces/provision",
|
|
@@ -3348,6 +3351,36 @@ var EnterpriseResource = class {
|
|
|
3348
3351
|
});
|
|
3349
3352
|
return transformKeys(response);
|
|
3350
3353
|
}
|
|
3354
|
+
async generateBusinessPage(options) {
|
|
3355
|
+
if (!options.businessName || options.businessName.trim().length === 0) {
|
|
3356
|
+
throw new Error("businessName is required");
|
|
3357
|
+
}
|
|
3358
|
+
const response = await this.http.request({
|
|
3359
|
+
method: "POST",
|
|
3360
|
+
path: "/enterprise/business-page/generate",
|
|
3361
|
+
body: { ...options }
|
|
3362
|
+
});
|
|
3363
|
+
return response;
|
|
3364
|
+
}
|
|
3365
|
+
async uploadVerificationDocument(file, options) {
|
|
3366
|
+
const formData = new FormData();
|
|
3367
|
+
if (file instanceof Blob) {
|
|
3368
|
+
formData.append("file", file, options?.filename || "document");
|
|
3369
|
+
} else {
|
|
3370
|
+
const blob = new Blob([file]);
|
|
3371
|
+
formData.append("file", blob, options?.filename || "document");
|
|
3372
|
+
}
|
|
3373
|
+
if (options?.workspaceId) {
|
|
3374
|
+
formData.append("workspaceId", options.workspaceId);
|
|
3375
|
+
}
|
|
3376
|
+
if (options?.verificationId) {
|
|
3377
|
+
formData.append("verificationId", options.verificationId);
|
|
3378
|
+
}
|
|
3379
|
+
return this.http.requestFormData(
|
|
3380
|
+
"/enterprise/verification-document/upload",
|
|
3381
|
+
formData
|
|
3382
|
+
);
|
|
3383
|
+
}
|
|
3351
3384
|
};
|
|
3352
3385
|
|
|
3353
3386
|
// src/resources/conversations.ts
|
package/dist/index.mjs
CHANGED
|
@@ -3281,6 +3281,9 @@ var EnterpriseResource = class {
|
|
|
3281
3281
|
if (options.generateOptInPage !== void 0) {
|
|
3282
3282
|
body.generateOptInPage = options.generateOptInPage;
|
|
3283
3283
|
}
|
|
3284
|
+
if (options.generateBusinessPage !== void 0) {
|
|
3285
|
+
body.generateBusinessPage = options.generateBusinessPage;
|
|
3286
|
+
}
|
|
3284
3287
|
const response = await this.http.request({
|
|
3285
3288
|
method: "POST",
|
|
3286
3289
|
path: "/enterprise/workspaces/provision",
|
|
@@ -3288,6 +3291,36 @@ var EnterpriseResource = class {
|
|
|
3288
3291
|
});
|
|
3289
3292
|
return transformKeys(response);
|
|
3290
3293
|
}
|
|
3294
|
+
async generateBusinessPage(options) {
|
|
3295
|
+
if (!options.businessName || options.businessName.trim().length === 0) {
|
|
3296
|
+
throw new Error("businessName is required");
|
|
3297
|
+
}
|
|
3298
|
+
const response = await this.http.request({
|
|
3299
|
+
method: "POST",
|
|
3300
|
+
path: "/enterprise/business-page/generate",
|
|
3301
|
+
body: { ...options }
|
|
3302
|
+
});
|
|
3303
|
+
return response;
|
|
3304
|
+
}
|
|
3305
|
+
async uploadVerificationDocument(file, options) {
|
|
3306
|
+
const formData = new FormData();
|
|
3307
|
+
if (file instanceof Blob) {
|
|
3308
|
+
formData.append("file", file, options?.filename || "document");
|
|
3309
|
+
} else {
|
|
3310
|
+
const blob = new Blob([file]);
|
|
3311
|
+
formData.append("file", blob, options?.filename || "document");
|
|
3312
|
+
}
|
|
3313
|
+
if (options?.workspaceId) {
|
|
3314
|
+
formData.append("workspaceId", options.workspaceId);
|
|
3315
|
+
}
|
|
3316
|
+
if (options?.verificationId) {
|
|
3317
|
+
formData.append("verificationId", options.verificationId);
|
|
3318
|
+
}
|
|
3319
|
+
return this.http.requestFormData(
|
|
3320
|
+
"/enterprise/verification-document/upload",
|
|
3321
|
+
formData
|
|
3322
|
+
);
|
|
3323
|
+
}
|
|
3291
3324
|
};
|
|
3292
3325
|
|
|
3293
3326
|
// src/resources/conversations.ts
|