@leaflow/sdk 0.0.0-dev.363.gedb261b → 0.0.0-dev.365.gf6f57d1
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/billing/type/order/v1/generated/models.d.ts +11 -0
- package/dist/billing/type/order/v1/generated/models.js +5 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.d.ts +5 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.js +3 -0
- package/dist/billing/type/order/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
- package/dist/billing/v1/generated/functions.d.ts +47 -0
- package/dist/billing/v1/generated/functions.js +37 -0
- package/dist/billing/v1/generated/models.d.ts +11 -0
- package/dist/billing/v1/generated/models.js +5 -0
- package/dist/billing/v1/generated/schemas.zod.d.ts +19 -0
- package/dist/billing/v1/generated/schemas.zod.js +19 -0
- package/dist/billing/v1/generated/validators/billingAccount.zod.d.ts +5 -0
- package/dist/billing/v1/generated/validators/billingAccount.zod.js +3 -0
- package/dist/billing/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
- package/dist/canopy/v1/generated/models.d.ts +11 -0
- package/dist/canopy/v1/generated/models.js +5 -0
- package/dist/canopy/v1/generated/validators/billingAccount.zod.d.ts +5 -0
- package/dist/canopy/v1/generated/validators/billingAccount.zod.js +3 -0
- package/dist/canopy/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
- package/dist/membership/v1/generated/models.d.ts +11 -0
- package/dist/membership/v1/generated/models.js +5 -0
- package/dist/membership/v1/generated/validators/billingAccount.zod.d.ts +5 -0
- package/dist/membership/v1/generated/validators/billingAccount.zod.js +3 -0
- package/dist/membership/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
- package/dist/routes.d.ts +16 -0
- package/dist/routes.js +18 -0
- package/package.json +1 -1
|
@@ -718,6 +718,15 @@ export declare const BillingAccountStatus: {
|
|
|
718
718
|
readonly suspended: "suspended";
|
|
719
719
|
readonly closed: "closed";
|
|
720
720
|
};
|
|
721
|
+
/**
|
|
722
|
+
* Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you.
|
|
723
|
+
*/
|
|
724
|
+
export type BillingAccountSuspendedBy = (typeof BillingAccountSuspendedBy)[keyof typeof BillingAccountSuspendedBy];
|
|
725
|
+
export declare const BillingAccountSuspendedBy: {
|
|
726
|
+
readonly none: "none";
|
|
727
|
+
readonly owner: "owner";
|
|
728
|
+
readonly operator: "operator";
|
|
729
|
+
};
|
|
721
730
|
export interface BillingAccount {
|
|
722
731
|
/**
|
|
723
732
|
* The active contact used for invoices, of this account; null clears it.
|
|
@@ -730,6 +739,8 @@ export interface BillingAccount {
|
|
|
730
739
|
/** Fixed when the account was opened. */
|
|
731
740
|
currency: string;
|
|
732
741
|
status: BillingAccountStatus;
|
|
742
|
+
/** Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you. */
|
|
743
|
+
suspended_by: BillingAccountSuspendedBy;
|
|
733
744
|
/** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
|
|
734
745
|
grace_amount?: string;
|
|
735
746
|
/** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
|
|
@@ -87,6 +87,11 @@ export const BillingAccountStatus = {
|
|
|
87
87
|
suspended: "suspended",
|
|
88
88
|
closed: "closed",
|
|
89
89
|
};
|
|
90
|
+
export const BillingAccountSuspendedBy = {
|
|
91
|
+
none: "none",
|
|
92
|
+
owner: "owner",
|
|
93
|
+
operator: "operator",
|
|
94
|
+
};
|
|
90
95
|
export const BillingScheme = {
|
|
91
96
|
per_unit: "per_unit",
|
|
92
97
|
tiered: "tiered",
|
|
@@ -16,6 +16,11 @@ export declare const BillingAccount: zod.ZodObject<{
|
|
|
16
16
|
suspended: "suspended";
|
|
17
17
|
closed: "closed";
|
|
18
18
|
}>;
|
|
19
|
+
suspended_by: zod.ZodEnum<{
|
|
20
|
+
none: "none";
|
|
21
|
+
operator: "operator";
|
|
22
|
+
owner: "owner";
|
|
23
|
+
}>;
|
|
19
24
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
20
25
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
21
26
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
@@ -15,6 +15,9 @@ export const BillingAccount = zod.strictObject({
|
|
|
15
15
|
name: zod.string().optional().describe("Your name for the account."),
|
|
16
16
|
currency: zod.string().describe("Fixed when the account was opened."),
|
|
17
17
|
status: zod.enum(["active", "suspended", "closed"]),
|
|
18
|
+
suspended_by: zod
|
|
19
|
+
.enum(["none", "owner", "operator"])
|
|
20
|
+
.describe("Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you."),
|
|
18
21
|
grace_amount: zod
|
|
19
22
|
.string()
|
|
20
23
|
.optional()
|
|
@@ -17,6 +17,11 @@ export declare const BillingAccountList: zod.ZodObject<{
|
|
|
17
17
|
suspended: "suspended";
|
|
18
18
|
closed: "closed";
|
|
19
19
|
}>;
|
|
20
|
+
suspended_by: zod.ZodEnum<{
|
|
21
|
+
none: "none";
|
|
22
|
+
operator: "operator";
|
|
23
|
+
owner: "owner";
|
|
24
|
+
}>;
|
|
20
25
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
21
26
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
22
27
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
@@ -327,6 +327,53 @@ export declare const getUpdateBillingAccountUrl: (accountId: number) => string;
|
|
|
327
327
|
* @summary Update billing account
|
|
328
328
|
*/
|
|
329
329
|
export declare const updateBillingAccount: (accountId: number, billingAccountUpdate: BillingAccountUpdate, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateBillingAccountResponse>;
|
|
330
|
+
export type suspendBillingAccountResponse200 = {
|
|
331
|
+
data: BillingAccount;
|
|
332
|
+
status: 200;
|
|
333
|
+
};
|
|
334
|
+
export type suspendBillingAccountResponseDefault = {
|
|
335
|
+
data: ErrorResponse;
|
|
336
|
+
status: Exclude<HTTPStatusCodes, 200>;
|
|
337
|
+
};
|
|
338
|
+
export type suspendBillingAccountResponseSuccess = suspendBillingAccountResponse200 & {
|
|
339
|
+
headers: Headers;
|
|
340
|
+
};
|
|
341
|
+
export type suspendBillingAccountResponseError = suspendBillingAccountResponseDefault & {
|
|
342
|
+
headers: Headers;
|
|
343
|
+
};
|
|
344
|
+
export type suspendBillingAccountResponse = suspendBillingAccountResponseSuccess | suspendBillingAccountResponseError;
|
|
345
|
+
export declare const getSuspendBillingAccountUrl: (accountId: number) => string;
|
|
346
|
+
/**
|
|
347
|
+
* Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
|
|
348
|
+
* accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
|
|
349
|
+
* running services, their charges and the handling of arrears continue, and you can still top up and pay
|
|
350
|
+
* invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
|
|
351
|
+
* resource.
|
|
352
|
+
* @summary Suspend billing account
|
|
353
|
+
*/
|
|
354
|
+
export declare const suspendBillingAccount: (accountId: number, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<suspendBillingAccountResponse>;
|
|
355
|
+
export type resumeBillingAccountResponse200 = {
|
|
356
|
+
data: BillingAccount;
|
|
357
|
+
status: 200;
|
|
358
|
+
};
|
|
359
|
+
export type resumeBillingAccountResponseDefault = {
|
|
360
|
+
data: ErrorResponse;
|
|
361
|
+
status: Exclude<HTTPStatusCodes, 200>;
|
|
362
|
+
};
|
|
363
|
+
export type resumeBillingAccountResponseSuccess = resumeBillingAccountResponse200 & {
|
|
364
|
+
headers: Headers;
|
|
365
|
+
};
|
|
366
|
+
export type resumeBillingAccountResponseError = resumeBillingAccountResponseDefault & {
|
|
367
|
+
headers: Headers;
|
|
368
|
+
};
|
|
369
|
+
export type resumeBillingAccountResponse = resumeBillingAccountResponseSuccess | resumeBillingAccountResponseError;
|
|
370
|
+
export declare const getResumeBillingAccountUrl: (accountId: number) => string;
|
|
371
|
+
/**
|
|
372
|
+
* Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
|
|
373
|
+
* suspended it. Does not create a resource.
|
|
374
|
+
* @summary Resume billing account
|
|
375
|
+
*/
|
|
376
|
+
export declare const resumeBillingAccount: (accountId: number, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<resumeBillingAccountResponse>;
|
|
330
377
|
export type getAccountBalanceResponse200 = {
|
|
331
378
|
data: AccountBalance;
|
|
332
379
|
status: 200;
|
|
@@ -385,6 +385,43 @@ export const updateBillingAccount = async (accountId, billingAccountUpdate, opti
|
|
|
385
385
|
const data = body ? JSON.parse(body) : {};
|
|
386
386
|
return { data, status: res.status, headers: res.headers };
|
|
387
387
|
};
|
|
388
|
+
export const getSuspendBillingAccountUrl = (accountId) => {
|
|
389
|
+
return `https://billing.leaflow.cloud/api/v1/billing-accounts/${encodeURIComponent(String(accountId))}/suspend`;
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
|
|
393
|
+
* accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
|
|
394
|
+
* running services, their charges and the handling of arrears continue, and you can still top up and pay
|
|
395
|
+
* invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
|
|
396
|
+
* resource.
|
|
397
|
+
* @summary Suspend billing account
|
|
398
|
+
*/
|
|
399
|
+
export const suspendBillingAccount = async (accountId, options, fetchFn) => {
|
|
400
|
+
const res = await (fetchFn ?? fetch)(getSuspendBillingAccountUrl(accountId), {
|
|
401
|
+
...options,
|
|
402
|
+
method: "POST",
|
|
403
|
+
});
|
|
404
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
405
|
+
const data = body ? JSON.parse(body) : {};
|
|
406
|
+
return { data, status: res.status, headers: res.headers };
|
|
407
|
+
};
|
|
408
|
+
export const getResumeBillingAccountUrl = (accountId) => {
|
|
409
|
+
return `https://billing.leaflow.cloud/api/v1/billing-accounts/${encodeURIComponent(String(accountId))}/resume`;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
|
|
413
|
+
* suspended it. Does not create a resource.
|
|
414
|
+
* @summary Resume billing account
|
|
415
|
+
*/
|
|
416
|
+
export const resumeBillingAccount = async (accountId, options, fetchFn) => {
|
|
417
|
+
const res = await (fetchFn ?? fetch)(getResumeBillingAccountUrl(accountId), {
|
|
418
|
+
...options,
|
|
419
|
+
method: "POST",
|
|
420
|
+
});
|
|
421
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
422
|
+
const data = body ? JSON.parse(body) : {};
|
|
423
|
+
return { data, status: res.status, headers: res.headers };
|
|
424
|
+
};
|
|
388
425
|
export const getGetAccountBalanceUrl = (accountId) => {
|
|
389
426
|
return `https://billing.leaflow.cloud/api/v1/billing-accounts/${encodeURIComponent(String(accountId))}/balance`;
|
|
390
427
|
};
|
|
@@ -497,6 +497,15 @@ export declare const BillingAccountStatus: {
|
|
|
497
497
|
readonly suspended: "suspended";
|
|
498
498
|
readonly closed: "closed";
|
|
499
499
|
};
|
|
500
|
+
/**
|
|
501
|
+
* Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you.
|
|
502
|
+
*/
|
|
503
|
+
export type BillingAccountSuspendedBy = (typeof BillingAccountSuspendedBy)[keyof typeof BillingAccountSuspendedBy];
|
|
504
|
+
export declare const BillingAccountSuspendedBy: {
|
|
505
|
+
readonly none: "none";
|
|
506
|
+
readonly owner: "owner";
|
|
507
|
+
readonly operator: "operator";
|
|
508
|
+
};
|
|
500
509
|
export interface BillingAccount {
|
|
501
510
|
/**
|
|
502
511
|
* The active contact used for invoices, of this account; null clears it.
|
|
@@ -509,6 +518,8 @@ export interface BillingAccount {
|
|
|
509
518
|
/** Fixed when the account was opened. */
|
|
510
519
|
currency: string;
|
|
511
520
|
status: BillingAccountStatus;
|
|
521
|
+
/** Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you. */
|
|
522
|
+
suspended_by: BillingAccountSuspendedBy;
|
|
512
523
|
/** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
|
|
513
524
|
grace_amount?: string;
|
|
514
525
|
/** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
|
|
@@ -67,6 +67,11 @@ export const BillingAccountStatus = {
|
|
|
67
67
|
suspended: "suspended",
|
|
68
68
|
closed: "closed",
|
|
69
69
|
};
|
|
70
|
+
export const BillingAccountSuspendedBy = {
|
|
71
|
+
none: "none",
|
|
72
|
+
owner: "owner",
|
|
73
|
+
operator: "operator",
|
|
74
|
+
};
|
|
70
75
|
export const BillingScheme = {
|
|
71
76
|
per_unit: "per_unit",
|
|
72
77
|
tiered: "tiered",
|
|
@@ -178,6 +178,25 @@ export declare const UpdateBillingAccountBody: zod.ZodObject<{
|
|
|
178
178
|
invoice_contact_id: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
|
|
179
179
|
name: zod.ZodOptional<zod.ZodString>;
|
|
180
180
|
}, zod.z.core.$strict>;
|
|
181
|
+
/**
|
|
182
|
+
* Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
|
|
183
|
+
* accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
|
|
184
|
+
* running services, their charges and the handling of arrears continue, and you can still top up and pay
|
|
185
|
+
* invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
|
|
186
|
+
* resource.
|
|
187
|
+
* @summary Suspend billing account
|
|
188
|
+
*/
|
|
189
|
+
export declare const SuspendBillingAccountParams: zod.ZodObject<{
|
|
190
|
+
accountId: zod.ZodInt;
|
|
191
|
+
}, zod.z.core.$strict>;
|
|
192
|
+
/**
|
|
193
|
+
* Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
|
|
194
|
+
* suspended it. Does not create a resource.
|
|
195
|
+
* @summary Resume billing account
|
|
196
|
+
*/
|
|
197
|
+
export declare const ResumeBillingAccountParams: zod.ZodObject<{
|
|
198
|
+
accountId: zod.ZodInt;
|
|
199
|
+
}, zod.z.core.$strict>;
|
|
181
200
|
/**
|
|
182
201
|
* The balance of your account, with credit groups, unpaid invoice amounts, unbilled estimates and pending returns. Returns 404 for a missing account and 403 for another user's account.
|
|
183
202
|
* @summary Get account balance
|
|
@@ -204,6 +204,25 @@ export const UpdateBillingAccountParams = zod.strictObject({
|
|
|
204
204
|
accountId: zod.int(),
|
|
205
205
|
});
|
|
206
206
|
export const UpdateBillingAccountBody = BillingAccountUpdate;
|
|
207
|
+
/**
|
|
208
|
+
* Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
|
|
209
|
+
* accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
|
|
210
|
+
* running services, their charges and the handling of arrears continue, and you can still top up and pay
|
|
211
|
+
* invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
|
|
212
|
+
* resource.
|
|
213
|
+
* @summary Suspend billing account
|
|
214
|
+
*/
|
|
215
|
+
export const SuspendBillingAccountParams = zod.strictObject({
|
|
216
|
+
accountId: zod.int(),
|
|
217
|
+
});
|
|
218
|
+
/**
|
|
219
|
+
* Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
|
|
220
|
+
* suspended it. Does not create a resource.
|
|
221
|
+
* @summary Resume billing account
|
|
222
|
+
*/
|
|
223
|
+
export const ResumeBillingAccountParams = zod.strictObject({
|
|
224
|
+
accountId: zod.int(),
|
|
225
|
+
});
|
|
207
226
|
/**
|
|
208
227
|
* The balance of your account, with credit groups, unpaid invoice amounts, unbilled estimates and pending returns. Returns 404 for a missing account and 403 for another user's account.
|
|
209
228
|
* @summary Get account balance
|
|
@@ -16,6 +16,11 @@ export declare const BillingAccount: zod.ZodObject<{
|
|
|
16
16
|
suspended: "suspended";
|
|
17
17
|
closed: "closed";
|
|
18
18
|
}>;
|
|
19
|
+
suspended_by: zod.ZodEnum<{
|
|
20
|
+
none: "none";
|
|
21
|
+
operator: "operator";
|
|
22
|
+
owner: "owner";
|
|
23
|
+
}>;
|
|
19
24
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
20
25
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
21
26
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
@@ -15,6 +15,9 @@ export const BillingAccount = zod.strictObject({
|
|
|
15
15
|
name: zod.string().optional().describe("Your name for the account."),
|
|
16
16
|
currency: zod.string().describe("Fixed when the account was opened."),
|
|
17
17
|
status: zod.enum(["active", "suspended", "closed"]),
|
|
18
|
+
suspended_by: zod
|
|
19
|
+
.enum(["none", "owner", "operator"])
|
|
20
|
+
.describe("Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you."),
|
|
18
21
|
grace_amount: zod
|
|
19
22
|
.string()
|
|
20
23
|
.optional()
|
|
@@ -17,6 +17,11 @@ export declare const BillingAccountList: zod.ZodObject<{
|
|
|
17
17
|
suspended: "suspended";
|
|
18
18
|
closed: "closed";
|
|
19
19
|
}>;
|
|
20
|
+
suspended_by: zod.ZodEnum<{
|
|
21
|
+
none: "none";
|
|
22
|
+
operator: "operator";
|
|
23
|
+
owner: "owner";
|
|
24
|
+
}>;
|
|
20
25
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
21
26
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
22
27
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
@@ -1403,6 +1403,15 @@ export declare const BillingAccountStatus: {
|
|
|
1403
1403
|
readonly suspended: "suspended";
|
|
1404
1404
|
readonly closed: "closed";
|
|
1405
1405
|
};
|
|
1406
|
+
/**
|
|
1407
|
+
* Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you.
|
|
1408
|
+
*/
|
|
1409
|
+
export type BillingAccountSuspendedBy = (typeof BillingAccountSuspendedBy)[keyof typeof BillingAccountSuspendedBy];
|
|
1410
|
+
export declare const BillingAccountSuspendedBy: {
|
|
1411
|
+
readonly none: "none";
|
|
1412
|
+
readonly owner: "owner";
|
|
1413
|
+
readonly operator: "operator";
|
|
1414
|
+
};
|
|
1406
1415
|
export interface BillingAccount {
|
|
1407
1416
|
/**
|
|
1408
1417
|
* The active contact used for invoices, of this account; null clears it.
|
|
@@ -1415,6 +1424,8 @@ export interface BillingAccount {
|
|
|
1415
1424
|
/** Fixed when the account was opened. */
|
|
1416
1425
|
currency: string;
|
|
1417
1426
|
status: BillingAccountStatus;
|
|
1427
|
+
/** Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you. */
|
|
1428
|
+
suspended_by: BillingAccountSuspendedBy;
|
|
1418
1429
|
/** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
|
|
1419
1430
|
grace_amount?: string;
|
|
1420
1431
|
/** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
|
|
@@ -161,6 +161,11 @@ export const BillingAccountStatus = {
|
|
|
161
161
|
suspended: "suspended",
|
|
162
162
|
closed: "closed",
|
|
163
163
|
};
|
|
164
|
+
export const BillingAccountSuspendedBy = {
|
|
165
|
+
none: "none",
|
|
166
|
+
owner: "owner",
|
|
167
|
+
operator: "operator",
|
|
168
|
+
};
|
|
164
169
|
export const BillingScheme = {
|
|
165
170
|
per_unit: "per_unit",
|
|
166
171
|
tiered: "tiered",
|
|
@@ -49,6 +49,11 @@ export declare const BillingAccount: zod.ZodObject<{
|
|
|
49
49
|
suspended: "suspended";
|
|
50
50
|
closed: "closed";
|
|
51
51
|
}>;
|
|
52
|
+
suspended_by: zod.ZodEnum<{
|
|
53
|
+
none: "none";
|
|
54
|
+
operator: "operator";
|
|
55
|
+
owner: "owner";
|
|
56
|
+
}>;
|
|
52
57
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
53
58
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
54
59
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
@@ -48,6 +48,9 @@ export const BillingAccount = zod.strictObject({
|
|
|
48
48
|
name: zod.string().optional().describe("Your name for the account."),
|
|
49
49
|
currency: zod.string().describe("Fixed when the account was opened."),
|
|
50
50
|
status: zod.enum(["active", "suspended", "closed"]),
|
|
51
|
+
suspended_by: zod
|
|
52
|
+
.enum(["none", "owner", "operator"])
|
|
53
|
+
.describe("Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you."),
|
|
51
54
|
grace_amount: zod
|
|
52
55
|
.string()
|
|
53
56
|
.optional()
|
|
@@ -50,6 +50,11 @@ export declare const BillingAccountList: zod.ZodObject<{
|
|
|
50
50
|
suspended: "suspended";
|
|
51
51
|
closed: "closed";
|
|
52
52
|
}>;
|
|
53
|
+
suspended_by: zod.ZodEnum<{
|
|
54
|
+
none: "none";
|
|
55
|
+
operator: "operator";
|
|
56
|
+
owner: "owner";
|
|
57
|
+
}>;
|
|
53
58
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
54
59
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
55
60
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
@@ -1012,6 +1012,15 @@ export declare const BillingAccountStatus: {
|
|
|
1012
1012
|
readonly suspended: "suspended";
|
|
1013
1013
|
readonly closed: "closed";
|
|
1014
1014
|
};
|
|
1015
|
+
/**
|
|
1016
|
+
* Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you.
|
|
1017
|
+
*/
|
|
1018
|
+
export type BillingAccountSuspendedBy = (typeof BillingAccountSuspendedBy)[keyof typeof BillingAccountSuspendedBy];
|
|
1019
|
+
export declare const BillingAccountSuspendedBy: {
|
|
1020
|
+
readonly none: "none";
|
|
1021
|
+
readonly owner: "owner";
|
|
1022
|
+
readonly operator: "operator";
|
|
1023
|
+
};
|
|
1015
1024
|
export interface BillingAccount {
|
|
1016
1025
|
/**
|
|
1017
1026
|
* The active contact used for invoices, of this account; null clears it.
|
|
@@ -1024,6 +1033,8 @@ export interface BillingAccount {
|
|
|
1024
1033
|
/** Fixed when the account was opened. */
|
|
1025
1034
|
currency: string;
|
|
1026
1035
|
status: BillingAccountStatus;
|
|
1036
|
+
/** Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you. */
|
|
1037
|
+
suspended_by: BillingAccountSuspendedBy;
|
|
1027
1038
|
/** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
|
|
1028
1039
|
grace_amount?: string;
|
|
1029
1040
|
/** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
|
|
@@ -128,6 +128,11 @@ export const BillingAccountStatus = {
|
|
|
128
128
|
suspended: "suspended",
|
|
129
129
|
closed: "closed",
|
|
130
130
|
};
|
|
131
|
+
export const BillingAccountSuspendedBy = {
|
|
132
|
+
none: "none",
|
|
133
|
+
owner: "owner",
|
|
134
|
+
operator: "operator",
|
|
135
|
+
};
|
|
131
136
|
export const BillingScheme = {
|
|
132
137
|
per_unit: "per_unit",
|
|
133
138
|
tiered: "tiered",
|
|
@@ -16,6 +16,11 @@ export declare const BillingAccount: zod.ZodObject<{
|
|
|
16
16
|
suspended: "suspended";
|
|
17
17
|
closed: "closed";
|
|
18
18
|
}>;
|
|
19
|
+
suspended_by: zod.ZodEnum<{
|
|
20
|
+
none: "none";
|
|
21
|
+
operator: "operator";
|
|
22
|
+
owner: "owner";
|
|
23
|
+
}>;
|
|
19
24
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
20
25
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
21
26
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
@@ -15,6 +15,9 @@ export const BillingAccount = zod.strictObject({
|
|
|
15
15
|
name: zod.string().optional().describe("Your name for the account."),
|
|
16
16
|
currency: zod.string().describe("Fixed when the account was opened."),
|
|
17
17
|
status: zod.enum(["active", "suspended", "closed"]),
|
|
18
|
+
suspended_by: zod
|
|
19
|
+
.enum(["none", "owner", "operator"])
|
|
20
|
+
.describe("Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you."),
|
|
18
21
|
grace_amount: zod
|
|
19
22
|
.string()
|
|
20
23
|
.optional()
|
|
@@ -17,6 +17,11 @@ export declare const BillingAccountList: zod.ZodObject<{
|
|
|
17
17
|
suspended: "suspended";
|
|
18
18
|
closed: "closed";
|
|
19
19
|
}>;
|
|
20
|
+
suspended_by: zod.ZodEnum<{
|
|
21
|
+
none: "none";
|
|
22
|
+
operator: "operator";
|
|
23
|
+
owner: "owner";
|
|
24
|
+
}>;
|
|
20
25
|
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
21
26
|
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
22
27
|
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
package/dist/routes.d.ts
CHANGED
|
@@ -886,6 +886,22 @@ export declare const routes: readonly [{
|
|
|
886
886
|
readonly operationId: "update-billing-account";
|
|
887
887
|
readonly securityScheme: "AccessToken";
|
|
888
888
|
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
889
|
+
}, {
|
|
890
|
+
readonly service: "billing";
|
|
891
|
+
readonly contract: "billing";
|
|
892
|
+
readonly method: "POST";
|
|
893
|
+
readonly path: "/api/v1/billing-accounts/{accountId}/suspend";
|
|
894
|
+
readonly operationId: "suspend-billing-account";
|
|
895
|
+
readonly securityScheme: "AccessToken";
|
|
896
|
+
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
897
|
+
}, {
|
|
898
|
+
readonly service: "billing";
|
|
899
|
+
readonly contract: "billing";
|
|
900
|
+
readonly method: "POST";
|
|
901
|
+
readonly path: "/api/v1/billing-accounts/{accountId}/resume";
|
|
902
|
+
readonly operationId: "resume-billing-account";
|
|
903
|
+
readonly securityScheme: "AccessToken";
|
|
904
|
+
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
889
905
|
}, {
|
|
890
906
|
readonly service: "billing";
|
|
891
907
|
readonly contract: "billing";
|
package/dist/routes.js
CHANGED
|
@@ -999,6 +999,24 @@ export const routes = [
|
|
|
999
999
|
securityScheme: "AccessToken",
|
|
1000
1000
|
upstreamUrl: "https://billing.leaflow.cloud",
|
|
1001
1001
|
},
|
|
1002
|
+
{
|
|
1003
|
+
service: "billing",
|
|
1004
|
+
contract: "billing",
|
|
1005
|
+
method: "POST",
|
|
1006
|
+
path: "/api/v1/billing-accounts/{accountId}/suspend",
|
|
1007
|
+
operationId: "suspend-billing-account",
|
|
1008
|
+
securityScheme: "AccessToken",
|
|
1009
|
+
upstreamUrl: "https://billing.leaflow.cloud",
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
service: "billing",
|
|
1013
|
+
contract: "billing",
|
|
1014
|
+
method: "POST",
|
|
1015
|
+
path: "/api/v1/billing-accounts/{accountId}/resume",
|
|
1016
|
+
operationId: "resume-billing-account",
|
|
1017
|
+
securityScheme: "AccessToken",
|
|
1018
|
+
upstreamUrl: "https://billing.leaflow.cloud",
|
|
1019
|
+
},
|
|
1002
1020
|
{
|
|
1003
1021
|
service: "billing",
|
|
1004
1022
|
contract: "billing",
|