@openmeter/sdk 1.0.0-beta.21 → 1.0.0-beta.211
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/README.md +38 -150
- package/dist/cjs/index.cjs +18 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/src/client/apps.cjs +174 -0
- package/dist/cjs/src/client/apps.d.cts +286 -0
- package/dist/cjs/src/client/apps.js.map +1 -0
- package/dist/cjs/src/client/billing.cjs +309 -0
- package/dist/cjs/src/client/billing.d.cts +502 -0
- package/dist/cjs/src/client/billing.js.map +1 -0
- package/dist/cjs/src/client/common.cjs +47 -0
- package/dist/cjs/src/client/common.d.cts +30 -0
- package/dist/cjs/src/client/common.js.map +1 -0
- package/dist/cjs/src/client/customers.cjs +199 -0
- package/dist/cjs/src/client/customers.d.cts +179 -0
- package/dist/cjs/src/client/customers.js.map +1 -0
- package/dist/cjs/src/client/entitlements.cjs +244 -0
- package/dist/cjs/src/client/entitlements.d.cts +472 -0
- package/dist/cjs/src/client/entitlements.js.map +1 -0
- package/dist/cjs/src/client/events.cjs +66 -0
- package/dist/cjs/src/client/events.d.cts +31 -0
- package/dist/cjs/src/client/events.js.map +1 -0
- package/dist/cjs/src/client/features.cjs +78 -0
- package/dist/cjs/src/client/features.d.cts +78 -0
- package/dist/cjs/src/client/features.js.map +1 -0
- package/dist/cjs/src/client/index.cjs +108 -0
- package/dist/cjs/src/client/index.d.cts +45 -0
- package/dist/cjs/src/client/index.js.map +1 -0
- package/dist/cjs/src/client/meters.cjs +96 -0
- package/dist/cjs/src/client/meters.d.cts +99 -0
- package/dist/cjs/src/client/meters.js.map +1 -0
- package/dist/cjs/src/client/notifications.cjs +249 -0
- package/dist/cjs/src/client/notifications.d.cts +219 -0
- package/dist/cjs/src/client/notifications.js.map +1 -0
- package/dist/cjs/src/client/plans.cjs +127 -0
- package/dist/cjs/src/client/plans.d.cts +142 -0
- package/dist/cjs/src/client/plans.js.map +1 -0
- package/dist/cjs/src/client/portal.cjs +55 -0
- package/dist/cjs/src/client/portal.d.cts +48 -0
- package/dist/cjs/src/client/portal.js.map +1 -0
- package/dist/cjs/src/client/schemas.cjs +3 -0
- package/dist/cjs/src/client/schemas.d.cts +22438 -0
- package/dist/cjs/src/client/schemas.js.map +1 -0
- package/dist/cjs/src/client/subjects.cjs +76 -0
- package/dist/cjs/src/client/subjects.d.cts +70 -0
- package/dist/cjs/src/client/subjects.js.map +1 -0
- package/dist/cjs/src/client/subscriptions.cjs +116 -0
- package/dist/cjs/src/client/subscriptions.d.cts +147 -0
- package/dist/cjs/src/client/subscriptions.js.map +1 -0
- package/dist/cjs/src/client/utils.cjs +69 -0
- package/dist/cjs/src/client/utils.d.cts +12 -0
- package/dist/cjs/src/client/utils.js.map +1 -0
- package/dist/cjs/src/portal/index.cjs +60 -0
- package/dist/cjs/src/portal/index.d.cts +43 -0
- package/dist/cjs/src/portal/index.js.map +1 -0
- package/dist/cjs/src/react/context.cjs +35 -0
- package/dist/cjs/src/react/context.d.cts +9 -0
- package/dist/cjs/src/react/context.js.map +1 -0
- package/dist/cjs/tsconfig.341d9ef4.tsbuildinfo +1 -0
- package/dist/cjs/tsconfig.523d9ac8.tsbuildinfo +1 -0
- package/dist/index.d.ts +1 -14
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -0
- package/dist/src/client/apps.d.ts +286 -0
- package/dist/src/client/apps.js +168 -0
- package/dist/src/client/apps.js.map +1 -0
- package/dist/src/client/billing.d.ts +502 -0
- package/dist/src/client/billing.js +302 -0
- package/dist/src/client/billing.js.map +1 -0
- package/dist/src/client/common.d.ts +30 -0
- package/dist/src/client/common.js +42 -0
- package/dist/src/client/common.js.map +1 -0
- package/dist/src/client/customers.d.ts +179 -0
- package/dist/src/client/customers.js +193 -0
- package/dist/src/client/customers.js.map +1 -0
- package/dist/src/client/entitlements.d.ts +472 -0
- package/dist/src/client/entitlements.js +239 -0
- package/dist/src/client/entitlements.js.map +1 -0
- package/dist/src/client/events.d.ts +31 -0
- package/dist/src/client/events.js +58 -0
- package/dist/src/client/events.js.map +1 -0
- package/dist/src/client/features.d.ts +78 -0
- package/dist/src/client/features.js +74 -0
- package/dist/src/client/features.js.map +1 -0
- package/dist/src/client/index.d.ts +45 -0
- package/dist/src/client/index.js +68 -0
- package/dist/src/client/index.js.map +1 -0
- package/dist/src/client/meters.d.ts +99 -0
- package/dist/src/client/meters.js +92 -0
- package/dist/src/client/meters.js.map +1 -0
- package/dist/src/client/notifications.d.ts +219 -0
- package/dist/src/client/notifications.js +242 -0
- package/dist/src/client/notifications.js.map +1 -0
- package/dist/src/client/plans.d.ts +142 -0
- package/dist/src/client/plans.js +123 -0
- package/dist/src/client/plans.js.map +1 -0
- package/dist/src/client/portal.d.ts +48 -0
- package/dist/src/client/portal.js +51 -0
- package/dist/src/client/portal.js.map +1 -0
- package/dist/src/client/schemas.d.ts +22438 -0
- package/dist/src/client/schemas.js +2 -0
- package/dist/src/client/schemas.js.map +1 -0
- package/dist/src/client/subjects.d.ts +70 -0
- package/dist/src/client/subjects.js +72 -0
- package/dist/src/client/subjects.js.map +1 -0
- package/dist/src/client/subscriptions.d.ts +147 -0
- package/dist/src/client/subscriptions.js +112 -0
- package/dist/src/client/subscriptions.js.map +1 -0
- package/dist/src/client/utils.d.ts +12 -0
- package/dist/src/client/utils.js +63 -0
- package/dist/src/client/utils.js.map +1 -0
- package/dist/src/portal/index.d.ts +43 -0
- package/dist/src/portal/index.js +53 -0
- package/dist/src/portal/index.js.map +1 -0
- package/dist/src/react/context.d.ts +9 -0
- package/dist/src/react/context.js +16 -0
- package/dist/src/react/context.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +75 -35
- package/patches/openapi-typescript.patch +73 -0
- package/dist/clients/client.d.ts +0 -40
- package/dist/clients/client.js +0 -104
- package/dist/clients/event.d.ts +0 -79
- package/dist/clients/event.js +0 -53
- package/dist/clients/meter.d.ts +0 -96
- package/dist/clients/meter.js +0 -64
- package/dist/clients/portal.d.ts +0 -23
- package/dist/clients/portal.js +0 -37
- package/dist/next.d.ts +0 -15
- package/dist/next.js +0 -46
- package/dist/schemas/openapi.d.ts +0 -460
- package/dist/schemas/openapi.js +0 -5
- package/dist/test/agent.d.ts +0 -2
- package/dist/test/agent.js +0 -178
- package/dist/test/mocks.d.ts +0 -12
- package/dist/test/mocks.js +0 -32
- package/index.ts +0 -22
- package/next.ts +0 -76
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import type { RequestOptions } from './common.js';
|
|
2
|
+
import type { BillingProfileCreate, BillingProfileCustomerOverrideCreate, BillingProfileReplaceUpdateWithWorkflow, InvoicePendingLineCreate, InvoiceReplaceUpdate, InvoiceSimulationInput, operations, paths, VoidInvoiceActionInput } from './schemas.js';
|
|
3
|
+
import type { Client } from 'openapi-fetch';
|
|
4
|
+
/**
|
|
5
|
+
* Billing
|
|
6
|
+
*/
|
|
7
|
+
export declare class Billing {
|
|
8
|
+
private client;
|
|
9
|
+
profiles: BillingProfiles;
|
|
10
|
+
invoices: BillingInvoices;
|
|
11
|
+
customers: BillingCustomers;
|
|
12
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Billing Profiles
|
|
16
|
+
*/
|
|
17
|
+
export declare class BillingProfiles {
|
|
18
|
+
private client;
|
|
19
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
20
|
+
/**
|
|
21
|
+
* Create a billing profile
|
|
22
|
+
* @param billingProfile - The billing profile to create
|
|
23
|
+
* @param signal - An optional abort signal
|
|
24
|
+
* @returns The created billing profile
|
|
25
|
+
*/
|
|
26
|
+
create(billingProfile: BillingProfileCreate, options?: RequestOptions): Promise<{
|
|
27
|
+
readonly id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
31
|
+
readonly createdAt: Date;
|
|
32
|
+
readonly updatedAt: Date;
|
|
33
|
+
readonly deletedAt?: Date;
|
|
34
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
35
|
+
readonly workflow: import("./schemas.js").components["schemas"]["BillingWorkflow"];
|
|
36
|
+
readonly apps: import("./schemas.js").components["schemas"]["BillingProfileAppsOrReference"];
|
|
37
|
+
default: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Get a billing profile by ID
|
|
41
|
+
* @param id - The ID of the billing profile to get
|
|
42
|
+
* @param signal - An optional abort signal
|
|
43
|
+
* @returns The billing profile
|
|
44
|
+
*/
|
|
45
|
+
get(id: operations['getBillingProfile']['parameters']['path']['id'], options?: RequestOptions): Promise<{
|
|
46
|
+
readonly id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
50
|
+
readonly createdAt: Date;
|
|
51
|
+
readonly updatedAt: Date;
|
|
52
|
+
readonly deletedAt?: Date;
|
|
53
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
54
|
+
readonly workflow: import("./schemas.js").components["schemas"]["BillingWorkflow"];
|
|
55
|
+
readonly apps: import("./schemas.js").components["schemas"]["BillingProfileAppsOrReference"];
|
|
56
|
+
default: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* List billing profiles
|
|
60
|
+
* @param query - The query parameters
|
|
61
|
+
* @param signal - An optional abort signal
|
|
62
|
+
* @returns The billing profiles
|
|
63
|
+
*/
|
|
64
|
+
list(query?: operations['listBillingProfiles']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
65
|
+
totalCount: number;
|
|
66
|
+
page: number;
|
|
67
|
+
pageSize: number;
|
|
68
|
+
items: import("./schemas.js").components["schemas"]["BillingProfile"][];
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Update a billing profile
|
|
72
|
+
* @param id - The ID of the billing profile to update
|
|
73
|
+
* @param billingProfile - The billing profile to update
|
|
74
|
+
* @param signal - An optional abort signal
|
|
75
|
+
* @returns The updated billing profile
|
|
76
|
+
*/
|
|
77
|
+
update(id: operations['updateBillingProfile']['parameters']['path']['id'], billingProfile: BillingProfileReplaceUpdateWithWorkflow, options?: RequestOptions): Promise<{
|
|
78
|
+
readonly id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
82
|
+
readonly createdAt: Date;
|
|
83
|
+
readonly updatedAt: Date;
|
|
84
|
+
readonly deletedAt?: Date;
|
|
85
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
86
|
+
readonly workflow: import("./schemas.js").components["schemas"]["BillingWorkflow"];
|
|
87
|
+
readonly apps: import("./schemas.js").components["schemas"]["BillingProfileAppsOrReference"];
|
|
88
|
+
default: boolean;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Billing Invoices
|
|
93
|
+
*/
|
|
94
|
+
export declare class BillingInvoices {
|
|
95
|
+
private client;
|
|
96
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
97
|
+
/**
|
|
98
|
+
* List invoices
|
|
99
|
+
* @param query - The query parameters
|
|
100
|
+
* @param signal - An optional abort signal
|
|
101
|
+
* @returns The invoices
|
|
102
|
+
*/
|
|
103
|
+
list(query?: operations['listInvoices']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
104
|
+
totalCount: number;
|
|
105
|
+
page: number;
|
|
106
|
+
pageSize: number;
|
|
107
|
+
items: import("./schemas.js").components["schemas"]["Invoice"][];
|
|
108
|
+
}>;
|
|
109
|
+
/**
|
|
110
|
+
* Get an invoice by ID
|
|
111
|
+
* @param id - The ID of the invoice to get
|
|
112
|
+
* @param signal - An optional abort signal
|
|
113
|
+
* @returns The invoice
|
|
114
|
+
*/
|
|
115
|
+
get(id: operations['getInvoice']['parameters']['path']['invoiceId'], options?: RequestOptions): Promise<{
|
|
116
|
+
readonly id: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
119
|
+
readonly createdAt: Date;
|
|
120
|
+
readonly updatedAt: Date;
|
|
121
|
+
readonly deletedAt?: Date;
|
|
122
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
123
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
124
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
125
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
126
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
127
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
128
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
129
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
130
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
131
|
+
readonly issuedAt?: Date;
|
|
132
|
+
draftUntil?: Date;
|
|
133
|
+
readonly dueAt?: Date;
|
|
134
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
135
|
+
readonly voidedAt?: Date;
|
|
136
|
+
readonly sentToCustomerAt?: Date;
|
|
137
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
138
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
139
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
140
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
141
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
142
|
+
}>;
|
|
143
|
+
/**
|
|
144
|
+
* Update an invoice
|
|
145
|
+
* @description Only invoices in draft or earlier status can be updated.
|
|
146
|
+
* @param id - The ID of the invoice to update
|
|
147
|
+
* @param invoice - The invoice to update
|
|
148
|
+
* @param signal - An optional abort signal
|
|
149
|
+
* @returns The updated invoice
|
|
150
|
+
*/
|
|
151
|
+
update(id: operations['updateInvoice']['parameters']['path']['invoiceId'], invoice: InvoiceReplaceUpdate, options?: RequestOptions): Promise<{
|
|
152
|
+
readonly id: string;
|
|
153
|
+
description?: string;
|
|
154
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
155
|
+
readonly createdAt: Date;
|
|
156
|
+
readonly updatedAt: Date;
|
|
157
|
+
readonly deletedAt?: Date;
|
|
158
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
159
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
160
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
161
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
162
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
163
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
164
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
165
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
166
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
167
|
+
readonly issuedAt?: Date;
|
|
168
|
+
draftUntil?: Date;
|
|
169
|
+
readonly dueAt?: Date;
|
|
170
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
171
|
+
readonly voidedAt?: Date;
|
|
172
|
+
readonly sentToCustomerAt?: Date;
|
|
173
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
174
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
175
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
176
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
177
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Advance the invoice to the next status
|
|
181
|
+
* @description The call doesn't "approve the invoice", it only advances the invoice to the next status if the transition would be automatic. The action can be called when the invoice's statusDetails' actions field contain the "advance" action.
|
|
182
|
+
* @param id - The ID of the invoice to advance
|
|
183
|
+
* @param signal - An optional abort signal
|
|
184
|
+
* @returns The advanced invoice
|
|
185
|
+
*/
|
|
186
|
+
advance(id: operations['advanceInvoiceAction']['parameters']['path']['invoiceId'], options?: RequestOptions): Promise<{
|
|
187
|
+
readonly id: string;
|
|
188
|
+
description?: string;
|
|
189
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
190
|
+
readonly createdAt: Date;
|
|
191
|
+
readonly updatedAt: Date;
|
|
192
|
+
readonly deletedAt?: Date;
|
|
193
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
194
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
195
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
196
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
197
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
198
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
199
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
200
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
201
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
202
|
+
readonly issuedAt?: Date;
|
|
203
|
+
draftUntil?: Date;
|
|
204
|
+
readonly dueAt?: Date;
|
|
205
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
206
|
+
readonly voidedAt?: Date;
|
|
207
|
+
readonly sentToCustomerAt?: Date;
|
|
208
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
209
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
210
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
211
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
212
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
213
|
+
}>;
|
|
214
|
+
/**
|
|
215
|
+
* Approve an invoice
|
|
216
|
+
* @description This call instantly sends the invoice to the customer using the configured billing profile app.
|
|
217
|
+
* @param id - The ID of the invoice to approve
|
|
218
|
+
* @param signal - An optional abort signal
|
|
219
|
+
* @returns The approved invoice
|
|
220
|
+
*/
|
|
221
|
+
approve(id: operations['approveInvoiceAction']['parameters']['path']['invoiceId'], options?: RequestOptions): Promise<{
|
|
222
|
+
readonly id: string;
|
|
223
|
+
description?: string;
|
|
224
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
225
|
+
readonly createdAt: Date;
|
|
226
|
+
readonly updatedAt: Date;
|
|
227
|
+
readonly deletedAt?: Date;
|
|
228
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
229
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
230
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
231
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
232
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
233
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
234
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
235
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
236
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
237
|
+
readonly issuedAt?: Date;
|
|
238
|
+
draftUntil?: Date;
|
|
239
|
+
readonly dueAt?: Date;
|
|
240
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
241
|
+
readonly voidedAt?: Date;
|
|
242
|
+
readonly sentToCustomerAt?: Date;
|
|
243
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
244
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
245
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
246
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
247
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
248
|
+
}>;
|
|
249
|
+
/**
|
|
250
|
+
* Retry advancing the invoice after a failed attempt.
|
|
251
|
+
* @param id - The ID of the invoice to retry
|
|
252
|
+
* @param signal - An optional abort signal
|
|
253
|
+
* @returns The retried invoice
|
|
254
|
+
*/
|
|
255
|
+
retry(id: operations['retryInvoiceAction']['parameters']['path']['invoiceId'], options?: RequestOptions): Promise<{
|
|
256
|
+
readonly id: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
259
|
+
readonly createdAt: Date;
|
|
260
|
+
readonly updatedAt: Date;
|
|
261
|
+
readonly deletedAt?: Date;
|
|
262
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
263
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
264
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
265
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
266
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
267
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
268
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
269
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
270
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
271
|
+
readonly issuedAt?: Date;
|
|
272
|
+
draftUntil?: Date;
|
|
273
|
+
readonly dueAt?: Date;
|
|
274
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
275
|
+
readonly voidedAt?: Date;
|
|
276
|
+
readonly sentToCustomerAt?: Date;
|
|
277
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
278
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
279
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
280
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
281
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
282
|
+
}>;
|
|
283
|
+
/**
|
|
284
|
+
* Void an invoice
|
|
285
|
+
* @description Void an invoice
|
|
286
|
+
*
|
|
287
|
+
* Only invoices that have been alread issued can be voided.
|
|
288
|
+
* @param id - The ID of the invoice to void
|
|
289
|
+
* @param signal - An optional abort signal
|
|
290
|
+
* @returns The voided invoice
|
|
291
|
+
*/
|
|
292
|
+
void(id: operations['voidInvoiceAction']['parameters']['path']['invoiceId'], body: VoidInvoiceActionInput, options?: RequestOptions): Promise<{
|
|
293
|
+
readonly id: string;
|
|
294
|
+
description?: string;
|
|
295
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
296
|
+
readonly createdAt: Date;
|
|
297
|
+
readonly updatedAt: Date;
|
|
298
|
+
readonly deletedAt?: Date;
|
|
299
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
300
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
301
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
302
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
303
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
304
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
305
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
306
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
307
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
308
|
+
readonly issuedAt?: Date;
|
|
309
|
+
draftUntil?: Date;
|
|
310
|
+
readonly dueAt?: Date;
|
|
311
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
312
|
+
readonly voidedAt?: Date;
|
|
313
|
+
readonly sentToCustomerAt?: Date;
|
|
314
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
315
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
316
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
317
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
318
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
319
|
+
}>;
|
|
320
|
+
/**
|
|
321
|
+
* Recalculate an invoice's tax amounts
|
|
322
|
+
* @param id - The ID of the invoice to recalculate
|
|
323
|
+
* @param signal - An optional abort signal
|
|
324
|
+
* @returns The recalculated invoice
|
|
325
|
+
*/
|
|
326
|
+
recalculateTax(id: operations['recalculateInvoiceTaxAction']['parameters']['path']['invoiceId'], options?: RequestOptions): Promise<{
|
|
327
|
+
readonly id: string;
|
|
328
|
+
description?: string;
|
|
329
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
330
|
+
readonly createdAt: Date;
|
|
331
|
+
readonly updatedAt: Date;
|
|
332
|
+
readonly deletedAt?: Date;
|
|
333
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
334
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
335
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
336
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
337
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
338
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
339
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
340
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
341
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
342
|
+
readonly issuedAt?: Date;
|
|
343
|
+
draftUntil?: Date;
|
|
344
|
+
readonly dueAt?: Date;
|
|
345
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
346
|
+
readonly voidedAt?: Date;
|
|
347
|
+
readonly sentToCustomerAt?: Date;
|
|
348
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
349
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
350
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
351
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
352
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
353
|
+
}>;
|
|
354
|
+
/**
|
|
355
|
+
* Simulate an invoice for a customer
|
|
356
|
+
* @param id - The ID of the customer to simulate the invoice for
|
|
357
|
+
* @param signal - An optional abort signal
|
|
358
|
+
* @returns The simulated invoice
|
|
359
|
+
*/
|
|
360
|
+
simulate(id: operations['simulateInvoice']['parameters']['path']['customerId'], body: InvoiceSimulationInput, options?: RequestOptions): Promise<{
|
|
361
|
+
readonly id: string;
|
|
362
|
+
description?: string;
|
|
363
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
364
|
+
readonly createdAt: Date;
|
|
365
|
+
readonly updatedAt: Date;
|
|
366
|
+
readonly deletedAt?: Date;
|
|
367
|
+
readonly type: import("./schemas.js").components["schemas"]["InvoiceType"];
|
|
368
|
+
supplier: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
369
|
+
customer: import("./schemas.js").components["schemas"]["BillingParty"];
|
|
370
|
+
readonly number: import("./schemas.js").components["schemas"]["InvoiceNumber"];
|
|
371
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
372
|
+
readonly preceding?: import("./schemas.js").components["schemas"]["InvoiceDocumentRef"][];
|
|
373
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
374
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceStatus"];
|
|
375
|
+
readonly statusDetails: import("./schemas.js").components["schemas"]["InvoiceStatusDetails"];
|
|
376
|
+
readonly issuedAt?: Date;
|
|
377
|
+
draftUntil?: Date;
|
|
378
|
+
readonly dueAt?: Date;
|
|
379
|
+
period?: import("./schemas.js").components["schemas"]["Period"];
|
|
380
|
+
readonly voidedAt?: Date;
|
|
381
|
+
readonly sentToCustomerAt?: Date;
|
|
382
|
+
workflow: import("./schemas.js").components["schemas"]["InvoiceWorkflowSettings"];
|
|
383
|
+
lines?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
384
|
+
readonly payment?: import("./schemas.js").components["schemas"]["InvoicePaymentTerms"];
|
|
385
|
+
readonly validationIssues?: import("./schemas.js").components["schemas"]["ValidationIssue"][];
|
|
386
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceAppExternalIds"];
|
|
387
|
+
}>;
|
|
388
|
+
/**
|
|
389
|
+
* Create pending invoice line items
|
|
390
|
+
* @param body - The pending invoice line items to create
|
|
391
|
+
* @param signal - An optional abort signal
|
|
392
|
+
* @returns The created pending invoice line items
|
|
393
|
+
*/
|
|
394
|
+
createLineItems(body: InvoicePendingLineCreate[], options?: RequestOptions): Promise<({
|
|
395
|
+
name: string;
|
|
396
|
+
description?: string;
|
|
397
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
398
|
+
readonly createdAt: Date;
|
|
399
|
+
readonly updatedAt: Date;
|
|
400
|
+
readonly deletedAt?: Date;
|
|
401
|
+
id: string;
|
|
402
|
+
readonly managedBy: import("./schemas.js").components["schemas"]["InvoiceLineManagedBy"];
|
|
403
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceLineStatus"];
|
|
404
|
+
readonly discounts?: import("./schemas.js").components["schemas"]["InvoiceLineDiscounts"];
|
|
405
|
+
invoice?: import("./schemas.js").components["schemas"]["InvoiceReference"];
|
|
406
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
407
|
+
readonly taxes?: import("./schemas.js").components["schemas"]["InvoiceLineTaxItem"][];
|
|
408
|
+
taxConfig?: import("./schemas.js").components["schemas"]["TaxConfig"];
|
|
409
|
+
readonly children?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
410
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
411
|
+
period: import("./schemas.js").components["schemas"]["Period"];
|
|
412
|
+
invoiceAt: Date;
|
|
413
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceLineAppExternalIds"];
|
|
414
|
+
readonly subscription?: import("./schemas.js").components["schemas"]["InvoiceLineSubscriptionReference"];
|
|
415
|
+
type: "usage_based";
|
|
416
|
+
price?: import("./schemas.js").components["schemas"]["RateCardUsageBasedPrice"];
|
|
417
|
+
featureKey?: string;
|
|
418
|
+
rateCard?: import("./schemas.js").components["schemas"]["InvoiceUsageBasedRateCard"];
|
|
419
|
+
readonly quantity?: import("./schemas.js").components["schemas"]["Numeric"];
|
|
420
|
+
readonly meteredQuantity?: import("./schemas.js").components["schemas"]["Numeric"];
|
|
421
|
+
readonly preLinePeriodQuantity?: import("./schemas.js").components["schemas"]["Numeric"];
|
|
422
|
+
readonly meteredPreLinePeriodQuantity?: import("./schemas.js").components["schemas"]["Numeric"];
|
|
423
|
+
} | {
|
|
424
|
+
name: string;
|
|
425
|
+
description?: string;
|
|
426
|
+
metadata?: import("./schemas.js").components["schemas"]["Metadata"] | null;
|
|
427
|
+
readonly createdAt: Date;
|
|
428
|
+
readonly updatedAt: Date;
|
|
429
|
+
readonly deletedAt?: Date;
|
|
430
|
+
id: string;
|
|
431
|
+
readonly managedBy: import("./schemas.js").components["schemas"]["InvoiceLineManagedBy"];
|
|
432
|
+
readonly status: import("./schemas.js").components["schemas"]["InvoiceLineStatus"];
|
|
433
|
+
readonly discounts?: import("./schemas.js").components["schemas"]["InvoiceLineDiscounts"];
|
|
434
|
+
invoice?: import("./schemas.js").components["schemas"]["InvoiceReference"];
|
|
435
|
+
currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
|
|
436
|
+
readonly taxes?: import("./schemas.js").components["schemas"]["InvoiceLineTaxItem"][];
|
|
437
|
+
taxConfig?: import("./schemas.js").components["schemas"]["TaxConfig"];
|
|
438
|
+
readonly children?: import("./schemas.js").components["schemas"]["InvoiceLine"][];
|
|
439
|
+
readonly totals: import("./schemas.js").components["schemas"]["InvoiceTotals"];
|
|
440
|
+
period: import("./schemas.js").components["schemas"]["Period"];
|
|
441
|
+
invoiceAt: Date;
|
|
442
|
+
readonly externalIds?: import("./schemas.js").components["schemas"]["InvoiceLineAppExternalIds"];
|
|
443
|
+
readonly subscription?: import("./schemas.js").components["schemas"]["InvoiceLineSubscriptionReference"];
|
|
444
|
+
type: "flat_fee";
|
|
445
|
+
perUnitAmount?: import("./schemas.js").components["schemas"]["Numeric"];
|
|
446
|
+
paymentTerm?: import("./schemas.js").components["schemas"]["PricePaymentTerm"];
|
|
447
|
+
quantity?: import("./schemas.js").components["schemas"]["Numeric"];
|
|
448
|
+
rateCard?: import("./schemas.js").components["schemas"]["InvoiceFlatFeeRateCard"];
|
|
449
|
+
category?: import("./schemas.js").components["schemas"]["InvoiceFlatFeeCategory"];
|
|
450
|
+
})[]>;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Billing Customer Invoices and Overrides
|
|
454
|
+
*/
|
|
455
|
+
export declare class BillingCustomers {
|
|
456
|
+
private client;
|
|
457
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
458
|
+
/**
|
|
459
|
+
* Create or update a customer override
|
|
460
|
+
* @param id - The ID of the customer to create the override for
|
|
461
|
+
* @param body - The customer override to create
|
|
462
|
+
* @param signal - An optional abort signal
|
|
463
|
+
* @returns The created customer override
|
|
464
|
+
*/
|
|
465
|
+
createOverride(id: operations['upsertBillingProfileCustomerOverride']['parameters']['path']['customerId'], body: BillingProfileCustomerOverrideCreate, options?: RequestOptions): Promise<{
|
|
466
|
+
customerOverride?: import("./schemas.js").components["schemas"]["BillingProfileCustomerOverride"];
|
|
467
|
+
baseBillingProfileId: string;
|
|
468
|
+
customerProfile?: import("./schemas.js").components["schemas"]["BillingCustomerProfile"];
|
|
469
|
+
customer?: import("./schemas.js").components["schemas"]["Customer"];
|
|
470
|
+
}>;
|
|
471
|
+
/**
|
|
472
|
+
* Get a customer override
|
|
473
|
+
* @param id - The ID of the customer to get the override for
|
|
474
|
+
* @param signal - An optional abort signal
|
|
475
|
+
* @returns The customer override
|
|
476
|
+
*/
|
|
477
|
+
getOverride(id: operations['getBillingProfileCustomerOverride']['parameters']['path']['customerId'], options?: RequestOptions): Promise<{
|
|
478
|
+
customerOverride?: import("./schemas.js").components["schemas"]["BillingProfileCustomerOverride"];
|
|
479
|
+
baseBillingProfileId: string;
|
|
480
|
+
customerProfile?: import("./schemas.js").components["schemas"]["BillingCustomerProfile"];
|
|
481
|
+
customer?: import("./schemas.js").components["schemas"]["Customer"];
|
|
482
|
+
}>;
|
|
483
|
+
/**
|
|
484
|
+
* List customer overrides
|
|
485
|
+
* @param query - The query parameters
|
|
486
|
+
* @param signal - An optional abort signal
|
|
487
|
+
* @returns The customer overrides
|
|
488
|
+
*/
|
|
489
|
+
listOverrides(query?: operations['listBillingProfileCustomerOverrides']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
490
|
+
totalCount: number;
|
|
491
|
+
page: number;
|
|
492
|
+
pageSize: number;
|
|
493
|
+
items: import("./schemas.js").components["schemas"]["BillingProfileCustomerOverrideWithDetails"][];
|
|
494
|
+
}>;
|
|
495
|
+
/**
|
|
496
|
+
* Delete a customer override
|
|
497
|
+
* @param id - The ID of the customer to delete the override for
|
|
498
|
+
* @param signal - An optional abort signal
|
|
499
|
+
* @returns The deleted customer override
|
|
500
|
+
*/
|
|
501
|
+
deleteOverride(id: operations['deleteBillingProfileCustomerOverride']['parameters']['path']['customerId'], options?: RequestOptions): Promise<undefined>;
|
|
502
|
+
}
|