@livechat/developer-studio-api 3.0.46 → 3.0.48
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 +31 -22
- package/dist/index.d.ts +31 -22
- package/dist/index.js +162 -17
- package/dist/index.mjs +161 -17
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -58,7 +58,7 @@ interface GithubClientOptions {
|
|
|
58
58
|
}
|
|
59
59
|
declare const githubClientInstance: axios.AxiosInstance;
|
|
60
60
|
declare function getGitHubClientAuthorization(req: {
|
|
61
|
-
headers: Record<string, string | string[] | undefined
|
|
61
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
62
62
|
}): GithubClientAuthorization;
|
|
63
63
|
declare function getGithubClientConfig(options?: GithubClientOptions | undefined): AxiosRequestConfig;
|
|
64
64
|
declare function initGithubClient(token?: string): void;
|
|
@@ -182,7 +182,7 @@ interface NetlifyClientOptions extends NetlifyClientAuthorization {
|
|
|
182
182
|
}
|
|
183
183
|
declare const netlifyClientInstance: axios.AxiosInstance;
|
|
184
184
|
declare function getNetlifyClientAuthorization(req: {
|
|
185
|
-
headers: Record<string, string | string[] | undefined
|
|
185
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
186
186
|
}): NetlifyClientAuthorization;
|
|
187
187
|
declare function getNetlifyClientConfig(options?: NetlifyClientOptions): AxiosRequestConfig;
|
|
188
188
|
declare function initNetlifyClient(token?: string): void;
|
|
@@ -267,7 +267,7 @@ interface PlanetScaleClientOptions extends PlanetScaleClientAuthorization {
|
|
|
267
267
|
}
|
|
268
268
|
declare const planetScaleClientInstance: axios.AxiosInstance;
|
|
269
269
|
declare function getPlanetScaleClientAuthorization(req: {
|
|
270
|
-
headers: Record<string, string | string[] | undefined
|
|
270
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
271
271
|
}): PlanetScaleClientAuthorization;
|
|
272
272
|
declare function getPlanetScaleClientConfig(options?: PlanetScaleClientOptions): AxiosRequestConfig;
|
|
273
273
|
declare function initPlanetScaleClient(token?: string): void;
|
|
@@ -390,7 +390,7 @@ interface TextClientOptions extends TextClientAuthorization {
|
|
|
390
390
|
}
|
|
391
391
|
declare const textClientInstance: axios.AxiosInstance;
|
|
392
392
|
declare function getTextClientAuthorization(req: {
|
|
393
|
-
headers: Record<string, string | string[] | undefined
|
|
393
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
394
394
|
}): TextClientAuthorization;
|
|
395
395
|
declare function getTextClientConfig(option?: TextClientOptions): AxiosRequestConfig;
|
|
396
396
|
declare function initTextClient(baseUrl?: string, token?: string): void;
|
|
@@ -408,7 +408,7 @@ interface VercelClientOptions extends VercelClientAuthorization {
|
|
|
408
408
|
}
|
|
409
409
|
declare const vercelClientInstance: axios.AxiosInstance;
|
|
410
410
|
declare function getVercelClientAuthorization(req: {
|
|
411
|
-
headers: Record<string, string | string[] | undefined
|
|
411
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
412
412
|
}): VercelClientAuthorization;
|
|
413
413
|
declare function getVercelClientConfig(options?: VercelClientOptions): AxiosRequestConfig;
|
|
414
414
|
declare function initVercelClient(token?: string): void;
|
|
@@ -566,7 +566,7 @@ interface NeonClientOptions extends NeonClientAuthorization {
|
|
|
566
566
|
}
|
|
567
567
|
declare const neonClientInstance: axios.AxiosInstance;
|
|
568
568
|
declare function getNeonClientAuthorization(req: {
|
|
569
|
-
headers: Record<string, string | string[] | undefined
|
|
569
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
570
570
|
}): NeonClientAuthorization;
|
|
571
571
|
declare function getNeonClientConfig(options?: NeonClientOptions): AxiosRequestConfig;
|
|
572
572
|
declare function initNeonClient(token?: string): void;
|
|
@@ -591,7 +591,7 @@ interface MailchimpListWebhook {
|
|
|
591
591
|
};
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
type ApiErrorName = "adapter" | "accounts" | "dps" | "github" | "vercel" | "netlify" | "planetscale" | "neon" | "mailchimp" | "shopify";
|
|
594
|
+
type ApiErrorName = "adapter" | "accounts" | "livechat" | "dps" | "github" | "vercel" | "netlify" | "planetscale" | "neon" | "mailchimp" | "shopify";
|
|
595
595
|
type ApiErrorSource = "accounts" | "github" | "vercel" | "netlify" | "planetscale" | "neon" | "mailchimp" | "shopify";
|
|
596
596
|
type ApiErrorKind = "unauthorized" | "error";
|
|
597
597
|
type ApiError<TData = unknown> = {
|
|
@@ -686,7 +686,7 @@ declare class MailchimpApiError extends ApiErrorBase<{
|
|
|
686
686
|
declare const getMailchimpClientUrl: (server: string) => string;
|
|
687
687
|
declare const mailchimpClientInstance: axios.AxiosInstance;
|
|
688
688
|
declare function getMailchimpClientAuthorization(req: {
|
|
689
|
-
headers: Record<string, string | string[] | undefined
|
|
689
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
690
690
|
}): MailchimpClientAuthorization;
|
|
691
691
|
declare function getMailchimpClientConfig(options?: MailchimpClientInstanceOptions): AxiosRequestConfig;
|
|
692
692
|
declare function initMailchimpClient(token?: string, server?: string): void;
|
|
@@ -707,7 +707,7 @@ declare class ShopifyApiError extends ApiErrorBase<{
|
|
|
707
707
|
declare const shopifyClientInstance: axios.AxiosInstance;
|
|
708
708
|
declare const getShopifyClientUrl: (store: string) => string;
|
|
709
709
|
declare function getShopifyClientAuthorization(req: {
|
|
710
|
-
headers: Record<string, string | string[] | undefined
|
|
710
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
711
711
|
}): ShopifyClientAuthorization;
|
|
712
712
|
declare function getShopifyClientConfig(options: ShopifyClientOptions): AxiosRequestConfig;
|
|
713
713
|
declare function initShopifyClient(token?: string, shop?: string): void;
|
|
@@ -843,7 +843,7 @@ declare class AccountsApiError extends ApiErrorBase<{
|
|
|
843
843
|
}
|
|
844
844
|
declare const platformAccountsClientInstance: axios.AxiosInstance;
|
|
845
845
|
declare function getPlatformAccountsClientAuthorization(req: {
|
|
846
|
-
headers: Record<string, string | string[] | undefined
|
|
846
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
847
847
|
}): PlatformAccountsClientAuthorization;
|
|
848
848
|
declare function getPlatformAccountsClientConfig(options?: PlatformAccountsClientInstanceOptions): AxiosRequestConfig;
|
|
849
849
|
declare function initPlatformAccountsClient(baseUrl?: string, token?: string): void;
|
|
@@ -912,7 +912,7 @@ interface PlatformBillingClientOptions extends PlatformBillingClientAuthorizatio
|
|
|
912
912
|
}
|
|
913
913
|
declare const platformBillingClientInstance: axios.AxiosInstance;
|
|
914
914
|
declare function getPlatformBillingClientAuthorization(req: {
|
|
915
|
-
headers: Record<string, string | string[] | undefined
|
|
915
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
916
916
|
}): PlatformBillingClientAuthorization;
|
|
917
917
|
declare function getPlatformBillingClientConfig(options?: PlatformBillingClientOptions): AxiosRequestConfig;
|
|
918
918
|
declare function initPlatformBillingClient(baseUrl?: string, token?: string): void;
|
|
@@ -1647,7 +1647,7 @@ declare class AdapterApiError extends ApiErrorBase<{
|
|
|
1647
1647
|
}
|
|
1648
1648
|
declare const platformAdapterClientInstance: axios.AxiosInstance;
|
|
1649
1649
|
declare function getPlatformAdapterClientAuthorization(req: {
|
|
1650
|
-
headers: Record<string, string | string[] | undefined
|
|
1650
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
1651
1651
|
}): PlatformAdapterClientAuthorization;
|
|
1652
1652
|
declare function getPlatformAdapterClientConfig(options?: PlatformAdapterClientOptions): AxiosRequestConfig;
|
|
1653
1653
|
declare const getPlatformAdapterClientDefaultConfig: (authorization?: PlatformAdapterClientAuthorization) => AxiosRequestConfig<any>;
|
|
@@ -2229,7 +2229,7 @@ declare class DpsApiError extends ApiErrorBase<{
|
|
|
2229
2229
|
}
|
|
2230
2230
|
declare const platformDpsClientInstance: axios.AxiosInstance;
|
|
2231
2231
|
declare function getPlatformDpsClientAuthorization(req: {
|
|
2232
|
-
headers: Record<string, string | string[] | undefined
|
|
2232
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2233
2233
|
}): PlatformDpsClientAuthorization;
|
|
2234
2234
|
declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientAuthorization;
|
|
2235
2235
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientOptions): AxiosRequestConfig;
|
|
@@ -2468,9 +2468,9 @@ interface Webhook {
|
|
|
2468
2468
|
url: string;
|
|
2469
2469
|
api_version?: string;
|
|
2470
2470
|
action: string;
|
|
2471
|
-
description
|
|
2471
|
+
description?: string;
|
|
2472
2472
|
secret_key: string;
|
|
2473
|
-
owner_client_id
|
|
2473
|
+
owner_client_id?: string;
|
|
2474
2474
|
type: "bot" | "license";
|
|
2475
2475
|
filters?: {
|
|
2476
2476
|
author_type?: "agent" | "customer";
|
|
@@ -2488,9 +2488,17 @@ type LiveChatClientAuthorization = PlatformClientAuthorization;
|
|
|
2488
2488
|
interface LiveChatClientOptions extends LiveChatClientAuthorization {
|
|
2489
2489
|
ensureAuthorizationToken?: boolean;
|
|
2490
2490
|
}
|
|
2491
|
+
declare class LivechatApiError extends ApiErrorBase<{
|
|
2492
|
+
error: {
|
|
2493
|
+
type: string;
|
|
2494
|
+
message: string;
|
|
2495
|
+
};
|
|
2496
|
+
}> {
|
|
2497
|
+
name: "livechat";
|
|
2498
|
+
}
|
|
2491
2499
|
declare const livechatClientInstance: axios.AxiosInstance;
|
|
2492
2500
|
declare function getLiveChatClientAuthorization(req: {
|
|
2493
|
-
headers: Record<string, string | string[] | undefined
|
|
2501
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2494
2502
|
}): LiveChatClientAuthorization;
|
|
2495
2503
|
declare function getLiveChatClientConfig(options?: LiveChatClientOptions): AxiosRequestConfig;
|
|
2496
2504
|
declare function initLiveChatClient(baseUrl?: string, token?: string): void;
|
|
@@ -2877,13 +2885,14 @@ declare const api: {
|
|
|
2877
2885
|
unregisterProperties(clientId: string, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2878
2886
|
};
|
|
2879
2887
|
webhook: {
|
|
2880
|
-
getWebhooks(clientId
|
|
2881
|
-
unregisterWebhook(clientId: string, webhookId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<undefined, any>>;
|
|
2882
|
-
unregisterWebhooks(clientId
|
|
2888
|
+
getWebhooks(clientId?: string | undefined, isAgent?: boolean | undefined, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<WebhookDto[], any>>;
|
|
2889
|
+
unregisterWebhook(clientId: string | undefined, webhookId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<undefined, any>>;
|
|
2890
|
+
unregisterWebhooks(clientId?: string | undefined, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2891
|
+
registerWebhook(webhook: Webhook, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2883
2892
|
registerWebhooks(webhooks: Webhook[], authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2884
2893
|
migrateWebhooks(webhooks: Webhook[], clientId: string, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2885
|
-
getLicenseWebhooksList(isAgent: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<
|
|
2886
|
-
data:
|
|
2894
|
+
getLicenseWebhooksList(isAgent: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<WebhookDto[], any> | {
|
|
2895
|
+
data: WebhookDto[];
|
|
2887
2896
|
}>;
|
|
2888
2897
|
deleteLicenseWebhook(id: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<undefined, any>>;
|
|
2889
2898
|
getWebhookNamesList(version: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<any, any>>;
|
|
@@ -3217,4 +3226,4 @@ declare function getIntegrationFlowUrl<TContext extends IntegrationFlowContext,
|
|
|
3217
3226
|
adapterUrl: string;
|
|
3218
3227
|
}): string;
|
|
3219
3228
|
|
|
3220
|
-
export { API_NOTIFICATIONS, AccountDto, AccountsApiError, AdapterApiError, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentConfigurationDto, AgentDto, ApiError, ApiErrorBase, ApiErrorKind, ApiErrorName, ApiErrorSource, AppAuthorizationData, AppBaseData, AppBaseTemplate, AppDeployment, AppDeploymentBlock, AppDeploymentBlockConfig, AppDeploymentData, AppDeploymentProvider, AppDisplayData, AppEventDto, AppGitHubRepository, AppGitHubRepositoryConfig, AppInfrastructureBlocks, AppManifest, AppMonetizationData, AppMonitoringCustomReport, AppMonitoringCustomReportDataDto, AppMonitoringEvent, AppMonitoringEventData, AppMonitoringEventsLog, AppMonitoringEventsLogItem, AppMonitoringEventsReportDto, AppMonitoringReportParams, AppMonitoringUptimeReportDto, AppNeonStorage, AppNeonStorageConfig, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppPropertiesData, AppPropertyData, AppRepository, AppRepositoryBlock, AppRepositoryBlockConfig, AppRepositoryData, AppRepositoryProvider, AppRepositoryTarget, AppRepositoryTemplate, AppRepositoryTemplates, AppResourceDto, AppStatsDto, AppStorage, AppStorageBlock, AppStorageBlockConfig, AppStorageData, AppStorageProvider, AppTemplate, AppTemplates, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppWidgetData, AppWidgetsData, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationChatBooster, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, ApplicationWidget, AuthorizeData, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppVariablePayload, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, DeveloperLedgerParams, DpsApiError, EditAppVariablePayload, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, GetVercelProjectsResult, GitHubAuthorizeAppActionResult, GitHubAuthorizeFlowContext, GitHubAuthorizeFlowResult, GitHubAuthorizeOauthActionResult, GitHubInstallActionContext, GitHubInstallActionResult, GitHubInstallFlowContext, GitHubInstallFlowResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryIssue, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientAuthorization, GithubClientOptions, IntegrationFlowContext, IntegrationFlowOutput, IssueLabel, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppStorageData, LinkAppStorageNeonData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LiveChatClientAuthorization, LiveChatClientOptions, LiveChatConfigurationApiError, MailchimpApiError, MailchimpAuthorizeActionResult, MailchimpAuthorizeFlowContext, MailchimpAuthorizeFlowResult, MailchimpClientAuthorization, MailchimpClientInstanceOptions, MailchimpListWebhook, MyAccountDto, NeonAuthorizeActionResult, NeonAuthorizeFlowContext, NeonAuthorizeFlowResult, NeonClientAuthorization, NeonClientOptions, NeonProjectBranchDto, NeonProjectBranchesDto, NeonProjectDatabaseDto, NeonProjectDatabasesDto, NeonProjectDto, NeonProjectRoleDto, NeonProjectRolesDto, NeonProjectWithConnectionUriDto, NeonProjectsDto, NeonUser, NetlifyAccount, NetlifyAuthorizeActionResult, NetlifyAuthorizeFlowContext, NetlifyAuthorizeFlowResult, NetlifyClientAuthorization, NetlifyClientOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifyInstallActionContext, NetlifyInstallActionResult, NetlifyInstallFlowContext, NetlifyInstallFlowResult, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleAuthorizeActionResult, PlanetScaleAuthorizeFlowContext, PlanetScaleAuthorizeFlowResult, PlanetScaleClientAuthorization, PlanetScaleClientOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientAuthorization, PlatformAdapterClientOptions, PlatformBillingClientAuthorization, PlatformBillingClientOptions, PlatformClientAuthorization, PlatformDpsClientAuthorization, PlatformDpsClientOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, PushAppPayload, PushAppResult, PushAppSaga, PushAppSagaAuthorizationStep, PushAppSagaBaseStep, PushAppSagaDeploymentStep, PushAppSagaDisplayStep, PushAppSagaMonetizationStep, PushAppSagaPropertiesStep, PushAppSagaRepositoryStep, PushAppSagaStorageStep, PushAppSagaWidgetsStep, RemoveAppAuthorizationPayload, RemoveAppMonetizationPayload, RemoveAppPropertiesPayload, RemoveAppPropertyPayload, RemoveAppWidgetPayload, RemoveAppWidgetsPayload, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, Saga, SagaInput, SagaOutput, SagaStep, SagaStepChanges, SagaStepComparer, SagaStepPropertyCompareResult, SagaStepStatus, SagaStepsSchema, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, ShopifyApiError, ShopifyAuthorizeActionContext, ShopifyAuthorizeActionResult, ShopifyAuthorizeFlowContext, ShopifyAuthorizeFlowResult, ShopifyClientAuthorization, ShopifyClientOptions, ShortcutDto, SyncAppVariablePayload, TextClientAuthorization, TextClientOptions, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnlinkAppDeploymentData, UnlinkAppDeploymentPayload, UnlinkAppRepositoryData, UnlinkAppRepositoryPayload, UnlinkAppStorageData, UnlinkAppStoragePayload, UpdateAppAuthorizationPayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppDeploymentPayload, UpsertAppMonetizationPayload, UpsertAppPropertiesPayload, UpsertAppPropertyPayload, UpsertAppRepositoryPayload, UpsertAppResourcePayload, UpsertAppStoragePayload, UpsertAppWidgetPayload, UpsertAppWidgetsPayload, UpsertApplicationChatBoosterPayload, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNeonIntegrationDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserVercelIntegrationDto, VercelAuthorizeFlowContext, VercelAuthorizeFlowResult, VercelClientAuthorization, VercelClientOptions, VercelConnectActionContext, VercelConnectActionResult, VercelDeploy, VercelInstallActionContext, VercelInstallActionResult, VercelInstallFlowContext, VercelInstallFlowResult, VercelIntegrateActionResult, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, VerifyAppPayload, VerifyAppResult, Webhook, WebhookDto, allAppTemplates, api, appBaseTemplates, appRepositoryTemplates, appRepositoryTemplatesMap, appTemplates, appTemplatesMap, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientConfig, getIntegrationFlowUrl, getLiveChatClientAuthorization, getLiveChatClientConfig, getMailchimpClientAuthorization, getMailchimpClientConfig, getMailchimpClientUrl, getNeonClientAuthorization, getNeonClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformAdapterClientDefaultConfig, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getShopifyClientAuthorization, getShopifyClientConfig, getShopifyClientUrl, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClient, initLiveChatClient, initMailchimpClient, initNeonClient, initNetlifyClient, initPlanetScaleClient, initPlatformAccountsClient, initPlatformAdapterClient, initPlatformBillingClient, initPlatformDpsClient, initShopifyClient, initTextClient, initVercelClient, livechatClientInstance, mailchimpClientInstance, neonClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, shopifyClientInstance, textClientInstance, updateGithubClient, updateMailchimpClient, updateNeonClient, updateNetlifyClient, updatePlanetScaleClient, updatePlatformAdapterClient, updateShopifyClient, updateVercelClient, vercelClientInstance };
|
|
3229
|
+
export { API_NOTIFICATIONS, AccountDto, AccountsApiError, AdapterApiError, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentConfigurationDto, AgentDto, ApiError, ApiErrorBase, ApiErrorKind, ApiErrorName, ApiErrorSource, AppAuthorizationData, AppBaseData, AppBaseTemplate, AppDeployment, AppDeploymentBlock, AppDeploymentBlockConfig, AppDeploymentData, AppDeploymentProvider, AppDisplayData, AppEventDto, AppGitHubRepository, AppGitHubRepositoryConfig, AppInfrastructureBlocks, AppManifest, AppMonetizationData, AppMonitoringCustomReport, AppMonitoringCustomReportDataDto, AppMonitoringEvent, AppMonitoringEventData, AppMonitoringEventsLog, AppMonitoringEventsLogItem, AppMonitoringEventsReportDto, AppMonitoringReportParams, AppMonitoringUptimeReportDto, AppNeonStorage, AppNeonStorageConfig, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppPropertiesData, AppPropertyData, AppRepository, AppRepositoryBlock, AppRepositoryBlockConfig, AppRepositoryData, AppRepositoryProvider, AppRepositoryTarget, AppRepositoryTemplate, AppRepositoryTemplates, AppResourceDto, AppStatsDto, AppStorage, AppStorageBlock, AppStorageBlockConfig, AppStorageData, AppStorageProvider, AppTemplate, AppTemplates, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppWidgetData, AppWidgetsData, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationChatBooster, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, ApplicationWidget, AuthorizeData, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppVariablePayload, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, DeveloperLedgerParams, DpsApiError, EditAppVariablePayload, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, GetVercelProjectsResult, GitHubAuthorizeAppActionResult, GitHubAuthorizeFlowContext, GitHubAuthorizeFlowResult, GitHubAuthorizeOauthActionResult, GitHubInstallActionContext, GitHubInstallActionResult, GitHubInstallFlowContext, GitHubInstallFlowResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryIssue, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientAuthorization, GithubClientOptions, IntegrationFlowContext, IntegrationFlowOutput, IssueLabel, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppStorageData, LinkAppStorageNeonData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LiveChatClientAuthorization, LiveChatClientOptions, LiveChatConfigurationApiError, LivechatApiError, MailchimpApiError, MailchimpAuthorizeActionResult, MailchimpAuthorizeFlowContext, MailchimpAuthorizeFlowResult, MailchimpClientAuthorization, MailchimpClientInstanceOptions, MailchimpListWebhook, MyAccountDto, NeonAuthorizeActionResult, NeonAuthorizeFlowContext, NeonAuthorizeFlowResult, NeonClientAuthorization, NeonClientOptions, NeonProjectBranchDto, NeonProjectBranchesDto, NeonProjectDatabaseDto, NeonProjectDatabasesDto, NeonProjectDto, NeonProjectRoleDto, NeonProjectRolesDto, NeonProjectWithConnectionUriDto, NeonProjectsDto, NeonUser, NetlifyAccount, NetlifyAuthorizeActionResult, NetlifyAuthorizeFlowContext, NetlifyAuthorizeFlowResult, NetlifyClientAuthorization, NetlifyClientOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifyInstallActionContext, NetlifyInstallActionResult, NetlifyInstallFlowContext, NetlifyInstallFlowResult, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleAuthorizeActionResult, PlanetScaleAuthorizeFlowContext, PlanetScaleAuthorizeFlowResult, PlanetScaleClientAuthorization, PlanetScaleClientOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientAuthorization, PlatformAdapterClientOptions, PlatformBillingClientAuthorization, PlatformBillingClientOptions, PlatformClientAuthorization, PlatformDpsClientAuthorization, PlatformDpsClientOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, PushAppPayload, PushAppResult, PushAppSaga, PushAppSagaAuthorizationStep, PushAppSagaBaseStep, PushAppSagaDeploymentStep, PushAppSagaDisplayStep, PushAppSagaMonetizationStep, PushAppSagaPropertiesStep, PushAppSagaRepositoryStep, PushAppSagaStorageStep, PushAppSagaWidgetsStep, RemoveAppAuthorizationPayload, RemoveAppMonetizationPayload, RemoveAppPropertiesPayload, RemoveAppPropertyPayload, RemoveAppWidgetPayload, RemoveAppWidgetsPayload, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, Saga, SagaInput, SagaOutput, SagaStep, SagaStepChanges, SagaStepComparer, SagaStepPropertyCompareResult, SagaStepStatus, SagaStepsSchema, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, ShopifyApiError, ShopifyAuthorizeActionContext, ShopifyAuthorizeActionResult, ShopifyAuthorizeFlowContext, ShopifyAuthorizeFlowResult, ShopifyClientAuthorization, ShopifyClientOptions, ShortcutDto, SyncAppVariablePayload, TextClientAuthorization, TextClientOptions, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnlinkAppDeploymentData, UnlinkAppDeploymentPayload, UnlinkAppRepositoryData, UnlinkAppRepositoryPayload, UnlinkAppStorageData, UnlinkAppStoragePayload, UpdateAppAuthorizationPayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppDeploymentPayload, UpsertAppMonetizationPayload, UpsertAppPropertiesPayload, UpsertAppPropertyPayload, UpsertAppRepositoryPayload, UpsertAppResourcePayload, UpsertAppStoragePayload, UpsertAppWidgetPayload, UpsertAppWidgetsPayload, UpsertApplicationChatBoosterPayload, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNeonIntegrationDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserVercelIntegrationDto, VercelAuthorizeFlowContext, VercelAuthorizeFlowResult, VercelClientAuthorization, VercelClientOptions, VercelConnectActionContext, VercelConnectActionResult, VercelDeploy, VercelInstallActionContext, VercelInstallActionResult, VercelInstallFlowContext, VercelInstallFlowResult, VercelIntegrateActionResult, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, VerifyAppPayload, VerifyAppResult, Webhook, WebhookDto, allAppTemplates, api, appBaseTemplates, appRepositoryTemplates, appRepositoryTemplatesMap, appTemplates, appTemplatesMap, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientConfig, getIntegrationFlowUrl, getLiveChatClientAuthorization, getLiveChatClientConfig, getMailchimpClientAuthorization, getMailchimpClientConfig, getMailchimpClientUrl, getNeonClientAuthorization, getNeonClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformAdapterClientDefaultConfig, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getShopifyClientAuthorization, getShopifyClientConfig, getShopifyClientUrl, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClient, initLiveChatClient, initMailchimpClient, initNeonClient, initNetlifyClient, initPlanetScaleClient, initPlatformAccountsClient, initPlatformAdapterClient, initPlatformBillingClient, initPlatformDpsClient, initShopifyClient, initTextClient, initVercelClient, livechatClientInstance, mailchimpClientInstance, neonClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, shopifyClientInstance, textClientInstance, updateGithubClient, updateMailchimpClient, updateNeonClient, updateNetlifyClient, updatePlanetScaleClient, updatePlatformAdapterClient, updateShopifyClient, updateVercelClient, vercelClientInstance };
|
package/dist/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ interface GithubClientOptions {
|
|
|
58
58
|
}
|
|
59
59
|
declare const githubClientInstance: axios.AxiosInstance;
|
|
60
60
|
declare function getGitHubClientAuthorization(req: {
|
|
61
|
-
headers: Record<string, string | string[] | undefined
|
|
61
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
62
62
|
}): GithubClientAuthorization;
|
|
63
63
|
declare function getGithubClientConfig(options?: GithubClientOptions | undefined): AxiosRequestConfig;
|
|
64
64
|
declare function initGithubClient(token?: string): void;
|
|
@@ -182,7 +182,7 @@ interface NetlifyClientOptions extends NetlifyClientAuthorization {
|
|
|
182
182
|
}
|
|
183
183
|
declare const netlifyClientInstance: axios.AxiosInstance;
|
|
184
184
|
declare function getNetlifyClientAuthorization(req: {
|
|
185
|
-
headers: Record<string, string | string[] | undefined
|
|
185
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
186
186
|
}): NetlifyClientAuthorization;
|
|
187
187
|
declare function getNetlifyClientConfig(options?: NetlifyClientOptions): AxiosRequestConfig;
|
|
188
188
|
declare function initNetlifyClient(token?: string): void;
|
|
@@ -267,7 +267,7 @@ interface PlanetScaleClientOptions extends PlanetScaleClientAuthorization {
|
|
|
267
267
|
}
|
|
268
268
|
declare const planetScaleClientInstance: axios.AxiosInstance;
|
|
269
269
|
declare function getPlanetScaleClientAuthorization(req: {
|
|
270
|
-
headers: Record<string, string | string[] | undefined
|
|
270
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
271
271
|
}): PlanetScaleClientAuthorization;
|
|
272
272
|
declare function getPlanetScaleClientConfig(options?: PlanetScaleClientOptions): AxiosRequestConfig;
|
|
273
273
|
declare function initPlanetScaleClient(token?: string): void;
|
|
@@ -390,7 +390,7 @@ interface TextClientOptions extends TextClientAuthorization {
|
|
|
390
390
|
}
|
|
391
391
|
declare const textClientInstance: axios.AxiosInstance;
|
|
392
392
|
declare function getTextClientAuthorization(req: {
|
|
393
|
-
headers: Record<string, string | string[] | undefined
|
|
393
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
394
394
|
}): TextClientAuthorization;
|
|
395
395
|
declare function getTextClientConfig(option?: TextClientOptions): AxiosRequestConfig;
|
|
396
396
|
declare function initTextClient(baseUrl?: string, token?: string): void;
|
|
@@ -408,7 +408,7 @@ interface VercelClientOptions extends VercelClientAuthorization {
|
|
|
408
408
|
}
|
|
409
409
|
declare const vercelClientInstance: axios.AxiosInstance;
|
|
410
410
|
declare function getVercelClientAuthorization(req: {
|
|
411
|
-
headers: Record<string, string | string[] | undefined
|
|
411
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
412
412
|
}): VercelClientAuthorization;
|
|
413
413
|
declare function getVercelClientConfig(options?: VercelClientOptions): AxiosRequestConfig;
|
|
414
414
|
declare function initVercelClient(token?: string): void;
|
|
@@ -566,7 +566,7 @@ interface NeonClientOptions extends NeonClientAuthorization {
|
|
|
566
566
|
}
|
|
567
567
|
declare const neonClientInstance: axios.AxiosInstance;
|
|
568
568
|
declare function getNeonClientAuthorization(req: {
|
|
569
|
-
headers: Record<string, string | string[] | undefined
|
|
569
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
570
570
|
}): NeonClientAuthorization;
|
|
571
571
|
declare function getNeonClientConfig(options?: NeonClientOptions): AxiosRequestConfig;
|
|
572
572
|
declare function initNeonClient(token?: string): void;
|
|
@@ -591,7 +591,7 @@ interface MailchimpListWebhook {
|
|
|
591
591
|
};
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
type ApiErrorName = "adapter" | "accounts" | "dps" | "github" | "vercel" | "netlify" | "planetscale" | "neon" | "mailchimp" | "shopify";
|
|
594
|
+
type ApiErrorName = "adapter" | "accounts" | "livechat" | "dps" | "github" | "vercel" | "netlify" | "planetscale" | "neon" | "mailchimp" | "shopify";
|
|
595
595
|
type ApiErrorSource = "accounts" | "github" | "vercel" | "netlify" | "planetscale" | "neon" | "mailchimp" | "shopify";
|
|
596
596
|
type ApiErrorKind = "unauthorized" | "error";
|
|
597
597
|
type ApiError<TData = unknown> = {
|
|
@@ -686,7 +686,7 @@ declare class MailchimpApiError extends ApiErrorBase<{
|
|
|
686
686
|
declare const getMailchimpClientUrl: (server: string) => string;
|
|
687
687
|
declare const mailchimpClientInstance: axios.AxiosInstance;
|
|
688
688
|
declare function getMailchimpClientAuthorization(req: {
|
|
689
|
-
headers: Record<string, string | string[] | undefined
|
|
689
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
690
690
|
}): MailchimpClientAuthorization;
|
|
691
691
|
declare function getMailchimpClientConfig(options?: MailchimpClientInstanceOptions): AxiosRequestConfig;
|
|
692
692
|
declare function initMailchimpClient(token?: string, server?: string): void;
|
|
@@ -707,7 +707,7 @@ declare class ShopifyApiError extends ApiErrorBase<{
|
|
|
707
707
|
declare const shopifyClientInstance: axios.AxiosInstance;
|
|
708
708
|
declare const getShopifyClientUrl: (store: string) => string;
|
|
709
709
|
declare function getShopifyClientAuthorization(req: {
|
|
710
|
-
headers: Record<string, string | string[] | undefined
|
|
710
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
711
711
|
}): ShopifyClientAuthorization;
|
|
712
712
|
declare function getShopifyClientConfig(options: ShopifyClientOptions): AxiosRequestConfig;
|
|
713
713
|
declare function initShopifyClient(token?: string, shop?: string): void;
|
|
@@ -843,7 +843,7 @@ declare class AccountsApiError extends ApiErrorBase<{
|
|
|
843
843
|
}
|
|
844
844
|
declare const platformAccountsClientInstance: axios.AxiosInstance;
|
|
845
845
|
declare function getPlatformAccountsClientAuthorization(req: {
|
|
846
|
-
headers: Record<string, string | string[] | undefined
|
|
846
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
847
847
|
}): PlatformAccountsClientAuthorization;
|
|
848
848
|
declare function getPlatformAccountsClientConfig(options?: PlatformAccountsClientInstanceOptions): AxiosRequestConfig;
|
|
849
849
|
declare function initPlatformAccountsClient(baseUrl?: string, token?: string): void;
|
|
@@ -912,7 +912,7 @@ interface PlatformBillingClientOptions extends PlatformBillingClientAuthorizatio
|
|
|
912
912
|
}
|
|
913
913
|
declare const platformBillingClientInstance: axios.AxiosInstance;
|
|
914
914
|
declare function getPlatformBillingClientAuthorization(req: {
|
|
915
|
-
headers: Record<string, string | string[] | undefined
|
|
915
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
916
916
|
}): PlatformBillingClientAuthorization;
|
|
917
917
|
declare function getPlatformBillingClientConfig(options?: PlatformBillingClientOptions): AxiosRequestConfig;
|
|
918
918
|
declare function initPlatformBillingClient(baseUrl?: string, token?: string): void;
|
|
@@ -1647,7 +1647,7 @@ declare class AdapterApiError extends ApiErrorBase<{
|
|
|
1647
1647
|
}
|
|
1648
1648
|
declare const platformAdapterClientInstance: axios.AxiosInstance;
|
|
1649
1649
|
declare function getPlatformAdapterClientAuthorization(req: {
|
|
1650
|
-
headers: Record<string, string | string[] | undefined
|
|
1650
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
1651
1651
|
}): PlatformAdapterClientAuthorization;
|
|
1652
1652
|
declare function getPlatformAdapterClientConfig(options?: PlatformAdapterClientOptions): AxiosRequestConfig;
|
|
1653
1653
|
declare const getPlatformAdapterClientDefaultConfig: (authorization?: PlatformAdapterClientAuthorization) => AxiosRequestConfig<any>;
|
|
@@ -2229,7 +2229,7 @@ declare class DpsApiError extends ApiErrorBase<{
|
|
|
2229
2229
|
}
|
|
2230
2230
|
declare const platformDpsClientInstance: axios.AxiosInstance;
|
|
2231
2231
|
declare function getPlatformDpsClientAuthorization(req: {
|
|
2232
|
-
headers: Record<string, string | string[] | undefined
|
|
2232
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2233
2233
|
}): PlatformDpsClientAuthorization;
|
|
2234
2234
|
declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientAuthorization;
|
|
2235
2235
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientOptions): AxiosRequestConfig;
|
|
@@ -2468,9 +2468,9 @@ interface Webhook {
|
|
|
2468
2468
|
url: string;
|
|
2469
2469
|
api_version?: string;
|
|
2470
2470
|
action: string;
|
|
2471
|
-
description
|
|
2471
|
+
description?: string;
|
|
2472
2472
|
secret_key: string;
|
|
2473
|
-
owner_client_id
|
|
2473
|
+
owner_client_id?: string;
|
|
2474
2474
|
type: "bot" | "license";
|
|
2475
2475
|
filters?: {
|
|
2476
2476
|
author_type?: "agent" | "customer";
|
|
@@ -2488,9 +2488,17 @@ type LiveChatClientAuthorization = PlatformClientAuthorization;
|
|
|
2488
2488
|
interface LiveChatClientOptions extends LiveChatClientAuthorization {
|
|
2489
2489
|
ensureAuthorizationToken?: boolean;
|
|
2490
2490
|
}
|
|
2491
|
+
declare class LivechatApiError extends ApiErrorBase<{
|
|
2492
|
+
error: {
|
|
2493
|
+
type: string;
|
|
2494
|
+
message: string;
|
|
2495
|
+
};
|
|
2496
|
+
}> {
|
|
2497
|
+
name: "livechat";
|
|
2498
|
+
}
|
|
2491
2499
|
declare const livechatClientInstance: axios.AxiosInstance;
|
|
2492
2500
|
declare function getLiveChatClientAuthorization(req: {
|
|
2493
|
-
headers: Record<string, string | string[] | undefined
|
|
2501
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2494
2502
|
}): LiveChatClientAuthorization;
|
|
2495
2503
|
declare function getLiveChatClientConfig(options?: LiveChatClientOptions): AxiosRequestConfig;
|
|
2496
2504
|
declare function initLiveChatClient(baseUrl?: string, token?: string): void;
|
|
@@ -2877,13 +2885,14 @@ declare const api: {
|
|
|
2877
2885
|
unregisterProperties(clientId: string, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2878
2886
|
};
|
|
2879
2887
|
webhook: {
|
|
2880
|
-
getWebhooks(clientId
|
|
2881
|
-
unregisterWebhook(clientId: string, webhookId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<undefined, any>>;
|
|
2882
|
-
unregisterWebhooks(clientId
|
|
2888
|
+
getWebhooks(clientId?: string | undefined, isAgent?: boolean | undefined, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<WebhookDto[], any>>;
|
|
2889
|
+
unregisterWebhook(clientId: string | undefined, webhookId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<undefined, any>>;
|
|
2890
|
+
unregisterWebhooks(clientId?: string | undefined, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2891
|
+
registerWebhook(webhook: Webhook, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2883
2892
|
registerWebhooks(webhooks: Webhook[], authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2884
2893
|
migrateWebhooks(webhooks: Webhook[], clientId: string, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
2885
|
-
getLicenseWebhooksList(isAgent: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<
|
|
2886
|
-
data:
|
|
2894
|
+
getLicenseWebhooksList(isAgent: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<WebhookDto[], any> | {
|
|
2895
|
+
data: WebhookDto[];
|
|
2887
2896
|
}>;
|
|
2888
2897
|
deleteLicenseWebhook(id: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<undefined, any>>;
|
|
2889
2898
|
getWebhookNamesList(version: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<any, any>>;
|
|
@@ -3217,4 +3226,4 @@ declare function getIntegrationFlowUrl<TContext extends IntegrationFlowContext,
|
|
|
3217
3226
|
adapterUrl: string;
|
|
3218
3227
|
}): string;
|
|
3219
3228
|
|
|
3220
|
-
export { API_NOTIFICATIONS, AccountDto, AccountsApiError, AdapterApiError, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentConfigurationDto, AgentDto, ApiError, ApiErrorBase, ApiErrorKind, ApiErrorName, ApiErrorSource, AppAuthorizationData, AppBaseData, AppBaseTemplate, AppDeployment, AppDeploymentBlock, AppDeploymentBlockConfig, AppDeploymentData, AppDeploymentProvider, AppDisplayData, AppEventDto, AppGitHubRepository, AppGitHubRepositoryConfig, AppInfrastructureBlocks, AppManifest, AppMonetizationData, AppMonitoringCustomReport, AppMonitoringCustomReportDataDto, AppMonitoringEvent, AppMonitoringEventData, AppMonitoringEventsLog, AppMonitoringEventsLogItem, AppMonitoringEventsReportDto, AppMonitoringReportParams, AppMonitoringUptimeReportDto, AppNeonStorage, AppNeonStorageConfig, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppPropertiesData, AppPropertyData, AppRepository, AppRepositoryBlock, AppRepositoryBlockConfig, AppRepositoryData, AppRepositoryProvider, AppRepositoryTarget, AppRepositoryTemplate, AppRepositoryTemplates, AppResourceDto, AppStatsDto, AppStorage, AppStorageBlock, AppStorageBlockConfig, AppStorageData, AppStorageProvider, AppTemplate, AppTemplates, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppWidgetData, AppWidgetsData, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationChatBooster, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, ApplicationWidget, AuthorizeData, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppVariablePayload, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, DeveloperLedgerParams, DpsApiError, EditAppVariablePayload, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, GetVercelProjectsResult, GitHubAuthorizeAppActionResult, GitHubAuthorizeFlowContext, GitHubAuthorizeFlowResult, GitHubAuthorizeOauthActionResult, GitHubInstallActionContext, GitHubInstallActionResult, GitHubInstallFlowContext, GitHubInstallFlowResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryIssue, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientAuthorization, GithubClientOptions, IntegrationFlowContext, IntegrationFlowOutput, IssueLabel, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppStorageData, LinkAppStorageNeonData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LiveChatClientAuthorization, LiveChatClientOptions, LiveChatConfigurationApiError, MailchimpApiError, MailchimpAuthorizeActionResult, MailchimpAuthorizeFlowContext, MailchimpAuthorizeFlowResult, MailchimpClientAuthorization, MailchimpClientInstanceOptions, MailchimpListWebhook, MyAccountDto, NeonAuthorizeActionResult, NeonAuthorizeFlowContext, NeonAuthorizeFlowResult, NeonClientAuthorization, NeonClientOptions, NeonProjectBranchDto, NeonProjectBranchesDto, NeonProjectDatabaseDto, NeonProjectDatabasesDto, NeonProjectDto, NeonProjectRoleDto, NeonProjectRolesDto, NeonProjectWithConnectionUriDto, NeonProjectsDto, NeonUser, NetlifyAccount, NetlifyAuthorizeActionResult, NetlifyAuthorizeFlowContext, NetlifyAuthorizeFlowResult, NetlifyClientAuthorization, NetlifyClientOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifyInstallActionContext, NetlifyInstallActionResult, NetlifyInstallFlowContext, NetlifyInstallFlowResult, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleAuthorizeActionResult, PlanetScaleAuthorizeFlowContext, PlanetScaleAuthorizeFlowResult, PlanetScaleClientAuthorization, PlanetScaleClientOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientAuthorization, PlatformAdapterClientOptions, PlatformBillingClientAuthorization, PlatformBillingClientOptions, PlatformClientAuthorization, PlatformDpsClientAuthorization, PlatformDpsClientOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, PushAppPayload, PushAppResult, PushAppSaga, PushAppSagaAuthorizationStep, PushAppSagaBaseStep, PushAppSagaDeploymentStep, PushAppSagaDisplayStep, PushAppSagaMonetizationStep, PushAppSagaPropertiesStep, PushAppSagaRepositoryStep, PushAppSagaStorageStep, PushAppSagaWidgetsStep, RemoveAppAuthorizationPayload, RemoveAppMonetizationPayload, RemoveAppPropertiesPayload, RemoveAppPropertyPayload, RemoveAppWidgetPayload, RemoveAppWidgetsPayload, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, Saga, SagaInput, SagaOutput, SagaStep, SagaStepChanges, SagaStepComparer, SagaStepPropertyCompareResult, SagaStepStatus, SagaStepsSchema, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, ShopifyApiError, ShopifyAuthorizeActionContext, ShopifyAuthorizeActionResult, ShopifyAuthorizeFlowContext, ShopifyAuthorizeFlowResult, ShopifyClientAuthorization, ShopifyClientOptions, ShortcutDto, SyncAppVariablePayload, TextClientAuthorization, TextClientOptions, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnlinkAppDeploymentData, UnlinkAppDeploymentPayload, UnlinkAppRepositoryData, UnlinkAppRepositoryPayload, UnlinkAppStorageData, UnlinkAppStoragePayload, UpdateAppAuthorizationPayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppDeploymentPayload, UpsertAppMonetizationPayload, UpsertAppPropertiesPayload, UpsertAppPropertyPayload, UpsertAppRepositoryPayload, UpsertAppResourcePayload, UpsertAppStoragePayload, UpsertAppWidgetPayload, UpsertAppWidgetsPayload, UpsertApplicationChatBoosterPayload, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNeonIntegrationDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserVercelIntegrationDto, VercelAuthorizeFlowContext, VercelAuthorizeFlowResult, VercelClientAuthorization, VercelClientOptions, VercelConnectActionContext, VercelConnectActionResult, VercelDeploy, VercelInstallActionContext, VercelInstallActionResult, VercelInstallFlowContext, VercelInstallFlowResult, VercelIntegrateActionResult, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, VerifyAppPayload, VerifyAppResult, Webhook, WebhookDto, allAppTemplates, api, appBaseTemplates, appRepositoryTemplates, appRepositoryTemplatesMap, appTemplates, appTemplatesMap, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientConfig, getIntegrationFlowUrl, getLiveChatClientAuthorization, getLiveChatClientConfig, getMailchimpClientAuthorization, getMailchimpClientConfig, getMailchimpClientUrl, getNeonClientAuthorization, getNeonClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformAdapterClientDefaultConfig, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getShopifyClientAuthorization, getShopifyClientConfig, getShopifyClientUrl, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClient, initLiveChatClient, initMailchimpClient, initNeonClient, initNetlifyClient, initPlanetScaleClient, initPlatformAccountsClient, initPlatformAdapterClient, initPlatformBillingClient, initPlatformDpsClient, initShopifyClient, initTextClient, initVercelClient, livechatClientInstance, mailchimpClientInstance, neonClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, shopifyClientInstance, textClientInstance, updateGithubClient, updateMailchimpClient, updateNeonClient, updateNetlifyClient, updatePlanetScaleClient, updatePlatformAdapterClient, updateShopifyClient, updateVercelClient, vercelClientInstance };
|
|
3229
|
+
export { API_NOTIFICATIONS, AccountDto, AccountsApiError, AdapterApiError, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentConfigurationDto, AgentDto, ApiError, ApiErrorBase, ApiErrorKind, ApiErrorName, ApiErrorSource, AppAuthorizationData, AppBaseData, AppBaseTemplate, AppDeployment, AppDeploymentBlock, AppDeploymentBlockConfig, AppDeploymentData, AppDeploymentProvider, AppDisplayData, AppEventDto, AppGitHubRepository, AppGitHubRepositoryConfig, AppInfrastructureBlocks, AppManifest, AppMonetizationData, AppMonitoringCustomReport, AppMonitoringCustomReportDataDto, AppMonitoringEvent, AppMonitoringEventData, AppMonitoringEventsLog, AppMonitoringEventsLogItem, AppMonitoringEventsReportDto, AppMonitoringReportParams, AppMonitoringUptimeReportDto, AppNeonStorage, AppNeonStorageConfig, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppPropertiesData, AppPropertyData, AppRepository, AppRepositoryBlock, AppRepositoryBlockConfig, AppRepositoryData, AppRepositoryProvider, AppRepositoryTarget, AppRepositoryTemplate, AppRepositoryTemplates, AppResourceDto, AppStatsDto, AppStorage, AppStorageBlock, AppStorageBlockConfig, AppStorageData, AppStorageProvider, AppTemplate, AppTemplates, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppWidgetData, AppWidgetsData, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationChatBooster, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, ApplicationWidget, AuthorizeData, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppVariablePayload, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, DeveloperLedgerParams, DpsApiError, EditAppVariablePayload, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, GetVercelProjectsResult, GitHubAuthorizeAppActionResult, GitHubAuthorizeFlowContext, GitHubAuthorizeFlowResult, GitHubAuthorizeOauthActionResult, GitHubInstallActionContext, GitHubInstallActionResult, GitHubInstallFlowContext, GitHubInstallFlowResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryIssue, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientAuthorization, GithubClientOptions, IntegrationFlowContext, IntegrationFlowOutput, IssueLabel, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppStorageData, LinkAppStorageNeonData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LiveChatClientAuthorization, LiveChatClientOptions, LiveChatConfigurationApiError, LivechatApiError, MailchimpApiError, MailchimpAuthorizeActionResult, MailchimpAuthorizeFlowContext, MailchimpAuthorizeFlowResult, MailchimpClientAuthorization, MailchimpClientInstanceOptions, MailchimpListWebhook, MyAccountDto, NeonAuthorizeActionResult, NeonAuthorizeFlowContext, NeonAuthorizeFlowResult, NeonClientAuthorization, NeonClientOptions, NeonProjectBranchDto, NeonProjectBranchesDto, NeonProjectDatabaseDto, NeonProjectDatabasesDto, NeonProjectDto, NeonProjectRoleDto, NeonProjectRolesDto, NeonProjectWithConnectionUriDto, NeonProjectsDto, NeonUser, NetlifyAccount, NetlifyAuthorizeActionResult, NetlifyAuthorizeFlowContext, NetlifyAuthorizeFlowResult, NetlifyClientAuthorization, NetlifyClientOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifyInstallActionContext, NetlifyInstallActionResult, NetlifyInstallFlowContext, NetlifyInstallFlowResult, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleAuthorizeActionResult, PlanetScaleAuthorizeFlowContext, PlanetScaleAuthorizeFlowResult, PlanetScaleClientAuthorization, PlanetScaleClientOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientAuthorization, PlatformAdapterClientOptions, PlatformBillingClientAuthorization, PlatformBillingClientOptions, PlatformClientAuthorization, PlatformDpsClientAuthorization, PlatformDpsClientOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, PushAppPayload, PushAppResult, PushAppSaga, PushAppSagaAuthorizationStep, PushAppSagaBaseStep, PushAppSagaDeploymentStep, PushAppSagaDisplayStep, PushAppSagaMonetizationStep, PushAppSagaPropertiesStep, PushAppSagaRepositoryStep, PushAppSagaStorageStep, PushAppSagaWidgetsStep, RemoveAppAuthorizationPayload, RemoveAppMonetizationPayload, RemoveAppPropertiesPayload, RemoveAppPropertyPayload, RemoveAppWidgetPayload, RemoveAppWidgetsPayload, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, Saga, SagaInput, SagaOutput, SagaStep, SagaStepChanges, SagaStepComparer, SagaStepPropertyCompareResult, SagaStepStatus, SagaStepsSchema, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, ShopifyApiError, ShopifyAuthorizeActionContext, ShopifyAuthorizeActionResult, ShopifyAuthorizeFlowContext, ShopifyAuthorizeFlowResult, ShopifyClientAuthorization, ShopifyClientOptions, ShortcutDto, SyncAppVariablePayload, TextClientAuthorization, TextClientOptions, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnlinkAppDeploymentData, UnlinkAppDeploymentPayload, UnlinkAppRepositoryData, UnlinkAppRepositoryPayload, UnlinkAppStorageData, UnlinkAppStoragePayload, UpdateAppAuthorizationPayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppDeploymentPayload, UpsertAppMonetizationPayload, UpsertAppPropertiesPayload, UpsertAppPropertyPayload, UpsertAppRepositoryPayload, UpsertAppResourcePayload, UpsertAppStoragePayload, UpsertAppWidgetPayload, UpsertAppWidgetsPayload, UpsertApplicationChatBoosterPayload, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNeonIntegrationDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserVercelIntegrationDto, VercelAuthorizeFlowContext, VercelAuthorizeFlowResult, VercelClientAuthorization, VercelClientOptions, VercelConnectActionContext, VercelConnectActionResult, VercelDeploy, VercelInstallActionContext, VercelInstallActionResult, VercelInstallFlowContext, VercelInstallFlowResult, VercelIntegrateActionResult, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, VerifyAppPayload, VerifyAppResult, Webhook, WebhookDto, allAppTemplates, api, appBaseTemplates, appRepositoryTemplates, appRepositoryTemplatesMap, appTemplates, appTemplatesMap, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientConfig, getIntegrationFlowUrl, getLiveChatClientAuthorization, getLiveChatClientConfig, getMailchimpClientAuthorization, getMailchimpClientConfig, getMailchimpClientUrl, getNeonClientAuthorization, getNeonClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformAdapterClientDefaultConfig, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getShopifyClientAuthorization, getShopifyClientConfig, getShopifyClientUrl, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClient, initLiveChatClient, initMailchimpClient, initNeonClient, initNetlifyClient, initPlanetScaleClient, initPlatformAccountsClient, initPlatformAdapterClient, initPlatformBillingClient, initPlatformDpsClient, initShopifyClient, initTextClient, initVercelClient, livechatClientInstance, mailchimpClientInstance, neonClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, shopifyClientInstance, textClientInstance, updateGithubClient, updateMailchimpClient, updateNeonClient, updateNetlifyClient, updatePlanetScaleClient, updatePlatformAdapterClient, updateShopifyClient, updateVercelClient, vercelClientInstance };
|
package/dist/index.js
CHANGED
|
@@ -72,6 +72,7 @@ __export(src_exports, {
|
|
|
72
72
|
AdapterApiError: () => AdapterApiError,
|
|
73
73
|
ApiErrorBase: () => ApiErrorBase,
|
|
74
74
|
DpsApiError: () => DpsApiError,
|
|
75
|
+
LivechatApiError: () => LivechatApiError,
|
|
75
76
|
MailchimpApiError: () => MailchimpApiError,
|
|
76
77
|
ShopifyApiError: () => ShopifyApiError,
|
|
77
78
|
UnauthorizeApiError: () => UnauthorizeApiError,
|
|
@@ -207,6 +208,12 @@ githubClientInstance.interceptors.response.use(
|
|
|
207
208
|
}
|
|
208
209
|
);
|
|
209
210
|
function getGitHubClientAuthorization(req) {
|
|
211
|
+
if (req.headers instanceof Headers) {
|
|
212
|
+
return {
|
|
213
|
+
appToken: req.headers.get("github-app-token"),
|
|
214
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
215
|
+
};
|
|
216
|
+
}
|
|
210
217
|
return {
|
|
211
218
|
appToken: req.headers["github-app-token"],
|
|
212
219
|
oauthToken: req.headers["github-oauth-token"]
|
|
@@ -664,6 +671,11 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
664
671
|
}
|
|
665
672
|
);
|
|
666
673
|
function getNetlifyClientAuthorization(req) {
|
|
674
|
+
if (req.headers instanceof Headers) {
|
|
675
|
+
return {
|
|
676
|
+
token: req.headers.get("netlify-token")
|
|
677
|
+
};
|
|
678
|
+
}
|
|
667
679
|
return {
|
|
668
680
|
token: req.headers["netlify-token"]
|
|
669
681
|
};
|
|
@@ -1123,6 +1135,11 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
1123
1135
|
}
|
|
1124
1136
|
);
|
|
1125
1137
|
function getPlanetScaleClientAuthorization(req) {
|
|
1138
|
+
if (req.headers instanceof Headers) {
|
|
1139
|
+
return {
|
|
1140
|
+
token: req.headers.get("planetscale-token")
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1126
1143
|
return {
|
|
1127
1144
|
token: req.headers["planetscale-token"]
|
|
1128
1145
|
};
|
|
@@ -1335,6 +1352,12 @@ var textClientInstance = import_axios8.default.create({
|
|
|
1335
1352
|
baseURL: "https://api.labs.text.com"
|
|
1336
1353
|
});
|
|
1337
1354
|
function getTextClientAuthorization(req) {
|
|
1355
|
+
if (req.headers instanceof Headers) {
|
|
1356
|
+
return {
|
|
1357
|
+
token: req.headers.get("platform-token"),
|
|
1358
|
+
tokenType: "Bearer"
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1338
1361
|
return {
|
|
1339
1362
|
token: req.headers["platform-token"],
|
|
1340
1363
|
tokenType: "Bearer"
|
|
@@ -1754,6 +1777,11 @@ vercelClientInstance.interceptors.response.use(
|
|
|
1754
1777
|
}
|
|
1755
1778
|
);
|
|
1756
1779
|
function getVercelClientAuthorization(req) {
|
|
1780
|
+
if (req.headers instanceof Headers) {
|
|
1781
|
+
return {
|
|
1782
|
+
token: req.headers.get("vercel-token")
|
|
1783
|
+
};
|
|
1784
|
+
}
|
|
1757
1785
|
return {
|
|
1758
1786
|
token: req.headers["vercel-token"]
|
|
1759
1787
|
};
|
|
@@ -2073,6 +2101,11 @@ neonClientInstance.interceptors.response.use(
|
|
|
2073
2101
|
}
|
|
2074
2102
|
);
|
|
2075
2103
|
function getNeonClientAuthorization(req) {
|
|
2104
|
+
if (req.headers instanceof Headers) {
|
|
2105
|
+
return {
|
|
2106
|
+
token: req.headers.get("neon-token")
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2076
2109
|
return {
|
|
2077
2110
|
token: req.headers["neon-token"]
|
|
2078
2111
|
};
|
|
@@ -2401,6 +2434,12 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
2401
2434
|
}
|
|
2402
2435
|
);
|
|
2403
2436
|
function getMailchimpClientAuthorization(req) {
|
|
2437
|
+
if (req.headers instanceof Headers) {
|
|
2438
|
+
return {
|
|
2439
|
+
server: req.headers.get("mailchimp-server"),
|
|
2440
|
+
token: req.headers.get("mailchimp-token")
|
|
2441
|
+
};
|
|
2442
|
+
}
|
|
2404
2443
|
return {
|
|
2405
2444
|
server: req.headers["mailchimp-server"],
|
|
2406
2445
|
token: req.headers["mailchimp-token"]
|
|
@@ -2566,6 +2605,12 @@ shopifyClientInstance.interceptors.response.use(
|
|
|
2566
2605
|
);
|
|
2567
2606
|
var getShopifyClientUrl = (store) => `https://${store}.myshopify.com/admin/api/2024-04`;
|
|
2568
2607
|
function getShopifyClientAuthorization(req) {
|
|
2608
|
+
if (req.headers instanceof Headers) {
|
|
2609
|
+
return {
|
|
2610
|
+
shop: req.headers.get("shopify-shop"),
|
|
2611
|
+
token: req.headers.get("shopify-token")
|
|
2612
|
+
};
|
|
2613
|
+
}
|
|
2569
2614
|
return {
|
|
2570
2615
|
shop: req.headers["shopify-shop"],
|
|
2571
2616
|
token: req.headers["shopify-token"]
|
|
@@ -2704,10 +2749,37 @@ var getRegion = (token) => {
|
|
|
2704
2749
|
return region;
|
|
2705
2750
|
}
|
|
2706
2751
|
};
|
|
2752
|
+
var LivechatApiError = class extends ApiErrorBase {
|
|
2753
|
+
constructor() {
|
|
2754
|
+
super(...arguments);
|
|
2755
|
+
this.name = "livechat";
|
|
2756
|
+
}
|
|
2757
|
+
};
|
|
2707
2758
|
var livechatClientInstance = import_axios17.default.create({
|
|
2708
2759
|
baseURL: "https://api.labs.livechatinc.com"
|
|
2709
2760
|
});
|
|
2761
|
+
livechatClientInstance.interceptors.response.use(
|
|
2762
|
+
(response) => response,
|
|
2763
|
+
(error) => {
|
|
2764
|
+
var _a, _b, _c, _d;
|
|
2765
|
+
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2766
|
+
return Promise.reject(new UnauthorizeApiError("accounts"));
|
|
2767
|
+
}
|
|
2768
|
+
return Promise.reject(
|
|
2769
|
+
new LivechatApiError(
|
|
2770
|
+
error.message,
|
|
2771
|
+
(_b = error.response) == null ? void 0 : _b.data,
|
|
2772
|
+
(_d = (_c = error.response) == null ? void 0 : _c.status) != null ? _d : 400
|
|
2773
|
+
)
|
|
2774
|
+
);
|
|
2775
|
+
}
|
|
2776
|
+
);
|
|
2710
2777
|
function getLiveChatClientAuthorization(req) {
|
|
2778
|
+
if (req.headers instanceof Headers) {
|
|
2779
|
+
return {
|
|
2780
|
+
token: req.headers.get("platform-token")
|
|
2781
|
+
};
|
|
2782
|
+
}
|
|
2711
2783
|
return {
|
|
2712
2784
|
token: req.headers["platform-token"]
|
|
2713
2785
|
};
|
|
@@ -3006,8 +3078,8 @@ var livechatWebhookApi = {
|
|
|
3006
3078
|
);
|
|
3007
3079
|
return response;
|
|
3008
3080
|
} catch (error) {
|
|
3009
|
-
if (error instanceof
|
|
3010
|
-
throw
|
|
3081
|
+
if (error instanceof LivechatApiError) {
|
|
3082
|
+
throw error.withCustomMessage(
|
|
3011
3083
|
`Registered Webhooks couldn't be fetched. [${error.message}]`
|
|
3012
3084
|
);
|
|
3013
3085
|
} else {
|
|
@@ -3029,8 +3101,8 @@ var livechatWebhookApi = {
|
|
|
3029
3101
|
);
|
|
3030
3102
|
return response;
|
|
3031
3103
|
} catch (error) {
|
|
3032
|
-
if (error instanceof
|
|
3033
|
-
throw
|
|
3104
|
+
if (error instanceof LivechatApiError) {
|
|
3105
|
+
throw error.withCustomMessage(
|
|
3034
3106
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3035
3107
|
);
|
|
3036
3108
|
} else {
|
|
@@ -3042,7 +3114,11 @@ var livechatWebhookApi = {
|
|
|
3042
3114
|
unregisterWebhooks(clientId, authorization) {
|
|
3043
3115
|
return __async(this, null, function* () {
|
|
3044
3116
|
try {
|
|
3045
|
-
const { data: webhooks } = yield this.getWebhooks(
|
|
3117
|
+
const { data: webhooks } = yield this.getWebhooks(
|
|
3118
|
+
clientId,
|
|
3119
|
+
void 0,
|
|
3120
|
+
authorization
|
|
3121
|
+
);
|
|
3046
3122
|
yield Promise.all(
|
|
3047
3123
|
webhooks.map((webhook) => __async(this, null, function* () {
|
|
3048
3124
|
return livechatClientInstance.post(
|
|
@@ -3056,8 +3132,8 @@ var livechatWebhookApi = {
|
|
|
3056
3132
|
}))
|
|
3057
3133
|
);
|
|
3058
3134
|
} catch (error) {
|
|
3059
|
-
if (error instanceof
|
|
3060
|
-
throw
|
|
3135
|
+
if (error instanceof LivechatApiError) {
|
|
3136
|
+
throw error.withCustomMessage(
|
|
3061
3137
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3062
3138
|
);
|
|
3063
3139
|
} else {
|
|
@@ -3066,10 +3142,31 @@ var livechatWebhookApi = {
|
|
|
3066
3142
|
}
|
|
3067
3143
|
});
|
|
3068
3144
|
},
|
|
3145
|
+
registerWebhook(webhook, authorization) {
|
|
3146
|
+
return __async(this, null, function* () {
|
|
3147
|
+
yield livechatClientInstance.post(
|
|
3148
|
+
`/v${webhook.api_version || "3.5"}/configuration/action/register_webhook`,
|
|
3149
|
+
{
|
|
3150
|
+
url: webhook.url,
|
|
3151
|
+
action: webhook.action,
|
|
3152
|
+
secret_key: webhook.secret_key,
|
|
3153
|
+
owner_client_id: webhook.owner_client_id,
|
|
3154
|
+
type: webhook.type,
|
|
3155
|
+
description: webhook.description,
|
|
3156
|
+
filters: webhook.filters
|
|
3157
|
+
},
|
|
3158
|
+
getLiveChatClientConfig(authorization)
|
|
3159
|
+
).catch((error) => {
|
|
3160
|
+
throw error.withCustomMessage(
|
|
3161
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3162
|
+
);
|
|
3163
|
+
});
|
|
3164
|
+
});
|
|
3165
|
+
},
|
|
3069
3166
|
registerWebhooks(webhooks, authorization) {
|
|
3070
3167
|
return __async(this, null, function* () {
|
|
3071
3168
|
try {
|
|
3072
|
-
yield this.unregisterWebhooks(webhooks[0].owner_client_id);
|
|
3169
|
+
yield this.unregisterWebhooks(webhooks[0].owner_client_id, authorization);
|
|
3073
3170
|
yield Promise.all(
|
|
3074
3171
|
webhooks.map((webhook) => __async(this, null, function* () {
|
|
3075
3172
|
return livechatClientInstance.post(
|
|
@@ -3088,8 +3185,8 @@ var livechatWebhookApi = {
|
|
|
3088
3185
|
}))
|
|
3089
3186
|
);
|
|
3090
3187
|
} catch (error) {
|
|
3091
|
-
if (error instanceof
|
|
3092
|
-
throw
|
|
3188
|
+
if (error instanceof LivechatApiError) {
|
|
3189
|
+
throw error.withCustomMessage(
|
|
3093
3190
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3094
3191
|
);
|
|
3095
3192
|
} else {
|
|
@@ -3127,9 +3224,9 @@ var livechatWebhookApi = {
|
|
|
3127
3224
|
getLiveChatClientConfig(authorization)
|
|
3128
3225
|
);
|
|
3129
3226
|
} catch (error) {
|
|
3130
|
-
if (error instanceof
|
|
3131
|
-
throw
|
|
3132
|
-
`Migration failed. It looks like one of the webhooks you're trying to migrate doesn't exist in the new version or exists under a different name. Migrate the webhook manually via the Configuration API
|
|
3227
|
+
if (error instanceof LivechatApiError) {
|
|
3228
|
+
throw error.withCustomMessage(
|
|
3229
|
+
`Migration failed. It looks like one of the webhooks you're trying to migrate doesn't exist in the new version or exists under a different name. Migrate the webhook manually via the Configuration API.`
|
|
3133
3230
|
);
|
|
3134
3231
|
} else {
|
|
3135
3232
|
throw error;
|
|
@@ -3152,8 +3249,8 @@ var livechatWebhookApi = {
|
|
|
3152
3249
|
);
|
|
3153
3250
|
return response;
|
|
3154
3251
|
} catch (error) {
|
|
3155
|
-
if (error instanceof
|
|
3156
|
-
throw
|
|
3252
|
+
if (error instanceof LivechatApiError) {
|
|
3253
|
+
throw error.withCustomMessage(
|
|
3157
3254
|
`Registered Webhooks couldn't be fetched. [${error.message}]`
|
|
3158
3255
|
);
|
|
3159
3256
|
} else {
|
|
@@ -3172,8 +3269,8 @@ var livechatWebhookApi = {
|
|
|
3172
3269
|
);
|
|
3173
3270
|
return response;
|
|
3174
3271
|
} catch (error) {
|
|
3175
|
-
if (error instanceof
|
|
3176
|
-
throw
|
|
3272
|
+
if (error instanceof LivechatApiError) {
|
|
3273
|
+
throw error.withCustomMessage(
|
|
3177
3274
|
`Registered Webhooks couldn't be deleted. [${error.message}]`
|
|
3178
3275
|
);
|
|
3179
3276
|
} else {
|
|
@@ -3250,6 +3347,11 @@ platformAccountsClientInstance.interceptors.response.use(
|
|
|
3250
3347
|
}
|
|
3251
3348
|
);
|
|
3252
3349
|
function getPlatformAccountsClientAuthorization(req) {
|
|
3350
|
+
if (req.headers instanceof Headers) {
|
|
3351
|
+
return {
|
|
3352
|
+
token: req.headers.get("platform-token")
|
|
3353
|
+
};
|
|
3354
|
+
}
|
|
3253
3355
|
return {
|
|
3254
3356
|
token: req.headers["platform-token"]
|
|
3255
3357
|
};
|
|
@@ -3587,6 +3689,12 @@ platformDpsClientInstance.interceptors.response.use(
|
|
|
3587
3689
|
}
|
|
3588
3690
|
);
|
|
3589
3691
|
function getPlatformDpsClientAuthorization(req) {
|
|
3692
|
+
if (req.headers instanceof Headers) {
|
|
3693
|
+
return {
|
|
3694
|
+
token: req.headers.get("platform-token"),
|
|
3695
|
+
tokenType: "Bearer"
|
|
3696
|
+
};
|
|
3697
|
+
}
|
|
3590
3698
|
return {
|
|
3591
3699
|
token: req.headers["platform-token"],
|
|
3592
3700
|
tokenType: "Bearer"
|
|
@@ -5169,6 +5277,37 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5169
5277
|
}
|
|
5170
5278
|
);
|
|
5171
5279
|
function getPlatformAdapterClientAuthorization(req) {
|
|
5280
|
+
if (req.headers instanceof Headers) {
|
|
5281
|
+
return {
|
|
5282
|
+
platform: {
|
|
5283
|
+
token: req.headers.get("platform-token")
|
|
5284
|
+
},
|
|
5285
|
+
github: {
|
|
5286
|
+
appToken: req.headers.get("github-app-token"),
|
|
5287
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
5288
|
+
},
|
|
5289
|
+
netlify: {
|
|
5290
|
+
token: req.headers.get("netlify-token")
|
|
5291
|
+
},
|
|
5292
|
+
vercel: {
|
|
5293
|
+
token: req.headers.get("vercel-token")
|
|
5294
|
+
},
|
|
5295
|
+
planetscale: {
|
|
5296
|
+
token: req.headers.get("planetscale-token")
|
|
5297
|
+
},
|
|
5298
|
+
neon: {
|
|
5299
|
+
token: req.headers.get("neon-token")
|
|
5300
|
+
},
|
|
5301
|
+
mailchimp: {
|
|
5302
|
+
token: req.headers.get("mailchimp-token"),
|
|
5303
|
+
server: req.headers.get("mailchimp-server")
|
|
5304
|
+
},
|
|
5305
|
+
shopify: {
|
|
5306
|
+
token: req.headers.get("shopify-token"),
|
|
5307
|
+
shop: req.headers.get("shopify-shop")
|
|
5308
|
+
}
|
|
5309
|
+
};
|
|
5310
|
+
}
|
|
5172
5311
|
return {
|
|
5173
5312
|
platform: {
|
|
5174
5313
|
token: req.headers["platform-token"]
|
|
@@ -5803,6 +5942,11 @@ var platformBillingClientInstance = import_axios21.default.create({
|
|
|
5803
5942
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
5804
5943
|
});
|
|
5805
5944
|
function getPlatformBillingClientAuthorization(req) {
|
|
5945
|
+
if (req.headers instanceof Headers) {
|
|
5946
|
+
return {
|
|
5947
|
+
token: req.headers.get("platform-token")
|
|
5948
|
+
};
|
|
5949
|
+
}
|
|
5806
5950
|
return {
|
|
5807
5951
|
token: req.headers["platform-token"]
|
|
5808
5952
|
};
|
|
@@ -6061,6 +6205,7 @@ function getIntegrationFlowUrl(provider, flow, data, context, config) {
|
|
|
6061
6205
|
AdapterApiError,
|
|
6062
6206
|
ApiErrorBase,
|
|
6063
6207
|
DpsApiError,
|
|
6208
|
+
LivechatApiError,
|
|
6064
6209
|
MailchimpApiError,
|
|
6065
6210
|
ShopifyApiError,
|
|
6066
6211
|
UnauthorizeApiError,
|
package/dist/index.mjs
CHANGED
|
@@ -91,6 +91,12 @@ githubClientInstance.interceptors.response.use(
|
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
function getGitHubClientAuthorization(req) {
|
|
94
|
+
if (req.headers instanceof Headers) {
|
|
95
|
+
return {
|
|
96
|
+
appToken: req.headers.get("github-app-token"),
|
|
97
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
98
|
+
};
|
|
99
|
+
}
|
|
94
100
|
return {
|
|
95
101
|
appToken: req.headers["github-app-token"],
|
|
96
102
|
oauthToken: req.headers["github-oauth-token"]
|
|
@@ -548,6 +554,11 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
548
554
|
}
|
|
549
555
|
);
|
|
550
556
|
function getNetlifyClientAuthorization(req) {
|
|
557
|
+
if (req.headers instanceof Headers) {
|
|
558
|
+
return {
|
|
559
|
+
token: req.headers.get("netlify-token")
|
|
560
|
+
};
|
|
561
|
+
}
|
|
551
562
|
return {
|
|
552
563
|
token: req.headers["netlify-token"]
|
|
553
564
|
};
|
|
@@ -1007,6 +1018,11 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
1007
1018
|
}
|
|
1008
1019
|
);
|
|
1009
1020
|
function getPlanetScaleClientAuthorization(req) {
|
|
1021
|
+
if (req.headers instanceof Headers) {
|
|
1022
|
+
return {
|
|
1023
|
+
token: req.headers.get("planetscale-token")
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1010
1026
|
return {
|
|
1011
1027
|
token: req.headers["planetscale-token"]
|
|
1012
1028
|
};
|
|
@@ -1219,6 +1235,12 @@ var textClientInstance = axios6.create({
|
|
|
1219
1235
|
baseURL: "https://api.labs.text.com"
|
|
1220
1236
|
});
|
|
1221
1237
|
function getTextClientAuthorization(req) {
|
|
1238
|
+
if (req.headers instanceof Headers) {
|
|
1239
|
+
return {
|
|
1240
|
+
token: req.headers.get("platform-token"),
|
|
1241
|
+
tokenType: "Bearer"
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1222
1244
|
return {
|
|
1223
1245
|
token: req.headers["platform-token"],
|
|
1224
1246
|
tokenType: "Bearer"
|
|
@@ -1638,6 +1660,11 @@ vercelClientInstance.interceptors.response.use(
|
|
|
1638
1660
|
}
|
|
1639
1661
|
);
|
|
1640
1662
|
function getVercelClientAuthorization(req) {
|
|
1663
|
+
if (req.headers instanceof Headers) {
|
|
1664
|
+
return {
|
|
1665
|
+
token: req.headers.get("vercel-token")
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1641
1668
|
return {
|
|
1642
1669
|
token: req.headers["vercel-token"]
|
|
1643
1670
|
};
|
|
@@ -1957,6 +1984,11 @@ neonClientInstance.interceptors.response.use(
|
|
|
1957
1984
|
}
|
|
1958
1985
|
);
|
|
1959
1986
|
function getNeonClientAuthorization(req) {
|
|
1987
|
+
if (req.headers instanceof Headers) {
|
|
1988
|
+
return {
|
|
1989
|
+
token: req.headers.get("neon-token")
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1960
1992
|
return {
|
|
1961
1993
|
token: req.headers["neon-token"]
|
|
1962
1994
|
};
|
|
@@ -2285,6 +2317,12 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
2285
2317
|
}
|
|
2286
2318
|
);
|
|
2287
2319
|
function getMailchimpClientAuthorization(req) {
|
|
2320
|
+
if (req.headers instanceof Headers) {
|
|
2321
|
+
return {
|
|
2322
|
+
server: req.headers.get("mailchimp-server"),
|
|
2323
|
+
token: req.headers.get("mailchimp-token")
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
2288
2326
|
return {
|
|
2289
2327
|
server: req.headers["mailchimp-server"],
|
|
2290
2328
|
token: req.headers["mailchimp-token"]
|
|
@@ -2450,6 +2488,12 @@ shopifyClientInstance.interceptors.response.use(
|
|
|
2450
2488
|
);
|
|
2451
2489
|
var getShopifyClientUrl = (store) => `https://${store}.myshopify.com/admin/api/2024-04`;
|
|
2452
2490
|
function getShopifyClientAuthorization(req) {
|
|
2491
|
+
if (req.headers instanceof Headers) {
|
|
2492
|
+
return {
|
|
2493
|
+
shop: req.headers.get("shopify-shop"),
|
|
2494
|
+
token: req.headers.get("shopify-token")
|
|
2495
|
+
};
|
|
2496
|
+
}
|
|
2453
2497
|
return {
|
|
2454
2498
|
shop: req.headers["shopify-shop"],
|
|
2455
2499
|
token: req.headers["shopify-token"]
|
|
@@ -2588,10 +2632,37 @@ var getRegion = (token) => {
|
|
|
2588
2632
|
return region;
|
|
2589
2633
|
}
|
|
2590
2634
|
};
|
|
2635
|
+
var LivechatApiError = class extends ApiErrorBase {
|
|
2636
|
+
constructor() {
|
|
2637
|
+
super(...arguments);
|
|
2638
|
+
this.name = "livechat";
|
|
2639
|
+
}
|
|
2640
|
+
};
|
|
2591
2641
|
var livechatClientInstance = axios15.create({
|
|
2592
2642
|
baseURL: "https://api.labs.livechatinc.com"
|
|
2593
2643
|
});
|
|
2644
|
+
livechatClientInstance.interceptors.response.use(
|
|
2645
|
+
(response) => response,
|
|
2646
|
+
(error) => {
|
|
2647
|
+
var _a, _b, _c, _d;
|
|
2648
|
+
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2649
|
+
return Promise.reject(new UnauthorizeApiError("accounts"));
|
|
2650
|
+
}
|
|
2651
|
+
return Promise.reject(
|
|
2652
|
+
new LivechatApiError(
|
|
2653
|
+
error.message,
|
|
2654
|
+
(_b = error.response) == null ? void 0 : _b.data,
|
|
2655
|
+
(_d = (_c = error.response) == null ? void 0 : _c.status) != null ? _d : 400
|
|
2656
|
+
)
|
|
2657
|
+
);
|
|
2658
|
+
}
|
|
2659
|
+
);
|
|
2594
2660
|
function getLiveChatClientAuthorization(req) {
|
|
2661
|
+
if (req.headers instanceof Headers) {
|
|
2662
|
+
return {
|
|
2663
|
+
token: req.headers.get("platform-token")
|
|
2664
|
+
};
|
|
2665
|
+
}
|
|
2595
2666
|
return {
|
|
2596
2667
|
token: req.headers["platform-token"]
|
|
2597
2668
|
};
|
|
@@ -2890,8 +2961,8 @@ var livechatWebhookApi = {
|
|
|
2890
2961
|
);
|
|
2891
2962
|
return response;
|
|
2892
2963
|
} catch (error) {
|
|
2893
|
-
if (error instanceof
|
|
2894
|
-
throw
|
|
2964
|
+
if (error instanceof LivechatApiError) {
|
|
2965
|
+
throw error.withCustomMessage(
|
|
2895
2966
|
`Registered Webhooks couldn't be fetched. [${error.message}]`
|
|
2896
2967
|
);
|
|
2897
2968
|
} else {
|
|
@@ -2913,8 +2984,8 @@ var livechatWebhookApi = {
|
|
|
2913
2984
|
);
|
|
2914
2985
|
return response;
|
|
2915
2986
|
} catch (error) {
|
|
2916
|
-
if (error instanceof
|
|
2917
|
-
throw
|
|
2987
|
+
if (error instanceof LivechatApiError) {
|
|
2988
|
+
throw error.withCustomMessage(
|
|
2918
2989
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
2919
2990
|
);
|
|
2920
2991
|
} else {
|
|
@@ -2926,7 +2997,11 @@ var livechatWebhookApi = {
|
|
|
2926
2997
|
unregisterWebhooks(clientId, authorization) {
|
|
2927
2998
|
return __async(this, null, function* () {
|
|
2928
2999
|
try {
|
|
2929
|
-
const { data: webhooks } = yield this.getWebhooks(
|
|
3000
|
+
const { data: webhooks } = yield this.getWebhooks(
|
|
3001
|
+
clientId,
|
|
3002
|
+
void 0,
|
|
3003
|
+
authorization
|
|
3004
|
+
);
|
|
2930
3005
|
yield Promise.all(
|
|
2931
3006
|
webhooks.map((webhook) => __async(this, null, function* () {
|
|
2932
3007
|
return livechatClientInstance.post(
|
|
@@ -2940,8 +3015,8 @@ var livechatWebhookApi = {
|
|
|
2940
3015
|
}))
|
|
2941
3016
|
);
|
|
2942
3017
|
} catch (error) {
|
|
2943
|
-
if (error instanceof
|
|
2944
|
-
throw
|
|
3018
|
+
if (error instanceof LivechatApiError) {
|
|
3019
|
+
throw error.withCustomMessage(
|
|
2945
3020
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
2946
3021
|
);
|
|
2947
3022
|
} else {
|
|
@@ -2950,10 +3025,31 @@ var livechatWebhookApi = {
|
|
|
2950
3025
|
}
|
|
2951
3026
|
});
|
|
2952
3027
|
},
|
|
3028
|
+
registerWebhook(webhook, authorization) {
|
|
3029
|
+
return __async(this, null, function* () {
|
|
3030
|
+
yield livechatClientInstance.post(
|
|
3031
|
+
`/v${webhook.api_version || "3.5"}/configuration/action/register_webhook`,
|
|
3032
|
+
{
|
|
3033
|
+
url: webhook.url,
|
|
3034
|
+
action: webhook.action,
|
|
3035
|
+
secret_key: webhook.secret_key,
|
|
3036
|
+
owner_client_id: webhook.owner_client_id,
|
|
3037
|
+
type: webhook.type,
|
|
3038
|
+
description: webhook.description,
|
|
3039
|
+
filters: webhook.filters
|
|
3040
|
+
},
|
|
3041
|
+
getLiveChatClientConfig(authorization)
|
|
3042
|
+
).catch((error) => {
|
|
3043
|
+
throw error.withCustomMessage(
|
|
3044
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3045
|
+
);
|
|
3046
|
+
});
|
|
3047
|
+
});
|
|
3048
|
+
},
|
|
2953
3049
|
registerWebhooks(webhooks, authorization) {
|
|
2954
3050
|
return __async(this, null, function* () {
|
|
2955
3051
|
try {
|
|
2956
|
-
yield this.unregisterWebhooks(webhooks[0].owner_client_id);
|
|
3052
|
+
yield this.unregisterWebhooks(webhooks[0].owner_client_id, authorization);
|
|
2957
3053
|
yield Promise.all(
|
|
2958
3054
|
webhooks.map((webhook) => __async(this, null, function* () {
|
|
2959
3055
|
return livechatClientInstance.post(
|
|
@@ -2972,8 +3068,8 @@ var livechatWebhookApi = {
|
|
|
2972
3068
|
}))
|
|
2973
3069
|
);
|
|
2974
3070
|
} catch (error) {
|
|
2975
|
-
if (error instanceof
|
|
2976
|
-
throw
|
|
3071
|
+
if (error instanceof LivechatApiError) {
|
|
3072
|
+
throw error.withCustomMessage(
|
|
2977
3073
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
2978
3074
|
);
|
|
2979
3075
|
} else {
|
|
@@ -3011,9 +3107,9 @@ var livechatWebhookApi = {
|
|
|
3011
3107
|
getLiveChatClientConfig(authorization)
|
|
3012
3108
|
);
|
|
3013
3109
|
} catch (error) {
|
|
3014
|
-
if (error instanceof
|
|
3015
|
-
throw
|
|
3016
|
-
`Migration failed. It looks like one of the webhooks you're trying to migrate doesn't exist in the new version or exists under a different name. Migrate the webhook manually via the Configuration API
|
|
3110
|
+
if (error instanceof LivechatApiError) {
|
|
3111
|
+
throw error.withCustomMessage(
|
|
3112
|
+
`Migration failed. It looks like one of the webhooks you're trying to migrate doesn't exist in the new version or exists under a different name. Migrate the webhook manually via the Configuration API.`
|
|
3017
3113
|
);
|
|
3018
3114
|
} else {
|
|
3019
3115
|
throw error;
|
|
@@ -3036,8 +3132,8 @@ var livechatWebhookApi = {
|
|
|
3036
3132
|
);
|
|
3037
3133
|
return response;
|
|
3038
3134
|
} catch (error) {
|
|
3039
|
-
if (error instanceof
|
|
3040
|
-
throw
|
|
3135
|
+
if (error instanceof LivechatApiError) {
|
|
3136
|
+
throw error.withCustomMessage(
|
|
3041
3137
|
`Registered Webhooks couldn't be fetched. [${error.message}]`
|
|
3042
3138
|
);
|
|
3043
3139
|
} else {
|
|
@@ -3056,8 +3152,8 @@ var livechatWebhookApi = {
|
|
|
3056
3152
|
);
|
|
3057
3153
|
return response;
|
|
3058
3154
|
} catch (error) {
|
|
3059
|
-
if (error instanceof
|
|
3060
|
-
throw
|
|
3155
|
+
if (error instanceof LivechatApiError) {
|
|
3156
|
+
throw error.withCustomMessage(
|
|
3061
3157
|
`Registered Webhooks couldn't be deleted. [${error.message}]`
|
|
3062
3158
|
);
|
|
3063
3159
|
} else {
|
|
@@ -3134,6 +3230,11 @@ platformAccountsClientInstance.interceptors.response.use(
|
|
|
3134
3230
|
}
|
|
3135
3231
|
);
|
|
3136
3232
|
function getPlatformAccountsClientAuthorization(req) {
|
|
3233
|
+
if (req.headers instanceof Headers) {
|
|
3234
|
+
return {
|
|
3235
|
+
token: req.headers.get("platform-token")
|
|
3236
|
+
};
|
|
3237
|
+
}
|
|
3137
3238
|
return {
|
|
3138
3239
|
token: req.headers["platform-token"]
|
|
3139
3240
|
};
|
|
@@ -3471,6 +3572,12 @@ platformDpsClientInstance.interceptors.response.use(
|
|
|
3471
3572
|
}
|
|
3472
3573
|
);
|
|
3473
3574
|
function getPlatformDpsClientAuthorization(req) {
|
|
3575
|
+
if (req.headers instanceof Headers) {
|
|
3576
|
+
return {
|
|
3577
|
+
token: req.headers.get("platform-token"),
|
|
3578
|
+
tokenType: "Bearer"
|
|
3579
|
+
};
|
|
3580
|
+
}
|
|
3474
3581
|
return {
|
|
3475
3582
|
token: req.headers["platform-token"],
|
|
3476
3583
|
tokenType: "Bearer"
|
|
@@ -5053,6 +5160,37 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5053
5160
|
}
|
|
5054
5161
|
);
|
|
5055
5162
|
function getPlatformAdapterClientAuthorization(req) {
|
|
5163
|
+
if (req.headers instanceof Headers) {
|
|
5164
|
+
return {
|
|
5165
|
+
platform: {
|
|
5166
|
+
token: req.headers.get("platform-token")
|
|
5167
|
+
},
|
|
5168
|
+
github: {
|
|
5169
|
+
appToken: req.headers.get("github-app-token"),
|
|
5170
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
5171
|
+
},
|
|
5172
|
+
netlify: {
|
|
5173
|
+
token: req.headers.get("netlify-token")
|
|
5174
|
+
},
|
|
5175
|
+
vercel: {
|
|
5176
|
+
token: req.headers.get("vercel-token")
|
|
5177
|
+
},
|
|
5178
|
+
planetscale: {
|
|
5179
|
+
token: req.headers.get("planetscale-token")
|
|
5180
|
+
},
|
|
5181
|
+
neon: {
|
|
5182
|
+
token: req.headers.get("neon-token")
|
|
5183
|
+
},
|
|
5184
|
+
mailchimp: {
|
|
5185
|
+
token: req.headers.get("mailchimp-token"),
|
|
5186
|
+
server: req.headers.get("mailchimp-server")
|
|
5187
|
+
},
|
|
5188
|
+
shopify: {
|
|
5189
|
+
token: req.headers.get("shopify-token"),
|
|
5190
|
+
shop: req.headers.get("shopify-shop")
|
|
5191
|
+
}
|
|
5192
|
+
};
|
|
5193
|
+
}
|
|
5056
5194
|
return {
|
|
5057
5195
|
platform: {
|
|
5058
5196
|
token: req.headers["platform-token"]
|
|
@@ -5687,6 +5825,11 @@ var platformBillingClientInstance = axios19.create({
|
|
|
5687
5825
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
5688
5826
|
});
|
|
5689
5827
|
function getPlatformBillingClientAuthorization(req) {
|
|
5828
|
+
if (req.headers instanceof Headers) {
|
|
5829
|
+
return {
|
|
5830
|
+
token: req.headers.get("platform-token")
|
|
5831
|
+
};
|
|
5832
|
+
}
|
|
5690
5833
|
return {
|
|
5691
5834
|
token: req.headers["platform-token"]
|
|
5692
5835
|
};
|
|
@@ -5944,6 +6087,7 @@ export {
|
|
|
5944
6087
|
AdapterApiError,
|
|
5945
6088
|
ApiErrorBase,
|
|
5946
6089
|
DpsApiError,
|
|
6090
|
+
LivechatApiError,
|
|
5947
6091
|
MailchimpApiError,
|
|
5948
6092
|
ShopifyApiError,
|
|
5949
6093
|
UnauthorizeApiError,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.48",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@types/node": "^17.0.12",
|
|
20
20
|
"tsup": "^7.1.0",
|
|
21
21
|
"typescript": "^5.1.6",
|
|
22
|
-
"eslint-config-custom": "0.0.7",
|
|
23
22
|
"tsconfig": "0.0.1",
|
|
23
|
+
"eslint-config-custom": "0.0.8",
|
|
24
24
|
"utils": "0.0.4"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|