@leaflow/sdk 0.0.0-dev.113.g5d6fb99 → 0.0.0-dev.113.gecc0f27
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 +34 -0
- package/dist/account/v1/index.d.ts +16 -0
- package/dist/account/v1/schema.d.ts +294 -3
- package/dist/assistant/v1/index.d.ts +74 -34
- package/dist/assistant/v1/schema.d.ts +1113 -157
- package/dist/billing/v1/index.d.ts +70 -0
- package/dist/billing/v1/index.js +5 -0
- package/dist/billing/v1/schema.d.ts +2657 -0
- package/dist/canopy/v1/index.d.ts +12 -0
- package/dist/compute/v1/index.d.ts +50 -4
- package/dist/compute/v1/schema.d.ts +857 -268
- package/dist/dns/v1/index.d.ts +42 -0
- package/dist/dns/v1/index.js +5 -0
- package/dist/dns/v1/schema.d.ts +883 -0
- package/dist/iam/v1/index.d.ts +28 -0
- package/dist/iam/v1/schema.d.ts +437 -9
- package/dist/index.d.ts +4 -0
- package/dist/monitoring/v1/index.d.ts +96 -0
- package/dist/monitoring/v1/schema.d.ts +2386 -496
- package/dist/notification/v1/index.d.ts +76 -0
- package/dist/notification/v1/index.js +5 -0
- package/dist/notification/v1/schema.d.ts +2044 -0
- package/dist/support/v1/index.d.ts +50 -0
- package/dist/support/v1/index.js +5 -0
- package/dist/support/v1/schema.d.ts +1078 -0
- package/dist/tunnel/v1/index.d.ts +14 -32
- package/dist/tunnel/v1/schema.d.ts +52 -496
- package/package.json +5 -4
- package/dist/gen/account/v1/schema.d.ts +0 -866
- package/dist/gen/assistant/v1/schema.d.ts +0 -1884
- package/dist/gen/canopy/v1/schema.d.ts +0 -1100
- package/dist/gen/compute/v1/schema.d.ts +0 -4439
- package/dist/gen/iam/v1/schema.d.ts +0 -1230
- package/dist/gen/iam/v1/schema.js +0 -5
- package/dist/gen/monitoring/v1/schema.d.ts +0 -2291
- package/dist/gen/monitoring/v1/schema.js +0 -5
- package/dist/gen/tunnel/v1/schema.d.ts +0 -845
- package/dist/gen/tunnel/v1/schema.js +0 -5
- package/dist/src/client.d.ts +0 -57
- package/dist/src/client.js +0 -41
- package/dist/src/index.d.ts +0 -9
- package/dist/src/index.js +0 -1
- /package/dist/{gen/account → billing}/v1/schema.js +0 -0
- /package/dist/{gen/assistant → dns}/v1/schema.js +0 -0
- /package/dist/{gen/canopy → notification}/v1/schema.js +0 -0
- /package/dist/{gen/compute → support}/v1/schema.js +0 -0
|
@@ -0,0 +1,2657 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/account/v1/billing-accounts": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* List my billing accounts
|
|
15
|
+
* @description Every billing account belonging to the caller, with the projects each one currently pays for.
|
|
16
|
+
*
|
|
17
|
+
* Not paginated: how many accounts one person holds is bounded by how many they bothered to
|
|
18
|
+
* create, and that is a small number.
|
|
19
|
+
*/
|
|
20
|
+
get: operations["list-billing-accounts"];
|
|
21
|
+
put?: never;
|
|
22
|
+
/**
|
|
23
|
+
* Create a billing account
|
|
24
|
+
* @description Creates a billing account for the caller.
|
|
25
|
+
*
|
|
26
|
+
* **`seq` is supplied by the client, not assigned here.** Assigning it would mean reading the
|
|
27
|
+
* existing accounts and adding one, which is a read-modify-write race: two concurrent "create"
|
|
28
|
+
* clicks compute the same `seq`. Having the client name it turns that race into a plain
|
|
29
|
+
* idempotent repeat — the second request returns the first account instead of failing.
|
|
30
|
+
*
|
|
31
|
+
* The new account pays for nothing. Binding a project is a separate, deliberate act; doing it
|
|
32
|
+
* here would quietly turn "I want to add a card" into "I have changed who pays".
|
|
33
|
+
*/
|
|
34
|
+
post: operations["create-billing-account"];
|
|
35
|
+
delete?: never;
|
|
36
|
+
options?: never;
|
|
37
|
+
head?: never;
|
|
38
|
+
patch?: never;
|
|
39
|
+
trace?: never;
|
|
40
|
+
};
|
|
41
|
+
"/account/v1/billing-accounts/{accountKey}": {
|
|
42
|
+
parameters: {
|
|
43
|
+
query?: never;
|
|
44
|
+
header?: never;
|
|
45
|
+
path?: never;
|
|
46
|
+
cookie?: never;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Read one of my billing accounts
|
|
50
|
+
* @description One account, with the projects it currently pays for.
|
|
51
|
+
*
|
|
52
|
+
* The list returns the same objects, so this exists for the case the list cannot serve: a link
|
|
53
|
+
* straight to one account. Making the caller fetch every account and filter turns a bookmarked
|
|
54
|
+
* page into a request whose cost grows with how many accounts they hold.
|
|
55
|
+
*/
|
|
56
|
+
get: operations["get-billing-account"];
|
|
57
|
+
/**
|
|
58
|
+
* Rename a billing account
|
|
59
|
+
* @description Changes the display name. Nothing else about the account can be changed here.
|
|
60
|
+
*
|
|
61
|
+
* The key is not among the fields and never will be: ownership is stated by the key, and
|
|
62
|
+
* invoices already issued refer to it. The name is what tells two accounts apart in a list, so
|
|
63
|
+
* a mistake made while creating one is otherwise permanent.
|
|
64
|
+
*/
|
|
65
|
+
put: operations["update-billing-account"];
|
|
66
|
+
post?: never;
|
|
67
|
+
delete?: never;
|
|
68
|
+
options?: never;
|
|
69
|
+
head?: never;
|
|
70
|
+
patch?: never;
|
|
71
|
+
trace?: never;
|
|
72
|
+
};
|
|
73
|
+
"/account/v1/billing-accounts/{accountKey}/credit-transactions": {
|
|
74
|
+
parameters: {
|
|
75
|
+
query?: never;
|
|
76
|
+
header?: never;
|
|
77
|
+
path?: never;
|
|
78
|
+
cookie?: never;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* How the balance got to where it is
|
|
82
|
+
* @description Every movement of credit on this account: what was added, what was spent, what expired, what
|
|
83
|
+
* was voided. Newest first.
|
|
84
|
+
*
|
|
85
|
+
* The balance on its own is a number with no account of itself. Asked why it is lower than
|
|
86
|
+
* expected, it cannot answer, and the holder is left to guess between "I was charged" and
|
|
87
|
+
* "something expired" — which lead to different next steps.
|
|
88
|
+
*/
|
|
89
|
+
get: operations["list-credit-transactions"];
|
|
90
|
+
put?: never;
|
|
91
|
+
post?: never;
|
|
92
|
+
delete?: never;
|
|
93
|
+
options?: never;
|
|
94
|
+
head?: never;
|
|
95
|
+
patch?: never;
|
|
96
|
+
trace?: never;
|
|
97
|
+
};
|
|
98
|
+
"/account/v1/billing-accounts/{accountKey}/balance": {
|
|
99
|
+
parameters: {
|
|
100
|
+
query?: never;
|
|
101
|
+
header?: never;
|
|
102
|
+
path?: never;
|
|
103
|
+
cookie?: never;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Read an account's balance
|
|
107
|
+
* @description What is left on the account.
|
|
108
|
+
*
|
|
109
|
+
* The figure is the **live** balance: usage that has been reported but not yet settled is
|
|
110
|
+
* already subtracted. The settled figure is larger, and the difference is precisely what the
|
|
111
|
+
* holder has just spent — showing that instead would tell them they can afford something they
|
|
112
|
+
* cannot.
|
|
113
|
+
*
|
|
114
|
+
* An account that has never been topped up reports `"0"` — not an absent field, and not an
|
|
115
|
+
* empty string.
|
|
116
|
+
*/
|
|
117
|
+
get: operations["read-billing-account-balance"];
|
|
118
|
+
put?: never;
|
|
119
|
+
post?: never;
|
|
120
|
+
delete?: never;
|
|
121
|
+
options?: never;
|
|
122
|
+
head?: never;
|
|
123
|
+
patch?: never;
|
|
124
|
+
trace?: never;
|
|
125
|
+
};
|
|
126
|
+
"/account/v1/billing-accounts/{accountKey}/projects/{projectId}": {
|
|
127
|
+
parameters: {
|
|
128
|
+
query?: never;
|
|
129
|
+
header?: never;
|
|
130
|
+
path?: never;
|
|
131
|
+
cookie?: never;
|
|
132
|
+
};
|
|
133
|
+
get?: never;
|
|
134
|
+
/**
|
|
135
|
+
* Make this account pay for a project
|
|
136
|
+
* @description Binds a project to this account. A project bound to another account is moved.
|
|
137
|
+
*
|
|
138
|
+
* **Both the account and the project must belong to the caller.** Either one failing refuses the
|
|
139
|
+
* request. Requiring the project as well as the account is what stops somebody attaching a
|
|
140
|
+
* project that is not theirs — which sounds generous, since they would be paying for it, but it
|
|
141
|
+
* would also expose that project's usage to them, and let them detach it again at any moment,
|
|
142
|
+
* leaving the project with no account and therefore unable to allocate anything.
|
|
143
|
+
*
|
|
144
|
+
* Idempotent: binding a project already bound to this account changes nothing.
|
|
145
|
+
*
|
|
146
|
+
* Only subsequent usage is affected; see the hard constraint on rebinding.
|
|
147
|
+
*/
|
|
148
|
+
put: operations["bind-project-to-billing-account"];
|
|
149
|
+
post?: never;
|
|
150
|
+
/**
|
|
151
|
+
* Stop paying for a project
|
|
152
|
+
* @description Unbinds the project from this account. Nothing pays for it afterwards, and **everything in it
|
|
153
|
+
* is refused admission** until some account takes it on — no new machines, no forwarded
|
|
154
|
+
* requests.
|
|
155
|
+
*
|
|
156
|
+
* That consequence is the reason this exists rather than an argument against it: a project
|
|
157
|
+
* bound to the wrong account has no other way out, and moving it to another of the caller's
|
|
158
|
+
* accounts is not a correction when the answer is that this account should not be paying for
|
|
159
|
+
* it at all.
|
|
160
|
+
*
|
|
161
|
+
* Charges already accrued stay where they are. They were incurred while this account held the
|
|
162
|
+
* project, and an invoice has to keep pointing at what it was based on.
|
|
163
|
+
*/
|
|
164
|
+
delete: operations["unbind-project-from-billing-account"];
|
|
165
|
+
options?: never;
|
|
166
|
+
head?: never;
|
|
167
|
+
patch?: never;
|
|
168
|
+
trace?: never;
|
|
169
|
+
};
|
|
170
|
+
"/account/v1/billing-accounts/{accountKey}/orders": {
|
|
171
|
+
parameters: {
|
|
172
|
+
query?: never;
|
|
173
|
+
header?: never;
|
|
174
|
+
path?: never;
|
|
175
|
+
cookie?: never;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* My orders
|
|
179
|
+
* @description Every provisioning request made against the projects this account pays for, newest first.
|
|
180
|
+
*
|
|
181
|
+
* An order that never went through stays here on purpose. Removing it would leave nothing to
|
|
182
|
+
* look at in exactly the case someone wants to look: a resource was asked for, was not
|
|
183
|
+
* delivered, and the question is what happened.
|
|
184
|
+
*
|
|
185
|
+
* The list carries no lines. An order has only a handful, but shipping them on every page
|
|
186
|
+
* means carrying data no column shows.
|
|
187
|
+
*/
|
|
188
|
+
get: operations["list-orders"];
|
|
189
|
+
put?: never;
|
|
190
|
+
post?: never;
|
|
191
|
+
delete?: never;
|
|
192
|
+
options?: never;
|
|
193
|
+
head?: never;
|
|
194
|
+
patch?: never;
|
|
195
|
+
trace?: never;
|
|
196
|
+
};
|
|
197
|
+
"/account/v1/billing-accounts/{accountKey}/orders/{orderId}": {
|
|
198
|
+
parameters: {
|
|
199
|
+
query?: never;
|
|
200
|
+
header?: never;
|
|
201
|
+
path?: never;
|
|
202
|
+
cookie?: never;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* One order, with its lines
|
|
206
|
+
* @description Each line names what was asked for and how much of it. This is the only route that carries
|
|
207
|
+
* them.
|
|
208
|
+
*/
|
|
209
|
+
get: operations["get-order"];
|
|
210
|
+
put?: never;
|
|
211
|
+
post?: never;
|
|
212
|
+
delete?: never;
|
|
213
|
+
options?: never;
|
|
214
|
+
head?: never;
|
|
215
|
+
patch?: never;
|
|
216
|
+
trace?: never;
|
|
217
|
+
};
|
|
218
|
+
"/account/v1/billing-accounts/{accountKey}/top-ups": {
|
|
219
|
+
parameters: {
|
|
220
|
+
query?: never;
|
|
221
|
+
header?: never;
|
|
222
|
+
path?: never;
|
|
223
|
+
cookie?: never;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* My top-ups
|
|
227
|
+
* @description Every top-up this account has made, newest first.
|
|
228
|
+
*
|
|
229
|
+
* Reading one top-up requires already holding its identifier, and the only place that
|
|
230
|
+
* identifier appears is the redirect that started it — so without this list a top-up becomes
|
|
231
|
+
* unfindable the moment the browser tab is closed, which is exactly when somebody wants to
|
|
232
|
+
* check whether their money arrived.
|
|
233
|
+
*/
|
|
234
|
+
get: operations["list-top-ups"];
|
|
235
|
+
put?: never;
|
|
236
|
+
/**
|
|
237
|
+
* Start a top-up
|
|
238
|
+
* @description Begins adding money to this account. Returns a URL to send the browser to; the card is
|
|
239
|
+
* entered there, on the payment provider's own page.
|
|
240
|
+
*
|
|
241
|
+
* **No card data ever reaches this platform**, in any field, in any log. That is the entire
|
|
242
|
+
* reason this returns a redirect instead of accepting card details.
|
|
243
|
+
*
|
|
244
|
+
* **Credit is not added here.** It is added once the payment provider confirms the money
|
|
245
|
+
* arrived, which happens out of band and usually within seconds. The balance is unchanged when
|
|
246
|
+
* this call returns, and polling it immediately will show the old figure.
|
|
247
|
+
*
|
|
248
|
+
* That ordering is deliberate. Credit is spendable as soon as it exists, so anything added
|
|
249
|
+
* before the charge succeeds is money the holder can spend against a payment that then fails.
|
|
250
|
+
*
|
|
251
|
+
* Abandoning the page costs nothing; nothing is created on the account until the money arrives.
|
|
252
|
+
*/
|
|
253
|
+
post: operations["start-top-up"];
|
|
254
|
+
delete?: never;
|
|
255
|
+
options?: never;
|
|
256
|
+
head?: never;
|
|
257
|
+
patch?: never;
|
|
258
|
+
trace?: never;
|
|
259
|
+
};
|
|
260
|
+
"/account/v1/billing-accounts/{accountKey}/charges": {
|
|
261
|
+
parameters: {
|
|
262
|
+
query?: never;
|
|
263
|
+
header?: never;
|
|
264
|
+
path?: never;
|
|
265
|
+
cookie?: never;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* What this period has run up so far
|
|
269
|
+
* @description The itemised version of `unsettled`: what has been used this period and not yet billed.
|
|
270
|
+
*
|
|
271
|
+
* It has to come from charges rather than from invoices. An invoice only exists once a period has
|
|
272
|
+
* been billed, and the one for the period in progress is in a state that does not appear in the
|
|
273
|
+
* invoice list at all — reading invoices would show nothing and suggest the account has used
|
|
274
|
+
* nothing, while the spend keeps climbing.
|
|
275
|
+
*/
|
|
276
|
+
get: operations["list-charges"];
|
|
277
|
+
put?: never;
|
|
278
|
+
post?: never;
|
|
279
|
+
delete?: never;
|
|
280
|
+
options?: never;
|
|
281
|
+
head?: never;
|
|
282
|
+
patch?: never;
|
|
283
|
+
trace?: never;
|
|
284
|
+
};
|
|
285
|
+
"/account/v1/billing-accounts/{accountKey}/charges/{chargeId}/usage": {
|
|
286
|
+
parameters: {
|
|
287
|
+
query?: never;
|
|
288
|
+
header?: never;
|
|
289
|
+
path?: never;
|
|
290
|
+
cookie?: never;
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* What produced this charge
|
|
294
|
+
* @description Splits one charge back into the projects that produced it, and lists the resources it could
|
|
295
|
+
* have come from.
|
|
296
|
+
*
|
|
297
|
+
* ## Why this is not a field on the charge
|
|
298
|
+
*
|
|
299
|
+
* A charge has no project, and that is not an omission: the billing subject is the **account**,
|
|
300
|
+
* and the project is a dimension on each usage event. When three of an account's projects use
|
|
301
|
+
* the same product, their usage aggregates into one charge — that charge genuinely spans three
|
|
302
|
+
* projects, and stamping any single project id on it would be wrong.
|
|
303
|
+
*
|
|
304
|
+
* A split is also more useful than a label would be: it gives proportions, and proportions are
|
|
305
|
+
* what decide which project's resources to switch off.
|
|
306
|
+
*
|
|
307
|
+
* ## The quantity here is what was reported, not what was billed
|
|
308
|
+
*
|
|
309
|
+
* Conversion (machine-seconds to machine-hours) happens on the pricing side, and the engine
|
|
310
|
+
* does not echo `unit_config` back on a charge. So this figure times the unit price does not
|
|
311
|
+
* equal the total — a step is missing in between, and that step only becomes visible on the
|
|
312
|
+
* invoice, where the whole pricing configuration is frozen onto each line.
|
|
313
|
+
*
|
|
314
|
+
* Reported quantity is still the right number for "which project is burning this", which is
|
|
315
|
+
* what the split is for.
|
|
316
|
+
*
|
|
317
|
+
* ## The resource list says which, not how much
|
|
318
|
+
*
|
|
319
|
+
* Usage events carry no resource id — it is not a grouping dimension, and making it one would
|
|
320
|
+
* mean one time series per machine per hour. So the engine cannot attribute a charge to a
|
|
321
|
+
* machine. What it can be attributed to is a product, and which resources of that product
|
|
322
|
+
* exist is something billing knows from its own records.
|
|
323
|
+
*
|
|
324
|
+
* Destroyed resources are listed too: this period's charge includes the part they ran for.
|
|
325
|
+
* Leaving them out is what makes the numbers fail to add up for someone who deleted a machine
|
|
326
|
+
* mid-month — which is exactly the case they are trying to explain.
|
|
327
|
+
*
|
|
328
|
+
* ## A flat fee answers with an empty split
|
|
329
|
+
*
|
|
330
|
+
* There is no meter behind it, so there is nothing to attribute. That is an answer, not an
|
|
331
|
+
* error.
|
|
332
|
+
*/
|
|
333
|
+
get: operations["get-charge-usage"];
|
|
334
|
+
put?: never;
|
|
335
|
+
post?: never;
|
|
336
|
+
delete?: never;
|
|
337
|
+
options?: never;
|
|
338
|
+
head?: never;
|
|
339
|
+
patch?: never;
|
|
340
|
+
trace?: never;
|
|
341
|
+
};
|
|
342
|
+
"/account/v1/billing-accounts/{accountKey}/invoices": {
|
|
343
|
+
parameters: {
|
|
344
|
+
query?: never;
|
|
345
|
+
header?: never;
|
|
346
|
+
path?: never;
|
|
347
|
+
cookie?: never;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* List this account's invoices
|
|
351
|
+
* @description Past periods, most recent first. The period in progress is not here — see the charges
|
|
352
|
+
* endpoint for that.
|
|
353
|
+
*/
|
|
354
|
+
get: operations["list-invoices"];
|
|
355
|
+
put?: never;
|
|
356
|
+
post?: never;
|
|
357
|
+
delete?: never;
|
|
358
|
+
options?: never;
|
|
359
|
+
head?: never;
|
|
360
|
+
patch?: never;
|
|
361
|
+
trace?: never;
|
|
362
|
+
};
|
|
363
|
+
"/account/v1/billing-accounts/{accountKey}/invoices/{invoiceId}": {
|
|
364
|
+
parameters: {
|
|
365
|
+
query?: never;
|
|
366
|
+
header?: never;
|
|
367
|
+
path?: never;
|
|
368
|
+
cookie?: never;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* Read one invoice with its lines
|
|
372
|
+
* @description A total does not answer "why is it this much", and that is the question a bill provokes. Each
|
|
373
|
+
* line carries its service period, without which lines of the same name — hundreds of them on an
|
|
374
|
+
* hourly bill — cannot be told apart, and how much of it credit covered, which is the answer to
|
|
375
|
+
* "I have a balance, why am I being charged".
|
|
376
|
+
*/
|
|
377
|
+
get: operations["get-invoice"];
|
|
378
|
+
put?: never;
|
|
379
|
+
post?: never;
|
|
380
|
+
delete?: never;
|
|
381
|
+
options?: never;
|
|
382
|
+
head?: never;
|
|
383
|
+
patch?: never;
|
|
384
|
+
trace?: never;
|
|
385
|
+
};
|
|
386
|
+
"/account/v1/projects/{projectId}/billing-account": {
|
|
387
|
+
parameters: {
|
|
388
|
+
query?: never;
|
|
389
|
+
header?: never;
|
|
390
|
+
path?: never;
|
|
391
|
+
cookie?: never;
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* Which account pays for this project
|
|
395
|
+
* @description The account a project's resources are charged to, resolved from the project rather than
|
|
396
|
+
* guessed.
|
|
397
|
+
*
|
|
398
|
+
* ## Why a console needs this
|
|
399
|
+
*
|
|
400
|
+
* Everything in a console happens inside a project, while billing accounts belong to a person —
|
|
401
|
+
* and a person can have many. Showing "the first one" next to a sentence like *you are
|
|
402
|
+
* overdrawn, new resources will be refused* pairs one account's balance with another account's
|
|
403
|
+
* rule. Both directions are wrong and one of them is silent: the figures look healthy while
|
|
404
|
+
* creating anything is refused, and the refusal names a reason the page just contradicted.
|
|
405
|
+
*
|
|
406
|
+
* ## Being a member is enough to ask, but not to see the money
|
|
407
|
+
*
|
|
408
|
+
* The answer is the account's identity, not its balance. A project's members are not
|
|
409
|
+
* necessarily the people paying for it — a company account can pay for a project someone else
|
|
410
|
+
* works in — and their balance is not those members' business. Whoever owns the account reads
|
|
411
|
+
* the figures from the balance route as before; `owned_by_me` says which case this is, so a
|
|
412
|
+
* page can tell "you are overdrawn" apart from "ask whoever pays for this project".
|
|
413
|
+
*
|
|
414
|
+
* ## A project with no account is a normal state, and it answers 404
|
|
415
|
+
*
|
|
416
|
+
* A project nobody has bound yet cannot create resources at all — admission refuses it. That is
|
|
417
|
+
* worth saying plainly ("this project has no billing account, bind one") rather than falling
|
|
418
|
+
* back to some other account of theirs, which is how the wrong-account problem started.
|
|
419
|
+
*/
|
|
420
|
+
get: operations["read-project-billing-account"];
|
|
421
|
+
put?: never;
|
|
422
|
+
post?: never;
|
|
423
|
+
delete?: never;
|
|
424
|
+
options?: never;
|
|
425
|
+
head?: never;
|
|
426
|
+
patch?: never;
|
|
427
|
+
trace?: never;
|
|
428
|
+
};
|
|
429
|
+
"/account/v1/projects/{projectId}/quote": {
|
|
430
|
+
parameters: {
|
|
431
|
+
query?: never;
|
|
432
|
+
header?: never;
|
|
433
|
+
path?: never;
|
|
434
|
+
cookie?: never;
|
|
435
|
+
};
|
|
436
|
+
get?: never;
|
|
437
|
+
put?: never;
|
|
438
|
+
/**
|
|
439
|
+
* What a usage would cost in this project
|
|
440
|
+
* @description Prices a set of usages against whatever plan pays for this project, and returns **every
|
|
441
|
+
* intermediate step** rather than a single number.
|
|
442
|
+
*
|
|
443
|
+
* # Why by project rather than by billing account
|
|
444
|
+
*
|
|
445
|
+
* The page that needs this is the one where somebody is about to create a machine, and all it has
|
|
446
|
+
* is a project. Which account pays for that project is billing's own bookkeeping — asking the
|
|
447
|
+
* caller to resolve it first would put that mapping into a page that otherwise has no business
|
|
448
|
+
* knowing accounts exist.
|
|
449
|
+
*
|
|
450
|
+
* # Quantities are raw
|
|
451
|
+
*
|
|
452
|
+
* Seconds, token counts, GiB-seconds: the amount a service reports. Conversion happens here, which
|
|
453
|
+
* is why services keep no conversion tables of their own and why the caller must not do the
|
|
454
|
+
* arithmetic itself.
|
|
455
|
+
*
|
|
456
|
+
* Name each usage by `service` and `product_id` rather than by key: the key is a hash of a
|
|
457
|
+
* convention that has exactly one implementation on purpose.
|
|
458
|
+
*
|
|
459
|
+
* # It is an estimate
|
|
460
|
+
*
|
|
461
|
+
* The engine computes the real amount; this reproduces the same rules. Every step comes back for
|
|
462
|
+
* that reason — a single number that disagrees with the bill says nothing about which step was
|
|
463
|
+
* wrong.
|
|
464
|
+
*
|
|
465
|
+
* `404` means the project has no billing account, or its account is on no plan. Both are worth
|
|
466
|
+
* showing: nothing can be created in either case, because admission refuses it.
|
|
467
|
+
*/
|
|
468
|
+
post: operations["quote-project-usage"];
|
|
469
|
+
delete?: never;
|
|
470
|
+
options?: never;
|
|
471
|
+
head?: never;
|
|
472
|
+
patch?: never;
|
|
473
|
+
trace?: never;
|
|
474
|
+
};
|
|
475
|
+
"/account/v1/billing-accounts/{accountKey}/quote": {
|
|
476
|
+
parameters: {
|
|
477
|
+
query?: never;
|
|
478
|
+
header?: never;
|
|
479
|
+
path?: never;
|
|
480
|
+
cookie?: never;
|
|
481
|
+
};
|
|
482
|
+
get?: never;
|
|
483
|
+
put?: never;
|
|
484
|
+
/**
|
|
485
|
+
* What a usage would cost on this account's plan
|
|
486
|
+
* @description Prices a set of usages against whatever plan this account is currently on, and returns **every
|
|
487
|
+
* intermediate step** rather than a single number.
|
|
488
|
+
*
|
|
489
|
+
* # What it is for
|
|
490
|
+
*
|
|
491
|
+
* Showing someone what a machine will cost before they create it. The console asks for the usage a
|
|
492
|
+
* machine of that shape produces in an hour, and gets back what that hour costs them — on their
|
|
493
|
+
* plan, with their discounts.
|
|
494
|
+
*
|
|
495
|
+
* # Quantities are raw
|
|
496
|
+
*
|
|
497
|
+
* Seconds, token counts, GiB-seconds: the amount a service reports. Conversion happens here, which
|
|
498
|
+
* is why services keep no conversion tables of their own and why the console must not do the
|
|
499
|
+
* arithmetic itself.
|
|
500
|
+
*
|
|
501
|
+
* # It is an estimate
|
|
502
|
+
*
|
|
503
|
+
* The engine computes the real amount; this reproduces the same rules. Every step comes back for
|
|
504
|
+
* that reason — a single number that disagrees with the bill says nothing about which step was
|
|
505
|
+
* wrong.
|
|
506
|
+
*
|
|
507
|
+
* `404` means this account is not on any plan, and there is therefore nothing to price against.
|
|
508
|
+
*/
|
|
509
|
+
post: operations["quote-usage"];
|
|
510
|
+
delete?: never;
|
|
511
|
+
options?: never;
|
|
512
|
+
head?: never;
|
|
513
|
+
patch?: never;
|
|
514
|
+
trace?: never;
|
|
515
|
+
};
|
|
516
|
+
"/account/v1/billing-accounts/{accountKey}/subscription": {
|
|
517
|
+
parameters: {
|
|
518
|
+
query?: never;
|
|
519
|
+
header?: never;
|
|
520
|
+
path?: never;
|
|
521
|
+
cookie?: never;
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* Which plan this account is on
|
|
525
|
+
* @description `404` means no plan, which is worth showing rather than hiding: an account without one is
|
|
526
|
+
* refused admission, so nothing can be allocated in it.
|
|
527
|
+
*
|
|
528
|
+
* A subscription that has been cancelled but has not reached the end of its period still counts
|
|
529
|
+
* as being on a plan — it is still serving, still billing, and the period has already been paid
|
|
530
|
+
* for.
|
|
531
|
+
*/
|
|
532
|
+
get: operations["read-subscription"];
|
|
533
|
+
put?: never;
|
|
534
|
+
post?: never;
|
|
535
|
+
delete?: never;
|
|
536
|
+
options?: never;
|
|
537
|
+
head?: never;
|
|
538
|
+
patch?: never;
|
|
539
|
+
trace?: never;
|
|
540
|
+
};
|
|
541
|
+
"/account/v1/billing-accounts/{accountKey}/subscription/cancel": {
|
|
542
|
+
parameters: {
|
|
543
|
+
query?: never;
|
|
544
|
+
header?: never;
|
|
545
|
+
path?: never;
|
|
546
|
+
cookie?: never;
|
|
547
|
+
};
|
|
548
|
+
get?: never;
|
|
549
|
+
put?: never;
|
|
550
|
+
/**
|
|
551
|
+
* Come off the paid plan
|
|
552
|
+
* @description Moves the account off whatever plan it is on.
|
|
553
|
+
*
|
|
554
|
+
* Where a default plan is configured this is a switch to it rather than a cancellation — an
|
|
555
|
+
* account with no plan is refused admission, so cancelling outright would cut off someone who
|
|
556
|
+
* only meant to drop back to the free tier. Without a default plan it is a real cancellation and
|
|
557
|
+
* the account is left with no plan on purpose.
|
|
558
|
+
*
|
|
559
|
+
* `timing` has to be stated. Ending immediately on an account that has already paid for the
|
|
560
|
+
* current period takes back what they paid for; ending at the end of the period does not. There
|
|
561
|
+
* is no default because the two are materially different and picking one silently would make the
|
|
562
|
+
* wrong one happen whenever the field is forgotten.
|
|
563
|
+
*
|
|
564
|
+
* Without this, someone who bought a paid plan can only stop paying by contacting support —
|
|
565
|
+
* which is how a cancellation becomes a chargeback.
|
|
566
|
+
*/
|
|
567
|
+
post: operations["cancel-subscription"];
|
|
568
|
+
delete?: never;
|
|
569
|
+
options?: never;
|
|
570
|
+
head?: never;
|
|
571
|
+
patch?: never;
|
|
572
|
+
trace?: never;
|
|
573
|
+
};
|
|
574
|
+
"/account/v1/billing-accounts/{accountKey}/top-ups/{paymentId}": {
|
|
575
|
+
parameters: {
|
|
576
|
+
query?: never;
|
|
577
|
+
header?: never;
|
|
578
|
+
path?: never;
|
|
579
|
+
cookie?: never;
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* How far along a top-up is
|
|
583
|
+
* @description Credit arrives asynchronously, shortly after the payment provider confirms the money. Coming
|
|
584
|
+
* back from the payment page the balance has usually not moved yet, and without this there is no
|
|
585
|
+
* way to tell "it is on its way" from "it failed" — the only recourse is refreshing the balance
|
|
586
|
+
* and guessing.
|
|
587
|
+
*
|
|
588
|
+
* `settled` means the credit has landed. `pending` means the money arrived and the credit has
|
|
589
|
+
* not been issued yet, or the payment method is an asynchronous one and the money itself is
|
|
590
|
+
* still in transit.
|
|
591
|
+
*/
|
|
592
|
+
get: operations["read-top-up"];
|
|
593
|
+
put?: never;
|
|
594
|
+
post?: never;
|
|
595
|
+
delete?: never;
|
|
596
|
+
options?: never;
|
|
597
|
+
head?: never;
|
|
598
|
+
patch?: never;
|
|
599
|
+
trace?: never;
|
|
600
|
+
};
|
|
601
|
+
"/account/v1/billing-accounts/{accountKey}/payment-methods": {
|
|
602
|
+
parameters: {
|
|
603
|
+
query?: never;
|
|
604
|
+
header?: never;
|
|
605
|
+
path?: never;
|
|
606
|
+
cookie?: never;
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* The payment methods on file
|
|
610
|
+
* @description Every method saved against this account, and which one an invoice will be charged to.
|
|
611
|
+
*
|
|
612
|
+
* ## Why the brand, last four and expiry are here
|
|
613
|
+
*
|
|
614
|
+
* They were deliberately absent while the billing engine held the card, because the answer
|
|
615
|
+
* that mattered — can money be collected — came from the engine, and a page built on the
|
|
616
|
+
* provider's answer could show a method the engine had not recorded. Collection now runs from
|
|
617
|
+
* this service against the provider directly, so there is one answer, and it is the one shown.
|
|
618
|
+
*
|
|
619
|
+
* Expiry is the reason this is worth showing at all: a card expires, the invoice then fails,
|
|
620
|
+
* dunning runs out, and the project stops — with the account holder watching it happen and no
|
|
621
|
+
* indication that a card was the cause.
|
|
622
|
+
*
|
|
623
|
+
* No other card data exists here. The number, the expiry entered by the holder and the CVC go
|
|
624
|
+
* from the browser to the provider and never reach this platform.
|
|
625
|
+
*
|
|
626
|
+
* An account that has never added one returns an empty list. That is the normal state of a new
|
|
627
|
+
* account, not an error.
|
|
628
|
+
*/
|
|
629
|
+
get: operations["list-payment-methods"];
|
|
630
|
+
put?: never;
|
|
631
|
+
/**
|
|
632
|
+
* Begin adding a payment method
|
|
633
|
+
* @description Starts a session for adding a method, and returns the secret the browser needs to mount the
|
|
634
|
+
* provider's own form.
|
|
635
|
+
*
|
|
636
|
+
* ## The form is embedded, not a redirect
|
|
637
|
+
*
|
|
638
|
+
* The returned `client_secret` initialises the provider's JavaScript, which renders its form
|
|
639
|
+
* inside an iframe on this platform's own page. **No card data reaches this platform** — the
|
|
640
|
+
* number goes from the browser straight to the provider, exactly as it would on a redirect —
|
|
641
|
+
* but the account holder never leaves the console.
|
|
642
|
+
*
|
|
643
|
+
* A redirect would take them to a page with someone else's branding in the middle of adding a
|
|
644
|
+
* payment method, which is the moment they are most likely to abandon it.
|
|
645
|
+
*
|
|
646
|
+
* ## This is a prerequisite for buying a plan, not a convenience
|
|
647
|
+
*
|
|
648
|
+
* A plan is charged by invoice, and the invoice is collected from a method on file. Discovering
|
|
649
|
+
* that none exists at purchase time turns a missing payment method into a rejection whose
|
|
650
|
+
* wording is about something else entirely.
|
|
651
|
+
*
|
|
652
|
+
* It is *not* a prerequisite for topping up: a top-up collects the money there and then.
|
|
653
|
+
*/
|
|
654
|
+
post: operations["start-payment-method-setup"];
|
|
655
|
+
delete?: never;
|
|
656
|
+
options?: never;
|
|
657
|
+
head?: never;
|
|
658
|
+
patch?: never;
|
|
659
|
+
trace?: never;
|
|
660
|
+
};
|
|
661
|
+
"/account/v1/billing-accounts/{accountKey}/payment-methods/{paymentMethodId}": {
|
|
662
|
+
parameters: {
|
|
663
|
+
query?: never;
|
|
664
|
+
header?: never;
|
|
665
|
+
path?: never;
|
|
666
|
+
cookie?: never;
|
|
667
|
+
};
|
|
668
|
+
get?: never;
|
|
669
|
+
put?: never;
|
|
670
|
+
post?: never;
|
|
671
|
+
/**
|
|
672
|
+
* Remove a payment method
|
|
673
|
+
* @description Detaches it from this account. Removing the last one is allowed.
|
|
674
|
+
*
|
|
675
|
+
* ## Why removing the last one is not blocked
|
|
676
|
+
*
|
|
677
|
+
* Blocking it leaves an account holder who wants to stop paying with no way out. The cost of
|
|
678
|
+
* allowing it is that later invoices cannot be collected — and that path has notice, a grace
|
|
679
|
+
* period and a way back. A card that cannot be removed is a dead end.
|
|
680
|
+
*/
|
|
681
|
+
delete: operations["remove-payment-method"];
|
|
682
|
+
options?: never;
|
|
683
|
+
head?: never;
|
|
684
|
+
patch?: never;
|
|
685
|
+
trace?: never;
|
|
686
|
+
};
|
|
687
|
+
"/account/v1/billing-accounts/{accountKey}/payment-methods/{paymentMethodId}/default": {
|
|
688
|
+
parameters: {
|
|
689
|
+
query?: never;
|
|
690
|
+
header?: never;
|
|
691
|
+
path?: never;
|
|
692
|
+
cookie?: never;
|
|
693
|
+
};
|
|
694
|
+
get?: never;
|
|
695
|
+
/**
|
|
696
|
+
* Charge invoices to this one
|
|
697
|
+
* @description Makes this the method an invoice is collected from.
|
|
698
|
+
*
|
|
699
|
+
* ## It is stored at the provider, not here
|
|
700
|
+
*
|
|
701
|
+
* The charge itself reads that setting from the provider, so keeping a second copy here would
|
|
702
|
+
* create two answers to the same question. When they disagree the visible symptom is that the
|
|
703
|
+
* account holder changed the default and the charge still went to the old one.
|
|
704
|
+
*/
|
|
705
|
+
put: operations["set-default-payment-method"];
|
|
706
|
+
post?: never;
|
|
707
|
+
delete?: never;
|
|
708
|
+
options?: never;
|
|
709
|
+
head?: never;
|
|
710
|
+
patch?: never;
|
|
711
|
+
trace?: never;
|
|
712
|
+
};
|
|
713
|
+
"/account/v1/billing-accounts/{accountKey}/offers": {
|
|
714
|
+
parameters: {
|
|
715
|
+
query?: never;
|
|
716
|
+
header?: never;
|
|
717
|
+
path?: never;
|
|
718
|
+
cookie?: never;
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* List the offers this account can buy
|
|
722
|
+
* @description Lists what is actually purchasable by this account, right now.
|
|
723
|
+
*
|
|
724
|
+
* ## Every offer here has passed the full eligibility check
|
|
725
|
+
*
|
|
726
|
+
* The list is not "everything on sale" filtered by status. A promotion whose places are gone, a
|
|
727
|
+
* first-month discount this person already used, a beta price they are not on the list for —
|
|
728
|
+
* none of them appear. Returning them and rejecting the purchase afterwards reads as a broken
|
|
729
|
+
* system rather than as a rule.
|
|
730
|
+
*
|
|
731
|
+
* The price is not here, and not because it was left out: an offer states **who may buy, and
|
|
732
|
+
* when**. What it costs comes from the plan it points at, and is reported by the offers list.
|
|
733
|
+
*/
|
|
734
|
+
get: operations["list-offers"];
|
|
735
|
+
put?: never;
|
|
736
|
+
post?: never;
|
|
737
|
+
delete?: never;
|
|
738
|
+
options?: never;
|
|
739
|
+
head?: never;
|
|
740
|
+
patch?: never;
|
|
741
|
+
trace?: never;
|
|
742
|
+
};
|
|
743
|
+
"/account/v1/billing-accounts/{accountKey}/offers/{offerKey}/purchase": {
|
|
744
|
+
parameters: {
|
|
745
|
+
query?: never;
|
|
746
|
+
header?: never;
|
|
747
|
+
path?: never;
|
|
748
|
+
cookie?: never;
|
|
749
|
+
};
|
|
750
|
+
get?: never;
|
|
751
|
+
put?: never;
|
|
752
|
+
/**
|
|
753
|
+
* Buy an offer
|
|
754
|
+
* @description Puts the account on the plan this offer points at, taking one of its places if it has a limit.
|
|
755
|
+
*
|
|
756
|
+
* ## A card has to be on file first
|
|
757
|
+
*
|
|
758
|
+
* Unless the offer points at a free plan. A paid plan is collected from the card on file
|
|
759
|
+
* and refuses to start the subscription without one; that refusal arrives here as a
|
|
760
|
+
* precondition error rather than as a conflict.
|
|
761
|
+
*
|
|
762
|
+
* ## `timing` is required only when the account already has a plan
|
|
763
|
+
*
|
|
764
|
+
* Moving between plans immediately is what an upgrade wants — the customer paid more and wants
|
|
765
|
+
* it now. Waiting for the end of the period is what a downgrade wants — they already paid for
|
|
766
|
+
* this one. Neither is a safe default, and picking one silently gets the money wrong whenever
|
|
767
|
+
* the field is forgotten.
|
|
768
|
+
*
|
|
769
|
+
* ## Being refused says which rule refused
|
|
770
|
+
*
|
|
771
|
+
* Places gone, window closed, already used, not on the list — each needs the customer to do
|
|
772
|
+
* something different, and several of them need them to do nothing at all. A single "not
|
|
773
|
+
* eligible" sends everyone to support.
|
|
774
|
+
*
|
|
775
|
+
* ## Retrying is safe
|
|
776
|
+
*
|
|
777
|
+
* A place is taken before the subscription is created, so a failure in between leaves the place
|
|
778
|
+
* held rather than the discount given away. Retrying the same purchase finishes it instead of
|
|
779
|
+
* taking a second place.
|
|
780
|
+
*/
|
|
781
|
+
post: operations["purchase-offer"];
|
|
782
|
+
delete?: never;
|
|
783
|
+
options?: never;
|
|
784
|
+
head?: never;
|
|
785
|
+
patch?: never;
|
|
786
|
+
trace?: never;
|
|
787
|
+
};
|
|
788
|
+
"/account/v1/billing-accounts/{accountKey}/prepaid-assets": {
|
|
789
|
+
parameters: {
|
|
790
|
+
query?: never;
|
|
791
|
+
header?: never;
|
|
792
|
+
path?: never;
|
|
793
|
+
cookie?: never;
|
|
794
|
+
};
|
|
795
|
+
/**
|
|
796
|
+
* What I bought outright
|
|
797
|
+
* @description Everything this account holds on a term, across every product.
|
|
798
|
+
*
|
|
799
|
+
* ## Nothing here expires on its own
|
|
800
|
+
*
|
|
801
|
+
* A term renews for as long as the seat is held: the engine charges the next period, prorates
|
|
802
|
+
* any change to the second, and stops the moment the seat is given up. So there is no renewal
|
|
803
|
+
* to remember and no expiry to warn about — giving it up means deleting the resource, in the
|
|
804
|
+
* console that owns it.
|
|
805
|
+
*
|
|
806
|
+
* What the next period costs and when it falls due is on the charges route. That is read
|
|
807
|
+
* straight from the engine rather than copied here, because a copy is a second answer that
|
|
808
|
+
* drifts without saying so.
|
|
809
|
+
*
|
|
810
|
+
* ## Metered resources are not here
|
|
811
|
+
*
|
|
812
|
+
* They have no term. Listing them would invite renewing something that is already billed by
|
|
813
|
+
* the hour until it is deleted.
|
|
814
|
+
*
|
|
815
|
+
* ## `state` and `desired_state` are both reported
|
|
816
|
+
*
|
|
817
|
+
* A machine stopped for arrears reads `suspended` for both. One being brought back reads
|
|
818
|
+
* `suspended` and `active` — it is on its way. Without the second field those look identical,
|
|
819
|
+
* and a customer who just paid concludes it did not work and pays again.
|
|
820
|
+
*/
|
|
821
|
+
get: operations["list-prepaid-assets"];
|
|
822
|
+
put?: never;
|
|
823
|
+
post?: never;
|
|
824
|
+
delete?: never;
|
|
825
|
+
options?: never;
|
|
826
|
+
head?: never;
|
|
827
|
+
patch?: never;
|
|
828
|
+
trace?: never;
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
export type webhooks = Record<string, never>;
|
|
832
|
+
export interface components {
|
|
833
|
+
schemas: {
|
|
834
|
+
/**
|
|
835
|
+
* @description The usages to price. Quantities are the **raw amounts a service reports** — seconds, token
|
|
836
|
+
* counts, GiB-seconds. Conversion happens on the billing side, which is why services keep no
|
|
837
|
+
* conversion tables of their own.
|
|
838
|
+
*/
|
|
839
|
+
QuoteRequest: {
|
|
840
|
+
lines: components["schemas"]["QuoteUsage"][];
|
|
841
|
+
};
|
|
842
|
+
/**
|
|
843
|
+
* @description One usage to price. Name the thing **either** by its rate card key **or** by the service and
|
|
844
|
+
* product it belongs to — exactly one of the two.
|
|
845
|
+
*
|
|
846
|
+
* # Why the second form exists
|
|
847
|
+
*
|
|
848
|
+
* A meter's key is a hash of `(service, product_id, variant)`, computed by a function that lives in
|
|
849
|
+
* one place on purpose: get it wrong and usage lands in the wrong bucket, or in none, and nothing
|
|
850
|
+
* reports it. A caller that derived the key itself would be a second copy of that convention.
|
|
851
|
+
*
|
|
852
|
+
* So callers that know what they are buying — a machine of a given type, a model's input tokens —
|
|
853
|
+
* give the service and product, and this side derives the key.
|
|
854
|
+
*/
|
|
855
|
+
QuoteUsage: {
|
|
856
|
+
/**
|
|
857
|
+
* @description The rate card's key. For a card tied to a meter that is the meter's key, because the engine
|
|
858
|
+
* requires the two to be identical.
|
|
859
|
+
*
|
|
860
|
+
* Leave it out when giving `service` and `product_id` instead
|
|
861
|
+
*/
|
|
862
|
+
key?: string;
|
|
863
|
+
/** @description The service that owns the product, as it appears in its usage events */
|
|
864
|
+
service?: string;
|
|
865
|
+
/** @description That service's own catalogue id for the thing being bought */
|
|
866
|
+
product_id?: string;
|
|
867
|
+
/**
|
|
868
|
+
* @description The fixed dimension values that split one product into several meters — canopy's token kind,
|
|
869
|
+
* for instance. Part of the key, so leaving it out names a different meter
|
|
870
|
+
*/
|
|
871
|
+
variant?: {
|
|
872
|
+
[key: string]: string;
|
|
873
|
+
};
|
|
874
|
+
/** @description The raw amount, before any conversion. A decimal string */
|
|
875
|
+
quantity: string;
|
|
876
|
+
};
|
|
877
|
+
/**
|
|
878
|
+
* @description One rate card priced, with every intermediate step.
|
|
879
|
+
*
|
|
880
|
+
* Each step is here on purpose: a single total that disagrees with the bill says nothing about
|
|
881
|
+
* which step went wrong, and this is a second implementation of the engine's rules
|
|
882
|
+
*/
|
|
883
|
+
QuoteLine: {
|
|
884
|
+
key: string;
|
|
885
|
+
name: string;
|
|
886
|
+
/** @description False for a flat fee, which ignores usage entirely */
|
|
887
|
+
metered: boolean;
|
|
888
|
+
/** @description The quantity as given */
|
|
889
|
+
raw: string;
|
|
890
|
+
/** @description After unit conversion, before rounding */
|
|
891
|
+
converted: string;
|
|
892
|
+
/**
|
|
893
|
+
* @description After rounding. `unit_config.rounding` applies to this step only — entitlement uses the
|
|
894
|
+
* exact converted value, which is the engine's documented behaviour
|
|
895
|
+
*/
|
|
896
|
+
billable: string;
|
|
897
|
+
/** @description Units covered by the usage discount */
|
|
898
|
+
free_units: string;
|
|
899
|
+
charged: string;
|
|
900
|
+
unit_price: string;
|
|
901
|
+
/** @description Before the percentage discount */
|
|
902
|
+
gross: string;
|
|
903
|
+
discount: string;
|
|
904
|
+
/**
|
|
905
|
+
* @description Rounded to the currency's minor unit, **per line**. Not by rounding the sum: the engine
|
|
906
|
+
* rounds each line, and the difference grows with the number of lines
|
|
907
|
+
*/
|
|
908
|
+
total: string;
|
|
909
|
+
};
|
|
910
|
+
Quote: {
|
|
911
|
+
lines: components["schemas"]["QuoteLine"][];
|
|
912
|
+
/** @description The sum of the already-rounded lines */
|
|
913
|
+
total: string;
|
|
914
|
+
/**
|
|
915
|
+
* @description Keys that were given a usage but have no rate card on this plan.
|
|
916
|
+
*
|
|
917
|
+
* **Reported rather than ignored**, because ignoring them yields a smaller but entirely
|
|
918
|
+
* normal-looking number — and that is the most expensive misconfiguration there is: usage
|
|
919
|
+
* lands, the usage chart shows it, and the bill has no line for it
|
|
920
|
+
*/
|
|
921
|
+
unpriced?: string[];
|
|
922
|
+
};
|
|
923
|
+
/**
|
|
924
|
+
* @description When a plan change takes effect. There is no default: an upgrade and a downgrade want opposite
|
|
925
|
+
* answers, and the difference is money
|
|
926
|
+
* @enum {string}
|
|
927
|
+
*/
|
|
928
|
+
PlanChangeTiming: "immediate" | "next_billing_cycle";
|
|
929
|
+
OfferList: {
|
|
930
|
+
offers: components["schemas"]["Offer"][];
|
|
931
|
+
};
|
|
932
|
+
/**
|
|
933
|
+
* @description One thing this account can buy. It carries no price — the price is on the plan it points at,
|
|
934
|
+
* recorded in exactly one place
|
|
935
|
+
*/
|
|
936
|
+
Offer: {
|
|
937
|
+
/** @description The stable identifier operations and support use for this offer */
|
|
938
|
+
offer_key: string;
|
|
939
|
+
name: string;
|
|
940
|
+
description?: string;
|
|
941
|
+
/** @description A short label for the pricing page, e.g. the one marking the recommended tier */
|
|
942
|
+
badge?: string;
|
|
943
|
+
/**
|
|
944
|
+
* Format: date-time
|
|
945
|
+
* @description When this offer stops being purchasable. Absent means it does not expire
|
|
946
|
+
*/
|
|
947
|
+
valid_until?: string;
|
|
948
|
+
/** @description Present on offers that sell a plan */
|
|
949
|
+
pricing?: components["schemas"]["Pricing"];
|
|
950
|
+
/** @description Present on offers that sell credit */
|
|
951
|
+
top_up?: components["schemas"]["TopUpPricing"];
|
|
952
|
+
};
|
|
953
|
+
/**
|
|
954
|
+
* @description What this offer costs, as a structure rather than a number.
|
|
955
|
+
*
|
|
956
|
+
* A plan is rarely one number: an introductory period at one price followed by another, a monthly
|
|
957
|
+
* fee alongside metered usage, an allowance of free units before metering starts. Flattening that
|
|
958
|
+
* into a single figure means deciding which part to show, and every such decision is wrong for
|
|
959
|
+
* some plan.
|
|
960
|
+
*
|
|
961
|
+
* This is read on each request rather than stored alongside the offer. The plan owns
|
|
962
|
+
* prices; a second copy would be a second answer, and the two would drift without anything saying
|
|
963
|
+
* so — the visible symptom being a pricing page that disagrees with the invoice.
|
|
964
|
+
*/
|
|
965
|
+
Pricing: {
|
|
966
|
+
currency: components["schemas"]["Currency"];
|
|
967
|
+
/** @description How often this recurs, as an ISO 8601 duration. `P1M` is monthly */
|
|
968
|
+
billing_period?: string;
|
|
969
|
+
/**
|
|
970
|
+
* @description In order. A phase with no `duration` runs until the subscription ends, and there is at most
|
|
971
|
+
* one of those, last
|
|
972
|
+
*/
|
|
973
|
+
phases: components["schemas"]["PricingPhase"][];
|
|
974
|
+
};
|
|
975
|
+
PricingPhase: {
|
|
976
|
+
name: string;
|
|
977
|
+
/** @description How long this phase lasts, as an ISO 8601 duration. Absent means "until the end" */
|
|
978
|
+
duration?: string;
|
|
979
|
+
lines: components["schemas"]["PricingLine"][];
|
|
980
|
+
};
|
|
981
|
+
/** @description One charge within a phase — a fee, or a rate for something metered */
|
|
982
|
+
PricingLine: {
|
|
983
|
+
name: string;
|
|
984
|
+
/**
|
|
985
|
+
* @description `free` costs nothing. `flat` is charged once per period regardless of use. `unit` is charged
|
|
986
|
+
* per unit consumed
|
|
987
|
+
* @enum {string}
|
|
988
|
+
*/
|
|
989
|
+
type: "free" | "flat" | "unit";
|
|
990
|
+
/** @description A decimal string. Money is never a float */
|
|
991
|
+
amount?: string;
|
|
992
|
+
/**
|
|
993
|
+
* @description For `unit` lines whose meter counts something finer than what is charged for: how many
|
|
994
|
+
* metered units one charge covers. A price of `10` with `units_per_charge` of `1000000` is
|
|
995
|
+
* ten currency units per million.
|
|
996
|
+
*
|
|
997
|
+
* Absent means one for one. **Showing the amount without this is wrong by whatever this
|
|
998
|
+
* factor is**, which for token pricing is six orders of magnitude
|
|
999
|
+
*/
|
|
1000
|
+
units_per_charge?: string;
|
|
1001
|
+
/** @description How many units are not charged for before charging starts */
|
|
1002
|
+
free_units?: string;
|
|
1003
|
+
/**
|
|
1004
|
+
* Format: float
|
|
1005
|
+
* @description A reduction applied to this line, 0 to 100
|
|
1006
|
+
*/
|
|
1007
|
+
percent_off?: number;
|
|
1008
|
+
/**
|
|
1009
|
+
* @description True when this is charged once at the start rather than every period. Absent or false means
|
|
1010
|
+
* it recurs
|
|
1011
|
+
*/
|
|
1012
|
+
one_time?: boolean;
|
|
1013
|
+
};
|
|
1014
|
+
UpdateBillingAccountRequestBody: {
|
|
1015
|
+
display_name: string;
|
|
1016
|
+
};
|
|
1017
|
+
Order: {
|
|
1018
|
+
id: string;
|
|
1019
|
+
project_id: string;
|
|
1020
|
+
placed_by: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* @description Whether the request went through. It is not the state of what was provisioned: that
|
|
1023
|
+
* belongs to each resource and outlives the order.
|
|
1024
|
+
* @enum {string}
|
|
1025
|
+
*/
|
|
1026
|
+
state: "pending" | "fulfilled" | "failed";
|
|
1027
|
+
failure_reason?: string;
|
|
1028
|
+
/**
|
|
1029
|
+
* @description What was taken, as a decimal string. Absent on a metered order, where the amount is not
|
|
1030
|
+
* known when the order is placed: it comes from usage afterwards. Absent must be read as
|
|
1031
|
+
* "billed by usage" — writing zero would make a metered order and a genuinely free one
|
|
1032
|
+
* look the same.
|
|
1033
|
+
*/
|
|
1034
|
+
amount?: string;
|
|
1035
|
+
currency?: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* @description Always `none` on a metered order.
|
|
1038
|
+
* @enum {string}
|
|
1039
|
+
*/
|
|
1040
|
+
payment_state?: "none" | "paid" | "refunded";
|
|
1041
|
+
/** Format: date-time */
|
|
1042
|
+
created_at: string;
|
|
1043
|
+
/** @description Only present on the single-order route. */
|
|
1044
|
+
lines?: components["schemas"]["OrderLine"][];
|
|
1045
|
+
};
|
|
1046
|
+
OrderLine: {
|
|
1047
|
+
id: string;
|
|
1048
|
+
/** @enum {string} */
|
|
1049
|
+
action: "add" | "renew" | "modify" | "remove";
|
|
1050
|
+
/** @description Which service holds the thing, for example `compute`. */
|
|
1051
|
+
service: string;
|
|
1052
|
+
/** @description That service's own catalogue identifier for what was asked for. */
|
|
1053
|
+
product_id: string;
|
|
1054
|
+
/** Format: int64 */
|
|
1055
|
+
quantity: number;
|
|
1056
|
+
};
|
|
1057
|
+
PrepaidAsset: {
|
|
1058
|
+
id: string;
|
|
1059
|
+
project_id: string;
|
|
1060
|
+
/** @description Which service holds it. Also which console it is managed from. */
|
|
1061
|
+
service: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* @description That service's own catalogue id, not a billing sku. The price of a machine is made of
|
|
1064
|
+
* finer parts than the machine type — the type does not appear in the rate card at all.
|
|
1065
|
+
*/
|
|
1066
|
+
product_id: string;
|
|
1067
|
+
/** @description The id that service knows it by, so the two consoles can be lined up. */
|
|
1068
|
+
resource_id?: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* Format: int64
|
|
1071
|
+
* @description GiB for a disk, 1 for a machine or an address.
|
|
1072
|
+
*/
|
|
1073
|
+
quantity: number;
|
|
1074
|
+
/**
|
|
1075
|
+
* @description How long one period buys, as an ISO 8601 duration (P1M, P1Y).
|
|
1076
|
+
*
|
|
1077
|
+
* There is no expiry to report. The engine keeps renewing this for as long as the seat is
|
|
1078
|
+
* held, so what runs out is not the term but the customer's decision to keep it. What the
|
|
1079
|
+
* next period costs, and when it is charged, is on the charges route — that is the engine's
|
|
1080
|
+
* own answer rather than a copy of it.
|
|
1081
|
+
*/
|
|
1082
|
+
term: string;
|
|
1083
|
+
/** @enum {string} */
|
|
1084
|
+
state: "pending" | "active" | "suspended" | "terminated";
|
|
1085
|
+
/**
|
|
1086
|
+
* @description What it is being moved to. Differs from `state` while a change is still being applied,
|
|
1087
|
+
* which is the moment a customer is most likely to conclude that nothing happened.
|
|
1088
|
+
* @enum {string}
|
|
1089
|
+
*/
|
|
1090
|
+
desired_state: "active" | "suspended" | "terminated";
|
|
1091
|
+
};
|
|
1092
|
+
PrepaidAssetList: {
|
|
1093
|
+
assets: components["schemas"]["PrepaidAsset"][];
|
|
1094
|
+
};
|
|
1095
|
+
RenewRequestBody: {
|
|
1096
|
+
/**
|
|
1097
|
+
* @description How long to renew for, as an ISO 8601 duration (P1M, P1Y). It does not have to match the
|
|
1098
|
+
* term originally bought.
|
|
1099
|
+
*/
|
|
1100
|
+
term: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* @description Generate one per renewal the customer starts — when the dialog opens, not when it is
|
|
1103
|
+
* submitted — and send the same one on every retry of that renewal.
|
|
1104
|
+
*/
|
|
1105
|
+
idempotency_key: string;
|
|
1106
|
+
};
|
|
1107
|
+
OrderList: {
|
|
1108
|
+
orders: components["schemas"]["Order"][];
|
|
1109
|
+
};
|
|
1110
|
+
TopUpList: {
|
|
1111
|
+
top_ups: components["schemas"]["TopUpStatus"][];
|
|
1112
|
+
};
|
|
1113
|
+
CreditTransactionList: {
|
|
1114
|
+
transactions: components["schemas"]["CreditTransaction"][];
|
|
1115
|
+
};
|
|
1116
|
+
/**
|
|
1117
|
+
* @description One movement of credit. Immutable — a correction is another movement, never an edit of this
|
|
1118
|
+
* one, which is what lets the balance be recomputed from the list at any time
|
|
1119
|
+
*/
|
|
1120
|
+
CreditTransaction: {
|
|
1121
|
+
id: string;
|
|
1122
|
+
type: components["schemas"]["CreditTransactionType"];
|
|
1123
|
+
/** @description A decimal string. Never a float — a balance that rounds is a balance that drifts */
|
|
1124
|
+
amount: string;
|
|
1125
|
+
currency: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Format: date-time
|
|
1128
|
+
* @description When it landed on the ledger, which is not always when it was requested
|
|
1129
|
+
*/
|
|
1130
|
+
booked_at: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* @description What the balance became. Recorded by the metering engine rather than recomputed here —
|
|
1133
|
+
* recomputing assumes our understanding of the burn-down order matches its own, and this
|
|
1134
|
+
* is its own account of it
|
|
1135
|
+
*/
|
|
1136
|
+
balance_after: string;
|
|
1137
|
+
};
|
|
1138
|
+
/**
|
|
1139
|
+
* @description `funded` is credit arriving, `consumed` is it being spent, `expired` is a grant reaching the
|
|
1140
|
+
* end of its life unspent, and `voided` is one cancelled — a refund, or a correction
|
|
1141
|
+
* @enum {string}
|
|
1142
|
+
*/
|
|
1143
|
+
CreditTransactionType: "funded" | "consumed" | "expired" | "voided";
|
|
1144
|
+
/**
|
|
1145
|
+
* @description What a top-up bundle costs and what it grants. Present only on offers that sell credit.
|
|
1146
|
+
*
|
|
1147
|
+
* Unlike a plan price, this is stated on the bundle itself: credit is granted per
|
|
1148
|
+
* transaction and has no catalog of bundles to read from. There is no second copy to drift
|
|
1149
|
+
* against, because there is no first one anywhere else
|
|
1150
|
+
*/
|
|
1151
|
+
TopUpPricing: {
|
|
1152
|
+
/** @description What is charged, as a decimal string */
|
|
1153
|
+
pay: string;
|
|
1154
|
+
/** @description How much credit is granted. Equal to `pay` when there is no bonus */
|
|
1155
|
+
credit: string;
|
|
1156
|
+
};
|
|
1157
|
+
Purchase: {
|
|
1158
|
+
offer_key: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* @description The subscription now serving this account. When the change was set to take effect at the
|
|
1161
|
+
* end of the period, this is the one that takes over then, and its status says `scheduled`
|
|
1162
|
+
*/
|
|
1163
|
+
subscription_id: string;
|
|
1164
|
+
};
|
|
1165
|
+
Error: {
|
|
1166
|
+
code?: string;
|
|
1167
|
+
message: string;
|
|
1168
|
+
meta?: {
|
|
1169
|
+
[key: string]: unknown;
|
|
1170
|
+
};
|
|
1171
|
+
/** Format: int64 */
|
|
1172
|
+
status: number;
|
|
1173
|
+
};
|
|
1174
|
+
/**
|
|
1175
|
+
* @description A billing account.
|
|
1176
|
+
*
|
|
1177
|
+
* Any internal identifier is deliberately absent: the key addresses everything on
|
|
1178
|
+
* this API, and a second identifier is one more thing a client can pass in the wrong place, for
|
|
1179
|
+
* no benefit to anyone reading the page.
|
|
1180
|
+
*/
|
|
1181
|
+
BillingAccount: {
|
|
1182
|
+
/** @description Addresses the account and states who owns it. Of the form `u_<user_id>_<seq>` */
|
|
1183
|
+
key: string;
|
|
1184
|
+
/** @description What the holder called it. Not unique, and it addresses nothing */
|
|
1185
|
+
display_name: string;
|
|
1186
|
+
currency: components["schemas"]["Currency"];
|
|
1187
|
+
/** @description The projects this account pays for. Empty when it pays for none, never `null` */
|
|
1188
|
+
project_ids: string[];
|
|
1189
|
+
};
|
|
1190
|
+
BillingAccountList: {
|
|
1191
|
+
/** @description Every account belonging to the caller. Empty when they hold none */
|
|
1192
|
+
accounts: components["schemas"]["BillingAccount"][];
|
|
1193
|
+
};
|
|
1194
|
+
CreateBillingAccountRequestBody: {
|
|
1195
|
+
/**
|
|
1196
|
+
* Format: int32
|
|
1197
|
+
* @description Which of the caller's accounts this is. Two requests carrying the same `seq` describe the
|
|
1198
|
+
* same account, so a retry is safe; a different `seq` creates a different account.
|
|
1199
|
+
*
|
|
1200
|
+
* It is not optional. Defaulting it would mean that a client which forgot the field
|
|
1201
|
+
* silently receives the account it already had, and reads that as a successful creation.
|
|
1202
|
+
*/
|
|
1203
|
+
seq: number;
|
|
1204
|
+
/** @description A name for the holder's own benefit */
|
|
1205
|
+
display_name: string;
|
|
1206
|
+
currency?: components["schemas"]["Currency"];
|
|
1207
|
+
/**
|
|
1208
|
+
* @description Buy one of the top-up bundles from `/offers` instead of an arbitrary amount. When given,
|
|
1209
|
+
* `amount` is ignored: the bundle says what is charged and how much credit it grants.
|
|
1210
|
+
*
|
|
1211
|
+
* How much credit arrives is decided when the money does, not now — and only if the amount
|
|
1212
|
+
* collected matches what the bundle costs. A bundle whose places ran out, or whose window
|
|
1213
|
+
* closed, in between still grants what was paid for; it just does not grant the bonus.
|
|
1214
|
+
*/
|
|
1215
|
+
offer_key?: string;
|
|
1216
|
+
};
|
|
1217
|
+
/**
|
|
1218
|
+
* @description The three numbers a billing page needs, which are not the same number.
|
|
1219
|
+
*
|
|
1220
|
+
* `balance` answers "can I start another one" and is floored at zero, so it cannot express
|
|
1221
|
+
* being past zero. `unsettled` is what the current period has run up. `available` is the
|
|
1222
|
+
* difference between the two and **may be negative**.
|
|
1223
|
+
*
|
|
1224
|
+
* Reporting only the first would make an account that has overspent indistinguishable from one
|
|
1225
|
+
* that spent exactly what it had, and those two call for different actions.
|
|
1226
|
+
*/
|
|
1227
|
+
Balance: {
|
|
1228
|
+
currency: components["schemas"]["Currency"];
|
|
1229
|
+
/**
|
|
1230
|
+
* @description What is spendable right now, with usage reported but not yet settled already subtracted.
|
|
1231
|
+
* Never negative — it is floored at zero, so it answers "can I start another machine" but
|
|
1232
|
+
* not "how much do I owe". A decimal string; `"0"` when the account has never been topped up
|
|
1233
|
+
*/
|
|
1234
|
+
balance: string;
|
|
1235
|
+
/** @description The amount booked to the ledger, before this period's usage is taken off */
|
|
1236
|
+
cash: string;
|
|
1237
|
+
/**
|
|
1238
|
+
* @description What this period has run up and not yet been billed for. It keeps growing past the cash
|
|
1239
|
+
* balance, which is precisely the case the live figure cannot show
|
|
1240
|
+
*/
|
|
1241
|
+
unsettled: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* @description `cash` minus `unsettled`. **Negative means already in arrears**, and being able to say that
|
|
1244
|
+
* is the whole reason this field exists — the positive range is already covered by `balance`
|
|
1245
|
+
*/
|
|
1246
|
+
available: string;
|
|
1247
|
+
};
|
|
1248
|
+
/** @description The account a project's resources are charged to */
|
|
1249
|
+
ProjectBillingAccount: {
|
|
1250
|
+
account_key: string;
|
|
1251
|
+
project_id: string;
|
|
1252
|
+
display_name: string;
|
|
1253
|
+
currency: components["schemas"]["Currency"];
|
|
1254
|
+
/**
|
|
1255
|
+
* @description Whether the caller owns this account, and therefore whether the balance routes will
|
|
1256
|
+
* answer for it. False means someone else pays for this project: the figures are theirs,
|
|
1257
|
+
* not the caller's, and a page should say so rather than showing nothing.
|
|
1258
|
+
*/
|
|
1259
|
+
owned_by_me: boolean;
|
|
1260
|
+
};
|
|
1261
|
+
/** @description Which account pays for which project, as it stands once the request has been applied */
|
|
1262
|
+
ProjectBinding: {
|
|
1263
|
+
account_key: string;
|
|
1264
|
+
/** Format: uuid */
|
|
1265
|
+
project_id: string;
|
|
1266
|
+
};
|
|
1267
|
+
StartTopUpRequestBody: {
|
|
1268
|
+
/**
|
|
1269
|
+
* @description How much to add, as a decimal string — `"20"`, `"19.99"`.
|
|
1270
|
+
*
|
|
1271
|
+
* **Anything below one cent is rejected rather than rounded.** Rounding up overcharges and
|
|
1272
|
+
* rounding down undercharges; both alter the amount somewhere the payer cannot see it, and
|
|
1273
|
+
* this is the one number on this API where being wrong means money is wrong.
|
|
1274
|
+
*/
|
|
1275
|
+
amount: string;
|
|
1276
|
+
currency?: components["schemas"]["Currency"];
|
|
1277
|
+
/**
|
|
1278
|
+
* @description Buy one of the top-up bundles from `/offers` instead of an arbitrary amount. When given,
|
|
1279
|
+
* `amount` is ignored: the bundle says what is charged and how much credit it grants.
|
|
1280
|
+
*
|
|
1281
|
+
* How much credit arrives is decided when the money does, not now — and only if the amount
|
|
1282
|
+
* collected matches what the bundle costs. A bundle whose places ran out, or whose window
|
|
1283
|
+
* closed, in between still grants what was paid for; it just does not grant the bonus.
|
|
1284
|
+
*/
|
|
1285
|
+
offer_key?: string;
|
|
1286
|
+
};
|
|
1287
|
+
PaymentMethodSetupSession: {
|
|
1288
|
+
/**
|
|
1289
|
+
* @description Initialises the provider's JavaScript, which mounts its form in an iframe on this page.
|
|
1290
|
+
*
|
|
1291
|
+
* Not a URL: the form is embedded rather than redirected to, so the account holder stays
|
|
1292
|
+
* on the console. It expires, so fetch it when the form is about to be shown rather than
|
|
1293
|
+
* when the page loads.
|
|
1294
|
+
*/
|
|
1295
|
+
client_secret: string;
|
|
1296
|
+
/**
|
|
1297
|
+
* @description Identifies this platform to the provider's JavaScript. Public by design.
|
|
1298
|
+
*
|
|
1299
|
+
* It comes from here rather than from the browser bundle because it has to match the
|
|
1300
|
+
* account and the mode of the key the session was created with. Baking it into the build
|
|
1301
|
+
* makes one image unusable against the other mode, and the mismatch shows up as a form
|
|
1302
|
+
* that never loads.
|
|
1303
|
+
*/
|
|
1304
|
+
publishable_key: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* @description The provider's id for this attempt.
|
|
1307
|
+
*
|
|
1308
|
+
* The browser does not need it — the callback carries the same id and is what actually
|
|
1309
|
+
* records the method. It is here so that a support conversation about one failed attempt
|
|
1310
|
+
* has something to look it up by.
|
|
1311
|
+
*/
|
|
1312
|
+
session_id?: string;
|
|
1313
|
+
};
|
|
1314
|
+
/**
|
|
1315
|
+
* @description One saved way of collecting money later, without the account holder present.
|
|
1316
|
+
*
|
|
1317
|
+
* Deliberately not called a card: a card is one kind, and direct debit and the recurring
|
|
1318
|
+
* mandates offered by regional wallets occupy the same slot.
|
|
1319
|
+
*/
|
|
1320
|
+
PaymentMethod: {
|
|
1321
|
+
/** @description The provider's id for it. Used to remove it or make it the default */
|
|
1322
|
+
id: string;
|
|
1323
|
+
/** @description Visa, Mastercard, and so on. Empty for kinds that have no brand */
|
|
1324
|
+
brand?: string;
|
|
1325
|
+
/**
|
|
1326
|
+
* @description The last four digits, for telling two saved methods apart.
|
|
1327
|
+
*
|
|
1328
|
+
* This and the expiry are the only parts of the instrument that exist here. The number,
|
|
1329
|
+
* the expiry the holder typed and the CVC never reach this platform.
|
|
1330
|
+
*/
|
|
1331
|
+
last4?: string;
|
|
1332
|
+
/** Format: int32 */
|
|
1333
|
+
exp_month?: number;
|
|
1334
|
+
/**
|
|
1335
|
+
* Format: int32
|
|
1336
|
+
* @description Together with `exp_month`, when this stops working.
|
|
1337
|
+
*
|
|
1338
|
+
* Worth showing because the failure is otherwise invisible: the card expires, the invoice
|
|
1339
|
+
* fails, dunning runs out, and the project stops — with nothing pointing at the card.
|
|
1340
|
+
*/
|
|
1341
|
+
exp_year?: number;
|
|
1342
|
+
/**
|
|
1343
|
+
* @description True for the one an invoice is collected from.
|
|
1344
|
+
*
|
|
1345
|
+
* Exactly one is the default while any exist. An account whose only method was removed
|
|
1346
|
+
* has none, and its next invoice cannot be collected.
|
|
1347
|
+
*/
|
|
1348
|
+
default: boolean;
|
|
1349
|
+
};
|
|
1350
|
+
PaymentMethodList: {
|
|
1351
|
+
payment_methods: components["schemas"]["PaymentMethod"][];
|
|
1352
|
+
};
|
|
1353
|
+
TopUpSession: {
|
|
1354
|
+
/**
|
|
1355
|
+
* @description Identifies this attempt. Quote it in a support conversation — it is what ties the payment
|
|
1356
|
+
* provider's record to the credit that was granted
|
|
1357
|
+
*/
|
|
1358
|
+
payment_id: string;
|
|
1359
|
+
/**
|
|
1360
|
+
* Format: uri
|
|
1361
|
+
* @description Send the browser here. It expires, so do not store it
|
|
1362
|
+
*/
|
|
1363
|
+
url: string;
|
|
1364
|
+
};
|
|
1365
|
+
/** @description One thing this period has been charged for */
|
|
1366
|
+
Charge: {
|
|
1367
|
+
id: string;
|
|
1368
|
+
name: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* @description Decimal string, the real-time figure. The booked figure would show a machine that only
|
|
1371
|
+
* just started as zero
|
|
1372
|
+
*/
|
|
1373
|
+
total: string;
|
|
1374
|
+
/**
|
|
1375
|
+
* @description Which meter it is for, when the charge came from usage. A hash, not something to show —
|
|
1376
|
+
* it is here so two rows can be told apart programmatically and so support can line a row
|
|
1377
|
+
* up with the catalogue.
|
|
1378
|
+
*/
|
|
1379
|
+
feature_key?: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* @description Whether this figure moves. A usage charge climbs through the period; a flat fee does not.
|
|
1382
|
+
* Without it, the same number on two refreshes could mean "nobody used it" or "it never
|
|
1383
|
+
* moves", and those need different next steps.
|
|
1384
|
+
* @enum {string}
|
|
1385
|
+
*/
|
|
1386
|
+
type: "usage_based" | "flat_fee";
|
|
1387
|
+
/**
|
|
1388
|
+
* Format: date-time
|
|
1389
|
+
* @description Start of the service period this charge covers.
|
|
1390
|
+
*
|
|
1391
|
+
* This is what tells two same-named rows apart. Something billed by the hour produces
|
|
1392
|
+
* hundreds of identically named charges in a month, and a list carrying only a name and an
|
|
1393
|
+
* amount shows them as a wall of duplicates — which is what it looks like today.
|
|
1394
|
+
*/
|
|
1395
|
+
period_from: string;
|
|
1396
|
+
/**
|
|
1397
|
+
* Format: date-time
|
|
1398
|
+
* @description End of the service period this charge covers.
|
|
1399
|
+
*/
|
|
1400
|
+
period_to: string;
|
|
1401
|
+
/**
|
|
1402
|
+
* @description How much of this charge was covered by credit, as a decimal string.
|
|
1403
|
+
*
|
|
1404
|
+
* It is the answer to "I have a balance, why am I still being charged". Without it the
|
|
1405
|
+
* customer sees a number that disagrees with what they expected and the only thing that
|
|
1406
|
+
* explains it is on our side.
|
|
1407
|
+
*/
|
|
1408
|
+
credits?: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* @description How much was taken off by a discount, as a decimal string. A usage allowance (the first N
|
|
1411
|
+
* units free) lands here too.
|
|
1412
|
+
*/
|
|
1413
|
+
discounts?: string;
|
|
1414
|
+
/** @description Free text from the charge, usually empty. Set on charges raised by hand. */
|
|
1415
|
+
description?: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* @description What one unit costs, as a decimal string. Absent when the line has no single unit price
|
|
1418
|
+
* — a flat fee, or a tiered price whose rate changes with volume.
|
|
1419
|
+
*
|
|
1420
|
+
* The conversion between reported and billed quantity is deliberately not here: the engine
|
|
1421
|
+
* does not echo it back on a charge, only on an invoice line. So a charge answers "what
|
|
1422
|
+
* does a unit cost", and an invoice answers "how the total was reached".
|
|
1423
|
+
*/
|
|
1424
|
+
unit_price?: string;
|
|
1425
|
+
};
|
|
1426
|
+
/** @description What produced one charge */
|
|
1427
|
+
ChargeUsage: {
|
|
1428
|
+
charge_id: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* @description Total reported quantity for the period, as a decimal string. Empty on a charge with no
|
|
1431
|
+
* meter behind it.
|
|
1432
|
+
*
|
|
1433
|
+
* Reported, not billed: see the route's description.
|
|
1434
|
+
*/
|
|
1435
|
+
quantity: string;
|
|
1436
|
+
/**
|
|
1437
|
+
* @description The same quantity split by project. Empty when the charge has no meter behind it — a
|
|
1438
|
+
* flat fee has nothing to attribute.
|
|
1439
|
+
*/
|
|
1440
|
+
by_project: components["schemas"]["ProjectUsage"][];
|
|
1441
|
+
/**
|
|
1442
|
+
* @description Resources of this product in the account's projects — candidates for what produced the
|
|
1443
|
+
* charge, not a per-resource breakdown. Absent when billing could not look them up; the
|
|
1444
|
+
* charge itself is still answered.
|
|
1445
|
+
*/
|
|
1446
|
+
resources?: components["schemas"]["ChargeResource"][];
|
|
1447
|
+
};
|
|
1448
|
+
ProjectUsage: {
|
|
1449
|
+
project_id: string;
|
|
1450
|
+
/** @description Decimal string. */
|
|
1451
|
+
quantity: string;
|
|
1452
|
+
};
|
|
1453
|
+
ChargeResource: {
|
|
1454
|
+
project_id: string;
|
|
1455
|
+
/** @description Which service holds it, and therefore which console manages it. */
|
|
1456
|
+
service: string;
|
|
1457
|
+
product_id: string;
|
|
1458
|
+
resource_id: string;
|
|
1459
|
+
/** @enum {string} */
|
|
1460
|
+
state: "pending" | "active" | "suspended" | "terminated";
|
|
1461
|
+
};
|
|
1462
|
+
ChargeList: {
|
|
1463
|
+
currency: components["schemas"]["Currency"];
|
|
1464
|
+
charges: components["schemas"]["Charge"][];
|
|
1465
|
+
/**
|
|
1466
|
+
* Format: int64
|
|
1467
|
+
* @description How many charges there are in total, across every page.
|
|
1468
|
+
*
|
|
1469
|
+
* Without it, "is there another page" has to be guessed from whether this one came back
|
|
1470
|
+
* full — and that guess turns into one extra fetch of an empty page whenever the last page
|
|
1471
|
+
* happens to be exactly full.
|
|
1472
|
+
*/
|
|
1473
|
+
total_count?: number;
|
|
1474
|
+
/**
|
|
1475
|
+
* @description The sum over the **whole period**, not this page — it is the same number as `unsettled`
|
|
1476
|
+
* on the balance, and paging must not change it. A page-scoped sum would disagree with the
|
|
1477
|
+
* balance card sitting next to it, and there would be no way to tell which one to believe.
|
|
1478
|
+
*/
|
|
1479
|
+
total: string;
|
|
1480
|
+
};
|
|
1481
|
+
/** @enum {string} */
|
|
1482
|
+
InvoiceStatus: "draft" | "issuing" | "issued" | "payment_processing" | "overdue" | "paid" | "uncollectible" | "voided";
|
|
1483
|
+
Invoice: {
|
|
1484
|
+
id: string;
|
|
1485
|
+
number?: string;
|
|
1486
|
+
status: components["schemas"]["InvoiceStatus"];
|
|
1487
|
+
currency: components["schemas"]["Currency"];
|
|
1488
|
+
total: string;
|
|
1489
|
+
/** Format: date-time */
|
|
1490
|
+
due_at?: string;
|
|
1491
|
+
/** Format: date-time */
|
|
1492
|
+
issued_at?: string;
|
|
1493
|
+
/** Format: date-time */
|
|
1494
|
+
created_at: string;
|
|
1495
|
+
};
|
|
1496
|
+
InvoiceList: {
|
|
1497
|
+
invoices: components["schemas"]["Invoice"][];
|
|
1498
|
+
};
|
|
1499
|
+
InvoiceLine: {
|
|
1500
|
+
name: string;
|
|
1501
|
+
description?: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* Format: date-time
|
|
1504
|
+
* @description Required. Lines of the same name repeat many times on one invoice — hundreds on an hourly
|
|
1505
|
+
* bill — and without the period they cannot be told apart
|
|
1506
|
+
*/
|
|
1507
|
+
period_from: string;
|
|
1508
|
+
/** Format: date-time */
|
|
1509
|
+
period_to: string;
|
|
1510
|
+
/** @description Before discounts and credit */
|
|
1511
|
+
amount: string;
|
|
1512
|
+
discounts_total?: string;
|
|
1513
|
+
/**
|
|
1514
|
+
* @description The billed quantity for this line, as a decimal string — after conversion. A machine
|
|
1515
|
+
* billed by the hour reports machine-seconds; this is machine-hours.
|
|
1516
|
+
*
|
|
1517
|
+
* It comes from the line's detailed segments summed together: the engine splits a line
|
|
1518
|
+
* into segments (different cost categories, different sub-periods) and the quantity lives
|
|
1519
|
+
* on those.
|
|
1520
|
+
*/
|
|
1521
|
+
quantity?: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* @description What one unit cost, as a decimal string, frozen at billing time. Absent on a flat fee,
|
|
1524
|
+
* whose amount is the amount, and on tiered prices, whose rate changes with volume.
|
|
1525
|
+
*/
|
|
1526
|
+
unit_price?: string;
|
|
1527
|
+
/**
|
|
1528
|
+
* @description How reported quantity became billed quantity — 3600 for a machine billed by the hour
|
|
1529
|
+
* from machine-seconds, 1000000 for a price per million tokens.
|
|
1530
|
+
*
|
|
1531
|
+
* Without it, `quantity` disagrees with what the customer remembers doing, by whole orders
|
|
1532
|
+
* of magnitude, and there is nothing on the page that explains the gap.
|
|
1533
|
+
*/
|
|
1534
|
+
conversion_factor?: string;
|
|
1535
|
+
/**
|
|
1536
|
+
* @description What was done with the factor.
|
|
1537
|
+
* @enum {string}
|
|
1538
|
+
*/
|
|
1539
|
+
conversion_operation?: "divide" | "multiply";
|
|
1540
|
+
/** @description How much of this line credit covered */
|
|
1541
|
+
credits_total?: string;
|
|
1542
|
+
total: string;
|
|
1543
|
+
};
|
|
1544
|
+
InvoiceDetail: {
|
|
1545
|
+
id: string;
|
|
1546
|
+
number?: string;
|
|
1547
|
+
status: components["schemas"]["InvoiceStatus"];
|
|
1548
|
+
currency: components["schemas"]["Currency"];
|
|
1549
|
+
total: string;
|
|
1550
|
+
charges_total?: string;
|
|
1551
|
+
discounts_total?: string;
|
|
1552
|
+
credits_total?: string;
|
|
1553
|
+
taxes_total?: string;
|
|
1554
|
+
/** Format: date-time */
|
|
1555
|
+
period_from?: string;
|
|
1556
|
+
/** Format: date-time */
|
|
1557
|
+
period_to?: string;
|
|
1558
|
+
/** Format: date-time */
|
|
1559
|
+
due_at?: string;
|
|
1560
|
+
/** Format: date-time */
|
|
1561
|
+
issued_at?: string;
|
|
1562
|
+
/** Format: date-time */
|
|
1563
|
+
created_at: string;
|
|
1564
|
+
lines: components["schemas"]["InvoiceLine"][];
|
|
1565
|
+
};
|
|
1566
|
+
Subscription: {
|
|
1567
|
+
id: string;
|
|
1568
|
+
plan_key: string;
|
|
1569
|
+
plan_version?: number;
|
|
1570
|
+
/**
|
|
1571
|
+
* @description `canceled` still counts as being on a plan — it is serving until the end of the period,
|
|
1572
|
+
* which has already been paid for
|
|
1573
|
+
*/
|
|
1574
|
+
status: string;
|
|
1575
|
+
};
|
|
1576
|
+
TopUpStatus: {
|
|
1577
|
+
payment_id: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* @description `settled` means the credit has landed. `pending` means it has not yet — the payment is
|
|
1580
|
+
* still being confirmed, or the money itself is still in transit
|
|
1581
|
+
* @enum {string}
|
|
1582
|
+
*/
|
|
1583
|
+
state: "settled" | "pending";
|
|
1584
|
+
/** @description The credit that was issued, present once settled */
|
|
1585
|
+
amount?: string;
|
|
1586
|
+
currency?: components["schemas"]["Currency"];
|
|
1587
|
+
};
|
|
1588
|
+
/**
|
|
1589
|
+
* @description ISO 4217, uppercase. `USD` is the only value the platform issues today, and a request
|
|
1590
|
+
* naming any other is refused with `BILLING_CURRENCY_UNSUPPORTED`.
|
|
1591
|
+
*
|
|
1592
|
+
* Deliberately not an enumeration. The set of currency codes is governed outside this API, so
|
|
1593
|
+
* a client generated today must still be able to read a response naming a code added later —
|
|
1594
|
+
* an enumeration turns that response into a decode failure in a client nobody can redeploy.
|
|
1595
|
+
* Restricting what may be *sent* is a rule about what the platform supports, and it lives
|
|
1596
|
+
* where that rule can change without regenerating anything.
|
|
1597
|
+
*/
|
|
1598
|
+
Currency: string;
|
|
1599
|
+
};
|
|
1600
|
+
responses: never;
|
|
1601
|
+
parameters: {
|
|
1602
|
+
/** @description Which asset, from the prepaid list */
|
|
1603
|
+
ProvisionId: string;
|
|
1604
|
+
/**
|
|
1605
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1606
|
+
* which is why the key is what addresses the account.
|
|
1607
|
+
*/
|
|
1608
|
+
AccountKey: string;
|
|
1609
|
+
};
|
|
1610
|
+
requestBodies: never;
|
|
1611
|
+
headers: never;
|
|
1612
|
+
pathItems: never;
|
|
1613
|
+
}
|
|
1614
|
+
export type $defs = Record<string, never>;
|
|
1615
|
+
export interface operations {
|
|
1616
|
+
"list-billing-accounts": {
|
|
1617
|
+
parameters: {
|
|
1618
|
+
query?: never;
|
|
1619
|
+
header?: never;
|
|
1620
|
+
path?: never;
|
|
1621
|
+
cookie?: never;
|
|
1622
|
+
};
|
|
1623
|
+
requestBody?: never;
|
|
1624
|
+
responses: {
|
|
1625
|
+
/** @description OK */
|
|
1626
|
+
200: {
|
|
1627
|
+
headers: {
|
|
1628
|
+
[name: string]: unknown;
|
|
1629
|
+
};
|
|
1630
|
+
content: {
|
|
1631
|
+
"application/json": components["schemas"]["BillingAccountList"];
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
/** @description Error */
|
|
1635
|
+
default: {
|
|
1636
|
+
headers: {
|
|
1637
|
+
[name: string]: unknown;
|
|
1638
|
+
};
|
|
1639
|
+
content: {
|
|
1640
|
+
"application/json": components["schemas"]["Error"];
|
|
1641
|
+
};
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1645
|
+
"create-billing-account": {
|
|
1646
|
+
parameters: {
|
|
1647
|
+
query?: never;
|
|
1648
|
+
header?: never;
|
|
1649
|
+
path?: never;
|
|
1650
|
+
cookie?: never;
|
|
1651
|
+
};
|
|
1652
|
+
requestBody: {
|
|
1653
|
+
content: {
|
|
1654
|
+
"application/json": components["schemas"]["CreateBillingAccountRequestBody"];
|
|
1655
|
+
};
|
|
1656
|
+
};
|
|
1657
|
+
responses: {
|
|
1658
|
+
/** @description OK */
|
|
1659
|
+
200: {
|
|
1660
|
+
headers: {
|
|
1661
|
+
[name: string]: unknown;
|
|
1662
|
+
};
|
|
1663
|
+
content: {
|
|
1664
|
+
"application/json": components["schemas"]["BillingAccount"];
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
/** @description Error */
|
|
1668
|
+
default: {
|
|
1669
|
+
headers: {
|
|
1670
|
+
[name: string]: unknown;
|
|
1671
|
+
};
|
|
1672
|
+
content: {
|
|
1673
|
+
"application/json": components["schemas"]["Error"];
|
|
1674
|
+
};
|
|
1675
|
+
};
|
|
1676
|
+
};
|
|
1677
|
+
};
|
|
1678
|
+
"get-billing-account": {
|
|
1679
|
+
parameters: {
|
|
1680
|
+
query?: never;
|
|
1681
|
+
header?: never;
|
|
1682
|
+
path: {
|
|
1683
|
+
/**
|
|
1684
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1685
|
+
* which is why the key is what addresses the account.
|
|
1686
|
+
*/
|
|
1687
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1688
|
+
};
|
|
1689
|
+
cookie?: never;
|
|
1690
|
+
};
|
|
1691
|
+
requestBody?: never;
|
|
1692
|
+
responses: {
|
|
1693
|
+
/** @description OK */
|
|
1694
|
+
200: {
|
|
1695
|
+
headers: {
|
|
1696
|
+
[name: string]: unknown;
|
|
1697
|
+
};
|
|
1698
|
+
content: {
|
|
1699
|
+
"application/json": components["schemas"]["BillingAccount"];
|
|
1700
|
+
};
|
|
1701
|
+
};
|
|
1702
|
+
/** @description Error */
|
|
1703
|
+
default: {
|
|
1704
|
+
headers: {
|
|
1705
|
+
[name: string]: unknown;
|
|
1706
|
+
};
|
|
1707
|
+
content: {
|
|
1708
|
+
"application/json": components["schemas"]["Error"];
|
|
1709
|
+
};
|
|
1710
|
+
};
|
|
1711
|
+
};
|
|
1712
|
+
};
|
|
1713
|
+
"update-billing-account": {
|
|
1714
|
+
parameters: {
|
|
1715
|
+
query?: never;
|
|
1716
|
+
header?: never;
|
|
1717
|
+
path: {
|
|
1718
|
+
/**
|
|
1719
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1720
|
+
* which is why the key is what addresses the account.
|
|
1721
|
+
*/
|
|
1722
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1723
|
+
};
|
|
1724
|
+
cookie?: never;
|
|
1725
|
+
};
|
|
1726
|
+
requestBody: {
|
|
1727
|
+
content: {
|
|
1728
|
+
"application/json": components["schemas"]["UpdateBillingAccountRequestBody"];
|
|
1729
|
+
};
|
|
1730
|
+
};
|
|
1731
|
+
responses: {
|
|
1732
|
+
/** @description OK */
|
|
1733
|
+
200: {
|
|
1734
|
+
headers: {
|
|
1735
|
+
[name: string]: unknown;
|
|
1736
|
+
};
|
|
1737
|
+
content: {
|
|
1738
|
+
"application/json": components["schemas"]["BillingAccount"];
|
|
1739
|
+
};
|
|
1740
|
+
};
|
|
1741
|
+
/** @description Error */
|
|
1742
|
+
default: {
|
|
1743
|
+
headers: {
|
|
1744
|
+
[name: string]: unknown;
|
|
1745
|
+
};
|
|
1746
|
+
content: {
|
|
1747
|
+
"application/json": components["schemas"]["Error"];
|
|
1748
|
+
};
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1751
|
+
};
|
|
1752
|
+
"list-credit-transactions": {
|
|
1753
|
+
parameters: {
|
|
1754
|
+
query?: never;
|
|
1755
|
+
header?: never;
|
|
1756
|
+
path: {
|
|
1757
|
+
/**
|
|
1758
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1759
|
+
* which is why the key is what addresses the account.
|
|
1760
|
+
*/
|
|
1761
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1762
|
+
};
|
|
1763
|
+
cookie?: never;
|
|
1764
|
+
};
|
|
1765
|
+
requestBody?: never;
|
|
1766
|
+
responses: {
|
|
1767
|
+
/** @description OK */
|
|
1768
|
+
200: {
|
|
1769
|
+
headers: {
|
|
1770
|
+
[name: string]: unknown;
|
|
1771
|
+
};
|
|
1772
|
+
content: {
|
|
1773
|
+
"application/json": components["schemas"]["CreditTransactionList"];
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
/** @description Error */
|
|
1777
|
+
default: {
|
|
1778
|
+
headers: {
|
|
1779
|
+
[name: string]: unknown;
|
|
1780
|
+
};
|
|
1781
|
+
content: {
|
|
1782
|
+
"application/json": components["schemas"]["Error"];
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
};
|
|
1787
|
+
"read-billing-account-balance": {
|
|
1788
|
+
parameters: {
|
|
1789
|
+
query?: never;
|
|
1790
|
+
header?: never;
|
|
1791
|
+
path: {
|
|
1792
|
+
/**
|
|
1793
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1794
|
+
* which is why the key is what addresses the account.
|
|
1795
|
+
*/
|
|
1796
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1797
|
+
};
|
|
1798
|
+
cookie?: never;
|
|
1799
|
+
};
|
|
1800
|
+
requestBody?: never;
|
|
1801
|
+
responses: {
|
|
1802
|
+
/** @description OK */
|
|
1803
|
+
200: {
|
|
1804
|
+
headers: {
|
|
1805
|
+
[name: string]: unknown;
|
|
1806
|
+
};
|
|
1807
|
+
content: {
|
|
1808
|
+
"application/json": components["schemas"]["Balance"];
|
|
1809
|
+
};
|
|
1810
|
+
};
|
|
1811
|
+
/** @description Error */
|
|
1812
|
+
default: {
|
|
1813
|
+
headers: {
|
|
1814
|
+
[name: string]: unknown;
|
|
1815
|
+
};
|
|
1816
|
+
content: {
|
|
1817
|
+
"application/json": components["schemas"]["Error"];
|
|
1818
|
+
};
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
"bind-project-to-billing-account": {
|
|
1823
|
+
parameters: {
|
|
1824
|
+
query?: never;
|
|
1825
|
+
header?: never;
|
|
1826
|
+
path: {
|
|
1827
|
+
/**
|
|
1828
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1829
|
+
* which is why the key is what addresses the account.
|
|
1830
|
+
*/
|
|
1831
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1832
|
+
/** @description The project this account should pay for */
|
|
1833
|
+
projectId: string;
|
|
1834
|
+
};
|
|
1835
|
+
cookie?: never;
|
|
1836
|
+
};
|
|
1837
|
+
requestBody?: never;
|
|
1838
|
+
responses: {
|
|
1839
|
+
/** @description OK */
|
|
1840
|
+
200: {
|
|
1841
|
+
headers: {
|
|
1842
|
+
[name: string]: unknown;
|
|
1843
|
+
};
|
|
1844
|
+
content: {
|
|
1845
|
+
"application/json": components["schemas"]["ProjectBinding"];
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
/** @description Error */
|
|
1849
|
+
default: {
|
|
1850
|
+
headers: {
|
|
1851
|
+
[name: string]: unknown;
|
|
1852
|
+
};
|
|
1853
|
+
content: {
|
|
1854
|
+
"application/json": components["schemas"]["Error"];
|
|
1855
|
+
};
|
|
1856
|
+
};
|
|
1857
|
+
};
|
|
1858
|
+
};
|
|
1859
|
+
"unbind-project-from-billing-account": {
|
|
1860
|
+
parameters: {
|
|
1861
|
+
query?: never;
|
|
1862
|
+
header?: never;
|
|
1863
|
+
path: {
|
|
1864
|
+
/**
|
|
1865
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1866
|
+
* which is why the key is what addresses the account.
|
|
1867
|
+
*/
|
|
1868
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1869
|
+
/** @description The project to stop paying for */
|
|
1870
|
+
projectId: string;
|
|
1871
|
+
};
|
|
1872
|
+
cookie?: never;
|
|
1873
|
+
};
|
|
1874
|
+
requestBody?: never;
|
|
1875
|
+
responses: {
|
|
1876
|
+
/** @description Unbound */
|
|
1877
|
+
204: {
|
|
1878
|
+
headers: {
|
|
1879
|
+
[name: string]: unknown;
|
|
1880
|
+
};
|
|
1881
|
+
content?: never;
|
|
1882
|
+
};
|
|
1883
|
+
/** @description Error */
|
|
1884
|
+
default: {
|
|
1885
|
+
headers: {
|
|
1886
|
+
[name: string]: unknown;
|
|
1887
|
+
};
|
|
1888
|
+
content: {
|
|
1889
|
+
"application/json": components["schemas"]["Error"];
|
|
1890
|
+
};
|
|
1891
|
+
};
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
"list-orders": {
|
|
1895
|
+
parameters: {
|
|
1896
|
+
query?: never;
|
|
1897
|
+
header?: never;
|
|
1898
|
+
path: {
|
|
1899
|
+
/**
|
|
1900
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1901
|
+
* which is why the key is what addresses the account.
|
|
1902
|
+
*/
|
|
1903
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1904
|
+
};
|
|
1905
|
+
cookie?: never;
|
|
1906
|
+
};
|
|
1907
|
+
requestBody?: never;
|
|
1908
|
+
responses: {
|
|
1909
|
+
/** @description OK */
|
|
1910
|
+
200: {
|
|
1911
|
+
headers: {
|
|
1912
|
+
[name: string]: unknown;
|
|
1913
|
+
};
|
|
1914
|
+
content: {
|
|
1915
|
+
"application/json": components["schemas"]["OrderList"];
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
/** @description Error */
|
|
1919
|
+
default: {
|
|
1920
|
+
headers: {
|
|
1921
|
+
[name: string]: unknown;
|
|
1922
|
+
};
|
|
1923
|
+
content: {
|
|
1924
|
+
"application/json": components["schemas"]["Error"];
|
|
1925
|
+
};
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
};
|
|
1929
|
+
"get-order": {
|
|
1930
|
+
parameters: {
|
|
1931
|
+
query?: never;
|
|
1932
|
+
header?: never;
|
|
1933
|
+
path: {
|
|
1934
|
+
/**
|
|
1935
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1936
|
+
* which is why the key is what addresses the account.
|
|
1937
|
+
*/
|
|
1938
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1939
|
+
orderId: string;
|
|
1940
|
+
};
|
|
1941
|
+
cookie?: never;
|
|
1942
|
+
};
|
|
1943
|
+
requestBody?: never;
|
|
1944
|
+
responses: {
|
|
1945
|
+
/** @description OK */
|
|
1946
|
+
200: {
|
|
1947
|
+
headers: {
|
|
1948
|
+
[name: string]: unknown;
|
|
1949
|
+
};
|
|
1950
|
+
content: {
|
|
1951
|
+
"application/json": components["schemas"]["Order"];
|
|
1952
|
+
};
|
|
1953
|
+
};
|
|
1954
|
+
/** @description Error */
|
|
1955
|
+
default: {
|
|
1956
|
+
headers: {
|
|
1957
|
+
[name: string]: unknown;
|
|
1958
|
+
};
|
|
1959
|
+
content: {
|
|
1960
|
+
"application/json": components["schemas"]["Error"];
|
|
1961
|
+
};
|
|
1962
|
+
};
|
|
1963
|
+
};
|
|
1964
|
+
};
|
|
1965
|
+
"list-top-ups": {
|
|
1966
|
+
parameters: {
|
|
1967
|
+
query?: never;
|
|
1968
|
+
header?: never;
|
|
1969
|
+
path: {
|
|
1970
|
+
/**
|
|
1971
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
1972
|
+
* which is why the key is what addresses the account.
|
|
1973
|
+
*/
|
|
1974
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
1975
|
+
};
|
|
1976
|
+
cookie?: never;
|
|
1977
|
+
};
|
|
1978
|
+
requestBody?: never;
|
|
1979
|
+
responses: {
|
|
1980
|
+
/** @description OK */
|
|
1981
|
+
200: {
|
|
1982
|
+
headers: {
|
|
1983
|
+
[name: string]: unknown;
|
|
1984
|
+
};
|
|
1985
|
+
content: {
|
|
1986
|
+
"application/json": components["schemas"]["TopUpList"];
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
/** @description Error */
|
|
1990
|
+
default: {
|
|
1991
|
+
headers: {
|
|
1992
|
+
[name: string]: unknown;
|
|
1993
|
+
};
|
|
1994
|
+
content: {
|
|
1995
|
+
"application/json": components["schemas"]["Error"];
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
};
|
|
2000
|
+
"start-top-up": {
|
|
2001
|
+
parameters: {
|
|
2002
|
+
query?: never;
|
|
2003
|
+
header?: never;
|
|
2004
|
+
path: {
|
|
2005
|
+
/**
|
|
2006
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2007
|
+
* which is why the key is what addresses the account.
|
|
2008
|
+
*/
|
|
2009
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2010
|
+
};
|
|
2011
|
+
cookie?: never;
|
|
2012
|
+
};
|
|
2013
|
+
requestBody: {
|
|
2014
|
+
content: {
|
|
2015
|
+
"application/json": components["schemas"]["StartTopUpRequestBody"];
|
|
2016
|
+
};
|
|
2017
|
+
};
|
|
2018
|
+
responses: {
|
|
2019
|
+
/** @description OK */
|
|
2020
|
+
200: {
|
|
2021
|
+
headers: {
|
|
2022
|
+
[name: string]: unknown;
|
|
2023
|
+
};
|
|
2024
|
+
content: {
|
|
2025
|
+
"application/json": components["schemas"]["TopUpSession"];
|
|
2026
|
+
};
|
|
2027
|
+
};
|
|
2028
|
+
/** @description Error */
|
|
2029
|
+
default: {
|
|
2030
|
+
headers: {
|
|
2031
|
+
[name: string]: unknown;
|
|
2032
|
+
};
|
|
2033
|
+
content: {
|
|
2034
|
+
"application/json": components["schemas"]["Error"];
|
|
2035
|
+
};
|
|
2036
|
+
};
|
|
2037
|
+
};
|
|
2038
|
+
};
|
|
2039
|
+
"list-charges": {
|
|
2040
|
+
parameters: {
|
|
2041
|
+
query?: {
|
|
2042
|
+
/** @description 1-based page number; the first page when omitted. */
|
|
2043
|
+
page?: number;
|
|
2044
|
+
/**
|
|
2045
|
+
* @description How many charges per page. Defaults to a full page.
|
|
2046
|
+
*
|
|
2047
|
+
* Charge count grows with resource count — an account running dozens of machines produces
|
|
2048
|
+
* hundreds of lines in a period, and a screen shows a dozen. Fetching all of them on every
|
|
2049
|
+
* visit carries data nothing displays.
|
|
2050
|
+
*/
|
|
2051
|
+
page_size?: number;
|
|
2052
|
+
};
|
|
2053
|
+
header?: never;
|
|
2054
|
+
path: {
|
|
2055
|
+
/**
|
|
2056
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2057
|
+
* which is why the key is what addresses the account.
|
|
2058
|
+
*/
|
|
2059
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2060
|
+
};
|
|
2061
|
+
cookie?: never;
|
|
2062
|
+
};
|
|
2063
|
+
requestBody?: never;
|
|
2064
|
+
responses: {
|
|
2065
|
+
/** @description OK */
|
|
2066
|
+
200: {
|
|
2067
|
+
headers: {
|
|
2068
|
+
[name: string]: unknown;
|
|
2069
|
+
};
|
|
2070
|
+
content: {
|
|
2071
|
+
"application/json": components["schemas"]["ChargeList"];
|
|
2072
|
+
};
|
|
2073
|
+
};
|
|
2074
|
+
/** @description Error */
|
|
2075
|
+
default: {
|
|
2076
|
+
headers: {
|
|
2077
|
+
[name: string]: unknown;
|
|
2078
|
+
};
|
|
2079
|
+
content: {
|
|
2080
|
+
"application/json": components["schemas"]["Error"];
|
|
2081
|
+
};
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2085
|
+
"get-charge-usage": {
|
|
2086
|
+
parameters: {
|
|
2087
|
+
query?: never;
|
|
2088
|
+
header?: never;
|
|
2089
|
+
path: {
|
|
2090
|
+
/**
|
|
2091
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2092
|
+
* which is why the key is what addresses the account.
|
|
2093
|
+
*/
|
|
2094
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2095
|
+
/** @description Which charge, from the charges list */
|
|
2096
|
+
chargeId: string;
|
|
2097
|
+
};
|
|
2098
|
+
cookie?: never;
|
|
2099
|
+
};
|
|
2100
|
+
requestBody?: never;
|
|
2101
|
+
responses: {
|
|
2102
|
+
/** @description OK */
|
|
2103
|
+
200: {
|
|
2104
|
+
headers: {
|
|
2105
|
+
[name: string]: unknown;
|
|
2106
|
+
};
|
|
2107
|
+
content: {
|
|
2108
|
+
"application/json": components["schemas"]["ChargeUsage"];
|
|
2109
|
+
};
|
|
2110
|
+
};
|
|
2111
|
+
/** @description Error */
|
|
2112
|
+
default: {
|
|
2113
|
+
headers: {
|
|
2114
|
+
[name: string]: unknown;
|
|
2115
|
+
};
|
|
2116
|
+
content: {
|
|
2117
|
+
"application/json": components["schemas"]["Error"];
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
};
|
|
2121
|
+
};
|
|
2122
|
+
"list-invoices": {
|
|
2123
|
+
parameters: {
|
|
2124
|
+
query?: never;
|
|
2125
|
+
header?: never;
|
|
2126
|
+
path: {
|
|
2127
|
+
/**
|
|
2128
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2129
|
+
* which is why the key is what addresses the account.
|
|
2130
|
+
*/
|
|
2131
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2132
|
+
};
|
|
2133
|
+
cookie?: never;
|
|
2134
|
+
};
|
|
2135
|
+
requestBody?: never;
|
|
2136
|
+
responses: {
|
|
2137
|
+
/** @description OK */
|
|
2138
|
+
200: {
|
|
2139
|
+
headers: {
|
|
2140
|
+
[name: string]: unknown;
|
|
2141
|
+
};
|
|
2142
|
+
content: {
|
|
2143
|
+
"application/json": components["schemas"]["InvoiceList"];
|
|
2144
|
+
};
|
|
2145
|
+
};
|
|
2146
|
+
/** @description Error */
|
|
2147
|
+
default: {
|
|
2148
|
+
headers: {
|
|
2149
|
+
[name: string]: unknown;
|
|
2150
|
+
};
|
|
2151
|
+
content: {
|
|
2152
|
+
"application/json": components["schemas"]["Error"];
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
};
|
|
2157
|
+
"get-invoice": {
|
|
2158
|
+
parameters: {
|
|
2159
|
+
query?: never;
|
|
2160
|
+
header?: never;
|
|
2161
|
+
path: {
|
|
2162
|
+
/**
|
|
2163
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2164
|
+
* which is why the key is what addresses the account.
|
|
2165
|
+
*/
|
|
2166
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2167
|
+
invoiceId: string;
|
|
2168
|
+
};
|
|
2169
|
+
cookie?: never;
|
|
2170
|
+
};
|
|
2171
|
+
requestBody?: never;
|
|
2172
|
+
responses: {
|
|
2173
|
+
/** @description OK */
|
|
2174
|
+
200: {
|
|
2175
|
+
headers: {
|
|
2176
|
+
[name: string]: unknown;
|
|
2177
|
+
};
|
|
2178
|
+
content: {
|
|
2179
|
+
"application/json": components["schemas"]["InvoiceDetail"];
|
|
2180
|
+
};
|
|
2181
|
+
};
|
|
2182
|
+
/** @description Error */
|
|
2183
|
+
default: {
|
|
2184
|
+
headers: {
|
|
2185
|
+
[name: string]: unknown;
|
|
2186
|
+
};
|
|
2187
|
+
content: {
|
|
2188
|
+
"application/json": components["schemas"]["Error"];
|
|
2189
|
+
};
|
|
2190
|
+
};
|
|
2191
|
+
};
|
|
2192
|
+
};
|
|
2193
|
+
"read-project-billing-account": {
|
|
2194
|
+
parameters: {
|
|
2195
|
+
query?: never;
|
|
2196
|
+
header?: never;
|
|
2197
|
+
path: {
|
|
2198
|
+
/** @description The project being worked in */
|
|
2199
|
+
projectId: string;
|
|
2200
|
+
};
|
|
2201
|
+
cookie?: never;
|
|
2202
|
+
};
|
|
2203
|
+
requestBody?: never;
|
|
2204
|
+
responses: {
|
|
2205
|
+
/** @description OK */
|
|
2206
|
+
200: {
|
|
2207
|
+
headers: {
|
|
2208
|
+
[name: string]: unknown;
|
|
2209
|
+
};
|
|
2210
|
+
content: {
|
|
2211
|
+
"application/json": components["schemas"]["ProjectBillingAccount"];
|
|
2212
|
+
};
|
|
2213
|
+
};
|
|
2214
|
+
/** @description Error */
|
|
2215
|
+
default: {
|
|
2216
|
+
headers: {
|
|
2217
|
+
[name: string]: unknown;
|
|
2218
|
+
};
|
|
2219
|
+
content: {
|
|
2220
|
+
"application/json": components["schemas"]["Error"];
|
|
2221
|
+
};
|
|
2222
|
+
};
|
|
2223
|
+
};
|
|
2224
|
+
};
|
|
2225
|
+
"quote-project-usage": {
|
|
2226
|
+
parameters: {
|
|
2227
|
+
query?: never;
|
|
2228
|
+
header?: never;
|
|
2229
|
+
path: {
|
|
2230
|
+
projectId: string;
|
|
2231
|
+
};
|
|
2232
|
+
cookie?: never;
|
|
2233
|
+
};
|
|
2234
|
+
requestBody: {
|
|
2235
|
+
content: {
|
|
2236
|
+
"application/json": components["schemas"]["QuoteRequest"];
|
|
2237
|
+
};
|
|
2238
|
+
};
|
|
2239
|
+
responses: {
|
|
2240
|
+
/** @description OK */
|
|
2241
|
+
200: {
|
|
2242
|
+
headers: {
|
|
2243
|
+
[name: string]: unknown;
|
|
2244
|
+
};
|
|
2245
|
+
content: {
|
|
2246
|
+
"application/json": components["schemas"]["Quote"];
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
2249
|
+
/** @description Error */
|
|
2250
|
+
default: {
|
|
2251
|
+
headers: {
|
|
2252
|
+
[name: string]: unknown;
|
|
2253
|
+
};
|
|
2254
|
+
content: {
|
|
2255
|
+
"application/json": components["schemas"]["Error"];
|
|
2256
|
+
};
|
|
2257
|
+
};
|
|
2258
|
+
};
|
|
2259
|
+
};
|
|
2260
|
+
"quote-usage": {
|
|
2261
|
+
parameters: {
|
|
2262
|
+
query?: never;
|
|
2263
|
+
header?: never;
|
|
2264
|
+
path: {
|
|
2265
|
+
/**
|
|
2266
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2267
|
+
* which is why the key is what addresses the account.
|
|
2268
|
+
*/
|
|
2269
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2270
|
+
};
|
|
2271
|
+
cookie?: never;
|
|
2272
|
+
};
|
|
2273
|
+
requestBody: {
|
|
2274
|
+
content: {
|
|
2275
|
+
"application/json": components["schemas"]["QuoteRequest"];
|
|
2276
|
+
};
|
|
2277
|
+
};
|
|
2278
|
+
responses: {
|
|
2279
|
+
/** @description OK */
|
|
2280
|
+
200: {
|
|
2281
|
+
headers: {
|
|
2282
|
+
[name: string]: unknown;
|
|
2283
|
+
};
|
|
2284
|
+
content: {
|
|
2285
|
+
"application/json": components["schemas"]["Quote"];
|
|
2286
|
+
};
|
|
2287
|
+
};
|
|
2288
|
+
/** @description Error */
|
|
2289
|
+
default: {
|
|
2290
|
+
headers: {
|
|
2291
|
+
[name: string]: unknown;
|
|
2292
|
+
};
|
|
2293
|
+
content: {
|
|
2294
|
+
"application/json": components["schemas"]["Error"];
|
|
2295
|
+
};
|
|
2296
|
+
};
|
|
2297
|
+
};
|
|
2298
|
+
};
|
|
2299
|
+
"read-subscription": {
|
|
2300
|
+
parameters: {
|
|
2301
|
+
query?: never;
|
|
2302
|
+
header?: never;
|
|
2303
|
+
path: {
|
|
2304
|
+
/**
|
|
2305
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2306
|
+
* which is why the key is what addresses the account.
|
|
2307
|
+
*/
|
|
2308
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2309
|
+
};
|
|
2310
|
+
cookie?: never;
|
|
2311
|
+
};
|
|
2312
|
+
requestBody?: never;
|
|
2313
|
+
responses: {
|
|
2314
|
+
/** @description OK */
|
|
2315
|
+
200: {
|
|
2316
|
+
headers: {
|
|
2317
|
+
[name: string]: unknown;
|
|
2318
|
+
};
|
|
2319
|
+
content: {
|
|
2320
|
+
"application/json": components["schemas"]["Subscription"];
|
|
2321
|
+
};
|
|
2322
|
+
};
|
|
2323
|
+
/** @description Error */
|
|
2324
|
+
default: {
|
|
2325
|
+
headers: {
|
|
2326
|
+
[name: string]: unknown;
|
|
2327
|
+
};
|
|
2328
|
+
content: {
|
|
2329
|
+
"application/json": components["schemas"]["Error"];
|
|
2330
|
+
};
|
|
2331
|
+
};
|
|
2332
|
+
};
|
|
2333
|
+
};
|
|
2334
|
+
"cancel-subscription": {
|
|
2335
|
+
parameters: {
|
|
2336
|
+
query: {
|
|
2337
|
+
/** @description When it takes effect */
|
|
2338
|
+
timing: "immediate" | "next_billing_cycle";
|
|
2339
|
+
};
|
|
2340
|
+
header?: never;
|
|
2341
|
+
path: {
|
|
2342
|
+
/**
|
|
2343
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2344
|
+
* which is why the key is what addresses the account.
|
|
2345
|
+
*/
|
|
2346
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2347
|
+
};
|
|
2348
|
+
cookie?: never;
|
|
2349
|
+
};
|
|
2350
|
+
requestBody?: never;
|
|
2351
|
+
responses: {
|
|
2352
|
+
/** @description OK */
|
|
2353
|
+
200: {
|
|
2354
|
+
headers: {
|
|
2355
|
+
[name: string]: unknown;
|
|
2356
|
+
};
|
|
2357
|
+
content: {
|
|
2358
|
+
"application/json": components["schemas"]["Subscription"];
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
/** @description Error */
|
|
2362
|
+
default: {
|
|
2363
|
+
headers: {
|
|
2364
|
+
[name: string]: unknown;
|
|
2365
|
+
};
|
|
2366
|
+
content: {
|
|
2367
|
+
"application/json": components["schemas"]["Error"];
|
|
2368
|
+
};
|
|
2369
|
+
};
|
|
2370
|
+
};
|
|
2371
|
+
};
|
|
2372
|
+
"read-top-up": {
|
|
2373
|
+
parameters: {
|
|
2374
|
+
query?: never;
|
|
2375
|
+
header?: never;
|
|
2376
|
+
path: {
|
|
2377
|
+
/**
|
|
2378
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2379
|
+
* which is why the key is what addresses the account.
|
|
2380
|
+
*/
|
|
2381
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2382
|
+
/** @description The payment id returned when the top-up was started */
|
|
2383
|
+
paymentId: string;
|
|
2384
|
+
};
|
|
2385
|
+
cookie?: never;
|
|
2386
|
+
};
|
|
2387
|
+
requestBody?: never;
|
|
2388
|
+
responses: {
|
|
2389
|
+
/** @description OK */
|
|
2390
|
+
200: {
|
|
2391
|
+
headers: {
|
|
2392
|
+
[name: string]: unknown;
|
|
2393
|
+
};
|
|
2394
|
+
content: {
|
|
2395
|
+
"application/json": components["schemas"]["TopUpStatus"];
|
|
2396
|
+
};
|
|
2397
|
+
};
|
|
2398
|
+
/** @description Error */
|
|
2399
|
+
default: {
|
|
2400
|
+
headers: {
|
|
2401
|
+
[name: string]: unknown;
|
|
2402
|
+
};
|
|
2403
|
+
content: {
|
|
2404
|
+
"application/json": components["schemas"]["Error"];
|
|
2405
|
+
};
|
|
2406
|
+
};
|
|
2407
|
+
};
|
|
2408
|
+
};
|
|
2409
|
+
"list-payment-methods": {
|
|
2410
|
+
parameters: {
|
|
2411
|
+
query?: never;
|
|
2412
|
+
header?: never;
|
|
2413
|
+
path: {
|
|
2414
|
+
/**
|
|
2415
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2416
|
+
* which is why the key is what addresses the account.
|
|
2417
|
+
*/
|
|
2418
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2419
|
+
};
|
|
2420
|
+
cookie?: never;
|
|
2421
|
+
};
|
|
2422
|
+
requestBody?: never;
|
|
2423
|
+
responses: {
|
|
2424
|
+
/** @description OK */
|
|
2425
|
+
200: {
|
|
2426
|
+
headers: {
|
|
2427
|
+
[name: string]: unknown;
|
|
2428
|
+
};
|
|
2429
|
+
content: {
|
|
2430
|
+
"application/json": components["schemas"]["PaymentMethodList"];
|
|
2431
|
+
};
|
|
2432
|
+
};
|
|
2433
|
+
/** @description Error */
|
|
2434
|
+
default: {
|
|
2435
|
+
headers: {
|
|
2436
|
+
[name: string]: unknown;
|
|
2437
|
+
};
|
|
2438
|
+
content: {
|
|
2439
|
+
"application/json": components["schemas"]["Error"];
|
|
2440
|
+
};
|
|
2441
|
+
};
|
|
2442
|
+
};
|
|
2443
|
+
};
|
|
2444
|
+
"start-payment-method-setup": {
|
|
2445
|
+
parameters: {
|
|
2446
|
+
query?: never;
|
|
2447
|
+
header?: never;
|
|
2448
|
+
path: {
|
|
2449
|
+
/**
|
|
2450
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2451
|
+
* which is why the key is what addresses the account.
|
|
2452
|
+
*/
|
|
2453
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2454
|
+
};
|
|
2455
|
+
cookie?: never;
|
|
2456
|
+
};
|
|
2457
|
+
requestBody?: never;
|
|
2458
|
+
responses: {
|
|
2459
|
+
/** @description OK */
|
|
2460
|
+
200: {
|
|
2461
|
+
headers: {
|
|
2462
|
+
[name: string]: unknown;
|
|
2463
|
+
};
|
|
2464
|
+
content: {
|
|
2465
|
+
"application/json": components["schemas"]["PaymentMethodSetupSession"];
|
|
2466
|
+
};
|
|
2467
|
+
};
|
|
2468
|
+
/** @description Error */
|
|
2469
|
+
default: {
|
|
2470
|
+
headers: {
|
|
2471
|
+
[name: string]: unknown;
|
|
2472
|
+
};
|
|
2473
|
+
content: {
|
|
2474
|
+
"application/json": components["schemas"]["Error"];
|
|
2475
|
+
};
|
|
2476
|
+
};
|
|
2477
|
+
};
|
|
2478
|
+
};
|
|
2479
|
+
"remove-payment-method": {
|
|
2480
|
+
parameters: {
|
|
2481
|
+
query?: never;
|
|
2482
|
+
header?: never;
|
|
2483
|
+
path: {
|
|
2484
|
+
/**
|
|
2485
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2486
|
+
* which is why the key is what addresses the account.
|
|
2487
|
+
*/
|
|
2488
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2489
|
+
paymentMethodId: string;
|
|
2490
|
+
};
|
|
2491
|
+
cookie?: never;
|
|
2492
|
+
};
|
|
2493
|
+
requestBody?: never;
|
|
2494
|
+
responses: {
|
|
2495
|
+
/** @description Removed */
|
|
2496
|
+
204: {
|
|
2497
|
+
headers: {
|
|
2498
|
+
[name: string]: unknown;
|
|
2499
|
+
};
|
|
2500
|
+
content?: never;
|
|
2501
|
+
};
|
|
2502
|
+
/** @description Error */
|
|
2503
|
+
default: {
|
|
2504
|
+
headers: {
|
|
2505
|
+
[name: string]: unknown;
|
|
2506
|
+
};
|
|
2507
|
+
content: {
|
|
2508
|
+
"application/json": components["schemas"]["Error"];
|
|
2509
|
+
};
|
|
2510
|
+
};
|
|
2511
|
+
};
|
|
2512
|
+
};
|
|
2513
|
+
"set-default-payment-method": {
|
|
2514
|
+
parameters: {
|
|
2515
|
+
query?: never;
|
|
2516
|
+
header?: never;
|
|
2517
|
+
path: {
|
|
2518
|
+
/**
|
|
2519
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2520
|
+
* which is why the key is what addresses the account.
|
|
2521
|
+
*/
|
|
2522
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2523
|
+
paymentMethodId: string;
|
|
2524
|
+
};
|
|
2525
|
+
cookie?: never;
|
|
2526
|
+
};
|
|
2527
|
+
requestBody?: never;
|
|
2528
|
+
responses: {
|
|
2529
|
+
/** @description Updated */
|
|
2530
|
+
204: {
|
|
2531
|
+
headers: {
|
|
2532
|
+
[name: string]: unknown;
|
|
2533
|
+
};
|
|
2534
|
+
content?: never;
|
|
2535
|
+
};
|
|
2536
|
+
/** @description Error */
|
|
2537
|
+
default: {
|
|
2538
|
+
headers: {
|
|
2539
|
+
[name: string]: unknown;
|
|
2540
|
+
};
|
|
2541
|
+
content: {
|
|
2542
|
+
"application/json": components["schemas"]["Error"];
|
|
2543
|
+
};
|
|
2544
|
+
};
|
|
2545
|
+
};
|
|
2546
|
+
};
|
|
2547
|
+
"list-offers": {
|
|
2548
|
+
parameters: {
|
|
2549
|
+
query?: never;
|
|
2550
|
+
header?: never;
|
|
2551
|
+
path: {
|
|
2552
|
+
/**
|
|
2553
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2554
|
+
* which is why the key is what addresses the account.
|
|
2555
|
+
*/
|
|
2556
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2557
|
+
};
|
|
2558
|
+
cookie?: never;
|
|
2559
|
+
};
|
|
2560
|
+
requestBody?: never;
|
|
2561
|
+
responses: {
|
|
2562
|
+
/** @description OK */
|
|
2563
|
+
200: {
|
|
2564
|
+
headers: {
|
|
2565
|
+
[name: string]: unknown;
|
|
2566
|
+
};
|
|
2567
|
+
content: {
|
|
2568
|
+
"application/json": components["schemas"]["OfferList"];
|
|
2569
|
+
};
|
|
2570
|
+
};
|
|
2571
|
+
/** @description Error */
|
|
2572
|
+
default: {
|
|
2573
|
+
headers: {
|
|
2574
|
+
[name: string]: unknown;
|
|
2575
|
+
};
|
|
2576
|
+
content: {
|
|
2577
|
+
"application/json": components["schemas"]["Error"];
|
|
2578
|
+
};
|
|
2579
|
+
};
|
|
2580
|
+
};
|
|
2581
|
+
};
|
|
2582
|
+
"purchase-offer": {
|
|
2583
|
+
parameters: {
|
|
2584
|
+
query?: {
|
|
2585
|
+
/** @description When the switch takes effect. Required if the account already has a plan, ignored otherwise */
|
|
2586
|
+
timing?: components["schemas"]["PlanChangeTiming"];
|
|
2587
|
+
};
|
|
2588
|
+
header?: never;
|
|
2589
|
+
path: {
|
|
2590
|
+
/**
|
|
2591
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2592
|
+
* which is why the key is what addresses the account.
|
|
2593
|
+
*/
|
|
2594
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2595
|
+
/** @description Which offer */
|
|
2596
|
+
offerKey: string;
|
|
2597
|
+
};
|
|
2598
|
+
cookie?: never;
|
|
2599
|
+
};
|
|
2600
|
+
requestBody?: never;
|
|
2601
|
+
responses: {
|
|
2602
|
+
/** @description OK */
|
|
2603
|
+
200: {
|
|
2604
|
+
headers: {
|
|
2605
|
+
[name: string]: unknown;
|
|
2606
|
+
};
|
|
2607
|
+
content: {
|
|
2608
|
+
"application/json": components["schemas"]["Purchase"];
|
|
2609
|
+
};
|
|
2610
|
+
};
|
|
2611
|
+
/** @description Error */
|
|
2612
|
+
default: {
|
|
2613
|
+
headers: {
|
|
2614
|
+
[name: string]: unknown;
|
|
2615
|
+
};
|
|
2616
|
+
content: {
|
|
2617
|
+
"application/json": components["schemas"]["Error"];
|
|
2618
|
+
};
|
|
2619
|
+
};
|
|
2620
|
+
};
|
|
2621
|
+
};
|
|
2622
|
+
"list-prepaid-assets": {
|
|
2623
|
+
parameters: {
|
|
2624
|
+
query?: never;
|
|
2625
|
+
header?: never;
|
|
2626
|
+
path: {
|
|
2627
|
+
/**
|
|
2628
|
+
* @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
|
|
2629
|
+
* which is why the key is what addresses the account.
|
|
2630
|
+
*/
|
|
2631
|
+
accountKey: components["parameters"]["AccountKey"];
|
|
2632
|
+
};
|
|
2633
|
+
cookie?: never;
|
|
2634
|
+
};
|
|
2635
|
+
requestBody?: never;
|
|
2636
|
+
responses: {
|
|
2637
|
+
/** @description OK */
|
|
2638
|
+
200: {
|
|
2639
|
+
headers: {
|
|
2640
|
+
[name: string]: unknown;
|
|
2641
|
+
};
|
|
2642
|
+
content: {
|
|
2643
|
+
"application/json": components["schemas"]["PrepaidAssetList"];
|
|
2644
|
+
};
|
|
2645
|
+
};
|
|
2646
|
+
/** @description Error */
|
|
2647
|
+
default: {
|
|
2648
|
+
headers: {
|
|
2649
|
+
[name: string]: unknown;
|
|
2650
|
+
};
|
|
2651
|
+
content: {
|
|
2652
|
+
"application/json": components["schemas"]["Error"];
|
|
2653
|
+
};
|
|
2654
|
+
};
|
|
2655
|
+
};
|
|
2656
|
+
};
|
|
2657
|
+
}
|