shoal-web-sdk 1.0.86 → 1.0.88

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.
@@ -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, CloneEnvironmentData, CloneEnvironmentError, CloneEnvironmentResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse2, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectM2mData, CreateNeonProjectM2mError, CreateNeonProjectM2mResponse, CreateNeonProjectResponse, CreateNodeCredentialData, CreateNodeCredentialError, CreateNodeCredentialResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSecretData, CreateSecretError, CreateSecretM2mData, CreateSecretM2mError, CreateSecretM2mResponse, CreateSecretResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentData, DeleteEnvironmentError, DeleteEnvironmentM2mData, DeleteEnvironmentM2mError, DeleteEnvironmentM2mResponse, DeleteEnvironmentResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchMongoOrganizationsData, FetchMongoOrganizationTierData, FetchMongoRegionsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetApiKeysData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetFeatureFlagsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectEnvironmentsData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSoftDeletedEnvironmentsM2mData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListMongoClustersData, ListMongoProjectsData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListNeonRolesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, LookupApiKeyData, NukeEnvironmentM2mData, NukeEnvironmentM2mError, NukeEnvironmentM2mResponse, PingNodeData, PreviewBlueprintData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeApiKeyData, RevokeApiKeyError, RevokeApiKeyResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdError, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData, ViewBlueprintsM2mData } from '../types.gen';
3
+ import type { CheckSubdomainUniquenessData, CloneEnvironmentData, CloneEnvironmentError, CloneEnvironmentResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse2, CreateBlueprintData, CreateBlueprintError, CreateBlueprintResponse, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateNeonBranchData, CreateNeonBranchError, CreateNeonBranchResponse, CreateNeonDatabaseData, CreateNeonDatabaseError, CreateNeonDatabaseResponse, CreateNeonProjectData, CreateNeonProjectError, CreateNeonProjectM2mData, CreateNeonProjectM2mError, CreateNeonProjectM2mResponse, CreateNeonProjectResponse, CreateNodeCredentialData, CreateNodeCredentialError, CreateNodeCredentialResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSecretData, CreateSecretError, CreateSecretM2mData, CreateSecretM2mError, CreateSecretM2mResponse, CreateSecretResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteBlueprintData, DeleteBlueprintError, DeleteBlueprintResponse, DeleteEnvironmentData, DeleteEnvironmentError, DeleteEnvironmentM2mData, DeleteEnvironmentM2mError, DeleteEnvironmentM2mResponse, DeleteEnvironmentResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeleteNeonDatabaseData, DeleteNeonDatabaseError, DeleteNeonDatabaseResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchMongoOrganizationsData, FetchMongoOrganizationTierData, FetchMongoRegionsData, FetchNeonConnectionUriData, FetchNeonOrganizationsData, FetchNeonRegionsData, FetchNodeM2mData, GetApiKeysData, GetBillingPlanData, GetBillingUsageData, GetBlueprintData, GetBlueprintM2mData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVariablesM2mData, GetEnvironmentVersionsData, GetFeatureFlagsData, GetGraphOverviewData, GetNodeEnvironmentVariablesData, GetProjectEnvironmentsData, GetProjectOverviewData, GetPublicInviteData, GetSecretValueData, GetServiceHealthData, GetSoftDeletedEnvironmentsM2mData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpacePropertiesData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, ImportBlueprintData, ImportBlueprintError, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListMongoClustersData, ListMongoProjectsData, ListNeonBranchesData, ListNeonDatabasesData, ListNeonProjectsData, ListNeonRolesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, LookupApiKeyData, NukeEnvironmentM2mData, NukeEnvironmentM2mError, NukeEnvironmentM2mResponse, PingNodeData, PreviewBlueprintData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeApiKeyData, RevokeApiKeyError, RevokeApiKeyResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, SetEnvironmentGcpProjectIdData, SetEnvironmentGcpProjectIdError, SetSpacePropertyData, SetSpacePropertyError, UpdateBillingPlanData, UpdateBillingPlanError, UpdateBlueprintData, UpdateBlueprintError, UpdateBlueprintResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, ViewBlueprintsData, ViewBlueprintsM2mData } from '../types.gen';
4
4
  export type QueryKey<TOptions extends Options> = [
5
5
  Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
6
6
  _id: string;
@@ -1993,10 +1993,6 @@ export declare const pingNodeOptions: (options: Options<PingNodeData>) => import
1993
1993
  * Generate a service account key file scoped to a node's own resources, for local development against them.
1994
1994
  */
1995
1995
  export declare const createNodeCredentialMutation: (options?: Partial<Options<CreateNodeCredentialData>>) => UseMutationOptions<CreateNodeCredentialResponse, CreateNodeCredentialError, Options<CreateNodeCredentialData>>;
1996
- /**
1997
- * Record a cloud usage event for a space (M2M only).
1998
- */
1999
- export declare const recordCloudUsageMutation: (options?: Partial<Options<RecordCloudUsageData>>) => UseMutationOptions<unknown, RecordCloudUsageError, Options<RecordCloudUsageData>>;
2000
1996
  export declare const getBillingPlanQueryKey: (options: Options<GetBillingPlanData>) => [Pick<Options<GetBillingPlanData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
2001
1997
  _id: string;
2002
1998
  _infinite?: boolean;
@@ -2004,6 +2000,8 @@ export declare const getBillingPlanQueryKey: (options: Options<GetBillingPlanDat
2004
2000
  }];
2005
2001
  /**
2006
2002
  * Get the current billing plan for a space.
2003
+ *
2004
+ * @deprecated
2007
2005
  */
2008
2006
  export declare const getBillingPlanOptions: (options: Options<GetBillingPlanData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").BillingPlan, Error, import("../types.gen").BillingPlan, [Pick<Options<GetBillingPlanData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
2009
2007
  _id: string;
@@ -2027,10 +2025,14 @@ export declare const getBillingPlanOptions: (options: Options<GetBillingPlanData
2027
2025
  };
2028
2026
  /**
2029
2027
  * Upgrade or downgrade the billing plan for a space.
2028
+ *
2029
+ * @deprecated
2030
2030
  */
2031
2031
  export declare const updateBillingPlanMutation: (options?: Partial<Options<UpdateBillingPlanData>>) => UseMutationOptions<unknown, UpdateBillingPlanError, Options<UpdateBillingPlanData>>;
2032
2032
  /**
2033
2033
  * Create a Stripe SetupIntent to collect a payment method.
2034
+ *
2035
+ * @deprecated
2034
2036
  */
2035
2037
  export declare const createSetupIntentMutation: (options?: Partial<Options<CreateSetupIntentData>>) => UseMutationOptions<CreateSetupIntentResponse, CreateSetupIntentError, Options<CreateSetupIntentData>>;
2036
2038
  export declare const listPaymentMethodsQueryKey: (options: Options<ListPaymentMethodsData>) => [Pick<Options<ListPaymentMethodsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
@@ -2040,6 +2042,8 @@ export declare const listPaymentMethodsQueryKey: (options: Options<ListPaymentMe
2040
2042
  }];
2041
2043
  /**
2042
2044
  * List all saved payment methods for a space.
2045
+ *
2046
+ * @deprecated
2043
2047
  */
2044
2048
  export declare const listPaymentMethodsOptions: (options: Options<ListPaymentMethodsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").PaymentMethod[], Error, import("../types.gen").PaymentMethod[], [Pick<Options<ListPaymentMethodsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
2045
2049
  _id: string;
@@ -2063,10 +2067,14 @@ export declare const listPaymentMethodsOptions: (options: Options<ListPaymentMet
2063
2067
  };
2064
2068
  /**
2065
2069
  * Remove a saved payment method.
2070
+ *
2071
+ * @deprecated
2066
2072
  */
2067
2073
  export declare const removePaymentMethodMutation: (options?: Partial<Options<RemovePaymentMethodData>>) => UseMutationOptions<RemovePaymentMethodResponse, RemovePaymentMethodError, Options<RemovePaymentMethodData>>;
2068
2074
  /**
2069
2075
  * Set a payment method as the default for invoices.
2076
+ *
2077
+ * @deprecated
2070
2078
  */
2071
2079
  export declare const setDefaultPaymentMethodMutation: (options?: Partial<Options<SetDefaultPaymentMethodData>>) => UseMutationOptions<SetDefaultPaymentMethodResponse, SetDefaultPaymentMethodError, Options<SetDefaultPaymentMethodData>>;
2072
2080
  export declare const getBillingUsageQueryKey: (options: Options<GetBillingUsageData>) => [Pick<Options<GetBillingUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
@@ -2076,6 +2084,8 @@ export declare const getBillingUsageQueryKey: (options: Options<GetBillingUsageD
2076
2084
  }];
2077
2085
  /**
2078
2086
  * Get metered cloud usage for the current billing period.
2087
+ *
2088
+ * @deprecated
2079
2089
  */
2080
2090
  export declare const getBillingUsageOptions: (options: Options<GetBillingUsageData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").BillingUsage, Error, import("../types.gen").BillingUsage, [Pick<Options<GetBillingUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
2081
2091
  _id: string;
@@ -2104,6 +2114,8 @@ export declare const fetchBillingPricesQueryKey: (options: Options<FetchBillingP
2104
2114
  }];
2105
2115
  /**
2106
2116
  * Fetch live unit prices for all paid plans from Stripe.
2117
+ *
2118
+ * @deprecated
2107
2119
  */
2108
2120
  export declare const fetchBillingPricesOptions: (options: Options<FetchBillingPricesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").PlanPriceResponse[], Error, import("../types.gen").PlanPriceResponse[], [Pick<Options<FetchBillingPricesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
2109
2121
  _id: string;
@@ -2132,6 +2144,8 @@ export declare const listBillingInvoicesQueryKey: (options: Options<ListBillingI
2132
2144
  }];
2133
2145
  /**
2134
2146
  * List past invoices for the space, newest first.
2147
+ *
2148
+ * @deprecated
2135
2149
  */
2136
2150
  export declare const listBillingInvoicesOptions: (options: Options<ListBillingInvoicesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").InvoicesResponse, Error, import("../types.gen").InvoicesResponse, [Pick<Options<ListBillingInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
2137
2151
  _id: string;
@@ -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, cloneEnvironment, createApiKey, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createNodeCredential, createProject, createSecret, createSecretM2M, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironment, deleteEnvironmentM2M, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchMongoOrganizations, fetchMongoOrganizationTier, fetchMongoRegions, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getApiKeys, getBillingPlan, getBillingUsage, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getFeatureFlags, getGraphOverview, getNodeEnvironmentVariables, getProjectEnvironments, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSoftDeletedEnvironmentsM2M, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listMongoClusters, listMongoProjects, listNeonBranches, listNeonDatabases, listNeonProjects, listNeonRoles, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, lookupApiKey, nukeEnvironmentM2M, pingNode, previewBlueprint, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeApiKey, revokeSpaceInvite, setDefaultPaymentMethod, setEnvironmentGcpProjectId, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints, viewBlueprintsM2M } from '../sdk.gen';
4
+ import { checkSubdomainUniqueness, cloneEnvironment, createApiKey, createBlueprint, createEnvironment, createEnvironmentVariable, createFeatureRequest, createNeonBranch, createNeonDatabase, createNeonProject, createNeonProjectM2M, createNodeCredential, createProject, createSecret, createSecretM2M, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteBlueprint, deleteEnvironment, deleteEnvironmentM2M, deleteEnvironmentVariable, deleteNeonDatabase, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchMongoOrganizations, fetchMongoOrganizationTier, fetchMongoRegions, fetchNeonConnectionUri, fetchNeonOrganizations, fetchNeonRegions, fetchNodeM2M, getApiKeys, getBillingPlan, getBillingUsage, getBlueprint, getBlueprintM2M, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVariablesM2M, getEnvironmentVersions, getFeatureFlags, getGraphOverview, getNodeEnvironmentVariables, getProjectEnvironments, getProjectOverview, getPublicInvite, getSecretValue, getServiceHealth, getSoftDeletedEnvironmentsM2M, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceProperties, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, importBlueprint, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listMongoClusters, listMongoProjects, listNeonBranches, listNeonDatabases, listNeonProjects, listNeonRoles, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, lookupApiKey, nukeEnvironmentM2M, pingNode, previewBlueprint, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeApiKey, revokeSpaceInvite, setDefaultPaymentMethod, setEnvironmentGcpProjectId, setSpaceProperty, updateBillingPlan, updateBlueprint, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile, viewBlueprints, viewBlueprintsM2M } 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) {
@@ -2068,25 +2068,11 @@ export const createNodeCredentialMutation = (options) => {
2068
2068
  };
2069
2069
  return mutationOptions;
2070
2070
  };
2071
- /**
2072
- * Record a cloud usage event for a space (M2M only).
2073
- */
2074
- export const recordCloudUsageMutation = (options) => {
2075
- const mutationOptions = {
2076
- mutationFn: async (fnOptions) => {
2077
- const { data } = await recordCloudUsage({
2078
- ...options,
2079
- ...fnOptions,
2080
- throwOnError: true
2081
- });
2082
- return data;
2083
- }
2084
- };
2085
- return mutationOptions;
2086
- };
2087
2071
  export const getBillingPlanQueryKey = (options) => createQueryKey('getBillingPlan', options);
2088
2072
  /**
2089
2073
  * Get the current billing plan for a space.
2074
+ *
2075
+ * @deprecated
2090
2076
  */
2091
2077
  export const getBillingPlanOptions = (options) => {
2092
2078
  return queryOptions({
@@ -2104,6 +2090,8 @@ export const getBillingPlanOptions = (options) => {
2104
2090
  };
2105
2091
  /**
2106
2092
  * Upgrade or downgrade the billing plan for a space.
2093
+ *
2094
+ * @deprecated
2107
2095
  */
2108
2096
  export const updateBillingPlanMutation = (options) => {
2109
2097
  const mutationOptions = {
@@ -2120,6 +2108,8 @@ export const updateBillingPlanMutation = (options) => {
2120
2108
  };
2121
2109
  /**
2122
2110
  * Create a Stripe SetupIntent to collect a payment method.
2111
+ *
2112
+ * @deprecated
2123
2113
  */
2124
2114
  export const createSetupIntentMutation = (options) => {
2125
2115
  const mutationOptions = {
@@ -2137,6 +2127,8 @@ export const createSetupIntentMutation = (options) => {
2137
2127
  export const listPaymentMethodsQueryKey = (options) => createQueryKey('listPaymentMethods', options);
2138
2128
  /**
2139
2129
  * List all saved payment methods for a space.
2130
+ *
2131
+ * @deprecated
2140
2132
  */
2141
2133
  export const listPaymentMethodsOptions = (options) => {
2142
2134
  return queryOptions({
@@ -2154,6 +2146,8 @@ export const listPaymentMethodsOptions = (options) => {
2154
2146
  };
2155
2147
  /**
2156
2148
  * Remove a saved payment method.
2149
+ *
2150
+ * @deprecated
2157
2151
  */
2158
2152
  export const removePaymentMethodMutation = (options) => {
2159
2153
  const mutationOptions = {
@@ -2170,6 +2164,8 @@ export const removePaymentMethodMutation = (options) => {
2170
2164
  };
2171
2165
  /**
2172
2166
  * Set a payment method as the default for invoices.
2167
+ *
2168
+ * @deprecated
2173
2169
  */
2174
2170
  export const setDefaultPaymentMethodMutation = (options) => {
2175
2171
  const mutationOptions = {
@@ -2187,6 +2183,8 @@ export const setDefaultPaymentMethodMutation = (options) => {
2187
2183
  export const getBillingUsageQueryKey = (options) => createQueryKey('getBillingUsage', options);
2188
2184
  /**
2189
2185
  * Get metered cloud usage for the current billing period.
2186
+ *
2187
+ * @deprecated
2190
2188
  */
2191
2189
  export const getBillingUsageOptions = (options) => {
2192
2190
  return queryOptions({
@@ -2205,6 +2203,8 @@ export const getBillingUsageOptions = (options) => {
2205
2203
  export const fetchBillingPricesQueryKey = (options) => createQueryKey('fetchBillingPrices', options);
2206
2204
  /**
2207
2205
  * Fetch live unit prices for all paid plans from Stripe.
2206
+ *
2207
+ * @deprecated
2208
2208
  */
2209
2209
  export const fetchBillingPricesOptions = (options) => {
2210
2210
  return queryOptions({
@@ -2223,6 +2223,8 @@ export const fetchBillingPricesOptions = (options) => {
2223
2223
  export const listBillingInvoicesQueryKey = (options) => createQueryKey('listBillingInvoices', options);
2224
2224
  /**
2225
2225
  * List past invoices for the space, newest first.
2226
+ *
2227
+ * @deprecated
2226
2228
  */
2227
2229
  export const listBillingInvoicesOptions = (options) => {
2228
2230
  return queryOptions({
@@ -1,6 +1,6 @@
1
1
  import { type UseMutationOptions } from '@tanstack/react-query';
2
2
  import { type Options } from '../sdk.gen';
3
- import type { CreateCustomerData, CreateCustomerError, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, DeletePaymentMethodData, DeletePaymentMethodError, DeletePaymentMethodResponse, GetCustomerData, GetInvoicesData, GetPlansData, M2mCreateCustomerData, M2mCreateCustomerError, M2mGetCustomerData, M2mUpdatePlanData, M2mUpdatePlanError, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodError, UpdateDefaultPaymentMethodResponse, UpdatePlanData, UpdatePlanError } from '../types.gen';
3
+ import type { CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, DeletePaymentMethodData, DeletePaymentMethodError, DeletePaymentMethodResponse, GetInvoicesData, GetPlansData, M2mCreateCustomerData, M2mCreateCustomerError, M2mGetCustomerData, M2mUpdatePlanData, M2mUpdatePlanError, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodError, UpdateDefaultPaymentMethodResponse, UpdatePlanData, UpdatePlanError } from '../types.gen';
4
4
  export type QueryKey<TOptions extends Options> = [
5
5
  Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
6
6
  _id: string;
@@ -40,49 +40,6 @@ export declare const getPlansOptions: (options?: Options<GetPlansData>) => impor
40
40
  * Returns a list of available pricing plans.
41
41
  */
42
42
  export declare const updatePlanMutation: (options?: Partial<Options<UpdatePlanData>>) => UseMutationOptions<unknown, UpdatePlanError, Options<UpdatePlanData>>;
43
- export declare const getCustomerQueryKey: (options?: Options<GetCustomerData>) => [Pick<Options<GetCustomerData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
44
- _id: string;
45
- _infinite?: boolean;
46
- tags?: ReadonlyArray<string>;
47
- }];
48
- /**
49
- * Fetch all related customer information.
50
- *
51
- * Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
52
- * from the Stripe subscription rather than only the Account record — a customer can be grandfathered
53
- * onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
54
- * the source of truth for what's actually in effect.
55
- *
56
- */
57
- export declare const getCustomerOptions: (options?: Options<GetCustomerData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").CustomerResponse, Error, import("../types.gen").CustomerResponse, [Pick<Options<GetCustomerData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
58
- _id: string;
59
- _infinite?: boolean;
60
- tags?: ReadonlyArray<string>;
61
- }]>, "queryFn"> & {
62
- queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").CustomerResponse, [Pick<Options<GetCustomerData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
63
- _id: string;
64
- _infinite?: boolean;
65
- tags?: ReadonlyArray<string>;
66
- }], never> | undefined;
67
- } & {
68
- queryKey: [Pick<Options<GetCustomerData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
69
- _id: string;
70
- _infinite?: boolean;
71
- tags?: ReadonlyArray<string>;
72
- }] & {
73
- [dataTagSymbol]: import("../types.gen").CustomerResponse;
74
- [dataTagErrorSymbol]: Error;
75
- };
76
- };
77
- /**
78
- * Creates a stripe customer with a stripe subscription
79
- *
80
- * This instantiates an account record in our database with
81
- * the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
82
- * webhook is received.
83
- *
84
- */
85
- export declare const createCustomerMutation: (options?: Partial<Options<CreateCustomerData>>) => UseMutationOptions<unknown, CreateCustomerError, Options<CreateCustomerData>>;
86
43
  /**
87
44
  * Creates a Stripe SetupIntent.
88
45
  *
@@ -97,7 +54,7 @@ export declare const deletePaymentMethodMutation: (options?: Partial<Options<Del
97
54
  * Sets the customer's default payment method used for invoices.
98
55
  */
99
56
  export declare const updateDefaultPaymentMethodMutation: (options?: Partial<Options<UpdateDefaultPaymentMethodData>>) => UseMutationOptions<UpdateDefaultPaymentMethodResponse, UpdateDefaultPaymentMethodError, Options<UpdateDefaultPaymentMethodData>>;
100
- export declare const getInvoicesQueryKey: (options?: Options<GetInvoicesData>) => [Pick<Options<GetInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
57
+ export declare const getInvoicesQueryKey: (options: Options<GetInvoicesData>) => [Pick<Options<GetInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
101
58
  _id: string;
102
59
  _infinite?: boolean;
103
60
  tags?: ReadonlyArray<string>;
@@ -105,7 +62,7 @@ export declare const getInvoicesQueryKey: (options?: Options<GetInvoicesData>) =
105
62
  /**
106
63
  * Returns a page of the customer's invoices. This response is paginated.
107
64
  */
108
- export declare const getInvoicesOptions: (options?: Options<GetInvoicesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").InvoiceListResponse, Error, import("../types.gen").InvoiceListResponse, [Pick<Options<GetInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
65
+ export declare const getInvoicesOptions: (options: Options<GetInvoicesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").InvoiceListResponse, Error, import("../types.gen").InvoiceListResponse, [Pick<Options<GetInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
109
66
  _id: string;
110
67
  _infinite?: boolean;
111
68
  tags?: ReadonlyArray<string>;
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { queryOptions } from '@tanstack/react-query';
3
3
  import { client } from '../client.gen';
4
- import { createCustomer, createSetupIntent, deletePaymentMethod, getCustomer, getInvoices, getPlans, m2mCreateCustomer, m2mGetCustomer, m2mUpdatePlan, updateDefaultPaymentMethod, updatePlan } from '../sdk.gen';
4
+ import { createSetupIntent, deletePaymentMethod, getInvoices, getPlans, m2mCreateCustomer, m2mGetCustomer, m2mUpdatePlan, updateDefaultPaymentMethod, updatePlan } 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) {
@@ -60,51 +60,6 @@ export const updatePlanMutation = (options) => {
60
60
  };
61
61
  return mutationOptions;
62
62
  };
63
- export const getCustomerQueryKey = (options) => createQueryKey('getCustomer', options);
64
- /**
65
- * Fetch all related customer information.
66
- *
67
- * Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
68
- * from the Stripe subscription rather than only the Account record — a customer can be grandfathered
69
- * onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
70
- * the source of truth for what's actually in effect.
71
- *
72
- */
73
- export const getCustomerOptions = (options) => {
74
- return queryOptions({
75
- queryFn: async ({ queryKey, signal }) => {
76
- const { data } = await getCustomer({
77
- ...options,
78
- ...queryKey[0],
79
- signal,
80
- throwOnError: true
81
- });
82
- return data;
83
- },
84
- queryKey: getCustomerQueryKey(options)
85
- });
86
- };
87
- /**
88
- * Creates a stripe customer with a stripe subscription
89
- *
90
- * This instantiates an account record in our database with
91
- * the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
92
- * webhook is received.
93
- *
94
- */
95
- export const createCustomerMutation = (options) => {
96
- const mutationOptions = {
97
- mutationFn: async (fnOptions) => {
98
- const { data } = await createCustomer({
99
- ...options,
100
- ...fnOptions,
101
- throwOnError: true
102
- });
103
- return data;
104
- }
105
- };
106
- return mutationOptions;
107
- };
108
63
  /**
109
64
  * Creates a Stripe SetupIntent.
110
65
  *
@@ -1,5 +1,5 @@
1
1
  import type { Client, Options as Options2, TDataShape } from './client';
2
- import type { CreateCustomerData, CreateCustomerErrors, CreateCustomerResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, DeletePaymentMethodData, DeletePaymentMethodErrors, DeletePaymentMethodResponses, GetCustomerData, GetCustomerErrors, GetCustomerResponses, GetInvoicesData, GetInvoicesErrors, GetInvoicesResponses, GetPlansData, GetPlansErrors, GetPlansResponses, M2mCreateCustomerData, M2mCreateCustomerErrors, M2mCreateCustomerResponses, M2mGetCustomerData, M2mGetCustomerErrors, M2mGetCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanErrors, M2mUpdatePlanResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodErrors, UpdateDefaultPaymentMethodResponses, UpdatePlanData, UpdatePlanErrors, UpdatePlanResponses } from './types.gen';
2
+ import type { CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, DeletePaymentMethodData, DeletePaymentMethodErrors, DeletePaymentMethodResponses, GetInvoicesData, GetInvoicesErrors, GetInvoicesResponses, GetPlansData, GetPlansErrors, GetPlansResponses, M2mCreateCustomerData, M2mCreateCustomerErrors, M2mCreateCustomerResponses, M2mGetCustomerData, M2mGetCustomerErrors, M2mGetCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanErrors, M2mUpdatePlanResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodErrors, UpdateDefaultPaymentMethodResponses, UpdatePlanData, UpdatePlanErrors, UpdatePlanResponses } 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
@@ -21,31 +21,12 @@ export declare const getPlans: <ThrowOnError extends boolean = false>(options?:
21
21
  * Returns a list of available pricing plans.
22
22
  */
23
23
  export declare const updatePlan: <ThrowOnError extends boolean = false>(options: Options<UpdatePlanData, ThrowOnError>) => import("./client").RequestResult<UpdatePlanResponses, UpdatePlanErrors, ThrowOnError, "fields">;
24
- /**
25
- * Fetch all related customer information.
26
- *
27
- * Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
28
- * from the Stripe subscription rather than only the Account record — a customer can be grandfathered
29
- * onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
30
- * the source of truth for what's actually in effect.
31
- *
32
- */
33
- export declare const getCustomer: <ThrowOnError extends boolean = false>(options?: Options<GetCustomerData, ThrowOnError>) => import("./client").RequestResult<GetCustomerResponses, GetCustomerErrors, ThrowOnError, "fields">;
34
- /**
35
- * Creates a stripe customer with a stripe subscription
36
- *
37
- * This instantiates an account record in our database with
38
- * the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
39
- * webhook is received.
40
- *
41
- */
42
- export declare const createCustomer: <ThrowOnError extends boolean = false>(options: Options<CreateCustomerData, ThrowOnError>) => import("./client").RequestResult<CreateCustomerResponses, CreateCustomerErrors, ThrowOnError, "fields">;
43
24
  /**
44
25
  * Creates a Stripe SetupIntent.
45
26
  *
46
27
  * Lets the client collect and tokenise a card without charging it.
47
28
  */
48
- export declare const createSetupIntent: <ThrowOnError extends boolean = false>(options?: Options<CreateSetupIntentData, ThrowOnError>) => import("./client").RequestResult<CreateSetupIntentResponses, CreateSetupIntentErrors, ThrowOnError, "fields">;
29
+ export declare const createSetupIntent: <ThrowOnError extends boolean = false>(options: Options<CreateSetupIntentData, ThrowOnError>) => import("./client").RequestResult<CreateSetupIntentResponses, CreateSetupIntentErrors, ThrowOnError, "fields">;
49
30
  /**
50
31
  * Detaches a payment method from the customer.
51
32
  */
@@ -57,7 +38,7 @@ export declare const updateDefaultPaymentMethod: <ThrowOnError extends boolean =
57
38
  /**
58
39
  * Returns a page of the customer's invoices. This response is paginated.
59
40
  */
60
- export declare const getInvoices: <ThrowOnError extends boolean = false>(options?: Options<GetInvoicesData, ThrowOnError>) => import("./client").RequestResult<GetInvoicesResponses, GetInvoicesErrors, ThrowOnError, "fields">;
41
+ export declare const getInvoices: <ThrowOnError extends boolean = false>(options: Options<GetInvoicesData, ThrowOnError>) => import("./client").RequestResult<GetInvoicesResponses, GetInvoicesErrors, ThrowOnError, "fields">;
61
42
  /**
62
43
  * Fetch all related customer information for a given org.
63
44
  */
@@ -26,52 +26,7 @@ export const updatePlan = (options) => {
26
26
  type: 'http'
27
27
  }
28
28
  ],
29
- url: '/api/v1/plan',
30
- ...options,
31
- headers: {
32
- 'Content-Type': 'application/json',
33
- ...options.headers
34
- }
35
- });
36
- };
37
- /**
38
- * Fetch all related customer information.
39
- *
40
- * Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
41
- * from the Stripe subscription rather than only the Account record — a customer can be grandfathered
42
- * onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
43
- * the source of truth for what's actually in effect.
44
- *
45
- */
46
- export const getCustomer = (options) => {
47
- return (options?.client ?? client).get({
48
- security: [
49
- {
50
- scheme: 'bearer',
51
- type: 'http'
52
- }
53
- ],
54
- url: '/api/v1/customer',
55
- ...options
56
- });
57
- };
58
- /**
59
- * Creates a stripe customer with a stripe subscription
60
- *
61
- * This instantiates an account record in our database with
62
- * the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
63
- * webhook is received.
64
- *
65
- */
66
- export const createCustomer = (options) => {
67
- return (options.client ?? client).post({
68
- security: [
69
- {
70
- scheme: 'bearer',
71
- type: 'http'
72
- }
73
- ],
74
- url: '/api/v1/customer',
29
+ url: '/api/v1/plan/{org}',
75
30
  ...options,
76
31
  headers: {
77
32
  'Content-Type': 'application/json',
@@ -85,14 +40,14 @@ export const createCustomer = (options) => {
85
40
  * Lets the client collect and tokenise a card without charging it.
86
41
  */
87
42
  export const createSetupIntent = (options) => {
88
- return (options?.client ?? client).post({
43
+ return (options.client ?? client).post({
89
44
  security: [
90
45
  {
91
46
  scheme: 'bearer',
92
47
  type: 'http'
93
48
  }
94
49
  ],
95
- url: '/api/v1/setup-intent',
50
+ url: '/api/v1/setup-intent/{org}',
96
51
  ...options
97
52
  });
98
53
  };
@@ -107,7 +62,7 @@ export const deletePaymentMethod = (options) => {
107
62
  type: 'http'
108
63
  }
109
64
  ],
110
- url: '/api/v1/payment-method/{id}',
65
+ url: '/api/v1/payment-method/{paymentID}',
111
66
  ...options
112
67
  });
113
68
  };
@@ -122,7 +77,7 @@ export const updateDefaultPaymentMethod = (options) => {
122
77
  type: 'http'
123
78
  }
124
79
  ],
125
- url: '/api/v1/payment-method/{id}',
80
+ url: '/api/v1/payment-method/{paymentID}',
126
81
  ...options
127
82
  });
128
83
  };
@@ -130,14 +85,14 @@ export const updateDefaultPaymentMethod = (options) => {
130
85
  * Returns a page of the customer's invoices. This response is paginated.
131
86
  */
132
87
  export const getInvoices = (options) => {
133
- return (options?.client ?? client).get({
88
+ return (options.client ?? client).get({
134
89
  security: [
135
90
  {
136
91
  scheme: 'bearer',
137
92
  type: 'http'
138
93
  }
139
94
  ],
140
- url: '/api/v1/invoices',
95
+ url: '/api/v1/invoices/{org}',
141
96
  ...options
142
97
  });
143
98
  };