shoal-web-sdk 0.0.97 → 0.0.99

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 { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeployVersionData, DeployVersionError, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListInstallationBranchesData, ListInstallationRepositoriesData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, UploadNodeSourceZipData, UploadNodeSourceZipError, UploadNodeSourceZipResponse } from '../types.gen';
3
+ import type { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeployVersionData, DeployVersionError, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, UploadNodeSourceZipData, UploadNodeSourceZipError, UploadNodeSourceZipResponse } from '../types.gen';
4
4
  export type QueryKey<TOptions extends Options> = [
5
5
  Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
6
6
  _id: string;
@@ -751,3 +751,103 @@ export declare const deployVersionMutation: (options?: Partial<Options<DeployVer
751
751
  *
752
752
  */
753
753
  export declare const uploadNodeSourceZipMutation: (options?: Partial<Options<UploadNodeSourceZipData>>) => UseMutationOptions<UploadNodeSourceZipResponse, UploadNodeSourceZipError, Options<UploadNodeSourceZipData>>;
754
+ export declare const getBillingPlanQueryKey: (options: Options<GetBillingPlanData>) => [Pick<Options<GetBillingPlanData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
755
+ _id: string;
756
+ _infinite?: boolean;
757
+ tags?: ReadonlyArray<string>;
758
+ }];
759
+ /**
760
+ * Get the current billing plan for a space.
761
+ */
762
+ 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"> & {
763
+ _id: string;
764
+ _infinite?: boolean;
765
+ tags?: ReadonlyArray<string>;
766
+ }]>, "queryFn"> & {
767
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").BillingPlan, [Pick<Options<GetBillingPlanData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
768
+ _id: string;
769
+ _infinite?: boolean;
770
+ tags?: ReadonlyArray<string>;
771
+ }], never> | undefined;
772
+ } & {
773
+ queryKey: [Pick<Options<GetBillingPlanData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
774
+ _id: string;
775
+ _infinite?: boolean;
776
+ tags?: ReadonlyArray<string>;
777
+ }] & {
778
+ [dataTagSymbol]: import("../types.gen").BillingPlan;
779
+ [dataTagErrorSymbol]: Error;
780
+ };
781
+ };
782
+ /**
783
+ * Upgrade or downgrade the billing plan for a space.
784
+ */
785
+ export declare const updateBillingPlanMutation: (options?: Partial<Options<UpdateBillingPlanData>>) => UseMutationOptions<unknown, UpdateBillingPlanError, Options<UpdateBillingPlanData>>;
786
+ /**
787
+ * Create a Stripe SetupIntent to collect a payment method.
788
+ */
789
+ export declare const createSetupIntentMutation: (options?: Partial<Options<CreateSetupIntentData>>) => UseMutationOptions<CreateSetupIntentResponse, CreateSetupIntentError, Options<CreateSetupIntentData>>;
790
+ export declare const listPaymentMethodsQueryKey: (options: Options<ListPaymentMethodsData>) => [Pick<Options<ListPaymentMethodsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
791
+ _id: string;
792
+ _infinite?: boolean;
793
+ tags?: ReadonlyArray<string>;
794
+ }];
795
+ /**
796
+ * List all saved payment methods for a space.
797
+ */
798
+ 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"> & {
799
+ _id: string;
800
+ _infinite?: boolean;
801
+ tags?: ReadonlyArray<string>;
802
+ }]>, "queryFn"> & {
803
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").PaymentMethod[], [Pick<Options<ListPaymentMethodsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
804
+ _id: string;
805
+ _infinite?: boolean;
806
+ tags?: ReadonlyArray<string>;
807
+ }], never> | undefined;
808
+ } & {
809
+ queryKey: [Pick<Options<ListPaymentMethodsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
810
+ _id: string;
811
+ _infinite?: boolean;
812
+ tags?: ReadonlyArray<string>;
813
+ }] & {
814
+ [dataTagSymbol]: import("../types.gen").PaymentMethod[];
815
+ [dataTagErrorSymbol]: Error;
816
+ };
817
+ };
818
+ /**
819
+ * Remove a saved payment method.
820
+ */
821
+ export declare const removePaymentMethodMutation: (options?: Partial<Options<RemovePaymentMethodData>>) => UseMutationOptions<RemovePaymentMethodResponse, RemovePaymentMethodError, Options<RemovePaymentMethodData>>;
822
+ /**
823
+ * Set a payment method as the default for invoices.
824
+ */
825
+ export declare const setDefaultPaymentMethodMutation: (options?: Partial<Options<SetDefaultPaymentMethodData>>) => UseMutationOptions<SetDefaultPaymentMethodResponse, SetDefaultPaymentMethodError, Options<SetDefaultPaymentMethodData>>;
826
+ export declare const getBillingUsageQueryKey: (options: Options<GetBillingUsageData>) => [Pick<Options<GetBillingUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
827
+ _id: string;
828
+ _infinite?: boolean;
829
+ tags?: ReadonlyArray<string>;
830
+ }];
831
+ /**
832
+ * Get metered cloud usage for the current billing period.
833
+ */
834
+ 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"> & {
835
+ _id: string;
836
+ _infinite?: boolean;
837
+ tags?: ReadonlyArray<string>;
838
+ }]>, "queryFn"> & {
839
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").BillingUsage, [Pick<Options<GetBillingUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
840
+ _id: string;
841
+ _infinite?: boolean;
842
+ tags?: ReadonlyArray<string>;
843
+ }], never> | undefined;
844
+ } & {
845
+ queryKey: [Pick<Options<GetBillingUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
846
+ _id: string;
847
+ _infinite?: boolean;
848
+ tags?: ReadonlyArray<string>;
849
+ }] & {
850
+ [dataTagSymbol]: import("../types.gen").BillingUsage;
851
+ [dataTagErrorSymbol]: Error;
852
+ };
853
+ };
@@ -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 { createEnvironment, createProject, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listInstallationBranches, listInstallationRepositories, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, rejectSpaceInvite, requestAccountPasswordReset, revokeSpaceInvite, updateConnectedAppToken, updateGraphState, updateUsername, updateUserProfile, uploadNodeSourceZip } from '../sdk.gen';
4
+ import { createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateGraphState, updateUsername, updateUserProfile, uploadNodeSourceZip } 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) {
@@ -844,3 +844,121 @@ export const uploadNodeSourceZipMutation = (options) => {
844
844
  };
845
845
  return mutationOptions;
846
846
  };
