shoal-web-sdk 1.0.78 → 1.0.80
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 +5 -1
- package/dist/sdk/@tanstack/react-query.gen.js +17 -1
- package/dist/sdk/billing/@tanstack/react-query.gen.d.ts +121 -0
- package/dist/sdk/billing/@tanstack/react-query.gen.js +169 -0
- package/dist/sdk/billing/index.d.ts +1 -1
- package/dist/sdk/billing/index.js +1 -1
- package/dist/sdk/billing/sdk.gen.d.ts +40 -0
- package/dist/sdk/billing/sdk.gen.js +136 -1
- package/dist/sdk/billing/types.gen.d.ts +332 -2
- package/dist/sdk/billing/zod.gen.d.ts +335 -23
- package/dist/sdk/billing/zod.gen.js +145 -5
- package/dist/sdk/sdk.gen.d.ts +5 -1
- package/dist/sdk/sdk.gen.js +23 -0
- package/dist/sdk/types.gen.d.ts +73 -0
- package/dist/sdk/zod.gen.d.ts +25 -0
- package/dist/sdk/zod.gen.js +21 -0
- package/dist/tanstack-codegen/generated/billing.d.ts +664 -1
- package/dist/tanstack-codegen/generated/billing.js +165 -1
- package/dist/tanstack-codegen/generated/generated.d.ts +9 -1
- package/dist/tanstack-codegen/generated/generated.js +20 -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, 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, 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, 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, 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, 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, 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';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -1933,6 +1933,10 @@ export declare const pingNodeOptions: (options: Options<PingNodeData>) => import
|
|
|
1933
1933
|
[dataTagErrorSymbol]: Error;
|
|
1934
1934
|
};
|
|
1935
1935
|
};
|
|
1936
|
+
/**
|
|
1937
|
+
* Generate a service account key file scoped to a node's own resources, for local development against them.
|
|
1938
|
+
*/
|
|
1939
|
+
export declare const createNodeCredentialMutation: (options?: Partial<Options<CreateNodeCredentialData>>) => UseMutationOptions<CreateNodeCredentialResponse, CreateNodeCredentialError, Options<CreateNodeCredentialData>>;
|
|
1936
1940
|
/**
|
|
1937
1941
|
* Record a cloud usage event for a space (M2M only).
|
|
1938
1942
|
*/
|
|
@@ -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, 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, 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, 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, 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, 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';
|
|
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) {
|
|
@@ -1991,6 +1991,22 @@ export const pingNodeOptions = (options) => {
|
|
|
1991
1991
|
queryKey: pingNodeQueryKey(options)
|
|
1992
1992
|
});
|
|
1993
1993
|
};
|
|
1994
|
+
/**
|
|
1995
|
+
* Generate a service account key file scoped to a node's own resources, for local development against them.
|
|
1996
|
+
*/
|
|
1997
|
+
export const createNodeCredentialMutation = (options) => {
|
|
1998
|
+
const mutationOptions = {
|
|
1999
|
+
mutationFn: async (fnOptions) => {
|
|
2000
|
+
const { data } = await createNodeCredential({
|
|
2001
|
+
...options,
|
|
2002
|
+
...fnOptions,
|
|
2003
|
+
throwOnError: true
|
|
2004
|
+
});
|
|
2005
|
+
return data;
|
|
2006
|
+
}
|
|
2007
|
+
};
|
|
2008
|
+
return mutationOptions;
|
|
2009
|
+
};
|
|
1994
2010
|
/**
|
|
1995
2011
|
* Record a cloud usage event for a space (M2M only).
|
|
1996
2012
|
*/
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import { type Options } from '../sdk.gen';
|
|
3
|
+
import type { CreateCustomerData, CreateCustomerError, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, DeletePaymentMethodData, DeletePaymentMethodError, DeletePaymentMethodResponse, GetCustomerData, GetInvoicesData, GetPlansData, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodError, UpdateDefaultPaymentMethodResponse, UpdatePlanData, UpdatePlanError } from '../types.gen';
|
|
4
|
+
export type QueryKey<TOptions extends Options> = [
|
|
5
|
+
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
|
+
_id: string;
|
|
7
|
+
_infinite?: boolean;
|
|
8
|
+
tags?: ReadonlyArray<string>;
|
|
9
|
+
}
|
|
10
|
+
];
|
|
11
|
+
export declare const getPlansQueryKey: (options?: Options<GetPlansData>) => [Pick<Options<GetPlansData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
12
|
+
_id: string;
|
|
13
|
+
_infinite?: boolean;
|
|
14
|
+
tags?: ReadonlyArray<string>;
|
|
15
|
+
}];
|
|
16
|
+
/**
|
|
17
|
+
* Returns a list of available pricing plans.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getPlansOptions: (options?: Options<GetPlansData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").CatalogResponse, Error, import("../types.gen").CatalogResponse, [Pick<Options<GetPlansData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
20
|
+
_id: string;
|
|
21
|
+
_infinite?: boolean;
|
|
22
|
+
tags?: ReadonlyArray<string>;
|
|
23
|
+
}]>, "queryFn"> & {
|
|
24
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").CatalogResponse, [Pick<Options<GetPlansData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
25
|
+
_id: string;
|
|
26
|
+
_infinite?: boolean;
|
|
27
|
+
tags?: ReadonlyArray<string>;
|
|
28
|
+
}], never> | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
queryKey: [Pick<Options<GetPlansData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
31
|
+
_id: string;
|
|
32
|
+
_infinite?: boolean;
|
|
33
|
+
tags?: ReadonlyArray<string>;
|
|
34
|
+
}] & {
|
|
35
|
+
[dataTagSymbol]: import("../types.gen").CatalogResponse;
|
|
36
|
+
[dataTagErrorSymbol]: Error;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Returns a list of available pricing plans.
|
|
41
|
+
*/
|
|
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
|
+
* Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
|
|
50
|
+
* from the Stripe subscription rather than only the Account record — a customer can be grandfathered
|
|
51
|
+
* onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
|
|
52
|
+
* the source of truth for what's actually in effect.
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
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"> & {
|
|
56
|
+
_id: string;
|
|
57
|
+
_infinite?: boolean;
|
|
58
|
+
tags?: ReadonlyArray<string>;
|
|
59
|
+
}]>, "queryFn"> & {
|
|
60
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").CustomerResponse, [Pick<Options<GetCustomerData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
61
|
+
_id: string;
|
|
62
|
+
_infinite?: boolean;
|
|
63
|
+
tags?: ReadonlyArray<string>;
|
|
64
|
+
}], never> | undefined;
|
|
65
|
+
} & {
|
|
66
|
+
queryKey: [Pick<Options<GetCustomerData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
67
|
+
_id: string;
|
|
68
|
+
_infinite?: boolean;
|
|
69
|
+
tags?: ReadonlyArray<string>;
|
|
70
|
+
}] & {
|
|
71
|
+
[dataTagSymbol]: import("../types.gen").CustomerResponse;
|
|
72
|
+
[dataTagErrorSymbol]: Error;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Creates a stripe customer with a stripe subscription. This instantiates an account record in our database with
|
|
77
|
+
* the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
|
|
78
|
+
* webhook is received.
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
export declare const createCustomerMutation: (options?: Partial<Options<CreateCustomerData>>) => UseMutationOptions<unknown, CreateCustomerError, Options<CreateCustomerData>>;
|
|
82
|
+
/**
|
|
83
|
+
* Creates a Stripe SetupIntent so the client can collect and tokenise a card without charging it.
|
|
84
|
+
*/
|
|
85
|
+
export declare const createSetupIntentMutation: (options?: Partial<Options<CreateSetupIntentData>>) => UseMutationOptions<CreateSetupIntentResponse, CreateSetupIntentError, Options<CreateSetupIntentData>>;
|
|
86
|
+
/**
|
|
87
|
+
* Detaches a payment method from the customer.
|
|
88
|
+
*/
|
|
89
|
+
export declare const deletePaymentMethodMutation: (options?: Partial<Options<DeletePaymentMethodData>>) => UseMutationOptions<DeletePaymentMethodResponse, DeletePaymentMethodError, Options<DeletePaymentMethodData>>;
|
|
90
|
+
/**
|
|
91
|
+
* Sets the customer's default payment method used for invoices.
|
|
92
|
+
*/
|
|
93
|
+
export declare const updateDefaultPaymentMethodMutation: (options?: Partial<Options<UpdateDefaultPaymentMethodData>>) => UseMutationOptions<UpdateDefaultPaymentMethodResponse, UpdateDefaultPaymentMethodError, Options<UpdateDefaultPaymentMethodData>>;
|
|
94
|
+
export declare const getInvoicesQueryKey: (options?: Options<GetInvoicesData>) => [Pick<Options<GetInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
95
|
+
_id: string;
|
|
96
|
+
_infinite?: boolean;
|
|
97
|
+
tags?: ReadonlyArray<string>;
|
|
98
|
+
}];
|
|
99
|
+
/**
|
|
100
|
+
* Returns a page of the customer's invoices. This response is paginated.
|
|
101
|
+
*/
|
|
102
|
+
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"> & {
|
|
103
|
+
_id: string;
|
|
104
|
+
_infinite?: boolean;
|
|
105
|
+
tags?: ReadonlyArray<string>;
|
|
106
|
+
}]>, "queryFn"> & {
|
|
107
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").InvoiceListResponse, [Pick<Options<GetInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
108
|
+
_id: string;
|
|
109
|
+
_infinite?: boolean;
|
|
110
|
+
tags?: ReadonlyArray<string>;
|
|
111
|
+
}], never> | undefined;
|
|
112
|
+
} & {
|
|
113
|
+
queryKey: [Pick<Options<GetInvoicesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
114
|
+
_id: string;
|
|
115
|
+
_infinite?: boolean;
|
|
116
|
+
tags?: ReadonlyArray<string>;
|
|
117
|
+
}] & {
|
|
118
|
+
[dataTagSymbol]: import("../types.gen").InvoiceListResponse;
|
|
119
|
+
[dataTagErrorSymbol]: Error;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { queryOptions } from '@tanstack/react-query';
|
|
3
|
+
import { client } from '../client.gen';
|
|
4
|
+
import { createCustomer, createSetupIntent, deletePaymentMethod, getCustomer, getInvoices, getPlans, updateDefaultPaymentMethod, updatePlan } from '../sdk.gen';
|
|
5
|
+
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
|
+
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
|
+
if (infinite) {
|
|
8
|
+
params._infinite = infinite;
|
|
9
|
+
}
|
|
10
|
+
if (tags) {
|
|
11
|
+
params.tags = tags;
|
|
12
|
+
}
|
|
13
|
+
if (options?.body) {
|
|
14
|
+
params.body = options.body;
|
|
15
|
+
}
|
|
16
|
+
if (options?.headers) {
|
|
17
|
+
params.headers = options.headers;
|
|
18
|
+
}
|
|
19
|
+
if (options?.path) {
|
|
20
|
+
params.path = options.path;
|
|
21
|
+
}
|
|
22
|
+
if (options?.query) {
|
|
23
|
+
params.query = options.query;
|
|
24
|
+
}
|
|
25
|
+
return [
|
|
26
|
+
params
|
|
27
|
+
];
|
|
28
|
+
};
|
|
29
|
+
export const getPlansQueryKey = (options) => createQueryKey('getPlans', options);
|
|
30
|
+
/**
|
|
31
|
+
* Returns a list of available pricing plans.
|
|
32
|
+
*/
|
|
33
|
+
export const getPlansOptions = (options) => {
|
|
34
|
+
return queryOptions({
|
|
35
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
36
|
+
const { data } = await getPlans({
|
|
37
|
+
...options,
|
|
38
|
+
...queryKey[0],
|
|
39
|
+
signal,
|
|
40
|
+
throwOnError: true
|
|
41
|
+
});
|
|
42
|
+
return data;
|
|
43
|
+
},
|
|
44
|
+
queryKey: getPlansQueryKey(options)
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Returns a list of available pricing plans.
|
|
49
|
+
*/
|
|
50
|
+
export const updatePlanMutation = (options) => {
|
|
51
|
+
const mutationOptions = {
|
|
52
|
+
mutationFn: async (fnOptions) => {
|
|
53
|
+
const { data } = await updatePlan({
|
|
54
|
+
...options,
|
|
55
|
+
...fnOptions,
|
|
56
|
+
throwOnError: true
|
|
57
|
+
});
|
|
58
|
+
return data;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return mutationOptions;
|
|
62
|
+
};
|
|
63
|
+
export const getCustomerQueryKey = (options) => createQueryKey('getCustomer', options);
|
|
64
|
+
/**
|
|
65
|
+
* Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
|
|
66
|
+
* from the Stripe subscription rather than only the Account record — a customer can be grandfathered
|
|
67
|
+
* onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
|
|
68
|
+
* the source of truth for what's actually in effect.
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
export const getCustomerOptions = (options) => {
|
|
72
|
+
return queryOptions({
|
|
73
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
74
|
+
const { data } = await getCustomer({
|
|
75
|
+
...options,
|
|
76
|
+
...queryKey[0],
|
|
77
|
+
signal,
|
|
78
|
+
throwOnError: true
|
|
79
|
+
});
|
|
80
|
+
return data;
|
|
81
|
+
},
|
|
82
|
+
queryKey: getCustomerQueryKey(options)
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Creates a stripe customer with a stripe subscription. This instantiates an account record in our database with
|
|
87
|
+
* the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
|
|
88
|
+
* webhook is received.
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
export const createCustomerMutation = (options) => {
|
|
92
|
+
const mutationOptions = {
|
|
93
|
+
mutationFn: async (fnOptions) => {
|
|
94
|
+
const { data } = await createCustomer({
|
|
95
|
+
...options,
|
|
96
|
+
...fnOptions,
|
|
97
|
+
throwOnError: true
|
|
98
|
+
});
|
|
99
|
+
return data;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
return mutationOptions;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Creates a Stripe SetupIntent so the client can collect and tokenise a card without charging it.
|
|
106
|
+
*/
|
|
107
|
+
export const createSetupIntentMutation = (options) => {
|
|
108
|
+
const mutationOptions = {
|
|
109
|
+
mutationFn: async (fnOptions) => {
|
|
110
|
+
const { data } = await createSetupIntent({
|
|
111
|
+
...options,
|
|
112
|
+
...fnOptions,
|
|
113
|
+
throwOnError: true
|
|
114
|
+
});
|
|
115
|
+
return data;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
return mutationOptions;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Detaches a payment method from the customer.
|
|
122
|
+
*/
|
|
123
|
+
export const deletePaymentMethodMutation = (options) => {
|
|
124
|
+
const mutationOptions = {
|
|
125
|
+
mutationFn: async (fnOptions) => {
|
|
126
|
+
const { data } = await deletePaymentMethod({
|
|
127
|
+
...options,
|
|
128
|
+
...fnOptions,
|
|
129
|
+
throwOnError: true
|
|
130
|
+
});
|
|
131
|
+
return data;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
return mutationOptions;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Sets the customer's default payment method used for invoices.
|
|
138
|
+
*/
|
|
139
|
+
export const updateDefaultPaymentMethodMutation = (options) => {
|
|
140
|
+
const mutationOptions = {
|
|
141
|
+
mutationFn: async (fnOptions) => {
|
|
142
|
+
const { data } = await updateDefaultPaymentMethod({
|
|
143
|
+
...options,
|
|
144
|
+
...fnOptions,
|
|
145
|
+
throwOnError: true
|
|
146
|
+
});
|
|
147
|
+
return data;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
return mutationOptions;
|
|
151
|
+
};
|
|
152
|
+
export const getInvoicesQueryKey = (options) => createQueryKey('getInvoices', options);
|
|
153
|
+
/**
|
|
154
|
+
* Returns a page of the customer's invoices. This response is paginated.
|
|
155
|
+
*/
|
|
156
|
+
export const getInvoicesOptions = (options) => {
|
|
157
|
+
return queryOptions({
|
|
158
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
159
|
+
const { data } = await getInvoices({
|
|
160
|
+
...options,
|
|
161
|
+
...queryKey[0],
|
|
162
|
+
signal,
|
|
163
|
+
throwOnError: true
|
|
164
|
+
});
|
|
165
|
+
return data;
|
|
166
|
+
},
|
|
167
|
+
queryKey: getInvoicesQueryKey(options)
|
|
168
|
+
});
|
|
169
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type * from './types.gen';
|
|
2
|
-
export
|
|
2
|
+
export * from './sdk.gen';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export
|
|
2
|
+
export * from './sdk.gen';
|
|
@@ -1,4 +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, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodErrors, UpdateDefaultPaymentMethodResponses, UpdatePlanData, UpdatePlanErrors, UpdatePlanResponses } from './types.gen';
|
|
2
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
3
4
|
/**
|
|
4
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -12,3 +13,42 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
12
13
|
*/
|
|
13
14
|
meta?: Record<string, unknown>;
|
|
14
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Returns a list of available pricing plans.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getPlans: <ThrowOnError extends boolean = false>(options?: Options<GetPlansData, ThrowOnError>) => import("./client").RequestResult<GetPlansResponses, GetPlansErrors, ThrowOnError, "fields">;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a list of available pricing plans.
|
|
22
|
+
*/
|
|
23
|
+
export declare const updatePlan: <ThrowOnError extends boolean = false>(options: Options<UpdatePlanData, ThrowOnError>) => import("./client").RequestResult<UpdatePlanResponses, UpdatePlanErrors, ThrowOnError, "fields">;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
|
|
26
|
+
* from the Stripe subscription rather than only the Account record — a customer can be grandfathered
|
|
27
|
+
* onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
|
|
28
|
+
* the source of truth for what's actually in effect.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
export declare const getCustomer: <ThrowOnError extends boolean = false>(options?: Options<GetCustomerData, ThrowOnError>) => import("./client").RequestResult<GetCustomerResponses, GetCustomerErrors, ThrowOnError, "fields">;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a stripe customer with a stripe subscription. This instantiates an account record in our database with
|
|
34
|
+
* the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
|
|
35
|
+
* webhook is received.
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare const createCustomer: <ThrowOnError extends boolean = false>(options: Options<CreateCustomerData, ThrowOnError>) => import("./client").RequestResult<CreateCustomerResponses, CreateCustomerErrors, ThrowOnError, "fields">;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a Stripe SetupIntent so the client can collect and tokenise a card without charging it.
|
|
41
|
+
*/
|
|
42
|
+
export declare const createSetupIntent: <ThrowOnError extends boolean = false>(options?: Options<CreateSetupIntentData, ThrowOnError>) => import("./client").RequestResult<CreateSetupIntentResponses, CreateSetupIntentErrors, ThrowOnError, "fields">;
|
|
43
|
+
/**
|
|
44
|
+
* Detaches a payment method from the customer.
|
|
45
|
+
*/
|
|
46
|
+
export declare const deletePaymentMethod: <ThrowOnError extends boolean = false>(options: Options<DeletePaymentMethodData, ThrowOnError>) => import("./client").RequestResult<DeletePaymentMethodResponses, DeletePaymentMethodErrors, ThrowOnError, "fields">;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the customer's default payment method used for invoices.
|
|
49
|
+
*/
|
|
50
|
+
export declare const updateDefaultPaymentMethod: <ThrowOnError extends boolean = false>(options: Options<UpdateDefaultPaymentMethodData, ThrowOnError>) => import("./client").RequestResult<UpdateDefaultPaymentMethodResponses, UpdateDefaultPaymentMethodErrors, ThrowOnError, "fields">;
|
|
51
|
+
/**
|
|
52
|
+
* Returns a page of the customer's invoices. This response is paginated.
|
|
53
|
+
*/
|
|
54
|
+
export declare const getInvoices: <ThrowOnError extends boolean = false>(options?: Options<GetInvoicesData, ThrowOnError>) => import("./client").RequestResult<GetInvoicesResponses, GetInvoicesErrors, ThrowOnError, "fields">;
|
|
@@ -1,2 +1,137 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
|
|
2
|
+
import { client } from './client.gen';
|
|
3
|
+
/**
|
|
4
|
+
* Returns a list of available pricing plans.
|
|
5
|
+
*/
|
|
6
|
+
export const getPlans = (options) => {
|
|
7
|
+
return (options?.client ?? client).get({
|
|
8
|
+
security: [
|
|
9
|
+
{
|
|
10
|
+
scheme: 'bearer',
|
|
11
|
+
type: 'http'
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
url: '/auth/billing/plans',
|
|
15
|
+
...options
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Returns a list of available pricing plans.
|
|
20
|
+
*/
|
|
21
|
+
export const updatePlan = (options) => {
|
|
22
|
+
return (options.client ?? client).patch({
|
|
23
|
+
security: [
|
|
24
|
+
{
|
|
25
|
+
scheme: 'bearer',
|
|
26
|
+
type: 'http'
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
url: '/auth/billing/plan',
|
|
30
|
+
...options,
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json',
|
|
33
|
+
...options.headers
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Returns the account's current (and pending, if any) plan plus renewal/schedule dates, fetched live
|
|
39
|
+
* from the Stripe subscription rather than only the Account record — a customer can be grandfathered
|
|
40
|
+
* onto a price that no longer matches plan-configuration.yaml, so Stripe's subscription metadata is
|
|
41
|
+
* the source of truth for what's actually in effect.
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export const getCustomer = (options) => {
|
|
45
|
+
return (options?.client ?? client).get({
|
|
46
|
+
security: [
|
|
47
|
+
{
|
|
48
|
+
scheme: 'bearer',
|
|
49
|
+
type: 'http'
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
url: '/auth/billing/customer',
|
|
53
|
+
...options
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Creates a stripe customer with a stripe subscription. This instantiates an account record in our database with
|
|
58
|
+
* the account status set to "onboarding". This status is changed to active, once a a stripe update subscription
|
|
59
|
+
* webhook is received.
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export const createCustomer = (options) => {
|
|
63
|
+
return (options.client ?? client).post({
|
|
64
|
+
security: [
|
|
65
|
+
{
|
|
66
|
+
scheme: 'bearer',
|
|
67
|
+
type: 'http'
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
url: '/auth/billing/customer',
|
|
71
|
+
...options,
|
|
72
|
+
headers: {
|
|
73
|
+
'Content-Type': 'application/json',
|
|
74
|
+
...options.headers
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Creates a Stripe SetupIntent so the client can collect and tokenise a card without charging it.
|
|
80
|
+
*/
|
|
81
|
+
export const createSetupIntent = (options) => {
|
|
82
|
+
return (options?.client ?? client).post({
|
|
83
|
+
security: [
|
|
84
|
+
{
|
|
85
|
+
scheme: 'bearer',
|
|
86
|
+
type: 'http'
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
url: '/auth/billing/setup-intent',
|
|
90
|
+
...options
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Detaches a payment method from the customer.
|
|
95
|
+
*/
|
|
96
|
+
export const deletePaymentMethod = (options) => {
|
|
97
|
+
return (options.client ?? client).delete({
|
|
98
|
+
security: [
|
|
99
|
+
{
|
|
100
|
+
scheme: 'bearer',
|
|
101
|
+
type: 'http'
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
url: '/auth/billing/payment-method/{id}',
|
|
105
|
+
...options
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Sets the customer's default payment method used for invoices.
|
|
110
|
+
*/
|
|
111
|
+
export const updateDefaultPaymentMethod = (options) => {
|
|
112
|
+
return (options.client ?? client).patch({
|
|
113
|
+
security: [
|
|
114
|
+
{
|
|
115
|
+
scheme: 'bearer',
|
|
116
|
+
type: 'http'
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
url: '/auth/billing/payment-method/{id}',
|
|
120
|
+
...options
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Returns a page of the customer's invoices. This response is paginated.
|
|
125
|
+
*/
|
|
126
|
+
export const getInvoices = (options) => {
|
|
127
|
+
return (options?.client ?? client).get({
|
|
128
|
+
security: [
|
|
129
|
+
{
|
|
130
|
+
scheme: 'bearer',
|
|
131
|
+
type: 'http'
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
url: '/auth/billing/invoices',
|
|
135
|
+
...options
|
|
136
|
+
});
|
|
137
|
+
};
|