@livechat/developer-studio-api 2.0.57 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +40 -86
- package/dist/index.d.ts +40 -86
- package/dist/index.js +62 -253
- package/dist/index.mjs +61 -253
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -388,72 +388,16 @@ declare function getSentryClientConfig(options?: SentryClientInstanceOptions): A
|
|
|
388
388
|
declare function initSentryClientInstance(token?: string): void;
|
|
389
389
|
declare function updateSentryClientInstance(token: string | undefined): void;
|
|
390
390
|
|
|
391
|
-
interface
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
events: string[];
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
interface AppMonitoringCustomReportDataDto {
|
|
398
|
-
[appId: string]: {
|
|
399
|
-
[date: string]: {
|
|
400
|
-
[eventKey: string]: number;
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
interface AppMonitoringUptimeReportDto {
|
|
406
|
-
[appId: string]: {
|
|
407
|
-
[date: string]: number;
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
interface AppMonitoringEventsReportDto {
|
|
412
|
-
[appId: string]: {
|
|
413
|
-
[date: string]: {
|
|
414
|
-
[eventKey: string]: number;
|
|
415
|
-
};
|
|
391
|
+
interface UptimeDto {
|
|
392
|
+
[k: string]: {
|
|
393
|
+
[k: string]: number;
|
|
416
394
|
};
|
|
417
395
|
}
|
|
418
396
|
|
|
419
|
-
interface
|
|
397
|
+
interface GetAppUptimeReportsPayload {
|
|
420
398
|
from: string;
|
|
421
399
|
to: string;
|
|
422
|
-
resolution:
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
type GetAppMonitoringCustomReportDataPayload = AppMonitoringReportParams;
|
|
426
|
-
|
|
427
|
-
type GetAppMonitoringUptimeReportPayload = AppMonitoringReportParams;
|
|
428
|
-
|
|
429
|
-
type GetAppMonitoringEventsReportPayload = AppMonitoringReportParams;
|
|
430
|
-
|
|
431
|
-
interface AppMonitoringEvent {
|
|
432
|
-
key: string;
|
|
433
|
-
name: string;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
interface AppMonitoringEventData {
|
|
437
|
-
organization_id: string;
|
|
438
|
-
type: string;
|
|
439
|
-
payload?: string;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
type AppMonitoringEventsLogItem = {
|
|
443
|
-
sent_at: string;
|
|
444
|
-
} & AppMonitoringEventData;
|
|
445
|
-
interface AppMonitoringEventsLog {
|
|
446
|
-
[appId: string]: AppMonitoringEventsLogItem[];
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
interface GetAppMonitoringEventsLogPayload {
|
|
450
|
-
from?: string;
|
|
451
|
-
type?: string[];
|
|
452
|
-
search?: string;
|
|
453
|
-
}
|
|
454
|
-
interface GetAppMonitoringEventsLogResponse {
|
|
455
|
-
events: AppMonitoringEventsLog;
|
|
456
|
-
next_page_from?: string;
|
|
400
|
+
resolution: 'hourly' | 'daily' | 'monthly';
|
|
457
401
|
}
|
|
458
402
|
|
|
459
403
|
interface TextClientInstanceAuthorization {
|
|
@@ -1494,6 +1438,32 @@ interface ApplicationPropertyDto {
|
|
|
1494
1438
|
value: string;
|
|
1495
1439
|
}
|
|
1496
1440
|
|
|
1441
|
+
interface ReportingEventBase {
|
|
1442
|
+
name: string;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
interface ActiveUserReportingEvent extends ReportingEventBase {
|
|
1446
|
+
name: 'activeUser';
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
interface CustomReportingEvent<TPayload> extends ReportingEventBase {
|
|
1450
|
+
name: 'custom';
|
|
1451
|
+
payload: TPayload;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
declare enum ErrorType {
|
|
1455
|
+
'4xx' = "4xx",
|
|
1456
|
+
'5xx' = "5xx"
|
|
1457
|
+
}
|
|
1458
|
+
interface ErrorReportingEvent extends ReportingEventBase {
|
|
1459
|
+
name: 'error';
|
|
1460
|
+
payload: {
|
|
1461
|
+
type: ErrorType;
|
|
1462
|
+
};
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
type ReportingEvent<TPayload = unknown> = ActiveUserReportingEvent | ErrorReportingEvent | CustomReportingEvent<TPayload>;
|
|
1466
|
+
|
|
1497
1467
|
interface AppResourceDto {
|
|
1498
1468
|
}
|
|
1499
1469
|
|
|
@@ -2012,6 +1982,9 @@ declare const api: {
|
|
|
2012
1982
|
product: {
|
|
2013
1983
|
updateProduct(appId: string, payload: UpdateApplicationProductPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2014
1984
|
};
|
|
1985
|
+
reporting: {
|
|
1986
|
+
sendEvent<TPayload = unknown>(appId: string, event: ReportingEvent<TPayload>, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1987
|
+
};
|
|
2015
1988
|
resource: {
|
|
2016
1989
|
getAppUpgrades(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<AppResourceDto>>;
|
|
2017
1990
|
createAppUpgrade(appId: string, body: UpsertAppResourcePayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<void>>;
|
|
@@ -2204,6 +2177,7 @@ declare const api: {
|
|
|
2204
2177
|
key: string;
|
|
2205
2178
|
}[] | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
|
|
2206
2179
|
addAccountSentryTokenEnv(siteId: string, token: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
|
|
2180
|
+
removeAccountEnv(accountId: string | undefined, siteId: string, envKey: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
|
|
2207
2181
|
};
|
|
2208
2182
|
site: {
|
|
2209
2183
|
getSites(authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite[]>;
|
|
@@ -2241,6 +2215,7 @@ declare const api: {
|
|
|
2241
2215
|
id: string;
|
|
2242
2216
|
key: string;
|
|
2243
2217
|
}[] | undefined, authorization?: VercelClientInstanceAuthorization | undefined): Promise<any>;
|
|
2218
|
+
removeProjectEnv(projectId: string, envId: string, authorization?: VercelClientInstanceAuthorization | undefined): Promise<any>;
|
|
2244
2219
|
};
|
|
2245
2220
|
deploy: {
|
|
2246
2221
|
createDeploy(project: string, repoId: number, branch: string, authorization?: VercelClientInstanceAuthorization | undefined): Promise<VercelDeploy>;
|
|
@@ -2308,27 +2283,8 @@ declare const api: {
|
|
|
2308
2283
|
deleteProject(projectFullName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<any>;
|
|
2309
2284
|
};
|
|
2310
2285
|
text: {
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
events: {
|
|
2314
|
-
getEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
|
|
2315
|
-
getEvents(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent[]>;
|
|
2316
|
-
upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2317
|
-
deleteEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2318
|
-
sendEvent(appId: string, data: AppMonitoringEventData, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2319
|
-
getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<GetAppMonitoringEventsLogResponse>;
|
|
2320
|
-
};
|
|
2321
|
-
reports: {
|
|
2322
|
-
getUptimeReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
|
|
2323
|
-
getEventReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
|
|
2324
|
-
getCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport>;
|
|
2325
|
-
getCustomReportData(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReportDataDto>;
|
|
2326
|
-
getCustomReports(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport[]>;
|
|
2327
|
-
createCustomReport(appId: string, customReport: Omit<AppMonitoringCustomReport, "id">, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2328
|
-
updateCustomReport(appId: string, customReport: AppMonitoringCustomReport, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2329
|
-
deleteCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2330
|
-
};
|
|
2331
|
-
};
|
|
2286
|
+
uptime: {
|
|
2287
|
+
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
|
|
2332
2288
|
};
|
|
2333
2289
|
};
|
|
2334
2290
|
};
|
|
@@ -2340,13 +2296,11 @@ declare function initApi(config: {
|
|
|
2340
2296
|
accounts?: string;
|
|
2341
2297
|
adapter?: string;
|
|
2342
2298
|
dps?: string;
|
|
2299
|
+
text?: string;
|
|
2343
2300
|
};
|
|
2344
2301
|
products?: {
|
|
2345
2302
|
livechat?: string;
|
|
2346
2303
|
};
|
|
2347
|
-
integrations?: {
|
|
2348
|
-
text?: string;
|
|
2349
|
-
};
|
|
2350
2304
|
};
|
|
2351
2305
|
}, tokens?: {
|
|
2352
2306
|
platform?: {
|
|
@@ -2398,4 +2352,4 @@ declare const serializerBase64: {
|
|
|
2398
2352
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2399
2353
|
};
|
|
2400
2354
|
|
|
2401
|
-
export { API_NOTIFICATIONS, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider,
|
|
2355
|
+
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
|
@@ -388,72 +388,16 @@ declare function getSentryClientConfig(options?: SentryClientInstanceOptions): A
|
|
|
388
388
|
declare function initSentryClientInstance(token?: string): void;
|
|
389
389
|
declare function updateSentryClientInstance(token: string | undefined): void;
|
|
390
390
|
|
|
391
|
-
interface
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
events: string[];
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
interface AppMonitoringCustomReportDataDto {
|
|
398
|
-
[appId: string]: {
|
|
399
|
-
[date: string]: {
|
|
400
|
-
[eventKey: string]: number;
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
interface AppMonitoringUptimeReportDto {
|
|
406
|
-
[appId: string]: {
|
|
407
|
-
[date: string]: number;
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
interface AppMonitoringEventsReportDto {
|
|
412
|
-
[appId: string]: {
|
|
413
|
-
[date: string]: {
|
|
414
|
-
[eventKey: string]: number;
|
|
415
|
-
};
|
|
391
|
+
interface UptimeDto {
|
|
392
|
+
[k: string]: {
|
|
393
|
+
[k: string]: number;
|
|
416
394
|
};
|
|
417
395
|
}
|
|
418
396
|
|
|
419
|
-
interface
|
|
397
|
+
interface GetAppUptimeReportsPayload {
|
|
420
398
|
from: string;
|
|
421
399
|
to: string;
|
|
422
|
-
resolution:
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
type GetAppMonitoringCustomReportDataPayload = AppMonitoringReportParams;
|
|
426
|
-
|
|
427
|
-
type GetAppMonitoringUptimeReportPayload = AppMonitoringReportParams;
|
|
428
|
-
|
|
429
|
-
type GetAppMonitoringEventsReportPayload = AppMonitoringReportParams;
|
|
430
|
-
|
|
431
|
-
interface AppMonitoringEvent {
|
|
432
|
-
key: string;
|
|
433
|
-
name: string;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
interface AppMonitoringEventData {
|
|
437
|
-
organization_id: string;
|
|
438
|
-
type: string;
|
|
439
|
-
payload?: string;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
type AppMonitoringEventsLogItem = {
|
|
443
|
-
sent_at: string;
|
|
444
|
-
} & AppMonitoringEventData;
|
|
445
|
-
interface AppMonitoringEventsLog {
|
|
446
|
-
[appId: string]: AppMonitoringEventsLogItem[];
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
interface GetAppMonitoringEventsLogPayload {
|
|
450
|
-
from?: string;
|
|
451
|
-
type?: string[];
|
|
452
|
-
search?: string;
|
|
453
|
-
}
|
|
454
|
-
interface GetAppMonitoringEventsLogResponse {
|
|
455
|
-
events: AppMonitoringEventsLog;
|
|
456
|
-
next_page_from?: string;
|
|
400
|
+
resolution: 'hourly' | 'daily' | 'monthly';
|
|
457
401
|
}
|
|
458
402
|
|
|
459
403
|
interface TextClientInstanceAuthorization {
|
|
@@ -1494,6 +1438,32 @@ interface ApplicationPropertyDto {
|
|
|
1494
1438
|
value: string;
|
|
1495
1439
|
}
|
|
1496
1440
|
|
|
1441
|
+
interface ReportingEventBase {
|
|
1442
|
+
name: string;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
interface ActiveUserReportingEvent extends ReportingEventBase {
|
|
1446
|
+
name: 'activeUser';
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
interface CustomReportingEvent<TPayload> extends ReportingEventBase {
|
|
1450
|
+
name: 'custom';
|
|
1451
|
+
payload: TPayload;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
declare enum ErrorType {
|
|
1455
|
+
'4xx' = "4xx",
|
|
1456
|
+
'5xx' = "5xx"
|
|
1457
|
+
}
|
|
1458
|
+
interface ErrorReportingEvent extends ReportingEventBase {
|
|
1459
|
+
name: 'error';
|
|
1460
|
+
payload: {
|
|
1461
|
+
type: ErrorType;
|
|
1462
|
+
};
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
type ReportingEvent<TPayload = unknown> = ActiveUserReportingEvent | ErrorReportingEvent | CustomReportingEvent<TPayload>;
|
|
1466
|
+
|
|
1497
1467
|
interface AppResourceDto {
|
|
1498
1468
|
}
|
|
1499
1469
|
|
|
@@ -2012,6 +1982,9 @@ declare const api: {
|
|
|
2012
1982
|
product: {
|
|
2013
1983
|
updateProduct(appId: string, payload: UpdateApplicationProductPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2014
1984
|
};
|
|
1985
|
+
reporting: {
|
|
1986
|
+
sendEvent<TPayload = unknown>(appId: string, event: ReportingEvent<TPayload>, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
1987
|
+
};
|
|
2015
1988
|
resource: {
|
|
2016
1989
|
getAppUpgrades(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<AppResourceDto>>;
|
|
2017
1990
|
createAppUpgrade(appId: string, body: UpsertAppResourcePayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<void>>;
|
|
@@ -2204,6 +2177,7 @@ declare const api: {
|
|
|
2204
2177
|
key: string;
|
|
2205
2178
|
}[] | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
|
|
2206
2179
|
addAccountSentryTokenEnv(siteId: string, token: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
|
|
2180
|
+
removeAccountEnv(accountId: string | undefined, siteId: string, envKey: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
|
|
2207
2181
|
};
|
|
2208
2182
|
site: {
|
|
2209
2183
|
getSites(authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite[]>;
|
|
@@ -2241,6 +2215,7 @@ declare const api: {
|
|
|
2241
2215
|
id: string;
|
|
2242
2216
|
key: string;
|
|
2243
2217
|
}[] | undefined, authorization?: VercelClientInstanceAuthorization | undefined): Promise<any>;
|
|
2218
|
+
removeProjectEnv(projectId: string, envId: string, authorization?: VercelClientInstanceAuthorization | undefined): Promise<any>;
|
|
2244
2219
|
};
|
|
2245
2220
|
deploy: {
|
|
2246
2221
|
createDeploy(project: string, repoId: number, branch: string, authorization?: VercelClientInstanceAuthorization | undefined): Promise<VercelDeploy>;
|
|
@@ -2308,27 +2283,8 @@ declare const api: {
|
|
|
2308
2283
|
deleteProject(projectFullName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<any>;
|
|
2309
2284
|
};
|
|
2310
2285
|
text: {
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
events: {
|
|
2314
|
-
getEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
|
|
2315
|
-
getEvents(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent[]>;
|
|
2316
|
-
upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2317
|
-
deleteEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2318
|
-
sendEvent(appId: string, data: AppMonitoringEventData, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2319
|
-
getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<GetAppMonitoringEventsLogResponse>;
|
|
2320
|
-
};
|
|
2321
|
-
reports: {
|
|
2322
|
-
getUptimeReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
|
|
2323
|
-
getEventReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
|
|
2324
|
-
getCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport>;
|
|
2325
|
-
getCustomReportData(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReportDataDto>;
|
|
2326
|
-
getCustomReports(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport[]>;
|
|
2327
|
-
createCustomReport(appId: string, customReport: Omit<AppMonitoringCustomReport, "id">, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2328
|
-
updateCustomReport(appId: string, customReport: AppMonitoringCustomReport, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2329
|
-
deleteCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2330
|
-
};
|
|
2331
|
-
};
|
|
2286
|
+
uptime: {
|
|
2287
|
+
getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
|
|
2332
2288
|
};
|
|
2333
2289
|
};
|
|
2334
2290
|
};
|
|
@@ -2340,13 +2296,11 @@ declare function initApi(config: {
|
|
|
2340
2296
|
accounts?: string;
|
|
2341
2297
|
adapter?: string;
|
|
2342
2298
|
dps?: string;
|
|
2299
|
+
text?: string;
|
|
2343
2300
|
};
|
|
2344
2301
|
products?: {
|
|
2345
2302
|
livechat?: string;
|
|
2346
2303
|
};
|
|
2347
|
-
integrations?: {
|
|
2348
|
-
text?: string;
|
|
2349
|
-
};
|
|
2350
2304
|
};
|
|
2351
2305
|
}, tokens?: {
|
|
2352
2306
|
platform?: {
|
|
@@ -2398,4 +2352,4 @@ declare const serializerBase64: {
|
|
|
2398
2352
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2399
2353
|
};
|
|
2400
2354
|
|
|
2401
|
-
export { API_NOTIFICATIONS, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider,
|
|
2355
|
+
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
|
@@ -68,6 +68,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
68
68
|
var src_exports = {};
|
|
69
69
|
__export(src_exports, {
|
|
70
70
|
API_NOTIFICATIONS: () => API_NOTIFICATIONS,
|
|
71
|
+
ErrorType: () => ErrorType,
|
|
71
72
|
UnauthorizeApiError: () => UnauthorizeApiError,
|
|
72
73
|
api: () => api,
|
|
73
74
|
getAppAutoReviewPayload: () => getAppAutoReviewPayload,
|
|
@@ -822,6 +823,23 @@ var netlifyAccountApi = {
|
|
|
822
823
|
authorization
|
|
823
824
|
);
|
|
824
825
|
});
|
|
826
|
+
},
|
|
827
|
+
removeAccountEnv(accountId, siteId, envKey, authorization) {
|
|
828
|
+
return __async(this, null, function* () {
|
|
829
|
+
if (!accountId) {
|
|
830
|
+
accountId = yield this.getAccount(authorization);
|
|
831
|
+
}
|
|
832
|
+
if (!accountId) {
|
|
833
|
+
throw new Error("No account");
|
|
834
|
+
}
|
|
835
|
+
const response = yield netlifyClientInstance.delete(
|
|
836
|
+
`/accounts/${accountId}/env/${envKey}?site_id=${siteId}`,
|
|
837
|
+
getNetlifyClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
838
|
+
ensureAuthorizationToken: true
|
|
839
|
+
}))
|
|
840
|
+
);
|
|
841
|
+
return response.data;
|
|
842
|
+
});
|
|
825
843
|
}
|
|
826
844
|
};
|
|
827
845
|
|
|
@@ -1734,129 +1752,13 @@ function initTextClientInstance(baseUrl, token) {
|
|
|
1734
1752
|
}
|
|
1735
1753
|
}
|
|
1736
1754
|
|
|
1737
|
-
// src/apis/integrations/text/
|
|
1738
|
-
var
|
|
1739
|
-
|
|
1755
|
+
// src/apis/integrations/text/uptime/api.ts
|
|
1756
|
+
var textUptimeApi = {
|
|
1757
|
+
getAppUptimeReports(appId, payload, authorization) {
|
|
1740
1758
|
return __async(this, null, function* () {
|
|
1741
1759
|
try {
|
|
1742
1760
|
const response = yield textClientInstance.get(
|
|
1743
|
-
`/app_monitoring/${appId}/
|
|
1744
|
-
getTextClientConfig(authorization)
|
|
1745
|
-
);
|
|
1746
|
-
return response.data;
|
|
1747
|
-
} catch (error) {
|
|
1748
|
-
if (error instanceof Error) {
|
|
1749
|
-
throw new Error(`Couldn't load event. [${error.message}]`);
|
|
1750
|
-
}
|
|
1751
|
-
throw error;
|
|
1752
|
-
}
|
|
1753
|
-
});
|
|
1754
|
-
},
|
|
1755
|
-
getEvents(appId, authorization) {
|
|
1756
|
-
return __async(this, null, function* () {
|
|
1757
|
-
try {
|
|
1758
|
-
const response = yield textClientInstance.get(
|
|
1759
|
-
`/app_monitoring/${appId}/events`,
|
|
1760
|
-
getTextClientConfig(authorization)
|
|
1761
|
-
);
|
|
1762
|
-
return response.data;
|
|
1763
|
-
} catch (error) {
|
|
1764
|
-
if (error instanceof Error) {
|
|
1765
|
-
throw new Error(`Couldn't load events. [${error.message}]`);
|
|
1766
|
-
}
|
|
1767
|
-
throw error;
|
|
1768
|
-
}
|
|
1769
|
-
});
|
|
1770
|
-
},
|
|
1771
|
-
upsertEvent(appId, event, authorization) {
|
|
1772
|
-
return __async(this, null, function* () {
|
|
1773
|
-
try {
|
|
1774
|
-
const response = yield textClientInstance.post(
|
|
1775
|
-
`/app_monitoring/${appId}/events/${event.key}`,
|
|
1776
|
-
event,
|
|
1777
|
-
getTextClientConfig(authorization)
|
|
1778
|
-
);
|
|
1779
|
-
return response.data;
|
|
1780
|
-
} catch (error) {
|
|
1781
|
-
if (error instanceof Error) {
|
|
1782
|
-
throw new Error(`Couldn't upsert event. [${error.message}]`);
|
|
1783
|
-
}
|
|
1784
|
-
throw error;
|
|
1785
|
-
}
|
|
1786
|
-
});
|
|
1787
|
-
},
|
|
1788
|
-
deleteEvent(appId, eventKey, authorization) {
|
|
1789
|
-
return __async(this, null, function* () {
|
|
1790
|
-
try {
|
|
1791
|
-
const response = yield textClientInstance.delete(
|
|
1792
|
-
`/app_monitoring/${appId}/events/${eventKey}`,
|
|
1793
|
-
getTextClientConfig(authorization)
|
|
1794
|
-
);
|
|
1795
|
-
return response.data;
|
|
1796
|
-
} catch (error) {
|
|
1797
|
-
if (error instanceof Error) {
|
|
1798
|
-
throw new Error(`Couldn't delete event. [${error.message}]`);
|
|
1799
|
-
}
|
|
1800
|
-
throw error;
|
|
1801
|
-
}
|
|
1802
|
-
});
|
|
1803
|
-
},
|
|
1804
|
-
sendEvent(appId, data, authorization) {
|
|
1805
|
-
return __async(this, null, function* () {
|
|
1806
|
-
try {
|
|
1807
|
-
const response = yield textClientInstance.post(
|
|
1808
|
-
`/app_monitoring/${appId}/events`,
|
|
1809
|
-
data,
|
|
1810
|
-
getTextClientConfig(authorization)
|
|
1811
|
-
);
|
|
1812
|
-
return response.data;
|
|
1813
|
-
} catch (error) {
|
|
1814
|
-
if (error instanceof Error) {
|
|
1815
|
-
throw new Error(`Couldn't send events. [${error.message}]`);
|
|
1816
|
-
}
|
|
1817
|
-
throw error;
|
|
1818
|
-
}
|
|
1819
|
-
});
|
|
1820
|
-
},
|
|
1821
|
-
getEventsLog(appId, payload, authorization) {
|
|
1822
|
-
return __async(this, null, function* () {
|
|
1823
|
-
var _a, _b;
|
|
1824
|
-
try {
|
|
1825
|
-
const searchParams = new URLSearchParams({
|
|
1826
|
-
from: (_a = payload.from) != null ? _a : "",
|
|
1827
|
-
search: (_b = payload.search) != null ? _b : ""
|
|
1828
|
-
});
|
|
1829
|
-
if (payload.type) {
|
|
1830
|
-
payload.type.forEach((type) => searchParams.append("type[]", type));
|
|
1831
|
-
}
|
|
1832
|
-
const response = yield textClientInstance.get(
|
|
1833
|
-
`/app_monitoring/${appId}/events?${searchParams.toString()}`,
|
|
1834
|
-
// v1
|
|
1835
|
-
// `/app_monitoring/${appId}/events/logs?${searchParams.toString()}`, // v2
|
|
1836
|
-
getTextClientConfig(authorization)
|
|
1837
|
-
);
|
|
1838
|
-
return response.data;
|
|
1839
|
-
} catch (error) {
|
|
1840
|
-
if (error instanceof Error) {
|
|
1841
|
-
throw new Error(`Couldn't load events log. [${error.message}]`);
|
|
1842
|
-
}
|
|
1843
|
-
throw error;
|
|
1844
|
-
}
|
|
1845
|
-
});
|
|
1846
|
-
}
|
|
1847
|
-
};
|
|
1848
|
-
|
|
1849
|
-
// src/apis/integrations/text/app/monitoring/reports/api.ts
|
|
1850
|
-
var textAppMonitoringReportsApi = {
|
|
1851
|
-
getUptimeReports(appId, payload, authorization) {
|
|
1852
|
-
return __async(this, null, function* () {
|
|
1853
|
-
try {
|
|
1854
|
-
const response = yield textClientInstance.get(
|
|
1855
|
-
`/app_monitoring/${appId}/reports/uptime?${new URLSearchParams({
|
|
1856
|
-
from: payload.from,
|
|
1857
|
-
to: payload.to,
|
|
1858
|
-
resolution: payload.resolution
|
|
1859
|
-
}).toString()}`,
|
|
1761
|
+
`/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
1860
1762
|
getTextClientConfig(authorization)
|
|
1861
1763
|
);
|
|
1862
1764
|
return response.data;
|
|
@@ -1867,141 +1769,12 @@ var textAppMonitoringReportsApi = {
|
|
|
1867
1769
|
throw error;
|
|
1868
1770
|
}
|
|
1869
1771
|
});
|
|
1870
|
-
},
|
|
1871
|
-
getEventReports(appId, payload, authorization) {
|
|
1872
|
-
return __async(this, null, function* () {
|
|
1873
|
-
try {
|
|
1874
|
-
const response = yield textClientInstance.get(
|
|
1875
|
-
`/app_monitoring/${appId}/reports/events?${new URLSearchParams({
|
|
1876
|
-
from: payload.from,
|
|
1877
|
-
to: payload.to,
|
|
1878
|
-
resolution: payload.resolution
|
|
1879
|
-
}).toString()}`,
|
|
1880
|
-
getTextClientConfig(authorization)
|
|
1881
|
-
);
|
|
1882
|
-
return response.data;
|
|
1883
|
-
} catch (error) {
|
|
1884
|
-
if (error instanceof Error) {
|
|
1885
|
-
throw new Error(`Couldn't load event reports. [${error.message}]`);
|
|
1886
|
-
}
|
|
1887
|
-
throw error;
|
|
1888
|
-
}
|
|
1889
|
-
});
|
|
1890
|
-
},
|
|
1891
|
-
getCustomReport(appId, customReportId, authorization) {
|
|
1892
|
-
return __async(this, null, function* () {
|
|
1893
|
-
try {
|
|
1894
|
-
const response = yield textClientInstance.get(
|
|
1895
|
-
`/app_monitoring/${appId}/reports/custom/${customReportId}`,
|
|
1896
|
-
getTextClientConfig(authorization)
|
|
1897
|
-
);
|
|
1898
|
-
return response.data;
|
|
1899
|
-
} catch (error) {
|
|
1900
|
-
if (error instanceof Error) {
|
|
1901
|
-
throw new Error(`Couldn't load custom report. [${error.message}]`);
|
|
1902
|
-
}
|
|
1903
|
-
throw error;
|
|
1904
|
-
}
|
|
1905
|
-
});
|
|
1906
|
-
},
|
|
1907
|
-
getCustomReportData(appId, customReportId, authorization) {
|
|
1908
|
-
return __async(this, null, function* () {
|
|
1909
|
-
try {
|
|
1910
|
-
const response = yield textClientInstance.get(
|
|
1911
|
-
`/app_monitoring/${appId}/reports/custom/${customReportId}/data`,
|
|
1912
|
-
getTextClientConfig(authorization)
|
|
1913
|
-
);
|
|
1914
|
-
return response.data;
|
|
1915
|
-
} catch (error) {
|
|
1916
|
-
if (error instanceof Error) {
|
|
1917
|
-
throw new Error(`Couldn't load custom report data. [${error.message}]`);
|
|
1918
|
-
}
|
|
1919
|
-
throw error;
|
|
1920
|
-
}
|
|
1921
|
-
});
|
|
1922
|
-
},
|
|
1923
|
-
getCustomReports(appId, authorization) {
|
|
1924
|
-
return __async(this, null, function* () {
|
|
1925
|
-
try {
|
|
1926
|
-
const response = yield textClientInstance.get(
|
|
1927
|
-
`/app_monitoring/${appId}/reports/custom`,
|
|
1928
|
-
getTextClientConfig(authorization)
|
|
1929
|
-
);
|
|
1930
|
-
return response.data;
|
|
1931
|
-
} catch (error) {
|
|
1932
|
-
if (error instanceof Error) {
|
|
1933
|
-
throw new Error(`Couldn't load custom reports. [${error.message}]`);
|
|
1934
|
-
}
|
|
1935
|
-
throw error;
|
|
1936
|
-
}
|
|
1937
|
-
});
|
|
1938
|
-
},
|
|
1939
|
-
createCustomReport(appId, customReport, authorization) {
|
|
1940
|
-
return __async(this, null, function* () {
|
|
1941
|
-
try {
|
|
1942
|
-
const response = yield textClientInstance.post(
|
|
1943
|
-
`/app_monitoring/${appId}/reports/custom`,
|
|
1944
|
-
customReport,
|
|
1945
|
-
getTextClientConfig(authorization)
|
|
1946
|
-
);
|
|
1947
|
-
return response.data;
|
|
1948
|
-
} catch (error) {
|
|
1949
|
-
if (error instanceof Error) {
|
|
1950
|
-
throw new Error(`Couldn't create custom report. [${error.message}]`);
|
|
1951
|
-
}
|
|
1952
|
-
throw error;
|
|
1953
|
-
}
|
|
1954
|
-
});
|
|
1955
|
-
},
|
|
1956
|
-
updateCustomReport(appId, customReport, authorization) {
|
|
1957
|
-
return __async(this, null, function* () {
|
|
1958
|
-
try {
|
|
1959
|
-
const response = yield textClientInstance.post(
|
|
1960
|
-
`/app_monitoring/${appId}/reports/custom/${customReport.id}`,
|
|
1961
|
-
customReport,
|
|
1962
|
-
getTextClientConfig(authorization)
|
|
1963
|
-
);
|
|
1964
|
-
return response.data;
|
|
1965
|
-
} catch (error) {
|
|
1966
|
-
if (error instanceof Error) {
|
|
1967
|
-
throw new Error(`Couldn't update custom report. [${error.message}]`);
|
|
1968
|
-
}
|
|
1969
|
-
throw error;
|
|
1970
|
-
}
|
|
1971
|
-
});
|
|
1972
|
-
},
|
|
1973
|
-
deleteCustomReport(appId, customReportId, authorization) {
|
|
1974
|
-
return __async(this, null, function* () {
|
|
1975
|
-
try {
|
|
1976
|
-
const response = yield textClientInstance.delete(
|
|
1977
|
-
`/app_monitoring/${appId}/reports/custom/${customReportId}`,
|
|
1978
|
-
getTextClientConfig(authorization)
|
|
1979
|
-
);
|
|
1980
|
-
return response.data;
|
|
1981
|
-
} catch (error) {
|
|
1982
|
-
if (error instanceof Error) {
|
|
1983
|
-
throw new Error(`Couldn't delete custom report. [${error.message}]`);
|
|
1984
|
-
}
|
|
1985
|
-
throw error;
|
|
1986
|
-
}
|
|
1987
|
-
});
|
|
1988
1772
|
}
|
|
1989
1773
|
};
|
|
1990
1774
|
|
|
1991
|
-
// src/apis/integrations/text/app/monitoring/api.ts
|
|
1992
|
-
var textAppMonitoringApi = {
|
|
1993
|
-
events: textAppMonitoringEventsApi,
|
|
1994
|
-
reports: textAppMonitoringReportsApi
|
|
1995
|
-
};
|
|
1996
|
-
|
|
1997
|
-
// src/apis/integrations/text/app/api.ts
|
|
1998
|
-
var textAppApi = {
|
|
1999
|
-
monitoring: textAppMonitoringApi
|
|
2000
|
-
};
|
|
2001
|
-
|
|
2002
1775
|
// src/apis/integrations/text/api.ts
|
|
2003
1776
|
var textApi = {
|
|
2004
|
-
|
|
1777
|
+
uptime: textUptimeApi
|
|
2005
1778
|
};
|
|
2006
1779
|
|
|
2007
1780
|
// src/apis/integrations/vercel/api.ts
|
|
@@ -2278,6 +2051,17 @@ var vercelProjectApi = {
|
|
|
2278
2051
|
return createdEnv;
|
|
2279
2052
|
}
|
|
2280
2053
|
});
|
|
2054
|
+
},
|
|
2055
|
+
removeProjectEnv(projectId, envId, authorization) {
|
|
2056
|
+
return __async(this, null, function* () {
|
|
2057
|
+
const response = yield vercelClientInstance.delete(
|
|
2058
|
+
`/v9/projects/${projectId}/env/${envId}`,
|
|
2059
|
+
getVercelClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2060
|
+
ensureAuthorizationToken: true
|
|
2061
|
+
}))
|
|
2062
|
+
);
|
|
2063
|
+
return response.data;
|
|
2064
|
+
});
|
|
2281
2065
|
}
|
|
2282
2066
|
};
|
|
2283
2067
|
|
|
@@ -3841,6 +3625,19 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
3841
3625
|
}
|
|
3842
3626
|
};
|
|
3843
3627
|
|
|
3628
|
+
// src/apis/platform/dps/applications/application/reporting/api.ts
|
|
3629
|
+
var platformDpsApplicationReportingApi = {
|
|
3630
|
+
sendEvent(appId, event, authorization) {
|
|
3631
|
+
return __async(this, null, function* () {
|
|
3632
|
+
yield platformDpsClientInstance.post(
|
|
3633
|
+
`/apps/${appId}/events`,
|
|
3634
|
+
event,
|
|
3635
|
+
getPlatformDpsClientConfig(authorization)
|
|
3636
|
+
);
|
|
3637
|
+
});
|
|
3638
|
+
}
|
|
3639
|
+
};
|
|
3640
|
+
|
|
3844
3641
|
// src/apis/platform/dps/applications/application/resources/api.ts
|
|
3845
3642
|
var platformDpsApplicationResourcesApi = {
|
|
3846
3643
|
getAppUpgrades(appId, authorization) {
|
|
@@ -4108,6 +3905,7 @@ var platformDpsApplicationApi = {
|
|
|
4108
3905
|
onboarding: platformDpsApplicationOnboardingApi,
|
|
4109
3906
|
payment: platformDpsApplicationPaymentApi,
|
|
4110
3907
|
product: platformDpsApplicationProductApi,
|
|
3908
|
+
reporting: platformDpsApplicationReportingApi,
|
|
4111
3909
|
resource: platformDpsApplicationResourcesApi,
|
|
4112
3910
|
review: platformDpsApplicationReviewApi,
|
|
4113
3911
|
webhooks: platformDpsApplicationWebhooksApi,
|
|
@@ -5208,6 +5006,13 @@ var platformApi = {
|
|
|
5208
5006
|
dps: platformDpsApi
|
|
5209
5007
|
};
|
|
5210
5008
|
|
|
5009
|
+
// src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
|
|
5010
|
+
var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
|
|
5011
|
+
ErrorType2["4xx"] = "4xx";
|
|
5012
|
+
ErrorType2["5xx"] = "5xx";
|
|
5013
|
+
return ErrorType2;
|
|
5014
|
+
})(ErrorType || {});
|
|
5015
|
+
|
|
5211
5016
|
// src/apis/api.ts
|
|
5212
5017
|
var api = {
|
|
5213
5018
|
platform: platformApi,
|
|
@@ -5241,11 +5046,14 @@ function initApi(config, tokens) {
|
|
|
5241
5046
|
sentry: (_l = tokens.sentry) == null ? void 0 : _l.token
|
|
5242
5047
|
} : void 0
|
|
5243
5048
|
);
|
|
5244
|
-
|
|
5245
|
-
(_m = config.urls.
|
|
5049
|
+
initTextClientInstance(
|
|
5050
|
+
(_m = config.urls.platform) == null ? void 0 : _m.text,
|
|
5246
5051
|
(_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
|
|
5247
5052
|
);
|
|
5248
|
-
|
|
5053
|
+
initLiveChatClientInstance(
|
|
5054
|
+
(_o = config.urls.products) == null ? void 0 : _o.livechat,
|
|
5055
|
+
(_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps
|
|
5056
|
+
);
|
|
5249
5057
|
initGithubClientInstance((_q = tokens == null ? void 0 : tokens.github) == null ? void 0 : _q.apps);
|
|
5250
5058
|
initNetlifyClientInstance((_r = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _r.token);
|
|
5251
5059
|
initVercelClientInstance((_s = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _s.token);
|
|
@@ -5269,6 +5077,7 @@ var serializerBase64 = {
|
|
|
5269
5077
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5270
5078
|
0 && (module.exports = {
|
|
5271
5079
|
API_NOTIFICATIONS,
|
|
5080
|
+
ErrorType,
|
|
5272
5081
|
UnauthorizeApiError,
|
|
5273
5082
|
api,
|
|
5274
5083
|
getAppAutoReviewPayload,
|
package/dist/index.mjs
CHANGED
|
@@ -735,6 +735,23 @@ var netlifyAccountApi = {
|
|
|
735
735
|
authorization
|
|
736
736
|
);
|
|
737
737
|
});
|
|
738
|
+
},
|
|
739
|
+
removeAccountEnv(accountId, siteId, envKey, authorization) {
|
|
740
|
+
return __async(this, null, function* () {
|
|
741
|
+
if (!accountId) {
|
|
742
|
+
accountId = yield this.getAccount(authorization);
|
|
743
|
+
}
|
|
744
|
+
if (!accountId) {
|
|
745
|
+
throw new Error("No account");
|
|
746
|
+
}
|
|
747
|
+
const response = yield netlifyClientInstance.delete(
|
|
748
|
+
`/accounts/${accountId}/env/${envKey}?site_id=${siteId}`,
|
|
749
|
+
getNetlifyClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
750
|
+
ensureAuthorizationToken: true
|
|
751
|
+
}))
|
|
752
|
+
);
|
|
753
|
+
return response.data;
|
|
754
|
+
});
|
|
738
755
|
}
|
|
739
756
|
};
|
|
740
757
|
|
|
@@ -1647,129 +1664,13 @@ function initTextClientInstance(baseUrl, token) {
|
|
|
1647
1664
|
}
|
|
1648
1665
|
}
|
|
1649
1666
|
|
|
1650
|
-
// src/apis/integrations/text/
|
|
1651
|
-
var
|
|
1652
|
-
|
|
1667
|
+
// src/apis/integrations/text/uptime/api.ts
|
|
1668
|
+
var textUptimeApi = {
|
|
1669
|
+
getAppUptimeReports(appId, payload, authorization) {
|
|
1653
1670
|
return __async(this, null, function* () {
|
|
1654
1671
|
try {
|
|
1655
1672
|
const response = yield textClientInstance.get(
|
|
1656
|
-
`/app_monitoring/${appId}/
|
|
1657
|
-
getTextClientConfig(authorization)
|
|
1658
|
-
);
|
|
1659
|
-
return response.data;
|
|
1660
|
-
} catch (error) {
|
|
1661
|
-
if (error instanceof Error) {
|
|
1662
|
-
throw new Error(`Couldn't load event. [${error.message}]`);
|
|
1663
|
-
}
|
|
1664
|
-
throw error;
|
|
1665
|
-
}
|
|
1666
|
-
});
|
|
1667
|
-
},
|
|
1668
|
-
getEvents(appId, authorization) {
|
|
1669
|
-
return __async(this, null, function* () {
|
|
1670
|
-
try {
|
|
1671
|
-
const response = yield textClientInstance.get(
|
|
1672
|
-
`/app_monitoring/${appId}/events`,
|
|
1673
|
-
getTextClientConfig(authorization)
|
|
1674
|
-
);
|
|
1675
|
-
return response.data;
|
|
1676
|
-
} catch (error) {
|
|
1677
|
-
if (error instanceof Error) {
|
|
1678
|
-
throw new Error(`Couldn't load events. [${error.message}]`);
|
|
1679
|
-
}
|
|
1680
|
-
throw error;
|
|
1681
|
-
}
|
|
1682
|
-
});
|
|
1683
|
-
},
|
|
1684
|
-
upsertEvent(appId, event, authorization) {
|
|
1685
|
-
return __async(this, null, function* () {
|
|
1686
|
-
try {
|
|
1687
|
-
const response = yield textClientInstance.post(
|
|
1688
|
-
`/app_monitoring/${appId}/events/${event.key}`,
|
|
1689
|
-
event,
|
|
1690
|
-
getTextClientConfig(authorization)
|
|
1691
|
-
);
|
|
1692
|
-
return response.data;
|
|
1693
|
-
} catch (error) {
|
|
1694
|
-
if (error instanceof Error) {
|
|
1695
|
-
throw new Error(`Couldn't upsert event. [${error.message}]`);
|
|
1696
|
-
}
|
|
1697
|
-
throw error;
|
|
1698
|
-
}
|
|
1699
|
-
});
|
|
1700
|
-
},
|
|
1701
|
-
deleteEvent(appId, eventKey, authorization) {
|
|
1702
|
-
return __async(this, null, function* () {
|
|
1703
|
-
try {
|
|
1704
|
-
const response = yield textClientInstance.delete(
|
|
1705
|
-
`/app_monitoring/${appId}/events/${eventKey}`,
|
|
1706
|
-
getTextClientConfig(authorization)
|
|
1707
|
-
);
|
|
1708
|
-
return response.data;
|
|
1709
|
-
} catch (error) {
|
|
1710
|
-
if (error instanceof Error) {
|
|
1711
|
-
throw new Error(`Couldn't delete event. [${error.message}]`);
|
|
1712
|
-
}
|
|
1713
|
-
throw error;
|
|
1714
|
-
}
|
|
1715
|
-
});
|
|
1716
|
-
},
|
|
1717
|
-
sendEvent(appId, data, authorization) {
|
|
1718
|
-
return __async(this, null, function* () {
|
|
1719
|
-
try {
|
|
1720
|
-
const response = yield textClientInstance.post(
|
|
1721
|
-
`/app_monitoring/${appId}/events`,
|
|
1722
|
-
data,
|
|
1723
|
-
getTextClientConfig(authorization)
|
|
1724
|
-
);
|
|
1725
|
-
return response.data;
|
|
1726
|
-
} catch (error) {
|
|
1727
|
-
if (error instanceof Error) {
|
|
1728
|
-
throw new Error(`Couldn't send events. [${error.message}]`);
|
|
1729
|
-
}
|
|
1730
|
-
throw error;
|
|
1731
|
-
}
|
|
1732
|
-
});
|
|
1733
|
-
},
|
|
1734
|
-
getEventsLog(appId, payload, authorization) {
|
|
1735
|
-
return __async(this, null, function* () {
|
|
1736
|
-
var _a, _b;
|
|
1737
|
-
try {
|
|
1738
|
-
const searchParams = new URLSearchParams({
|
|
1739
|
-
from: (_a = payload.from) != null ? _a : "",
|
|
1740
|
-
search: (_b = payload.search) != null ? _b : ""
|
|
1741
|
-
});
|
|
1742
|
-
if (payload.type) {
|
|
1743
|
-
payload.type.forEach((type) => searchParams.append("type[]", type));
|
|
1744
|
-
}
|
|
1745
|
-
const response = yield textClientInstance.get(
|
|
1746
|
-
`/app_monitoring/${appId}/events?${searchParams.toString()}`,
|
|
1747
|
-
// v1
|
|
1748
|
-
// `/app_monitoring/${appId}/events/logs?${searchParams.toString()}`, // v2
|
|
1749
|
-
getTextClientConfig(authorization)
|
|
1750
|
-
);
|
|
1751
|
-
return response.data;
|
|
1752
|
-
} catch (error) {
|
|
1753
|
-
if (error instanceof Error) {
|
|
1754
|
-
throw new Error(`Couldn't load events log. [${error.message}]`);
|
|
1755
|
-
}
|
|
1756
|
-
throw error;
|
|
1757
|
-
}
|
|
1758
|
-
});
|
|
1759
|
-
}
|
|
1760
|
-
};
|
|
1761
|
-
|
|
1762
|
-
// src/apis/integrations/text/app/monitoring/reports/api.ts
|
|
1763
|
-
var textAppMonitoringReportsApi = {
|
|
1764
|
-
getUptimeReports(appId, payload, authorization) {
|
|
1765
|
-
return __async(this, null, function* () {
|
|
1766
|
-
try {
|
|
1767
|
-
const response = yield textClientInstance.get(
|
|
1768
|
-
`/app_monitoring/${appId}/reports/uptime?${new URLSearchParams({
|
|
1769
|
-
from: payload.from,
|
|
1770
|
-
to: payload.to,
|
|
1771
|
-
resolution: payload.resolution
|
|
1772
|
-
}).toString()}`,
|
|
1673
|
+
`/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
|
|
1773
1674
|
getTextClientConfig(authorization)
|
|
1774
1675
|
);
|
|
1775
1676
|
return response.data;
|
|
@@ -1780,141 +1681,12 @@ var textAppMonitoringReportsApi = {
|
|
|
1780
1681
|
throw error;
|
|
1781
1682
|
}
|
|
1782
1683
|
});
|
|
1783
|
-
},
|
|
1784
|
-
getEventReports(appId, payload, authorization) {
|
|
1785
|
-
return __async(this, null, function* () {
|
|
1786
|
-
try {
|
|
1787
|
-
const response = yield textClientInstance.get(
|
|
1788
|
-
`/app_monitoring/${appId}/reports/events?${new URLSearchParams({
|
|
1789
|
-
from: payload.from,
|
|
1790
|
-
to: payload.to,
|
|
1791
|
-
resolution: payload.resolution
|
|
1792
|
-
}).toString()}`,
|
|
1793
|
-
getTextClientConfig(authorization)
|
|
1794
|
-
);
|
|
1795
|
-
return response.data;
|
|
1796
|
-
} catch (error) {
|
|
1797
|
-
if (error instanceof Error) {
|
|
1798
|
-
throw new Error(`Couldn't load event reports. [${error.message}]`);
|
|
1799
|
-
}
|
|
1800
|
-
throw error;
|
|
1801
|
-
}
|
|
1802
|
-
});
|
|
1803
|
-
},
|
|
1804
|
-
getCustomReport(appId, customReportId, authorization) {
|
|
1805
|
-
return __async(this, null, function* () {
|
|
1806
|
-
try {
|
|
1807
|
-
const response = yield textClientInstance.get(
|
|
1808
|
-
`/app_monitoring/${appId}/reports/custom/${customReportId}`,
|
|
1809
|
-
getTextClientConfig(authorization)
|
|
1810
|
-
);
|
|
1811
|
-
return response.data;
|
|
1812
|
-
} catch (error) {
|
|
1813
|
-
if (error instanceof Error) {
|
|
1814
|
-
throw new Error(`Couldn't load custom report. [${error.message}]`);
|
|
1815
|
-
}
|
|
1816
|
-
throw error;
|
|
1817
|
-
}
|
|
1818
|
-
});
|
|
1819
|
-
},
|
|
1820
|
-
getCustomReportData(appId, customReportId, authorization) {
|
|
1821
|
-
return __async(this, null, function* () {
|
|
1822
|
-
try {
|
|
1823
|
-
const response = yield textClientInstance.get(
|
|
1824
|
-
`/app_monitoring/${appId}/reports/custom/${customReportId}/data`,
|
|
1825
|
-
getTextClientConfig(authorization)
|
|
1826
|
-
);
|
|
1827
|
-
return response.data;
|
|
1828
|
-
} catch (error) {
|
|
1829
|
-
if (error instanceof Error) {
|
|
1830
|
-
throw new Error(`Couldn't load custom report data. [${error.message}]`);
|
|
1831
|
-
}
|
|
1832
|
-
throw error;
|
|
1833
|
-
}
|
|
1834
|
-
});
|
|
1835
|
-
},
|
|
1836
|
-
getCustomReports(appId, authorization) {
|
|
1837
|
-
return __async(this, null, function* () {
|
|
1838
|
-
try {
|
|
1839
|
-
const response = yield textClientInstance.get(
|
|
1840
|
-
`/app_monitoring/${appId}/reports/custom`,
|
|
1841
|
-
getTextClientConfig(authorization)
|
|
1842
|
-
);
|
|
1843
|
-
return response.data;
|
|
1844
|
-
} catch (error) {
|
|
1845
|
-
if (error instanceof Error) {
|
|
1846
|
-
throw new Error(`Couldn't load custom reports. [${error.message}]`);
|
|
1847
|
-
}
|
|
1848
|
-
throw error;
|
|
1849
|
-
}
|
|
1850
|
-
});
|
|
1851
|
-
},
|
|
1852
|
-
createCustomReport(appId, customReport, authorization) {
|
|
1853
|
-
return __async(this, null, function* () {
|
|
1854
|
-
try {
|
|
1855
|
-
const response = yield textClientInstance.post(
|
|
1856
|
-
`/app_monitoring/${appId}/reports/custom`,
|
|
1857
|
-
customReport,
|
|
1858
|
-
getTextClientConfig(authorization)
|
|
1859
|
-
);
|
|
1860
|
-
return response.data;
|
|
1861
|
-
} catch (error) {
|
|
1862
|
-
if (error instanceof Error) {
|
|
1863
|
-
throw new Error(`Couldn't create custom report. [${error.message}]`);
|
|
1864
|
-
}
|
|
1865
|
-
throw error;
|
|
1866
|
-
}
|
|
1867
|
-
});
|
|
1868
|
-
},
|
|
1869
|
-
updateCustomReport(appId, customReport, authorization) {
|
|
1870
|
-
return __async(this, null, function* () {
|
|
1871
|
-
try {
|
|
1872
|
-
const response = yield textClientInstance.post(
|
|
1873
|
-
`/app_monitoring/${appId}/reports/custom/${customReport.id}`,
|
|
1874
|
-
customReport,
|
|
1875
|
-
getTextClientConfig(authorization)
|
|
1876
|
-
);
|
|
1877
|
-
return response.data;
|
|
1878
|
-
} catch (error) {
|
|
1879
|
-
if (error instanceof Error) {
|
|
1880
|
-
throw new Error(`Couldn't update custom report. [${error.message}]`);
|
|
1881
|
-
}
|
|
1882
|
-
throw error;
|
|
1883
|
-
}
|
|
1884
|
-
});
|
|
1885
|
-
},
|
|
1886
|
-
deleteCustomReport(appId, customReportId, authorization) {
|
|
1887
|
-
return __async(this, null, function* () {
|
|
1888
|
-
try {
|
|
1889
|
-
const response = yield textClientInstance.delete(
|
|
1890
|
-
`/app_monitoring/${appId}/reports/custom/${customReportId}`,
|
|
1891
|
-
getTextClientConfig(authorization)
|
|
1892
|
-
);
|
|
1893
|
-
return response.data;
|
|
1894
|
-
} catch (error) {
|
|
1895
|
-
if (error instanceof Error) {
|
|
1896
|
-
throw new Error(`Couldn't delete custom report. [${error.message}]`);
|
|
1897
|
-
}
|
|
1898
|
-
throw error;
|
|
1899
|
-
}
|
|
1900
|
-
});
|
|
1901
1684
|
}
|
|
1902
1685
|
};
|
|
1903
1686
|
|
|
1904
|
-
// src/apis/integrations/text/app/monitoring/api.ts
|
|
1905
|
-
var textAppMonitoringApi = {
|
|
1906
|
-
events: textAppMonitoringEventsApi,
|
|
1907
|
-
reports: textAppMonitoringReportsApi
|
|
1908
|
-
};
|
|
1909
|
-
|
|
1910
|
-
// src/apis/integrations/text/app/api.ts
|
|
1911
|
-
var textAppApi = {
|
|
1912
|
-
monitoring: textAppMonitoringApi
|
|
1913
|
-
};
|
|
1914
|
-
|
|
1915
1687
|
// src/apis/integrations/text/api.ts
|
|
1916
1688
|
var textApi = {
|
|
1917
|
-
|
|
1689
|
+
uptime: textUptimeApi
|
|
1918
1690
|
};
|
|
1919
1691
|
|
|
1920
1692
|
// src/apis/integrations/vercel/api.ts
|
|
@@ -2191,6 +1963,17 @@ var vercelProjectApi = {
|
|
|
2191
1963
|
return createdEnv;
|
|
2192
1964
|
}
|
|
2193
1965
|
});
|
|
1966
|
+
},
|
|
1967
|
+
removeProjectEnv(projectId, envId, authorization) {
|
|
1968
|
+
return __async(this, null, function* () {
|
|
1969
|
+
const response = yield vercelClientInstance.delete(
|
|
1970
|
+
`/v9/projects/${projectId}/env/${envId}`,
|
|
1971
|
+
getVercelClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
1972
|
+
ensureAuthorizationToken: true
|
|
1973
|
+
}))
|
|
1974
|
+
);
|
|
1975
|
+
return response.data;
|
|
1976
|
+
});
|
|
2194
1977
|
}
|
|
2195
1978
|
};
|
|
2196
1979
|
|
|
@@ -3754,6 +3537,19 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
3754
3537
|
}
|
|
3755
3538
|
};
|
|
3756
3539
|
|
|
3540
|
+
// src/apis/platform/dps/applications/application/reporting/api.ts
|
|
3541
|
+
var platformDpsApplicationReportingApi = {
|
|
3542
|
+
sendEvent(appId, event, authorization) {
|
|
3543
|
+
return __async(this, null, function* () {
|
|
3544
|
+
yield platformDpsClientInstance.post(
|
|
3545
|
+
`/apps/${appId}/events`,
|
|
3546
|
+
event,
|
|
3547
|
+
getPlatformDpsClientConfig(authorization)
|
|
3548
|
+
);
|
|
3549
|
+
});
|
|
3550
|
+
}
|
|
3551
|
+
};
|
|
3552
|
+
|
|
3757
3553
|
// src/apis/platform/dps/applications/application/resources/api.ts
|
|
3758
3554
|
var platformDpsApplicationResourcesApi = {
|
|
3759
3555
|
getAppUpgrades(appId, authorization) {
|
|
@@ -4021,6 +3817,7 @@ var platformDpsApplicationApi = {
|
|
|
4021
3817
|
onboarding: platformDpsApplicationOnboardingApi,
|
|
4022
3818
|
payment: platformDpsApplicationPaymentApi,
|
|
4023
3819
|
product: platformDpsApplicationProductApi,
|
|
3820
|
+
reporting: platformDpsApplicationReportingApi,
|
|
4024
3821
|
resource: platformDpsApplicationResourcesApi,
|
|
4025
3822
|
review: platformDpsApplicationReviewApi,
|
|
4026
3823
|
webhooks: platformDpsApplicationWebhooksApi,
|
|
@@ -5121,6 +4918,13 @@ var platformApi = {
|
|
|
5121
4918
|
dps: platformDpsApi
|
|
5122
4919
|
};
|
|
5123
4920
|
|
|
4921
|
+
// src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
|
|
4922
|
+
var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
|
|
4923
|
+
ErrorType2["4xx"] = "4xx";
|
|
4924
|
+
ErrorType2["5xx"] = "5xx";
|
|
4925
|
+
return ErrorType2;
|
|
4926
|
+
})(ErrorType || {});
|
|
4927
|
+
|
|
5124
4928
|
// src/apis/api.ts
|
|
5125
4929
|
var api = {
|
|
5126
4930
|
platform: platformApi,
|
|
@@ -5154,11 +4958,14 @@ function initApi(config, tokens) {
|
|
|
5154
4958
|
sentry: (_l = tokens.sentry) == null ? void 0 : _l.token
|
|
5155
4959
|
} : void 0
|
|
5156
4960
|
);
|
|
5157
|
-
|
|
5158
|
-
(_m = config.urls.
|
|
4961
|
+
initTextClientInstance(
|
|
4962
|
+
(_m = config.urls.platform) == null ? void 0 : _m.text,
|
|
5159
4963
|
(_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
|
|
5160
4964
|
);
|
|
5161
|
-
|
|
4965
|
+
initLiveChatClientInstance(
|
|
4966
|
+
(_o = config.urls.products) == null ? void 0 : _o.livechat,
|
|
4967
|
+
(_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps
|
|
4968
|
+
);
|
|
5162
4969
|
initGithubClientInstance((_q = tokens == null ? void 0 : tokens.github) == null ? void 0 : _q.apps);
|
|
5163
4970
|
initNetlifyClientInstance((_r = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _r.token);
|
|
5164
4971
|
initVercelClientInstance((_s = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _s.token);
|
|
@@ -5181,6 +4988,7 @@ var serializerBase64 = {
|
|
|
5181
4988
|
};
|
|
5182
4989
|
export {
|
|
5183
4990
|
API_NOTIFICATIONS,
|
|
4991
|
+
ErrorType,
|
|
5184
4992
|
UnauthorizeApiError,
|
|
5185
4993
|
api,
|
|
5186
4994
|
getAppAutoReviewPayload,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
20
|
"config": "0.0.0",
|
|
21
21
|
"eslint-config-custom-lib": "0.0.1",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"tsconfig": "0.0.0",
|
|
23
|
+
"types": "0.0.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|