847
+ export const getBillingPlanQueryKey = (options) => createQueryKey('getBillingPlan', options);
848
+ /**
849
+ * Get the current billing plan for a space.
850
+ */
851
+ export const getBillingPlanOptions = (options) => {
852
+ return queryOptions({
853
+ queryFn: async ({ queryKey, signal }) => {
854
+ const { data } = await getBillingPlan({
855
+ ...options,
856
+ ...queryKey[0],
857
+ signal,
858
+ throwOnError: true
859
+ });
860
+ return data;
861
+ },
862
+ queryKey: getBillingPlanQueryKey(options)
863
+ });
864
+ };
865
+ /**
866
+ * Upgrade or downgrade the billing plan for a space.
867
+ */
868
+ export const updateBillingPlanMutation = (options) => {
869
+ const mutationOptions = {
870
+ mutationFn: async (fnOptions) => {
871
+ const { data } = await updateBillingPlan({
872
+ ...options,
873
+ ...fnOptions,
874
+ throwOnError: true
875
+ });
876
+ return data;
877
+ }
878
+ };
879
+ return mutationOptions;
880
+ };
881
+ /**
882
+ * Create a Stripe SetupIntent to collect a payment method.
883
+ */
884
+ export const createSetupIntentMutation = (options) => {
885
+ const mutationOptions = {
886
+ mutationFn: async (fnOptions) => {
887
+ const { data } = await createSetupIntent({
888
+ ...options,
889
+ ...fnOptions,
890
+ throwOnError: true
891
+ });
892
+ return data;
893
+ }
894
+ };
895
+ return mutationOptions;
896
+ };
897
+ export const listPaymentMethodsQueryKey = (options) => createQueryKey('listPaymentMethods', options);
898
+ /**
899
+ * List all saved payment methods for a space.
900
+ */
901
+ export const listPaymentMethodsOptions = (options) => {
902
+ return queryOptions({
903
+ queryFn: async ({ queryKey, signal }) => {
904
+ const { data } = await listPaymentMethods({
905
+ ...options,
906
+ ...queryKey[0],
907
+ signal,
908
+ throwOnError: true
909
+ });
910
+ return data;
911
+ },
912
+ queryKey: listPaymentMethodsQueryKey(options)
913
+ });
914
+ };
915
+ /**
916
+ * Remove a saved payment method.
917
+ */
918
+ export const removePaymentMethodMutation = (options) => {
919
+ const mutationOptions = {
920
+ mutationFn: async (fnOptions) => {
921
+ const { data } = await removePaymentMethod({
922
+ ...options,
923
+ ...fnOptions,
924
+ throwOnError: true
925
+ });
926
+ return data;
927
+ }
928
+ };
929
+ return mutationOptions;
930
+ };
931
+ /**
932
+ * Set a payment method as the default for invoices.
933
+ */
934
+ export const setDefaultPaymentMethodMutation = (options) => {
935
+ const mutationOptions = {
936
+ mutationFn: async (fnOptions) => {
937
+ const { data } = await setDefaultPaymentMethod({
938
+ ...options,
939
+ ...fnOptions,
940
+ throwOnError: true
941
+ });
942
+ return data;
943
+ }
944
+ };
945
+ return mutationOptions;
946
+ };
947
+ export const getBillingUsageQueryKey = (options) => createQueryKey('getBillingUsage', options);
948
+ /**
949
+ * Get metered cloud usage for the current billing period.
950
+ */
951
+ export const getBillingUsageOptions = (options) => {
952
+ return queryOptions({
953
+ queryFn: async ({ queryKey, signal }) => {
954
+ const { data } = await getBillingUsage({
955
+ ...options,
956
+ ...queryKey[0],
957
+ signal,
958
+ throwOnError: true
959
+ });
960
+ return data;
961
+ },
962
+ queryKey: getBillingUsageQueryKey(options)
963
+ });
964
+ };
@@ -1,5 +1,5 @@
1
1
  import { type Client, type Options as Options2, type TDataShape } from './client';
2
- import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, UploadNodeSourceZipData, UploadNodeSourceZipErrors, UploadNodeSourceZipResponses } from './types.gen';
2
+ import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, UploadNodeSourceZipData, UploadNodeSourceZipErrors, UploadNodeSourceZipResponses } 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
@@ -156,3 +156,31 @@ export declare const deployVersion: <ThrowOnError extends boolean = false>(optio
156
156
  *
157
157
  */
158
158
  export declare const uploadNodeSourceZip: <ThrowOnError extends boolean = false>(options: Options<UploadNodeSourceZipData, ThrowOnError>) => import("./client").RequestResult<UploadNodeSourceZipResponses, UploadNodeSourceZipErrors, ThrowOnError, "fields">;
159
+ /**
160
+ * Get the current billing plan for a space.
161
+ */
162
+ export declare const getBillingPlan: <ThrowOnError extends boolean = false>(options: Options<GetBillingPlanData, ThrowOnError>) => import("./client").RequestResult<GetBillingPlanResponses, GetBillingPlanErrors, ThrowOnError, "fields">;
163
+ /**
164
+ * Upgrade or downgrade the billing plan for a space.
165
+ */
166
+ export declare const updateBillingPlan: <ThrowOnError extends boolean = false>(options: Options<UpdateBillingPlanData, ThrowOnError>) => import("./client").RequestResult<UpdateBillingPlanResponses, UpdateBillingPlanErrors, ThrowOnError, "fields">;
167
+ /**
168
+ * Create a Stripe SetupIntent to collect a payment method.
169
+ */
170
+ export declare const createSetupIntent: <ThrowOnError extends boolean = false>(options: Options<CreateSetupIntentData, ThrowOnError>) => import("./client").RequestResult<CreateSetupIntentResponses, CreateSetupIntentErrors, ThrowOnError, "fields">;
171
+ /**
172
+ * List all saved payment methods for a space.
173
+ */
174
+ export declare const listPaymentMethods: <ThrowOnError extends boolean = false>(options: Options<ListPaymentMethodsData, ThrowOnError>) => import("./client").RequestResult<ListPaymentMethodsResponses, ListPaymentMethodsErrors, ThrowOnError, "fields">;
175
+ /**
176
+ * Remove a saved payment method.
177
+ */
178
+ export declare const removePaymentMethod: <ThrowOnError extends boolean = false>(options: Options<RemovePaymentMethodData, ThrowOnError>) => import("./client").RequestResult<RemovePaymentMethodResponses, RemovePaymentMethodErrors, ThrowOnError, "fields">;
179
+ /**
180
+ * Set a payment method as the default for invoices.
181
+ */
182
+ export declare const setDefaultPaymentMethod: <ThrowOnError extends boolean = false>(options: Options<SetDefaultPaymentMethodData, ThrowOnError>) => import("./client").RequestResult<SetDefaultPaymentMethodResponses, SetDefaultPaymentMethodErrors, ThrowOnError, "fields">;
183
+ /**
184
+ * Get metered cloud usage for the current billing period.
185
+ */
186
+ export declare const getBillingUsage: <ThrowOnError extends boolean = false>(options: Options<GetBillingUsageData, ThrowOnError>) => import("./client").RequestResult<GetBillingUsageResponses, GetBillingUsageErrors, ThrowOnError, "fields">;
@@ -566,3 +566,112 @@ export const uploadNodeSourceZip = (options) => {
566
566
  }
567
567
  });
