@leaflow/sdk 0.116.0 → 0.117.0
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/v1/generated/functions.d.ts +172 -35
- package/dist/billing/v1/generated/functions.js +199 -29
- package/dist/billing/v1/generated/models.d.ts +245 -103
- package/dist/billing/v1/generated/models.js +14 -5
- package/dist/billing/v1/generated/schemas.zod.d.ts +125 -31
- package/dist/billing/v1/generated/schemas.zod.js +128 -22
- package/dist/billing/v1/generated/validators/accountBalance.zod.d.ts +3 -1
- package/dist/billing/v1/generated/validators/accountBalance.zod.js +5 -3
- package/dist/billing/v1/generated/validators/billingAccount.zod.d.ts +1 -9
- package/dist/billing/v1/generated/validators/billingAccount.zod.js +4 -12
- package/dist/billing/v1/generated/validators/billingAccountCreate.zod.d.ts +0 -4
- package/dist/billing/v1/generated/validators/billingAccountCreate.zod.js +0 -4
- package/dist/billing/v1/generated/validators/billingAccountList.zod.d.ts +1 -9
- package/dist/billing/v1/generated/validators/billingAccountUpdate.zod.d.ts +1 -19
- package/dist/billing/v1/generated/validators/billingAccountUpdate.zod.js +4 -23
- package/dist/billing/v1/generated/validators/contact.zod.d.ts +37 -0
- package/dist/billing/v1/generated/validators/contact.zod.js +37 -0
- package/dist/billing/v1/generated/validators/contactCreate.zod.d.ts +32 -0
- package/dist/billing/v1/generated/validators/contactCreate.zod.js +30 -0
- package/dist/billing/v1/generated/validators/contactList.zod.d.ts +34 -0
- package/dist/billing/v1/generated/validators/contactList.zod.js +14 -0
- package/dist/billing/v1/generated/validators/contactUpdate.zod.d.ts +33 -0
- package/dist/billing/v1/generated/validators/contactUpdate.zod.js +31 -0
- package/dist/billing/v1/generated/validators/getStatementUsageParams.zod.d.ts +29 -0
- package/dist/billing/v1/generated/validators/getStatementUsageParams.zod.js +33 -0
- package/dist/billing/v1/generated/validators/invoice.zod.d.ts +1 -6
- package/dist/billing/v1/generated/validators/invoice.zod.js +4 -8
- package/dist/billing/v1/generated/validators/invoiceItem.zod.d.ts +0 -2
- package/dist/billing/v1/generated/validators/invoiceItem.zod.js +0 -5
- package/dist/billing/v1/generated/validators/invoiceItemList.zod.d.ts +0 -2
- package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +1 -6
- package/dist/billing/v1/generated/validators/invoiceStatus.zod.js +1 -1
- package/dist/billing/v1/generated/validators/listContactsParams.zod.d.ts +18 -0
- package/dist/billing/v1/generated/validators/listContactsParams.zod.js +20 -0
- package/dist/billing/v1/generated/validators/listStatementsParams.zod.d.ts +25 -0
- package/dist/billing/v1/generated/validators/listStatementsParams.zod.js +25 -0
- package/dist/billing/v1/generated/validators/listUsageChargesParams.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/listUsageChargesParams.zod.js +1 -0
- package/dist/billing/v1/generated/validators/order.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/orderItem.zod.js +4 -0
- package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/orderList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/statement.zod.d.ts +34 -0
- package/dist/billing/v1/generated/validators/statement.zod.js +36 -0
- package/dist/billing/v1/generated/validators/statementAmounts.zod.d.ts +16 -0
- package/dist/billing/v1/generated/validators/statementAmounts.zod.js +15 -0
- package/dist/billing/v1/generated/validators/statementItem.zod.d.ts +20 -0
- package/dist/billing/v1/generated/validators/statementItem.zod.js +25 -0
- package/dist/billing/v1/generated/validators/statementList.zod.d.ts +41 -0
- package/dist/billing/v1/generated/validators/statementList.zod.js +14 -0
- package/dist/billing/v1/generated/validators/statementStatus.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/statementStatus.zod.js +9 -0
- package/dist/billing/v1/generated/validators/statementSummary.zod.d.ts +36 -0
- package/dist/billing/v1/generated/validators/statementSummary.zod.js +19 -0
- package/dist/billing/v1/generated/validators/usageCharge.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/usageCharge.zod.js +1 -0
- package/dist/billing/v1/generated/validators/usageChargeList.zod.d.ts +1 -0
- package/dist/routes.d.ts +64 -8
- package/dist/routes.js +72 -9
- package/package.json +1 -1
- package/dist/billing/v1/generated/validators/meteredUsage.zod.d.ts +0 -20
- package/dist/billing/v1/generated/validators/meteredUsage.zod.js +0 -27
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const contactNameMax = 255;
|
|
10
|
+
export declare const contactLegalNameMax = 255;
|
|
11
|
+
export declare const contactEmailMax = 255;
|
|
12
|
+
export declare const contactTaxIdMax = 64;
|
|
13
|
+
export declare const contactAddressLine1Max = 255;
|
|
14
|
+
export declare const contactAddressLine2Max = 255;
|
|
15
|
+
export declare const contactAddressCityMax = 128;
|
|
16
|
+
export declare const contactAddressStateMax = 128;
|
|
17
|
+
export declare const contactAddressPostalCodeMax = 32;
|
|
18
|
+
export declare const contactAddressCountryRegExp: RegExp;
|
|
19
|
+
export declare const Contact: zod.ZodObject<{
|
|
20
|
+
id: zod.ZodUUID;
|
|
21
|
+
billing_account_id: zod.ZodInt;
|
|
22
|
+
name: zod.ZodString;
|
|
23
|
+
legal_name: zod.ZodOptional<zod.ZodString>;
|
|
24
|
+
email: zod.ZodOptional<zod.ZodString>;
|
|
25
|
+
tax_id: zod.ZodOptional<zod.ZodString>;
|
|
26
|
+
address_line1: zod.ZodOptional<zod.ZodString>;
|
|
27
|
+
address_line2: zod.ZodOptional<zod.ZodString>;
|
|
28
|
+
address_city: zod.ZodOptional<zod.ZodString>;
|
|
29
|
+
address_state: zod.ZodOptional<zod.ZodString>;
|
|
30
|
+
address_postal_code: zod.ZodOptional<zod.ZodString>;
|
|
31
|
+
address_country: zod.ZodOptional<zod.ZodString>;
|
|
32
|
+
tax_exempt: zod.ZodBoolean;
|
|
33
|
+
active: zod.ZodBoolean;
|
|
34
|
+
created_at: zod.z.ZodISODateTime;
|
|
35
|
+
}, zod.z.core.$strict>;
|
|
36
|
+
export type Contact = zod.input<typeof Contact>;
|
|
37
|
+
export type ContactOutput = zod.output<typeof Contact>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const contactNameMax = 255;
|
|
10
|
+
export const contactLegalNameMax = 255;
|
|
11
|
+
export const contactEmailMax = 255;
|
|
12
|
+
export const contactTaxIdMax = 64;
|
|
13
|
+
export const contactAddressLine1Max = 255;
|
|
14
|
+
export const contactAddressLine2Max = 255;
|
|
15
|
+
export const contactAddressCityMax = 128;
|
|
16
|
+
export const contactAddressStateMax = 128;
|
|
17
|
+
export const contactAddressPostalCodeMax = 32;
|
|
18
|
+
export const contactAddressCountryRegExp = new RegExp("^([A-Z]{2})?$");
|
|
19
|
+
export const Contact = zod
|
|
20
|
+
.strictObject({
|
|
21
|
+
id: zod.uuid(),
|
|
22
|
+
billing_account_id: zod.int(),
|
|
23
|
+
name: zod.string().min(1).max(contactNameMax),
|
|
24
|
+
legal_name: zod.string().max(contactLegalNameMax).optional(),
|
|
25
|
+
email: zod.string().max(contactEmailMax).optional(),
|
|
26
|
+
tax_id: zod.string().max(contactTaxIdMax).optional(),
|
|
27
|
+
address_line1: zod.string().max(contactAddressLine1Max).optional(),
|
|
28
|
+
address_line2: zod.string().max(contactAddressLine2Max).optional(),
|
|
29
|
+
address_city: zod.string().max(contactAddressCityMax).optional(),
|
|
30
|
+
address_state: zod.string().max(contactAddressStateMax).optional(),
|
|
31
|
+
address_postal_code: zod.string().max(contactAddressPostalCodeMax).optional(),
|
|
32
|
+
address_country: zod.string().regex(contactAddressCountryRegExp).optional(),
|
|
33
|
+
tax_exempt: zod.boolean(),
|
|
34
|
+
active: zod.boolean(),
|
|
35
|
+
created_at: zod.iso.datetime({ offset: true }),
|
|
36
|
+
})
|
|
37
|
+
.describe("A billing-account contact profile with one address. An account can hold multiple contacts; this is not a login identity.");
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const contactCreateNameMax = 255;
|
|
10
|
+
export declare const contactCreateLegalNameMax = 255;
|
|
11
|
+
export declare const contactCreateEmailMax = 255;
|
|
12
|
+
export declare const contactCreateTaxIdMax = 64;
|
|
13
|
+
export declare const contactCreateAddressLine1Max = 255;
|
|
14
|
+
export declare const contactCreateAddressLine2Max = 255;
|
|
15
|
+
export declare const contactCreateAddressCityMax = 128;
|
|
16
|
+
export declare const contactCreateAddressStateMax = 128;
|
|
17
|
+
export declare const contactCreateAddressPostalCodeMax = 32;
|
|
18
|
+
export declare const contactCreateAddressCountryRegExp: RegExp;
|
|
19
|
+
export declare const ContactCreate: zod.ZodObject<{
|
|
20
|
+
name: zod.ZodString;
|
|
21
|
+
legal_name: zod.ZodOptional<zod.ZodString>;
|
|
22
|
+
email: zod.ZodOptional<zod.ZodString>;
|
|
23
|
+
tax_id: zod.ZodOptional<zod.ZodString>;
|
|
24
|
+
address_line1: zod.ZodOptional<zod.ZodString>;
|
|
25
|
+
address_line2: zod.ZodOptional<zod.ZodString>;
|
|
26
|
+
address_city: zod.ZodOptional<zod.ZodString>;
|
|
27
|
+
address_state: zod.ZodOptional<zod.ZodString>;
|
|
28
|
+
address_postal_code: zod.ZodOptional<zod.ZodString>;
|
|
29
|
+
address_country: zod.ZodOptional<zod.ZodString>;
|
|
30
|
+
}, zod.z.core.$strict>;
|
|
31
|
+
export type ContactCreate = zod.input<typeof ContactCreate>;
|
|
32
|
+
export type ContactCreateOutput = zod.output<typeof ContactCreate>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const contactCreateNameMax = 255;
|
|
10
|
+
export const contactCreateLegalNameMax = 255;
|
|
11
|
+
export const contactCreateEmailMax = 255;
|
|
12
|
+
export const contactCreateTaxIdMax = 64;
|
|
13
|
+
export const contactCreateAddressLine1Max = 255;
|
|
14
|
+
export const contactCreateAddressLine2Max = 255;
|
|
15
|
+
export const contactCreateAddressCityMax = 128;
|
|
16
|
+
export const contactCreateAddressStateMax = 128;
|
|
17
|
+
export const contactCreateAddressPostalCodeMax = 32;
|
|
18
|
+
export const contactCreateAddressCountryRegExp = new RegExp("^([A-Z]{2})?$");
|
|
19
|
+
export const ContactCreate = zod.strictObject({
|
|
20
|
+
name: zod.string().min(1).max(contactCreateNameMax),
|
|
21
|
+
legal_name: zod.string().max(contactCreateLegalNameMax).optional(),
|
|
22
|
+
email: zod.string().max(contactCreateEmailMax).optional(),
|
|
23
|
+
tax_id: zod.string().max(contactCreateTaxIdMax).optional(),
|
|
24
|
+
address_line1: zod.string().max(contactCreateAddressLine1Max).optional(),
|
|
25
|
+
address_line2: zod.string().max(contactCreateAddressLine2Max).optional(),
|
|
26
|
+
address_city: zod.string().max(contactCreateAddressCityMax).optional(),
|
|
27
|
+
address_state: zod.string().max(contactCreateAddressStateMax).optional(),
|
|
28
|
+
address_postal_code: zod.string().max(contactCreateAddressPostalCodeMax).optional(),
|
|
29
|
+
address_country: zod.string().regex(contactCreateAddressCountryRegExp).optional(),
|
|
30
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const ContactList: zod.ZodObject<{
|
|
10
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
11
|
+
id: zod.ZodUUID;
|
|
12
|
+
billing_account_id: zod.ZodInt;
|
|
13
|
+
name: zod.ZodString;
|
|
14
|
+
legal_name: zod.ZodOptional<zod.ZodString>;
|
|
15
|
+
email: zod.ZodOptional<zod.ZodString>;
|
|
16
|
+
tax_id: zod.ZodOptional<zod.ZodString>;
|
|
17
|
+
address_line1: zod.ZodOptional<zod.ZodString>;
|
|
18
|
+
address_line2: zod.ZodOptional<zod.ZodString>;
|
|
19
|
+
address_city: zod.ZodOptional<zod.ZodString>;
|
|
20
|
+
address_state: zod.ZodOptional<zod.ZodString>;
|
|
21
|
+
address_postal_code: zod.ZodOptional<zod.ZodString>;
|
|
22
|
+
address_country: zod.ZodOptional<zod.ZodString>;
|
|
23
|
+
tax_exempt: zod.ZodBoolean;
|
|
24
|
+
active: zod.ZodBoolean;
|
|
25
|
+
created_at: zod.z.ZodISODateTime;
|
|
26
|
+
}, zod.z.core.$strict>>;
|
|
27
|
+
pagination: zod.ZodObject<{
|
|
28
|
+
page: zod.ZodInt;
|
|
29
|
+
page_size: zod.ZodInt;
|
|
30
|
+
total_count: zod.ZodOptional<zod.ZodInt>;
|
|
31
|
+
}, zod.z.core.$strict>;
|
|
32
|
+
}, zod.z.core.$strict>;
|
|
33
|
+
export type ContactList = zod.input<typeof ContactList>;
|
|
34
|
+
export type ContactListOutput = zod.output<typeof ContactList>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { Contact } from "./contact.zod.js";
|
|
10
|
+
import { OffsetPagination } from "./offsetPagination.zod.js";
|
|
11
|
+
export const ContactList = zod.strictObject({
|
|
12
|
+
items: zod.array(Contact),
|
|
13
|
+
pagination: OffsetPagination,
|
|
14
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const contactUpdateNameMax = 255;
|
|
10
|
+
export declare const contactUpdateLegalNameMax = 255;
|
|
11
|
+
export declare const contactUpdateEmailMax = 255;
|
|
12
|
+
export declare const contactUpdateTaxIdMax = 64;
|
|
13
|
+
export declare const contactUpdateAddressLine1Max = 255;
|
|
14
|
+
export declare const contactUpdateAddressLine2Max = 255;
|
|
15
|
+
export declare const contactUpdateAddressCityMax = 128;
|
|
16
|
+
export declare const contactUpdateAddressStateMax = 128;
|
|
17
|
+
export declare const contactUpdateAddressPostalCodeMax = 32;
|
|
18
|
+
export declare const contactUpdateAddressCountryRegExp: RegExp;
|
|
19
|
+
export declare const ContactUpdate: zod.ZodObject<{
|
|
20
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
21
|
+
legal_name: zod.ZodOptional<zod.ZodString>;
|
|
22
|
+
email: zod.ZodOptional<zod.ZodString>;
|
|
23
|
+
tax_id: zod.ZodOptional<zod.ZodString>;
|
|
24
|
+
address_line1: zod.ZodOptional<zod.ZodString>;
|
|
25
|
+
address_line2: zod.ZodOptional<zod.ZodString>;
|
|
26
|
+
address_city: zod.ZodOptional<zod.ZodString>;
|
|
27
|
+
address_state: zod.ZodOptional<zod.ZodString>;
|
|
28
|
+
address_postal_code: zod.ZodOptional<zod.ZodString>;
|
|
29
|
+
address_country: zod.ZodOptional<zod.ZodString>;
|
|
30
|
+
active: zod.ZodOptional<zod.ZodBoolean>;
|
|
31
|
+
}, zod.z.core.$strict>;
|
|
32
|
+
export type ContactUpdate = zod.input<typeof ContactUpdate>;
|
|
33
|
+
export type ContactUpdateOutput = zod.output<typeof ContactUpdate>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const contactUpdateNameMax = 255;
|
|
10
|
+
export const contactUpdateLegalNameMax = 255;
|
|
11
|
+
export const contactUpdateEmailMax = 255;
|
|
12
|
+
export const contactUpdateTaxIdMax = 64;
|
|
13
|
+
export const contactUpdateAddressLine1Max = 255;
|
|
14
|
+
export const contactUpdateAddressLine2Max = 255;
|
|
15
|
+
export const contactUpdateAddressCityMax = 128;
|
|
16
|
+
export const contactUpdateAddressStateMax = 128;
|
|
17
|
+
export const contactUpdateAddressPostalCodeMax = 32;
|
|
18
|
+
export const contactUpdateAddressCountryRegExp = new RegExp("^([A-Z]{2})?$");
|
|
19
|
+
export const ContactUpdate = zod.strictObject({
|
|
20
|
+
name: zod.string().min(1).max(contactUpdateNameMax).optional(),
|
|
21
|
+
legal_name: zod.string().max(contactUpdateLegalNameMax).optional(),
|
|
22
|
+
email: zod.string().max(contactUpdateEmailMax).optional(),
|
|
23
|
+
tax_id: zod.string().max(contactUpdateTaxIdMax).optional(),
|
|
24
|
+
address_line1: zod.string().max(contactUpdateAddressLine1Max).optional(),
|
|
25
|
+
address_line2: zod.string().max(contactUpdateAddressLine2Max).optional(),
|
|
26
|
+
address_city: zod.string().max(contactUpdateAddressCityMax).optional(),
|
|
27
|
+
address_state: zod.string().max(contactUpdateAddressStateMax).optional(),
|
|
28
|
+
address_postal_code: zod.string().max(contactUpdateAddressPostalCodeMax).optional(),
|
|
29
|
+
address_country: zod.string().regex(contactUpdateAddressCountryRegExp).optional(),
|
|
30
|
+
active: zod.boolean().optional(),
|
|
31
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const getStatementUsageParamsGroupByDefault = "meter";
|
|
10
|
+
export declare const getStatementUsageParamsProjectIdsMax = 100;
|
|
11
|
+
export declare const getStatementUsageParamsProductIdMax = 64;
|
|
12
|
+
export declare const getStatementUsageParamsPageDefault = 1;
|
|
13
|
+
export declare const getStatementUsageParamsPageMax = 2147483647;
|
|
14
|
+
export declare const getStatementUsageParamsPageSizeDefault = 50;
|
|
15
|
+
export declare const getStatementUsageParamsPageSizeMax = 200;
|
|
16
|
+
export declare const GetStatementUsageParams: zod.ZodObject<{
|
|
17
|
+
group_by: zod.ZodDefault<zod.ZodEnum<{
|
|
18
|
+
project: "project";
|
|
19
|
+
product: "product";
|
|
20
|
+
meter: "meter";
|
|
21
|
+
}>>;
|
|
22
|
+
project_ids: zod.ZodOptional<zod.ZodArray<zod.ZodUUID>>;
|
|
23
|
+
product_id: zod.ZodOptional<zod.ZodString>;
|
|
24
|
+
meter_id: zod.ZodOptional<zod.ZodUUID>;
|
|
25
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
26
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
27
|
+
}, zod.z.core.$strict>;
|
|
28
|
+
export type GetStatementUsageParams = zod.input<typeof GetStatementUsageParams>;
|
|
29
|
+
export type GetStatementUsageParamsOutput = zod.output<typeof GetStatementUsageParams>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const getStatementUsageParamsGroupByDefault = `meter`;
|
|
10
|
+
export const getStatementUsageParamsProjectIdsMax = 100;
|
|
11
|
+
export const getStatementUsageParamsProductIdMax = 64;
|
|
12
|
+
export const getStatementUsageParamsPageDefault = 1;
|
|
13
|
+
export const getStatementUsageParamsPageMax = 2147483647;
|
|
14
|
+
export const getStatementUsageParamsPageSizeDefault = 50;
|
|
15
|
+
export const getStatementUsageParamsPageSizeMax = 200;
|
|
16
|
+
export const GetStatementUsageParams = zod.strictObject({
|
|
17
|
+
group_by: zod
|
|
18
|
+
.enum(["project", "product", "meter"])
|
|
19
|
+
.default(getStatementUsageParamsGroupByDefault),
|
|
20
|
+
project_ids: zod.array(zod.uuid()).max(getStatementUsageParamsProjectIdsMax).optional(),
|
|
21
|
+
product_id: zod.string().max(getStatementUsageParamsProductIdMax).optional(),
|
|
22
|
+
meter_id: zod.uuid().optional(),
|
|
23
|
+
page: zod
|
|
24
|
+
.int()
|
|
25
|
+
.min(1)
|
|
26
|
+
.max(getStatementUsageParamsPageMax)
|
|
27
|
+
.default(getStatementUsageParamsPageDefault),
|
|
28
|
+
page_size: zod
|
|
29
|
+
.int()
|
|
30
|
+
.min(1)
|
|
31
|
+
.max(getStatementUsageParamsPageSizeMax)
|
|
32
|
+
.default(getStatementUsageParamsPageSizeDefault),
|
|
33
|
+
});
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const Invoice: zod.ZodObject<{
|
|
10
|
+
void_requested_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
10
11
|
due_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
11
12
|
amount_refunded: zod.ZodOptional<zod.ZodString>;
|
|
12
13
|
tax_items: zod.ZodArray<zod.ZodObject<{
|
|
@@ -20,15 +21,9 @@ export declare const Invoice: zod.ZodObject<{
|
|
|
20
21
|
tax_amount: zod.ZodString;
|
|
21
22
|
currency: zod.ZodString;
|
|
22
23
|
}, zod.z.core.$strict>>;
|
|
23
|
-
order_id: zod.ZodOptional<zod.ZodUUID>;
|
|
24
24
|
id: zod.ZodUUID;
|
|
25
25
|
billing_account_id: zod.ZodInt;
|
|
26
26
|
number: zod.ZodString;
|
|
27
|
-
type: zod.ZodOptional<zod.ZodEnum<{
|
|
28
|
-
adjustment: "adjustment";
|
|
29
|
-
usage: "usage";
|
|
30
|
-
order: "order";
|
|
31
|
-
}>>;
|
|
32
27
|
currency: zod.ZodString;
|
|
33
28
|
status: zod.ZodEnum<{
|
|
34
29
|
void: "void";
|
|
@@ -10,20 +10,16 @@ import { InvoiceStatus } from "./invoiceStatus.zod.js";
|
|
|
10
10
|
import { Money } from "./money.zod.js";
|
|
11
11
|
import { TaxItem } from "./taxItem.zod.js";
|
|
12
12
|
export const Invoice = zod.strictObject({
|
|
13
|
+
void_requested_at: zod.iso
|
|
14
|
+
.datetime({ offset: true })
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("Collection has been stopped; any accepted return obligations are completed before final voiding."),
|
|
13
17
|
due_at: zod.iso.datetime({ offset: true }).optional(),
|
|
14
18
|
amount_refunded: zod.string().optional(),
|
|
15
19
|
tax_items: zod.array(TaxItem),
|
|
16
|
-
order_id: zod
|
|
17
|
-
.uuid()
|
|
18
|
-
.optional()
|
|
19
|
-
.describe("The purchase that produced this invoice. Absent on usage invoices."),
|
|
20
20
|
id: zod.uuid(),
|
|
21
21
|
billing_account_id: zod.int(),
|
|
22
22
|
number: zod.string().describe("Numbered per account and per month."),
|
|
23
|
-
type: zod
|
|
24
|
-
.enum(["usage", "order", "adjustment"])
|
|
25
|
-
.optional()
|
|
26
|
-
.describe("What produced it — metered usage for a period, a purchase, or a correction."),
|
|
27
23
|
currency: zod.string(),
|
|
28
24
|
status: InvoiceStatus,
|
|
29
25
|
subtotal: Money.optional().describe("Sum of the line amounts before discounts. Where prices include tax, the tax contained in\neach line's discounted amount is taken out here, so that total = subtotal -\ndiscount_amount + tax_amount always holds."),
|
|
@@ -7,12 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const InvoiceItem: zod.ZodObject<{
|
|
10
|
-
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
11
10
|
taxable: zod.ZodOptional<zod.ZodBoolean>;
|
|
12
11
|
discount_amount: zod.ZodOptional<zod.ZodString>;
|
|
13
12
|
tax_amount: zod.ZodOptional<zod.ZodString>;
|
|
14
13
|
tax_included_amount: zod.ZodOptional<zod.ZodString>;
|
|
15
|
-
order_item_id: zod.ZodOptional<zod.ZodUUID>;
|
|
16
14
|
id: zod.ZodUUID;
|
|
17
15
|
type: zod.ZodOptional<zod.ZodEnum<{
|
|
18
16
|
one_time: "one_time";
|
|
@@ -9,7 +9,6 @@ import * as zod from "zod";
|
|
|
9
9
|
import { Money } from "./money.zod.js";
|
|
10
10
|
import { NamedIdentity } from "./namedIdentity.zod.js";
|
|
11
11
|
export const InvoiceItem = zod.strictObject({
|
|
12
|
-
recurring_amount: zod.string().optional(),
|
|
13
12
|
taxable: zod.boolean().optional(),
|
|
14
13
|
discount_amount: zod.string().optional().describe("Discount applied to this line before tax."),
|
|
15
14
|
tax_amount: zod
|
|
@@ -20,10 +19,6 @@ export const InvoiceItem = zod.strictObject({
|
|
|
20
19
|
.string()
|
|
21
20
|
.optional()
|
|
22
21
|
.describe("The part of tax_amount already included in amount."),
|
|
23
|
-
order_item_id: zod
|
|
24
|
-
.uuid()
|
|
25
|
-
.optional()
|
|
26
|
-
.describe("The original order line. Refunds follow that line's original payment sources."),
|
|
27
22
|
id: zod.uuid(),
|
|
28
23
|
type: zod.enum(["usage", "subscription", "one_time", "setup", "adjustment"]).optional(),
|
|
29
24
|
project_id: zod.uuid().nullish(),
|
|
@@ -8,12 +8,10 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const InvoiceItemList: zod.ZodObject<{
|
|
10
10
|
items: zod.ZodArray<zod.ZodObject<{
|
|
11
|
-
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
12
11
|
taxable: zod.ZodOptional<zod.ZodBoolean>;
|
|
13
12
|
discount_amount: zod.ZodOptional<zod.ZodString>;
|
|
14
13
|
tax_amount: zod.ZodOptional<zod.ZodString>;
|
|
15
14
|
tax_included_amount: zod.ZodOptional<zod.ZodString>;
|
|
16
|
-
order_item_id: zod.ZodOptional<zod.ZodUUID>;
|
|
17
15
|
id: zod.ZodUUID;
|
|
18
16
|
type: zod.ZodOptional<zod.ZodEnum<{
|
|
19
17
|
one_time: "one_time";
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const InvoiceList: zod.ZodObject<{
|
|
10
10
|
items: zod.ZodArray<zod.ZodObject<{
|
|
11
|
+
void_requested_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
11
12
|
due_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
12
13
|
amount_refunded: zod.ZodOptional<zod.ZodString>;
|
|
13
14
|
tax_items: zod.ZodArray<zod.ZodObject<{
|
|
@@ -21,15 +22,9 @@ export declare const InvoiceList: zod.ZodObject<{
|
|
|
21
22
|
tax_amount: zod.ZodString;
|
|
22
23
|
currency: zod.ZodString;
|
|
23
24
|
}, zod.z.core.$strict>>;
|
|
24
|
-
order_id: zod.ZodOptional<zod.ZodUUID>;
|
|
25
25
|
id: zod.ZodUUID;
|
|
26
26
|
billing_account_id: zod.ZodInt;
|
|
27
27
|
number: zod.ZodString;
|
|
28
|
-
type: zod.ZodOptional<zod.ZodEnum<{
|
|
29
|
-
adjustment: "adjustment";
|
|
30
|
-
usage: "usage";
|
|
31
|
-
order: "order";
|
|
32
|
-
}>>;
|
|
33
28
|
currency: zod.ZodString;
|
|
34
29
|
status: zod.ZodEnum<{
|
|
35
30
|
void: "void";
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export const InvoiceStatus = zod
|
|
10
10
|
.enum(["draft", "open", "paid", "refunded", "void", "uncollectible"])
|
|
11
|
-
.describe("
|
|
11
|
+
.describe("Draft invoices are private to administrators and cannot be read, listed or paid by customers.\nAn issued invoice is open until settled; a zero-total issued invoice is immediately paid.\nUnbilled usage remains separate from invoices until it is invoiced.\nrefunded means a full refund; a partial refund leaves the invoice paid.\nvoid means collection has stopped and any funds received have been returned.");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const listContactsParamsPageDefault = 1;
|
|
10
|
+
export declare const listContactsParamsPageMax = 2147483647;
|
|
11
|
+
export declare const listContactsParamsPageSizeDefault = 50;
|
|
12
|
+
export declare const listContactsParamsPageSizeMax = 200;
|
|
13
|
+
export declare const ListContactsParams: zod.ZodObject<{
|
|
14
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
15
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
export type ListContactsParams = zod.input<typeof ListContactsParams>;
|
|
18
|
+
export type ListContactsParamsOutput = zod.output<typeof ListContactsParams>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const listContactsParamsPageDefault = 1;
|
|
10
|
+
export const listContactsParamsPageMax = 2147483647;
|
|
11
|
+
export const listContactsParamsPageSizeDefault = 50;
|
|
12
|
+
export const listContactsParamsPageSizeMax = 200;
|
|
13
|
+
export const ListContactsParams = zod.strictObject({
|
|
14
|
+
page: zod.int().min(1).max(listContactsParamsPageMax).default(listContactsParamsPageDefault),
|
|
15
|
+
page_size: zod
|
|
16
|
+
.int()
|
|
17
|
+
.min(1)
|
|
18
|
+
.max(listContactsParamsPageSizeMax)
|
|
19
|
+
.default(listContactsParamsPageSizeDefault),
|
|
20
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const listStatementsParamsPageDefault = 1;
|
|
10
|
+
export declare const listStatementsParamsPageMax = 2147483647;
|
|
11
|
+
export declare const listStatementsParamsPageSizeDefault = 50;
|
|
12
|
+
export declare const listStatementsParamsPageSizeMax = 200;
|
|
13
|
+
export declare const ListStatementsParams: zod.ZodObject<{
|
|
14
|
+
billing_account_id: zod.ZodOptional<zod.ZodInt>;
|
|
15
|
+
status: zod.ZodOptional<zod.ZodEnum<{
|
|
16
|
+
open: "open";
|
|
17
|
+
closed: "closed";
|
|
18
|
+
}>>;
|
|
19
|
+
from: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
20
|
+
to: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
21
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
22
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
23
|
+
}, zod.z.core.$strict>;
|
|
24
|
+
export type ListStatementsParams = zod.input<typeof ListStatementsParams>;
|
|
25
|
+
export type ListStatementsParamsOutput = zod.output<typeof ListStatementsParams>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { StatementStatus } from "./statementStatus.zod.js";
|
|
10
|
+
export const listStatementsParamsPageDefault = 1;
|
|
11
|
+
export const listStatementsParamsPageMax = 2147483647;
|
|
12
|
+
export const listStatementsParamsPageSizeDefault = 50;
|
|
13
|
+
export const listStatementsParamsPageSizeMax = 200;
|
|
14
|
+
export const ListStatementsParams = zod.strictObject({
|
|
15
|
+
billing_account_id: zod.int().optional(),
|
|
16
|
+
status: StatementStatus.optional(),
|
|
17
|
+
from: zod.iso.datetime({ offset: true }).optional(),
|
|
18
|
+
to: zod.iso.datetime({ offset: true }).optional(),
|
|
19
|
+
page: zod.int().min(1).max(listStatementsParamsPageMax).default(listStatementsParamsPageDefault),
|
|
20
|
+
page_size: zod
|
|
21
|
+
.int()
|
|
22
|
+
.min(1)
|
|
23
|
+
.max(listStatementsParamsPageSizeMax)
|
|
24
|
+
.default(listStatementsParamsPageSizeDefault),
|
|
25
|
+
});
|
|
@@ -22,6 +22,7 @@ export declare const ListUsageChargesParams: zod.ZodObject<{
|
|
|
22
22
|
to: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
23
23
|
project_ids: zod.ZodOptional<zod.ZodArray<zod.ZodUUID>>;
|
|
24
24
|
meter_id: zod.ZodOptional<zod.ZodUUID>;
|
|
25
|
+
statement_id: zod.ZodOptional<zod.ZodUUID>;
|
|
25
26
|
}, zod.z.core.$strict>;
|
|
26
27
|
export type ListUsageChargesParams = zod.input<typeof ListUsageChargesParams>;
|
|
27
28
|
export type ListUsageChargesParamsOutput = zod.output<typeof ListUsageChargesParams>;
|
|
@@ -31,4 +31,5 @@ export const ListUsageChargesParams = zod.strictObject({
|
|
|
31
31
|
to: zod.iso.datetime({ offset: true }).optional(),
|
|
32
32
|
project_ids: zod.array(zod.uuid()).min(1).max(listUsageChargesParamsProjectIdsMax).optional(),
|
|
33
33
|
meter_id: zod.uuid().optional(),
|
|
34
|
+
statement_id: zod.uuid().optional(),
|
|
34
35
|
});
|
|
@@ -82,6 +82,7 @@ export declare const Order: zod.ZodObject<{
|
|
|
82
82
|
expires_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
83
83
|
created_at: zod.z.ZodISODateTime;
|
|
84
84
|
items: zod.ZodArray<zod.ZodObject<{
|
|
85
|
+
invoice_item_ids: zod.ZodOptional<zod.ZodArray<zod.ZodUUID>>;
|
|
85
86
|
position: zod.ZodOptional<zod.ZodInt>;
|
|
86
87
|
configuration: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
87
88
|
subscription_id: zod.ZodOptional<zod.ZodUUID>;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const orderItemPositionMin = 0;
|
|
10
10
|
export declare const OrderItem: zod.ZodObject<{
|
|
11
|
+
invoice_item_ids: zod.ZodOptional<zod.ZodArray<zod.ZodUUID>>;
|
|
11
12
|
position: zod.ZodOptional<zod.ZodInt>;
|
|
12
13
|
configuration: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
13
14
|
subscription_id: zod.ZodOptional<zod.ZodUUID>;
|
|
@@ -15,6 +15,10 @@ import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
|
15
15
|
export const orderItemPositionMin = 0;
|
|
16
16
|
export const OrderItem = zod
|
|
17
17
|
.strictObject({
|
|
18
|
+
invoice_item_ids: zod
|
|
19
|
+
.array(zod.uuid())
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Financial lines produced by this purchase item, including setup charges."),
|
|
18
22
|
position: zod.int().min(orderItemPositionMin).optional(),
|
|
19
23
|
configuration: zod.record(zod.string(), zod.unknown()).optional(),
|
|
20
24
|
subscription_id: zod
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const OrderItemList: zod.ZodObject<{
|
|
10
10
|
items: zod.ZodArray<zod.ZodObject<{
|
|
11
|
+
invoice_item_ids: zod.ZodOptional<zod.ZodArray<zod.ZodUUID>>;
|
|
11
12
|
position: zod.ZodOptional<zod.ZodInt>;
|
|
12
13
|
configuration: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
13
14
|
subscription_id: zod.ZodOptional<zod.ZodUUID>;
|
|
@@ -83,6 +83,7 @@ export declare const OrderList: zod.ZodObject<{
|
|
|
83
83
|
expires_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
84
84
|
created_at: zod.z.ZodISODateTime;
|
|
85
85
|
items: zod.ZodArray<zod.ZodObject<{
|
|
86
|
+
invoice_item_ids: zod.ZodOptional<zod.ZodArray<zod.ZodUUID>>;
|
|
86
87
|
position: zod.ZodOptional<zod.ZodInt>;
|
|
87
88
|
configuration: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
88
89
|
subscription_id: zod.ZodOptional<zod.ZodUUID>;
|