@sylphx/sdk 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -118
  3. package/dist/access.d.ts +659 -0
  4. package/dist/access.js +638 -0
  5. package/dist/access.js.map +1 -0
  6. package/dist/ai.d.ts +176 -0
  7. package/dist/ai.js +112 -0
  8. package/dist/ai.js.map +1 -0
  9. package/dist/artifacts.d.ts +165 -0
  10. package/dist/artifacts.js +129 -0
  11. package/dist/artifacts.js.map +1 -0
  12. package/dist/auth.d.ts +896 -0
  13. package/dist/auth.js +828 -0
  14. package/dist/auth.js.map +1 -0
  15. package/dist/billing.d.ts +758 -0
  16. package/dist/billing.js +553 -0
  17. package/dist/billing.js.map +1 -0
  18. package/dist/broker.d.ts +226 -0
  19. package/dist/broker.js +187 -0
  20. package/dist/broker.js.map +1 -0
  21. package/dist/build.d.ts +313 -0
  22. package/dist/build.js +271 -0
  23. package/dist/build.js.map +1 -0
  24. package/dist/common.d.ts +162 -0
  25. package/dist/common.js +41 -0
  26. package/dist/common.js.map +1 -0
  27. package/dist/config.d.ts +198 -0
  28. package/dist/config.js +168 -0
  29. package/dist/config.js.map +1 -0
  30. package/dist/connections.d.ts +354 -0
  31. package/dist/connections.js +313 -0
  32. package/dist/connections.js.map +1 -0
  33. package/dist/data.d.ts +858 -0
  34. package/dist/data.js +814 -0
  35. package/dist/data.js.map +1 -0
  36. package/dist/entitlement.d.ts +172 -0
  37. package/dist/entitlement.js +116 -0
  38. package/dist/entitlement.js.map +1 -0
  39. package/dist/events.d.ts +1324 -0
  40. package/dist/events.js +1227 -0
  41. package/dist/events.js.map +1 -0
  42. package/dist/hosting.d.ts +709 -0
  43. package/dist/hosting.js +611 -0
  44. package/dist/hosting.js.map +1 -0
  45. package/dist/index.d.ts +79 -33656
  46. package/dist/index.js +113 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/keys.d.ts +438 -0
  49. package/dist/keys.js +406 -0
  50. package/dist/keys.js.map +1 -0
  51. package/dist/methods.d.ts +2 -0
  52. package/dist/methods.js +3995 -0
  53. package/dist/methods.js.map +1 -0
  54. package/dist/network.d.ts +733 -0
  55. package/dist/network.js +711 -0
  56. package/dist/network.js.map +1 -0
  57. package/dist/notify.d.ts +1359 -0
  58. package/dist/notify.js +1282 -0
  59. package/dist/notify.js.map +1 -0
  60. package/dist/observability.d.ts +509 -0
  61. package/dist/observability.js +437 -0
  62. package/dist/observability.js.map +1 -0
  63. package/dist/release.d.ts +303 -0
  64. package/dist/release.js +214 -0
  65. package/dist/release.js.map +1 -0
  66. package/dist/runners.d.ts +262 -0
  67. package/dist/runners.js +238 -0
  68. package/dist/runners.js.map +1 -0
  69. package/dist/runtime.d.ts +88 -0
  70. package/dist/runtime.js +226 -0
  71. package/dist/runtime.js.map +1 -0
  72. package/dist/sandboxes.d.ts +1705 -0
  73. package/dist/sandboxes.js +1226 -0
  74. package/dist/sandboxes.js.map +1 -0
  75. package/dist/secrets.d.ts +508 -0
  76. package/dist/secrets.js +474 -0
  77. package/dist/secrets.js.map +1 -0
  78. package/dist/workflows.d.ts +678 -0
  79. package/dist/workflows.js +595 -0
  80. package/dist/workflows.js.map +1 -0
  81. package/package.json +33 -112
  82. package/dist/connect.d.ts +0 -2838
  83. package/dist/connect.mjs +0 -220
  84. package/dist/connect.mjs.map +0 -1
  85. package/dist/health/index.d.ts +0 -1394
  86. package/dist/health/index.mjs +0 -1394
  87. package/dist/health/index.mjs.map +0 -1
  88. package/dist/index.mjs +0 -38429
  89. package/dist/index.mjs.map +0 -1
  90. package/dist/nextjs/index.d.ts +0 -724
  91. package/dist/nextjs/index.mjs +0 -3332
  92. package/dist/nextjs/index.mjs.map +0 -1
  93. package/dist/react/index.d.ts +0 -13066
  94. package/dist/react/index.mjs +0 -35329
  95. package/dist/react/index.mjs.map +0 -1
  96. package/dist/server/index.d.ts +0 -2000
  97. package/dist/server/index.mjs +0 -3446
  98. package/dist/server/index.mjs.map +0 -1
  99. package/dist/web-analytics.d.ts +0 -90
  100. package/dist/web-analytics.mjs +0 -225
  101. package/dist/web-analytics.mjs.map +0 -1