568
568
  };
569
+ /**
570
+ * Get the current billing plan for a space.
571
+ */
572
+ export const getBillingPlan = (options) => {
573
+ return (options.client ?? client).get({
574
+ security: [
575
+ {
576
+ scheme: 'bearer',
577
+ type: 'http'
578
+ }
579
+ ],
580
+ url: '/auth/{spaceHandle}/billing/plan',
581
+ ...options
582
+ });
583
+ };
584
+ /**
585
+ * Upgrade or downgrade the billing plan for a space.
586
+ */
587
+ export const updateBillingPlan = (options) => {
588
+ return (options.client ?? client).post({
589
+ security: [
590
+ {
591
+ scheme: 'bearer',
592
+ type: 'http'
593
+ }
594
+ ],
595
+ url: '/auth/{spaceHandle}/billing/plan',
596
+ ...options,
597
+ headers: {
598
+ 'Content-Type': 'application/json',
599
+ ...options.headers
600
+ }
601
+ });
602
+ };
603
+ /**
604
+ * Create a Stripe SetupIntent to collect a payment method.
605
+ */
606
+ export const createSetupIntent = (options) => {
607
+ return (options.client ?? client).post({
608
+ security: [
609
+ {
610
+ scheme: 'bearer',
611
+ type: 'http'
612
+ }
613
+ ],
614
+ url: '/auth/{spaceHandle}/billing/setup-intent',
615
+ ...options
616
+ });
617
+ };
618
+ /**
619
+ * List all saved payment methods for a space.
620
+ */
621
+ export const listPaymentMethods = (options) => {
622
+ return (options.client ?? client).get({
623
+ security: [
624
+ {
625
+ scheme: 'bearer',
626
+ type: 'http'
627
+ }
628
+ ],
629
+ url: '/auth/{spaceHandle}/billing/payment-methods',
630
+ ...options
631
+ });
632
+ };
633
+ /**
634
+ * Remove a saved payment method.
635
+ */
636
+ export const removePaymentMethod = (options) => {
637
+ return (options.client ?? client).delete({
638
+ security: [
639
+ {
640
+ scheme: 'bearer',
641
+ type: 'http'
642
+ }
643
+ ],
644
+ url: '/auth/{spaceHandle}/billing/payment-methods/{pmId}',
645
+ ...options
646
+ });
647
+ };
648
+ /**
649
+ * Set a payment method as the default for invoices.
650
+ */
651
+ export const setDefaultPaymentMethod = (options) => {
652
+ return (options.client ?? client).patch({
653
+ security: [
654
+ {
655
+ scheme: 'bearer',
656
+ type: 'http'
657
+ }
658
+ ],
659
+ url: '/auth/{spaceHandle}/billing/payment-methods/{pmId}/default',
660
+ ...options
661
+ });
662
+ };
663
+ /**
664
+ * Get metered cloud usage for the current billing period.
665
+ */
666
+ export const getBillingUsage = (options) => {
667
+ return (options.client ?? client).get({
668
+ security: [
669
+ {
670
+ scheme: 'bearer',
671
+ type: 'http'
672
+ }
673
+ ],
674
+ url: '/auth/{spaceHandle}/billing/usage',
675
+ ...options
676
+ });
677
+ };
@@ -317,6 +317,10 @@ export type ContainerNodeProps = {
317
317
  concurrency?: number;
318
318
  allowUnauthenticated?: boolean;
319
319
  uri: string;
320
+ serviceName: string;
321
+ env?: {
322
+ [key: string]: string;
323
+ };
320
324
  };
321
325
  export type Region = 'africa-south1' | 'asia-east1' | 'asia-east2' | 'asia-northeast1' | 'asia-northeast2' | 'asia-northeast3' | 'asia-south1' | 'asia-southeast1' | 'asia-southeast2' | 'australia-southeast1' | 'europe-north1' | 'europe-west1' | 'europe-west2' | 'europe-west3' | 'europe-west4' | 'europe-west6' | 'northamerica-northeast1' | 'northamerica-northeast2' | 'southamerica-east1' | 'southamerica-west1' | 'us-central1' | 'us-east1' | 'us-east4' | 'us-west1' | 'us-west2' | 'us-west3' | 'us-west4';
322
326
  export type Cpu = '1' | '2' | '4' | '6' | '8' | '16' | '32';
@@ -355,6 +359,31 @@ export type NodeSourceUploadResponse = {
355
359
  */
356
360
  contentType?: string;
357
361
  };
362
+ export type BillingPlan = {
363
+ tier: 'free' | 'hobby' | 'pro';
364
+ interval?: 'monthly' | 'annual';
365
+ seatCount: number;
366
+ currentPeriodEnd?: string;
367
+ pendingDowngrade?: 'free' | 'hobby' | 'pro';
368
+ entitlements: Array<string>;
369
+ };
370
+ export type UpdatePlanRequest = {
371
+ priceId: string;
372
+ };
373
+ export type PaymentMethod = {
374
+ id: string;
375
+ brand: string;
376
+ last4: string;
377
+ expMonth: number;
378
+ expYear: number;
379
+ isDefault: boolean;
380
+ };
381
+ export type SetupIntentResponse = {
382
+ clientSecret: string;
383
+ };
384
+ export type BillingUsage = {
385
+ totalUnits: number;
386
+ };
358
387
  /**
359
388
  * Expiry query.
360
389
  */
@@ -1831,3 +1860,245 @@ export type UploadNodeSourceZipResponses = {
1831
1860
  201: NodeSourceUploadResponse;
1832
1861
  };
1833
1862
  export type UploadNodeSourceZipResponse = UploadNodeSourceZipResponses[keyof UploadNodeSourceZipResponses];
