shoal-web-sdk 1.0.10 → 1.0.12
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/sdk/@tanstack/react-query.gen.d.ts +33 -1
- package/dist/sdk/@tanstack/react-query.gen.js +35 -1
- package/dist/sdk/sdk.gen.d.ts +9 -1
- package/dist/sdk/sdk.gen.js +34 -0
- package/dist/sdk/types.gen.d.ts +98 -1
- package/dist/sdk/zod.gen.d.ts +209 -0
- package/dist/sdk/zod.gen.js +48 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +12 -1
- package/dist/tanstack-codegen/generated/generated.js +41 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InfiniteData, type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CheckSubdomainUniquenessData, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateTemplateData, CreateTemplateError, CreateTemplateResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteTemplateData, DeleteTemplateError, DeleteTemplateResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetPublicInviteData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpaceStatsData, GetTemplateData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateTemplateData, UpdateTemplateError, UpdateTemplateResponse, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewTemplatesData } from '../types.gen';
|
|
3
|
+
import type { CheckSubdomainUniquenessData, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateTemplateData, CreateTemplateError, CreateTemplateResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteTemplateData, DeleteTemplateError, DeleteTemplateResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetPublicInviteData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetTemplateData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateTemplateData, UpdateTemplateError, UpdateTemplateResponse, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewTemplatesData } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -1324,3 +1324,35 @@ export declare const listBillingInvoicesOptions: (options: Options<ListBillingIn
|
|
|
1324
1324
|
[dataTagErrorSymbol]: Error;
|
|
1325
1325
|
};
|
|
1326
1326
|
};
|
|
1327
|
+
export declare const getSpacePropertiesQueryKey: (options: Options<GetSpacePropertiesData>) => [Pick<Options<GetSpacePropertiesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1328
|
+
_id: string;
|
|
1329
|
+
_infinite?: boolean;
|
|
1330
|
+
tags?: ReadonlyArray<string>;
|
|
1331
|
+
}];
|
|
1332
|
+
/**
|
|
1333
|
+
* List all space properties for the space from Kinde.
|
|
1334
|
+
*/
|
|
1335
|
+
export declare const getSpacePropertiesOptions: (options: Options<GetSpacePropertiesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").SpacePropertiesResponse, Error, import("../types.gen").SpacePropertiesResponse, [Pick<Options<GetSpacePropertiesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1336
|
+
_id: string;
|
|
1337
|
+
_infinite?: boolean;
|
|
1338
|
+
tags?: ReadonlyArray<string>;
|
|
1339
|
+
}]>, "queryFn"> & {
|
|
1340
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").SpacePropertiesResponse, [Pick<Options<GetSpacePropertiesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1341
|
+
_id: string;
|
|
1342
|
+
_infinite?: boolean;
|
|
1343
|
+
tags?: ReadonlyArray<string>;
|
|
1344
|
+
}], never> | undefined;
|
|
1345
|
+
} & {
|
|
1346
|
+
queryKey: [Pick<Options<GetSpacePropertiesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1347
|
+
_id: string;
|
|
1348
|
+
_infinite?: boolean;
|
|
1349
|
+
tags?: ReadonlyArray<string>;
|
|
1350
|
+
}] & {
|
|
1351
|
+
[dataTagSymbol]: import("../types.gen").SpacePropertiesResponse;
|
|
1352
|
+
[dataTagErrorSymbol]: Error;
|
|
1353
|
+
};
|
|
1354
|
+
};
|
|
1355
|
+
/**
|
|
1356
|
+
* Set a space property on the space in Kinde.
|
|
1357
|
+
*/
|
|
1358
|
+
export declare const setSpacePropertyMutation: (options?: Partial<Options<SetSpacePropertyData>>) => UseMutationOptions<unknown, SetSpacePropertyError, Options<SetSpacePropertyData>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { checkSubdomainUniqueness, createEnvironment, createEnvironmentVariable, createFeatureRequest, createProject, createSetupIntent, createSpace, createSpaceInvite, createTemplate, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deleteTemplate, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVersions, getGraphOverview, getProjectOverview, getPublicInvite, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceStats, getTemplate, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateTemplate, updateUsername, updateUserProfile, viewTemplates } from '../sdk.gen';
|
|
4
|
+
import { checkSubdomainUniqueness, createEnvironment, createEnvironmentVariable, createFeatureRequest, createProject, createSetupIntent, createSpace, createSpaceInvite, createTemplate, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deleteTemplate, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVersions, getGraphOverview, getProjectOverview, getPublicInvite, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getTemplate, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, setSpaceProperty, updateBillingPlan, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateTemplate, updateUsername, updateUserProfile, viewTemplates } from '../sdk.gen';
|
|
5
5
|
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
6
|
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
7
|
if (infinite) {
|
|
@@ -1445,3 +1445,37 @@ export const listBillingInvoicesOptions = (options) => {
|
|
|
1445
1445
|
queryKey: listBillingInvoicesQueryKey(options)
|
|
1446
1446
|
});
|
|
1447
1447
|
};
|
|
1448
|
+
export const getSpacePropertiesQueryKey = (options) => createQueryKey('getSpaceProperties', options);
|
|
1449
|
+
/**
|
|
1450
|
+
* List all space properties for the space from Kinde.
|
|
1451
|
+
*/
|
|
1452
|
+
export const getSpacePropertiesOptions = (options) => {
|
|
1453
|
+
return queryOptions({
|
|
1454
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1455
|
+
const { data } = await getSpaceProperties({
|
|
1456
|
+
...options,
|
|
1457
|
+
...queryKey[0],
|
|
1458
|
+
signal,
|
|
1459
|
+
throwOnError: true
|
|
1460
|
+
});
|
|
1461
|
+
return data;
|
|
1462
|
+
},
|
|
1463
|
+
queryKey: getSpacePropertiesQueryKey(options)
|
|
1464
|
+
});
|
|
1465
|
+
};
|
|
1466
|
+
/**
|
|
1467
|
+
* Set a space property on the space in Kinde.
|
|
1468
|
+
*/
|
|
1469
|
+
export const setSpacePropertyMutation = (options) => {
|
|
1470
|
+
const mutationOptions = {
|
|
1471
|
+
mutationFn: async (fnOptions) => {
|
|
1472
|
+
const { data } = await setSpaceProperty({
|
|
1473
|
+
...options,
|
|
1474
|
+
...fnOptions,
|
|
1475
|
+
throwOnError: true
|
|
1476
|
+
});
|
|
1477
|
+
return data;
|
|
1478
|
+
}
|
|
1479
|
+
};
|
|
1480
|
+
return mutationOptions;
|
|
1481
|
+
};
|
package/dist/sdk/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateTemplateData, CreateTemplateErrors, CreateTemplateResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteTemplateData, DeleteTemplateErrors, DeleteTemplateResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetTemplateData, GetTemplateErrors, GetTemplateResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, GetVersionData, GetVersionErrors, GetVersionM2mData, GetVersionM2mErrors, GetVersionM2mResponses, GetVersionResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mErrors, UpdateDeploymentStatusM2mResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, UpdateTemplateData, UpdateTemplateErrors, UpdateTemplateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, ViewTemplatesData, ViewTemplatesErrors, ViewTemplatesResponses } from './types.gen';
|
|
2
|
+
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateTemplateData, CreateTemplateErrors, CreateTemplateResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeleteTemplateData, DeleteTemplateErrors, DeleteTemplateResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpacePropertiesData, GetSpacePropertiesErrors, GetSpacePropertiesResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetTemplateData, GetTemplateErrors, GetTemplateResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, GetVersionData, GetVersionErrors, GetVersionM2mData, GetVersionM2mErrors, GetVersionM2mResponses, GetVersionResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, SetSpacePropertyData, SetSpacePropertyErrors, SetSpacePropertyResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mErrors, UpdateDeploymentStatusM2mResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, UpdateTemplateData, UpdateTemplateErrors, UpdateTemplateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, ViewTemplatesData, ViewTemplatesErrors, ViewTemplatesResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -276,3 +276,11 @@ export declare const fetchBillingPrices: <ThrowOnError extends boolean = false>(
|
|
|
276
276
|
* List past invoices for the space, newest first.
|
|
277
277
|
*/
|
|
278
278
|
export declare const listBillingInvoices: <ThrowOnError extends boolean = false>(options: Options<ListBillingInvoicesData, ThrowOnError>) => import("./client").RequestResult<ListBillingInvoicesResponses, ListBillingInvoicesErrors, ThrowOnError, "fields">;
|
|
279
|
+
/**
|
|
280
|
+
* List all space properties for the space from Kinde.
|
|
281
|
+
*/
|
|
282
|
+
export declare const getSpaceProperties: <ThrowOnError extends boolean = false>(options: Options<GetSpacePropertiesData, ThrowOnError>) => import("./client").RequestResult<GetSpacePropertiesResponses, GetSpacePropertiesErrors, ThrowOnError, "fields">;
|
|
283
|
+
/**
|
|
284
|
+
* Set a space property on the space in Kinde.
|
|
285
|
+
*/
|
|
286
|
+
export declare const setSpaceProperty: <ThrowOnError extends boolean = false>(options: Options<SetSpacePropertyData, ThrowOnError>) => import("./client").RequestResult<SetSpacePropertyResponses, SetSpacePropertyErrors, ThrowOnError, "fields">;
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -1087,3 +1087,37 @@ export const listBillingInvoices = (options) => {
|
|
|
1087
1087
|
...options
|
|
1088
1088
|
});
|
|
1089
1089
|
};
|
|
1090
|
+
/**
|
|
1091
|
+
* List all space properties for the space from Kinde.
|
|
1092
|
+
*/
|
|
1093
|
+
export const getSpaceProperties = (options) => {
|
|
1094
|
+
return (options.client ?? client).get({
|
|
1095
|
+
security: [
|
|
1096
|
+
{
|
|
1097
|
+
scheme: 'bearer',
|
|
1098
|
+
type: 'http'
|
|
1099
|
+
}
|
|
1100
|
+
],
|
|
1101
|
+
url: '/auth/{spaceHandle}/properties',
|
|
1102
|
+
...options
|
|
1103
|
+
});
|
|
1104
|
+
};
|
|
1105
|
+
/**
|
|
1106
|
+
* Set a space property on the space in Kinde.
|
|
1107
|
+
*/
|
|
1108
|
+
export const setSpaceProperty = (options) => {
|
|
1109
|
+
return (options.client ?? client).put({
|
|
1110
|
+
security: [
|
|
1111
|
+
{
|
|
1112
|
+
scheme: 'bearer',
|
|
1113
|
+
type: 'http'
|
|
1114
|
+
}
|
|
1115
|
+
],
|
|
1116
|
+
url: '/auth/{spaceHandle}/properties',
|
|
1117
|
+
...options,
|
|
1118
|
+
headers: {
|
|
1119
|
+
'Content-Type': 'application/json',
|
|
1120
|
+
...options.headers
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
};
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -384,6 +384,8 @@ export type Node = {
|
|
|
384
384
|
} & DatabaseNodeProps) | ({
|
|
385
385
|
typ: 'function';
|
|
386
386
|
} & FunctionNodeProps) | ({
|
|
387
|
+
typ: 'neondb';
|
|
388
|
+
} & NeonDbNodeProps) | ({
|
|
387
389
|
typ: 'queue';
|
|
388
390
|
} & QueueNodeProps) | ({
|
|
389
391
|
typ: 'proxy';
|
|
@@ -394,7 +396,7 @@ export type Node = {
|
|
|
394
396
|
} & SchedulerNodeProps);
|
|
395
397
|
};
|
|
396
398
|
export type EdgeType = 'network' | 'route';
|
|
397
|
-
export type NodeType = 'cache' | 'comment' | 'container' | 'cronjob' | 'database' | 'function' | 'queue' | 'proxy' | 'vm' | 'scheduler';
|
|
399
|
+
export type NodeType = 'cache' | 'comment' | 'container' | 'cronjob' | 'database' | 'function' | 'neondb' | 'queue' | 'proxy' | 'vm' | 'scheduler';
|
|
398
400
|
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
399
401
|
export type CommentNodeProps = {
|
|
400
402
|
comment?: string;
|
|
@@ -443,6 +445,21 @@ export type CronJobNodeProps = {
|
|
|
443
445
|
export type DatabaseNodeProps = {
|
|
444
446
|
space?: number;
|
|
445
447
|
};
|
|
448
|
+
export type NeonDbNodeProps = {
|
|
449
|
+
orgId: string;
|
|
450
|
+
orgName: string;
|
|
451
|
+
projectId?: string;
|
|
452
|
+
projectName?: string;
|
|
453
|
+
branchId?: string;
|
|
454
|
+
branchName?: string;
|
|
455
|
+
dbName: string;
|
|
456
|
+
roleName: string;
|
|
457
|
+
regionId: string;
|
|
458
|
+
pgVersion: number;
|
|
459
|
+
autoscalingLimitMinCu?: number;
|
|
460
|
+
autoscalingLimitMaxCu?: number;
|
|
461
|
+
suspendTimeoutSeconds: number;
|
|
462
|
+
};
|
|
446
463
|
export type FunctionNodeProps = {
|
|
447
464
|
region: Region;
|
|
448
465
|
language: string;
|
|
@@ -601,6 +618,17 @@ export type DeploymentStatusInformation = {
|
|
|
601
618
|
status?: DeploymentStatus;
|
|
602
619
|
message?: string;
|
|
603
620
|
};
|
|
621
|
+
export type SetSpacePropertyRequest = {
|
|
622
|
+
key: string;
|
|
623
|
+
value: string;
|
|
624
|
+
};
|
|
625
|
+
export type SpaceProperty = {
|
|
626
|
+
key: string;
|
|
627
|
+
value: string;
|
|
628
|
+
};
|
|
629
|
+
export type SpacePropertiesResponse = {
|
|
630
|
+
properties: Array<SpaceProperty>;
|
|
631
|
+
};
|
|
604
632
|
/**
|
|
605
633
|
* Clients known etag of the version.
|
|
606
634
|
*/
|
|
@@ -3495,3 +3523,72 @@ export type ListBillingInvoicesResponses = {
|
|
|
3495
3523
|
200: InvoicesResponse;
|
|
3496
3524
|
};
|
|
3497
3525
|
export type ListBillingInvoicesResponse = ListBillingInvoicesResponses[keyof ListBillingInvoicesResponses];
|
|
3526
|
+
export type GetSpacePropertiesData = {
|
|
3527
|
+
body?: never;
|
|
3528
|
+
path: {
|
|
3529
|
+
/**
|
|
3530
|
+
* The space handle. This must be globally unique.
|
|
3531
|
+
*/
|
|
3532
|
+
spaceHandle: string;
|
|
3533
|
+
};
|
|
3534
|
+
query?: never;
|
|
3535
|
+
url: '/auth/{spaceHandle}/properties';
|
|
3536
|
+
};
|
|
3537
|
+
export type GetSpacePropertiesErrors = {
|
|
3538
|
+
/**
|
|
3539
|
+
* Unauthorised user.
|
|
3540
|
+
*/
|
|
3541
|
+
401: ErrorResponse;
|
|
3542
|
+
/**
|
|
3543
|
+
* Invalid credentials.
|
|
3544
|
+
*/
|
|
3545
|
+
403: ErrorResponse;
|
|
3546
|
+
/**
|
|
3547
|
+
* Unexpected error.
|
|
3548
|
+
*/
|
|
3549
|
+
500: ErrorResponse;
|
|
3550
|
+
};
|
|
3551
|
+
export type GetSpacePropertiesError = GetSpacePropertiesErrors[keyof GetSpacePropertiesErrors];
|
|
3552
|
+
export type GetSpacePropertiesResponses = {
|
|
3553
|
+
/**
|
|
3554
|
+
* The space properties.
|
|
3555
|
+
*/
|
|
3556
|
+
200: SpacePropertiesResponse;
|
|
3557
|
+
};
|
|
3558
|
+
export type GetSpacePropertiesResponse = GetSpacePropertiesResponses[keyof GetSpacePropertiesResponses];
|
|
3559
|
+
export type SetSpacePropertyData = {
|
|
3560
|
+
body: SetSpacePropertyRequest;
|
|
3561
|
+
path: {
|
|
3562
|
+
/**
|
|
3563
|
+
* The space handle. This must be globally unique.
|
|
3564
|
+
*/
|
|
3565
|
+
spaceHandle: string;
|
|
3566
|
+
};
|
|
3567
|
+
query?: never;
|
|
3568
|
+
url: '/auth/{spaceHandle}/properties';
|
|
3569
|
+
};
|
|
3570
|
+
export type SetSpacePropertyErrors = {
|
|
3571
|
+
/**
|
|
3572
|
+
* Invalid request body.
|
|
3573
|
+
*/
|
|
3574
|
+
400: ErrorResponse;
|
|
3575
|
+
/**
|
|
3576
|
+
* Unauthorised user.
|
|
3577
|
+
*/
|
|
3578
|
+
401: ErrorResponse;
|
|
3579
|
+
/**
|
|
3580
|
+
* Invalid credentials.
|
|
3581
|
+
*/
|
|
3582
|
+
403: ErrorResponse;
|
|
3583
|
+
/**
|
|
3584
|
+
* Unexpected error.
|
|
3585
|
+
*/
|
|
3586
|
+
500: ErrorResponse;
|
|
3587
|
+
};
|
|
3588
|
+
export type SetSpacePropertyError = SetSpacePropertyErrors[keyof SetSpacePropertyErrors];
|
|
3589
|
+
export type SetSpacePropertyResponses = {
|
|
3590
|
+
/**
|
|
3591
|
+
* Property set successfully.
|
|
3592
|
+
*/
|
|
3593
|
+
202: unknown;
|
|
3594
|
+
};
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -518,6 +518,7 @@ export declare const zNodeType: z.ZodEnum<{
|
|
|
518
518
|
container: "container";
|
|
519
519
|
cronjob: "cronjob";
|
|
520
520
|
database: "database";
|
|
521
|
+
neondb: "neondb";
|
|
521
522
|
queue: "queue";
|
|
522
523
|
proxy: "proxy";
|
|
523
524
|
vm: "vm";
|
|
@@ -609,6 +610,21 @@ export declare const zCronJobNodeProps: z.ZodObject<{
|
|
|
609
610
|
export declare const zDatabaseNodeProps: z.ZodObject<{
|
|
610
611
|
space: z.ZodOptional<z.ZodInt>;
|
|
611
612
|
}, z.core.$strip>;
|
|
613
|
+
export declare const zNeonDbNodeProps: z.ZodObject<{
|
|
614
|
+
orgId: z.ZodString;
|
|
615
|
+
orgName: z.ZodString;
|
|
616
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
617
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
618
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
619
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
620
|
+
dbName: z.ZodString;
|
|
621
|
+
roleName: z.ZodString;
|
|
622
|
+
regionId: z.ZodString;
|
|
623
|
+
pgVersion: z.ZodInt;
|
|
624
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
625
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
626
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
627
|
+
}, z.core.$strip>;
|
|
612
628
|
export declare const zFunctionNodeProps: z.ZodObject<{
|
|
613
629
|
region: z.ZodEnum<{
|
|
614
630
|
"europe-west2": "europe-west2";
|
|
@@ -676,6 +692,7 @@ export declare const zNode: z.ZodObject<{
|
|
|
676
692
|
container: "container";
|
|
677
693
|
cronjob: "cronjob";
|
|
678
694
|
database: "database";
|
|
695
|
+
neondb: "neondb";
|
|
679
696
|
queue: "queue";
|
|
680
697
|
proxy: "proxy";
|
|
681
698
|
vm: "vm";
|
|
@@ -756,6 +773,22 @@ export declare const zNode: z.ZodObject<{
|
|
|
756
773
|
uri: z.ZodOptional<z.ZodString>;
|
|
757
774
|
installationId: z.ZodOptional<z.ZodString>;
|
|
758
775
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
776
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
777
|
+
typ: z.ZodLiteral<"neondb">;
|
|
778
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
779
|
+
orgId: z.ZodString;
|
|
780
|
+
orgName: z.ZodString;
|
|
781
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
782
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
783
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
784
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
785
|
+
dbName: z.ZodString;
|
|
786
|
+
roleName: z.ZodString;
|
|
787
|
+
regionId: z.ZodString;
|
|
788
|
+
pgVersion: z.ZodInt;
|
|
789
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
790
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
791
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
759
792
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
760
793
|
typ: z.ZodLiteral<"queue">;
|
|
761
794
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -821,6 +854,7 @@ export declare const zNodes: z.ZodObject<{
|
|
|
821
854
|
container: "container";
|
|
822
855
|
cronjob: "cronjob";
|
|
823
856
|
database: "database";
|
|
857
|
+
neondb: "neondb";
|
|
824
858
|
queue: "queue";
|
|
825
859
|
proxy: "proxy";
|
|
826
860
|
vm: "vm";
|
|
@@ -901,6 +935,22 @@ export declare const zNodes: z.ZodObject<{
|
|
|
901
935
|
uri: z.ZodOptional<z.ZodString>;
|
|
902
936
|
installationId: z.ZodOptional<z.ZodString>;
|
|
903
937
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
938
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
939
|
+
typ: z.ZodLiteral<"neondb">;
|
|
940
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
941
|
+
orgId: z.ZodString;
|
|
942
|
+
orgName: z.ZodString;
|
|
943
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
944
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
945
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
946
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
947
|
+
dbName: z.ZodString;
|
|
948
|
+
roleName: z.ZodString;
|
|
949
|
+
regionId: z.ZodString;
|
|
950
|
+
pgVersion: z.ZodInt;
|
|
951
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
952
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
953
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
904
954
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
905
955
|
typ: z.ZodLiteral<"queue">;
|
|
906
956
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -969,6 +1019,7 @@ export declare const zGraph: z.ZodObject<{
|
|
|
969
1019
|
container: "container";
|
|
970
1020
|
cronjob: "cronjob";
|
|
971
1021
|
database: "database";
|
|
1022
|
+
neondb: "neondb";
|
|
972
1023
|
queue: "queue";
|
|
973
1024
|
proxy: "proxy";
|
|
974
1025
|
vm: "vm";
|
|
@@ -1049,6 +1100,22 @@ export declare const zGraph: z.ZodObject<{
|
|
|
1049
1100
|
uri: z.ZodOptional<z.ZodString>;
|
|
1050
1101
|
installationId: z.ZodOptional<z.ZodString>;
|
|
1051
1102
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1103
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1104
|
+
typ: z.ZodLiteral<"neondb">;
|
|
1105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1106
|
+
orgId: z.ZodString;
|
|
1107
|
+
orgName: z.ZodString;
|
|
1108
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1109
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
1110
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
1112
|
+
dbName: z.ZodString;
|
|
1113
|
+
roleName: z.ZodString;
|
|
1114
|
+
regionId: z.ZodString;
|
|
1115
|
+
pgVersion: z.ZodInt;
|
|
1116
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
1117
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
1118
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
1052
1119
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1053
1120
|
typ: z.ZodLiteral<"queue">;
|
|
1054
1121
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1255,6 +1322,20 @@ export declare const zDeploymentStatusInformation: z.ZodObject<{
|
|
|
1255
1322
|
}>>;
|
|
1256
1323
|
message: z.ZodOptional<z.ZodString>;
|
|
1257
1324
|
}, z.core.$strip>;
|
|
1325
|
+
export declare const zSetSpacePropertyRequest: z.ZodObject<{
|
|
1326
|
+
key: z.ZodString;
|
|
1327
|
+
value: z.ZodString;
|
|
1328
|
+
}, z.core.$strip>;
|
|
1329
|
+
export declare const zSpaceProperty: z.ZodObject<{
|
|
1330
|
+
key: z.ZodString;
|
|
1331
|
+
value: z.ZodString;
|
|
1332
|
+
}, z.core.$strip>;
|
|
1333
|
+
export declare const zSpacePropertiesResponse: z.ZodObject<{
|
|
1334
|
+
properties: z.ZodArray<z.ZodObject<{
|
|
1335
|
+
key: z.ZodString;
|
|
1336
|
+
value: z.ZodString;
|
|
1337
|
+
}, z.core.$strip>>;
|
|
1338
|
+
}, z.core.$strip>;
|
|
1258
1339
|
/**
|
|
1259
1340
|
* Clients known etag of the version.
|
|
1260
1341
|
*/
|
|
@@ -1520,6 +1601,7 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
1520
1601
|
container: "container";
|
|
1521
1602
|
cronjob: "cronjob";
|
|
1522
1603
|
database: "database";
|
|
1604
|
+
neondb: "neondb";
|
|
1523
1605
|
queue: "queue";
|
|
1524
1606
|
proxy: "proxy";
|
|
1525
1607
|
vm: "vm";
|
|
@@ -1600,6 +1682,22 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
1600
1682
|
uri: z.ZodOptional<z.ZodString>;
|
|
1601
1683
|
installationId: z.ZodOptional<z.ZodString>;
|
|
1602
1684
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1685
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1686
|
+
typ: z.ZodLiteral<"neondb">;
|
|
1687
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1688
|
+
orgId: z.ZodString;
|
|
1689
|
+
orgName: z.ZodString;
|
|
1690
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1691
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
1692
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
1693
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
1694
|
+
dbName: z.ZodString;
|
|
1695
|
+
roleName: z.ZodString;
|
|
1696
|
+
regionId: z.ZodString;
|
|
1697
|
+
pgVersion: z.ZodInt;
|
|
1698
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
1699
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
1700
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
1603
1701
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1604
1702
|
typ: z.ZodLiteral<"queue">;
|
|
1605
1703
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1667,6 +1765,7 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
1667
1765
|
container: "container";
|
|
1668
1766
|
cronjob: "cronjob";
|
|
1669
1767
|
database: "database";
|
|
1768
|
+
neondb: "neondb";
|
|
1670
1769
|
queue: "queue";
|
|
1671
1770
|
proxy: "proxy";
|
|
1672
1771
|
vm: "vm";
|
|
@@ -1747,6 +1846,22 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
1747
1846
|
uri: z.ZodOptional<z.ZodString>;
|
|
1748
1847
|
installationId: z.ZodOptional<z.ZodString>;
|
|
1749
1848
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1849
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1850
|
+
typ: z.ZodLiteral<"neondb">;
|
|
1851
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1852
|
+
orgId: z.ZodString;
|
|
1853
|
+
orgName: z.ZodString;
|
|
1854
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1855
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
1856
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
1857
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
1858
|
+
dbName: z.ZodString;
|
|
1859
|
+
roleName: z.ZodString;
|
|
1860
|
+
regionId: z.ZodString;
|
|
1861
|
+
pgVersion: z.ZodInt;
|
|
1862
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
1863
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
1864
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
1750
1865
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1751
1866
|
typ: z.ZodLiteral<"queue">;
|
|
1752
1867
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1831,6 +1946,7 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
|
1831
1946
|
container: "container";
|
|
1832
1947
|
cronjob: "cronjob";
|
|
1833
1948
|
database: "database";
|
|
1949
|
+
neondb: "neondb";
|
|
1834
1950
|
queue: "queue";
|
|
1835
1951
|
proxy: "proxy";
|
|
1836
1952
|
vm: "vm";
|
|
@@ -1911,6 +2027,22 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
|
1911
2027
|
uri: z.ZodOptional<z.ZodString>;
|
|
1912
2028
|
installationId: z.ZodOptional<z.ZodString>;
|
|
1913
2029
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2030
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2031
|
+
typ: z.ZodLiteral<"neondb">;
|
|
2032
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2033
|
+
orgId: z.ZodString;
|
|
2034
|
+
orgName: z.ZodString;
|
|
2035
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
2036
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
2037
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
2038
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
2039
|
+
dbName: z.ZodString;
|
|
2040
|
+
roleName: z.ZodString;
|
|
2041
|
+
regionId: z.ZodString;
|
|
2042
|
+
pgVersion: z.ZodInt;
|
|
2043
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
2044
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
2045
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
1914
2046
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1915
2047
|
typ: z.ZodLiteral<"queue">;
|
|
1916
2048
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1976,6 +2108,7 @@ export declare const zUpdateNodeM2mData: z.ZodObject<{
|
|
|
1976
2108
|
container: "container";
|
|
1977
2109
|
cronjob: "cronjob";
|
|
1978
2110
|
database: "database";
|
|
2111
|
+
neondb: "neondb";
|
|
1979
2112
|
queue: "queue";
|
|
1980
2113
|
proxy: "proxy";
|
|
1981
2114
|
vm: "vm";
|
|
@@ -2056,6 +2189,22 @@ export declare const zUpdateNodeM2mData: z.ZodObject<{
|
|
|
2056
2189
|
uri: z.ZodOptional<z.ZodString>;
|
|
2057
2190
|
installationId: z.ZodOptional<z.ZodString>;
|
|
2058
2191
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2192
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2193
|
+
typ: z.ZodLiteral<"neondb">;
|
|
2194
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2195
|
+
orgId: z.ZodString;
|
|
2196
|
+
orgName: z.ZodString;
|
|
2197
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
2198
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
2199
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
2200
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
2201
|
+
dbName: z.ZodString;
|
|
2202
|
+
roleName: z.ZodString;
|
|
2203
|
+
regionId: z.ZodString;
|
|
2204
|
+
pgVersion: z.ZodInt;
|
|
2205
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
2206
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
2207
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
2059
2208
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2060
2209
|
typ: z.ZodLiteral<"queue">;
|
|
2061
2210
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3051,6 +3200,7 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
3051
3200
|
container: "container";
|
|
3052
3201
|
cronjob: "cronjob";
|
|
3053
3202
|
database: "database";
|
|
3203
|
+
neondb: "neondb";
|
|
3054
3204
|
queue: "queue";
|
|
3055
3205
|
proxy: "proxy";
|
|
3056
3206
|
vm: "vm";
|
|
@@ -3131,6 +3281,22 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
3131
3281
|
uri: z.ZodOptional<z.ZodString>;
|
|
3132
3282
|
installationId: z.ZodOptional<z.ZodString>;
|
|
3133
3283
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3284
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3285
|
+
typ: z.ZodLiteral<"neondb">;
|
|
3286
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3287
|
+
orgId: z.ZodString;
|
|
3288
|
+
orgName: z.ZodString;
|
|
3289
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
3290
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
3291
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
3292
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
3293
|
+
dbName: z.ZodString;
|
|
3294
|
+
roleName: z.ZodString;
|
|
3295
|
+
regionId: z.ZodString;
|
|
3296
|
+
pgVersion: z.ZodInt;
|
|
3297
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
3298
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
3299
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
3134
3300
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3135
3301
|
typ: z.ZodLiteral<"queue">;
|
|
3136
3302
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3198,6 +3364,7 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
3198
3364
|
container: "container";
|
|
3199
3365
|
cronjob: "cronjob";
|
|
3200
3366
|
database: "database";
|
|
3367
|
+
neondb: "neondb";
|
|
3201
3368
|
queue: "queue";
|
|
3202
3369
|
proxy: "proxy";
|
|
3203
3370
|
vm: "vm";
|
|
@@ -3278,6 +3445,22 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
3278
3445
|
uri: z.ZodOptional<z.ZodString>;
|
|
3279
3446
|
installationId: z.ZodOptional<z.ZodString>;
|
|
3280
3447
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3448
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3449
|
+
typ: z.ZodLiteral<"neondb">;
|
|
3450
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3451
|
+
orgId: z.ZodString;
|
|
3452
|
+
orgName: z.ZodString;
|
|
3453
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
3454
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
3455
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
3456
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
3457
|
+
dbName: z.ZodString;
|
|
3458
|
+
roleName: z.ZodString;
|
|
3459
|
+
regionId: z.ZodString;
|
|
3460
|
+
pgVersion: z.ZodInt;
|
|
3461
|
+
autoscalingLimitMinCu: z.ZodOptional<z.ZodNumber>;
|
|
3462
|
+
autoscalingLimitMaxCu: z.ZodOptional<z.ZodNumber>;
|
|
3463
|
+
suspendTimeoutSeconds: z.ZodInt;
|
|
3281
3464
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3282
3465
|
typ: z.ZodLiteral<"queue">;
|
|
3283
3466
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3544,3 +3727,29 @@ export declare const zListBillingInvoicesResponse: z.ZodObject<{
|
|
|
3544
3727
|
}, z.core.$strip>>;
|
|
3545
3728
|
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
3546
3729
|
}, z.core.$strip>;
|
|
3730
|
+
export declare const zGetSpacePropertiesData: z.ZodObject<{
|
|
3731
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
3732
|
+
path: z.ZodObject<{
|
|
3733
|
+
spaceHandle: z.ZodString;
|
|
3734
|
+
}, z.core.$strip>;
|
|
3735
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
3736
|
+
}, z.core.$strip>;
|
|
3737
|
+
/**
|
|
3738
|
+
* The space properties.
|
|
3739
|
+
*/
|
|
3740
|
+
export declare const zGetSpacePropertiesResponse: z.ZodObject<{
|
|
3741
|
+
properties: z.ZodArray<z.ZodObject<{
|
|
3742
|
+
key: z.ZodString;
|
|
3743
|
+
value: z.ZodString;
|
|
3744
|
+
}, z.core.$strip>>;
|
|
3745
|
+
}, z.core.$strip>;
|
|
3746
|
+
export declare const zSetSpacePropertyData: z.ZodObject<{
|
|
3747
|
+
body: z.ZodObject<{
|
|
3748
|
+
key: z.ZodString;
|
|
3749
|
+
value: z.ZodString;
|
|
3750
|
+
}, z.core.$strip>;
|
|
3751
|
+
path: z.ZodObject<{
|
|
3752
|
+
spaceHandle: z.ZodString;
|
|
3753
|
+
}, z.core.$strip>;
|
|
3754
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
3755
|
+
}, z.core.$strip>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -342,6 +342,7 @@ export const zNodeType = z.enum([
|
|
|
342
342
|
'cronjob',
|
|
343
343
|
'database',
|
|
344
344
|
'function',
|
|
345
|
+
'neondb',
|
|
345
346
|
'queue',
|
|
346
347
|
'proxy',
|
|
347
348
|
'vm',
|
|
@@ -412,6 +413,21 @@ export const zCronJobNodeProps = z.object({
|
|
|
412
413
|
export const zDatabaseNodeProps = z.object({
|
|
413
414
|
space: z.optional(z.int())
|
|
414
415
|
});
|
|
416
|
+
export const zNeonDbNodeProps = z.object({
|
|
417
|
+
orgId: z.string(),
|
|
418
|
+
orgName: z.string(),
|
|
419
|
+
projectId: z.optional(z.string()),
|
|
420
|
+
projectName: z.optional(z.string()),
|
|
421
|
+
branchId: z.optional(z.string()),
|
|
422
|
+
branchName: z.optional(z.string()),
|
|
423
|
+
dbName: z.string(),
|
|
424
|
+
roleName: z.string(),
|
|
425
|
+
regionId: z.string(),
|
|
426
|
+
pgVersion: z.int().gte(14).lte(18),
|
|
427
|
+
autoscalingLimitMinCu: z.optional(z.number().gte(0.25)),
|
|
428
|
+
autoscalingLimitMaxCu: z.optional(z.number().gte(0.25)),
|
|
429
|
+
suspendTimeoutSeconds: z.int().gte(-1).lte(604800)
|
|
430
|
+
});
|
|
415
431
|
export const zFunctionNodeProps = z.object({
|
|
416
432
|
region: zRegion,
|
|
417
433
|
language: z.string(),
|
|
@@ -466,6 +482,9 @@ export const zNode = z.object({
|
|
|
466
482
|
z.object({
|
|
467
483
|
typ: z.literal('function')
|
|
468
484
|
}).and(zFunctionNodeProps),
|
|
485
|
+
z.object({
|
|
486
|
+
typ: z.literal('neondb')
|
|
487
|
+
}).and(zNeonDbNodeProps),
|
|
469
488
|
z.object({
|
|
470
489
|
typ: z.literal('queue')
|
|
471
490
|
}).and(zQueueNodeProps),
|
|
@@ -581,6 +600,17 @@ export const zDeploymentStatusInformation = z.object({
|
|
|
581
600
|
status: z.optional(zDeploymentStatus),
|
|
582
601
|
message: z.optional(z.string())
|
|
583
602
|
});
|
|
603
|
+
export const zSetSpacePropertyRequest = z.object({
|
|
604
|
+
key: z.string(),
|
|
605
|
+
value: z.string()
|
|
606
|
+
});
|
|
607
|
+
export const zSpaceProperty = z.object({
|
|
608
|
+
key: z.string(),
|
|
609
|
+
value: z.string()
|
|
610
|
+
});
|
|
611
|
+
export const zSpacePropertiesResponse = z.object({
|
|
612
|
+
properties: z.array(zSpaceProperty)
|
|
613
|
+
});
|
|
584
614
|
/**
|
|
585
615
|
* Clients known etag of the version.
|
|
586
616
|
*/
|
|
@@ -1471,3 +1501,21 @@ export const zListBillingInvoicesData = z.object({
|
|
|
1471
1501
|
* A page of invoices.
|
|
1472
1502
|
*/
|
|
1473
1503
|
export const zListBillingInvoicesResponse = zInvoicesResponse;
|
|
1504
|
+
export const zGetSpacePropertiesData = z.object({
|
|
1505
|
+
body: z.optional(z.never()),
|
|
1506
|
+
path: z.object({
|
|
1507
|
+
spaceHandle: z.string()
|
|
1508
|
+
}),
|
|
1509
|
+
query: z.optional(z.never())
|
|
1510
|
+
});
|
|
1511
|
+
/**
|
|
1512
|
+
* The space properties.
|
|
1513
|
+
*/
|
|
1514
|
+
export const zGetSpacePropertiesResponse = zSpacePropertiesResponse;
|
|
1515
|
+
export const zSetSpacePropertyData = z.object({
|
|
1516
|
+
body: zSetSpacePropertyRequest,
|
|
1517
|
+
path: z.object({
|
|
1518
|
+
spaceHandle: z.string()
|
|
1519
|
+
}),
|
|
1520
|
+
query: z.optional(z.never())
|
|
1521
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, GetTemplateData, UpdateTemplateData, UpdateTemplateResponses, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteTemplateData, DeleteTemplateResponses, CreateTemplateData, CreateTemplateResponses, GetVersionData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData } from "../../sdk/types.gen";
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, GetTemplateData, UpdateTemplateData, UpdateTemplateResponses, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, DeleteTemplateData, DeleteTemplateResponses, CreateTemplateData, CreateTemplateResponses, GetVersionData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData, GetSpacePropertiesData, SetSpacePropertyData, SetSpacePropertyResponses } from "../../sdk/types.gen";
|
|
4
4
|
export declare const useGetServiceHealth: (options?: Omit<GetServiceHealthData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").HealthResponse | undefined, Error>;
|
|
@@ -356,3 +356,14 @@ export declare const useFetchBillingPrices: (options: Omit<FetchBillingPricesDat
|
|
|
356
356
|
export declare const useListBillingInvoices: (options: Omit<ListBillingInvoicesData, "url"> & {
|
|
357
357
|
enabled?: boolean;
|
|
358
358
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").InvoicesResponse | undefined, Error>;
|
|
359
|
+
export declare const useGetSpaceProperties: (options: Omit<GetSpacePropertiesData, "url"> & {
|
|
360
|
+
enabled?: boolean;
|
|
361
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").SpacePropertiesResponse | undefined, Error>;
|
|
362
|
+
export declare const useSetSpaceProperty: (config?: {
|
|
363
|
+
onSuccess?: (data: GetSuccessResponse<SetSpacePropertyResponses>, headers: Headers) => void;
|
|
364
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
365
|
+
retry?: boolean;
|
|
366
|
+
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
367
|
+
data: unknown;
|
|
368
|
+
headers: Headers;
|
|
369
|
+
}, unknown, Omit<SetSpacePropertyData, "url">, unknown>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, getTemplate, updateTemplate, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteTemplate, createTemplate, getVersion, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, getTemplate, updateTemplate, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, deleteTemplate, createTemplate, getVersion, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices, getSpaceProperties, setSpaceProperty } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -1304,3 +1304,43 @@ export const useListBillingInvoices = (options) => {
|
|
|
1304
1304
|
staleTime: 600000
|
|
1305
1305
|
});
|
|
1306
1306
|
};
|
|
1307
|
+
export const useGetSpaceProperties = (options) => {
|
|
1308
|
+
const token = useToken();
|
|
1309
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
1310
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/properties" };
|
|
1311
|
+
const funcer = async () => {
|
|
1312
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
1313
|
+
if (isPromise(token) && !token)
|
|
1314
|
+
return;
|
|
1315
|
+
const res = await getSpaceProperties({ ...opts, ...rest, auth });
|
|
1316
|
+
return res.data;
|
|
1317
|
+
};
|
|
1318
|
+
if (!token)
|
|
1319
|
+
enabled = false;
|
|
1320
|
+
return useQuery({
|
|
1321
|
+
queryKey: [options?.path?.spaceHandle, "properties", options.query ?? {}],
|
|
1322
|
+
queryFn: funcer,
|
|
1323
|
+
enabled,
|
|
1324
|
+
retry: false,
|
|
1325
|
+
staleTime: 600000
|
|
1326
|
+
});
|
|
1327
|
+
};
|
|
1328
|
+
export const useSetSpaceProperty = (config) => {
|
|
1329
|
+
const token = useToken();
|
|
1330
|
+
const queryClient = useQueryClient();
|
|
1331
|
+
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/properties" };
|
|
1332
|
+
const funcer = async (options) => {
|
|
1333
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
1334
|
+
const res = await setSpaceProperty({ ...opts, ...options, auth });
|
|
1335
|
+
return { data: res.data, headers: res.response.headers };
|
|
1336
|
+
};
|
|
1337
|
+
return useMutation({
|
|
1338
|
+
mutationFn: funcer,
|
|
1339
|
+
onSuccess: (res, options, c, ctx) => {
|
|
1340
|
+
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, "properties"] });
|
|
1341
|
+
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
1342
|
+
},
|
|
1343
|
+
onError: config?.onError,
|
|
1344
|
+
retry: config?.retry
|
|
1345
|
+
});
|
|
1346
|
+
};
|