@livechat/developer-studio-api 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -211,6 +211,10 @@ interface PlanetScaleOrganization {
211
211
  id: string;
212
212
  type: string;
213
213
  name: string;
214
+ free_databases_remaining: number;
215
+ has_card: boolean;
216
+ payment_info_required: boolean;
217
+ valid_billing_info: boolean;
214
218
  }
215
219
 
216
220
  type GetPlanetScaleOrganizationsResult = PlanetScalePaginatedResult & {
@@ -388,16 +392,72 @@ declare function getSentryClientConfig(options?: SentryClientInstanceOptions): A
388
392
  declare function initSentryClientInstance(token?: string): void;
389
393
  declare function updateSentryClientInstance(token: string | undefined): void;
390
394
 
391
- interface UptimeDto {
392
- [k: string]: {
393
- [k: string]: number;
395
+ interface AppMonitoringCustomReport {
396
+ id: string;
397
+ title: string;
398
+ events: string[];
399
+ }
400
+
401
+ interface AppMonitoringCustomReportDataDto {
402
+ [appId: string]: {
403
+ [date: string]: {
404
+ [eventKey: string]: number;
405
+ };
406
+ };
407
+ }
408
+
409
+ interface AppMonitoringUptimeReportDto {
410
+ [appId: string]: {
411
+ [date: string]: number;
394
412
  };
395
413
  }
396
414
 
397
- interface GetAppUptimeReportsPayload {
415
+ interface AppMonitoringEventsReportDto {
416
+ [appId: string]: {
417
+ [date: string]: {
418
+ [eventKey: string]: number;
419
+ };
420
+ };
421
+ }
422
+
423
+ interface AppMonitoringReportParams {
398
424
  from: string;
399
425
  to: string;
400
- resolution: 'hourly' | 'daily' | 'monthly';
426
+ resolution: "hourly" | "daily" | "monthly";
427
+ }
428
+
429
+ type GetAppMonitoringCustomReportDataPayload = AppMonitoringReportParams;
430
+
431
+ type GetAppMonitoringUptimeReportPayload = AppMonitoringReportParams;
432
+
433
+ type GetAppMonitoringEventsReportPayload = AppMonitoringReportParams;
434
+
435
+ interface AppMonitoringEvent {
436
+ key: string;
437
+ name: string;
438
+ }
439
+
440
+ interface AppMonitoringEventData {
441
+ organization_id: string;
442
+ type: string;
443
+ payload?: string;
444
+ }
445
+
446
+ type AppMonitoringEventsLogItem = {
447
+ sent_at: string;
448
+ } & AppMonitoringEventData;
449
+ interface AppMonitoringEventsLog {
450
+ [appId: string]: AppMonitoringEventsLogItem[];
451
+ }
452
+
453
+ interface GetAppMonitoringEventsLogPayload {
454
+ from?: string;
455
+ type?: string[];
456
+ search?: string;
457
+ }
458
+ interface GetAppMonitoringEventsLogResponse {
459
+ events: AppMonitoringEventsLog;
460
+ next_page_from?: string;
401
461
  }
402
462
 
403
463
  interface TextClientInstanceAuthorization {
@@ -1338,6 +1398,7 @@ interface AppVercelStorageConfig {
1338
1398
  interface AppPlanetScaleStorageConfig {
1339
1399
  organization: string;
1340
1400
  databaseName: string;
1401
+ isSeeded: boolean;
1341
1402
  }
1342
1403
  interface AppSentryLoggerConfig {
1343
1404
  name: string;
@@ -1438,32 +1499,6 @@ interface ApplicationPropertyDto {
1438
1499
  value: string;
1439
1500
  }
1440
1501
 
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
-
1467
1502
  interface AppResourceDto {
1468
1503
  }
1469
1504
 
@@ -1982,9 +2017,6 @@ declare const api: {
1982
2017
  product: {
1983
2018
  updateProduct(appId: string, payload: UpdateApplicationProductPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
1984
2019
  };
1985
- reporting: {
1986
- sendEvent<TPayload = unknown>(appId: string, event: ReportingEvent<TPayload>, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
1987
- };
1988
2020
  resource: {
1989
2021
  getAppUpgrades(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<AppResourceDto>>;
1990
2022
  createAppUpgrade(appId: string, body: UpsertAppResourcePayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<void>>;
@@ -2284,8 +2316,27 @@ declare const api: {
2284
2316
  deleteProject(projectFullName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<any>;
2285
2317
  };
2286
2318
  text: {
2287
- uptime: {
2288
- getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
2319
+ app: {
2320
+ monitoring: {
2321
+ events: {
2322
+ getEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
2323
+ getEvents(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent[]>;
2324
+ upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2325
+ deleteEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2326
+ sendEvent(appId: string, data: AppMonitoringEventData, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2327
+ getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<GetAppMonitoringEventsLogResponse>;
2328
+ };
2329
+ reports: {
2330
+ getUptimeReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
2331
+ getEventReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
2332
+ getCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport>;
2333
+ getCustomReportData(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReportDataDto>;
2334
+ getCustomReports(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport[]>;
2335
+ createCustomReport(appId: string, customReport: Omit<AppMonitoringCustomReport, "id">, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2336
+ updateCustomReport(appId: string, customReport: AppMonitoringCustomReport, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2337
+ deleteCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2338
+ };
2339
+ };
2289
2340
  };
2290
2341
  };
2291
2342
  };
@@ -2297,11 +2348,13 @@ declare function initApi(config: {
2297
2348
  accounts?: string;
2298
2349
  adapter?: string;
2299
2350
  dps?: string;
2300
- text?: string;
2301
2351
  };
2302
2352
  products?: {
2303
2353
  livechat?: string;
2304
2354
  };
2355
+ integrations?: {
2356
+ text?: string;
2357
+ };
2305
2358
  };
2306
2359
  }, tokens?: {
2307
2360
  platform?: {
@@ -2353,4 +2406,4 @@ declare const serializerBase64: {
2353
2406
  deserialize<T_1>(message?: string): T_1 | undefined;
2354
2407
  };
2355
2408
 
2356
- 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 };
2409
+ export { API_NOTIFICATIONS, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider, AppMonitoringCustomReport, AppMonitoringCustomReportDataDto, AppMonitoringEvent, AppMonitoringEventData, AppMonitoringEventsLog, AppMonitoringEventsLogItem, AppMonitoringEventsReportDto, AppMonitoringReportParams, AppMonitoringUptimeReportDto, 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, DeveloperLedgerParams, DeveloperMessage, DeveloperMessageBaseDto, DeveloperMessageDto, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, 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, 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, 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
@@ -211,6 +211,10 @@ interface PlanetScaleOrganization {
211
211
  id: string;
212
212
  type: string;
213
213
  name: string;
214
+ free_databases_remaining: number;
215
+ has_card: boolean;
216
+ payment_info_required: boolean;
217
+ valid_billing_info: boolean;
214
218
  }
215
219
 
216
220
  type GetPlanetScaleOrganizationsResult = PlanetScalePaginatedResult & {
@@ -388,16 +392,72 @@ declare function getSentryClientConfig(options?: SentryClientInstanceOptions): A
388
392
  declare function initSentryClientInstance(token?: string): void;
389
393
  declare function updateSentryClientInstance(token: string | undefined): void;
390
394
 
391
- interface UptimeDto {
392
- [k: string]: {
393
- [k: string]: number;
395
+ interface AppMonitoringCustomReport {
396
+ id: string;
397
+ title: string;
398
+ events: string[];
399
+ }
400
+
401
+ interface AppMonitoringCustomReportDataDto {
402
+ [appId: string]: {
403
+ [date: string]: {
404
+ [eventKey: string]: number;
405
+ };
406
+ };
407
+ }
408
+
409
+ interface AppMonitoringUptimeReportDto {
410
+ [appId: string]: {
411
+ [date: string]: number;
394
412
  };
395
413
  }
396
414
 
397
- interface GetAppUptimeReportsPayload {
415
+ interface AppMonitoringEventsReportDto {
416
+ [appId: string]: {
417
+ [date: string]: {
418
+ [eventKey: string]: number;
419
+ };
420
+ };
421
+ }
422
+
423
+ interface AppMonitoringReportParams {
398
424
  from: string;
399
425
  to: string;
400
- resolution: 'hourly' | 'daily' | 'monthly';
426
+ resolution: "hourly" | "daily" | "monthly";
427
+ }
428
+
429
+ type GetAppMonitoringCustomReportDataPayload = AppMonitoringReportParams;
430
+
431
+ type GetAppMonitoringUptimeReportPayload = AppMonitoringReportParams;
432
+
433
+ type GetAppMonitoringEventsReportPayload = AppMonitoringReportParams;
434
+
435
+ interface AppMonitoringEvent {
436
+ key: string;
437
+ name: string;
438
+ }
439
+
440
+ interface AppMonitoringEventData {
441
+ organization_id: string;
442
+ type: string;
443
+ payload?: string;
444
+ }
445
+
446
+ type AppMonitoringEventsLogItem = {
447
+ sent_at: string;
448
+ } & AppMonitoringEventData;
449
+ interface AppMonitoringEventsLog {
450
+ [appId: string]: AppMonitoringEventsLogItem[];
451
+ }
452
+
453
+ interface GetAppMonitoringEventsLogPayload {
454
+ from?: string;
455
+ type?: string[];
456
+ search?: string;
457
+ }
458
+ interface GetAppMonitoringEventsLogResponse {
459
+ events: AppMonitoringEventsLog;
460
+ next_page_from?: string;
401
461
  }
402
462
 
403
463
  interface TextClientInstanceAuthorization {
@@ -1338,6 +1398,7 @@ interface AppVercelStorageConfig {
1338
1398
  interface AppPlanetScaleStorageConfig {
1339
1399
  organization: string;
1340
1400
  databaseName: string;
1401
+ isSeeded: boolean;
1341
1402
  }
1342
1403
  interface AppSentryLoggerConfig {
1343
1404
  name: string;
@@ -1438,32 +1499,6 @@ interface ApplicationPropertyDto {
1438
1499
  value: string;
1439
1500
  }
1440
1501
 
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
-
1467
1502
  interface AppResourceDto {
1468
1503
  }
1469
1504
 
@@ -1982,9 +2017,6 @@ declare const api: {
1982
2017
  product: {
1983
2018
  updateProduct(appId: string, payload: UpdateApplicationProductPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
1984
2019
  };
1985
- reporting: {
1986
- sendEvent<TPayload = unknown>(appId: string, event: ReportingEvent<TPayload>, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
1987
- };
1988
2020
  resource: {
1989
2021
  getAppUpgrades(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<AppResourceDto>>;
1990
2022
  createAppUpgrade(appId: string, body: UpsertAppResourcePayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<void>>;
@@ -2284,8 +2316,27 @@ declare const api: {
2284
2316
  deleteProject(projectFullName: string, authorization?: SentryClientInstanceAuthorization | undefined): Promise<any>;
2285
2317
  };
2286
2318
  text: {
2287
- uptime: {
2288
- getAppUptimeReports(appId: string, payload: GetAppUptimeReportsPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<UptimeDto>;
2319
+ app: {
2320
+ monitoring: {
2321
+ events: {
2322
+ getEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
2323
+ getEvents(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent[]>;
2324
+ upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2325
+ deleteEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2326
+ sendEvent(appId: string, data: AppMonitoringEventData, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2327
+ getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<GetAppMonitoringEventsLogResponse>;
2328
+ };
2329
+ reports: {
2330
+ getUptimeReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
2331
+ getEventReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
2332
+ getCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport>;
2333
+ getCustomReportData(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReportDataDto>;
2334
+ getCustomReports(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport[]>;
2335
+ createCustomReport(appId: string, customReport: Omit<AppMonitoringCustomReport, "id">, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2336
+ updateCustomReport(appId: string, customReport: AppMonitoringCustomReport, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2337
+ deleteCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2338
+ };
2339
+ };
2289
2340
  };
2290
2341
  };
2291
2342
  };
@@ -2297,11 +2348,13 @@ declare function initApi(config: {
2297
2348
  accounts?: string;
2298
2349
  adapter?: string;
2299
2350
  dps?: string;
2300
- text?: string;
2301
2351
  };
2302
2352
  products?: {
2303
2353
  livechat?: string;
2304
2354
  };
2355
+ integrations?: {
2356
+ text?: string;
2357
+ };
2305
2358
  };
2306
2359
  }, tokens?: {
2307
2360
  platform?: {
@@ -2353,4 +2406,4 @@ declare const serializerBase64: {
2353
2406
  deserialize<T_1>(message?: string): T_1 | undefined;
2354
2407
  };
2355
2408
 
2356
- 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 };
2409
+ export { API_NOTIFICATIONS, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AgentDto, ApiError, AppDeployment, AppDeploymentBlock, AppDeploymentMode, AppDeploymentProvider, AppGitHubRepository, AppGitHubRepositoryConfig, AppGitLabRepository, AppInfrastructureBlocks, AppLoggerBlock, AppLoggerProvider, AppMonitoringCustomReport, AppMonitoringCustomReportDataDto, AppMonitoringEvent, AppMonitoringEventData, AppMonitoringEventsLog, AppMonitoringEventsLogItem, AppMonitoringEventsReportDto, AppMonitoringReportParams, AppMonitoringUptimeReportDto, 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, DeveloperLedgerParams, DeveloperMessage, DeveloperMessageBaseDto, DeveloperMessageDto, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, 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, 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, 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,7 +68,6 @@ var __async = (__this, __arguments, generator) => {
68
68
  var src_exports = {};
69
69
  __export(src_exports, {
70
70
  API_NOTIFICATIONS: () => API_NOTIFICATIONS,
71
- ErrorType: () => ErrorType,
72
71
  UnauthorizeApiError: () => UnauthorizeApiError,
73
72
  api: () => api,
74
73
  getAppAutoReviewPayload: () => getAppAutoReviewPayload,
@@ -1765,13 +1764,129 @@ function initTextClientInstance(baseUrl, token) {
1765
1764
  }
1766
1765
  }
1767
1766
 
1768
- // src/apis/integrations/text/uptime/api.ts
1769
- var textUptimeApi = {
1770
- getAppUptimeReports(appId, payload, authorization) {
1767
+ // src/apis/integrations/text/app/monitoring/events/api.ts
1768
+ var textAppMonitoringEventsApi = {
1769
+ getEvent(appId, eventKey, authorization) {
1771
1770
  return __async(this, null, function* () {
1772
1771
  try {
1773
1772
  const response = yield textClientInstance.get(
1774
- `/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
1773
+ `/app_monitoring/${appId}/events/${eventKey}`,
1774
+ getTextClientConfig(authorization)
1775
+ );
1776
+ return response.data;
1777
+ } catch (error) {
1778
+ if (error instanceof Error) {
1779
+ throw new Error(`Couldn't load event. [${error.message}]`);
1780
+ }
1781
+ throw error;
1782
+ }
1783
+ });
1784
+ },
1785
+ getEvents(appId, authorization) {
1786
+ return __async(this, null, function* () {
1787
+ try {
1788
+ const response = yield textClientInstance.get(
1789
+ `/app_monitoring/${appId}/events`,
1790
+ getTextClientConfig(authorization)
1791
+ );
1792
+ return response.data;
1793
+ } catch (error) {
1794
+ if (error instanceof Error) {
1795
+ throw new Error(`Couldn't load events. [${error.message}]`);
1796
+ }
1797
+ throw error;
1798
+ }
1799
+ });
1800
+ },
1801
+ upsertEvent(appId, event, authorization) {
1802
+ return __async(this, null, function* () {
1803
+ try {
1804
+ const response = yield textClientInstance.post(
1805
+ `/app_monitoring/${appId}/events/${event.key}`,
1806
+ event,
1807
+ getTextClientConfig(authorization)
1808
+ );
1809
+ return response.data;
1810
+ } catch (error) {
1811
+ if (error instanceof Error) {
1812
+ throw new Error(`Couldn't upsert event. [${error.message}]`);
1813
+ }
1814
+ throw error;
1815
+ }
1816
+ });
1817
+ },
1818
+ deleteEvent(appId, eventKey, authorization) {
1819
+ return __async(this, null, function* () {
1820
+ try {
1821
+ const response = yield textClientInstance.delete(
1822
+ `/app_monitoring/${appId}/events/${eventKey}`,
1823
+ getTextClientConfig(authorization)
1824
+ );
1825
+ return response.data;
1826
+ } catch (error) {
1827
+ if (error instanceof Error) {
1828
+ throw new Error(`Couldn't delete event. [${error.message}]`);
1829
+ }
1830
+ throw error;
1831
+ }
1832
+ });
1833
+ },
1834
+ sendEvent(appId, data, authorization) {
1835
+ return __async(this, null, function* () {
1836
+ try {
1837
+ const response = yield textClientInstance.post(
1838
+ `/app_monitoring/${appId}/events`,
1839
+ data,
1840
+ getTextClientConfig(authorization)
1841
+ );
1842
+ return response.data;
1843
+ } catch (error) {
1844
+ if (error instanceof Error) {
1845
+ throw new Error(`Couldn't send events. [${error.message}]`);
1846
+ }
1847
+ throw error;
1848
+ }
1849
+ });
1850
+ },
1851
+ getEventsLog(appId, payload, authorization) {
1852
+ return __async(this, null, function* () {
1853
+ var _a, _b;
1854
+ try {
1855
+ const searchParams = new URLSearchParams({
1856
+ from: (_a = payload.from) != null ? _a : "",
1857
+ search: (_b = payload.search) != null ? _b : ""
1858
+ });
1859
+ if (payload.type) {
1860
+ payload.type.forEach((type) => searchParams.append("type[]", type));
1861
+ }
1862
+ const response = yield textClientInstance.get(
1863
+ `/app_monitoring/${appId}/events?${searchParams.toString()}`,
1864
+ // v1
1865
+ // `/app_monitoring/${appId}/events/logs?${searchParams.toString()}`, // v2
1866
+ getTextClientConfig(authorization)
1867
+ );
1868
+ return response.data;
1869
+ } catch (error) {
1870
+ if (error instanceof Error) {
1871
+ throw new Error(`Couldn't load events log. [${error.message}]`);
1872
+ }
1873
+ throw error;
1874
+ }
1875
+ });
1876
+ }
1877
+ };
1878
+
1879
+ // src/apis/integrations/text/app/monitoring/reports/api.ts
1880
+ var textAppMonitoringReportsApi = {
1881
+ getUptimeReports(appId, payload, authorization) {
1882
+ return __async(this, null, function* () {
1883
+ try {
1884
+ const response = yield textClientInstance.get(
1885
+ `/app_monitoring/${appId}/reports/uptime?${new URLSearchParams({
1886
+ from: payload.from,
1887
+ to: payload.to,
1888
+ resolution: payload.resolution
1889
+ }).toString()}`,
1775
1890
  getTextClientConfig(authorization)
1776
1891
  );
1777
1892
  return response.data;
@@ -1782,12 +1897,141 @@ var textUptimeApi = {
1782
1897
  throw error;
1783
1898
  }
1784
1899
  });
1900
+ },
1901
+ getEventReports(appId, payload, authorization) {
1902
+ return __async(this, null, function* () {
1903
+ try {
1904
+ const response = yield textClientInstance.get(
1905
+ `/app_monitoring/${appId}/reports/events?${new URLSearchParams({
1906
+ from: payload.from,
1907
+ to: payload.to,
1908
+ resolution: payload.resolution
1909
+ }).toString()}`,
1910
+ getTextClientConfig(authorization)
1911
+ );
1912
+ return response.data;
1913
+ } catch (error) {
1914
+ if (error instanceof Error) {
1915
+ throw new Error(`Couldn't load event reports. [${error.message}]`);
1916
+ }
1917
+ throw error;
1918
+ }
1919
+ });
1920
+ },
1921
+ getCustomReport(appId, customReportId, authorization) {
1922
+ return __async(this, null, function* () {
1923
+ try {
1924
+ const response = yield textClientInstance.get(
1925
+ `/app_monitoring/${appId}/reports/custom/${customReportId}`,
1926
+ getTextClientConfig(authorization)
1927
+ );
1928
+ return response.data;
1929
+ } catch (error) {
1930
+ if (error instanceof Error) {
1931
+ throw new Error(`Couldn't load custom report. [${error.message}]`);
1932
+ }
1933
+ throw error;
1934
+ }
1935
+ });
1936
+ },
1937
+ getCustomReportData(appId, customReportId, authorization) {
1938
+ return __async(this, null, function* () {
1939
+ try {
1940
+ const response = yield textClientInstance.get(
1941
+ `/app_monitoring/${appId}/reports/custom/${customReportId}/data`,
1942
+ getTextClientConfig(authorization)
1943
+ );
1944
+ return response.data;
1945
+ } catch (error) {
1946
+ if (error instanceof Error) {
1947
+ throw new Error(`Couldn't load custom report data. [${error.message}]`);
1948
+ }
1949
+ throw error;
1950
+ }
1951
+ });
1952
+ },
1953
+ getCustomReports(appId, authorization) {
1954
+ return __async(this, null, function* () {
1955
+ try {
1956
+ const response = yield textClientInstance.get(
1957
+ `/app_monitoring/${appId}/reports/custom`,
1958
+ getTextClientConfig(authorization)
1959
+ );
1960
+ return response.data;
1961
+ } catch (error) {
1962
+ if (error instanceof Error) {
1963
+ throw new Error(`Couldn't load custom reports. [${error.message}]`);
1964
+ }
1965
+ throw error;
1966
+ }
1967
+ });
1968
+ },
1969
+ createCustomReport(appId, customReport, authorization) {
1970
+ return __async(this, null, function* () {
1971
+ try {
1972
+ const response = yield textClientInstance.post(
1973
+ `/app_monitoring/${appId}/reports/custom`,
1974
+ customReport,
1975
+ getTextClientConfig(authorization)
1976
+ );
1977
+ return response.data;
1978
+ } catch (error) {
1979
+ if (error instanceof Error) {
1980
+ throw new Error(`Couldn't create custom report. [${error.message}]`);
1981
+ }
1982
+ throw error;
1983
+ }
1984
+ });
1985
+ },
1986
+ updateCustomReport(appId, customReport, authorization) {
1987
+ return __async(this, null, function* () {
1988
+ try {
1989
+ const response = yield textClientInstance.post(
1990
+ `/app_monitoring/${appId}/reports/custom/${customReport.id}`,
1991
+ customReport,
1992
+ getTextClientConfig(authorization)
1993
+ );
1994
+ return response.data;
1995
+ } catch (error) {
1996
+ if (error instanceof Error) {
1997
+ throw new Error(`Couldn't update custom report. [${error.message}]`);
1998
+ }
1999
+ throw error;
2000
+ }
2001
+ });
2002
+ },
2003
+ deleteCustomReport(appId, customReportId, authorization) {
2004
+ return __async(this, null, function* () {
2005
+ try {
2006
+ const response = yield textClientInstance.delete(
2007
+ `/app_monitoring/${appId}/reports/custom/${customReportId}`,
2008
+ getTextClientConfig(authorization)
2009
+ );
2010
+ return response.data;
2011
+ } catch (error) {
2012
+ if (error instanceof Error) {
2013
+ throw new Error(`Couldn't delete custom report. [${error.message}]`);
2014
+ }
2015
+ throw error;
2016
+ }
2017
+ });
1785
2018
  }
1786
2019
  };
1787
2020
 
2021
+ // src/apis/integrations/text/app/monitoring/api.ts
2022
+ var textAppMonitoringApi = {
2023
+ events: textAppMonitoringEventsApi,
2024
+ reports: textAppMonitoringReportsApi
2025
+ };
2026
+
2027
+ // src/apis/integrations/text/app/api.ts
2028
+ var textAppApi = {
2029
+ monitoring: textAppMonitoringApi
2030
+ };
2031
+
1788
2032
  // src/apis/integrations/text/api.ts
1789
2033
  var textApi = {
1790
- uptime: textUptimeApi
2034
+ app: textAppApi
1791
2035
  };
1792
2036
 
1793
2037
  // src/apis/integrations/vercel/api.ts
@@ -3638,19 +3882,6 @@ var platformDpsApplicationCustomPropsApi = {
3638
3882
  }
3639
3883
  };
3640
3884
 
3641
- // src/apis/platform/dps/applications/application/reporting/api.ts
3642
- var platformDpsApplicationReportingApi = {
3643
- sendEvent(appId, event, authorization) {
3644
- return __async(this, null, function* () {
3645
- yield platformDpsClientInstance.post(
3646
- `/apps/${appId}/events`,
3647
- event,
3648
- getPlatformDpsClientConfig(authorization)
3649
- );
3650
- });
3651
- }
3652
- };
3653
-
3654
3885
  // src/apis/platform/dps/applications/application/resources/api.ts
3655
3886
  var platformDpsApplicationResourcesApi = {
3656
3887
  getAppUpgrades(appId, authorization) {
@@ -3918,7 +4149,6 @@ var platformDpsApplicationApi = {
3918
4149
  onboarding: platformDpsApplicationOnboardingApi,
3919
4150
  payment: platformDpsApplicationPaymentApi,
3920
4151
  product: platformDpsApplicationProductApi,
3921
- reporting: platformDpsApplicationReportingApi,
3922
4152
  resource: platformDpsApplicationResourcesApi,
3923
4153
  review: platformDpsApplicationReviewApi,
3924
4154
  webhooks: platformDpsApplicationWebhooksApi,
@@ -4960,8 +5190,8 @@ var platformAdapterAppVariablesApi = {
4960
5190
  },
4961
5191
  editVariable(appId, data, authorization) {
4962
5192
  return __async(this, null, function* () {
4963
- const response = yield platformAdapterClientInstance.put(
4964
- `/console/app/${appId}/variables/${data.key}`,
5193
+ const response = yield platformAdapterClientInstance.post(
5194
+ `/console/app/${appId}/variables/${data.key}/edit`,
4965
5195
  data,
4966
5196
  getPlatformAdapterClientConfig(authorization)
4967
5197
  );
@@ -5019,13 +5249,6 @@ var platformApi = {
5019
5249
  dps: platformDpsApi
5020
5250
  };
5021
5251
 
5022
- // src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
5023
- var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
5024
- ErrorType2["4xx"] = "4xx";
5025
- ErrorType2["5xx"] = "5xx";
5026
- return ErrorType2;
5027
- })(ErrorType || {});
5028
-
5029
5252
  // src/apis/api.ts
5030
5253
  var api = {
5031
5254
  platform: platformApi,
@@ -5059,14 +5282,11 @@ function initApi(config, tokens) {
5059
5282
  sentry: (_l = tokens.sentry) == null ? void 0 : _l.token
5060
5283
  } : void 0
5061
5284
  );
5062
- initTextClientInstance(
5063
- (_m = config.urls.platform) == null ? void 0 : _m.text,
5064
- (_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
5065
- );
5066
5285
  initLiveChatClientInstance(
5067
- (_o = config.urls.products) == null ? void 0 : _o.livechat,
5068
- (_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps
5286
+ (_m = config.urls.products) == null ? void 0 : _m.livechat,
5287
+ (_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
5069
5288
  );
5289
+ initTextClientInstance((_o = config.urls.integrations) == null ? void 0 : _o.text, (_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps);
5070
5290
  initGithubClientInstance((_q = tokens == null ? void 0 : tokens.github) == null ? void 0 : _q.apps);
5071
5291
  initNetlifyClientInstance((_r = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _r.token);
5072
5292
  initVercelClientInstance((_s = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _s.token);
@@ -5090,7 +5310,6 @@ var serializerBase64 = {
5090
5310
  // Annotate the CommonJS export names for ESM import in node:
5091
5311
  0 && (module.exports = {
5092
5312
  API_NOTIFICATIONS,
5093
- ErrorType,
5094
5313
  UnauthorizeApiError,
5095
5314
  api,
5096
5315
  getAppAutoReviewPayload,
package/dist/index.mjs CHANGED
@@ -1677,13 +1677,129 @@ function initTextClientInstance(baseUrl, token) {
1677
1677
  }
1678
1678
  }
1679
1679
 
1680
- // src/apis/integrations/text/uptime/api.ts
1681
- var textUptimeApi = {
1682
- getAppUptimeReports(appId, payload, authorization) {
1680
+ // src/apis/integrations/text/app/monitoring/events/api.ts
1681
+ var textAppMonitoringEventsApi = {
1682
+ getEvent(appId, eventKey, authorization) {
1683
1683
  return __async(this, null, function* () {
1684
1684
  try {
1685
1685
  const response = yield textClientInstance.get(
1686
- `/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
1686
+ `/app_monitoring/${appId}/events/${eventKey}`,
1687
+ getTextClientConfig(authorization)
1688
+ );
1689
+ return response.data;
1690
+ } catch (error) {
1691
+ if (error instanceof Error) {
1692
+ throw new Error(`Couldn't load event. [${error.message}]`);
1693
+ }
1694
+ throw error;
1695
+ }
1696
+ });
1697
+ },
1698
+ getEvents(appId, authorization) {
1699
+ return __async(this, null, function* () {
1700
+ try {
1701
+ const response = yield textClientInstance.get(
1702
+ `/app_monitoring/${appId}/events`,
1703
+ getTextClientConfig(authorization)
1704
+ );
1705
+ return response.data;
1706
+ } catch (error) {
1707
+ if (error instanceof Error) {
1708
+ throw new Error(`Couldn't load events. [${error.message}]`);
1709
+ }
1710
+ throw error;
1711
+ }
1712
+ });
1713
+ },
1714
+ upsertEvent(appId, event, authorization) {
1715
+ return __async(this, null, function* () {
1716
+ try {
1717
+ const response = yield textClientInstance.post(
1718
+ `/app_monitoring/${appId}/events/${event.key}`,
1719
+ event,
1720
+ getTextClientConfig(authorization)
1721
+ );
1722
+ return response.data;
1723
+ } catch (error) {
1724
+ if (error instanceof Error) {
1725
+ throw new Error(`Couldn't upsert event. [${error.message}]`);
1726
+ }
1727
+ throw error;
1728
+ }
1729
+ });
1730
+ },
1731
+ deleteEvent(appId, eventKey, authorization) {
1732
+ return __async(this, null, function* () {
1733
+ try {
1734
+ const response = yield textClientInstance.delete(
1735
+ `/app_monitoring/${appId}/events/${eventKey}`,
1736
+ getTextClientConfig(authorization)
1737
+ );
1738
+ return response.data;
1739
+ } catch (error) {
1740
+ if (error instanceof Error) {
1741
+ throw new Error(`Couldn't delete event. [${error.message}]`);
1742
+ }
1743
+ throw error;
1744
+ }
1745
+ });
1746
+ },
1747
+ sendEvent(appId, data, authorization) {
1748
+ return __async(this, null, function* () {
1749
+ try {
1750
+ const response = yield textClientInstance.post(
1751
+ `/app_monitoring/${appId}/events`,
1752
+ data,
1753
+ getTextClientConfig(authorization)
1754
+ );
1755
+ return response.data;
1756
+ } catch (error) {
1757
+ if (error instanceof Error) {
1758
+ throw new Error(`Couldn't send events. [${error.message}]`);
1759
+ }
1760
+ throw error;
1761
+ }
1762
+ });
1763
+ },
1764
+ getEventsLog(appId, payload, authorization) {
1765
+ return __async(this, null, function* () {
1766
+ var _a, _b;
1767
+ try {
1768
+ const searchParams = new URLSearchParams({
1769
+ from: (_a = payload.from) != null ? _a : "",
1770
+ search: (_b = payload.search) != null ? _b : ""
1771
+ });
1772
+ if (payload.type) {
1773
+ payload.type.forEach((type) => searchParams.append("type[]", type));
1774
+ }
1775
+ const response = yield textClientInstance.get(
1776
+ `/app_monitoring/${appId}/events?${searchParams.toString()}`,
1777
+ // v1
1778
+ // `/app_monitoring/${appId}/events/logs?${searchParams.toString()}`, // v2
1779
+ getTextClientConfig(authorization)
1780
+ );
1781
+ return response.data;
1782
+ } catch (error) {
1783
+ if (error instanceof Error) {
1784
+ throw new Error(`Couldn't load events log. [${error.message}]`);
1785
+ }
1786
+ throw error;
1787
+ }
1788
+ });
1789
+ }
1790
+ };
1791
+
1792
+ // src/apis/integrations/text/app/monitoring/reports/api.ts
1793
+ var textAppMonitoringReportsApi = {
1794
+ getUptimeReports(appId, payload, authorization) {
1795
+ return __async(this, null, function* () {
1796
+ try {
1797
+ const response = yield textClientInstance.get(
1798
+ `/app_monitoring/${appId}/reports/uptime?${new URLSearchParams({
1799
+ from: payload.from,
1800
+ to: payload.to,
1801
+ resolution: payload.resolution
1802
+ }).toString()}`,
1687
1803
  getTextClientConfig(authorization)
1688
1804
  );
1689
1805
  return response.data;
@@ -1694,12 +1810,141 @@ var textUptimeApi = {
1694
1810
  throw error;
1695
1811
  }
1696
1812
  });
1813
+ },
1814
+ getEventReports(appId, payload, authorization) {
1815
+ return __async(this, null, function* () {
1816
+ try {
1817
+ const response = yield textClientInstance.get(
1818
+ `/app_monitoring/${appId}/reports/events?${new URLSearchParams({
1819
+ from: payload.from,
1820
+ to: payload.to,
1821
+ resolution: payload.resolution
1822
+ }).toString()}`,
1823
+ getTextClientConfig(authorization)
1824
+ );
1825
+ return response.data;
1826
+ } catch (error) {
1827
+ if (error instanceof Error) {
1828
+ throw new Error(`Couldn't load event reports. [${error.message}]`);
1829
+ }
1830
+ throw error;
1831
+ }
1832
+ });
1833
+ },
1834
+ getCustomReport(appId, customReportId, authorization) {
1835
+ return __async(this, null, function* () {
1836
+ try {
1837
+ const response = yield textClientInstance.get(
1838
+ `/app_monitoring/${appId}/reports/custom/${customReportId}`,
1839
+ getTextClientConfig(authorization)
1840
+ );
1841
+ return response.data;
1842
+ } catch (error) {
1843
+ if (error instanceof Error) {
1844
+ throw new Error(`Couldn't load custom report. [${error.message}]`);
1845
+ }
1846
+ throw error;
1847
+ }
1848
+ });
1849
+ },
1850
+ getCustomReportData(appId, customReportId, authorization) {
1851
+ return __async(this, null, function* () {
1852
+ try {
1853
+ const response = yield textClientInstance.get(
1854
+ `/app_monitoring/${appId}/reports/custom/${customReportId}/data`,
1855
+ getTextClientConfig(authorization)
1856
+ );
1857
+ return response.data;
1858
+ } catch (error) {
1859
+ if (error instanceof Error) {
1860
+ throw new Error(`Couldn't load custom report data. [${error.message}]`);
1861
+ }
1862
+ throw error;
1863
+ }
1864
+ });
1865
+ },
1866
+ getCustomReports(appId, authorization) {
1867
+ return __async(this, null, function* () {
1868
+ try {
1869
+ const response = yield textClientInstance.get(
1870
+ `/app_monitoring/${appId}/reports/custom`,
1871
+ getTextClientConfig(authorization)
1872
+ );
1873
+ return response.data;
1874
+ } catch (error) {
1875
+ if (error instanceof Error) {
1876
+ throw new Error(`Couldn't load custom reports. [${error.message}]`);
1877
+ }
1878
+ throw error;
1879
+ }
1880
+ });
1881
+ },
1882
+ createCustomReport(appId, customReport, authorization) {
1883
+ return __async(this, null, function* () {
1884
+ try {
1885
+ const response = yield textClientInstance.post(
1886
+ `/app_monitoring/${appId}/reports/custom`,
1887
+ customReport,
1888
+ getTextClientConfig(authorization)
1889
+ );
1890
+ return response.data;
1891
+ } catch (error) {
1892
+ if (error instanceof Error) {
1893
+ throw new Error(`Couldn't create custom report. [${error.message}]`);
1894
+ }
1895
+ throw error;
1896
+ }
1897
+ });
1898
+ },
1899
+ updateCustomReport(appId, customReport, authorization) {
1900
+ return __async(this, null, function* () {
1901
+ try {
1902
+ const response = yield textClientInstance.post(
1903
+ `/app_monitoring/${appId}/reports/custom/${customReport.id}`,
1904
+ customReport,
1905
+ getTextClientConfig(authorization)
1906
+ );
1907
+ return response.data;
1908
+ } catch (error) {
1909
+ if (error instanceof Error) {
1910
+ throw new Error(`Couldn't update custom report. [${error.message}]`);
1911
+ }
1912
+ throw error;
1913
+ }
1914
+ });
1915
+ },
1916
+ deleteCustomReport(appId, customReportId, authorization) {
1917
+ return __async(this, null, function* () {
1918
+ try {
1919
+ const response = yield textClientInstance.delete(
1920
+ `/app_monitoring/${appId}/reports/custom/${customReportId}`,
1921
+ getTextClientConfig(authorization)
1922
+ );
1923
+ return response.data;
1924
+ } catch (error) {
1925
+ if (error instanceof Error) {
1926
+ throw new Error(`Couldn't delete custom report. [${error.message}]`);
1927
+ }
1928
+ throw error;
1929
+ }
1930
+ });
1697
1931
  }
1698
1932
  };
1699
1933
 
1934
+ // src/apis/integrations/text/app/monitoring/api.ts
1935
+ var textAppMonitoringApi = {
1936
+ events: textAppMonitoringEventsApi,
1937
+ reports: textAppMonitoringReportsApi
1938
+ };
1939
+
1940
+ // src/apis/integrations/text/app/api.ts
1941
+ var textAppApi = {
1942
+ monitoring: textAppMonitoringApi
1943
+ };
1944
+
1700
1945
  // src/apis/integrations/text/api.ts
1701
1946
  var textApi = {
1702
- uptime: textUptimeApi
1947
+ app: textAppApi
1703
1948
  };
1704
1949
 
1705
1950
  // src/apis/integrations/vercel/api.ts
@@ -3550,19 +3795,6 @@ var platformDpsApplicationCustomPropsApi = {
3550
3795
  }
3551
3796
  };
3552
3797
 
3553
- // src/apis/platform/dps/applications/application/reporting/api.ts
3554
- var platformDpsApplicationReportingApi = {
3555
- sendEvent(appId, event, authorization) {
3556
- return __async(this, null, function* () {
3557
- yield platformDpsClientInstance.post(
3558
- `/apps/${appId}/events`,
3559
- event,
3560
- getPlatformDpsClientConfig(authorization)
3561
- );
3562
- });
3563
- }
3564
- };
3565
-
3566
3798
  // src/apis/platform/dps/applications/application/resources/api.ts
3567
3799
  var platformDpsApplicationResourcesApi = {
3568
3800
  getAppUpgrades(appId, authorization) {
@@ -3830,7 +4062,6 @@ var platformDpsApplicationApi = {
3830
4062
  onboarding: platformDpsApplicationOnboardingApi,
3831
4063
  payment: platformDpsApplicationPaymentApi,
3832
4064
  product: platformDpsApplicationProductApi,
3833
- reporting: platformDpsApplicationReportingApi,
3834
4065
  resource: platformDpsApplicationResourcesApi,
3835
4066
  review: platformDpsApplicationReviewApi,
3836
4067
  webhooks: platformDpsApplicationWebhooksApi,
@@ -4872,8 +5103,8 @@ var platformAdapterAppVariablesApi = {
4872
5103
  },
4873
5104
  editVariable(appId, data, authorization) {
4874
5105
  return __async(this, null, function* () {
4875
- const response = yield platformAdapterClientInstance.put(
4876
- `/console/app/${appId}/variables/${data.key}`,
5106
+ const response = yield platformAdapterClientInstance.post(
5107
+ `/console/app/${appId}/variables/${data.key}/edit`,
4877
5108
  data,
4878
5109
  getPlatformAdapterClientConfig(authorization)
4879
5110
  );
@@ -4931,13 +5162,6 @@ var platformApi = {
4931
5162
  dps: platformDpsApi
4932
5163
  };
4933
5164
 
4934
- // src/apis/platform/dps/applications/application/reporting/_contracts/dtos/events/error.ts
4935
- var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
4936
- ErrorType2["4xx"] = "4xx";
4937
- ErrorType2["5xx"] = "5xx";
4938
- return ErrorType2;
4939
- })(ErrorType || {});
4940
-
4941
5165
  // src/apis/api.ts
4942
5166
  var api = {
4943
5167
  platform: platformApi,
@@ -4971,14 +5195,11 @@ function initApi(config, tokens) {
4971
5195
  sentry: (_l = tokens.sentry) == null ? void 0 : _l.token
4972
5196
  } : void 0
4973
5197
  );
4974
- initTextClientInstance(
4975
- (_m = config.urls.platform) == null ? void 0 : _m.text,
4976
- (_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
4977
- );
4978
5198
  initLiveChatClientInstance(
4979
- (_o = config.urls.products) == null ? void 0 : _o.livechat,
4980
- (_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps
5199
+ (_m = config.urls.products) == null ? void 0 : _m.livechat,
5200
+ (_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.dps
4981
5201
  );
5202
+ initTextClientInstance((_o = config.urls.integrations) == null ? void 0 : _o.text, (_p = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _p.dps);
4982
5203
  initGithubClientInstance((_q = tokens == null ? void 0 : tokens.github) == null ? void 0 : _q.apps);
4983
5204
  initNetlifyClientInstance((_r = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _r.token);
4984
5205
  initVercelClientInstance((_s = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _s.token);
@@ -5001,7 +5222,6 @@ var serializerBase64 = {
5001
5222
  };
5002
5223
  export {
5003
5224
  API_NOTIFICATIONS,
5004
- ErrorType,
5005
5225
  UnauthorizeApiError,
5006
5226
  api,
5007
5227
  getAppAutoReviewPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
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
- "types": "0.0.1",
23
- "tsconfig": "0.0.0"
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",