1863
+ export type GetBillingPlanData = {
1864
+ body?: never;
1865
+ path: {
1866
+ /**
1867
+ * The space handle. This must be globally unique.
1868
+ */
1869
+ spaceHandle: string;
1870
+ };
1871
+ query?: never;
1872
+ url: '/auth/{spaceHandle}/billing/plan';
1873
+ };
1874
+ export type GetBillingPlanErrors = {
1875
+ /**
1876
+ * Unauthorised user.
1877
+ */
1878
+ 401: ErrorResponse;
1879
+ /**
1880
+ * Invalid credentials.
1881
+ */
1882
+ 403: ErrorResponse;
1883
+ /**
1884
+ * Unexpected error.
1885
+ */
1886
+ 500: ErrorResponse;
1887
+ };
1888
+ export type GetBillingPlanError = GetBillingPlanErrors[keyof GetBillingPlanErrors];
1889
+ export type GetBillingPlanResponses = {
1890
+ /**
1891
+ * The space's current billing plan.
1892
+ */
1893
+ 200: BillingPlan;
1894
+ };
1895
+ export type GetBillingPlanResponse = GetBillingPlanResponses[keyof GetBillingPlanResponses];
1896
+ export type UpdateBillingPlanData = {
1897
+ body: UpdatePlanRequest;
1898
+ path: {
1899
+ /**
1900
+ * The space handle. This must be globally unique.
1901
+ */
1902
+ spaceHandle: string;
1903
+ };
1904
+ query?: never;
1905
+ url: '/auth/{spaceHandle}/billing/plan';
1906
+ };
1907
+ export type UpdateBillingPlanErrors = {
1908
+ /**
1909
+ * Bad request.
1910
+ */
1911
+ 400: ErrorResponse;
1912
+ /**
1913
+ * Unauthorised user.
1914
+ */
1915
+ 401: ErrorResponse;
1916
+ /**
1917
+ * Invalid credentials.
1918
+ */
1919
+ 403: ErrorResponse;
1920
+ /**
1921
+ * Unexpected error.
1922
+ */
1923
+ 500: ErrorResponse;
1924
+ };
1925
+ export type UpdateBillingPlanError = UpdateBillingPlanErrors[keyof UpdateBillingPlanErrors];
1926
+ export type UpdateBillingPlanResponses = {
1927
+ /**
1928
+ * Plan update accepted.
1929
+ */
1930
+ 202: unknown;
1931
+ };
1932
+ export type CreateSetupIntentData = {
1933
+ body?: never;
1934
+ path: {
1935
+ /**
1936
+ * The space handle. This must be globally unique.
1937
+ */
1938
+ spaceHandle: string;
1939
+ };
1940
+ query?: never;
1941
+ url: '/auth/{spaceHandle}/billing/setup-intent';
1942
+ };
1943
+ export type CreateSetupIntentErrors = {
1944
+ /**
1945
+ * Unauthorised user.
1946
+ */
1947
+ 401: ErrorResponse;
1948
+ /**
1949
+ * Invalid credentials.
1950
+ */
1951
+ 403: ErrorResponse;
1952
+ /**
1953
+ * Unexpected error.
1954
+ */
1955
+ 500: ErrorResponse;
1956
+ };
1957
+ export type CreateSetupIntentError = CreateSetupIntentErrors[keyof CreateSetupIntentErrors];
1958
+ export type CreateSetupIntentResponses = {
1959
+ /**
1960
+ * SetupIntent client secret.
1961
+ */
1962
+ 200: SetupIntentResponse;
1963
+ };
1964
+ export type CreateSetupIntentResponse = CreateSetupIntentResponses[keyof CreateSetupIntentResponses];
1965
+ export type ListPaymentMethodsData = {
1966
+ body?: never;
1967
+ path: {
1968
+ /**
1969
+ * The space handle. This must be globally unique.
1970
+ */
1971
+ spaceHandle: string;
1972
+ };
1973
+ query?: never;
1974
+ url: '/auth/{spaceHandle}/billing/payment-methods';
1975
+ };
1976
+ export type ListPaymentMethodsErrors = {
1977
+ /**
1978
+ * Unauthorised user.
1979
+ */
1980
+ 401: ErrorResponse;
1981
+ /**
1982
+ * Invalid credentials.
1983
+ */
1984
+ 403: ErrorResponse;
1985
+ /**
1986
+ * Unexpected error.
1987
+ */
1988
+ 500: ErrorResponse;
1989
+ };
1990
+ export type ListPaymentMethodsError = ListPaymentMethodsErrors[keyof ListPaymentMethodsErrors];
1991
+ export type ListPaymentMethodsResponses = {
1992
+ /**
1993
+ * A list of payment methods.
1994
+ */
1995
+ 200: Array<PaymentMethod>;
1996
+ };
1997
+ export type ListPaymentMethodsResponse = ListPaymentMethodsResponses[keyof ListPaymentMethodsResponses];
1998
+ export type RemovePaymentMethodData = {
1999
+ body?: never;
2000
+ path: {
2001
+ /**
2002
+ * The space handle. This must be globally unique.
2003
+ */
2004
+ spaceHandle: string;
2005
+ /**
2006
+ * The payment method ID to remove.
2007
+ */
2008
+ pmId: string;
2009
+ };
2010
+ query?: never;
2011
+ url: '/auth/{spaceHandle}/billing/payment-methods/{pmId}';
2012
+ };
2013
+ export type RemovePaymentMethodErrors = {
2014
+ /**
2015
+ * Unauthorised user.
2016
+ */
2017
+ 401: ErrorResponse;
2018
+ /**
2019
+ * Invalid credentials.
2020
+ */
2021
+ 403: ErrorResponse;
2022
+ /**
2023
+ * Unexpected error.
2024
+ */
2025
+ 500: ErrorResponse;
2026
+ };
2027
+ export type RemovePaymentMethodError = RemovePaymentMethodErrors[keyof RemovePaymentMethodErrors];
2028
+ export type RemovePaymentMethodResponses = {
2029
+ /**
2030
+ * Payment method removed.
2031
+ */
2032
+ 204: void;
2033
+ };
2034
+ export type RemovePaymentMethodResponse = RemovePaymentMethodResponses[keyof RemovePaymentMethodResponses];
2035
+ export type SetDefaultPaymentMethodData = {
2036
+ body?: never;
2037
+ path: {
2038
+ /**
2039
+ * The space handle. This must be globally unique.
2040
+ */
2041
+ spaceHandle: string;
2042
+ /**
2043
+ * The payment method ID to set as default.
2044
+ */
2045
+ pmId: string;
2046
+ };
2047
+ query?: never;
2048
+ url: '/auth/{spaceHandle}/billing/payment-methods/{pmId}/default';
2049
+ };
2050
+ export type SetDefaultPaymentMethodErrors = {
2051
+ /**
2052
+ * Unauthorised user.
2053
+ */
2054
+ 401: ErrorResponse;
2055
+ /**
2056
+ * Invalid credentials.
2057
+ */
2058
+ 403: ErrorResponse;
2059
+ /**
2060
+ * Unexpected error.
2061
+ */
2062
+ 500: ErrorResponse;
2063
+ };
2064
+ export type SetDefaultPaymentMethodError = SetDefaultPaymentMethodErrors[keyof SetDefaultPaymentMethodErrors];
2065
+ export type SetDefaultPaymentMethodResponses = {
2066
+ /**
2067
+ * Default payment method updated.
2068
+ */
2069
+ 204: void;
2070
+ };
2071
+ export type SetDefaultPaymentMethodResponse = SetDefaultPaymentMethodResponses[keyof SetDefaultPaymentMethodResponses];
2072
+ export type GetBillingUsageData = {
2073
+ body?: never;
2074
+ path: {
2075
+ /**
2076
+ * The space handle. This must be globally unique.
2077
+ */
2078
+ spaceHandle: string;
2079
+ };
2080
+ query?: never;
2081
+ url: '/auth/{spaceHandle}/billing/usage';
2082
+ };
2083
+ export type GetBillingUsageErrors = {
2084
+ /**
2085
+ * Unauthorised user.
2086
+ */
2087
+ 401: ErrorResponse;
2088
+ /**
2089
+ * Invalid credentials.
2090
+ */
2091
+ 403: ErrorResponse;
2092
+ /**
2093
+ * Unexpected error.
2094
+ */
2095
+ 500: ErrorResponse;
2096
+ };
2097
+ export type GetBillingUsageError = GetBillingUsageErrors[keyof GetBillingUsageErrors];
2098
+ export type GetBillingUsageResponses = {
2099
+ /**
2100
+ * Current billing period usage.
2101
+ */
2102
+ 200: BillingUsage;
2103
+ };
2104
+ export type GetBillingUsageResponse = GetBillingUsageResponses[keyof GetBillingUsageResponses];
@@ -551,6 +551,8 @@ export declare const zContainerNodeProps: z.ZodObject<{
551
551
  concurrency: z.ZodOptional<z.ZodInt>;
552
552
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
553
553
  uri: z.ZodString;
554
+ serviceName: z.ZodString;
555
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
554
556
  }, z.core.$strip>;
