shoal-web-sdk 1.0.94 → 1.0.96
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/billing/@tanstack/react-query.gen.d.ts +8 -1
- package/dist/sdk/billing/@tanstack/react-query.gen.js +20 -1
- package/dist/sdk/billing/sdk.gen.d.ts +8 -1
- package/dist/sdk/billing/sdk.gen.js +22 -0
- package/dist/sdk/billing/types.gen.d.ts +50 -2
- package/dist/sdk/billing/zod.gen.d.ts +28 -8
- package/dist/sdk/billing/zod.gen.js +13 -2
- package/dist/sdk/types.gen.d.ts +21 -1
- package/dist/sdk/zod.gen.d.ts +309 -0
- package/dist/sdk/zod.gen.js +25 -0
- package/dist/tanstack-codegen/generated/billing.d.ts +9 -1
- package/dist/tanstack-codegen/generated/billing.js +20 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, DeletePaymentMethodData, DeletePaymentMethodError, DeletePaymentMethodResponse, GetCustomerData, GetInvoicesData, GetPlansData, M2mCreateCustomerData, M2mCreateCustomerError, M2mGetCustomerData, M2mUpdatePlanData, M2mUpdatePlanError, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodError, UpdateDefaultPaymentMethodResponse, UpdatePlanData, UpdatePlanError } from '../types.gen';
|
|
3
|
+
import type { CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSubscriptionData, CreateSubscriptionError, DeletePaymentMethodData, DeletePaymentMethodError, DeletePaymentMethodResponse, GetCustomerData, GetInvoicesData, GetPlansData, M2mCreateCustomerData, M2mCreateCustomerError, M2mGetCustomerData, M2mUpdatePlanData, M2mUpdatePlanError, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodError, UpdateDefaultPaymentMethodResponse, UpdatePlanData, UpdatePlanError } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -68,6 +68,13 @@ export declare const getPlansOptions: (options?: Options<GetPlansData>) => impor
|
|
|
68
68
|
* Returns a list of available pricing plans.
|
|
69
69
|
*/
|
|
70
70
|
export declare const updatePlanMutation: (options?: Partial<Options<UpdatePlanData>>) => UseMutationOptions<unknown, UpdatePlanError, Options<UpdatePlanData>>;
|
|
71
|
+
/**
|
|
72
|
+
* Starts a new subscription for a customer who no longer has one.
|
|
73
|
+
*
|
|
74
|
+
* Resubscribes an account whose subscription was cancelled — for example when a trial ended without a payment method. Reuses the existing Stripe customer, requires a saved payment method, and never grants a trial period.
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
export declare const createSubscriptionMutation: (options?: Partial<Options<CreateSubscriptionData>>) => UseMutationOptions<unknown, CreateSubscriptionError, Options<CreateSubscriptionData>>;
|
|
71
78
|
/**
|
|
72
79
|
* Creates a Stripe SetupIntent.
|
|
73
80
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { createSetupIntent, deletePaymentMethod, getCustomer, getInvoices, getPlans, m2mCreateCustomer, m2mGetCustomer, m2mUpdatePlan, updateDefaultPaymentMethod, updatePlan } from '../sdk.gen';
|
|
4
|
+
import { createSetupIntent, createSubscription, deletePaymentMethod, getCustomer, getInvoices, getPlans, m2mCreateCustomer, m2mGetCustomer, m2mUpdatePlan, updateDefaultPaymentMethod, updatePlan } from '../sdk.gen';
|
|
5
5
|
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
6
|
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
7
|
if (infinite) {
|
|
@@ -78,6 +78,25 @@ export const updatePlanMutation = (options) => {
|
|
|
78
78
|
};
|
|
79
79
|
return mutationOptions;
|
|
80
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Starts a new subscription for a customer who no longer has one.
|
|
83
|
+
*
|
|
84
|
+
* Resubscribes an account whose subscription was cancelled — for example when a trial ended without a payment method. Reuses the existing Stripe customer, requires a saved payment method, and never grants a trial period.
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
export const createSubscriptionMutation = (options) => {
|
|
88
|
+
const mutationOptions = {
|
|
89
|
+
mutationFn: async (fnOptions) => {
|
|
90
|
+
const { data } = await createSubscription({
|
|
91
|
+
...options,
|
|
92
|
+
...fnOptions,
|
|
93
|
+
throwOnError: true
|
|
94
|
+
});
|
|
95
|
+
return data;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return mutationOptions;
|
|
99
|
+
};
|
|
81
100
|
/**
|
|
82
101
|
* Creates a Stripe SetupIntent.
|
|
83
102
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, DeletePaymentMethodData, DeletePaymentMethodErrors, DeletePaymentMethodResponses, GetCustomerData, GetCustomerErrors, GetCustomerResponses, GetInvoicesData, GetInvoicesErrors, GetInvoicesResponses, GetPlansData, GetPlansErrors, GetPlansResponses, M2mCreateCustomerData, M2mCreateCustomerErrors, M2mCreateCustomerResponses, M2mGetCustomerData, M2mGetCustomerErrors, M2mGetCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanErrors, M2mUpdatePlanResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodErrors, UpdateDefaultPaymentMethodResponses, UpdatePlanData, UpdatePlanErrors, UpdatePlanResponses } from './types.gen';
|
|
2
|
+
import type { CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSubscriptionData, CreateSubscriptionErrors, CreateSubscriptionResponses, DeletePaymentMethodData, DeletePaymentMethodErrors, DeletePaymentMethodResponses, GetCustomerData, GetCustomerErrors, GetCustomerResponses, GetInvoicesData, GetInvoicesErrors, GetInvoicesResponses, GetPlansData, GetPlansErrors, GetPlansResponses, M2mCreateCustomerData, M2mCreateCustomerErrors, M2mCreateCustomerResponses, M2mGetCustomerData, M2mGetCustomerErrors, M2mGetCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanErrors, M2mUpdatePlanResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodErrors, UpdateDefaultPaymentMethodResponses, UpdatePlanData, UpdatePlanErrors, UpdatePlanResponses } from './types.gen';
|
|
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
|
|
@@ -25,6 +25,13 @@ export declare const getPlans: <ThrowOnError extends boolean = false>(options?:
|
|
|
25
25
|
* Returns a list of available pricing plans.
|
|
26
26
|
*/
|
|
27
27
|
export declare const updatePlan: <ThrowOnError extends boolean = false>(options: Options<UpdatePlanData, ThrowOnError>) => import("./client").RequestResult<UpdatePlanResponses, UpdatePlanErrors, ThrowOnError, "fields">;
|
|
28
|
+
/**
|
|
29
|
+
* Starts a new subscription for a customer who no longer has one.
|
|
30
|
+
*
|
|
31
|
+
* Resubscribes an account whose subscription was cancelled — for example when a trial ended without a payment method. Reuses the existing Stripe customer, requires a saved payment method, and never grants a trial period.
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare const createSubscription: <ThrowOnError extends boolean = false>(options: Options<CreateSubscriptionData, ThrowOnError>) => import("./client").RequestResult<CreateSubscriptionResponses, CreateSubscriptionErrors, ThrowOnError, "fields">;
|
|
28
35
|
/**
|
|
29
36
|
* Creates a Stripe SetupIntent.
|
|
30
37
|
*
|
|
@@ -49,6 +49,28 @@ export const updatePlan = (options) => {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Starts a new subscription for a customer who no longer has one.
|
|
54
|
+
*
|
|
55
|
+
* Resubscribes an account whose subscription was cancelled — for example when a trial ended without a payment method. Reuses the existing Stripe customer, requires a saved payment method, and never grants a trial period.
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export const createSubscription = (options) => {
|
|
59
|
+
return (options.client ?? client).post({
|
|
60
|
+
security: [
|
|
61
|
+
{
|
|
62
|
+
scheme: 'bearer',
|
|
63
|
+
type: 'http'
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
url: '/api/v1/subscription/{org}',
|
|
67
|
+
...options,
|
|
68
|
+
headers: {
|
|
69
|
+
'Content-Type': 'application/json',
|
|
70
|
+
...options.headers
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
};
|
|
52
74
|
/**
|
|
53
75
|
* Creates a Stripe SetupIntent.
|
|
54
76
|
*
|
|
@@ -91,6 +91,10 @@ export type CreateCustomerRequest = {
|
|
|
91
91
|
plan: string;
|
|
92
92
|
billingInterval: BillingInterval;
|
|
93
93
|
};
|
|
94
|
+
export type CreateSubscriptionRequest = {
|
|
95
|
+
plan: string;
|
|
96
|
+
billingInterval: BillingInterval;
|
|
97
|
+
};
|
|
94
98
|
export type SetupIntentResponse = {
|
|
95
99
|
readonly clientSecret: string;
|
|
96
100
|
};
|
|
@@ -139,7 +143,7 @@ export type CustomerStatus = 'incomplete' | 'incomplete_expired' | 'trialing' |
|
|
|
139
143
|
export type CustomerResponse = {
|
|
140
144
|
id: string;
|
|
141
145
|
status: CustomerStatus;
|
|
142
|
-
currentPlan
|
|
146
|
+
currentPlan?: CustomerPlanResponse;
|
|
143
147
|
pendingPlan?: CustomerPlanResponse;
|
|
144
148
|
readonly currentPeriodEnd: number;
|
|
145
149
|
readonly scheduledChangeAt?: number;
|
|
@@ -200,7 +204,7 @@ export type CustomerPlanResponseWritable = {
|
|
|
200
204
|
export type CustomerResponseWritable = {
|
|
201
205
|
id: string;
|
|
202
206
|
status: CustomerStatus;
|
|
203
|
-
currentPlan
|
|
207
|
+
currentPlan?: CustomerPlanResponseWritable;
|
|
204
208
|
};
|
|
205
209
|
/**
|
|
206
210
|
* Stripe payment method.
|
|
@@ -299,6 +303,50 @@ export type UpdatePlanResponses = {
|
|
|
299
303
|
*/
|
|
300
304
|
202: unknown;
|
|
301
305
|
};
|
|
306
|
+
export type CreateSubscriptionData = {
|
|
307
|
+
body: CreateSubscriptionRequest;
|
|
308
|
+
path: {
|
|
309
|
+
/**
|
|
310
|
+
* Kinde organisation id.
|
|
311
|
+
*/
|
|
312
|
+
org: string;
|
|
313
|
+
};
|
|
314
|
+
query?: never;
|
|
315
|
+
url: '/api/v1/subscription/{org}';
|
|
316
|
+
};
|
|
317
|
+
export type CreateSubscriptionErrors = {
|
|
318
|
+
/**
|
|
319
|
+
* Invalid request body
|
|
320
|
+
*/
|
|
321
|
+
400: _Error;
|
|
322
|
+
/**
|
|
323
|
+
* Unauthorised user
|
|
324
|
+
*/
|
|
325
|
+
401: _Error;
|
|
326
|
+
/**
|
|
327
|
+
* Account not found
|
|
328
|
+
*/
|
|
329
|
+
404: _Error;
|
|
330
|
+
/**
|
|
331
|
+
* The account already has an in-force subscription
|
|
332
|
+
*/
|
|
333
|
+
409: _Error;
|
|
334
|
+
/**
|
|
335
|
+
* The subscription cannot be created
|
|
336
|
+
*/
|
|
337
|
+
422: _Error;
|
|
338
|
+
/**
|
|
339
|
+
* Internal error
|
|
340
|
+
*/
|
|
341
|
+
500: _Error;
|
|
342
|
+
};
|
|
343
|
+
export type CreateSubscriptionError = CreateSubscriptionErrors[keyof CreateSubscriptionErrors];
|
|
344
|
+
export type CreateSubscriptionResponses = {
|
|
345
|
+
/**
|
|
346
|
+
* The subscription was created
|
|
347
|
+
*/
|
|
348
|
+
201: unknown;
|
|
349
|
+
};
|
|
302
350
|
export type CreateSetupIntentData = {
|
|
303
351
|
body?: never;
|
|
304
352
|
path: {
|
|
@@ -422,6 +422,13 @@ export declare const zCreateCustomerRequest: z.ZodObject<{
|
|
|
422
422
|
annual: "annual";
|
|
423
423
|
}>;
|
|
424
424
|
}, z.core.$strip>;
|
|
425
|
+
export declare const zCreateSubscriptionRequest: z.ZodObject<{
|
|
426
|
+
plan: z.ZodString;
|
|
427
|
+
billingInterval: z.ZodEnum<{
|
|
428
|
+
monthly: "monthly";
|
|
429
|
+
annual: "annual";
|
|
430
|
+
}>;
|
|
431
|
+
}, z.core.$strip>;
|
|
425
432
|
export declare const zSetupIntentResponse: z.ZodObject<{
|
|
426
433
|
clientSecret: z.ZodReadonly<z.ZodString>;
|
|
427
434
|
}, z.core.$strip>;
|
|
@@ -581,7 +588,7 @@ export declare const zCustomerResponse: z.ZodObject<{
|
|
|
581
588
|
unpaid: "unpaid";
|
|
582
589
|
onboarding: "onboarding";
|
|
583
590
|
}>;
|
|
584
|
-
currentPlan: z.ZodObject<{
|
|
591
|
+
currentPlan: z.ZodOptional<z.ZodObject<{
|
|
585
592
|
key: z.ZodReadonly<z.ZodString>;
|
|
586
593
|
displayName: z.ZodReadonly<z.ZodString>;
|
|
587
594
|
displayDescription: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
@@ -673,7 +680,7 @@ export declare const zCustomerResponse: z.ZodObject<{
|
|
|
673
680
|
}>;
|
|
674
681
|
}, z.core.$strip>>>]>>;
|
|
675
682
|
}, z.core.$strip>>;
|
|
676
|
-
}, z.core.$strip
|
|
683
|
+
}, z.core.$strip>>;
|
|
677
684
|
pendingPlan: z.ZodOptional<z.ZodObject<{
|
|
678
685
|
key: z.ZodReadonly<z.ZodString>;
|
|
679
686
|
displayName: z.ZodReadonly<z.ZodString>;
|
|
@@ -922,12 +929,12 @@ export declare const zCustomerResponseWritable: z.ZodObject<{
|
|
|
922
929
|
unpaid: "unpaid";
|
|
923
930
|
onboarding: "onboarding";
|
|
924
931
|
}>;
|
|
925
|
-
currentPlan: z.ZodObject<{
|
|
932
|
+
currentPlan: z.ZodOptional<z.ZodObject<{
|
|
926
933
|
interval: z.ZodOptional<z.ZodEnum<{
|
|
927
934
|
monthly: "monthly";
|
|
928
935
|
annual: "annual";
|
|
929
936
|
}>>;
|
|
930
|
-
}, z.core.$strip
|
|
937
|
+
}, z.core.$strip>>;
|
|
931
938
|
}, z.core.$strip>;
|
|
932
939
|
/**
|
|
933
940
|
* Stripe payment method.
|
|
@@ -960,7 +967,7 @@ export declare const zGetCustomerResponse: z.ZodObject<{
|
|
|
960
967
|
unpaid: "unpaid";
|
|
961
968
|
onboarding: "onboarding";
|
|
962
969
|
}>;
|
|
963
|
-
currentPlan: z.ZodObject<{
|
|
970
|
+
currentPlan: z.ZodOptional<z.ZodObject<{
|
|
964
971
|
key: z.ZodReadonly<z.ZodString>;
|
|
965
972
|
displayName: z.ZodReadonly<z.ZodString>;
|
|
966
973
|
displayDescription: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
@@ -1052,7 +1059,7 @@ export declare const zGetCustomerResponse: z.ZodObject<{
|
|
|
1052
1059
|
}>;
|
|
1053
1060
|
}, z.core.$strip>>>]>>;
|
|
1054
1061
|
}, z.core.$strip>>;
|
|
1055
|
-
}, z.core.$strip
|
|
1062
|
+
}, z.core.$strip>>;
|
|
1056
1063
|
pendingPlan: z.ZodOptional<z.ZodObject<{
|
|
1057
1064
|
key: z.ZodReadonly<z.ZodString>;
|
|
1058
1065
|
displayName: z.ZodReadonly<z.ZodString>;
|
|
@@ -1305,6 +1312,19 @@ export declare const zUpdatePlanData: z.ZodObject<{
|
|
|
1305
1312
|
}, z.core.$strip>;
|
|
1306
1313
|
query: z.ZodOptional<z.ZodNever>;
|
|
1307
1314
|
}, z.core.$strip>;
|
|
1315
|
+
export declare const zCreateSubscriptionData: z.ZodObject<{
|
|
1316
|
+
body: z.ZodObject<{
|
|
1317
|
+
plan: z.ZodString;
|
|
1318
|
+
billingInterval: z.ZodEnum<{
|
|
1319
|
+
monthly: "monthly";
|
|
1320
|
+
annual: "annual";
|
|
1321
|
+
}>;
|
|
1322
|
+
}, z.core.$strip>;
|
|
1323
|
+
path: z.ZodObject<{
|
|
1324
|
+
org: z.ZodString;
|
|
1325
|
+
}, z.core.$strip>;
|
|
1326
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
1327
|
+
}, z.core.$strip>;
|
|
1308
1328
|
export declare const zCreateSetupIntentData: z.ZodObject<{
|
|
1309
1329
|
body: z.ZodOptional<z.ZodNever>;
|
|
1310
1330
|
path: z.ZodObject<{
|
|
@@ -1395,7 +1415,7 @@ export declare const zM2mGetCustomerResponse: z.ZodObject<{
|
|
|
1395
1415
|
unpaid: "unpaid";
|
|
1396
1416
|
onboarding: "onboarding";
|
|
1397
1417
|
}>;
|
|
1398
|
-
currentPlan: z.ZodObject<{
|
|
1418
|
+
currentPlan: z.ZodOptional<z.ZodObject<{
|
|
1399
1419
|
key: z.ZodReadonly<z.ZodString>;
|
|
1400
1420
|
displayName: z.ZodReadonly<z.ZodString>;
|
|
1401
1421
|
displayDescription: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
@@ -1487,7 +1507,7 @@ export declare const zM2mGetCustomerResponse: z.ZodObject<{
|
|
|
1487
1507
|
}>;
|
|
1488
1508
|
}, z.core.$strip>>>]>>;
|
|
1489
1509
|
}, z.core.$strip>>;
|
|
1490
|
-
}, z.core.$strip
|
|
1510
|
+
}, z.core.$strip>>;
|
|
1491
1511
|
pendingPlan: z.ZodOptional<z.ZodObject<{
|
|
1492
1512
|
key: z.ZodReadonly<z.ZodString>;
|
|
1493
1513
|
displayName: z.ZodReadonly<z.ZodString>;
|
|
@@ -113,6 +113,10 @@ export const zCreateCustomerRequest = z.object({
|
|
|
113
113
|
plan: z.string(),
|
|
114
114
|
billingInterval: zBillingInterval
|
|
115
115
|
});
|
|
116
|
+
export const zCreateSubscriptionRequest = z.object({
|
|
117
|
+
plan: z.string(),
|
|
118
|
+
billingInterval: zBillingInterval
|
|
119
|
+
});
|
|
116
120
|
export const zSetupIntentResponse = z.object({
|
|
117
121
|
clientSecret: z.string().readonly()
|
|
118
122
|
});
|
|
@@ -171,7 +175,7 @@ export const zCustomerStatus = z.enum([
|
|
|
171
175
|
export const zCustomerResponse = z.object({
|
|
172
176
|
id: z.uuid(),
|
|
173
177
|
status: zCustomerStatus,
|
|
174
|
-
currentPlan: zCustomerPlanResponse,
|
|
178
|
+
currentPlan: z.optional(zCustomerPlanResponse),
|
|
175
179
|
pendingPlan: z.optional(zCustomerPlanResponse),
|
|
176
180
|
currentPeriodEnd: z.int().readonly(),
|
|
177
181
|
scheduledChangeAt: z.optional(z.int().readonly()),
|
|
@@ -236,7 +240,7 @@ export const zCustomerPlanResponseWritable = z.object({
|
|
|
236
240
|
export const zCustomerResponseWritable = z.object({
|
|
237
241
|
id: z.uuid(),
|
|
238
242
|
status: zCustomerStatus,
|
|
239
|
-
currentPlan: zCustomerPlanResponseWritable
|
|
243
|
+
currentPlan: z.optional(zCustomerPlanResponseWritable)
|
|
240
244
|
});
|
|
241
245
|
/**
|
|
242
246
|
* Stripe payment method.
|
|
@@ -273,6 +277,13 @@ export const zUpdatePlanData = z.object({
|
|
|
273
277
|
}),
|
|
274
278
|
query: z.optional(z.never())
|
|
275
279
|
});
|
|
280
|
+
export const zCreateSubscriptionData = z.object({
|
|
281
|
+
body: zCreateSubscriptionRequest,
|
|
282
|
+
path: z.object({
|
|
283
|
+
org: z.string()
|
|
284
|
+
}),
|
|
285
|
+
query: z.optional(z.never())
|
|
286
|
+
});
|
|
276
287
|
export const zCreateSetupIntentData = z.object({
|
|
277
288
|
body: z.optional(z.never()),
|
|
278
289
|
path: z.object({
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -658,6 +658,8 @@ export type Node = {
|
|
|
658
658
|
} & NeonDbNodeProps) | ({
|
|
659
659
|
typ: 'mongodb';
|
|
660
660
|
} & MongoDbNodeProps) | ({
|
|
661
|
+
typ: 'cloudsql';
|
|
662
|
+
} & CloudSqlNodeProps) | ({
|
|
661
663
|
typ: 'queue';
|
|
662
664
|
} & QueueNodeProps) | ({
|
|
663
665
|
typ: 'proxy';
|
|
@@ -668,7 +670,7 @@ export type Node = {
|
|
|
668
670
|
} & SchedulerNodeProps);
|
|
669
671
|
};
|
|
670
672
|
export type EdgeType = 'network' | 'route' | 'output';
|
|
671
|
-
export type NodeType = 'cache' | 'comment' | 'container' | 'cronjob' | 'database' | 'function' | 'neondb' | 'mongodb' | 'queue' | 'proxy' | 'vm' | 'scheduler';
|
|
673
|
+
export type NodeType = 'cache' | 'comment' | 'container' | 'cronjob' | 'database' | 'function' | 'neondb' | 'mongodb' | 'cloudsql' | 'queue' | 'proxy' | 'vm' | 'scheduler';
|
|
672
674
|
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
673
675
|
export type CommentNodeProps = {
|
|
674
676
|
comment?: string;
|
|
@@ -707,6 +709,8 @@ export type ContainerNodeProps = {
|
|
|
707
709
|
};
|
|
708
710
|
export type DesiredStatus = 'TERMINATED' | 'SUSPENDED' | 'RUNNING';
|
|
709
711
|
export type DiskType = 'pd-standard' | 'pd-balanced' | 'pd-ssd' | 'pd-extreme' | 'hyperdisk-balanced' | 'hyperdisk-extreme' | 'hyperdisk-throughput';
|
|
712
|
+
export type CloudSqlTier = 'db-custom-1-3840' | 'db-custom-2-7680' | 'db-custom-4-15360' | 'db-custom-8-30720';
|
|
713
|
+
export type CloudSqlDbVersion = 'POSTGRES_15' | 'POSTGRES_16' | 'POSTGRES_17';
|
|
710
714
|
export type MachineType = 'e2-micro' | 'e2-small' | 'e2-medium' | 'e2-standard-2' | 'e2-standard-4' | 'e2-standard-8';
|
|
711
715
|
export type ImageVersion = 'debian-cloud/debian-12' | 'debian-cloud/debian-11' | 'ubuntu-os-cloud/ubuntu-2404-lts' | 'ubuntu-os-cloud/ubuntu-2204-lts' | 'cos-cloud/cos-stable' | 'cos-cloud/cos-beta' | 'cos-cloud/cos-arm64-stable' | 'cos-cloud/cos-arm64-beta';
|
|
712
716
|
export type Region = 'europe-west2';
|
|
@@ -775,6 +779,22 @@ export type MongoDbNodeProps = {
|
|
|
775
779
|
*/
|
|
776
780
|
connectionString?: string;
|
|
777
781
|
};
|
|
782
|
+
export type CloudSqlNodeProps = {
|
|
783
|
+
/**
|
|
784
|
+
* Cloud SQL instance name, assigned when the instance is provisioned.
|
|
785
|
+
*/
|
|
786
|
+
instanceName?: string;
|
|
787
|
+
region?: Region;
|
|
788
|
+
tier?: CloudSqlTier;
|
|
789
|
+
dbVersion?: CloudSqlDbVersion;
|
|
790
|
+
dbName?: string;
|
|
791
|
+
storageSizeGb?: number;
|
|
792
|
+
/**
|
|
793
|
+
* CIDR ranges allowed to connect to the instance. Use 0.0.0.0/0 to allow any address.
|
|
794
|
+
*/
|
|
795
|
+
allowedIps?: Array<string>;
|
|
796
|
+
connectionUri?: string;
|
|
797
|
+
};
|
|
778
798
|
export type NodePingResponse = {
|
|
779
799
|
/**
|
|
780
800
|
* Whether the underlying provider resource is reachable and in a healthy state.
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -789,6 +789,7 @@ export declare const zNodeType: z.ZodEnum<{
|
|
|
789
789
|
database: "database";
|
|
790
790
|
neondb: "neondb";
|
|
791
791
|
mongodb: "mongodb";
|
|
792
|
+
cloudsql: "cloudsql";
|
|
792
793
|
queue: "queue";
|
|
793
794
|
proxy: "proxy";
|
|
794
795
|
vm: "vm";
|
|
@@ -839,6 +840,17 @@ export declare const zDiskType: z.ZodEnum<{
|
|
|
839
840
|
"hyperdisk-extreme": "hyperdisk-extreme";
|
|
840
841
|
"hyperdisk-throughput": "hyperdisk-throughput";
|
|
841
842
|
}>;
|
|
843
|
+
export declare const zCloudSqlTier: z.ZodEnum<{
|
|
844
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
845
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
846
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
847
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
848
|
+
}>;
|
|
849
|
+
export declare const zCloudSqlDbVersion: z.ZodEnum<{
|
|
850
|
+
POSTGRES_15: "POSTGRES_15";
|
|
851
|
+
POSTGRES_16: "POSTGRES_16";
|
|
852
|
+
POSTGRES_17: "POSTGRES_17";
|
|
853
|
+
}>;
|
|
842
854
|
export declare const zMachineType: z.ZodEnum<{
|
|
843
855
|
"e2-micro": "e2-micro";
|
|
844
856
|
"e2-small": "e2-small";
|
|
@@ -944,6 +956,27 @@ export declare const zMongoDbNodeProps: z.ZodObject<{
|
|
|
944
956
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
945
957
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
946
958
|
}, z.core.$strip>;
|
|
959
|
+
export declare const zCloudSqlNodeProps: z.ZodObject<{
|
|
960
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
961
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
962
|
+
"europe-west2": "europe-west2";
|
|
963
|
+
}>>;
|
|
964
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
965
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
966
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
967
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
968
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
969
|
+
}>>;
|
|
970
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
971
|
+
POSTGRES_15: "POSTGRES_15";
|
|
972
|
+
POSTGRES_16: "POSTGRES_16";
|
|
973
|
+
POSTGRES_17: "POSTGRES_17";
|
|
974
|
+
}>>;
|
|
975
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
976
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
977
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
978
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
979
|
+
}, z.core.$strip>;
|
|
947
980
|
export declare const zNodePingResponse: z.ZodObject<{
|
|
948
981
|
healthy: z.ZodBoolean;
|
|
949
982
|
status: z.ZodOptional<z.ZodString>;
|
|
@@ -1120,6 +1153,7 @@ export declare const zNode: z.ZodObject<{
|
|
|
1120
1153
|
database: "database";
|
|
1121
1154
|
neondb: "neondb";
|
|
1122
1155
|
mongodb: "mongodb";
|
|
1156
|
+
cloudsql: "cloudsql";
|
|
1123
1157
|
queue: "queue";
|
|
1124
1158
|
proxy: "proxy";
|
|
1125
1159
|
vm: "vm";
|
|
@@ -1234,6 +1268,28 @@ export declare const zNode: z.ZodObject<{
|
|
|
1234
1268
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
1235
1269
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1236
1270
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
1271
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1272
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
1273
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1274
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
1275
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
1276
|
+
"europe-west2": "europe-west2";
|
|
1277
|
+
}>>;
|
|
1278
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
1279
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
1280
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
1281
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
1282
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
1283
|
+
}>>;
|
|
1284
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
1285
|
+
POSTGRES_15: "POSTGRES_15";
|
|
1286
|
+
POSTGRES_16: "POSTGRES_16";
|
|
1287
|
+
POSTGRES_17: "POSTGRES_17";
|
|
1288
|
+
}>>;
|
|
1289
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
1291
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1292
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
1237
1293
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1238
1294
|
typ: z.ZodLiteral<"queue">;
|
|
1239
1295
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1365,6 +1421,7 @@ export declare const zNodes: z.ZodObject<{
|
|
|
1365
1421
|
database: "database";
|
|
1366
1422
|
neondb: "neondb";
|
|
1367
1423
|
mongodb: "mongodb";
|
|
1424
|
+
cloudsql: "cloudsql";
|
|
1368
1425
|
queue: "queue";
|
|
1369
1426
|
proxy: "proxy";
|
|
1370
1427
|
vm: "vm";
|
|
@@ -1479,6 +1536,28 @@ export declare const zNodes: z.ZodObject<{
|
|
|
1479
1536
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
1480
1537
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1481
1538
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
1539
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1540
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
1541
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1542
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
1543
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
1544
|
+
"europe-west2": "europe-west2";
|
|
1545
|
+
}>>;
|
|
1546
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
1547
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
1548
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
1549
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
1550
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
1551
|
+
}>>;
|
|
1552
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
1553
|
+
POSTGRES_15: "POSTGRES_15";
|
|
1554
|
+
POSTGRES_16: "POSTGRES_16";
|
|
1555
|
+
POSTGRES_17: "POSTGRES_17";
|
|
1556
|
+
}>>;
|
|
1557
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
1558
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
1559
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1560
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
1482
1561
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1483
1562
|
typ: z.ZodLiteral<"queue">;
|
|
1484
1563
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1613,6 +1692,7 @@ export declare const zGraph: z.ZodObject<{
|
|
|
1613
1692
|
database: "database";
|
|
1614
1693
|
neondb: "neondb";
|
|
1615
1694
|
mongodb: "mongodb";
|
|
1695
|
+
cloudsql: "cloudsql";
|
|
1616
1696
|
queue: "queue";
|
|
1617
1697
|
proxy: "proxy";
|
|
1618
1698
|
vm: "vm";
|
|
@@ -1727,6 +1807,28 @@ export declare const zGraph: z.ZodObject<{
|
|
|
1727
1807
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
1728
1808
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1729
1809
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
1810
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1811
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
1812
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1813
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
1814
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
1815
|
+
"europe-west2": "europe-west2";
|
|
1816
|
+
}>>;
|
|
1817
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
1818
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
1819
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
1820
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
1821
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
1822
|
+
}>>;
|
|
1823
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
1824
|
+
POSTGRES_15: "POSTGRES_15";
|
|
1825
|
+
POSTGRES_16: "POSTGRES_16";
|
|
1826
|
+
POSTGRES_17: "POSTGRES_17";
|
|
1827
|
+
}>>;
|
|
1828
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
1829
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
1830
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1831
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
1730
1832
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1731
1833
|
typ: z.ZodLiteral<"queue">;
|
|
1732
1834
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1866,6 +1968,7 @@ export declare const zBlueprintDetail: z.ZodObject<{
|
|
|
1866
1968
|
database: "database";
|
|
1867
1969
|
neondb: "neondb";
|
|
1868
1970
|
mongodb: "mongodb";
|
|
1971
|
+
cloudsql: "cloudsql";
|
|
1869
1972
|
queue: "queue";
|
|
1870
1973
|
proxy: "proxy";
|
|
1871
1974
|
vm: "vm";
|
|
@@ -1980,6 +2083,28 @@ export declare const zBlueprintDetail: z.ZodObject<{
|
|
|
1980
2083
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
1981
2084
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1982
2085
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
2086
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2087
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
2088
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2089
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
2090
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
2091
|
+
"europe-west2": "europe-west2";
|
|
2092
|
+
}>>;
|
|
2093
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
2094
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
2095
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
2096
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
2097
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
2098
|
+
}>>;
|
|
2099
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
2100
|
+
POSTGRES_15: "POSTGRES_15";
|
|
2101
|
+
POSTGRES_16: "POSTGRES_16";
|
|
2102
|
+
POSTGRES_17: "POSTGRES_17";
|
|
2103
|
+
}>>;
|
|
2104
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
2105
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
2106
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2107
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
1983
2108
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1984
2109
|
typ: z.ZodLiteral<"queue">;
|
|
1985
2110
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2788,6 +2913,7 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
2788
2913
|
database: "database";
|
|
2789
2914
|
neondb: "neondb";
|
|
2790
2915
|
mongodb: "mongodb";
|
|
2916
|
+
cloudsql: "cloudsql";
|
|
2791
2917
|
queue: "queue";
|
|
2792
2918
|
proxy: "proxy";
|
|
2793
2919
|
vm: "vm";
|
|
@@ -2902,6 +3028,28 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
|
|
|
2902
3028
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
2903
3029
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
2904
3030
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
3031
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3032
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
3033
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3034
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
3035
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
3036
|
+
"europe-west2": "europe-west2";
|
|
3037
|
+
}>>;
|
|
3038
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
3039
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
3040
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
3041
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
3042
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
3043
|
+
}>>;
|
|
3044
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
3045
|
+
POSTGRES_15: "POSTGRES_15";
|
|
3046
|
+
POSTGRES_16: "POSTGRES_16";
|
|
3047
|
+
POSTGRES_17: "POSTGRES_17";
|
|
3048
|
+
}>>;
|
|
3049
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
3050
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
3051
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3052
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
2905
3053
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
2906
3054
|
typ: z.ZodLiteral<"queue">;
|
|
2907
3055
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3035,6 +3183,7 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
3035
3183
|
database: "database";
|
|
3036
3184
|
neondb: "neondb";
|
|
3037
3185
|
mongodb: "mongodb";
|
|
3186
|
+
cloudsql: "cloudsql";
|
|
3038
3187
|
queue: "queue";
|
|
3039
3188
|
proxy: "proxy";
|
|
3040
3189
|
vm: "vm";
|
|
@@ -3149,6 +3298,28 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
3149
3298
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
3150
3299
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
3151
3300
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
3301
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3302
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
3303
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3304
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
3305
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
3306
|
+
"europe-west2": "europe-west2";
|
|
3307
|
+
}>>;
|
|
3308
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
3309
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
3310
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
3311
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
3312
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
3313
|
+
}>>;
|
|
3314
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
3315
|
+
POSTGRES_15: "POSTGRES_15";
|
|
3316
|
+
POSTGRES_16: "POSTGRES_16";
|
|
3317
|
+
POSTGRES_17: "POSTGRES_17";
|
|
3318
|
+
}>>;
|
|
3319
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
3320
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
3321
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3322
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
3152
3323
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3153
3324
|
typ: z.ZodLiteral<"queue">;
|
|
3154
3325
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3299,6 +3470,7 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
|
3299
3470
|
database: "database";
|
|
3300
3471
|
neondb: "neondb";
|
|
3301
3472
|
mongodb: "mongodb";
|
|
3473
|
+
cloudsql: "cloudsql";
|
|
3302
3474
|
queue: "queue";
|
|
3303
3475
|
proxy: "proxy";
|
|
3304
3476
|
vm: "vm";
|
|
@@ -3413,6 +3585,28 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
|
3413
3585
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
3414
3586
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
3415
3587
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
3588
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3589
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
3590
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3591
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
3592
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
3593
|
+
"europe-west2": "europe-west2";
|
|
3594
|
+
}>>;
|
|
3595
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
3596
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
3597
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
3598
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
3599
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
3600
|
+
}>>;
|
|
3601
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
3602
|
+
POSTGRES_15: "POSTGRES_15";
|
|
3603
|
+
POSTGRES_16: "POSTGRES_16";
|
|
3604
|
+
POSTGRES_17: "POSTGRES_17";
|
|
3605
|
+
}>>;
|
|
3606
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
3607
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
3608
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3609
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
3416
3610
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3417
3611
|
typ: z.ZodLiteral<"queue">;
|
|
3418
3612
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3544,6 +3738,7 @@ export declare const zUpdateNodeM2mData: z.ZodObject<{
|
|
|
3544
3738
|
database: "database";
|
|
3545
3739
|
neondb: "neondb";
|
|
3546
3740
|
mongodb: "mongodb";
|
|
3741
|
+
cloudsql: "cloudsql";
|
|
3547
3742
|
queue: "queue";
|
|
3548
3743
|
proxy: "proxy";
|
|
3549
3744
|
vm: "vm";
|
|
@@ -3658,6 +3853,28 @@ export declare const zUpdateNodeM2mData: z.ZodObject<{
|
|
|
3658
3853
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
3659
3854
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
3660
3855
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
3856
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3857
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
3858
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3859
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
3860
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
3861
|
+
"europe-west2": "europe-west2";
|
|
3862
|
+
}>>;
|
|
3863
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
3864
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
3865
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
3866
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
3867
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
3868
|
+
}>>;
|
|
3869
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
3870
|
+
POSTGRES_15: "POSTGRES_15";
|
|
3871
|
+
POSTGRES_16: "POSTGRES_16";
|
|
3872
|
+
POSTGRES_17: "POSTGRES_17";
|
|
3873
|
+
}>>;
|
|
3874
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
3875
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
3876
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3877
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
3661
3878
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3662
3879
|
typ: z.ZodLiteral<"queue">;
|
|
3663
3880
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3858,6 +4075,7 @@ export declare const zGetBlueprintM2mResponse: z.ZodObject<{
|
|
|
3858
4075
|
database: "database";
|
|
3859
4076
|
neondb: "neondb";
|
|
3860
4077
|
mongodb: "mongodb";
|
|
4078
|
+
cloudsql: "cloudsql";
|
|
3861
4079
|
queue: "queue";
|
|
3862
4080
|
proxy: "proxy";
|
|
3863
4081
|
vm: "vm";
|
|
@@ -3972,6 +4190,28 @@ export declare const zGetBlueprintM2mResponse: z.ZodObject<{
|
|
|
3972
4190
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
3973
4191
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
3974
4192
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
4193
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
4194
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
4195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4196
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
4197
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
4198
|
+
"europe-west2": "europe-west2";
|
|
4199
|
+
}>>;
|
|
4200
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
4201
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
4202
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
4203
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
4204
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
4205
|
+
}>>;
|
|
4206
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
4207
|
+
POSTGRES_15: "POSTGRES_15";
|
|
4208
|
+
POSTGRES_16: "POSTGRES_16";
|
|
4209
|
+
POSTGRES_17: "POSTGRES_17";
|
|
4210
|
+
}>>;
|
|
4211
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
4212
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
4213
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4214
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
3975
4215
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
3976
4216
|
typ: z.ZodLiteral<"queue">;
|
|
3977
4217
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -4766,6 +5006,7 @@ export declare const zPreviewBlueprintResponse: z.ZodObject<{
|
|
|
4766
5006
|
database: "database";
|
|
4767
5007
|
neondb: "neondb";
|
|
4768
5008
|
mongodb: "mongodb";
|
|
5009
|
+
cloudsql: "cloudsql";
|
|
4769
5010
|
queue: "queue";
|
|
4770
5011
|
proxy: "proxy";
|
|
4771
5012
|
vm: "vm";
|
|
@@ -4880,6 +5121,28 @@ export declare const zPreviewBlueprintResponse: z.ZodObject<{
|
|
|
4880
5121
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
4881
5122
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
4882
5123
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
5124
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
5125
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
5126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5127
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
5128
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
5129
|
+
"europe-west2": "europe-west2";
|
|
5130
|
+
}>>;
|
|
5131
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
5132
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
5133
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
5134
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
5135
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
5136
|
+
}>>;
|
|
5137
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
5138
|
+
POSTGRES_15: "POSTGRES_15";
|
|
5139
|
+
POSTGRES_16: "POSTGRES_16";
|
|
5140
|
+
POSTGRES_17: "POSTGRES_17";
|
|
5141
|
+
}>>;
|
|
5142
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
5143
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
5144
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5145
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
4883
5146
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
4884
5147
|
typ: z.ZodLiteral<"queue">;
|
|
4885
5148
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -5917,6 +6180,7 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
5917
6180
|
database: "database";
|
|
5918
6181
|
neondb: "neondb";
|
|
5919
6182
|
mongodb: "mongodb";
|
|
6183
|
+
cloudsql: "cloudsql";
|
|
5920
6184
|
queue: "queue";
|
|
5921
6185
|
proxy: "proxy";
|
|
5922
6186
|
vm: "vm";
|
|
@@ -6031,6 +6295,28 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
|
6031
6295
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
6032
6296
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
6033
6297
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
6298
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
6299
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
6300
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6301
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
6302
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
6303
|
+
"europe-west2": "europe-west2";
|
|
6304
|
+
}>>;
|
|
6305
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
6306
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
6307
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
6308
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
6309
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
6310
|
+
}>>;
|
|
6311
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
6312
|
+
POSTGRES_15: "POSTGRES_15";
|
|
6313
|
+
POSTGRES_16: "POSTGRES_16";
|
|
6314
|
+
POSTGRES_17: "POSTGRES_17";
|
|
6315
|
+
}>>;
|
|
6316
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
6317
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
6318
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6319
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
6034
6320
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
6035
6321
|
typ: z.ZodLiteral<"queue">;
|
|
6036
6322
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -6164,6 +6450,7 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
6164
6450
|
database: "database";
|
|
6165
6451
|
neondb: "neondb";
|
|
6166
6452
|
mongodb: "mongodb";
|
|
6453
|
+
cloudsql: "cloudsql";
|
|
6167
6454
|
queue: "queue";
|
|
6168
6455
|
proxy: "proxy";
|
|
6169
6456
|
vm: "vm";
|
|
@@ -6278,6 +6565,28 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
6278
6565
|
clusterType: z.ZodOptional<z.ZodString>;
|
|
6279
6566
|
backupEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
6280
6567
|
connectionString: z.ZodOptional<z.ZodString>;
|
|
6568
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
6569
|
+
typ: z.ZodLiteral<"cloudsql">;
|
|
6570
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6571
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
6572
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
6573
|
+
"europe-west2": "europe-west2";
|
|
6574
|
+
}>>;
|
|
6575
|
+
tier: z.ZodOptional<z.ZodEnum<{
|
|
6576
|
+
"db-custom-1-3840": "db-custom-1-3840";
|
|
6577
|
+
"db-custom-2-7680": "db-custom-2-7680";
|
|
6578
|
+
"db-custom-4-15360": "db-custom-4-15360";
|
|
6579
|
+
"db-custom-8-30720": "db-custom-8-30720";
|
|
6580
|
+
}>>;
|
|
6581
|
+
dbVersion: z.ZodOptional<z.ZodEnum<{
|
|
6582
|
+
POSTGRES_15: "POSTGRES_15";
|
|
6583
|
+
POSTGRES_16: "POSTGRES_16";
|
|
6584
|
+
POSTGRES_17: "POSTGRES_17";
|
|
6585
|
+
}>>;
|
|
6586
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
6587
|
+
storageSizeGb: z.ZodOptional<z.ZodInt>;
|
|
6588
|
+
allowedIps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6589
|
+
connectionUri: z.ZodOptional<z.ZodString>;
|
|
6281
6590
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
6282
6591
|
typ: z.ZodLiteral<"queue">;
|
|
6283
6592
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -546,6 +546,7 @@ export const zNodeType = z.enum([
|
|
|
546
546
|
'function',
|
|
547
547
|
'neondb',
|
|
548
548
|
'mongodb',
|
|
549
|
+
'cloudsql',
|
|
549
550
|
'queue',
|
|
550
551
|
'proxy',
|
|
551
552
|
'vm',
|
|
@@ -588,6 +589,17 @@ export const zDiskType = z.enum([
|
|
|
588
589
|
'hyperdisk-extreme',
|
|
589
590
|
'hyperdisk-throughput'
|
|
590
591
|
]);
|
|
592
|
+
export const zCloudSqlTier = z.enum([
|
|
593
|
+
'db-custom-1-3840',
|
|
594
|
+
'db-custom-2-7680',
|
|
595
|
+
'db-custom-4-15360',
|
|
596
|
+
'db-custom-8-30720'
|
|
597
|
+
]);
|
|
598
|
+
export const zCloudSqlDbVersion = z.enum([
|
|
599
|
+
'POSTGRES_15',
|
|
600
|
+
'POSTGRES_16',
|
|
601
|
+
'POSTGRES_17'
|
|
602
|
+
]);
|
|
591
603
|
export const zMachineType = z.enum([
|
|
592
604
|
'e2-micro',
|
|
593
605
|
'e2-small',
|
|
@@ -680,6 +692,16 @@ export const zMongoDbNodeProps = z.object({
|
|
|
680
692
|
backupEnabled: z.optional(z.boolean()),
|
|
681
693
|
connectionString: z.optional(z.string())
|
|
682
694
|
});
|
|
695
|
+
export const zCloudSqlNodeProps = z.object({
|
|
696
|
+
instanceName: z.optional(z.string()),
|
|
697
|
+
region: z.optional(zRegion),
|
|
698
|
+
tier: z.optional(zCloudSqlTier),
|
|
699
|
+
dbVersion: z.optional(zCloudSqlDbVersion),
|
|
700
|
+
dbName: z.optional(z.string()),
|
|
701
|
+
storageSizeGb: z.optional(z.int().gte(10)),
|
|
702
|
+
allowedIps: z.optional(z.array(z.string())),
|
|
703
|
+
connectionUri: z.optional(z.string())
|
|
704
|
+
});
|
|
683
705
|
export const zNodePingResponse = z.object({
|
|
684
706
|
healthy: z.boolean(),
|
|
685
707
|
status: z.optional(z.string()),
|
|
@@ -788,6 +810,9 @@ export const zNode = z.object({
|
|
|
788
810
|
z.object({
|
|
789
811
|
typ: z.literal('mongodb')
|
|
790
812
|
}).and(zMongoDbNodeProps),
|
|
813
|
+
z.object({
|
|
814
|
+
typ: z.literal('cloudsql')
|
|
815
|
+
}).and(zCloudSqlNodeProps),
|
|
791
816
|
z.object({
|
|
792
817
|
typ: z.literal('queue')
|
|
793
818
|
}).and(zQueueNodeProps),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetCustomerData, GetPlansData, UpdatePlanData, UpdatePlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, DeletePaymentMethodData, DeletePaymentMethodResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodResponses, GetInvoicesData, M2mGetCustomerData, M2mCreateCustomerData, M2mCreateCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanResponses } from "../../sdk/billing/types.gen";
|
|
3
|
+
import { GetCustomerData, GetPlansData, UpdatePlanData, UpdatePlanResponses, CreateSubscriptionData, CreateSubscriptionResponses, CreateSetupIntentData, CreateSetupIntentResponses, DeletePaymentMethodData, DeletePaymentMethodResponses, UpdateDefaultPaymentMethodData, UpdateDefaultPaymentMethodResponses, GetInvoicesData, M2mGetCustomerData, M2mCreateCustomerData, M2mCreateCustomerResponses, M2mUpdatePlanData, M2mUpdatePlanResponses } from "../../sdk/billing/types.gen";
|
|
4
4
|
export declare const useGetCustomer: (options: Omit<GetCustomerData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => {
|
|
@@ -423,6 +423,14 @@ export declare const useUpdatePlan: (config?: {
|
|
|
423
423
|
data: unknown;
|
|
424
424
|
headers: Record<string, string>;
|
|
425
425
|
}, unknown, Omit<UpdatePlanData, "url">, unknown>;
|
|
426
|
+
export declare const useCreateSubscription: (config?: {
|
|
427
|
+
onSuccess?: (data: GetSuccessResponse<CreateSubscriptionResponses>, headers: Record<string, string>) => void;
|
|
428
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
429
|
+
retry?: boolean;
|
|
430
|
+
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
431
|
+
data: unknown;
|
|
432
|
+
headers: Record<string, string>;
|
|
433
|
+
}, unknown, Omit<CreateSubscriptionData, "url">, unknown>;
|
|
426
434
|
export declare const useCreateSetupIntent: (config?: {
|
|
427
435
|
onSuccess?: (data: GetSuccessResponse<CreateSetupIntentResponses>, headers: Record<string, string>) => void;
|
|
428
436
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise, headersToObject } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getCustomer, getPlans, updatePlan, createSetupIntent, deletePaymentMethod, updateDefaultPaymentMethod, getInvoices, m2mGetCustomer, m2mCreateCustomer, m2mUpdatePlan } from "../../sdk/billing/sdk.gen";
|
|
5
|
+
import { getCustomer, getPlans, updatePlan, createSubscription, createSetupIntent, deletePaymentMethod, updateDefaultPaymentMethod, getInvoices, m2mGetCustomer, m2mCreateCustomer, m2mUpdatePlan } from "../../sdk/billing/sdk.gen";
|
|
6
6
|
export const useGetCustomer = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -66,6 +66,25 @@ export const useUpdatePlan = (config) => {
|
|
|
66
66
|
retry: config?.retry
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
+
export const useCreateSubscription = (config) => {
|
|
70
|
+
const token = useToken();
|
|
71
|
+
const queryClient = useQueryClient();
|
|
72
|
+
const opts = { throwOnError: true, url: "/api/v1/subscription/{org}" };
|
|
73
|
+
const funcer = async (options) => {
|
|
74
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
75
|
+
const res = await createSubscription({ ...opts, ...options, auth });
|
|
76
|
+
return { data: res.data, headers: headersToObject(res.response.headers) };
|
|
77
|
+
};
|
|
78
|
+
return useMutation({
|
|
79
|
+
mutationFn: funcer,
|
|
80
|
+
onSuccess: (res, options, c, ctx) => {
|
|
81
|
+
queryClient.invalidateQueries({ queryKey: ["api", "v1", "subscription", options?.path?.org] });
|
|
82
|
+
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
83
|
+
},
|
|
84
|
+
onError: config?.onError,
|
|
85
|
+
retry: config?.retry
|
|
86
|
+
});
|
|
87
|
+
};
|
|
69
88
|
export const useCreateSetupIntent = (config) => {
|
|
70
89
|
const token = useToken();
|
|
71
90
|
const queryClient = useQueryClient();
|