@livechat/developer-studio-api 2.3.41 → 2.3.43

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
@@ -1,4 +1,3 @@
1
- import * as openai_resources_beta_threads_messages_messages from 'openai/resources/beta/threads/messages/messages';
2
1
  import * as axios from 'axios';
3
2
  import { AxiosRequestConfig } from 'axios';
4
3
 
@@ -574,6 +573,69 @@ type GetVercelProjectsResult = VercelPaginatedResult & {
574
573
  projects: VercelProject[];
575
574
  };
576
575
 
576
+ interface NeonProjectDto {
577
+ project: {
578
+ id: string;
579
+ name: string;
580
+ created_at: string;
581
+ updated_at: string;
582
+ owner_id: string;
583
+ owner: {
584
+ email: string;
585
+ branches_limit: number;
586
+ subscription: "UNKNOWN" | "free" | "pro" | "direct_sales" | "aws_marketplace";
587
+ };
588
+ };
589
+ }
590
+ interface NeonProjectWithConnectionUriDto extends NeonProjectDto {
591
+ connection_uri: string;
592
+ branch: NeonProjectBranchDto[];
593
+ databases: NeonProjectDatabaseDto[];
594
+ }
595
+
596
+ interface NeonProjectBranchDto {
597
+ id: string;
598
+ project_id: string;
599
+ name: string;
600
+ current_state: "init" | "ready";
601
+ creation_source: string;
602
+ primary: boolean;
603
+ created_at: string;
604
+ updated_at: string;
605
+ }
606
+ interface NeonProjectDatabaseDto {
607
+ id: number;
608
+ branch_id: string;
609
+ name: string;
610
+ owner_name: string;
611
+ created_at: string;
612
+ updated_at: string;
613
+ }
614
+
615
+ interface NeonUser {
616
+ id: string;
617
+ type: string;
618
+ name: string;
619
+ email: string;
620
+ display_name: string;
621
+ default_organization_id: string;
622
+ }
623
+
624
+ interface NeonClientInstanceAuthorization {
625
+ token?: string;
626
+ }
627
+ interface NeonClientInstanceOptions {
628
+ token?: string;
629
+ ensureAuthorizationToken?: boolean;
630
+ }
631
+ declare const neonClientInstance: axios.AxiosInstance;
632
+ declare function getNeonClientAuthorization(req: {
633
+ headers: Record<string, string | string[] | undefined>;
634
+ }): NeonClientInstanceAuthorization;
635
+ declare function getNeonClientConfig(options?: NeonClientInstanceOptions): AxiosRequestConfig;
636
+ declare function initNeonClientInstance(token?: string): void;
637
+ declare function updateNeonClientInstance(token?: string): void;
638
+
577
639
  interface AccountDto {
578
640
  account_id: string;
579
641
  avatar: string;
@@ -1226,10 +1288,6 @@ interface CreateMonetizationPayload {
1226
1288
  payment: AddAppMonetizationData;
1227
1289
  }
1228
1290
 
1229
- interface AiAssistantRequest {
1230
- prompt: string;
1231
- }
1232
-
1233
1291
  interface PlatformAdapterClientInstanceAuthorization {
1234
1292
  platform?: {
1235
1293
  dps?: string;
@@ -1242,7 +1300,6 @@ interface PlatformAdapterClientInstanceAuthorization {
1242
1300
  vercel?: string;
1243
1301
  planetscale?: string;
1244
1302
  sentry?: string;
1245
- openai?: string;
1246
1303
  }
1247
1304
  type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthorization & {
1248
1305
  ensureAuthorizationToken?: {
@@ -1254,7 +1311,6 @@ type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthori
1254
1311
  vercel?: boolean;
1255
1312
  planetscale?: boolean;
1256
1313
  sentry?: boolean;
1257
- openai?: boolean;
1258
1314
  };
1259
1315
  };
1260
1316
  declare function getPlatformAdapterClientAuthorization(req: {
@@ -1274,7 +1330,6 @@ declare function initPlatformAdapterClientInstance(baseUrl?: string, tokens?: {
1274
1330
  vercel?: string;
1275
1331
  planetscale?: string;
1276
1332
  sentry?: string;
1277
- openai?: string;
1278
1333
  }): void;
1279
1334
  declare function updatePlatformAdapterClientInstance(tokens?: {
1280
1335
  platform?: {
@@ -1288,7 +1343,6 @@ declare function updatePlatformAdapterClientInstance(tokens?: {
1288
1343
  vercel?: string;
1289
1344
  planetscale?: string;
1290
1345
  sentry?: string;
1291
- openai?: string;
1292
1346
  }): void;
1293
1347
 
1294
1348
  interface ApplicationPaymentDto {
@@ -2203,9 +2257,6 @@ declare const api: {
2203
2257
  conductor: {
2204
2258
  request<TData>(config: axios.AxiosRequestConfig, authorization?: PlatformAdapterClientInstanceAuthorization | undefined): Promise<TData>;
2205
2259
  };
2206
- assistant: {
2207
- request(request: AiAssistantRequest, authorization?: PlatformAdapterClientInstanceAuthorization | undefined): Promise<openai_resources_beta_threads_messages_messages.ThreadMessage[]>;
2208
- };
2209
2260
  };
2210
2261
  dps: {
2211
2262
  applications: {
@@ -2528,6 +2579,20 @@ declare const api: {
2528
2579
  teamId: string;
2529
2580
  }>;
2530
2581
  };
2582
+ neon: {
2583
+ project: {
2584
+ branch: {
2585
+ getBranch(projectId: string, branchId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectBranchDto>;
2586
+ };
2587
+ createProject(projectName: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectWithConnectionUriDto>;
2588
+ getProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
2589
+ deleteProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
2590
+ };
2591
+ user: {
2592
+ getUser(authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonUser>;
2593
+ };
2594
+ getToken(code: string, clientId: string, clientSecret: string, redirectUri: string): Promise<string>;
2595
+ };
2531
2596
  planetscale: {
2532
2597
  database: {
2533
2598
  password: {
@@ -2640,6 +2705,9 @@ declare function initApi(config: {
2640
2705
  planetscale?: {
2641
2706
  token: string;
2642
2707
  };
2708
+ neon?: {
2709
+ token: string;
2710
+ };
2643
2711
  }): void;
2644
2712
 
2645
2713
  declare const API_NOTIFICATIONS: {
@@ -2657,7 +2725,7 @@ declare const API_NOTIFICATIONS: {
2657
2725
  };
2658
2726
  };
2659
2727
 
2660
- type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "planetscale" | "openai";
2728
+ type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "neon" | "planetscale";
2661
2729
  interface ApiError {
2662
2730
  message: string;
2663
2731
  }
@@ -2671,4 +2739,4 @@ declare const serializerBase64: {
2671
2739
  deserialize<T_1>(message?: string): T_1 | undefined;
2672
2740
  };
2673
2741
 
2674
- export { API_NOTIFICATIONS, AccountDto, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AddAppMonetizationData, AddAppPropertiesData, AddAppWidgetsData, AgentDto, AiAssistantRequest, 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, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateAuthorizationPayload, CreateAuthorizationResponse, CreateClientPayload, CreateCreatorAppPayload, CreateCreatorAppResponse, CreateDeploymentAccessibilityPayload, CreateDeploymentAccessibilityResponse, CreateDeploymentPayload, CreateDeploymentResponse, CreateMonetizationPayload, CreatePropertiesPayload, CreateRepositoryPayload, CreateRepositoryResponse, CreateSeedPayload, CreateSeedResponse, CreateWidgetPayload, DeveloperLedgerParams, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, 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, MyAccountDto, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformBillingClientInstanceAuthorization, PlatformBillingClientInstanceOptions, 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, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnauthorizeApiErrorSource, 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, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformBillingClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initTextClientInstance, initVercelClientInstance, livechatClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, textClientInstance, updateGithubClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
2742
+ export { API_NOTIFICATIONS, AccountDto, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AddAppMonetizationData, AddAppPropertiesData, AddAppWidgetsData, 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, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateAuthorizationPayload, CreateAuthorizationResponse, CreateClientPayload, CreateCreatorAppPayload, CreateCreatorAppResponse, CreateDeploymentAccessibilityPayload, CreateDeploymentAccessibilityResponse, CreateDeploymentPayload, CreateDeploymentResponse, CreateMonetizationPayload, CreatePropertiesPayload, CreateRepositoryPayload, CreateRepositoryResponse, CreateSeedPayload, CreateSeedResponse, CreateWidgetPayload, DeveloperLedgerParams, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, 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, MyAccountDto, NeonClientInstanceAuthorization, NeonClientInstanceOptions, NeonProjectBranchDto, NeonProjectDatabaseDto, NeonProjectDto, NeonProjectWithConnectionUriDto, NeonUser, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformBillingClientInstanceAuthorization, PlatformBillingClientInstanceOptions, 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, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnauthorizeApiErrorSource, 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, getNeonClientAuthorization, getNeonClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNeonClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformBillingClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initTextClientInstance, initVercelClientInstance, livechatClientInstance, neonClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, textClientInstance, updateGithubClientInstance, updateNeonClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as openai_resources_beta_threads_messages_messages from 'openai/resources/beta/threads/messages/messages';
2
1
  import * as axios from 'axios';
3
2
  import { AxiosRequestConfig } from 'axios';
4
3
 
@@ -574,6 +573,69 @@ type GetVercelProjectsResult = VercelPaginatedResult & {
574
573
  projects: VercelProject[];
575
574
  };
576
575
 
576
+ interface NeonProjectDto {
577
+ project: {
578
+ id: string;
579
+ name: string;
580
+ created_at: string;
581
+ updated_at: string;
582
+ owner_id: string;
583
+ owner: {
584
+ email: string;
585
+ branches_limit: number;
586
+ subscription: "UNKNOWN" | "free" | "pro" | "direct_sales" | "aws_marketplace";
587
+ };
588
+ };
589
+ }
590
+ interface NeonProjectWithConnectionUriDto extends NeonProjectDto {
591
+ connection_uri: string;
592
+ branch: NeonProjectBranchDto[];
593
+ databases: NeonProjectDatabaseDto[];
594
+ }
595
+
596
+ interface NeonProjectBranchDto {
597
+ id: string;
598
+ project_id: string;
599
+ name: string;
600
+ current_state: "init" | "ready";
601
+ creation_source: string;
602
+ primary: boolean;
603
+ created_at: string;
604
+ updated_at: string;
605
+ }
606
+ interface NeonProjectDatabaseDto {
607
+ id: number;
608
+ branch_id: string;
609
+ name: string;
610
+ owner_name: string;
611
+ created_at: string;
612
+ updated_at: string;
613
+ }
614
+
615
+ interface NeonUser {
616
+ id: string;
617
+ type: string;
618
+ name: string;
619
+ email: string;
620
+ display_name: string;
621
+ default_organization_id: string;
622
+ }
623
+
624
+ interface NeonClientInstanceAuthorization {
625
+ token?: string;
626
+ }
627
+ interface NeonClientInstanceOptions {
628
+ token?: string;
629
+ ensureAuthorizationToken?: boolean;
630
+ }
631
+ declare const neonClientInstance: axios.AxiosInstance;
632
+ declare function getNeonClientAuthorization(req: {
633
+ headers: Record<string, string | string[] | undefined>;
634
+ }): NeonClientInstanceAuthorization;
635
+ declare function getNeonClientConfig(options?: NeonClientInstanceOptions): AxiosRequestConfig;
636
+ declare function initNeonClientInstance(token?: string): void;
637
+ declare function updateNeonClientInstance(token?: string): void;
638
+
577
639
  interface AccountDto {
578
640
  account_id: string;
579
641
  avatar: string;
@@ -1226,10 +1288,6 @@ interface CreateMonetizationPayload {
1226
1288
  payment: AddAppMonetizationData;
1227
1289
  }
1228
1290
 
1229
- interface AiAssistantRequest {
1230
- prompt: string;
1231
- }
1232
-
1233
1291
  interface PlatformAdapterClientInstanceAuthorization {
1234
1292
  platform?: {
1235
1293
  dps?: string;
@@ -1242,7 +1300,6 @@ interface PlatformAdapterClientInstanceAuthorization {
1242
1300
  vercel?: string;
1243
1301
  planetscale?: string;
1244
1302
  sentry?: string;
1245
- openai?: string;
1246
1303
  }
1247
1304
  type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthorization & {
1248
1305
  ensureAuthorizationToken?: {
@@ -1254,7 +1311,6 @@ type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthori
1254
1311
  vercel?: boolean;
1255
1312
  planetscale?: boolean;
1256
1313
  sentry?: boolean;
1257
- openai?: boolean;
1258
1314
  };
1259
1315
  };
1260
1316
  declare function getPlatformAdapterClientAuthorization(req: {
@@ -1274,7 +1330,6 @@ declare function initPlatformAdapterClientInstance(baseUrl?: string, tokens?: {
1274
1330
  vercel?: string;
1275
1331
  planetscale?: string;
1276
1332
  sentry?: string;
1277
- openai?: string;
1278
1333
  }): void;
1279
1334
  declare function updatePlatformAdapterClientInstance(tokens?: {
1280
1335
  platform?: {
@@ -1288,7 +1343,6 @@ declare function updatePlatformAdapterClientInstance(tokens?: {
1288
1343
  vercel?: string;
1289
1344
  planetscale?: string;
1290
1345
  sentry?: string;
1291
- openai?: string;
1292
1346
  }): void;
1293
1347
 
1294
1348
  interface ApplicationPaymentDto {
@@ -2203,9 +2257,6 @@ declare const api: {
2203
2257
  conductor: {
2204
2258
  request<TData>(config: axios.AxiosRequestConfig, authorization?: PlatformAdapterClientInstanceAuthorization | undefined): Promise<TData>;
2205
2259
  };
2206
- assistant: {
2207
- request(request: AiAssistantRequest, authorization?: PlatformAdapterClientInstanceAuthorization | undefined): Promise<openai_resources_beta_threads_messages_messages.ThreadMessage[]>;
2208
- };
2209
2260
  };
2210
2261
  dps: {
2211
2262
  applications: {
@@ -2528,6 +2579,20 @@ declare const api: {
2528
2579
  teamId: string;
2529
2580
  }>;
2530
2581
  };
2582
+ neon: {
2583
+ project: {
2584
+ branch: {
2585
+ getBranch(projectId: string, branchId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectBranchDto>;
2586
+ };
2587
+ createProject(projectName: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectWithConnectionUriDto>;
2588
+ getProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
2589
+ deleteProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
2590
+ };
2591
+ user: {
2592
+ getUser(authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonUser>;
2593
+ };
2594
+ getToken(code: string, clientId: string, clientSecret: string, redirectUri: string): Promise<string>;
2595
+ };
2531
2596
  planetscale: {
2532
2597
  database: {
2533
2598
  password: {
@@ -2640,6 +2705,9 @@ declare function initApi(config: {
2640
2705
  planetscale?: {
2641
2706
  token: string;
2642
2707
  };
2708
+ neon?: {
2709
+ token: string;
2710
+ };
2643
2711
  }): void;
2644
2712
 
2645
2713
  declare const API_NOTIFICATIONS: {
@@ -2657,7 +2725,7 @@ declare const API_NOTIFICATIONS: {
2657
2725
  };
2658
2726
  };
2659
2727
 
2660
- type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "planetscale" | "openai";
2728
+ type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "neon" | "planetscale";
2661
2729
  interface ApiError {
2662
2730
  message: string;
2663
2731
  }
@@ -2671,4 +2739,4 @@ declare const serializerBase64: {
2671
2739
  deserialize<T_1>(message?: string): T_1 | undefined;
2672
2740
  };
2673
2741
 
2674
- export { API_NOTIFICATIONS, AccountDto, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AddAppMonetizationData, AddAppPropertiesData, AddAppWidgetsData, AgentDto, AiAssistantRequest, 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, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateAuthorizationPayload, CreateAuthorizationResponse, CreateClientPayload, CreateCreatorAppPayload, CreateCreatorAppResponse, CreateDeploymentAccessibilityPayload, CreateDeploymentAccessibilityResponse, CreateDeploymentPayload, CreateDeploymentResponse, CreateMonetizationPayload, CreatePropertiesPayload, CreateRepositoryPayload, CreateRepositoryResponse, CreateSeedPayload, CreateSeedResponse, CreateWidgetPayload, DeveloperLedgerParams, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, 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, MyAccountDto, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformBillingClientInstanceAuthorization, PlatformBillingClientInstanceOptions, 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, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnauthorizeApiErrorSource, 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, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformBillingClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initTextClientInstance, initVercelClientInstance, livechatClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, textClientInstance, updateGithubClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
2742
+ export { API_NOTIFICATIONS, AccountDto, AddAppAuthorizationData, AddAppAuthorizationPayload, AddAppAuthorizationResult, AddAppMonetizationData, AddAppPropertiesData, AddAppWidgetsData, 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, BillingAccountDto, BillingAccountInfoDto, BillingInvoiceDto, Category, ClientDto, ClientInfoDto, ClientScopeDto, ClientWithSecretDto, CreateAppOutput, CreateAppPayload, CreateAppResult, CreateAppStatus, CreateAppStepStatus, CreateApplicationAuthorizationPayload, CreateApplicationChatActionPayload, CreateApplicationPayload, CreateApplicationResponse, CreateApplicationSubmissionPayload, CreateAuthorizationPayload, CreateAuthorizationResponse, CreateClientPayload, CreateCreatorAppPayload, CreateCreatorAppResponse, CreateDeploymentAccessibilityPayload, CreateDeploymentAccessibilityResponse, CreateDeploymentPayload, CreateDeploymentResponse, CreateMonetizationPayload, CreatePropertiesPayload, CreateRepositoryPayload, CreateRepositoryResponse, CreateSeedPayload, CreateSeedResponse, CreateWidgetPayload, DeveloperLedgerParams, GetAppMonitoringCustomReportDataPayload, GetAppMonitoringEventsLogPayload, GetAppMonitoringEventsLogResponse, GetAppMonitoringEventsReportPayload, GetAppMonitoringUptimeReportPayload, GetPlanetScaleDatabasePasswordsResult, GetPlanetScaleDatabasesResult, GetPlanetScaleOrganizationsResult, GetTextPlatformDashboardReportParams, 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, MyAccountDto, NeonClientInstanceAuthorization, NeonClientInstanceOptions, NeonProjectBranchDto, NeonProjectDatabaseDto, NeonProjectDto, NeonProjectWithConnectionUriDto, NeonUser, NetlifyAccount, NetlifyClientInstanceAuthorization, NetlifyClientInstanceOptions, NetlifyDeploy, NetlifyDeployKey, NetlifyEnv, NetlifySite, OrganizationDto, PatDto, PatScopeDto, PatWithSecretDto, PlanetScaleClientInstanceAuthorization, PlanetScaleClientInstanceOptions, PlanetScaleDatabase, PlanetScaleDatabasePassword, PlanetScaleOrganization, PlanetScalePaginatedResult, PlanetScalePagination, PlanetScaleUser, PlatformAccountsClientInstanceAuthorization, PlatformAccountsClientInstanceOptions, PlatformAdapterClientInstanceAuthorization, PlatformAdapterClientInstanceOptions, PlatformBillingClientInstanceAuthorization, PlatformBillingClientInstanceOptions, 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, TextPlatformDashboardCreditsDto, TextPlatformDashboardPaymentDto, TextPlatformDashboardReportDto, TextPlatformDashboardReportItemDto, UnauthorizeApiError, UnauthorizeApiErrorSource, 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, getNeonClientAuthorization, getNeonClientConfig, getNetlifyClientAuthorization, getNetlifyClientConfig, getPlanetScaleClientAuthorization, getPlanetScaleClientConfig, getPlatformAccountsClientAuthorization, getPlatformAccountsClientConfig, getPlatformAdapterClientAuthorization, getPlatformAdapterClientConfig, getPlatformBillingClientAuthorization, getPlatformBillingClientConfig, getPlatformDpsAdminClientAuthorization, getPlatformDpsClientAuthorization, getPlatformDpsClientConfig, getRegion, getSentryClientAuthorization, getSentryClientConfig, getTextClientAuthorization, getTextClientConfig, getVercelClientAuthorization, getVercelClientConfig, githubClientInstance, initApi, initGithubClientInstance, initLiveChatClientInstance, initNeonClientInstance, initNetlifyClientInstance, initPlanetScaleClientInstance, initPlatformAccountsClientInstance, initPlatformAdapterClientInstance, initPlatformBillingClientInstance, initPlatformDpsClientInstance, initSentryClientInstance, initTextClientInstance, initVercelClientInstance, livechatClientInstance, neonClientInstance, netlifyClientInstance, planetScaleClientInstance, platformAccountsClientInstance, platformAdapterClientInstance, platformBillingClientInstance, platformDpsClientInstance, sentryClientInstance, serializerBase64, textClientInstance, updateGithubClientInstance, updateNeonClientInstance, updateNetlifyClientInstance, updatePlanetScaleClientInstance, updatePlatformAdapterClientInstance, updateSentryClientInstance, updateVercelClientInstance, vercelClientInstance };
package/dist/index.js CHANGED
@@ -76,6 +76,8 @@ __export(src_exports, {
76
76
  getGithubClientRequestConfig: () => getGithubClientRequestConfig,
77
77
  getLiveChatClientAuthorization: () => getLiveChatClientAuthorization,
78
78
  getLiveChatClientConfig: () => getLiveChatClientConfig,
79
+ getNeonClientAuthorization: () => getNeonClientAuthorization,
80
+ getNeonClientConfig: () => getNeonClientConfig,
79
81
  getNetlifyClientAuthorization: () => getNetlifyClientAuthorization,
80
82
  getNetlifyClientConfig: () => getNetlifyClientConfig,
81
83
  getPlanetScaleClientAuthorization: () => getPlanetScaleClientAuthorization,
@@ -100,6 +102,7 @@ __export(src_exports, {
100
102
  initApi: () => initApi,
101
103
  initGithubClientInstance: () => initGithubClientInstance,
102
104
  initLiveChatClientInstance: () => initLiveChatClientInstance,
105
+ initNeonClientInstance: () => initNeonClientInstance,
103
106
  initNetlifyClientInstance: () => initNetlifyClientInstance,
104
107
  initPlanetScaleClientInstance: () => initPlanetScaleClientInstance,
105
108
  initPlatformAccountsClientInstance: () => initPlatformAccountsClientInstance,
@@ -110,6 +113,7 @@ __export(src_exports, {
110
113
  initTextClientInstance: () => initTextClientInstance,
111
114
  initVercelClientInstance: () => initVercelClientInstance,
112
115
  livechatClientInstance: () => livechatClientInstance,
116
+ neonClientInstance: () => neonClientInstance,
113
117
  netlifyClientInstance: () => netlifyClientInstance,
114
118
  planetScaleClientInstance: () => planetScaleClientInstance,
115
119
  platformAccountsClientInstance: () => platformAccountsClientInstance,
@@ -120,6 +124,7 @@ __export(src_exports, {
120
124
  serializerBase64: () => serializerBase64,
121
125
  textClientInstance: () => textClientInstance,
122
126
  updateGithubClientInstance: () => updateGithubClientInstance,
127
+ updateNeonClientInstance: () => updateNeonClientInstance,
123
128
  updateNetlifyClientInstance: () => updateNetlifyClientInstance,
124
129
  updatePlanetScaleClientInstance: () => updatePlanetScaleClientInstance,
125
130
  updatePlatformAdapterClientInstance: () => updatePlatformAdapterClientInstance,
@@ -2458,18 +2463,171 @@ var vercelApi = {
2458
2463
  }
2459
2464
  };
2460
2465
 
2466
+ // src/apis/integrations/neon/api.ts
2467
+ var import_axios11 = __toESM(require("axios"));
2468
+
2469
+ // src/apis/integrations/neon/instance.ts
2470
+ var import_axios10 = __toESM(require("axios"));
2471
+ var neonClientInstance = import_axios10.default.create({
2472
+ baseURL: "https://console.neon.tech/api/v2/"
2473
+ });
2474
+ neonClientInstance.interceptors.response.use(
2475
+ (r) => r,
2476
+ (error) => {
2477
+ var _a;
2478
+ if (import_axios10.default.isAxiosError(error)) {
2479
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
2480
+ throw new UnauthorizeApiError("neon");
2481
+ }
2482
+ }
2483
+ throw error;
2484
+ }
2485
+ );
2486
+ function getNeonClientAuthorization(req) {
2487
+ return {
2488
+ token: req.headers["neon-token"]
2489
+ };
2490
+ }
2491
+ function getNeonClientConfig(options = {}) {
2492
+ const currentHeaders = neonClientInstance.defaults.headers;
2493
+ const defaultAuthorization = currentHeaders.Authorization;
2494
+ const headers = {
2495
+ authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `${options.token}` : void 0
2496
+ };
2497
+ if (options.ensureAuthorizationToken && !headers.authorization) {
2498
+ throw new UnauthorizeApiError("neon");
2499
+ }
2500
+ return {
2501
+ headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
2502
+ };
2503
+ }
2504
+ function initNeonClientInstance(token) {
2505
+ if (token) {
2506
+ updateNeonClientInstance(token);
2507
+ }
2508
+ }
2509
+ function updateNeonClientInstance(token) {
2510
+ const headers = neonClientInstance.defaults.headers;
2511
+ if (token) {
2512
+ headers.Authorization = `${token}`;
2513
+ } else {
2514
+ delete headers.Authorization;
2515
+ }
2516
+ }
2517
+
2518
+ // src/apis/integrations/neon/project/branch/api.ts
2519
+ var neonProjectBranchApi = {
2520
+ getBranch(projectId, branchId, authorization) {
2521
+ return __async(this, null, function* () {
2522
+ const response = yield neonClientInstance.get(
2523
+ `projects/${projectId}/branches/${branchId}`,
2524
+ getNeonClientConfig(__spreadValues({}, authorization))
2525
+ );
2526
+ return response.data;
2527
+ });
2528
+ }
2529
+ };
2530
+
2531
+ // src/apis/integrations/neon/project/api.ts
2532
+ var neonProjectApi = {
2533
+ branch: neonProjectBranchApi,
2534
+ createProject(projectName, authorization) {
2535
+ return __async(this, null, function* () {
2536
+ const response = yield neonClientInstance.post(
2537
+ `/projects`,
2538
+ {
2539
+ project: {
2540
+ name: projectName
2541
+ }
2542
+ },
2543
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2544
+ ensureAuthorizationToken: true
2545
+ }))
2546
+ );
2547
+ return response.data;
2548
+ });
2549
+ },
2550
+ getProject(projectId, authorization) {
2551
+ return __async(this, null, function* () {
2552
+ const response = yield neonClientInstance.get(
2553
+ `/projects/${projectId}`,
2554
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2555
+ ensureAuthorizationToken: true
2556
+ }))
2557
+ );
2558
+ return response.data;
2559
+ });
2560
+ },
2561
+ deleteProject(projectId, authorization) {
2562
+ return __async(this, null, function* () {
2563
+ const response = yield neonClientInstance.delete(
2564
+ `/projects/${projectId}`,
2565
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2566
+ ensureAuthorizationToken: true
2567
+ }))
2568
+ );
2569
+ return response.data;
2570
+ });
2571
+ }
2572
+ };
2573
+
2574
+ // src/apis/integrations/neon/user/api.ts
2575
+ var neonUserApi = {
2576
+ getUser(authorization) {
2577
+ return __async(this, null, function* () {
2578
+ const response = yield neonClientInstance.get(
2579
+ `/users/me`,
2580
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2581
+ ensureAuthorizationToken: true
2582
+ }))
2583
+ );
2584
+ return response.data;
2585
+ });
2586
+ }
2587
+ };
2588
+
2589
+ // src/apis/integrations/neon/api.ts
2590
+ var neonApi = {
2591
+ project: neonProjectApi,
2592
+ user: neonUserApi,
2593
+ getToken(code, clientId, clientSecret, redirectUri) {
2594
+ return __async(this, null, function* () {
2595
+ var _a;
2596
+ const data = new URLSearchParams({
2597
+ code,
2598
+ client_id: clientId,
2599
+ client_secret: clientSecret,
2600
+ redirect_uri: redirectUri,
2601
+ grant_type: "authorization_code"
2602
+ });
2603
+ const response = yield import_axios11.default.post(
2604
+ "https://oauth2.neon.tech/oauth2/token",
2605
+ data,
2606
+ {
2607
+ headers: {
2608
+ "Content-Type": "application/x-www-form-urlencoded"
2609
+ }
2610
+ }
2611
+ );
2612
+ const params = new URLSearchParams(response.data);
2613
+ return (_a = params.get("access_token")) != null ? _a : "";
2614
+ });
2615
+ }
2616
+ };
2617
+
2461
2618
  // src/apis/integrations/api.ts
2462
2619
  var integrationsApi = {
2463
2620
  github: gitHubApi,
2464
2621
  netlify: netlifyApi,
2465
2622
  vercel: vercelApi,
2623
+ neon: neonApi,
2466
2624
  planetscale: planetscaleApi,
2467
2625
  sentry: sentryApi,
2468
2626
  text: textApi
2469
2627
  };
2470
2628
 
2471
2629
  // src/apis/products/livechat/instance.ts
2472
- var import_axios10 = __toESM(require("axios"));
2630
+ var import_axios12 = __toESM(require("axios"));
2473
2631
  var REGION = {
2474
2632
  FRA: "fra",
2475
2633
  DAL: "dal",
@@ -2483,7 +2641,7 @@ var getRegion = (token) => {
2483
2641
  return region;
2484
2642
  }
2485
2643
  };
2486
- var livechatClientInstance = import_axios10.default.create({
2644
+ var livechatClientInstance = import_axios12.default.create({
2487
2645
  baseURL: "https://api.labs.livechatinc.com"
2488
2646
  });
2489
2647
  function getLiveChatClientAuthorization(req) {
@@ -2966,8 +3124,8 @@ var productsApi = {
2966
3124
  };
2967
3125
 
2968
3126
  // src/apis/platform/accounts/instance.ts
2969
- var import_axios11 = __toESM(require("axios"));
2970
- var platformAccountsClientInstance = import_axios11.default.create({
3127
+ var import_axios13 = __toESM(require("axios"));
3128
+ var platformAccountsClientInstance = import_axios13.default.create({
2971
3129
  baseURL: "https://accounts.labs.livechatinc.com"
2972
3130
  });
2973
3131
  function getPlatformAccountsClientAuthorization(req) {
@@ -3421,8 +3579,8 @@ var platformAccountsApi = {
3421
3579
  };
3422
3580
 
3423
3581
  // src/apis/platform/dps/instance.ts
3424
- var import_axios12 = __toESM(require("axios"));
3425
- var platformDpsClientInstance = import_axios12.default.create({
3582
+ var import_axios14 = __toESM(require("axios"));
3583
+ var platformDpsClientInstance = import_axios14.default.create({
3426
3584
  baseURL: "https://dev-platform.labs.livechatinc.com"
3427
3585
  });
3428
3586
  function getPlatformDpsClientAuthorization(req) {
@@ -4967,7 +5125,7 @@ var platformDpsApi = {
4967
5125
  };
4968
5126
 
4969
5127
  // src/apis/platform/adapter/instance.ts
4970
- var import_axios13 = __toESM(require("axios"));
5128
+ var import_axios15 = __toESM(require("axios"));
4971
5129
  var REGION2 = {
4972
5130
  FRA: "fra",
4973
5131
  DAL: "dal",
@@ -4993,11 +5151,10 @@ function getPlatformAdapterClientAuthorization(req) {
4993
5151
  netlify: req.headers["netlify-token"],
4994
5152
  vercel: req.headers["vercel-token"],
4995
5153
  planetscale: req.headers["planetscale-token"],
4996
- sentry: req.headers["sentry-token"],
4997
- openai: req.headers["openai-token"]
5154
+ sentry: req.headers["sentry-token"]
4998
5155
  };
4999
5156
  }
5000
- var platformAdapterClientInstance = import_axios13.default.create({
5157
+ var platformAdapterClientInstance = import_axios15.default.create({
5001
5158
  baseURL: "https://platform.labs.text.com/console-adapter/api",
5002
5159
  headers: {
5003
5160
  "Content-Type": "application/json"
@@ -5007,7 +5164,7 @@ platformAdapterClientInstance.interceptors.response.use(
5007
5164
  (r) => r,
5008
5165
  (error) => {
5009
5166
  var _a;
5010
- if (import_axios13.default.isAxiosError(error)) {
5167
+ if (import_axios15.default.isAxiosError(error)) {
5011
5168
  if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
5012
5169
  const source = error.response.data.error.source;
5013
5170
  if (source) {
@@ -5019,7 +5176,7 @@ platformAdapterClientInstance.interceptors.response.use(
5019
5176
  }
5020
5177
  );
5021
5178
  function getPlatformAdapterClientConfig(options = {}) {
5022
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
5179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
5023
5180
  const currentHeaders = platformAdapterClientInstance.defaults.headers;
5024
5181
  const headers = {
5025
5182
  platform: {
@@ -5033,36 +5190,32 @@ function getPlatformAdapterClientConfig(options = {}) {
5033
5190
  netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
5034
5191
  vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
5035
5192
  planetscale: (_i = currentHeaders["planetscale-token"]) != null ? _i : options.planetscale,
5036
- sentry: (_j = currentHeaders["sentry-token"]) != null ? _j : options.sentry,
5037
- openai: (_k = currentHeaders["openai-token"]) != null ? _k : options.openai
5193
+ sentry: (_j = currentHeaders["sentry-token"]) != null ? _j : options.sentry
5038
5194
  }
5039
5195
  };
5040
5196
  if (currentHeaders["platform-dps-token"]) {
5041
- currentHeaders["X-Region"] = (_l = getRegion2(currentHeaders["platform-dps-token"])) != null ? _l : void 0;
5197
+ currentHeaders["X-Region"] = (_k = getRegion2(currentHeaders["platform-dps-token"])) != null ? _k : void 0;
5042
5198
  }
5043
- if (((_n = (_m = options.ensureAuthorizationToken) == null ? void 0 : _m.platform) == null ? void 0 : _n.dps) && !headers.platform.dps) {
5199
+ if (((_m = (_l = options.ensureAuthorizationToken) == null ? void 0 : _l.platform) == null ? void 0 : _m.dps) && !headers.platform.dps) {
5044
5200
  throw new UnauthorizeApiError("dps");
5045
5201
  }
5046
- if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5202
+ if (((_n = options.ensureAuthorizationToken) == null ? void 0 : _n.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5047
5203
  throw new UnauthorizeApiError("github");
5048
5204
  }
5049
- if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.vercel) && !headers.integrations.vercel) {
5205
+ if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.vercel) && !headers.integrations.vercel) {
5050
5206
  throw new UnauthorizeApiError("vercel");
5051
5207
  }
5052
- if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.netlify) && !headers.integrations.netlify) {
5208
+ if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.netlify) && !headers.integrations.netlify) {
5053
5209
  throw new UnauthorizeApiError("netlify");
5054
5210
  }
5055
- if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.planetscale) && !headers.integrations.planetscale) {
5211
+ if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.planetscale) && !headers.integrations.planetscale) {
5056
5212
  throw new UnauthorizeApiError("planetscale");
5057
5213
  }
5058
- if (((_s = options.ensureAuthorizationToken) == null ? void 0 : _s.sentry) && !headers.integrations.sentry) {
5214
+ if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.sentry) && !headers.integrations.sentry) {
5059
5215
  throw new UnauthorizeApiError("sentry");
5060
5216
  }
5061
- if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.openai) && !headers.integrations.openai) {
5062
- throw new UnauthorizeApiError("openai");
5063
- }
5064
5217
  return {
5065
- headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.dps ? { "platform-dps-token": headers.platform.dps } : {}), headers.integrations.github.app ? { "github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.sentry ? { "sentry-token": headers.integrations.sentry } : {}), headers.integrations.openai ? { "openai-token": headers.integrations.openai } : {})
5218
+ headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.dps ? { "platform-dps-token": headers.platform.dps } : {}), headers.integrations.github.app ? { "github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.sentry ? { "sentry-token": headers.integrations.sentry } : {})
5066
5219
  };
5067
5220
  }
5068
5221
  function initPlatformAdapterClientInstance(baseUrl, tokens) {
@@ -5103,9 +5256,6 @@ function updatePlatformAdapterClientInstance(tokens) {
5103
5256
  if (tokens == null ? void 0 : tokens.sentry) {
5104
5257
  headers["sentry-token"] = tokens.sentry;
5105
5258
  }
5106
- if (tokens == null ? void 0 : tokens.openai) {
5107
- headers["openai-token"] = tokens.openai;
5108
- }
5109
5259
  }
5110
5260
 
5111
5261
  // src/apis/platform/adapter/app/blocks/deployment/api.ts
@@ -5628,20 +5778,6 @@ var platformAdapterAppApi = {
5628
5778
  }
5629
5779
  };
5630
5780
 
5631
- // src/apis/platform/adapter/assistant/api.ts
5632
- var platformAdapterAssistantApi = {
5633
- request(request, authorization) {
5634
- return __async(this, null, function* () {
5635
- const response = yield platformAdapterClientInstance.post(
5636
- `/integrations/openai/assistant`,
5637
- request,
5638
- getPlatformAdapterClientConfig(authorization)
5639
- );
5640
- return response.data;
5641
- });
5642
- }
5643
- };
5644
-
5645
5781
  // src/apis/platform/adapter/conductor/api.ts
5646
5782
  var platformAdapterConductorApi = {
5647
5783
  request(config, authorization) {
@@ -5659,13 +5795,12 @@ var platformAdapterConductorApi = {
5659
5795
  // src/apis/platform/adapter/api.ts
5660
5796
  var platformAdapterApi = {
5661
5797
  app: platformAdapterAppApi,
5662
- conductor: platformAdapterConductorApi,
5663
- assistant: platformAdapterAssistantApi
5798
+ conductor: platformAdapterConductorApi
5664
5799
  };
5665
5800
 
5666
5801
  // src/apis/platform/billing/instance.ts
5667
- var import_axios14 = __toESM(require("axios"));
5668
- var platformBillingClientInstance = import_axios14.default.create({
5802
+ var import_axios16 = __toESM(require("axios"));
5803
+ var platformBillingClientInstance = import_axios16.default.create({
5669
5804
  baseURL: "https://billing.labs.livechatinc.com"
5670
5805
  });
5671
5806
  function getPlatformBillingClientAuthorization(req) {
@@ -5804,7 +5939,7 @@ var api = {
5804
5939
  isInitialized: false
5805
5940
  };
5806
5941
  function initApi(config, tokens) {
5807
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
5942
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
5808
5943
  initPlatformAccountsClientInstance(
5809
5944
  (_a = config.urls.platform) == null ? void 0 : _a.accounts,
5810
5945
  (_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.dps
@@ -5841,8 +5976,9 @@ function initApi(config, tokens) {
5841
5976
  initGithubClientInstance((_s = tokens == null ? void 0 : tokens.github) == null ? void 0 : _s.apps);
5842
5977
  initNetlifyClientInstance((_t = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _t.token);
5843
5978
  initVercelClientInstance((_u = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _u.token);
5844
- initPlanetScaleClientInstance((_v = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _v.token);
5845
- initSentryClientInstance((_w = tokens == null ? void 0 : tokens.sentry) == null ? void 0 : _w.token);
5979
+ initNeonClientInstance((_v = tokens == null ? void 0 : tokens.neon) == null ? void 0 : _v.token);
5980
+ initPlanetScaleClientInstance((_w = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _w.token);
5981
+ initSentryClientInstance((_x = tokens == null ? void 0 : tokens.sentry) == null ? void 0 : _x.token);
5846
5982
  api.isInitialized = true;
5847
5983
  }
5848
5984
 
@@ -5869,6 +6005,8 @@ var serializerBase64 = {
5869
6005
  getGithubClientRequestConfig,
5870
6006
  getLiveChatClientAuthorization,
5871
6007
  getLiveChatClientConfig,
6008
+ getNeonClientAuthorization,
6009
+ getNeonClientConfig,
5872
6010
  getNetlifyClientAuthorization,
5873
6011
  getNetlifyClientConfig,
5874
6012
  getPlanetScaleClientAuthorization,
@@ -5893,6 +6031,7 @@ var serializerBase64 = {
5893
6031
  initApi,
5894
6032
  initGithubClientInstance,
5895
6033
  initLiveChatClientInstance,
6034
+ initNeonClientInstance,
5896
6035
  initNetlifyClientInstance,
5897
6036
  initPlanetScaleClientInstance,
5898
6037
  initPlatformAccountsClientInstance,
@@ -5903,6 +6042,7 @@ var serializerBase64 = {
5903
6042
  initTextClientInstance,
5904
6043
  initVercelClientInstance,
5905
6044
  livechatClientInstance,
6045
+ neonClientInstance,
5906
6046
  netlifyClientInstance,
5907
6047
  planetScaleClientInstance,
5908
6048
  platformAccountsClientInstance,
@@ -5913,6 +6053,7 @@ var serializerBase64 = {
5913
6053
  serializerBase64,
5914
6054
  textClientInstance,
5915
6055
  updateGithubClientInstance,
6056
+ updateNeonClientInstance,
5916
6057
  updateNetlifyClientInstance,
5917
6058
  updatePlanetScaleClientInstance,
5918
6059
  updatePlatformAdapterClientInstance,
package/dist/index.mjs CHANGED
@@ -2367,18 +2367,171 @@ var vercelApi = {
2367
2367
  }
2368
2368
  };
2369
2369
 
2370
+ // src/apis/integrations/neon/api.ts
2371
+ import axios11 from "axios";
2372
+
2373
+ // src/apis/integrations/neon/instance.ts
2374
+ import axios10 from "axios";
2375
+ var neonClientInstance = axios10.create({
2376
+ baseURL: "https://console.neon.tech/api/v2/"
2377
+ });
2378
+ neonClientInstance.interceptors.response.use(
2379
+ (r) => r,
2380
+ (error) => {
2381
+ var _a;
2382
+ if (axios10.isAxiosError(error)) {
2383
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
2384
+ throw new UnauthorizeApiError("neon");
2385
+ }
2386
+ }
2387
+ throw error;
2388
+ }
2389
+ );
2390
+ function getNeonClientAuthorization(req) {
2391
+ return {
2392
+ token: req.headers["neon-token"]
2393
+ };
2394
+ }
2395
+ function getNeonClientConfig(options = {}) {
2396
+ const currentHeaders = neonClientInstance.defaults.headers;
2397
+ const defaultAuthorization = currentHeaders.Authorization;
2398
+ const headers = {
2399
+ authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `${options.token}` : void 0
2400
+ };
2401
+ if (options.ensureAuthorizationToken && !headers.authorization) {
2402
+ throw new UnauthorizeApiError("neon");
2403
+ }
2404
+ return {
2405
+ headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
2406
+ };
2407
+ }
2408
+ function initNeonClientInstance(token) {
2409
+ if (token) {
2410
+ updateNeonClientInstance(token);
2411
+ }
2412
+ }
2413
+ function updateNeonClientInstance(token) {
2414
+ const headers = neonClientInstance.defaults.headers;
2415
+ if (token) {
2416
+ headers.Authorization = `${token}`;
2417
+ } else {
2418
+ delete headers.Authorization;
2419
+ }
2420
+ }
2421
+
2422
+ // src/apis/integrations/neon/project/branch/api.ts
2423
+ var neonProjectBranchApi = {
2424
+ getBranch(projectId, branchId, authorization) {
2425
+ return __async(this, null, function* () {
2426
+ const response = yield neonClientInstance.get(
2427
+ `projects/${projectId}/branches/${branchId}`,
2428
+ getNeonClientConfig(__spreadValues({}, authorization))
2429
+ );
2430
+ return response.data;
2431
+ });
2432
+ }
2433
+ };
2434
+
2435
+ // src/apis/integrations/neon/project/api.ts
2436
+ var neonProjectApi = {
2437
+ branch: neonProjectBranchApi,
2438
+ createProject(projectName, authorization) {
2439
+ return __async(this, null, function* () {
2440
+ const response = yield neonClientInstance.post(
2441
+ `/projects`,
2442
+ {
2443
+ project: {
2444
+ name: projectName
2445
+ }
2446
+ },
2447
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2448
+ ensureAuthorizationToken: true
2449
+ }))
2450
+ );
2451
+ return response.data;
2452
+ });
2453
+ },
2454
+ getProject(projectId, authorization) {
2455
+ return __async(this, null, function* () {
2456
+ const response = yield neonClientInstance.get(
2457
+ `/projects/${projectId}`,
2458
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2459
+ ensureAuthorizationToken: true
2460
+ }))
2461
+ );
2462
+ return response.data;
2463
+ });
2464
+ },
2465
+ deleteProject(projectId, authorization) {
2466
+ return __async(this, null, function* () {
2467
+ const response = yield neonClientInstance.delete(
2468
+ `/projects/${projectId}`,
2469
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2470
+ ensureAuthorizationToken: true
2471
+ }))
2472
+ );
2473
+ return response.data;
2474
+ });
2475
+ }
2476
+ };
2477
+
2478
+ // src/apis/integrations/neon/user/api.ts
2479
+ var neonUserApi = {
2480
+ getUser(authorization) {
2481
+ return __async(this, null, function* () {
2482
+ const response = yield neonClientInstance.get(
2483
+ `/users/me`,
2484
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2485
+ ensureAuthorizationToken: true
2486
+ }))
2487
+ );
2488
+ return response.data;
2489
+ });
2490
+ }
2491
+ };
2492
+
2493
+ // src/apis/integrations/neon/api.ts
2494
+ var neonApi = {
2495
+ project: neonProjectApi,
2496
+ user: neonUserApi,
2497
+ getToken(code, clientId, clientSecret, redirectUri) {
2498
+ return __async(this, null, function* () {
2499
+ var _a;
2500
+ const data = new URLSearchParams({
2501
+ code,
2502
+ client_id: clientId,
2503
+ client_secret: clientSecret,
2504
+ redirect_uri: redirectUri,
2505
+ grant_type: "authorization_code"
2506
+ });
2507
+ const response = yield axios11.post(
2508
+ "https://oauth2.neon.tech/oauth2/token",
2509
+ data,
2510
+ {
2511
+ headers: {
2512
+ "Content-Type": "application/x-www-form-urlencoded"
2513
+ }
2514
+ }
2515
+ );
2516
+ const params = new URLSearchParams(response.data);
2517
+ return (_a = params.get("access_token")) != null ? _a : "";
2518
+ });
2519
+ }
2520
+ };
2521
+
2370
2522
  // src/apis/integrations/api.ts
2371
2523
  var integrationsApi = {
2372
2524
  github: gitHubApi,
2373
2525
  netlify: netlifyApi,
2374
2526
  vercel: vercelApi,
2527
+ neon: neonApi,
2375
2528
  planetscale: planetscaleApi,
2376
2529
  sentry: sentryApi,
2377
2530
  text: textApi
2378
2531
  };
2379
2532
 
2380
2533
  // src/apis/products/livechat/instance.ts
2381
- import axios10 from "axios";
2534
+ import axios12 from "axios";
2382
2535
  var REGION = {
2383
2536
  FRA: "fra",
2384
2537
  DAL: "dal",
@@ -2392,7 +2545,7 @@ var getRegion = (token) => {
2392
2545
  return region;
2393
2546
  }
2394
2547
  };
2395
- var livechatClientInstance = axios10.create({
2548
+ var livechatClientInstance = axios12.create({
2396
2549
  baseURL: "https://api.labs.livechatinc.com"
2397
2550
  });
2398
2551
  function getLiveChatClientAuthorization(req) {
@@ -2875,8 +3028,8 @@ var productsApi = {
2875
3028
  };
2876
3029
 
2877
3030
  // src/apis/platform/accounts/instance.ts
2878
- import axios11 from "axios";
2879
- var platformAccountsClientInstance = axios11.create({
3031
+ import axios13 from "axios";
3032
+ var platformAccountsClientInstance = axios13.create({
2880
3033
  baseURL: "https://accounts.labs.livechatinc.com"
2881
3034
  });
2882
3035
  function getPlatformAccountsClientAuthorization(req) {
@@ -3330,8 +3483,8 @@ var platformAccountsApi = {
3330
3483
  };
3331
3484
 
3332
3485
  // src/apis/platform/dps/instance.ts
3333
- import axios12 from "axios";
3334
- var platformDpsClientInstance = axios12.create({
3486
+ import axios14 from "axios";
3487
+ var platformDpsClientInstance = axios14.create({
3335
3488
  baseURL: "https://dev-platform.labs.livechatinc.com"
3336
3489
  });
3337
3490
  function getPlatformDpsClientAuthorization(req) {
@@ -4876,7 +5029,7 @@ var platformDpsApi = {
4876
5029
  };
4877
5030
 
4878
5031
  // src/apis/platform/adapter/instance.ts
4879
- import axios13 from "axios";
5032
+ import axios15 from "axios";
4880
5033
  var REGION2 = {
4881
5034
  FRA: "fra",
4882
5035
  DAL: "dal",
@@ -4902,11 +5055,10 @@ function getPlatformAdapterClientAuthorization(req) {
4902
5055
  netlify: req.headers["netlify-token"],
4903
5056
  vercel: req.headers["vercel-token"],
4904
5057
  planetscale: req.headers["planetscale-token"],
4905
- sentry: req.headers["sentry-token"],
4906
- openai: req.headers["openai-token"]
5058
+ sentry: req.headers["sentry-token"]
4907
5059
  };
4908
5060
  }
4909
- var platformAdapterClientInstance = axios13.create({
5061
+ var platformAdapterClientInstance = axios15.create({
4910
5062
  baseURL: "https://platform.labs.text.com/console-adapter/api",
4911
5063
  headers: {
4912
5064
  "Content-Type": "application/json"
@@ -4916,7 +5068,7 @@ platformAdapterClientInstance.interceptors.response.use(
4916
5068
  (r) => r,
4917
5069
  (error) => {
4918
5070
  var _a;
4919
- if (axios13.isAxiosError(error)) {
5071
+ if (axios15.isAxiosError(error)) {
4920
5072
  if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
4921
5073
  const source = error.response.data.error.source;
4922
5074
  if (source) {
@@ -4928,7 +5080,7 @@ platformAdapterClientInstance.interceptors.response.use(
4928
5080
  }
4929
5081
  );
4930
5082
  function getPlatformAdapterClientConfig(options = {}) {
4931
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
5083
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
4932
5084
  const currentHeaders = platformAdapterClientInstance.defaults.headers;
4933
5085
  const headers = {
4934
5086
  platform: {
@@ -4942,36 +5094,32 @@ function getPlatformAdapterClientConfig(options = {}) {
4942
5094
  netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
4943
5095
  vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
4944
5096
  planetscale: (_i = currentHeaders["planetscale-token"]) != null ? _i : options.planetscale,
4945
- sentry: (_j = currentHeaders["sentry-token"]) != null ? _j : options.sentry,
4946
- openai: (_k = currentHeaders["openai-token"]) != null ? _k : options.openai
5097
+ sentry: (_j = currentHeaders["sentry-token"]) != null ? _j : options.sentry
4947
5098
  }
4948
5099
  };
4949
5100
  if (currentHeaders["platform-dps-token"]) {
4950
- currentHeaders["X-Region"] = (_l = getRegion2(currentHeaders["platform-dps-token"])) != null ? _l : void 0;
5101
+ currentHeaders["X-Region"] = (_k = getRegion2(currentHeaders["platform-dps-token"])) != null ? _k : void 0;
4951
5102
  }
4952
- if (((_n = (_m = options.ensureAuthorizationToken) == null ? void 0 : _m.platform) == null ? void 0 : _n.dps) && !headers.platform.dps) {
5103
+ if (((_m = (_l = options.ensureAuthorizationToken) == null ? void 0 : _l.platform) == null ? void 0 : _m.dps) && !headers.platform.dps) {
4953
5104
  throw new UnauthorizeApiError("dps");
4954
5105
  }
4955
- if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5106
+ if (((_n = options.ensureAuthorizationToken) == null ? void 0 : _n.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
4956
5107
  throw new UnauthorizeApiError("github");
4957
5108
  }
4958
- if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.vercel) && !headers.integrations.vercel) {
5109
+ if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.vercel) && !headers.integrations.vercel) {
4959
5110
  throw new UnauthorizeApiError("vercel");
4960
5111
  }
4961
- if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.netlify) && !headers.integrations.netlify) {
5112
+ if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.netlify) && !headers.integrations.netlify) {
4962
5113
  throw new UnauthorizeApiError("netlify");
4963
5114
  }
4964
- if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.planetscale) && !headers.integrations.planetscale) {
5115
+ if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.planetscale) && !headers.integrations.planetscale) {
4965
5116
  throw new UnauthorizeApiError("planetscale");
4966
5117
  }
4967
- if (((_s = options.ensureAuthorizationToken) == null ? void 0 : _s.sentry) && !headers.integrations.sentry) {
5118
+ if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.sentry) && !headers.integrations.sentry) {
4968
5119
  throw new UnauthorizeApiError("sentry");
4969
5120
  }
4970
- if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.openai) && !headers.integrations.openai) {
4971
- throw new UnauthorizeApiError("openai");
4972
- }
4973
5121
  return {
4974
- headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.dps ? { "platform-dps-token": headers.platform.dps } : {}), headers.integrations.github.app ? { "github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.sentry ? { "sentry-token": headers.integrations.sentry } : {}), headers.integrations.openai ? { "openai-token": headers.integrations.openai } : {})
5122
+ headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.dps ? { "platform-dps-token": headers.platform.dps } : {}), headers.integrations.github.app ? { "github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.sentry ? { "sentry-token": headers.integrations.sentry } : {})
4975
5123
  };
4976
5124
  }
4977
5125
  function initPlatformAdapterClientInstance(baseUrl, tokens) {
@@ -5012,9 +5160,6 @@ function updatePlatformAdapterClientInstance(tokens) {
5012
5160
  if (tokens == null ? void 0 : tokens.sentry) {
5013
5161
  headers["sentry-token"] = tokens.sentry;
5014
5162
  }
5015
- if (tokens == null ? void 0 : tokens.openai) {
5016
- headers["openai-token"] = tokens.openai;
5017
- }
5018
5163
  }
5019
5164
 
5020
5165
  // src/apis/platform/adapter/app/blocks/deployment/api.ts
@@ -5537,20 +5682,6 @@ var platformAdapterAppApi = {
5537
5682
  }
5538
5683
  };
5539
5684
 
5540
- // src/apis/platform/adapter/assistant/api.ts
5541
- var platformAdapterAssistantApi = {
5542
- request(request, authorization) {
5543
- return __async(this, null, function* () {
5544
- const response = yield platformAdapterClientInstance.post(
5545
- `/integrations/openai/assistant`,
5546
- request,
5547
- getPlatformAdapterClientConfig(authorization)
5548
- );
5549
- return response.data;
5550
- });
5551
- }
5552
- };
5553
-
5554
5685
  // src/apis/platform/adapter/conductor/api.ts
5555
5686
  var platformAdapterConductorApi = {
5556
5687
  request(config, authorization) {
@@ -5568,13 +5699,12 @@ var platformAdapterConductorApi = {
5568
5699
  // src/apis/platform/adapter/api.ts
5569
5700
  var platformAdapterApi = {
5570
5701
  app: platformAdapterAppApi,
5571
- conductor: platformAdapterConductorApi,
5572
- assistant: platformAdapterAssistantApi
5702
+ conductor: platformAdapterConductorApi
5573
5703
  };
5574
5704
 
5575
5705
  // src/apis/platform/billing/instance.ts
5576
- import axios14 from "axios";
5577
- var platformBillingClientInstance = axios14.create({
5706
+ import axios16 from "axios";
5707
+ var platformBillingClientInstance = axios16.create({
5578
5708
  baseURL: "https://billing.labs.livechatinc.com"
5579
5709
  });
5580
5710
  function getPlatformBillingClientAuthorization(req) {
@@ -5713,7 +5843,7 @@ var api = {
5713
5843
  isInitialized: false
5714
5844
  };
5715
5845
  function initApi(config, tokens) {
5716
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
5846
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
5717
5847
  initPlatformAccountsClientInstance(
5718
5848
  (_a = config.urls.platform) == null ? void 0 : _a.accounts,
5719
5849
  (_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.dps
@@ -5750,8 +5880,9 @@ function initApi(config, tokens) {
5750
5880
  initGithubClientInstance((_s = tokens == null ? void 0 : tokens.github) == null ? void 0 : _s.apps);
5751
5881
  initNetlifyClientInstance((_t = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _t.token);
5752
5882
  initVercelClientInstance((_u = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _u.token);
5753
- initPlanetScaleClientInstance((_v = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _v.token);
5754
- initSentryClientInstance((_w = tokens == null ? void 0 : tokens.sentry) == null ? void 0 : _w.token);
5883
+ initNeonClientInstance((_v = tokens == null ? void 0 : tokens.neon) == null ? void 0 : _v.token);
5884
+ initPlanetScaleClientInstance((_w = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _w.token);
5885
+ initSentryClientInstance((_x = tokens == null ? void 0 : tokens.sentry) == null ? void 0 : _x.token);
5755
5886
  api.isInitialized = true;
5756
5887
  }
5757
5888
 
@@ -5777,6 +5908,8 @@ export {
5777
5908
  getGithubClientRequestConfig,
5778
5909
  getLiveChatClientAuthorization,
5779
5910
  getLiveChatClientConfig,
5911
+ getNeonClientAuthorization,
5912
+ getNeonClientConfig,
5780
5913
  getNetlifyClientAuthorization,
5781
5914
  getNetlifyClientConfig,
5782
5915
  getPlanetScaleClientAuthorization,
@@ -5801,6 +5934,7 @@ export {
5801
5934
  initApi,
5802
5935
  initGithubClientInstance,
5803
5936
  initLiveChatClientInstance,
5937
+ initNeonClientInstance,
5804
5938
  initNetlifyClientInstance,
5805
5939
  initPlanetScaleClientInstance,
5806
5940
  initPlatformAccountsClientInstance,
@@ -5811,6 +5945,7 @@ export {
5811
5945
  initTextClientInstance,
5812
5946
  initVercelClientInstance,
5813
5947
  livechatClientInstance,
5948
+ neonClientInstance,
5814
5949
  netlifyClientInstance,
5815
5950
  planetScaleClientInstance,
5816
5951
  platformAccountsClientInstance,
@@ -5821,6 +5956,7 @@ export {
5821
5956
  serializerBase64,
5822
5957
  textClientInstance,
5823
5958
  updateGithubClientInstance,
5959
+ updateNeonClientInstance,
5824
5960
  updateNetlifyClientInstance,
5825
5961
  updatePlanetScaleClientInstance,
5826
5962
  updatePlatformAdapterClientInstance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "2.3.41",
3
+ "version": "2.3.43",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -11,8 +11,7 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "axios": "0.21.1",
15
- "openai": "^4.24.2"
14
+ "axios": "0.21.1"
16
15
  },
17
16
  "devDependencies": {
18
17
  "@types/node": "^17.0.12",