555
557
  export declare const zCronJobNodeProps: z.ZodObject<{
556
558
  cronTab: z.ZodOptional<z.ZodString>;
@@ -680,6 +682,8 @@ export declare const zNode: z.ZodObject<{
680
682
  concurrency: z.ZodOptional<z.ZodInt>;
681
683
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
682
684
  uri: z.ZodString;
685
+ serviceName: z.ZodString;
686
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
683
687
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
684
688
  typ: z.ZodLiteral<"cronjob">;
685
689
  }, z.core.$strip>, z.ZodObject<{
@@ -822,6 +826,8 @@ export declare const zNodes: z.ZodObject<{
822
826
  concurrency: z.ZodOptional<z.ZodInt>;
823
827
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
824
828
  uri: z.ZodString;
829
+ serviceName: z.ZodString;
830
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
825
831
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
826
832
  typ: z.ZodLiteral<"cronjob">;
827
833
  }, z.core.$strip>, z.ZodObject<{
@@ -966,6 +972,8 @@ export declare const zGraph: z.ZodObject<{
966
972
  concurrency: z.ZodOptional<z.ZodInt>;
967
973
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
968
974
  uri: z.ZodString;
975
+ serviceName: z.ZodString;
976
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
969
977
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
970
978
  typ: z.ZodLiteral<"cronjob">;
971
979
  }, z.core.$strip>, z.ZodObject<{
@@ -1004,6 +1012,42 @@ export declare const zNodeSourceUploadResponse: z.ZodObject<{
1004
1012
  bucketPath: z.ZodString;
1005
1013
  contentType: z.ZodOptional<z.ZodString>;
1006
1014
  }, z.core.$strip>;
1015
+ export declare const zBillingPlan: z.ZodObject<{
1016
+ tier: z.ZodEnum<{
1017
+ free: "free";
1018
+ hobby: "hobby";
1019
+ pro: "pro";
1020
+ }>;
1021
+ interval: z.ZodOptional<z.ZodEnum<{
1022
+ monthly: "monthly";
1023
+ annual: "annual";
1024
+ }>>;
1025
+ seatCount: z.ZodCoercedBigInt<unknown>;
1026
+ currentPeriodEnd: z.ZodOptional<z.ZodISODateTime>;
1027
+ pendingDowngrade: z.ZodOptional<z.ZodEnum<{
1028
+ free: "free";
1029
+ hobby: "hobby";
1030
+ pro: "pro";
1031
+ }>>;
1032
+ entitlements: z.ZodArray<z.ZodString>;
1033
+ }, z.core.$strip>;
1034
+ export declare const zUpdatePlanRequest: z.ZodObject<{
1035
+ priceId: z.ZodString;
1036
+ }, z.core.$strip>;
1037
+ export declare const zPaymentMethod: z.ZodObject<{
1038
+ id: z.ZodString;
1039
+ brand: z.ZodString;
1040
+ last4: z.ZodString;
1041
+ expMonth: z.ZodCoercedBigInt<unknown>;
1042
+ expYear: z.ZodCoercedBigInt<unknown>;
1043
+ isDefault: z.ZodBoolean;
1044
+ }, z.core.$strip>;
1045
+ export declare const zSetupIntentResponse: z.ZodObject<{
1046
+ clientSecret: z.ZodString;
1047
+ }, z.core.$strip>;
1048
+ export declare const zBillingUsage: z.ZodObject<{
1049
+ totalUnits: z.ZodCoercedBigInt<unknown>;
1050
+ }, z.core.$strip>;
1007
1051
  /**
1008
1052
  * Expiry query.
1009
1053
  */
@@ -1211,6 +1255,8 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
1211
1255
  concurrency: z.ZodOptional<z.ZodInt>;
1212
1256
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1213
1257
  uri: z.ZodString;
1258
+ serviceName: z.ZodString;
1259
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1214
1260
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1215
1261
  typ: z.ZodLiteral<"cronjob">;
1216
1262
  }, z.core.$strip>, z.ZodObject<{
@@ -1931,6 +1977,8 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
1931
1977
  concurrency: z.ZodOptional<z.ZodInt>;
1932
1978
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1933
1979
  uri: z.ZodString;
1980
+ serviceName: z.ZodString;
1981
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1934
1982
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1935
1983
  typ: z.ZodLiteral<"cronjob">;
1936
1984
  }, z.core.$strip>, z.ZodObject<{
@@ -2075,6 +2123,8 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
2075
2123
  concurrency: z.ZodOptional<z.ZodInt>;
2076
2124
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
2077
2125
  uri: z.ZodString;
2126
+ serviceName: z.ZodString;
2127
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2078
2128
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
2079
2129
  typ: z.ZodLiteral<"cronjob">;
2080
2130
  }, z.core.$strip>, z.ZodObject<{
@@ -2147,3 +2197,109 @@ export declare const zUploadNodeSourceZipResponse: z.ZodObject<{
2147
2197
  bucketPath: z.ZodString;
2148
2198
  contentType: z.ZodOptional<z.ZodString>;
2149
2199
  }, z.core.$strip>;
2200
+ export declare const zGetBillingPlanData: z.ZodObject<{
2201
+ body: z.ZodOptional<z.ZodNever>;
2202
+ path: z.ZodObject<{
2203
+ spaceHandle: z.ZodString;
2204
+ }, z.core.$strip>;
2205
+ query: z.ZodOptional<z.ZodNever>;
2206
+ }, z.core.$strip>;
2207
+ /**
2208
+ * The space's current billing plan.
2209
+ */
2210
+ export declare const zGetBillingPlanResponse: z.ZodObject<{
2211
+ tier: z.ZodEnum<{
2212
+ free: "free";
2213
+ hobby: "hobby";
2214
+ pro: "pro";
2215
+ }>;
2216
+ interval: z.ZodOptional<z.ZodEnum<{
2217
+ monthly: "monthly";
2218
+ annual: "annual";
2219
+ }>>;
2220
+ seatCount: z.ZodCoercedBigInt<unknown>;
2221
+ currentPeriodEnd: z.ZodOptional<z.ZodISODateTime>;
2222
+ pendingDowngrade: z.ZodOptional<z.ZodEnum<{
2223
+ free: "free";
2224
+ hobby: "hobby";
2225
+ pro: "pro";
2226
+ }>>;
2227
+ entitlements: z.ZodArray<z.ZodString>;
2228
+ }, z.core.$strip>;
2229
+ export declare const zUpdateBillingPlanData: z.ZodObject<{
2230
+ body: z.ZodObject<{
2231
+ priceId: z.ZodString;
2232
+ }, z.core.$strip>;
2233
+ path: z.ZodObject<{
2234
+ spaceHandle: z.ZodString;
2235
+ }, z.core.$strip>;
2236
+ query: z.ZodOptional<z.ZodNever>;
2237
+ }, z.core.$strip>;
2238
+ export declare const zCreateSetupIntentData: z.ZodObject<{
2239
+ body: z.ZodOptional<z.ZodNever>;
2240
+ path: z.ZodObject<{
2241
+ spaceHandle: z.ZodString;
2242
+ }, z.core.$strip>;
2243
+ query: z.ZodOptional<z.ZodNever>;
2244
+ }, z.core.$strip>;
2245
+ /**
2246
+ * SetupIntent client secret.
2247
+ */
2248
+ export declare const zCreateSetupIntentResponse: z.ZodObject<{
2249
+ clientSecret: z.ZodString;
2250
+ }, z.core.$strip>;
2251
+ export declare const zListPaymentMethodsData: z.ZodObject<{
2252
+ body: z.ZodOptional<z.ZodNever>;
2253
+ path: z.ZodObject<{
2254
+ spaceHandle: z.ZodString;
2255
+ }, z.core.$strip>;
2256
+ query: z.ZodOptional<z.ZodNever>;
2257
+ }, z.core.$strip>;
2258
+ /**
2259
+ * A list of payment methods.
2260
+ */
2261
+ export declare const zListPaymentMethodsResponse: z.ZodArray<z.ZodObject<{
2262
+ id: z.ZodString;
2263
+ brand: z.ZodString;
2264
+ last4: z.ZodString;
2265
+ expMonth: z.ZodCoercedBigInt<unknown>;
2266
+ expYear: z.ZodCoercedBigInt<unknown>;
2267
+ isDefault: z.ZodBoolean;
2268
+ }, z.core.$strip>>;
2269
+ export declare const zRemovePaymentMethodData: z.ZodObject<{
2270
+ body: z.ZodOptional<z.ZodNever>;
2271
+ path: z.ZodObject<{
2272
+ spaceHandle: z.ZodString;
2273
+ pmId: z.ZodString;
2274
+ }, z.core.$strip>;
2275
+ query: z.ZodOptional<z.ZodNever>;
2276
+ }, z.core.$strip>;
2277
+ /**
2278
+ * Payment method removed.
2279
+ */
2280
+ export declare const zRemovePaymentMethodResponse: z.ZodVoid;
2281
+ export declare const zSetDefaultPaymentMethodData: z.ZodObject<{
2282
+ body: z.ZodOptional<z.ZodNever>;
2283
+ path: z.ZodObject<{
2284
+ spaceHandle: z.ZodString;
2285
+ pmId: z.ZodString;
2286
+ }, z.core.$strip>;
2287
+ query: z.ZodOptional<z.ZodNever>;
2288
+ }, z.core.$strip>;
2289
+ /**
2290
+ * Default payment method updated.
2291
+ */
2292
+ export declare const zSetDefaultPaymentMethodResponse: z.ZodVoid;
2293
+ export declare const zGetBillingUsageData: z.ZodObject<{
2294
+ body: z.ZodOptional<z.ZodNever>;
2295
+ path: z.ZodObject<{
2296
+ spaceHandle: z.ZodString;
2297
+ }, z.core.$strip>;
2298
+ query: z.ZodOptional<z.ZodNever>;
2299
+ }, z.core.$strip>;
2300
+ /**
2301
+ * Current billing period usage.
2302
+ */
2303
+ export declare const zGetBillingUsageResponse: z.ZodObject<{
2304
+ totalUnits: z.ZodCoercedBigInt<unknown>;
2305
+ }, z.core.$strip>;
@@ -351,7 +351,9 @@ export const zContainerNodeProps = z.object({
351
351
  minInstances: z.optional(z.int()),
352
352
  concurrency: z.optional(z.int()),
353
353
  allowUnauthenticated: z.optional(z.boolean()),
354
- uri: z.string()
354
+ uri: z.string(),
355
+ serviceName: z.string(),
356
+ env: z.optional(z.record(z.string(), z.string()))
355
357
  });
356
358
  export const zCronJobNodeProps = z.object({
357
359
  cronTab: z.optional(z.string())
@@ -427,6 +429,42 @@ export const zNodeSourceUploadResponse = z.object({
427
429
  bucketPath: z.string(),
428
430
  contentType: z.optional(z.string())
429
431
  });
432
+ export const zBillingPlan = z.object({
433
+ tier: z.enum([
434
+ 'free',
435
+ 'hobby',
436
+ 'pro'
437
+ ]),
438
+ interval: z.optional(z.enum([
439
+ 'monthly',
440
+ 'annual'
441
+ ])),
442
+ seatCount: z.coerce.bigint(),
443
+ currentPeriodEnd: z.optional(z.iso.datetime()),
444
+ pendingDowngrade: z.optional(z.enum([
445
+ 'free',
446
+ 'hobby',
447
+ 'pro'
448
+ ])),
449
+ entitlements: z.array(z.string())
450
+ });
451
+ export const zUpdatePlanRequest = z.object({
452
+ priceId: z.string()
453
+ });
454
+ export const zPaymentMethod = z.object({
455
+ id: z.string(),
456
+ brand: z.string(),
457
+ last4: z.string(),
458
+ expMonth: z.coerce.bigint(),
459
+ expYear: z.coerce.bigint(),
460
+ isDefault: z.boolean()
461
+ });
462
+ export const zSetupIntentResponse = z.object({
463
+ clientSecret: z.string()
464
+ });
465
+ export const zBillingUsage = z.object({
466
+ totalUnits: z.coerce.bigint()
467
+ });
430
468
  /**
431
469
  * Expiry query.
432
470
  */
@@ -874,3 +912,78 @@ export const zUploadNodeSourceZipData = z.object({
874
912
  * Source ZIP uploaded successfully.
875
913
  */
876
914
  export const zUploadNodeSourceZipResponse = zNodeSourceUploadResponse;
915
+ export const zGetBillingPlanData = z.object({
916
+ body: z.optional(z.never()),
917
+ path: z.object({
918
+ spaceHandle: z.string()
919
+ }),
920
+ query: z.optional(z.never())
921
+ });
922
+ /**
923
+ * The space's current billing plan.
924
+ */
925
+ export const zGetBillingPlanResponse = zBillingPlan;
926
+ export const zUpdateBillingPlanData = z.object({
927
+ body: zUpdatePlanRequest,
928
+ path: z.object({
929
+ spaceHandle: z.string()
930
+ }),
931
+ query: z.optional(z.never())
932
+ });
933
+ export const zCreateSetupIntentData = z.object({
934
+ body: z.optional(z.never()),
935
+ path: z.object({
936
+ spaceHandle: z.string()
937
+ }),
938
+ query: z.optional(z.never())
939
+ });
940
+ /**
941
+ * SetupIntent client secret.
942
+ */
943
+ export const zCreateSetupIntentResponse = zSetupIntentResponse;
944
+ export const zListPaymentMethodsData = z.object({
945
+ body: z.optional(z.never()),
946
+ path: z.object({
947
+ spaceHandle: z.string()
948
+ }),
949
+ query: z.optional(z.never())
950
+ });
951
+ /**
952
+ * A list of payment methods.
953
+ */
954
+ export const zListPaymentMethodsResponse = z.array(zPaymentMethod);
955
+ export const zRemovePaymentMethodData = z.object({
956
+ body: z.optional(z.never()),
957
+ path: z.object({
958
+ spaceHandle: z.string(),
959
+ pmId: z.string()
960
+ }),
961
+ query: z.optional(z.never())
962
+ });
963
+ /**
964
+ * Payment method removed.
965
+ */
966
+ export const zRemovePaymentMethodResponse = z.void();
967
+ export const zSetDefaultPaymentMethodData = z.object({
968
+ body: z.optional(z.never()),
969
+ path: z.object({
970
+ spaceHandle: z.string(),
971
+ pmId: z.string()
972
+ }),
973
+ query: z.optional(z.never())
974
+ });
975
+ /**
976
+ * Default payment method updated.
977
+ */
978
+ export const zSetDefaultPaymentMethodResponse = z.void();
979
+ export const zGetBillingUsageData = z.object({
980
+ body: z.optional(z.never()),
981
+ path: z.object({
982
+ spaceHandle: z.string()
983
+ }),
984
+ query: z.optional(z.never())
985
+ });
986
+ /**
987
+ * Current billing period usage.
988
+ */
989
+ export const zGetBillingUsageResponse = zBillingUsage;
@@ -1,6 +1,6 @@
1
1
  import { useMutation } from "@tanstack/react-query";
2
2
  import { GetSuccessResponse } from "../util";
3
- import { GetServiceHealthData, FetchGraphM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, UploadNodeSourceZipData, UploadNodeSourceZipResponses } from "../../sdk/types.gen";
3
+ import { GetServiceHealthData, FetchGraphM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, UploadNodeSourceZipData, UploadNodeSourceZipResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData } 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>;
@@ -140,3 +140,32 @@ export declare const useUploadNodeSourceZip: (config?: {
140
140
  onError?: Parameters<typeof useMutation>["0"]["onError"];
141
141
  retry?: boolean;
142
142
  }) => import("@tanstack/react-query").UseMutationResult<import("../../sdk/types.gen").NodeSourceUploadResponse | undefined, unknown, Omit<UploadNodeSourceZipData, "url">, unknown>;
143
+ export declare const useGetBillingPlan: (options: Omit<GetBillingPlanData, "url"> & {
144
+ enabled?: boolean;
145
+ }) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").BillingPlan | undefined, Error>;
146
+ export declare const useUpdateBillingPlan: (config?: {
147
+ onSuccess?: (data: GetSuccessResponse<UpdateBillingPlanResponses>) => void;
148
+ onError?: Parameters<typeof useMutation>["0"]["onError"];
149
+ retry?: boolean;
150
+ }) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<UpdateBillingPlanData, "url">, unknown>;
151
+ export declare const useCreateSetupIntent: (config?: {
152
+ onSuccess?: (data: GetSuccessResponse<CreateSetupIntentResponses>) => void;
153
+ onError?: Parameters<typeof useMutation>["0"]["onError"];
154
+ retry?: boolean;
155
+ }) => import("@tanstack/react-query").UseMutationResult<import("../../sdk/types.gen").SetupIntentResponse | undefined, unknown, Omit<CreateSetupIntentData, "url">, unknown>;
156
+ export declare const useListPaymentMethods: (options: Omit<ListPaymentMethodsData, "url"> & {
157
+ enabled?: boolean;
158
+ }) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").PaymentMethod[] | undefined, Error>;
159
+ export declare const useRemovePaymentMethod: (config?: {
160
+ onSuccess?: (data: GetSuccessResponse<RemovePaymentMethodResponses>) => void;
161
+ onError?: Parameters<typeof useMutation>["0"]["onError"];
162
+ retry?: boolean;
163
+ }) => import("@tanstack/react-query").UseMutationResult<void | undefined, unknown, Omit<RemovePaymentMethodData, "url">, unknown>;
164
+ export declare const useSetDefaultPaymentMethod: (config?: {
165
+ onSuccess?: (data: GetSuccessResponse<SetDefaultPaymentMethodResponses>) => void;
166
+ onError?: Parameters<typeof useMutation>["0"]["onError"];
167
+ retry?: boolean;
168
+ }) => import("@tanstack/react-query").UseMutationResult<void | undefined, unknown, Omit<SetDefaultPaymentMethodData, "url">, unknown>;
169
+ export declare const useGetBillingUsage: (options: Omit<GetBillingUsageData, "url"> & {
170
+ enabled?: boolean;
171
+ }) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").BillingUsage | undefined, Error>;
@@ -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, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, uploadNodeSourceZip } from "../../sdk/sdk.gen";
5
+ import { getServiceHealth, fetchGraphM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, uploadNodeSourceZip, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage } from "../../sdk/sdk.gen";
6
6
  export const useGetServiceHealth = (options) => {
7
7
  const token = useToken();
8
8
  let { enabled, ...rest } = options || { enabled: true };
@@ -704,3 +704,142 @@ export const useUploadNodeSourceZip = (config) => {
704
704
  retry: config?.retry
705
705
  });
706
706
  };
707
+ export const useGetBillingPlan = (options) => {
708
+ const token = useToken();
709
+ let { enabled, ...rest } = options || { enabled: true };
710
+ const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/plan" };
711
+ const funcer = async () => {
712
+ const auth = isPromise(token) ? (await token) || "" : token || "";
713
+ if (isPromise(token) && !token)
714
+ return;
715
+ const res = await getBillingPlan({ ...opts, ...rest, auth });
716
+ return res.data;
717
+ };
718
+ if (!token)
719
+ enabled = false;
720
+ return useQuery({
721
+ queryKey: [options?.path?.spaceHandle, "billing", "plan", options.query ?? {}],
722
+ queryFn: funcer,
723
+ enabled,
724
+ retry: false,
725
+ staleTime: 600000
726
+ });
727
+ };
728
+ export const useUpdateBillingPlan = (config) => {
729
+ const token = useToken();
730
+ const queryClient = useQueryClient();
731
+ const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/plan" };
732
+ const funcer = async (options) => {
733
+ const auth = isPromise(token) ? (await token) || "" : token || "";
734
+ const res = await updateBillingPlan({ ...opts, ...options, auth });
735
+ return res?.data;
736
+ };
737
+ return useMutation({
738
+ mutationFn: funcer,
739
+ onSuccess: (res, options, c, ctx) => {
740
+ queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, "billing", "plan"] });
741
+ config?.onSuccess && config.onSuccess(res);
742
+ },
743
+ onError: config?.onError,
744
+ retry: config?.retry
745
+ });
746
+ };
747
+ export const useCreateSetupIntent = (config) => {
748
+ const token = useToken();
749
+ const queryClient = useQueryClient();
750
+ const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/setup-intent" };
751
+ const funcer = async (options) => {
752
+ const auth = isPromise(token) ? (await token) || "" : token || "";
753
+ const res = await createSetupIntent({ ...opts, ...options, auth });
754
+ return res?.data;
755
+ };
756
+ return useMutation({
757
+ mutationFn: funcer,
758
+ onSuccess: (res, options, c, ctx) => {
759
+ queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, "billing", "setup-intent"] });
760
+ config?.onSuccess && config.onSuccess(res);
761
+ },
762
+ onError: config?.onError,
763
+ retry: config?.retry
764
+ });
765
+ };
766
+ export const useListPaymentMethods = (options) => {
767
+ const token = useToken();
768
+ let { enabled, ...rest } = options || { enabled: true };
769
+ const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/payment-methods" };
770
+ const funcer = async () => {
771
+ const auth = isPromise(token) ? (await token) || "" : token || "";
772
+ if (isPromise(token) && !token)
773
+ return;
774
+ const res = await listPaymentMethods({ ...opts, ...rest, auth });
775
+ return res.data;
776
+ };
777
+ if (!token)
778
+ enabled = false;
779
+ return useQuery({
780
+ queryKey: [options?.path?.spaceHandle, "billing", "payment-methods", options.query ?? {}],
781
+ queryFn: funcer,
782
+ enabled,
783
+ retry: false,
784
+ staleTime: 600000
785
+ });
786
+ };
787
+ export const useRemovePaymentMethod = (config) => {
788
+ const token = useToken();
789
+ const queryClient = useQueryClient();
790
+ const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/payment-methods/{pmId}" };
791
+ const funcer = async (options) => {
792
+ const auth = isPromise(token) ? (await token) || "" : token || "";
793
+ const res = await removePaymentMethod({ ...opts, ...options, auth });
794
+ return res?.data;
795
+ };
796
+ return useMutation({
797
+ mutationFn: funcer,
798
+ onSuccess: (res, options, c, ctx) => {
799
+ queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, "billing", "payment-methods", options?.path?.pmId] });
800
+ config?.onSuccess && config.onSuccess(res);
801
+ },
802
+ onError: config?.onError,
803
+ retry: config?.retry
804
+ });
805
+ };
806
+ export const useSetDefaultPaymentMethod = (config) => {
807
+ const token = useToken();
808
+ const queryClient = useQueryClient();
809
+ const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/payment-methods/{pmId}/default" };
810
+ const funcer = async (options) => {
811
+ const auth = isPromise(token) ? (await token) || "" : token || "";
812
+ const res = await setDefaultPaymentMethod({ ...opts, ...options, auth });
813
+ return res?.data;
814
+ };
815
+ return useMutation({
816
+ mutationFn: funcer,
817
+ onSuccess: (res, options, c, ctx) => {
818
+ queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, "billing", "payment-methods", options?.path?.pmId, "default"] });
819
+ config?.onSuccess && config.onSuccess(res);
820
+ },
821
+ onError: config?.onError,
822
+ retry: config?.retry
823
+ });
824
+ };
825
+ export const useGetBillingUsage = (options) => {
826
+ const token = useToken();
827
+ let { enabled, ...rest } = options || { enabled: true };
828
+ const opts = { throwOnError: true, url: "/auth/{spaceHandle}/billing/usage" };
829
+ const funcer = async () => {
830
+ const auth = isPromise(token) ? (await token) || "" : token || "";
831
+ if (isPromise(token) && !token)
832
+ return;
833
+ const res = await getBillingUsage({ ...opts, ...rest, auth });
834
+ return res.data;
835
+ };
836
+ if (!token)
837
+ enabled = false;
838
+ return useQuery({
839
+ queryKey: [options?.path?.spaceHandle, "billing", "usage", options.query ?? {}],
840
+ queryFn: funcer,
841
+ enabled,
842
+ retry: false,
843
+ staleTime: 600000
844
+ });
845
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shoal-web-sdk",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build-hooks": "npx tsx tanstack-codegen/generator.ts",