@@ -0,0 +1,758 @@
1
+ import * as runtime from './runtime.js';
2
+ import './common.js';
3
+ import type * as common from './common.js';
4
+ /**
5
+ * A BillingAccount is an org's plan subscription and payment standing: the
6
+ * plan it is on, its spend limit, and its billing period. Each org has
7
+ * exactly one, `orgs/{org}/billing_accounts/default`, created with the org.
8
+ */
9
+ export interface BillingAccount {
10
+ /** `orgs/{org}/billing_accounts/default`. */
11
+ name?: string;
12
+ /** `bac_<cell><ulid>`. */
13
+ readonly uid?: string;
14
+ /** Resource metadata. */
15
+ meta?: common.ResourceMeta;
16
+ /** Desired state. */
17
+ spec?: BillingAccountSpec;
18
+ /** Observed state. */
19
+ readonly status?: BillingAccountStatus;
20
+ }
21
+ /** BillingAccountSpec is the caller-writable state of a BillingAccount. */
22
+ export interface BillingAccountSpec {
23
+ /**
24
+ * The plan to be on, for example `plans/pro`. A change takes effect at
25
+ * once; an upgrade to Pro is prorated by day and requires a payment method.
26
+ */
27
+ plan?: string;
28
+ /**
29
+ * The monthly spend limit on usage past the included amounts. Unset means
30
+ * the default (USD 200) unless `unlimited_spend` is set.
31
+ */
32
+ spendLimit?: Money;
33
+ /** No spend limit; requires a verified payment method. */
34
+ unlimitedSpend?: boolean;
35
+ /** Where invoices and payment notices are sent. */
36
+ billingEmail?: string;
37
+ }
38
+ /** BillingAccountStatus is the observed state of a BillingAccount. */
39
+ export interface BillingAccountStatus {
40
+ /** The generation this status was computed from. */
41
+ readonly observedGeneration?: string;
42
+ /** Ready, Reconciling, Stalled. */
43
+ readonly conditions?: common.Condition[];
44
+ /** The plan version the org is on, for example `2026-11-02`. */
45
+ readonly planVersion?: string;
46
+ /** The payment standing. */
47
+ readonly state?: BillingAccountState;
48
+ /** The currency every invoice of the org is in, ISO 4217. */
49
+ readonly currencyCode?: string;
50
+ /** The start of the current billing period. */
51
+ readonly periodStartTime?: string;
52
+ /** The end of the current billing period. */
53
+ readonly periodEndTime?: string;
54
+ /** A payment method is on file and verified. */
55
+ readonly paymentMethodVerified?: boolean;
56
+ /**
57
+ * The spend limit in force, after the default is applied; unset when
58
+ * unlimited.
59
+ */
60
+ readonly effectiveSpendLimit?: Money;
61
+ }
62
+ /**
63
+ * A BudgetLease is budget Billing pre-authorized for one holder to spend
64
+ * on hard-spend usage without calling Billing per request (metering.md §8).
65
+ * Readable by the org; written only by Billing.
66
+ */
67
+ export interface BudgetLease {
68
+ /** `orgs/{org}/budget_leases/{budget_lease}`. */
69
+ name?: string;
70
+ /** `bl_<cell><ulid>`. */
71
+ readonly uid?: string;
72
+ /** Resource metadata. */
73
+ readonly meta?: common.ResourceMeta;
74
+ /**
75
+ * The holder: a SPIFFE role and Cell, for example
76
+ * `services/sandboxes/cells/hk01`.
77
+ */
78
+ readonly holder?: string;
79
+ /** The pool: `sandboxes`, `ai`, `runners`, or `notify.sms`. */
80
+ readonly pool?: string;
81
+ /** The budget granted, in nano-USD. */
82
+ readonly grantedNanoUsd?: string;
83
+ /**
84
+ * The fence: monotonic per org, holder, and pool; a renewal carrying an
85
+ * older value is refused.
86
+ */
87
+ readonly fence?: string;
88
+ /** When the holder stops debiting the lease. */
89
+ readonly expireTime?: string;
90
+ /** The lease's lifecycle state. */
91
+ readonly state?: BudgetLeaseState;
92
+ /** The debit the holder reported on renew or release, in nano-USD. */
93
+ readonly reportedDebitNanoUsd?: string;
94
+ /** The debit rated from ingested usage, in nano-USD. */
95
+ readonly settledDebitNanoUsd?: string;
96
+ }
97
+ /** CreditNote is an append-only correction of a finalized invoice. */
98
+ export interface CreditNote {
99
+ /** The human-readable credit note number. */
100
+ readonly number?: string;
101
+ /** The amount credited. */
102
+ readonly total?: Money;
103
+ /** A customer-safe reason. */
104
+ readonly reason?: string;
105
+ /** When the credit note was issued. */
106
+ readonly issueTime?: string;
107
+ }
108
+ /** The request of GetBillingAccount. */
109
+ export interface GetBillingAccountRequest {
110
+ /** The name of the billing account to get. */
111
+ name: string;
112
+ }
113
+ /** The request of GetBudgetLease. */
114
+ export interface GetBudgetLeaseRequest {
115
+ /** The name of the budget lease to get. */
116
+ name: string;
117
+ }
118
+ /** The request of GetInvoice. */
119
+ export interface GetInvoiceRequest {
120
+ /** The name of the invoice to get. */
121
+ name: string;
122
+ }
123
+ /** The request of GetMeter. */
124
+ export interface GetMeterRequest {
125
+ /** The name of the meter to get. */
126
+ name: string;
127
+ }
128
+ /** The request of GetPlan. */
129
+ export interface GetPlanRequest {
130
+ /** The name of the plan to get. */
131
+ name: string;
132
+ }
133
+ /** The request of GetUsageReport. */
134
+ export interface GetUsageReportRequest {
135
+ /** The name of the usage report to get. */
136
+ name: string;
137
+ }
138
+ /**
139
+ * An Invoice is one org's bill for one billing period: per-service meter
140
+ * lines, the plan fee, and late usage from earlier periods. Finalization
141
+ * freezes it; a correction is a credit note, never an edit.
142
+ */
143
+ export interface Invoice {
144
+ /** `orgs/{org}/invoices/{invoice}`. */
145
+ name?: string;
146
+ /** `inv_<cell><ulid>`. */
147
+ readonly uid?: string;
148
+ /** Resource metadata. */
149
+ readonly meta?: common.ResourceMeta;
150
+ /** The human-readable invoice number, unique per org. */
151
+ readonly number?: string;
152
+ /** The invoice's lifecycle state. */
153
+ readonly state?: InvoiceState;
154
+ /** ISO 4217 currency of every amount. */
155
+ readonly currencyCode?: string;
156
+ /** The start of the billed period. */
157
+ readonly periodStartTime?: string;
158
+ /** The end of the billed period. */
159
+ readonly periodEndTime?: string;
160
+ /** The lines, grouped by service. */
161
+ readonly lines?: InvoiceLine[];
162
+ /** The sum of the rounded lines before tax. */
163
+ readonly subtotal?: Money;
164
+ /** Tax. */
165
+ readonly tax?: Money;
166
+ /** Subtotal plus tax. */
167
+ readonly total?: Money;
168
+ /** What is still owed. */
169
+ readonly amountDue?: Money;
170
+ /** What has been paid, confirmed by provider readback. */
171
+ readonly amountPaid?: Money;
172
+ /** When the invoice was finalized. */
173
+ readonly finalizeTime?: string;
174
+ /** When payment is due. */
175
+ readonly dueTime?: string;
176
+ /** When the invoice was paid in full. */
177
+ readonly paidTime?: string;
178
+ /**
179
+ * The share of the period's usage that had reached Billing when the
180
+ * invoice was finalized, from 0 to 1; below 1 the invoice carries a note.
181
+ */
182
+ readonly completeness?: number;
183
+ /** Credit notes issued against this invoice, oldest first. */
184
+ readonly creditNotes?: CreditNote[];
185
+ }
186
+ /** InvoiceLine is one line of an invoice. */
187
+ export interface InvoiceLine {
188
+ /** What the line charges for. */
189
+ readonly kind?: InvoiceLineKind;
190
+ /** A customer-safe description. */
191
+ readonly description?: string;
192
+ /** The service the line belongs to; empty for the plan fee. */
193
+ readonly service?: string;
194
+ /** The meter id, for usage lines. */
195
+ readonly meter?: string;
196
+ /** The meter version, for usage lines. */
197
+ readonly meterVersion?: number;
198
+ /** The dimensions the price matched. */
199
+ readonly dimensions?: Record<string, string>;
200
+ /** The price tier, from 1. */
201
+ readonly tier?: number;
202
+ /** The rated quantity, in the meter's base unit. */
203
+ readonly quantity?: string;
204
+ /** The price per base unit. */
205
+ readonly unitAmountMinor?: Rational;
206
+ /** The line amount, rounded half-even to minor units. */
207
+ readonly amount?: Money;
208
+ }
209
+ /** The request of ListBillingAccounts. */
210
+ export interface ListBillingAccountsRequest {
211
+ /** The org to list in. */
212
+ parent: string;
213
+ /** At most this many; default 50, clamped to 1000. */
214
+ pageSize?: number;
215
+ /** `next_page_token` of the previous page. */
216
+ pageToken?: string;
217
+ /** AIP-160 filter over labels and filterable fields. */
218
+ filter?: string;
219
+ /** AIP-132 ordering over filterable fields. */
220
+ orderBy?: string;
221
+ }
222
+ /** The response of ListBillingAccounts. */
223
+ export interface ListBillingAccountsResponse {
224
+ /** The page. */
225
+ billingAccounts?: BillingAccount[];
226
+ /** The token of the next page; empty on the last page. */
227
+ nextPageToken?: string;
228
+ }
229
+ /** The request of ListBudgetLeases. */
230
+ export interface ListBudgetLeasesRequest {
231
+ /** The org to list in. */
232
+ parent: string;
233
+ /** At most this many; default 50, clamped to 1000. */
234
+ pageSize?: number;
235
+ /** `next_page_token` of the previous page. */
236
+ pageToken?: string;
237
+ /** AIP-160 filter over labels and filterable fields. */
238
+ filter?: string;
239
+ /** AIP-132 ordering over filterable fields. */
240
+ orderBy?: string;
241
+ }
242
+ /** The response of ListBudgetLeases. */
243
+ export interface ListBudgetLeasesResponse {
244
+ /** The page. */
245
+ budgetLeases?: BudgetLease[];
246
+ /** The token of the next page; empty on the last page. */
247
+ nextPageToken?: string;
248
+ }
249
+ /** The request of ListInvoices. */
250
+ export interface ListInvoicesRequest {
251
+ /** The org to list in. */
252
+ parent: string;
253
+ /** At most this many; default 50, clamped to 1000. */
254
+ pageSize?: number;
255
+ /** `next_page_token` of the previous page. */
256
+ pageToken?: string;
257
+ /** AIP-160 filter over labels and filterable fields. */
258
+ filter?: string;
259
+ /** AIP-132 ordering over filterable fields. */
260
+ orderBy?: string;
261
+ }
262
+ /** The response of ListInvoices. */
263
+ export interface ListInvoicesResponse {
264
+ /** The page. */
265
+ invoices?: Invoice[];
266
+ /** The token of the next page; empty on the last page. */
267
+ nextPageToken?: string;
268
+ }
269
+ /** The request of ListMeters. */
270
+ export interface ListMetersRequest {
271
+ /** At most this many; default 50, clamped to 1000. */
272
+ pageSize?: number;
273
+ /** `next_page_token` of the previous page. */
274
+ pageToken?: string;
275
+ /** AIP-160 filter over labels and filterable fields. */
276
+ filter?: string;
277
+ /** AIP-132 ordering over filterable fields. */
278
+ orderBy?: string;
279
+ }
280
+ /** The response of ListMeters. */
281
+ export interface ListMetersResponse {
282
+ /** The page. */
283
+ meters?: Meter[];
284
+ /** The token of the next page; empty on the last page. */
285
+ nextPageToken?: string;
286
+ }
287
+ /** The request of ListPlans. */
288
+ export interface ListPlansRequest {
289
+ /** At most this many; default 50, clamped to 1000. */
290
+ pageSize?: number;
291
+ /** `next_page_token` of the previous page. */
292
+ pageToken?: string;
293
+ /** AIP-160 filter over labels and filterable fields. */
294
+ filter?: string;
295
+ /** AIP-132 ordering over filterable fields. */
296
+ orderBy?: string;
297
+ }
298
+ /** The response of ListPlans. */
299
+ export interface ListPlansResponse {
300
+ /** The page. */
301
+ plans?: Plan[];
302
+ /** The token of the next page; empty on the last page. */
303
+ nextPageToken?: string;
304
+ }
305
+ /** The request of ListUsageReports. */
306
+ export interface ListUsageReportsRequest {
307
+ /** The org to list in. */
308
+ parent: string;
309
+ /** At most this many; default 50, clamped to 1000. */
310
+ pageSize?: number;
311
+ /** `next_page_token` of the previous page. */
312
+ pageToken?: string;
313
+ /** AIP-160 filter over labels and filterable fields. */
314
+ filter?: string;
315
+ /** AIP-132 ordering over filterable fields. */
316
+ orderBy?: string;
317
+ }
318
+ /** The response of ListUsageReports. */
319
+ export interface ListUsageReportsResponse {
320
+ /** The page. */
321
+ usageReports?: UsageReport[];
322
+ /** The token of the next page; empty on the last page. */
323
+ nextPageToken?: string;
324
+ }
325
+ /**
326
+ * A Meter is one billable quantity a service emits, for example
327
+ * `hosting.vcpu_seconds` (metering.md §4). Meters are top-level and
328
+ * read-only; each has immutable versions, and a usage event names the
329
+ * version it was measured under.
330
+ */
331
+ export interface Meter {
332
+ /**
333
+ * `meters/{meter}`, where `{meter}` is the meter id
334
+ * `{service}.{quantity}`, for example `meters/hosting.vcpu_seconds`.
335
+ */
336
+ name?: string;
337
+ /** `mtr_<cell><ulid>`. */
338
+ readonly uid?: string;
339
+ /** Resource metadata. */
340
+ readonly meta?: common.ResourceMeta;
341
+ /** The service that emits the meter; the meter id's prefix. */
342
+ readonly service?: string;
343
+ /** The version new usage is measured under. */
344
+ readonly currentVersion?: number;
345
+ /** Every version, oldest first. */
346
+ readonly versions?: MeterVersion[];
347
+ }
348
+ /** MeterDimension is one key a usage event of a meter may carry. */
349
+ export interface MeterDimension {
350
+ /** The dimension key, for example `class`. */
351
+ readonly key?: string;
352
+ /** The allowed values; empty means a bounded free-form string. */
353
+ readonly values?: string[];
354
+ /** Every event must carry it. */
355
+ readonly required?: boolean;
356
+ }
357
+ /**
358
+ * MeterPrice is a plan's included quantity and price for one meter version,
359
+ * optionally narrowed to a dimension set (metering.md §4.3).
360
+ */
361
+ export interface MeterPrice {
362
+ /** The meter id. */
363
+ readonly meter?: string;
364
+ /** The meter version the price applies to. */
365
+ readonly meterVersion?: number;
366
+ /**
367
+ * The dimensions a usage row must carry for this price to apply; the most
368
+ * specific match wins.
369
+ */
370
+ readonly dimensionMatch?: Record<string, string>;
371
+ /** The quantity included per period, in the meter's base unit. */
372
+ readonly included?: string;
373
+ /** What happens past the included quantity. */
374
+ readonly overage?: Overage;
375
+ /** Price tiers past the included quantity, lowest first. */
376
+ readonly tiers?: PriceTier[];
377
+ }
378
+ /** MeterVersion is one immutable definition of a meter. */
379
+ export interface MeterVersion {
380
+ /** The version number, from 1. */
381
+ readonly version?: number;
382
+ /** The base unit, for example `s`, `B`, or `tokens`. */
383
+ readonly unit?: string;
384
+ /** How quantities combine over a period. */
385
+ readonly aggregation?: MeterAggregation;
386
+ /** The dimensions a usage event may carry; at most 8. */
387
+ readonly dimensions?: MeterDimension[];
388
+ /** Spend is bounded by budget leases (metering.md §8). */
389
+ readonly hardSpend?: boolean;
390
+ /**
391
+ * A quantity is an integer count of 1/value_scale base units; 1 for
392
+ * integral units.
393
+ */
394
+ readonly valueScale?: string;
395
+ /** When usage starts being measured under this version. */
396
+ readonly effectiveTime?: string;
397
+ }
398
+ /** Money is an amount in one currency, in integer minor units. */
399
+ export interface Money {
400
+ /** ISO 4217 currency, for example `USD`. */
401
+ currencyCode?: string;
402
+ /** The amount in the currency's minor unit (cents for USD). */
403
+ unitsMinor?: string;
404
+ }
405
+ /**
406
+ * A Plan is a public or private price list: Free, Pro, and the private
407
+ * plans onboarding needs (`agent-trial`, partner plans). Plans are top-level
408
+ * and read-only; each has immutable dated versions, and an org is on
409
+ * exactly one plan version at a time.
410
+ */
411
+ export interface Plan {
412
+ /** `plans/{plan}`, for example `plans/pro`. */
413
+ name?: string;
414
+ /** `pln_<cell><ulid>`. */
415
+ readonly uid?: string;
416
+ /** Resource metadata. */
417
+ readonly meta?: common.ResourceMeta;
418
+ /**
419
+ * Listed on the pricing page; private plans are visible only to their
420
+ * orgs.
421
+ */
422
+ readonly listed?: boolean;
423
+ /** The version new subscriptions start on, for example `2026-11-02`. */
424
+ readonly currentVersion?: string;
425
+ /** Every version, oldest first. */
426
+ readonly versions?: PlanVersion[];
427
+ }
428
+ /** PlanVersion is one immutable, dated version of a plan. */
429
+ export interface PlanVersion {
430
+ /** The version, the date it takes effect: `YYYY-MM-DD`. */
431
+ readonly version?: string;
432
+ /** When the version takes effect. */
433
+ readonly effectiveTime?: string;
434
+ /** The monthly fee, charged in advance. */
435
+ readonly fee?: Money;
436
+ /** A monthly usage credit applied to overage. */
437
+ readonly includedCredit?: Money;
438
+ /** A payment method is required to be on this plan. */
439
+ readonly paymentMethodRequired?: boolean;
440
+ /** Included quantity and price per meter. */
441
+ readonly meterPrices?: MeterPrice[];
442
+ /**
443
+ * The most Resources per collection, for example `projects`; -1 means
444
+ * unlimited.
445
+ */
446
+ readonly resourceLimits?: Record<string, string>;
447
+ /** Requests per minute per rate class. */
448
+ readonly rateLimits?: Record<string, string>;
449
+ }
450
+ /** PriceTier is one tier of a graduated price. */
451
+ export interface PriceTier {
452
+ /**
453
+ * The tier ends at this quantity in the period, inclusive; 0 means
454
+ * unbounded.
455
+ */
456
+ readonly upperBound?: string;
457
+ /** The price per base unit, in minor units of the plan's currency. */
458
+ readonly unitAmountMinor?: Rational;
459
+ }
460
+ /** The request of QueryUsageReports. */
461
+ export interface QueryUsageReportsRequest {
462
+ /** The org to query. */
463
+ parent: string;
464
+ /** The start of the range, inclusive. */
465
+ startTime: string;
466
+ /** The end of the range, exclusive; at most 400 days after `start_time`. */
467
+ endTime: string;
468
+ /** The bucket width. */
469
+ granularity: UsageGranularity;
470
+ /** Only these projects; empty means every project. */
471
+ projects?: string[];
472
+ /** Only these meter ids; empty means every meter. */
473
+ meters?: string[];
474
+ /** Group by project in addition to meter. */
475
+ groupProjects?: boolean;
476
+ /** Dimension keys to group by, for example `model`. */
477
+ groupDimensions?: string[];
478
+ }
479
+ /** The response of QueryUsageReports. */
480
+ export interface QueryUsageReportsResponse {
481
+ /** One row per bucket and group, in time order; at most 10,000. */
482
+ rows?: UsageRow[];
483
+ /** The share of the range's usage that has reached Billing, from 0 to 1. */
484
+ completeness?: number;
485
+ /** The instant the answer reflects. */
486
+ computeTime?: string;
487
+ }
488
+ /**
489
+ * Rational is an exact fraction; prices per unit are rational so rating
490
+ * rounds once, at the invoice line.
491
+ */
492
+ export interface Rational {
493
+ /** The numerator. */
494
+ numerator?: string;
495
+ /** The denominator; never zero. */
496
+ denominator?: string;
497
+ }
498
+ /** The request of UpdateBillingAccount. */
499
+ export interface UpdateBillingAccountRequest {
500
+ /** The billing account to update; `name` identifies it. */
501
+ billingAccount: BillingAccount;
502
+ /** The fields to write; unset writes every populated field. */
503
+ updateMask?: string;
504
+ /** Validate and return the result without writing anything. */
505
+ validateOnly?: boolean;
506
+ }
507
+ /** UsageLine is the usage of one project, meter, and dimension set. */
508
+ export interface UsageLine {
509
+ /** The project that used it. */
510
+ readonly project?: string;
511
+ /** The meter id. */
512
+ readonly meter?: string;
513
+ /** The meter version. */
514
+ readonly meterVersion?: number;
515
+ /** The dimensions. */
516
+ readonly dimensions?: Record<string, string>;
517
+ /** The aggregated quantity, in the meter's base unit. */
518
+ readonly quantity?: string;
519
+ /** How many usage events were aggregated. */
520
+ readonly eventCount?: string;
521
+ /** The rated amount so far, before rounding to the invoice line. */
522
+ readonly amount?: Money;
523
+ }
524
+ /**
525
+ * A UsageReport is an org's usage summary for one billing period, rolled up
526
+ * per project, meter, and dimensions, with how complete it is. The id is the
527
+ * period, for example `orgs/{org}/usage_reports/2026-11`.
528
+ */
529
+ export interface UsageReport {
530
+ /** `orgs/{org}/usage_reports/{YYYY-MM}`. */
531
+ name?: string;
532
+ /** `usr_<cell><ulid>`. */
533
+ readonly uid?: string;
534
+ /** Resource metadata. */
535
+ readonly meta?: common.ResourceMeta;
536
+ /** The start of the period. */
537
+ readonly periodStartTime?: string;
538
+ /** The end of the period. */
539
+ readonly periodEndTime?: string;
540
+ /** One line per project, meter, and dimension set. */
541
+ readonly lines?: UsageLine[];
542
+ /**
543
+ * The share of the period's usage that has reached Billing, from 0 to 1,
544
+ * from every emitter's watermark (metering.md §7.4).
545
+ */
546
+ readonly completeness?: number;
547
+ /** The instant the report reflects. */
548
+ readonly computeTime?: string;
549
+ /** The period's invoice, once one exists. */
550
+ readonly invoice?: string;
551
+ }
552
+ /** UsageRow is one bucket of a usage query. */
553
+ export interface UsageRow {
554
+ /** The start of the bucket. */
555
+ readonly startTime?: string;
556
+ /** The end of the bucket. */
557
+ readonly endTime?: string;
558
+ /** The project, when grouped by project. */
559
+ readonly project?: string;
560
+ /** The meter id. */
561
+ readonly meter?: string;
562
+ /** The dimensions grouped on. */
563
+ readonly dimensions?: Record<string, string>;
564
+ /** The aggregated quantity, in the meter's base unit. */
565
+ readonly quantity?: string;
566
+ }
567
+ /** BillingAccountState is an org's payment standing. */
568
+ export type BillingAccountState = 'active' | 'past_due' | 'suspended' | (string & {});
569
+ /** BudgetLeaseState is the lifecycle state of a BudgetLease. */
570
+ export type BudgetLeaseState = 'active' | 'released' | 'expired' | 'settled' | 'refused' | (string & {});
571
+ /** InvoiceLineKind is what an invoice line charges for. */
572
+ export type InvoiceLineKind = 'fee' | 'usage' | 'late_usage' | 'credit' | 'proration' | (string & {});
573
+ /** InvoiceState is the lifecycle state of an Invoice. */
574
+ export type InvoiceState = 'draft' | 'open' | 'paid' | 'void' | 'uncollectible' | (string & {});
575
+ /** MeterAggregation is how a meter's quantities combine over a period. */
576
+ export type MeterAggregation = 'sum' | 'max' | 'last' | 'unique_count' | (string & {});
577
+ /** Overage is what happens when usage passes a plan's included quantity. */
578
+ export type Overage = 'deny' | 'bill' | 'bill_until_spend_limit' | (string & {});
579
+ /** UsageGranularity is the bucket width of a usage query. */
580
+ export type UsageGranularity = 'hour' | 'day' | 'period' | (string & {});
581
+ /**
582
+ * BillingService is Kernel Billing (docs/kernel/billing/vision.md,
583
+ * metering.md): the meter and plan catalog, each org's billing account and
584
+ * plan, its invoices, usage, and budget leases. Usage arrives through each
585
+ * service's spool, never through this API; no request path calls Billing.
586
+ *
587
+ * Namespace of Sylphx Billing on `Sylphx`.
588
+ */
589
+ export declare class BillingApi {
590
+ /** The `meters` collection. */
591
+ readonly meters: MetersCollection;
592
+ /** The `plans` collection. */
593
+ readonly plans: PlansCollection;
594
+ /** The `billing_accounts` collection. */
595
+ readonly billingAccounts: BillingAccountsCollection;
596
+ /** The `invoices` collection. */
597
+ readonly invoices: InvoicesCollection;
598
+ /** The `usage_reports` collection. */
599
+ readonly usageReports: UsageReportsCollection;
600
+ /** The `budget_leases` collection. */
601
+ readonly budgetLeases: BudgetLeasesCollection;
602
+ constructor(client: runtime.Client);
603
+ }
604
+ /** `meters` of Sylphx Billing: Resource type `billing.sylphx.com/Meter`. */
605
+ export declare class MetersCollection {
606
+ private readonly client;
607
+ constructor(client: runtime.Client);
608
+ /**
609
+ * Gets a meter.
610
+ *
611
+ * `GET /v1/{name=meters/*}` · permission `billing:read` · effect `read`
612
+ *
613
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
614
+ */
615
+ get(request: GetMeterRequest): Promise<Meter>;
616
+ /**
617
+ * Lists meters. Anonymous-readable: the pricing page renders from it.
618
+ *
619
+ * `GET /v1/meters` · permission `billing:read` · effect `read`
620
+ *
621
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
622
+ */
623
+ list(request: ListMetersRequest): Promise<ListMetersResponse>;
624
+ /** Every item of every page of `list`. */
625
+ listAll(request: ListMetersRequest): AsyncGenerator<Meter>;
626
+ }
627
+ /** `plans` of Sylphx Billing: Resource type `billing.sylphx.com/Plan`. */
628
+ export declare class PlansCollection {
629
+ private readonly client;
630
+ constructor(client: runtime.Client);
631
+ /**
632
+ * Gets a plan.
633
+ *
634
+ * `GET /v1/{name=plans/*}` · permission `billing:read` · effect `read`
635
+ *
636
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
637
+ */
638
+ get(request: GetPlanRequest): Promise<Plan>;
639
+ /**
640
+ * Lists the plans the caller can see. Anonymous-readable: the pricing page renders from it.
641
+ *
642
+ * `GET /v1/plans` · permission `billing:read` · effect `read`
643
+ *
644
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
645
+ */
646
+ list(request: ListPlansRequest): Promise<ListPlansResponse>;
647
+ /** Every item of every page of `list`. */
648
+ listAll(request: ListPlansRequest): AsyncGenerator<Plan>;
649
+ }
650
+ /** `billing_accounts` of Sylphx Billing: Resource type `billing.sylphx.com/BillingAccount`. */
651
+ export declare class BillingAccountsCollection {
652
+ private readonly client;
653
+ constructor(client: runtime.Client);
654
+ /**
655
+ * Gets a billing account.
656
+ *
657
+ * `GET /v1/{name=orgs/*\/billing_accounts/*}` · permission `billing:read` · effect `read`
658
+ *
659
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
660
+ */
661
+ get(request: GetBillingAccountRequest): Promise<BillingAccount>;
662
+ /**
663
+ * Lists an org's billing accounts: exactly one, `default`.
664
+ *
665
+ * `GET /v1/{parent=orgs/*}/billing_accounts` · permission `billing:read` · effect `read`
666
+ *
667
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
668
+ */
669
+ list(request: ListBillingAccountsRequest): Promise<ListBillingAccountsResponse>;
670
+ /** Every item of every page of `list`. */
671
+ listAll(request: ListBillingAccountsRequest): AsyncGenerator<BillingAccount>;
672
+ /**
673
+ * Updates a billing account: changes plan, spend limit, or billing email.
674
+ *
675
+ * `PATCH /v1/{billing_account.name=orgs/*\/billing_accounts/*}` · permission `billing:admin` · effect `write`
676
+ *
677
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
678
+ */
679
+ update(request: UpdateBillingAccountRequest): Promise<BillingAccount>;
680
+ }
681
+ /** `invoices` of Sylphx Billing: Resource type `billing.sylphx.com/Invoice`. */
682
+ export declare class InvoicesCollection {
683
+ private readonly client;
684
+ constructor(client: runtime.Client);
685
+ /**
686
+ * Gets an invoice.
687
+ *
688
+ * `GET /v1/{name=orgs/*\/invoices/*}` · permission `billing:read` · effect `read`
689
+ *
690
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
691
+ */
692
+ get(request: GetInvoiceRequest): Promise<Invoice>;
693
+ /**
694
+ * Lists an org's invoices.
695
+ *
696
+ * `GET /v1/{parent=orgs/*}/invoices` · permission `billing:read` · effect `read`
697
+ *
698
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
699
+ */
700
+ list(request: ListInvoicesRequest): Promise<ListInvoicesResponse>;
701
+ /** Every item of every page of `list`. */
702
+ listAll(request: ListInvoicesRequest): AsyncGenerator<Invoice>;
703
+ }
704
+ /** `usage_reports` of Sylphx Billing: Resource type `billing.sylphx.com/UsageReport`. */
705
+ export declare class UsageReportsCollection {
706
+ private readonly client;
707
+ constructor(client: runtime.Client);
708
+ /**
709
+ * Gets an usage report.
710
+ *
711
+ * `GET /v1/{name=orgs/*\/usage_reports/*}` · permission `billing:read` · effect `read`
712
+ *
713
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
714
+ */
715
+ get(request: GetUsageReportRequest): Promise<UsageReport>;
716
+ /**
717
+ * Lists an org's usage reports, one per billing period.
718
+ *
719
+ * `GET /v1/{parent=orgs/*}/usage_reports` · permission `billing:read` · effect `read`
720
+ *
721
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
722
+ */
723
+ list(request: ListUsageReportsRequest): Promise<ListUsageReportsResponse>;
724
+ /** Every item of every page of `list`. */
725
+ listAll(request: ListUsageReportsRequest): AsyncGenerator<UsageReport>;
726
+ /**
727
+ * Queries usage over any time range, bucketed and grouped: the usage
728
+ * summary the console charts. Reads rollups; never raw events.
729
+ *
730
+ * `POST /v1/{parent=orgs/*}/usage_reports:query` · permission `billing:read` · effect `read`
731
+ *
732
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
733
+ */
734
+ query(request: QueryUsageReportsRequest): Promise<QueryUsageReportsResponse>;
735
+ }
736
+ /** `budget_leases` of Sylphx Billing: Resource type `billing.sylphx.com/BudgetLease`. */
737
+ export declare class BudgetLeasesCollection {
738
+ private readonly client;
739
+ constructor(client: runtime.Client);
740
+ /**
741
+ * Gets a budget lease.
742
+ *
743
+ * `GET /v1/{name=orgs/*\/budget_leases/*}` · permission `billing:read` · effect `read`
744
+ *
745
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
746
+ */
747
+ get(request: GetBudgetLeaseRequest): Promise<BudgetLease>;
748
+ /**
749
+ * Lists an org's budget leases.
750
+ *
751
+ * `GET /v1/{parent=orgs/*}/budget_leases` · permission `billing:read` · effect `read`
752
+ *
753
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
754
+ */
755
+ list(request: ListBudgetLeasesRequest): Promise<ListBudgetLeasesResponse>;
756
+ /** Every item of every page of `list`. */
757
+ listAll(request: ListBudgetLeasesRequest): AsyncGenerator<BudgetLease>;
758
+ }