@livechat/developer-studio-api 2.3.40 → 2.3.42
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 +68 -6
- package/dist/index.d.ts +68 -6
- package/dist/index.js +157 -30
- package/dist/index.mjs +157 -30
- package/package.json +4 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
|
+
interface NeonClientInstanceAuthorization {
|
|
5
|
+
token?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
interface AppEventDto {
|
|
5
9
|
name: string;
|
|
6
10
|
aggregateName: string;
|
|
@@ -573,6 +577,54 @@ type GetVercelProjectsResult = VercelPaginatedResult & {
|
|
|
573
577
|
projects: VercelProject[];
|
|
574
578
|
};
|
|
575
579
|
|
|
580
|
+
interface NeonProjectDto {
|
|
581
|
+
project: {
|
|
582
|
+
id: string;
|
|
583
|
+
name: string;
|
|
584
|
+
created_at: string;
|
|
585
|
+
updated_at: string;
|
|
586
|
+
owner_id: string;
|
|
587
|
+
owner: {
|
|
588
|
+
email: string;
|
|
589
|
+
branches_limit: number;
|
|
590
|
+
subscription: "UNKNOWN" | "free" | "pro" | "direct_sales" | "aws_marketplace";
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
interface NeonProjectWithConnectionUriDto extends NeonProjectDto {
|
|
595
|
+
connection_uri: string;
|
|
596
|
+
branch: NeonProjectBranchDto[];
|
|
597
|
+
databases: NeonProjectDatabaseDto[];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
interface NeonProjectBranchDto {
|
|
601
|
+
id: string;
|
|
602
|
+
project_id: string;
|
|
603
|
+
name: string;
|
|
604
|
+
current_state: "init" | "ready";
|
|
605
|
+
creation_source: string;
|
|
606
|
+
primary: boolean;
|
|
607
|
+
created_at: string;
|
|
608
|
+
updated_at: string;
|
|
609
|
+
}
|
|
610
|
+
interface NeonProjectDatabaseDto {
|
|
611
|
+
id: number;
|
|
612
|
+
branch_id: string;
|
|
613
|
+
name: string;
|
|
614
|
+
owner_name: string;
|
|
615
|
+
created_at: string;
|
|
616
|
+
updated_at: string;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
interface NeonUser {
|
|
620
|
+
id: string;
|
|
621
|
+
type: string;
|
|
622
|
+
name: string;
|
|
623
|
+
email: string;
|
|
624
|
+
display_name: string;
|
|
625
|
+
default_organization_id: string;
|
|
626
|
+
}
|
|
627
|
+
|
|
576
628
|
interface AccountDto {
|
|
577
629
|
account_id: string;
|
|
578
630
|
avatar: string;
|
|
@@ -1237,7 +1289,6 @@ interface PlatformAdapterClientInstanceAuthorization {
|
|
|
1237
1289
|
vercel?: string;
|
|
1238
1290
|
planetscale?: string;
|
|
1239
1291
|
sentry?: string;
|
|
1240
|
-
openai?: string;
|
|
1241
1292
|
}
|
|
1242
1293
|
type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthorization & {
|
|
1243
1294
|
ensureAuthorizationToken?: {
|
|
@@ -1249,7 +1300,6 @@ type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthori
|
|
|
1249
1300
|
vercel?: boolean;
|
|
1250
1301
|
planetscale?: boolean;
|
|
1251
1302
|
sentry?: boolean;
|
|
1252
|
-
openai?: boolean;
|
|
1253
1303
|
};
|
|
1254
1304
|
};
|
|
1255
1305
|
declare function getPlatformAdapterClientAuthorization(req: {
|
|
@@ -1269,7 +1319,6 @@ declare function initPlatformAdapterClientInstance(baseUrl?: string, tokens?: {
|
|
|
1269
1319
|
vercel?: string;
|
|
1270
1320
|
planetscale?: string;
|
|
1271
1321
|
sentry?: string;
|
|
1272
|
-
openai?: string;
|
|
1273
1322
|
}): void;
|
|
1274
1323
|
declare function updatePlatformAdapterClientInstance(tokens?: {
|
|
1275
1324
|
platform?: {
|
|
@@ -1283,7 +1332,6 @@ declare function updatePlatformAdapterClientInstance(tokens?: {
|
|
|
1283
1332
|
vercel?: string;
|
|
1284
1333
|
planetscale?: string;
|
|
1285
1334
|
sentry?: string;
|
|
1286
|
-
openai?: string;
|
|
1287
1335
|
}): void;
|
|
1288
1336
|
|
|
1289
1337
|
interface ApplicationPaymentDto {
|
|
@@ -2520,6 +2568,20 @@ declare const api: {
|
|
|
2520
2568
|
teamId: string;
|
|
2521
2569
|
}>;
|
|
2522
2570
|
};
|
|
2571
|
+
neon: {
|
|
2572
|
+
project: {
|
|
2573
|
+
branch: {
|
|
2574
|
+
getBranch(projectId: string, branchId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectBranchDto>;
|
|
2575
|
+
};
|
|
2576
|
+
createProject(projectName: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectWithConnectionUriDto>;
|
|
2577
|
+
getProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
|
|
2578
|
+
deleteProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
|
|
2579
|
+
};
|
|
2580
|
+
user: {
|
|
2581
|
+
getUser(authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonUser>;
|
|
2582
|
+
};
|
|
2583
|
+
getToken(code: string, clientId: string, clientSecret: string, redirectUri: string): Promise<string>;
|
|
2584
|
+
};
|
|
2523
2585
|
planetscale: {
|
|
2524
2586
|
database: {
|
|
2525
2587
|
password: {
|
|
@@ -2649,7 +2711,7 @@ declare const API_NOTIFICATIONS: {
|
|
|
2649
2711
|
};
|
|
2650
2712
|
};
|
|
2651
2713
|
|
|
2652
|
-
type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "
|
|
2714
|
+
type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "neon" | "planetscale";
|
|
2653
2715
|
interface ApiError {
|
|
2654
2716
|
message: string;
|
|
2655
2717
|
}
|
|
@@ -2663,4 +2725,4 @@ declare const serializerBase64: {
|
|
|
2663
2725
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2664
2726
|
};
|
|
2665
2727
|
|
|
2666
|
-
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, 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 };
|
|
2728
|
+
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, 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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
|
+
interface NeonClientInstanceAuthorization {
|
|
5
|
+
token?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
interface AppEventDto {
|
|
5
9
|
name: string;
|
|
6
10
|
aggregateName: string;
|
|
@@ -573,6 +577,54 @@ type GetVercelProjectsResult = VercelPaginatedResult & {
|
|
|
573
577
|
projects: VercelProject[];
|
|
574
578
|
};
|
|
575
579
|
|
|
580
|
+
interface NeonProjectDto {
|
|
581
|
+
project: {
|
|
582
|
+
id: string;
|
|
583
|
+
name: string;
|
|
584
|
+
created_at: string;
|
|
585
|
+
updated_at: string;
|
|
586
|
+
owner_id: string;
|
|
587
|
+
owner: {
|
|
588
|
+
email: string;
|
|
589
|
+
branches_limit: number;
|
|
590
|
+
subscription: "UNKNOWN" | "free" | "pro" | "direct_sales" | "aws_marketplace";
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
interface NeonProjectWithConnectionUriDto extends NeonProjectDto {
|
|
595
|
+
connection_uri: string;
|
|
596
|
+
branch: NeonProjectBranchDto[];
|
|
597
|
+
databases: NeonProjectDatabaseDto[];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
interface NeonProjectBranchDto {
|
|
601
|
+
id: string;
|
|
602
|
+
project_id: string;
|
|
603
|
+
name: string;
|
|
604
|
+
current_state: "init" | "ready";
|
|
605
|
+
creation_source: string;
|
|
606
|
+
primary: boolean;
|
|
607
|
+
created_at: string;
|
|
608
|
+
updated_at: string;
|
|
609
|
+
}
|
|
610
|
+
interface NeonProjectDatabaseDto {
|
|
611
|
+
id: number;
|
|
612
|
+
branch_id: string;
|
|
613
|
+
name: string;
|
|
614
|
+
owner_name: string;
|
|
615
|
+
created_at: string;
|
|
616
|
+
updated_at: string;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
interface NeonUser {
|
|
620
|
+
id: string;
|
|
621
|
+
type: string;
|
|
622
|
+
name: string;
|
|
623
|
+
email: string;
|
|
624
|
+
display_name: string;
|
|
625
|
+
default_organization_id: string;
|
|
626
|
+
}
|
|
627
|
+
|
|
576
628
|
interface AccountDto {
|
|
577
629
|
account_id: string;
|
|
578
630
|
avatar: string;
|
|
@@ -1237,7 +1289,6 @@ interface PlatformAdapterClientInstanceAuthorization {
|
|
|
1237
1289
|
vercel?: string;
|
|
1238
1290
|
planetscale?: string;
|
|
1239
1291
|
sentry?: string;
|
|
1240
|
-
openai?: string;
|
|
1241
1292
|
}
|
|
1242
1293
|
type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthorization & {
|
|
1243
1294
|
ensureAuthorizationToken?: {
|
|
@@ -1249,7 +1300,6 @@ type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthori
|
|
|
1249
1300
|
vercel?: boolean;
|
|
1250
1301
|
planetscale?: boolean;
|
|
1251
1302
|
sentry?: boolean;
|
|
1252
|
-
openai?: boolean;
|
|
1253
1303
|
};
|
|
1254
1304
|
};
|
|
1255
1305
|
declare function getPlatformAdapterClientAuthorization(req: {
|
|
@@ -1269,7 +1319,6 @@ declare function initPlatformAdapterClientInstance(baseUrl?: string, tokens?: {
|
|
|
1269
1319
|
vercel?: string;
|
|
1270
1320
|
planetscale?: string;
|
|
1271
1321
|
sentry?: string;
|
|
1272
|
-
openai?: string;
|
|
1273
1322
|
}): void;
|
|
1274
1323
|
declare function updatePlatformAdapterClientInstance(tokens?: {
|
|
1275
1324
|
platform?: {
|
|
@@ -1283,7 +1332,6 @@ declare function updatePlatformAdapterClientInstance(tokens?: {
|
|
|
1283
1332
|
vercel?: string;
|
|
1284
1333
|
planetscale?: string;
|
|
1285
1334
|
sentry?: string;
|
|
1286
|
-
openai?: string;
|
|
1287
1335
|
}): void;
|
|
1288
1336
|
|
|
1289
1337
|
interface ApplicationPaymentDto {
|
|
@@ -2520,6 +2568,20 @@ declare const api: {
|
|
|
2520
2568
|
teamId: string;
|
|
2521
2569
|
}>;
|
|
2522
2570
|
};
|
|
2571
|
+
neon: {
|
|
2572
|
+
project: {
|
|
2573
|
+
branch: {
|
|
2574
|
+
getBranch(projectId: string, branchId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectBranchDto>;
|
|
2575
|
+
};
|
|
2576
|
+
createProject(projectName: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectWithConnectionUriDto>;
|
|
2577
|
+
getProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
|
|
2578
|
+
deleteProject(projectId: string, authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonProjectDto>;
|
|
2579
|
+
};
|
|
2580
|
+
user: {
|
|
2581
|
+
getUser(authorization?: NeonClientInstanceAuthorization | undefined): Promise<NeonUser>;
|
|
2582
|
+
};
|
|
2583
|
+
getToken(code: string, clientId: string, clientSecret: string, redirectUri: string): Promise<string>;
|
|
2584
|
+
};
|
|
2523
2585
|
planetscale: {
|
|
2524
2586
|
database: {
|
|
2525
2587
|
password: {
|
|
@@ -2649,7 +2711,7 @@ declare const API_NOTIFICATIONS: {
|
|
|
2649
2711
|
};
|
|
2650
2712
|
};
|
|
2651
2713
|
|
|
2652
|
-
type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "
|
|
2714
|
+
type UnauthorizeApiErrorSource = "dps" | "github" | "vercel" | "netlify" | "sentry" | "neon" | "planetscale";
|
|
2653
2715
|
interface ApiError {
|
|
2654
2716
|
message: string;
|
|
2655
2717
|
}
|
|
@@ -2663,4 +2725,4 @@ declare const serializerBase64: {
|
|
|
2663
2725
|
deserialize<T_1>(message?: string): T_1 | undefined;
|
|
2664
2726
|
};
|
|
2665
2727
|
|
|
2666
|
-
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, 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 };
|
|
2728
|
+
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, 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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -2458,18 +2458,153 @@ var vercelApi = {
|
|
|
2458
2458
|
}
|
|
2459
2459
|
};
|
|
2460
2460
|
|
|
2461
|
+
// src/apis/integrations/neon/api.ts
|
|
2462
|
+
var import_axios11 = __toESM(require("axios"));
|
|
2463
|
+
|
|
2464
|
+
// src/apis/integrations/neon/instance.ts
|
|
2465
|
+
var import_axios10 = __toESM(require("axios"));
|
|
2466
|
+
var neonClientInstance = import_axios10.default.create({
|
|
2467
|
+
baseURL: "https://console.neon.tech/api/v2/"
|
|
2468
|
+
});
|
|
2469
|
+
neonClientInstance.interceptors.response.use(
|
|
2470
|
+
(r) => r,
|
|
2471
|
+
(error) => {
|
|
2472
|
+
var _a;
|
|
2473
|
+
if (import_axios10.default.isAxiosError(error)) {
|
|
2474
|
+
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2475
|
+
throw new UnauthorizeApiError("neon");
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
throw error;
|
|
2479
|
+
}
|
|
2480
|
+
);
|
|
2481
|
+
function getNeonClientConfig(options = {}) {
|
|
2482
|
+
const currentHeaders = neonClientInstance.defaults.headers;
|
|
2483
|
+
const defaultAuthorization = currentHeaders.Authorization;
|
|
2484
|
+
const headers = {
|
|
2485
|
+
authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `${options.token}` : void 0
|
|
2486
|
+
};
|
|
2487
|
+
if (options.ensureAuthorizationToken && !headers.authorization) {
|
|
2488
|
+
throw new UnauthorizeApiError("neon");
|
|
2489
|
+
}
|
|
2490
|
+
return {
|
|
2491
|
+
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
2492
|
+
};
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
// src/apis/integrations/neon/project/branch/api.ts
|
|
2496
|
+
var neonProjectBranchApi = {
|
|
2497
|
+
getBranch(projectId, branchId, authorization) {
|
|
2498
|
+
return __async(this, null, function* () {
|
|
2499
|
+
const response = yield neonClientInstance.get(
|
|
2500
|
+
`projects/${projectId}/branches/${branchId}`,
|
|
2501
|
+
getNeonClientConfig(__spreadValues({}, authorization))
|
|
2502
|
+
);
|
|
2503
|
+
return response.data;
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
};
|
|
2507
|
+
|
|
2508
|
+
// src/apis/integrations/neon/project/api.ts
|
|
2509
|
+
var neonProjectApi = {
|
|
2510
|
+
branch: neonProjectBranchApi,
|
|
2511
|
+
createProject(projectName, authorization) {
|
|
2512
|
+
return __async(this, null, function* () {
|
|
2513
|
+
const response = yield neonClientInstance.post(
|
|
2514
|
+
`/projects`,
|
|
2515
|
+
{
|
|
2516
|
+
project: {
|
|
2517
|
+
name: projectName
|
|
2518
|
+
}
|
|
2519
|
+
},
|
|
2520
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2521
|
+
ensureAuthorizationToken: true
|
|
2522
|
+
}))
|
|
2523
|
+
);
|
|
2524
|
+
return response.data;
|
|
2525
|
+
});
|
|
2526
|
+
},
|
|
2527
|
+
getProject(projectId, authorization) {
|
|
2528
|
+
return __async(this, null, function* () {
|
|
2529
|
+
const response = yield neonClientInstance.get(
|
|
2530
|
+
`/projects/${projectId}`,
|
|
2531
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2532
|
+
ensureAuthorizationToken: true
|
|
2533
|
+
}))
|
|
2534
|
+
);
|
|
2535
|
+
return response.data;
|
|
2536
|
+
});
|
|
2537
|
+
},
|
|
2538
|
+
deleteProject(projectId, authorization) {
|
|
2539
|
+
return __async(this, null, function* () {
|
|
2540
|
+
const response = yield neonClientInstance.delete(
|
|
2541
|
+
`/projects/${projectId}`,
|
|
2542
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2543
|
+
ensureAuthorizationToken: true
|
|
2544
|
+
}))
|
|
2545
|
+
);
|
|
2546
|
+
return response.data;
|
|
2547
|
+
});
|
|
2548
|
+
}
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2551
|
+
// src/apis/integrations/neon/user/api.ts
|
|
2552
|
+
var neonUserApi = {
|
|
2553
|
+
getUser(authorization) {
|
|
2554
|
+
return __async(this, null, function* () {
|
|
2555
|
+
const response = yield neonClientInstance.get(
|
|
2556
|
+
`/users/me`,
|
|
2557
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2558
|
+
ensureAuthorizationToken: true
|
|
2559
|
+
}))
|
|
2560
|
+
);
|
|
2561
|
+
return response.data;
|
|
2562
|
+
});
|
|
2563
|
+
}
|
|
2564
|
+
};
|
|
2565
|
+
|
|
2566
|
+
// src/apis/integrations/neon/api.ts
|
|
2567
|
+
var neonApi = {
|
|
2568
|
+
project: neonProjectApi,
|
|
2569
|
+
user: neonUserApi,
|
|
2570
|
+
getToken(code, clientId, clientSecret, redirectUri) {
|
|
2571
|
+
return __async(this, null, function* () {
|
|
2572
|
+
var _a;
|
|
2573
|
+
const data = new URLSearchParams({
|
|
2574
|
+
code,
|
|
2575
|
+
client_id: clientId,
|
|
2576
|
+
client_secret: clientSecret,
|
|
2577
|
+
redirect_uri: redirectUri,
|
|
2578
|
+
grant_type: "authorization_code"
|
|
2579
|
+
});
|
|
2580
|
+
const response = yield import_axios11.default.post(
|
|
2581
|
+
"https://oauth2.neon.tech/oauth2/token",
|
|
2582
|
+
data,
|
|
2583
|
+
{
|
|
2584
|
+
headers: {
|
|
2585
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
);
|
|
2589
|
+
const params = new URLSearchParams(response.data);
|
|
2590
|
+
return (_a = params.get("access_token")) != null ? _a : "";
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
};
|
|
2594
|
+
|
|
2461
2595
|
// src/apis/integrations/api.ts
|
|
2462
2596
|
var integrationsApi = {
|
|
2463
2597
|
github: gitHubApi,
|
|
2464
2598
|
netlify: netlifyApi,
|
|
2465
2599
|
vercel: vercelApi,
|
|
2600
|
+
neon: neonApi,
|
|
2466
2601
|
planetscale: planetscaleApi,
|
|
2467
2602
|
sentry: sentryApi,
|
|
2468
2603
|
text: textApi
|
|
2469
2604
|
};
|
|
2470
2605
|
|
|
2471
2606
|
// src/apis/products/livechat/instance.ts
|
|
2472
|
-
var
|
|
2607
|
+
var import_axios12 = __toESM(require("axios"));
|
|
2473
2608
|
var REGION = {
|
|
2474
2609
|
FRA: "fra",
|
|
2475
2610
|
DAL: "dal",
|
|
@@ -2483,7 +2618,7 @@ var getRegion = (token) => {
|
|
|
2483
2618
|
return region;
|
|
2484
2619
|
}
|
|
2485
2620
|
};
|
|
2486
|
-
var livechatClientInstance =
|
|
2621
|
+
var livechatClientInstance = import_axios12.default.create({
|
|
2487
2622
|
baseURL: "https://api.labs.livechatinc.com"
|
|
2488
2623
|
});
|
|
2489
2624
|
function getLiveChatClientAuthorization(req) {
|
|
@@ -2966,8 +3101,8 @@ var productsApi = {
|
|
|
2966
3101
|
};
|
|
2967
3102
|
|
|
2968
3103
|
// src/apis/platform/accounts/instance.ts
|
|
2969
|
-
var
|
|
2970
|
-
var platformAccountsClientInstance =
|
|
3104
|
+
var import_axios13 = __toESM(require("axios"));
|
|
3105
|
+
var platformAccountsClientInstance = import_axios13.default.create({
|
|
2971
3106
|
baseURL: "https://accounts.labs.livechatinc.com"
|
|
2972
3107
|
});
|
|
2973
3108
|
function getPlatformAccountsClientAuthorization(req) {
|
|
@@ -3421,8 +3556,8 @@ var platformAccountsApi = {
|
|
|
3421
3556
|
};
|
|
3422
3557
|
|
|
3423
3558
|
// src/apis/platform/dps/instance.ts
|
|
3424
|
-
var
|
|
3425
|
-
var platformDpsClientInstance =
|
|
3559
|
+
var import_axios14 = __toESM(require("axios"));
|
|
3560
|
+
var platformDpsClientInstance = import_axios14.default.create({
|
|
3426
3561
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
3427
3562
|
});
|
|
3428
3563
|
function getPlatformDpsClientAuthorization(req) {
|
|
@@ -4967,7 +5102,7 @@ var platformDpsApi = {
|
|
|
4967
5102
|
};
|
|
4968
5103
|
|
|
4969
5104
|
// src/apis/platform/adapter/instance.ts
|
|
4970
|
-
var
|
|
5105
|
+
var import_axios15 = __toESM(require("axios"));
|
|
4971
5106
|
var REGION2 = {
|
|
4972
5107
|
FRA: "fra",
|
|
4973
5108
|
DAL: "dal",
|
|
@@ -4993,11 +5128,10 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
4993
5128
|
netlify: req.headers["netlify-token"],
|
|
4994
5129
|
vercel: req.headers["vercel-token"],
|
|
4995
5130
|
planetscale: req.headers["planetscale-token"],
|
|
4996
|
-
sentry: req.headers["sentry-token"]
|
|
4997
|
-
openai: req.headers["openai-token"]
|
|
5131
|
+
sentry: req.headers["sentry-token"]
|
|
4998
5132
|
};
|
|
4999
5133
|
}
|
|
5000
|
-
var platformAdapterClientInstance =
|
|
5134
|
+
var platformAdapterClientInstance = import_axios15.default.create({
|
|
5001
5135
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
5002
5136
|
headers: {
|
|
5003
5137
|
"Content-Type": "application/json"
|
|
@@ -5007,7 +5141,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5007
5141
|
(r) => r,
|
|
5008
5142
|
(error) => {
|
|
5009
5143
|
var _a;
|
|
5010
|
-
if (
|
|
5144
|
+
if (import_axios15.default.isAxiosError(error)) {
|
|
5011
5145
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
5012
5146
|
const source = error.response.data.error.source;
|
|
5013
5147
|
if (source) {
|
|
@@ -5019,7 +5153,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5019
5153
|
}
|
|
5020
5154
|
);
|
|
5021
5155
|
function getPlatformAdapterClientConfig(options = {}) {
|
|
5022
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r
|
|
5156
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
5023
5157
|
const currentHeaders = platformAdapterClientInstance.defaults.headers;
|
|
5024
5158
|
const headers = {
|
|
5025
5159
|
platform: {
|
|
@@ -5033,36 +5167,32 @@ function getPlatformAdapterClientConfig(options = {}) {
|
|
|
5033
5167
|
netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
|
|
5034
5168
|
vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
|
|
5035
5169
|
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
|
|
5170
|
+
sentry: (_j = currentHeaders["sentry-token"]) != null ? _j : options.sentry
|
|
5038
5171
|
}
|
|
5039
5172
|
};
|
|
5040
5173
|
if (currentHeaders["platform-dps-token"]) {
|
|
5041
|
-
currentHeaders["X-Region"] = (
|
|
5174
|
+
currentHeaders["X-Region"] = (_k = getRegion2(currentHeaders["platform-dps-token"])) != null ? _k : void 0;
|
|
5042
5175
|
}
|
|
5043
|
-
if (((
|
|
5176
|
+
if (((_m = (_l = options.ensureAuthorizationToken) == null ? void 0 : _l.platform) == null ? void 0 : _m.dps) && !headers.platform.dps) {
|
|
5044
5177
|
throw new UnauthorizeApiError("dps");
|
|
5045
5178
|
}
|
|
5046
|
-
if (((
|
|
5179
|
+
if (((_n = options.ensureAuthorizationToken) == null ? void 0 : _n.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
|
|
5047
5180
|
throw new UnauthorizeApiError("github");
|
|
5048
5181
|
}
|
|
5049
|
-
if (((
|
|
5182
|
+
if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.vercel) && !headers.integrations.vercel) {
|
|
5050
5183
|
throw new UnauthorizeApiError("vercel");
|
|
5051
5184
|
}
|
|
5052
|
-
if (((
|
|
5185
|
+
if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.netlify) && !headers.integrations.netlify) {
|
|
5053
5186
|
throw new UnauthorizeApiError("netlify");
|
|
5054
5187
|
}
|
|
5055
|
-
if (((
|
|
5188
|
+
if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.planetscale) && !headers.integrations.planetscale) {
|
|
5056
5189
|
throw new UnauthorizeApiError("planetscale");
|
|
5057
5190
|
}
|
|
5058
|
-
if (((
|
|
5191
|
+
if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.sentry) && !headers.integrations.sentry) {
|
|
5059
5192
|
throw new UnauthorizeApiError("sentry");
|
|
5060
5193
|
}
|
|
5061
|
-
if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.openai) && !headers.integrations.openai) {
|
|
5062
|
-
throw new UnauthorizeApiError("openai");
|
|
5063
|
-
}
|
|
5064
5194
|
return {
|
|
5065
|
-
headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(
|
|
5195
|
+
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
5196
|
};
|
|
5067
5197
|
}
|
|
5068
5198
|
function initPlatformAdapterClientInstance(baseUrl, tokens) {
|
|
@@ -5103,9 +5233,6 @@ function updatePlatformAdapterClientInstance(tokens) {
|
|
|
5103
5233
|
if (tokens == null ? void 0 : tokens.sentry) {
|
|
5104
5234
|
headers["sentry-token"] = tokens.sentry;
|
|
5105
5235
|
}
|
|
5106
|
-
if (tokens == null ? void 0 : tokens.openai) {
|
|
5107
|
-
headers["openai-token"] = tokens.openai;
|
|
5108
|
-
}
|
|
5109
5236
|
}
|
|
5110
5237
|
|
|
5111
5238
|
// src/apis/platform/adapter/app/blocks/deployment/api.ts
|
|
@@ -5649,8 +5776,8 @@ var platformAdapterApi = {
|
|
|
5649
5776
|
};
|
|
5650
5777
|
|
|
5651
5778
|
// src/apis/platform/billing/instance.ts
|
|
5652
|
-
var
|
|
5653
|
-
var platformBillingClientInstance =
|
|
5779
|
+
var import_axios16 = __toESM(require("axios"));
|
|
5780
|
+
var platformBillingClientInstance = import_axios16.default.create({
|
|
5654
5781
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
5655
5782
|
});
|
|
5656
5783
|
function getPlatformBillingClientAuthorization(req) {
|
package/dist/index.mjs
CHANGED
|
@@ -2367,18 +2367,153 @@ 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 getNeonClientConfig(options = {}) {
|
|
2391
|
+
const currentHeaders = neonClientInstance.defaults.headers;
|
|
2392
|
+
const defaultAuthorization = currentHeaders.Authorization;
|
|
2393
|
+
const headers = {
|
|
2394
|
+
authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `${options.token}` : void 0
|
|
2395
|
+
};
|
|
2396
|
+
if (options.ensureAuthorizationToken && !headers.authorization) {
|
|
2397
|
+
throw new UnauthorizeApiError("neon");
|
|
2398
|
+
}
|
|
2399
|
+
return {
|
|
2400
|
+
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
2401
|
+
};
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
// src/apis/integrations/neon/project/branch/api.ts
|
|
2405
|
+
var neonProjectBranchApi = {
|
|
2406
|
+
getBranch(projectId, branchId, authorization) {
|
|
2407
|
+
return __async(this, null, function* () {
|
|
2408
|
+
const response = yield neonClientInstance.get(
|
|
2409
|
+
`projects/${projectId}/branches/${branchId}`,
|
|
2410
|
+
getNeonClientConfig(__spreadValues({}, authorization))
|
|
2411
|
+
);
|
|
2412
|
+
return response.data;
|
|
2413
|
+
});
|
|
2414
|
+
}
|
|
2415
|
+
};
|
|
2416
|
+
|
|
2417
|
+
// src/apis/integrations/neon/project/api.ts
|
|
2418
|
+
var neonProjectApi = {
|
|
2419
|
+
branch: neonProjectBranchApi,
|
|
2420
|
+
createProject(projectName, authorization) {
|
|
2421
|
+
return __async(this, null, function* () {
|
|
2422
|
+
const response = yield neonClientInstance.post(
|
|
2423
|
+
`/projects`,
|
|
2424
|
+
{
|
|
2425
|
+
project: {
|
|
2426
|
+
name: projectName
|
|
2427
|
+
}
|
|
2428
|
+
},
|
|
2429
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2430
|
+
ensureAuthorizationToken: true
|
|
2431
|
+
}))
|
|
2432
|
+
);
|
|
2433
|
+
return response.data;
|
|
2434
|
+
});
|
|
2435
|
+
},
|
|
2436
|
+
getProject(projectId, authorization) {
|
|
2437
|
+
return __async(this, null, function* () {
|
|
2438
|
+
const response = yield neonClientInstance.get(
|
|
2439
|
+
`/projects/${projectId}`,
|
|
2440
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2441
|
+
ensureAuthorizationToken: true
|
|
2442
|
+
}))
|
|
2443
|
+
);
|
|
2444
|
+
return response.data;
|
|
2445
|
+
});
|
|
2446
|
+
},
|
|
2447
|
+
deleteProject(projectId, authorization) {
|
|
2448
|
+
return __async(this, null, function* () {
|
|
2449
|
+
const response = yield neonClientInstance.delete(
|
|
2450
|
+
`/projects/${projectId}`,
|
|
2451
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2452
|
+
ensureAuthorizationToken: true
|
|
2453
|
+
}))
|
|
2454
|
+
);
|
|
2455
|
+
return response.data;
|
|
2456
|
+
});
|
|
2457
|
+
}
|
|
2458
|
+
};
|
|
2459
|
+
|
|
2460
|
+
// src/apis/integrations/neon/user/api.ts
|
|
2461
|
+
var neonUserApi = {
|
|
2462
|
+
getUser(authorization) {
|
|
2463
|
+
return __async(this, null, function* () {
|
|
2464
|
+
const response = yield neonClientInstance.get(
|
|
2465
|
+
`/users/me`,
|
|
2466
|
+
getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2467
|
+
ensureAuthorizationToken: true
|
|
2468
|
+
}))
|
|
2469
|
+
);
|
|
2470
|
+
return response.data;
|
|
2471
|
+
});
|
|
2472
|
+
}
|
|
2473
|
+
};
|
|
2474
|
+
|
|
2475
|
+
// src/apis/integrations/neon/api.ts
|
|
2476
|
+
var neonApi = {
|
|
2477
|
+
project: neonProjectApi,
|
|
2478
|
+
user: neonUserApi,
|
|
2479
|
+
getToken(code, clientId, clientSecret, redirectUri) {
|
|
2480
|
+
return __async(this, null, function* () {
|
|
2481
|
+
var _a;
|
|
2482
|
+
const data = new URLSearchParams({
|
|
2483
|
+
code,
|
|
2484
|
+
client_id: clientId,
|
|
2485
|
+
client_secret: clientSecret,
|
|
2486
|
+
redirect_uri: redirectUri,
|
|
2487
|
+
grant_type: "authorization_code"
|
|
2488
|
+
});
|
|
2489
|
+
const response = yield axios11.post(
|
|
2490
|
+
"https://oauth2.neon.tech/oauth2/token",
|
|
2491
|
+
data,
|
|
2492
|
+
{
|
|
2493
|
+
headers: {
|
|
2494
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
);
|
|
2498
|
+
const params = new URLSearchParams(response.data);
|
|
2499
|
+
return (_a = params.get("access_token")) != null ? _a : "";
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
};
|
|
2503
|
+
|
|
2370
2504
|
// src/apis/integrations/api.ts
|
|
2371
2505
|
var integrationsApi = {
|
|
2372
2506
|
github: gitHubApi,
|
|
2373
2507
|
netlify: netlifyApi,
|
|
2374
2508
|
vercel: vercelApi,
|
|
2509
|
+
neon: neonApi,
|
|
2375
2510
|
planetscale: planetscaleApi,
|
|
2376
2511
|
sentry: sentryApi,
|
|
2377
2512
|
text: textApi
|
|
2378
2513
|
};
|
|
2379
2514
|
|
|
2380
2515
|
// src/apis/products/livechat/instance.ts
|
|
2381
|
-
import
|
|
2516
|
+
import axios12 from "axios";
|
|
2382
2517
|
var REGION = {
|
|
2383
2518
|
FRA: "fra",
|
|
2384
2519
|
DAL: "dal",
|
|
@@ -2392,7 +2527,7 @@ var getRegion = (token) => {
|
|
|
2392
2527
|
return region;
|
|
2393
2528
|
}
|
|
2394
2529
|
};
|
|
2395
|
-
var livechatClientInstance =
|
|
2530
|
+
var livechatClientInstance = axios12.create({
|
|
2396
2531
|
baseURL: "https://api.labs.livechatinc.com"
|
|
2397
2532
|
});
|
|
2398
2533
|
function getLiveChatClientAuthorization(req) {
|
|
@@ -2875,8 +3010,8 @@ var productsApi = {
|
|
|
2875
3010
|
};
|
|
2876
3011
|
|
|
2877
3012
|
// src/apis/platform/accounts/instance.ts
|
|
2878
|
-
import
|
|
2879
|
-
var platformAccountsClientInstance =
|
|
3013
|
+
import axios13 from "axios";
|
|
3014
|
+
var platformAccountsClientInstance = axios13.create({
|
|
2880
3015
|
baseURL: "https://accounts.labs.livechatinc.com"
|
|
2881
3016
|
});
|
|
2882
3017
|
function getPlatformAccountsClientAuthorization(req) {
|
|
@@ -3330,8 +3465,8 @@ var platformAccountsApi = {
|
|
|
3330
3465
|
};
|
|
3331
3466
|
|
|
3332
3467
|
// src/apis/platform/dps/instance.ts
|
|
3333
|
-
import
|
|
3334
|
-
var platformDpsClientInstance =
|
|
3468
|
+
import axios14 from "axios";
|
|
3469
|
+
var platformDpsClientInstance = axios14.create({
|
|
3335
3470
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
3336
3471
|
});
|
|
3337
3472
|
function getPlatformDpsClientAuthorization(req) {
|
|
@@ -4876,7 +5011,7 @@ var platformDpsApi = {
|
|
|
4876
5011
|
};
|
|
4877
5012
|
|
|
4878
5013
|
// src/apis/platform/adapter/instance.ts
|
|
4879
|
-
import
|
|
5014
|
+
import axios15 from "axios";
|
|
4880
5015
|
var REGION2 = {
|
|
4881
5016
|
FRA: "fra",
|
|
4882
5017
|
DAL: "dal",
|
|
@@ -4902,11 +5037,10 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
4902
5037
|
netlify: req.headers["netlify-token"],
|
|
4903
5038
|
vercel: req.headers["vercel-token"],
|
|
4904
5039
|
planetscale: req.headers["planetscale-token"],
|
|
4905
|
-
sentry: req.headers["sentry-token"]
|
|
4906
|
-
openai: req.headers["openai-token"]
|
|
5040
|
+
sentry: req.headers["sentry-token"]
|
|
4907
5041
|
};
|
|
4908
5042
|
}
|
|
4909
|
-
var platformAdapterClientInstance =
|
|
5043
|
+
var platformAdapterClientInstance = axios15.create({
|
|
4910
5044
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
4911
5045
|
headers: {
|
|
4912
5046
|
"Content-Type": "application/json"
|
|
@@ -4916,7 +5050,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
4916
5050
|
(r) => r,
|
|
4917
5051
|
(error) => {
|
|
4918
5052
|
var _a;
|
|
4919
|
-
if (
|
|
5053
|
+
if (axios15.isAxiosError(error)) {
|
|
4920
5054
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
4921
5055
|
const source = error.response.data.error.source;
|
|
4922
5056
|
if (source) {
|
|
@@ -4928,7 +5062,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
4928
5062
|
}
|
|
4929
5063
|
);
|
|
4930
5064
|
function getPlatformAdapterClientConfig(options = {}) {
|
|
4931
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r
|
|
5065
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
4932
5066
|
const currentHeaders = platformAdapterClientInstance.defaults.headers;
|
|
4933
5067
|
const headers = {
|
|
4934
5068
|
platform: {
|
|
@@ -4942,36 +5076,32 @@ function getPlatformAdapterClientConfig(options = {}) {
|
|
|
4942
5076
|
netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
|
|
4943
5077
|
vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
|
|
4944
5078
|
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
|
|
5079
|
+
sentry: (_j = currentHeaders["sentry-token"]) != null ? _j : options.sentry
|
|
4947
5080
|
}
|
|
4948
5081
|
};
|
|
4949
5082
|
if (currentHeaders["platform-dps-token"]) {
|
|
4950
|
-
currentHeaders["X-Region"] = (
|
|
5083
|
+
currentHeaders["X-Region"] = (_k = getRegion2(currentHeaders["platform-dps-token"])) != null ? _k : void 0;
|
|
4951
5084
|
}
|
|
4952
|
-
if (((
|
|
5085
|
+
if (((_m = (_l = options.ensureAuthorizationToken) == null ? void 0 : _l.platform) == null ? void 0 : _m.dps) && !headers.platform.dps) {
|
|
4953
5086
|
throw new UnauthorizeApiError("dps");
|
|
4954
5087
|
}
|
|
4955
|
-
if (((
|
|
5088
|
+
if (((_n = options.ensureAuthorizationToken) == null ? void 0 : _n.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
|
|
4956
5089
|
throw new UnauthorizeApiError("github");
|
|
4957
5090
|
}
|
|
4958
|
-
if (((
|
|
5091
|
+
if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.vercel) && !headers.integrations.vercel) {
|
|
4959
5092
|
throw new UnauthorizeApiError("vercel");
|
|
4960
5093
|
}
|
|
4961
|
-
if (((
|
|
5094
|
+
if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.netlify) && !headers.integrations.netlify) {
|
|
4962
5095
|
throw new UnauthorizeApiError("netlify");
|
|
4963
5096
|
}
|
|
4964
|
-
if (((
|
|
5097
|
+
if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.planetscale) && !headers.integrations.planetscale) {
|
|
4965
5098
|
throw new UnauthorizeApiError("planetscale");
|
|
4966
5099
|
}
|
|
4967
|
-
if (((
|
|
5100
|
+
if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.sentry) && !headers.integrations.sentry) {
|
|
4968
5101
|
throw new UnauthorizeApiError("sentry");
|
|
4969
5102
|
}
|
|
4970
|
-
if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.openai) && !headers.integrations.openai) {
|
|
4971
|
-
throw new UnauthorizeApiError("openai");
|
|
4972
|
-
}
|
|
4973
5103
|
return {
|
|
4974
|
-
headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(
|
|
5104
|
+
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
5105
|
};
|
|
4976
5106
|
}
|
|
4977
5107
|
function initPlatformAdapterClientInstance(baseUrl, tokens) {
|
|
@@ -5012,9 +5142,6 @@ function updatePlatformAdapterClientInstance(tokens) {
|
|
|
5012
5142
|
if (tokens == null ? void 0 : tokens.sentry) {
|
|
5013
5143
|
headers["sentry-token"] = tokens.sentry;
|
|
5014
5144
|
}
|
|
5015
|
-
if (tokens == null ? void 0 : tokens.openai) {
|
|
5016
|
-
headers["openai-token"] = tokens.openai;
|
|
5017
|
-
}
|
|
5018
5145
|
}
|
|
5019
5146
|
|
|
5020
5147
|
// src/apis/platform/adapter/app/blocks/deployment/api.ts
|
|
@@ -5558,8 +5685,8 @@ var platformAdapterApi = {
|
|
|
5558
5685
|
};
|
|
5559
5686
|
|
|
5560
5687
|
// src/apis/platform/billing/instance.ts
|
|
5561
|
-
import
|
|
5562
|
-
var platformBillingClientInstance =
|
|
5688
|
+
import axios16 from "axios";
|
|
5689
|
+
var platformBillingClientInstance = axios16.create({
|
|
5563
5690
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
5564
5691
|
});
|
|
5565
5692
|
function getPlatformBillingClientAuthorization(req) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.42",
|
|
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,16 +11,15 @@
|
|
|
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",
|
|
19
18
|
"tsup": "^7.1.0",
|
|
20
19
|
"typescript": "^5.1.6",
|
|
21
|
-
"tsconfig": "0.0.1",
|
|
22
20
|
"config": "0.0.1",
|
|
23
|
-
"eslint-config-custom": "0.0.2"
|
|
21
|
+
"eslint-config-custom": "0.0.2",
|
|
22
|
+
"tsconfig": "0.0.1"
|
|
24
23
|
},
|
|
25
24
|
"scripts": {
|
|
26
25
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|