@livechat/developer-studio-api 2.0.24 → 2.0.26
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 +35 -23
- package/dist/index.d.ts +35 -23
- package/dist/index.js +87 -73
- package/dist/index.mjs +83 -73
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
|
-
interface TextClientInstanceAuthorization {
|
|
5
|
-
token?: string;
|
|
6
|
-
tokenType?: "Basic" | "Bearer";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
4
|
interface AppEventDto {
|
|
10
5
|
name: string;
|
|
11
6
|
aggregateName: string;
|
|
@@ -393,6 +388,35 @@ declare function getSentryClientConfig(options?: SentryClientInstanceOptions): A
|
|
|
393
388
|
declare function initSentryClientInstance(token?: string): void;
|
|
394
389
|
declare function updateSentryClientInstance(token: string | undefined): void;
|
|
395
390
|
|
|
391
|
+
interface UptimeDto {
|
|
392
|
+
[k: string]: {
|
|
393
|
+
[k: string]: number;
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
interface GetAppUptimeReportsPayload {
|
|
398
|
+
from: string;
|
|
399
|
+
to: string;
|
|
400
|
+
resolution: 'hourly' | 'daily' | 'monthly';
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
interface TextClientInstanceAuthorization {
|
|
404
|
+
token?: string;
|
|
405
|
+
tokenType?: "Basic" | "Bearer";
|
|
406
|
+
}
|
|
407
|
+
interface TextClientInstanceOptions {
|
|
408
|
+
token?: string;
|
|
409
|
+
tokenType?: "Basic" | "Bearer";
|
|
410
|
+
}
|
|
411
|
+
declare const textClientInstance: axios.AxiosInstance;
|
|
412
|
+
declare function getTextClientAuthorization(req: {
|
|
413
|
+
headers: {
|
|
414
|
+
[key: string]: string | string[] | undefined;
|
|
415
|
+
};
|
|
416
|
+
}): TextClientInstanceAuthorization;
|
|
417
|
+
declare function getTextClientConfig(option?: TextClientInstanceOptions): AxiosRequestConfig;
|
|
418
|
+
declare function initTextClientInstance(baseUrl?: string, token?: string): void;
|
|
419
|
+
|
|
396
420
|
interface VercelPagination {
|
|
397
421
|
count: number;
|
|
398
422
|
next: number;
|
|
@@ -1656,18 +1680,6 @@ declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientInst
|
|
|
1656
1680
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientInstanceOptions): AxiosRequestConfig;
|
|
1657
1681
|
declare function initPlatformDpsClientInstance(baseUrl?: string, token?: string): void;
|
|
1658
1682
|
|
|
1659
|
-
interface UptimeDto {
|
|
1660
|
-
[k: string]: {
|
|
1661
|
-
[k: string]: number;
|
|
1662
|
-
};
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
interface GetAppUptimeReportsPayload {
|
|
1666
|
-
from: string;
|
|
1667
|
-
to: string;
|
|
1668
|
-
resolution: 'hourly' | 'daily' | 'monthly';
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
1683
|
interface AgentDto {
|
|
1672
1684
|
login: string;
|
|
1673
1685
|
groups: {
|
|
@@ -2077,11 +2089,6 @@ declare const api: {
|
|
|
2077
2089
|
};
|
|
2078
2090
|
};
|
|
2079
2091
|
};
|
|
2080
|
-
text: {
|
|
2081
|
-
uptime: {
|
|
2082
|
-
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
|
|
2083
|
-
};
|
|
2084
|
-
};
|
|
2085
2092
|
};
|
|
2086
2093
|
products: {
|
|
2087
2094
|
livechat: {
|
|
@@ -2258,6 +2265,11 @@ declare const api: {
|
|
|
2258
2265
|
createProject(organizationSlug: string, appName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<SentryProject>;
|
|
2259
2266
|
deleteProject(projectFullName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<any>;
|
|
2260
2267
|
};
|
|
2268
|
+
text: {
|
|
2269
|
+
uptime: {
|
|
2270
|
+
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
|
|
2271
|
+
};
|
|
2272
|
+
};
|
|
2261
2273
|
};
|
|
2262
2274
|
isInitialized: boolean;
|
|
2263
2275
|
};
|
|
@@ -2323,4 +2335,4 @@ declare const serializerBase64: {
|
|
|
2323
2335
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2324
2336
|
};
|
|
2325
2337
|
|
|
2326
|
-
export { API_NOTIFICATIONS, ActiveUserReportingEvent, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppRepository, AppRepositoryBlock, AppRepositoryProvider, AppRepositoryTarget, AppResourceDto, AppSentryLogger, AppSentryLoggerConfig, AppStorage, AppStorageBlock, AppStorageProvider, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppVercelStorage, AppVercelStorageConfig, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, AuthorizeData, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, CreateDeveloperMessagePayload, CreatePatPayload, CustomReportingEvent, DeveloperLedgerParams, DeveloperMessage, DeveloperMessageBaseDto, DeveloperMessageDto, ErrorReportingEvent, ErrorType, GetAppUptimeReportsPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetVercelProjectsResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientInstanceAuthorization, GithubClientRequestOptions, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryGitLabData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppSentryLoggerPayload, LinkAppStorageData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LinkAppStorageVercelData, LiveChatClientInstanceAuthorization, LiveChatClientInstanceOptions, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, PatDto, PatScopeDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformDpsClientInstanceAuthorization, PlatformDpsClientInstanceOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, ReportingEvent, ReportingEventBase, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, SentryClientInstanceAuthorization, SentryClientInstanceOptions, SentryIntegration, SentryOrganization, SentryProject, SentryProjectIssue, SentryProjectIssueEvent, SentryProjectKey, SentryRepository, SentryTeam, ShortcutDto, SyncAppVariablePayload, UnauthorizeApiError, UnlinkAppDeploymentPayload, UnlinkAppRepositoryPayload, UnlinkAppSentryLoggerPayload, UnlinkAppStoragePayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppResourcePayload, UpsertApplicationChatBoosterPayload, UptimeDto, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserSentryIntegrationDto, UserVercelIntegrationDto, VercelClientInstanceAuthorization, VercelClientInstanceOptions, VercelDeploy, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, Webhook, WebhookDto, api, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientRequestConfig, getLiveChatClientAuthorization, getLiveChatClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initVercelClientInstance, livechatClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, updateGithubClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
|
|
2338
|
+
export { API_NOTIFICATIONS, ActiveUserReportingEvent, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppRepository, AppRepositoryBlock, AppRepositoryProvider, AppRepositoryTarget, AppResourceDto, AppSentryLogger, AppSentryLoggerConfig, AppStorage, AppStorageBlock, AppStorageProvider, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppVercelStorage, AppVercelStorageConfig, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, AuthorizeData, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, CreateDeveloperMessagePayload, CreatePatPayload, CustomReportingEvent, DeveloperLedgerParams, DeveloperMessage, DeveloperMessageBaseDto, DeveloperMessageDto, ErrorReportingEvent, ErrorType, GetAppUptimeReportsPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetVercelProjectsResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientInstanceAuthorization, GithubClientRequestOptions, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryGitLabData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppSentryLoggerPayload, LinkAppStorageData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LinkAppStorageVercelData, LiveChatClientInstanceAuthorization, LiveChatClientInstanceOptions, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, PatDto, PatScopeDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformDpsClientInstanceAuthorization, PlatformDpsClientInstanceOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, ReportingEvent, ReportingEventBase, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, SentryClientInstanceAuthorization, SentryClientInstanceOptions, SentryIntegration, SentryOrganization, SentryProject, SentryProjectIssue, SentryProjectIssueEvent, SentryProjectKey, SentryRepository, SentryTeam, ShortcutDto, SyncAppVariablePayload, TextClientInstanceAuthorization, TextClientInstanceOptions, UnauthorizeApiError, UnlinkAppDeploymentPayload, UnlinkAppRepositoryPayload, UnlinkAppSentryLoggerPayload, UnlinkAppStoragePayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppResourcePayload, UpsertApplicationChatBoosterPayload, UptimeDto, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserSentryIntegrationDto, UserVercelIntegrationDto, VercelClientInstanceAuthorization, VercelClientInstanceOptions, VercelDeploy, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, Webhook, WebhookDto, api, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientRequestConfig, getLiveChatClientAuthorization, getLiveChatClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initTextClientInstance, initVercelClientInstance, livechatClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, textClientInstance, updateGithubClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
|
-
interface TextClientInstanceAuthorization {
|
|
5
|
-
token?: string;
|
|
6
|
-
tokenType?: "Basic" | "Bearer";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
4
|
interface AppEventDto {
|
|
10
5
|
name: string;
|
|
11
6
|
aggregateName: string;
|
|
@@ -393,6 +388,35 @@ declare function getSentryClientConfig(options?: SentryClientInstanceOptions): A
|
|
|
393
388
|
declare function initSentryClientInstance(token?: string): void;
|
|
394
389
|
declare function updateSentryClientInstance(token: string | undefined): void;
|
|
395
390
|
|
|
391
|
+
interface UptimeDto {
|
|
392
|
+
[k: string]: {
|
|
393
|
+
[k: string]: number;
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
interface GetAppUptimeReportsPayload {
|
|
398
|
+
from: string;
|
|
399
|
+
to: string;
|
|
400
|
+
resolution: 'hourly' | 'daily' | 'monthly';
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
interface TextClientInstanceAuthorization {
|
|
404
|
+
token?: string;
|
|
405
|
+
tokenType?: "Basic" | "Bearer";
|
|
406
|
+
}
|
|
407
|
+
interface TextClientInstanceOptions {
|
|
408
|
+
token?: string;
|
|
409
|
+
tokenType?: "Basic" | "Bearer";
|
|
410
|
+
}
|
|
411
|
+
declare const textClientInstance: axios.AxiosInstance;
|
|
412
|
+
declare function getTextClientAuthorization(req: {
|
|
413
|
+
headers: {
|
|
414
|
+
[key: string]: string | string[] | undefined;
|
|
415
|
+
};
|
|
416
|
+
}): TextClientInstanceAuthorization;
|
|
417
|
+
declare function getTextClientConfig(option?: TextClientInstanceOptions): AxiosRequestConfig;
|
|
418
|
+
declare function initTextClientInstance(baseUrl?: string, token?: string): void;
|
|
419
|
+
|
|
396
420
|
interface VercelPagination {
|
|
397
421
|
count: number;
|
|
398
422
|
next: number;
|
|
@@ -1656,18 +1680,6 @@ declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientInst
|
|
|
1656
1680
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientInstanceOptions): AxiosRequestConfig;
|
|
1657
1681
|
declare function initPlatformDpsClientInstance(baseUrl?: string, token?: string): void;
|
|
1658
1682
|
|
|
1659
|
-
interface UptimeDto {
|
|
1660
|
-
[k: string]: {
|
|
1661
|
-
[k: string]: number;
|
|
1662
|
-
};
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
interface GetAppUptimeReportsPayload {
|
|
1666
|
-
from: string;
|
|
1667
|
-
to: string;
|
|
1668
|
-
resolution: 'hourly' | 'daily' | 'monthly';
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
1683
|
interface AgentDto {
|
|
1672
1684
|
login: string;
|
|
1673
1685
|
groups: {
|
|
@@ -2077,11 +2089,6 @@ declare const api: {
|
|
|
2077
2089
|
};
|
|
2078
2090
|
};
|
|
2079
2091
|
};
|
|
2080
|
-
text: {
|
|
2081
|
-
uptime: {
|
|
2082
|
-
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
|
|
2083
|
-
};
|
|
2084
|
-
};
|
|
2085
2092
|
};
|
|
2086
2093
|
products: {
|
|
2087
2094
|
livechat: {
|
|
@@ -2258,6 +2265,11 @@ declare const api: {
|
|
|
2258
2265
|
createProject(organizationSlug: string, appName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<SentryProject>;
|
|
2259
2266
|
deleteProject(projectFullName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<any>;
|
|
2260
2267
|
};
|
|
2268
|
+
text: {
|
|
2269
|
+
uptime: {
|
|
2270
|
+
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
|
|
2271
|
+
};
|
|
2272
|
+
};
|
|
2261
2273
|
};
|
|
2262
2274
|
isInitialized: boolean;
|
|
2263
2275
|
};
|
|
@@ -2323,4 +2335,4 @@ declare const serializerBase64: {
|
|
|
2323
2335
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2324
2336
|
};
|
|
2325
2337
|
|
|
2326
|
-
export { API_NOTIFICATIONS, ActiveUserReportingEvent, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppRepository, AppRepositoryBlock, AppRepositoryProvider, AppRepositoryTarget, AppResourceDto, AppSentryLogger, AppSentryLoggerConfig, AppStorage, AppStorageBlock, AppStorageProvider, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppVercelStorage, AppVercelStorageConfig, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, AuthorizeData, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, CreateDeveloperMessagePayload, CreatePatPayload, CustomReportingEvent, DeveloperLedgerParams, DeveloperMessage, DeveloperMessageBaseDto, DeveloperMessageDto, ErrorReportingEvent, ErrorType, GetAppUptimeReportsPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetVercelProjectsResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientInstanceAuthorization, GithubClientRequestOptions, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryGitLabData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppSentryLoggerPayload, LinkAppStorageData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LinkAppStorageVercelData, LiveChatClientInstanceAuthorization, LiveChatClientInstanceOptions, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, PatDto, PatScopeDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformDpsClientInstanceAuthorization, PlatformDpsClientInstanceOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, ReportingEvent, ReportingEventBase, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, SentryClientInstanceAuthorization, SentryClientInstanceOptions, SentryIntegration, SentryOrganization, SentryProject, SentryProjectIssue, SentryProjectIssueEvent, SentryProjectKey, SentryRepository, SentryTeam, ShortcutDto, SyncAppVariablePayload, UnauthorizeApiError, UnlinkAppDeploymentPayload, UnlinkAppRepositoryPayload, UnlinkAppSentryLoggerPayload, UnlinkAppStoragePayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppResourcePayload, UpsertApplicationChatBoosterPayload, UptimeDto, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserSentryIntegrationDto, UserVercelIntegrationDto, VercelClientInstanceAuthorization, VercelClientInstanceOptions, VercelDeploy, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, Webhook, WebhookDto, api, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientRequestConfig, getLiveChatClientAuthorization, getLiveChatClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initVercelClientInstance, livechatClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, updateGithubClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
|
|
2338
|
+
export { API_NOTIFICATIONS, ActiveUserReportingEvent, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider, AppNetlifyDeployment, AppNetlifyDeploymentConfig, AppPlanetScaleStorage, AppPlanetScaleStorageConfig, AppRepository, AppRepositoryBlock, AppRepositoryProvider, AppRepositoryTarget, AppResourceDto, AppSentryLogger, AppSentryLoggerConfig, AppStorage, AppStorageBlock, AppStorageProvider, AppVariable, AppVariableExternalProvider, AppVariableLocalProvider, AppVariableProvider, AppVariableStatus, AppVariableType, AppVercelDeployment, AppVercelDeploymentConfig, AppVercelStorage, AppVercelStorageConfig, ApplicationAutoReviewDto, ApplicationAutoReviewPayload, ApplicationBasicDetailsDto, ApplicationBenefitDto, ApplicationDto, ApplicationFeatureDto, ApplicationIconDto, ApplicationOverviewDto, ApplicationPaymentDto, ApplicationPropertyDto, ApplicationScreenshotDto, ApplicationTutorialAndSupportDto, ApplicationUsageOptionsDto, AuthorizeData, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateClientPayload, CreateDeveloperMessagePayload, CreatePatPayload, CustomReportingEvent, DeveloperLedgerParams, DeveloperMessage, DeveloperMessageBaseDto, DeveloperMessageDto, ErrorReportingEvent, ErrorType, GetAppUptimeReportsPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetVercelProjectsResult, GitHubInstallation, GitHubRepository, GitHubRepositoryBranch, GitHubRepositoryHook, GitHubRepositoryKey, GitHubRepositorySeed, GithubClientInstanceAuthorization, GithubClientRequestOptions, LinkAppDeploymentData, LinkAppDeploymentNetlifyData, LinkAppDeploymentNetlifySiteData, LinkAppDeploymentPayload, LinkAppDeploymentResult, LinkAppDeploymentVercelData, LinkAppDeploymentVercelProjectData, LinkAppRepositoryData, LinkAppRepositoryGitHubData, LinkAppRepositoryGitLabData, LinkAppRepositoryPayload, LinkAppRepositoryResult, LinkAppSentryLoggerPayload, LinkAppStorageData, LinkAppStoragePayload, LinkAppStoragePlanetScaleData, LinkAppStoragePlanetScaleDatabaseData, LinkAppStorageVercelData, LiveChatClientInstanceAuthorization, LiveChatClientInstanceOptions, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, PatDto, PatScopeDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformDpsClientInstanceAuthorization, PlatformDpsClientInstanceOptions, ProductDto, PropertiesDto, Property, PropertyAccessDto, PropertyAccessItemDto, PropertyDto, ReportingEvent, ReportingEventBase, ResearchCustomerItemDto, ResearchCustomerLocationItemDto, ResearchDictionaryParams, ResearchMarketplaceItemDto, ResearchMarketplaceParams, ResearchTrafficItemDto, ResearchTrafficParams, ScopeDto, SeedAppRepositoryPayload, SeedAppRepositoryResult, SentryClientInstanceAuthorization, SentryClientInstanceOptions, SentryIntegration, SentryOrganization, SentryProject, SentryProjectIssue, SentryProjectIssueEvent, SentryProjectKey, SentryRepository, SentryTeam, ShortcutDto, SyncAppVariablePayload, TextClientInstanceAuthorization, TextClientInstanceOptions, UnauthorizeApiError, UnlinkAppDeploymentPayload, UnlinkAppRepositoryPayload, UnlinkAppSentryLoggerPayload, UnlinkAppStoragePayload, UpdateAppInfrastructureBlocksPayload, UpdateApplicationChangelogPayload, UpdateApplicationChatActionPayload, UpdateApplicationDirectInstallUrlPayload, UpdateApplicationIconPayload, UpdateApplicationOnboardingPayload, UpdateApplicationProductPayload, UpdateApplicationWebhookPayload, UpdateApplicationWidgetDto, UpdateChatWebhookPayload, UpdateClientPayload, UpdateUserFeatures, UpdateUserIntegrations, UpsertAppResourcePayload, UpsertApplicationChatBoosterPayload, UptimeDto, UserDto, UserGitHubIntegrationDto, UserIntegrationsDto, UserNetlifyIntegrationDto, UserPlanetScaleIntegrationDto, UserSentryIntegrationDto, UserVercelIntegrationDto, VercelClientInstanceAuthorization, VercelClientInstanceOptions, VercelDeploy, VercelNamespace, VercelPaginatedResult, VercelPagination, VercelProject, VercelProjectEnv, VercelRepository, VercelSearchRepositoryResponse, Webhook, WebhookDto, api, getAppAutoReviewPayload, getEmptyAppAutoReview, getGitHubClientAuthorization, getGithubClientRequestConfig, getLiveChatClientAuthorization, getLiveChatClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initTextClientInstance, initVercelClientInstance, livechatClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, textClientInstance, updateGithubClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
|
package/dist/index.js
CHANGED
|
@@ -91,6 +91,8 @@ __export(src_exports, {
|
|
|
91
91
|
getRegion: () => getRegion,
|
|
92
92
|
getSentryClientAuthorization: () => getSentryClientAuthorization,
|
|
93
93
|
getSentryClientConfig: () => getSentryClientConfig,
|
|
94
|
+
getTextClientAuthorization: () => getTextClientAuthorization,
|
|
95
|
+
getTextClientConfig: () => getTextClientConfig,
|
|
94
96
|
getVercelClientAuthorization: () => getVercelClientAuthorization,
|
|
95
97
|
getVercelClientConfig: () => getVercelClientConfig,
|
|
96
98
|
githubClientInstance: () => githubClientInstance,
|
|
@@ -103,6 +105,7 @@ __export(src_exports, {
|
|
|
103
105
|
initPlatformAdapterClientInstance: () => initPlatformAdapterClientInstance,
|
|
104
106
|
initPlatformDpsClientInstance: () => initPlatformDpsClientInstance,
|
|
105
107
|
initSentryClientInstance: () => initSentryClientInstance,
|
|
108
|
+
initTextClientInstance: () => initTextClientInstance,
|
|
106
109
|
initVercelClientInstance: () => initVercelClientInstance,
|
|
107
110
|
livechatClientInstance: () => livechatClientInstance,
|
|
108
111
|
netlifyClientInstance: () => netlifyClientInstance,
|
|
@@ -112,6 +115,7 @@ __export(src_exports, {
|
|
|
112
115
|
platformDpsClientInstance: () => platformDpsClientInstance,
|
|
113
116
|
sentryClientInstance: () => sentryClientInstance,
|
|
114
117
|
serializerBase64: () => serializerBase64,
|
|
118
|
+
textClientInstance: () => textClientInstance,
|
|
115
119
|
updateGithubClientInstance: () => updateGithubClientInstance,
|
|
116
120
|
updateNetlifyClientInstance: () => updateNetlifyClientInstance,
|
|
117
121
|
updatePlanetScaleClientInstance: () => updatePlanetScaleClientInstance,
|
|
@@ -1694,19 +1698,81 @@ var sentryApi = {
|
|
|
1694
1698
|
}
|
|
1695
1699
|
};
|
|
1696
1700
|
|
|
1701
|
+
// src/apis/integrations/text/instance.ts
|
|
1702
|
+
var import_axios7 = __toESM(require("axios"));
|
|
1703
|
+
var textClientInstance = import_axios7.default.create({
|
|
1704
|
+
baseURL: "https://api.labs.text.com"
|
|
1705
|
+
});
|
|
1706
|
+
function getTextClientAuthorization(req) {
|
|
1707
|
+
return {
|
|
1708
|
+
token: req.headers["text-token"],
|
|
1709
|
+
tokenType: "Bearer"
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
function getTextClientConfig(option = {}) {
|
|
1713
|
+
const defaultAuthorization = textClientInstance.defaults.headers["Authorization"];
|
|
1714
|
+
const headers = {
|
|
1715
|
+
authorization: defaultAuthorization != null ? defaultAuthorization : option.token ? `Bearer ${option.token}` : void 0
|
|
1716
|
+
};
|
|
1717
|
+
return {
|
|
1718
|
+
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1721
|
+
function initTextClientInstance(baseUrl, token) {
|
|
1722
|
+
if (baseUrl) {
|
|
1723
|
+
textClientInstance.interceptors.request.use(
|
|
1724
|
+
(config) => __async(this, null, function* () {
|
|
1725
|
+
config.baseURL = baseUrl;
|
|
1726
|
+
return config;
|
|
1727
|
+
}),
|
|
1728
|
+
(error) => Promise.reject(error)
|
|
1729
|
+
);
|
|
1730
|
+
}
|
|
1731
|
+
if (token) {
|
|
1732
|
+
textClientInstance.defaults.headers["Authorization"] = `Bearer ${token}`;
|
|
1733
|
+
} else {
|
|
1734
|
+
delete textClientInstance.defaults.headers["Authorization"];
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
// src/apis/integrations/text/uptime/api.ts
|
|
1739
|
+
var textUptimeApi = {
|
|
1740
|
+
getAppUptimeReports(appId, payload, authorization) {
|
|
1741
|
+
return __async(this, null, function* () {
|
|
1742
|
+
try {
|
|
1743
|
+
const response = yield textClientInstance.get(
|
|
1744
|
+
`/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
1745
|
+
getTextClientConfig(authorization)
|
|
1746
|
+
);
|
|
1747
|
+
return response.data;
|
|
1748
|
+
} catch (error) {
|
|
1749
|
+
if (error instanceof Error) {
|
|
1750
|
+
throw new Error(`Couldn't get app uptime reports. [${error.message}]`);
|
|
1751
|
+
}
|
|
1752
|
+
throw error;
|
|
1753
|
+
}
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
};
|
|
1757
|
+
|
|
1758
|
+
// src/apis/integrations/text/api.ts
|
|
1759
|
+
var textApi = {
|
|
1760
|
+
uptime: textUptimeApi
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1697
1763
|
// src/apis/integrations/vercel/api.ts
|
|
1698
|
-
var
|
|
1764
|
+
var import_axios9 = __toESM(require("axios"));
|
|
1699
1765
|
|
|
1700
1766
|
// src/apis/integrations/vercel/instance.ts
|
|
1701
|
-
var
|
|
1702
|
-
var vercelClientInstance =
|
|
1767
|
+
var import_axios8 = __toESM(require("axios"));
|
|
1768
|
+
var vercelClientInstance = import_axios8.default.create({
|
|
1703
1769
|
baseURL: "https://api.vercel.com"
|
|
1704
1770
|
});
|
|
1705
1771
|
vercelClientInstance.interceptors.response.use(
|
|
1706
1772
|
(r) => r,
|
|
1707
1773
|
(error) => {
|
|
1708
1774
|
var _a;
|
|
1709
|
-
if (
|
|
1775
|
+
if (import_axios8.default.isAxiosError(error)) {
|
|
1710
1776
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
1711
1777
|
error = new UnauthorizeApiError("vercel");
|
|
1712
1778
|
}
|
|
@@ -1984,7 +2050,7 @@ var vercelApi = {
|
|
|
1984
2050
|
client_secret: clientSecret,
|
|
1985
2051
|
redirect_uri: redirectUrl
|
|
1986
2052
|
});
|
|
1987
|
-
const response = yield
|
|
2053
|
+
const response = yield import_axios9.default.post(
|
|
1988
2054
|
"https://api.vercel.com/v2/oauth/access_token",
|
|
1989
2055
|
data,
|
|
1990
2056
|
{
|
|
@@ -2009,11 +2075,12 @@ var integrationsApi = {
|
|
|
2009
2075
|
netlify: netlifyApi,
|
|
2010
2076
|
vercel: vercelApi,
|
|
2011
2077
|
planetscale: planetscaleApi,
|
|
2012
|
-
sentry: sentryApi
|
|
2078
|
+
sentry: sentryApi,
|
|
2079
|
+
text: textApi
|
|
2013
2080
|
};
|
|
2014
2081
|
|
|
2015
2082
|
// src/apis/products/livechat/instance.ts
|
|
2016
|
-
var
|
|
2083
|
+
var import_axios10 = __toESM(require("axios"));
|
|
2017
2084
|
var REGION = {
|
|
2018
2085
|
FRA: "fra",
|
|
2019
2086
|
DAL: "dal",
|
|
@@ -2028,7 +2095,7 @@ var getRegion = (token) => {
|
|
|
2028
2095
|
}
|
|
2029
2096
|
return void 0;
|
|
2030
2097
|
};
|
|
2031
|
-
var livechatClientInstance =
|
|
2098
|
+
var livechatClientInstance = import_axios10.default.create({
|
|
2032
2099
|
baseURL: "https://api.labs.livechatinc.com"
|
|
2033
2100
|
});
|
|
2034
2101
|
function getLiveChatClientAuthorization(req) {
|
|
@@ -2494,8 +2561,8 @@ var productsApi = {
|
|
|
2494
2561
|
};
|
|
2495
2562
|
|
|
2496
2563
|
// src/apis/platform/accounts/instance.ts
|
|
2497
|
-
var
|
|
2498
|
-
var platformAccountsClientInstance =
|
|
2564
|
+
var import_axios11 = __toESM(require("axios"));
|
|
2565
|
+
var platformAccountsClientInstance = import_axios11.default.create({
|
|
2499
2566
|
baseURL: "https://accounts.labs.livechatinc.com"
|
|
2500
2567
|
});
|
|
2501
2568
|
function getPlatformAccountsClientAuthorization(req) {
|
|
@@ -2825,8 +2892,8 @@ var platformAccountsApi = {
|
|
|
2825
2892
|
};
|
|
2826
2893
|
|
|
2827
2894
|
// src/apis/platform/dps/instance.ts
|
|
2828
|
-
var
|
|
2829
|
-
var platformDpsClientInstance =
|
|
2895
|
+
var import_axios12 = __toESM(require("axios"));
|
|
2896
|
+
var platformDpsClientInstance = import_axios12.default.create({
|
|
2830
2897
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
2831
2898
|
});
|
|
2832
2899
|
function getPlatformDpsClientAuthorization(req) {
|
|
@@ -4436,7 +4503,7 @@ var platformDpsApi = {
|
|
|
4436
4503
|
};
|
|
4437
4504
|
|
|
4438
4505
|
// src/apis/platform/adapter/instance.ts
|
|
4439
|
-
var
|
|
4506
|
+
var import_axios13 = __toESM(require("axios"));
|
|
4440
4507
|
function getPlatformAdapterClientAuthorization(req) {
|
|
4441
4508
|
return {
|
|
4442
4509
|
platform: {
|
|
@@ -4452,7 +4519,7 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
4452
4519
|
sentry: req.headers["sentry-token"]
|
|
4453
4520
|
};
|
|
4454
4521
|
}
|
|
4455
|
-
var platformAdapterClientInstance =
|
|
4522
|
+
var platformAdapterClientInstance = import_axios13.default.create({
|
|
4456
4523
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
4457
4524
|
headers: {
|
|
4458
4525
|
"Content-Type": "application/json"
|
|
@@ -4462,7 +4529,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
4462
4529
|
(r) => r,
|
|
4463
4530
|
(error) => {
|
|
4464
4531
|
var _a;
|
|
4465
|
-
if (
|
|
4532
|
+
if (import_axios13.default.isAxiosError(error)) {
|
|
4466
4533
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401 && error.response.data.error.source) {
|
|
4467
4534
|
error = new UnauthorizeApiError(error.response.data.error.source);
|
|
4468
4535
|
}
|
|
@@ -4876,68 +4943,11 @@ var platformAdapterApi = {
|
|
|
4876
4943
|
app: platformAdapterAppApi
|
|
4877
4944
|
};
|
|
4878
4945
|
|
|
4879
|
-
// src/apis/platform/text/instance.ts
|
|
4880
|
-
var import_axios13 = __toESM(require("axios"));
|
|
4881
|
-
var textClientInstance = import_axios13.default.create({
|
|
4882
|
-
baseURL: "https://api.labs.text.com"
|
|
4883
|
-
});
|
|
4884
|
-
function getTextClientConfig(option = {}) {
|
|
4885
|
-
const defaultAuthorization = textClientInstance.defaults.headers["Authorization"];
|
|
4886
|
-
const headers = {
|
|
4887
|
-
authorization: defaultAuthorization != null ? defaultAuthorization : option.token ? `Bearer ${option.token}` : void 0
|
|
4888
|
-
};
|
|
4889
|
-
return {
|
|
4890
|
-
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
4891
|
-
};
|
|
4892
|
-
}
|
|
4893
|
-
function initTextClientInstance(baseUrl, token) {
|
|
4894
|
-
if (baseUrl) {
|
|
4895
|
-
textClientInstance.interceptors.request.use(
|
|
4896
|
-
(config) => __async(this, null, function* () {
|
|
4897
|
-
config.baseURL = baseUrl;
|
|
4898
|
-
return config;
|
|
4899
|
-
}),
|
|
4900
|
-
(error) => Promise.reject(error)
|
|
4901
|
-
);
|
|
4902
|
-
}
|
|
4903
|
-
if (token) {
|
|
4904
|
-
textClientInstance.defaults.headers["Authorization"] = `Bearer ${token}`;
|
|
4905
|
-
} else {
|
|
4906
|
-
delete textClientInstance.defaults.headers["Authorization"];
|
|
4907
|
-
}
|
|
4908
|
-
}
|
|
4909
|
-
|
|
4910
|
-
// src/apis/platform/text/uptime/api.ts
|
|
4911
|
-
var textUptimeApi = {
|
|
4912
|
-
getAppUptimeReports(appId, payload, authorization) {
|
|
4913
|
-
return __async(this, null, function* () {
|
|
4914
|
-
try {
|
|
4915
|
-
const response = yield textClientInstance.get(
|
|
4916
|
-
`/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
4917
|
-
getTextClientConfig(authorization)
|
|
4918
|
-
);
|
|
4919
|
-
return response.data;
|
|
4920
|
-
} catch (error) {
|
|
4921
|
-
if (error instanceof Error) {
|
|
4922
|
-
throw new Error(`Couldn't get app uptime reports. [${error.message}]`);
|
|
4923
|
-
}
|
|
4924
|
-
throw error;
|
|
4925
|
-
}
|
|
4926
|
-
});
|
|
4927
|
-
}
|
|
4928
|
-
};
|
|
4929
|
-
|
|
4930
|
-
// src/apis/platform/text/api.ts
|
|
4931
|
-
var textApi = {
|
|
4932
|
-
uptime: textUptimeApi
|
|
4933
|
-
};
|
|
4934
|
-
|
|
4935
4946
|
// src/apis/platform/api.ts
|
|
4936
4947
|
var platformApi = {
|
|
4937
4948
|
accounts: platformAccountsApi,
|
|
4938
4949
|
adapter: platformAdapterApi,
|
|
4939
|
-
dps: platformDpsApi
|
|
4940
|
-
text: textApi
|
|
4950
|
+
dps: platformDpsApi
|
|
4941
4951
|
};
|
|
4942
4952
|
|
|
4943
4953
|
// src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
|
|
@@ -5034,6 +5044,8 @@ var serializerBase64 = {
|
|
|
5034
5044
|
getRegion,
|
|
5035
5045
|
getSentryClientAuthorization,
|
|
5036
5046
|
getSentryClientConfig,
|
|
5047
|
+
getTextClientAuthorization,
|
|
5048
|
+
getTextClientConfig,
|
|
5037
5049
|
getVercelClientAuthorization,
|
|
5038
5050
|
getVercelClientConfig,
|
|
5039
5051
|
githubClientInstance,
|
|
@@ -5046,6 +5058,7 @@ var serializerBase64 = {
|
|
|
5046
5058
|
initPlatformAdapterClientInstance,
|
|
5047
5059
|
initPlatformDpsClientInstance,
|
|
5048
5060
|
initSentryClientInstance,
|
|
5061
|
+
initTextClientInstance,
|
|
5049
5062
|
initVercelClientInstance,
|
|
5050
5063
|
livechatClientInstance,
|
|
5051
5064
|
netlifyClientInstance,
|
|
@@ -5055,6 +5068,7 @@ var serializerBase64 = {
|
|
|
5055
5068
|
platformDpsClientInstance,
|
|
5056
5069
|
sentryClientInstance,
|
|
5057
5070
|
serializerBase64,
|
|
5071
|
+
textClientInstance,
|
|
5058
5072
|
updateGithubClientInstance,
|
|
5059
5073
|
updateNetlifyClientInstance,
|
|
5060
5074
|
updatePlanetScaleClientInstance,
|
package/dist/index.mjs
CHANGED
|
@@ -1610,19 +1610,81 @@ var sentryApi = {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
};
|
|
1612
1612
|
|
|
1613
|
+
// src/apis/integrations/text/instance.ts
|
|
1614
|
+
import axios7 from "axios";
|
|
1615
|
+
var textClientInstance = axios7.create({
|
|
1616
|
+
baseURL: "https://api.labs.text.com"
|
|
1617
|
+
});
|
|
1618
|
+
function getTextClientAuthorization(req) {
|
|
1619
|
+
return {
|
|
1620
|
+
token: req.headers["text-token"],
|
|
1621
|
+
tokenType: "Bearer"
|
|
1622
|
+
};
|
|
1623
|
+
}
|
|
1624
|
+
function getTextClientConfig(option = {}) {
|
|
1625
|
+
const defaultAuthorization = textClientInstance.defaults.headers["Authorization"];
|
|
1626
|
+
const headers = {
|
|
1627
|
+
authorization: defaultAuthorization != null ? defaultAuthorization : option.token ? `Bearer ${option.token}` : void 0
|
|
1628
|
+
};
|
|
1629
|
+
return {
|
|
1630
|
+
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
function initTextClientInstance(baseUrl, token) {
|
|
1634
|
+
if (baseUrl) {
|
|
1635
|
+
textClientInstance.interceptors.request.use(
|
|
1636
|
+
(config) => __async(this, null, function* () {
|
|
1637
|
+
config.baseURL = baseUrl;
|
|
1638
|
+
return config;
|
|
1639
|
+
}),
|
|
1640
|
+
(error) => Promise.reject(error)
|
|
1641
|
+
);
|
|
1642
|
+
}
|
|
1643
|
+
if (token) {
|
|
1644
|
+
textClientInstance.defaults.headers["Authorization"] = `Bearer ${token}`;
|
|
1645
|
+
} else {
|
|
1646
|
+
delete textClientInstance.defaults.headers["Authorization"];
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
// src/apis/integrations/text/uptime/api.ts
|
|
1651
|
+
var textUptimeApi = {
|
|
1652
|
+
getAppUptimeReports(appId, payload, authorization) {
|
|
1653
|
+
return __async(this, null, function* () {
|
|
1654
|
+
try {
|
|
1655
|
+
const response = yield textClientInstance.get(
|
|
1656
|
+
`/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
1657
|
+
getTextClientConfig(authorization)
|
|
1658
|
+
);
|
|
1659
|
+
return response.data;
|
|
1660
|
+
} catch (error) {
|
|
1661
|
+
if (error instanceof Error) {
|
|
1662
|
+
throw new Error(`Couldn't get app uptime reports. [${error.message}]`);
|
|
1663
|
+
}
|
|
1664
|
+
throw error;
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
};
|
|
1669
|
+
|
|
1670
|
+
// src/apis/integrations/text/api.ts
|
|
1671
|
+
var textApi = {
|
|
1672
|
+
uptime: textUptimeApi
|
|
1673
|
+
};
|
|
1674
|
+
|
|
1613
1675
|
// src/apis/integrations/vercel/api.ts
|
|
1614
|
-
import
|
|
1676
|
+
import axios9 from "axios";
|
|
1615
1677
|
|
|
1616
1678
|
// src/apis/integrations/vercel/instance.ts
|
|
1617
|
-
import
|
|
1618
|
-
var vercelClientInstance =
|
|
1679
|
+
import axios8 from "axios";
|
|
1680
|
+
var vercelClientInstance = axios8.create({
|
|
1619
1681
|
baseURL: "https://api.vercel.com"
|
|
1620
1682
|
});
|
|
1621
1683
|
vercelClientInstance.interceptors.response.use(
|
|
1622
1684
|
(r) => r,
|
|
1623
1685
|
(error) => {
|
|
1624
1686
|
var _a;
|
|
1625
|
-
if (
|
|
1687
|
+
if (axios8.isAxiosError(error)) {
|
|
1626
1688
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
1627
1689
|
error = new UnauthorizeApiError("vercel");
|
|
1628
1690
|
}
|
|
@@ -1900,7 +1962,7 @@ var vercelApi = {
|
|
|
1900
1962
|
client_secret: clientSecret,
|
|
1901
1963
|
redirect_uri: redirectUrl
|
|
1902
1964
|
});
|
|
1903
|
-
const response = yield
|
|
1965
|
+
const response = yield axios9.post(
|
|
1904
1966
|
"https://api.vercel.com/v2/oauth/access_token",
|
|
1905
1967
|
data,
|
|
1906
1968
|
{
|
|
@@ -1925,11 +1987,12 @@ var integrationsApi = {
|
|
|
1925
1987
|
netlify: netlifyApi,
|
|
1926
1988
|
vercel: vercelApi,
|
|
1927
1989
|
planetscale: planetscaleApi,
|
|
1928
|
-
sentry: sentryApi
|
|
1990
|
+
sentry: sentryApi,
|
|
1991
|
+
text: textApi
|
|
1929
1992
|
};
|
|
1930
1993
|
|
|
1931
1994
|
// src/apis/products/livechat/instance.ts
|
|
1932
|
-
import
|
|
1995
|
+
import axios10 from "axios";
|
|
1933
1996
|
var REGION = {
|
|
1934
1997
|
FRA: "fra",
|
|
1935
1998
|
DAL: "dal",
|
|
@@ -1944,7 +2007,7 @@ var getRegion = (token) => {
|
|
|
1944
2007
|
}
|
|
1945
2008
|
return void 0;
|
|
1946
2009
|
};
|
|
1947
|
-
var livechatClientInstance =
|
|
2010
|
+
var livechatClientInstance = axios10.create({
|
|
1948
2011
|
baseURL: "https://api.labs.livechatinc.com"
|
|
1949
2012
|
});
|
|
1950
2013
|
function getLiveChatClientAuthorization(req) {
|
|
@@ -2410,8 +2473,8 @@ var productsApi = {
|
|
|
2410
2473
|
};
|
|
2411
2474
|
|
|
2412
2475
|
// src/apis/platform/accounts/instance.ts
|
|
2413
|
-
import
|
|
2414
|
-
var platformAccountsClientInstance =
|
|
2476
|
+
import axios11 from "axios";
|
|
2477
|
+
var platformAccountsClientInstance = axios11.create({
|
|
2415
2478
|
baseURL: "https://accounts.labs.livechatinc.com"
|
|
2416
2479
|
});
|
|
2417
2480
|
function getPlatformAccountsClientAuthorization(req) {
|
|
@@ -2741,8 +2804,8 @@ var platformAccountsApi = {
|
|
|
2741
2804
|
};
|
|
2742
2805
|
|
|
2743
2806
|
// src/apis/platform/dps/instance.ts
|
|
2744
|
-
import
|
|
2745
|
-
var platformDpsClientInstance =
|
|
2807
|
+
import axios12 from "axios";
|
|
2808
|
+
var platformDpsClientInstance = axios12.create({
|
|
2746
2809
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
2747
2810
|
});
|
|
2748
2811
|
function getPlatformDpsClientAuthorization(req) {
|
|
@@ -4352,7 +4415,7 @@ var platformDpsApi = {
|
|
|
4352
4415
|
};
|
|
4353
4416
|
|
|
4354
4417
|
// src/apis/platform/adapter/instance.ts
|
|
4355
|
-
import
|
|
4418
|
+
import axios13 from "axios";
|
|
4356
4419
|
function getPlatformAdapterClientAuthorization(req) {
|
|
4357
4420
|
return {
|
|
4358
4421
|
platform: {
|
|
@@ -4368,7 +4431,7 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
4368
4431
|
sentry: req.headers["sentry-token"]
|
|
4369
4432
|
};
|
|
4370
4433
|
}
|
|
4371
|
-
var platformAdapterClientInstance =
|
|
4434
|
+
var platformAdapterClientInstance = axios13.create({
|
|
4372
4435
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
4373
4436
|
headers: {
|
|
4374
4437
|
"Content-Type": "application/json"
|
|
@@ -4378,7 +4441,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
4378
4441
|
(r) => r,
|
|
4379
4442
|
(error) => {
|
|
4380
4443
|
var _a;
|
|
4381
|
-
if (
|
|
4444
|
+
if (axios13.isAxiosError(error)) {
|
|
4382
4445
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401 && error.response.data.error.source) {
|
|
4383
4446
|
error = new UnauthorizeApiError(error.response.data.error.source);
|
|
4384
4447
|
}
|
|
@@ -4792,68 +4855,11 @@ var platformAdapterApi = {
|
|
|
4792
4855
|
app: platformAdapterAppApi
|
|
4793
4856
|
};
|
|
4794
4857
|
|
|
4795
|
-
// src/apis/platform/text/instance.ts
|
|
4796
|
-
import axios13 from "axios";
|
|
4797
|
-
var textClientInstance = axios13.create({
|
|
4798
|
-
baseURL: "https://api.labs.text.com"
|
|
4799
|
-
});
|
|
4800
|
-
function getTextClientConfig(option = {}) {
|
|
4801
|
-
const defaultAuthorization = textClientInstance.defaults.headers["Authorization"];
|
|
4802
|
-
const headers = {
|
|
4803
|
-
authorization: defaultAuthorization != null ? defaultAuthorization : option.token ? `Bearer ${option.token}` : void 0
|
|
4804
|
-
};
|
|
4805
|
-
return {
|
|
4806
|
-
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
4807
|
-
};
|
|
4808
|
-
}
|
|
4809
|
-
function initTextClientInstance(baseUrl, token) {
|
|
4810
|
-
if (baseUrl) {
|
|
4811
|
-
textClientInstance.interceptors.request.use(
|
|
4812
|
-
(config) => __async(this, null, function* () {
|
|
4813
|
-
config.baseURL = baseUrl;
|
|
4814
|
-
return config;
|
|
4815
|
-
}),
|
|
4816
|
-
(error) => Promise.reject(error)
|
|
4817
|
-
);
|
|
4818
|
-
}
|
|
4819
|
-
if (token) {
|
|
4820
|
-
textClientInstance.defaults.headers["Authorization"] = `Bearer ${token}`;
|
|
4821
|
-
} else {
|
|
4822
|
-
delete textClientInstance.defaults.headers["Authorization"];
|
|
4823
|
-
}
|
|
4824
|
-
}
|
|
4825
|
-
|
|
4826
|
-
// src/apis/platform/text/uptime/api.ts
|
|
4827
|
-
var textUptimeApi = {
|
|
4828
|
-
getAppUptimeReports(appId, payload, authorization) {
|
|
4829
|
-
return __async(this, null, function* () {
|
|
4830
|
-
try {
|
|
4831
|
-
const response = yield textClientInstance.get(
|
|
4832
|
-
`/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
4833
|
-
getTextClientConfig(authorization)
|
|
4834
|
-
);
|
|
4835
|
-
return response.data;
|
|
4836
|
-
} catch (error) {
|
|
4837
|
-
if (error instanceof Error) {
|
|
4838
|
-
throw new Error(`Couldn't get app uptime reports. [${error.message}]`);
|
|
4839
|
-
}
|
|
4840
|
-
throw error;
|
|
4841
|
-
}
|
|
4842
|
-
});
|
|
4843
|
-
}
|
|
4844
|
-
};
|
|
4845
|
-
|
|
4846
|
-
// src/apis/platform/text/api.ts
|
|
4847
|
-
var textApi = {
|
|
4848
|
-
uptime: textUptimeApi
|
|
4849
|
-
};
|
|
4850
|
-
|
|
4851
4858
|
// src/apis/platform/api.ts
|
|
4852
4859
|
var platformApi = {
|
|
4853
4860
|
accounts: platformAccountsApi,
|
|
4854
4861
|
adapter: platformAdapterApi,
|
|
4855
|
-
dps: platformDpsApi
|
|
4856
|
-
text: textApi
|
|
4862
|
+
dps: platformDpsApi
|
|
4857
4863
|
};
|
|
4858
4864
|
|
|
4859
4865
|
// src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
|
|
@@ -4949,6 +4955,8 @@ export {
|
|
|
4949
4955
|
getRegion,
|
|
4950
4956
|
getSentryClientAuthorization,
|
|
4951
4957
|
getSentryClientConfig,
|
|
4958
|
+
getTextClientAuthorization,
|
|
4959
|
+
getTextClientConfig,
|
|
4952
4960
|
getVercelClientAuthorization,
|
|
4953
4961
|
getVercelClientConfig,
|
|
4954
4962
|
githubClientInstance,
|
|
@@ -4961,6 +4969,7 @@ export {
|
|
|
4961
4969
|
initPlatformAdapterClientInstance,
|
|
4962
4970
|
initPlatformDpsClientInstance,
|
|
4963
4971
|
initSentryClientInstance,
|
|
4972
|
+
initTextClientInstance,
|
|
4964
4973
|
initVercelClientInstance,
|
|
4965
4974
|
livechatClientInstance,
|
|
4966
4975
|
netlifyClientInstance,
|
|
@@ -4970,6 +4979,7 @@ export {
|
|
|
4970
4979
|
platformDpsClientInstance,
|
|
4971
4980
|
sentryClientInstance,
|
|
4972
4981
|
serializerBase64,
|
|
4982
|
+
textClientInstance,
|
|
4973
4983
|
updateGithubClientInstance,
|
|
4974
4984
|
updateNetlifyClientInstance,
|
|
4975
4985
|
updatePlanetScaleClientInstance,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"tsup": "^7.1.0",
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
20
|
"config": "0.0.0",
|
|
21
|
+
"eslint-config-custom-lib": "0.0.1",
|
|
21
22
|
"tsconfig": "0.0.0",
|
|
22
|
-
"types": "0.0.1"
|
|
23
|
-
"eslint-config-custom-lib": "0.0.1"
|
|
23
|
+
"types": "0.0.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|