@livechat/developer-studio-api 2.0.22 → 2.0.23
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 +24 -10
- package/dist/index.d.ts +24 -10
- package/dist/index.js +70 -31
- package/dist/index.mjs +70 -31
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
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
|
+
|
|
4
9
|
interface AppEventDto {
|
|
5
10
|
name: string;
|
|
6
11
|
aggregateName: string;
|
|
@@ -1459,12 +1464,6 @@ interface CreateApplicationSubmissionPayload {
|
|
|
1459
1464
|
note: string;
|
|
1460
1465
|
}
|
|
1461
1466
|
|
|
1462
|
-
interface GetAppUptimeReportsPayload {
|
|
1463
|
-
from: string;
|
|
1464
|
-
to: string;
|
|
1465
|
-
resolution: 'hourly' | 'daily' | 'monthly';
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
1467
|
interface UpdateApplicationWebhookPayload {
|
|
1469
1468
|
url: string;
|
|
1470
1469
|
}
|
|
@@ -1657,6 +1656,18 @@ declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientInst
|
|
|
1657
1656
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientInstanceOptions): AxiosRequestConfig;
|
|
1658
1657
|
declare function initPlatformDpsClientInstance(baseUrl?: string, token?: string): void;
|
|
1659
1658
|
|
|
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
|
+
|
|
1660
1671
|
interface AgentDto {
|
|
1661
1672
|
login: string;
|
|
1662
1673
|
groups: {
|
|
@@ -1958,9 +1969,6 @@ declare const api: {
|
|
|
1958
1969
|
createSubmission(appId: string, payload: CreateApplicationSubmissionPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1959
1970
|
cancelSubmission(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1960
1971
|
};
|
|
1961
|
-
uptime: {
|
|
1962
|
-
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization: PlatformDpsClientInstanceAuthorization): Promise<{}>;
|
|
1963
|
-
};
|
|
1964
1972
|
webhooks: {
|
|
1965
1973
|
updateAppWebhooks(appId: string, payload: UpdateApplicationWebhookPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1966
1974
|
getChatWebhook(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
@@ -2069,6 +2077,11 @@ declare const api: {
|
|
|
2069
2077
|
};
|
|
2070
2078
|
};
|
|
2071
2079
|
};
|
|
2080
|
+
text: {
|
|
2081
|
+
uptime: {
|
|
2082
|
+
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization: TextClientInstanceAuthorization): Promise<UptimeDto>;
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2072
2085
|
};
|
|
2073
2086
|
products: {
|
|
2074
2087
|
livechat: {
|
|
@@ -2254,6 +2267,7 @@ declare function initApi(config: {
|
|
|
2254
2267
|
accounts?: string;
|
|
2255
2268
|
adapter?: string;
|
|
2256
2269
|
dps?: string;
|
|
2270
|
+
text?: string;
|
|
2257
2271
|
};
|
|
2258
2272
|
products?: {
|
|
2259
2273
|
livechat?: string;
|
|
@@ -2309,4 +2323,4 @@ declare const serializerBase64: {
|
|
|
2309
2323
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2310
2324
|
};
|
|
2311
2325
|
|
|
2312
|
-
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, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
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
|
+
|
|
4
9
|
interface AppEventDto {
|
|
5
10
|
name: string;
|
|
6
11
|
aggregateName: string;
|
|
@@ -1459,12 +1464,6 @@ interface CreateApplicationSubmissionPayload {
|
|
|
1459
1464
|
note: string;
|
|
1460
1465
|
}
|
|
1461
1466
|
|
|
1462
|
-
interface GetAppUptimeReportsPayload {
|
|
1463
|
-
from: string;
|
|
1464
|
-
to: string;
|
|
1465
|
-
resolution: 'hourly' | 'daily' | 'monthly';
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
1467
|
interface UpdateApplicationWebhookPayload {
|
|
1469
1468
|
url: string;
|
|
1470
1469
|
}
|
|
@@ -1657,6 +1656,18 @@ declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientInst
|
|
|
1657
1656
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientInstanceOptions): AxiosRequestConfig;
|
|
1658
1657
|
declare function initPlatformDpsClientInstance(baseUrl?: string, token?: string): void;
|
|
1659
1658
|
|
|
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
|
+
|
|
1660
1671
|
interface AgentDto {
|
|
1661
1672
|
login: string;
|
|
1662
1673
|
groups: {
|
|
@@ -1958,9 +1969,6 @@ declare const api: {
|
|
|
1958
1969
|
createSubmission(appId: string, payload: CreateApplicationSubmissionPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1959
1970
|
cancelSubmission(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1960
1971
|
};
|
|
1961
|
-
uptime: {
|
|
1962
|
-
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization: PlatformDpsClientInstanceAuthorization): Promise<{}>;
|
|
1963
|
-
};
|
|
1964
1972
|
webhooks: {
|
|
1965
1973
|
updateAppWebhooks(appId: string, payload: UpdateApplicationWebhookPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1966
1974
|
getChatWebhook(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
@@ -2069,6 +2077,11 @@ declare const api: {
|
|
|
2069
2077
|
};
|
|
2070
2078
|
};
|
|
2071
2079
|
};
|
|
2080
|
+
text: {
|
|
2081
|
+
uptime: {
|
|
2082
|
+
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization: TextClientInstanceAuthorization): Promise<UptimeDto>;
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2072
2085
|
};
|
|
2073
2086
|
products: {
|
|
2074
2087
|
livechat: {
|
|
@@ -2254,6 +2267,7 @@ declare function initApi(config: {
|
|
|
2254
2267
|
accounts?: string;
|
|
2255
2268
|
adapter?: string;
|
|
2256
2269
|
dps?: string;
|
|
2270
|
+
text?: string;
|
|
2257
2271
|
};
|
|
2258
2272
|
products?: {
|
|
2259
2273
|
livechat?: string;
|
|
@@ -2309,4 +2323,4 @@ declare const serializerBase64: {
|
|
|
2309
2323
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2310
2324
|
};
|
|
2311
2325
|
|
|
2312
|
-
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, 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -3667,27 +3667,6 @@ var platformDpsApplicationReviewApi = {
|
|
|
3667
3667
|
}
|
|
3668
3668
|
};
|
|
3669
3669
|
|
|
3670
|
-
// src/apis/platform/dps/applications/application/uptime/api.ts
|
|
3671
|
-
var platformDpsAppUptimeApi = {
|
|
3672
|
-
getAppUptimeReports(appId, payload, authorization) {
|
|
3673
|
-
return __async(this, null, function* () {
|
|
3674
|
-
try {
|
|
3675
|
-
const response = yield platformDpsClientInstance.get(
|
|
3676
|
-
`/v2/applications/${appId}/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
3677
|
-
// might have to change URL - not yet implemented
|
|
3678
|
-
getPlatformDpsClientConfig(authorization)
|
|
3679
|
-
);
|
|
3680
|
-
return response.data;
|
|
3681
|
-
} catch (error) {
|
|
3682
|
-
if (error instanceof Error) {
|
|
3683
|
-
throw new Error(`Couldn't get app uptime reports. [${error.message}]`);
|
|
3684
|
-
}
|
|
3685
|
-
throw error;
|
|
3686
|
-
}
|
|
3687
|
-
});
|
|
3688
|
-
}
|
|
3689
|
-
};
|
|
3690
|
-
|
|
3691
3670
|
// src/apis/platform/dps/applications/application/webhooks/api.ts
|
|
3692
3671
|
var platformDpsApplicationWebhooksApi = {
|
|
3693
3672
|
updateAppWebhooks(appId, payload, authorization) {
|
|
@@ -3834,7 +3813,6 @@ var platformDpsApplicationApi = {
|
|
|
3834
3813
|
reporting: platformDpsApplicationReportingApi,
|
|
3835
3814
|
resource: platformDpsApplicationResourcesApi,
|
|
3836
3815
|
review: platformDpsApplicationReviewApi,
|
|
3837
|
-
uptime: platformDpsAppUptimeApi,
|
|
3838
3816
|
webhooks: platformDpsApplicationWebhooksApi,
|
|
3839
3817
|
widgets: platformDpsApplicationWidgetsApi,
|
|
3840
3818
|
getApp(appId, authorization) {
|
|
@@ -4898,11 +4876,68 @@ var platformAdapterApi = {
|
|
|
4898
4876
|
app: platformAdapterAppApi
|
|
4899
4877
|
};
|
|
4900
4878
|
|
|
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
|
+
|
|
4901
4935
|
// src/apis/platform/api.ts
|
|
4902
4936
|
var platformApi = {
|
|
4903
4937
|
accounts: platformAccountsApi,
|
|
4904
4938
|
adapter: platformAdapterApi,
|
|
4905
|
-
dps: platformDpsApi
|
|
4939
|
+
dps: platformDpsApi,
|
|
4940
|
+
text: textApi
|
|
4906
4941
|
};
|
|
4907
4942
|
|
|
4908
4943
|
// src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
|
|
@@ -4920,7 +4955,7 @@ var api = {
|
|
|
4920
4955
|
isInitialized: false
|
|
4921
4956
|
};
|
|
4922
4957
|
function initApi(config, tokens) {
|
|
4923
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
4958
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
4924
4959
|
initPlatformAccountsClientInstance(
|
|
4925
4960
|
(_a = config.urls.platform) == null ? void 0 : _a.accounts,
|
|
4926
4961
|
(_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.dps
|
|
@@ -4945,15 +4980,19 @@ function initApi(config, tokens) {
|
|
|
4945
4980
|
sentry: (_l = tokens.sentry) == null ? void 0 : _l.token
|
|
4946
4981
|
} : void 0
|
|
4947
4982
|
);
|
|
4948
|
-
|
|
4949
|
-
(_m = config.urls.
|
|
4983
|
+
initTextClientInstance(
|
|
4984
|
+
(_m = config.urls.platform) == null ? void 0 : _m.text,
|
|
4950
4985
|
(_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
|
|
4951
4986
|
);
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4987
|
+
initLiveChatClientInstance(
|
|
4988
|
+
(_o = config.urls.products) == null ? void 0 : _o.livechat,
|
|
4989
|
+
(_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps
|
|
4990
|
+
);
|
|
4991
|
+
initGithubClientInstance((_q = tokens == null ? void 0 : tokens.github) == null ? void 0 : _q.apps);
|
|
4992
|
+
initNetlifyClientInstance((_r = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _r.token);
|
|
4993
|
+
initVercelClientInstance((_s = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _s.token);
|
|
4994
|
+
initPlanetScaleClientInstance((_t = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _t.token);
|
|
4995
|
+
initSentryClientInstance((_u = tokens == null ? void 0 : tokens.sentry) == null ? void 0 : _u.token);
|
|
4957
4996
|
api.isInitialized = true;
|
|
4958
4997
|
}
|
|
4959
4998
|
|
package/dist/index.mjs
CHANGED
|
@@ -3583,27 +3583,6 @@ var platformDpsApplicationReviewApi = {
|
|
|
3583
3583
|
}
|
|
3584
3584
|
};
|
|
3585
3585
|
|
|
3586
|
-
// src/apis/platform/dps/applications/application/uptime/api.ts
|
|
3587
|
-
var platformDpsAppUptimeApi = {
|
|
3588
|
-
getAppUptimeReports(appId, payload, authorization) {
|
|
3589
|
-
return __async(this, null, function* () {
|
|
3590
|
-
try {
|
|
3591
|
-
const response = yield platformDpsClientInstance.get(
|
|
3592
|
-
`/v2/applications/${appId}/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
3593
|
-
// might have to change URL - not yet implemented
|
|
3594
|
-
getPlatformDpsClientConfig(authorization)
|
|
3595
|
-
);
|
|
3596
|
-
return response.data;
|
|
3597
|
-
} catch (error) {
|
|
3598
|
-
if (error instanceof Error) {
|
|
3599
|
-
throw new Error(`Couldn't get app uptime reports. [${error.message}]`);
|
|
3600
|
-
}
|
|
3601
|
-
throw error;
|
|
3602
|
-
}
|
|
3603
|
-
});
|
|
3604
|
-
}
|
|
3605
|
-
};
|
|
3606
|
-
|
|
3607
3586
|
// src/apis/platform/dps/applications/application/webhooks/api.ts
|
|
3608
3587
|
var platformDpsApplicationWebhooksApi = {
|
|
3609
3588
|
updateAppWebhooks(appId, payload, authorization) {
|
|
@@ -3750,7 +3729,6 @@ var platformDpsApplicationApi = {
|
|
|
3750
3729
|
reporting: platformDpsApplicationReportingApi,
|
|
3751
3730
|
resource: platformDpsApplicationResourcesApi,
|
|
3752
3731
|
review: platformDpsApplicationReviewApi,
|
|
3753
|
-
uptime: platformDpsAppUptimeApi,
|
|
3754
3732
|
webhooks: platformDpsApplicationWebhooksApi,
|
|
3755
3733
|
widgets: platformDpsApplicationWidgetsApi,
|
|
3756
3734
|
getApp(appId, authorization) {
|
|
@@ -4814,11 +4792,68 @@ var platformAdapterApi = {
|
|
|
4814
4792
|
app: platformAdapterAppApi
|
|
4815
4793
|
};
|
|
4816
4794
|
|
|
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
|
+
|
|
4817
4851
|
// src/apis/platform/api.ts
|
|
4818
4852
|
var platformApi = {
|
|
4819
4853
|
accounts: platformAccountsApi,
|
|
4820
4854
|
adapter: platformAdapterApi,
|
|
4821
|
-
dps: platformDpsApi
|
|
4855
|
+
dps: platformDpsApi,
|
|
4856
|
+
text: textApi
|
|
4822
4857
|
};
|
|
4823
4858
|
|
|
4824
4859
|
// src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
|
|
@@ -4836,7 +4871,7 @@ var api = {
|
|
|
4836
4871
|
isInitialized: false
|
|
4837
4872
|
};
|
|
4838
4873
|
function initApi(config, tokens) {
|
|
4839
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
4874
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
4840
4875
|
initPlatformAccountsClientInstance(
|
|
4841
4876
|
(_a = config.urls.platform) == null ? void 0 : _a.accounts,
|
|
4842
4877
|
(_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.dps
|
|
@@ -4861,15 +4896,19 @@ function initApi(config, tokens) {
|
|
|
4861
4896
|
sentry: (_l = tokens.sentry) == null ? void 0 : _l.token
|
|
4862
4897
|
} : void 0
|
|
4863
4898
|
);
|
|
4864
|
-
|
|
4865
|
-
(_m = config.urls.
|
|
4899
|
+
initTextClientInstance(
|
|
4900
|
+
(_m = config.urls.platform) == null ? void 0 : _m.text,
|
|
4866
4901
|
(_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
|
|
4867
4902
|
);
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4903
|
+
initLiveChatClientInstance(
|
|
4904
|
+
(_o = config.urls.products) == null ? void 0 : _o.livechat,
|
|
4905
|
+
(_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps
|
|
4906
|
+
);
|
|
4907
|
+
initGithubClientInstance((_q = tokens == null ? void 0 : tokens.github) == null ? void 0 : _q.apps);
|
|
4908
|
+
initNetlifyClientInstance((_r = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _r.token);
|
|
4909
|
+
initVercelClientInstance((_s = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _s.token);
|
|
4910
|
+
initPlanetScaleClientInstance((_t = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _t.token);
|
|
4911
|
+
initSentryClientInstance((_u = tokens == null ? void 0 : tokens.sentry) == null ? void 0 : _u.token);
|
|
4873
4912
|
api.isInitialized = true;
|
|
4874
4913
|
}
|
|
4875
4914
|
|
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.23",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"@types/node": "^17.0.12",
|
|
18
18
|
"tsup": "^7.1.0",
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
|
-
"
|
|
20
|
+
"tsconfig": "0.0.0",
|
|
21
21
|
"types": "0.0.1",
|
|
22
22
|
"eslint-config-custom-lib": "0.0.1",
|
|
23
|
-
"
|
|
23
|
+
"config": "0.0.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|