@sylphx/sdk 0.32.0 → 0.32.2

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 (127) hide show
  1. package/README.md +125 -0
  2. package/dist/access.d.ts +50 -1
  3. package/dist/access.js +14 -2
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +2002 -0
  6. package/dist/agents.js +1367 -0
  7. package/dist/agents.js.map +1 -0
  8. package/dist/ai.js +1 -1
  9. package/dist/ai.js.map +1 -1
  10. package/dist/analytics.d.ts +232 -0
  11. package/dist/analytics.js +126 -0
  12. package/dist/analytics.js.map +1 -0
  13. package/dist/artifacts.d.ts +47 -1
  14. package/dist/artifacts.js +30 -2
  15. package/dist/artifacts.js.map +1 -1
  16. package/dist/assets.js +1 -1
  17. package/dist/assets.js.map +1 -1
  18. package/dist/auth/client.d.ts +34 -3
  19. package/dist/auth/client.js +42 -5
  20. package/dist/auth/client.js.map +1 -1
  21. package/dist/auth/continue-mock.d.ts +21 -0
  22. package/dist/auth/continue-mock.js +75 -0
  23. package/dist/auth/continue-mock.js.map +1 -0
  24. package/dist/auth/end-user-keys-mock.d.ts +83 -0
  25. package/dist/auth/end-user-keys-mock.js +427 -0
  26. package/dist/auth/end-user-keys-mock.js.map +1 -0
  27. package/dist/auth/end-user-keys.d.ts +219 -0
  28. package/dist/auth/end-user-keys.js +240 -0
  29. package/dist/auth/end-user-keys.js.map +1 -0
  30. package/dist/auth/verify.js +1 -1
  31. package/dist/auth/verify.js.map +1 -1
  32. package/dist/auth.d.ts +370 -2
  33. package/dist/auth.js +282 -2
  34. package/dist/auth.js.map +1 -1
  35. package/dist/billing.d.ts +96 -11
  36. package/dist/billing.js +41 -1
  37. package/dist/billing.js.map +1 -1
  38. package/dist/broker.d.ts +165 -33
  39. package/dist/broker.js +103 -7
  40. package/dist/broker.js.map +1 -1
  41. package/dist/browser-upload.d.ts +101 -0
  42. package/dist/browser-upload.js +130 -0
  43. package/dist/browser-upload.js.map +1 -0
  44. package/dist/build.d.ts +361 -28
  45. package/dist/build.js +302 -10
  46. package/dist/build.js.map +1 -1
  47. package/dist/common.d.ts +1 -1
  48. package/dist/common.js +1 -1
  49. package/dist/common.js.map +1 -1
  50. package/dist/config/flags.d.ts +12 -2
  51. package/dist/config/flags.js +54 -6
  52. package/dist/config/flags.js.map +1 -1
  53. package/dist/config.d.ts +24 -0
  54. package/dist/config.js +22 -1
  55. package/dist/config.js.map +1 -1
  56. package/dist/connections.d.ts +128 -25
  57. package/dist/connections.js +72 -25
  58. package/dist/connections.js.map +1 -1
  59. package/dist/data.d.ts +358 -13
  60. package/dist/data.js +166 -9
  61. package/dist/data.js.map +1 -1
  62. package/dist/entitlement.js +1 -1
  63. package/dist/entitlement.js.map +1 -1
  64. package/dist/events/realtime.js +1 -1
  65. package/dist/events/realtime.js.map +1 -1
  66. package/dist/events/webhooks.js +1 -1
  67. package/dist/events/webhooks.js.map +1 -1
  68. package/dist/events.d.ts +36 -0
  69. package/dist/events.js +29 -1
  70. package/dist/events.js.map +1 -1
  71. package/dist/flags.d.ts +20 -0
  72. package/dist/flags.js +48 -0
  73. package/dist/flags.js.map +1 -0
  74. package/dist/hosting.js +1 -1
  75. package/dist/hosting.js.map +1 -1
  76. package/dist/ids.d.ts +192 -2
  77. package/dist/ids.js +40 -2
  78. package/dist/ids.js.map +1 -1
  79. package/dist/index.d.ts +18 -1
  80. package/dist/index.js +32 -2
  81. package/dist/index.js.map +1 -1
  82. package/dist/keys.js +1 -1
  83. package/dist/keys.js.map +1 -1
  84. package/dist/knowledge.d.ts +1215 -0
  85. package/dist/knowledge.js +1012 -0
  86. package/dist/knowledge.js.map +1 -0
  87. package/dist/localization.js +1 -1
  88. package/dist/localization.js.map +1 -1
  89. package/dist/methods.js +1938 -15
  90. package/dist/methods.js.map +1 -1
  91. package/dist/money.d.ts +1989 -53
  92. package/dist/money.js +1401 -19
  93. package/dist/money.js.map +1 -1
  94. package/dist/network.js +1 -1
  95. package/dist/network.js.map +1 -1
  96. package/dist/notify.d.ts +686 -1
  97. package/dist/notify.js +552 -1
  98. package/dist/notify.js.map +1 -1
  99. package/dist/observability.d.ts +138 -0
  100. package/dist/observability.js +89 -1
  101. package/dist/observability.js.map +1 -1
  102. package/dist/realtime.d.ts +404 -0
  103. package/dist/realtime.js +312 -0
  104. package/dist/realtime.js.map +1 -0
  105. package/dist/release.js +1 -1
  106. package/dist/release.js.map +1 -1
  107. package/dist/runners.js +1 -1
  108. package/dist/runners.js.map +1 -1
  109. package/dist/runtime.d.ts +3 -0
  110. package/dist/runtime.js +54 -1
  111. package/dist/runtime.js.map +1 -1
  112. package/dist/sandboxes/stream-mock.d.ts +124 -0
  113. package/dist/sandboxes/stream-mock.js +476 -0
  114. package/dist/sandboxes/stream-mock.js.map +1 -0
  115. package/dist/sandboxes/stream.d.ts +407 -0
  116. package/dist/sandboxes/stream.js +335 -0
  117. package/dist/sandboxes/stream.js.map +1 -0
  118. package/dist/sandboxes.d.ts +94 -17
  119. package/dist/sandboxes.js +33 -4
  120. package/dist/sandboxes.js.map +1 -1
  121. package/dist/secrets.d.ts +336 -0
  122. package/dist/secrets.js +268 -1
  123. package/dist/secrets.js.map +1 -1
  124. package/dist/workflows.d.ts +119 -3
  125. package/dist/workflows.js +144 -4
  126. package/dist/workflows.js.map +1 -1
  127. package/package.json +2 -2
package/dist/money.d.ts CHANGED
@@ -14,7 +14,7 @@ export interface AppStoreConnection {
14
14
  * returned; omit it on update to keep the stored key.
15
15
  */
16
16
  privateKey?: string;
17
- /** The app's Apple id, needed to verify production notifications. */
17
+ /** The app's Apple id: when set, production notifications must carry it. */
18
18
  appAppleId?: string;
19
19
  /**
20
20
  * An earlier `appAccountToken` scheme the app's shipped builds use: the
@@ -23,6 +23,56 @@ export interface AppStoreConnection {
23
23
  * Money's own scheme are always accepted as well.
24
24
  */
25
25
  accountTokenPrefix?: string;
26
+ /**
27
+ * The store environment this connection serves: `production` or `sandbox`.
28
+ * Only purchases signed for that environment are accepted (plus sandbox
29
+ * ones on a production connection with `allow_sandbox`), and each is read
30
+ * back from its own environment's App Store Server API. Xcode and
31
+ * local-testing signatures are refused either way. A connection created
32
+ * before this field existed serves `production`.
33
+ */
34
+ environment?: string;
35
+ }
36
+ /** The request of BatchIngestUsageEvents. */
37
+ export interface BatchIngestUsageEventsRequest {
38
+ /** The environment to record in. */
39
+ parent: string;
40
+ /** 1 to 500 events. */
41
+ usageEvents: IngestedUsageEvent[];
42
+ }
43
+ /** The response of BatchIngestUsageEvents. */
44
+ export interface BatchIngestUsageEventsResponse {
45
+ /** One per event, in request order. */
46
+ results?: IngestedUsageEventResult[];
47
+ }
48
+ /**
49
+ * Signed booked sales/refunds in native currency, sorted by dimensions.
50
+ * Only Money's own ledger-backed daily roll-up counts. It does not include
51
+ * pre-adoption history, unpriced purchases or external revenue reports.
52
+ */
53
+ export interface BookedVolumeLine {
54
+ /** The app's project resource name. */
55
+ project?: string;
56
+ /** The environment resource name. */
57
+ environment?: string;
58
+ /** The app/package, bundle or Stripe product reference; empty stays empty. */
59
+ productRef?: string;
60
+ /** stripe, app_store or google_play. */
61
+ channel?: string;
62
+ /** ISO 4217 currency; never sum amounts across currencies. */
63
+ currencyCode?: string;
64
+ /** Signed integer minor units in currency_code; refunds subtract. */
65
+ gross?: string;
66
+ /** Recorded processor fees, not an estimate of eventual settlement fees. */
67
+ fee?: string;
68
+ /** Recorded tax in native minor units. */
69
+ tax?: string;
70
+ /** Recorded net in native minor units. */
71
+ net?: string;
72
+ /** Signed units: full reversals subtract units, partial refunds may not. */
73
+ units?: string;
74
+ /** Number of booked ledger postings, including refund postings. */
75
+ postingCount?: string;
26
76
  }
27
77
  /** The request of CancelCustomerSubscription. */
28
78
  export interface CancelCustomerSubscriptionRequest {
@@ -71,6 +121,15 @@ export interface CatalogSpec {
71
121
  * then means on.
72
122
  */
73
123
  refundClawBack?: boolean;
124
+ /**
125
+ * Caller-owned, publicly readable application data published atomically with
126
+ * the products in this revision. Money preserves it without interpreting its
127
+ * schema or using it for prices, grants, checkout or processor reconciliation.
128
+ * The caller validates its schema and version. At most 65536 UTF-8 bytes when
129
+ * serialized as compact JSON; must be an object. Never include secrets or
130
+ * personal data: the public catalog exposes this field.
131
+ */
132
+ applicationData?: Record<string, unknown>;
74
133
  }
75
134
  /** CatalogStatus is the observed state of a Catalog. */
76
135
  export interface CatalogStatus {
@@ -124,6 +183,93 @@ export interface CheckEntitlementResponse {
124
183
  * answer until then.
125
184
  */
126
185
  expireTime?: string;
186
+ /**
187
+ * The answering grant's source, for example `<checkout session>/line_items/<n>`:
188
+ * the `grant` claim of an offline licence token.
189
+ */
190
+ source?: string;
191
+ }
192
+ /** The request of CheckUsageStanding. */
193
+ export interface CheckUsageStandingRequest {
194
+ /** The environment. */
195
+ parent: string;
196
+ /** Whose standing. */
197
+ subject: Subject;
198
+ /** As on UsageReservation: a verified token for the subject. */
199
+ subjectProof: string;
200
+ /** For a customer organization: the acting user's token. */
201
+ actorProof?: string;
202
+ }
203
+ /**
204
+ * The consent evidence of one checkout: what was asked, what the buyer
205
+ * answered, and when Money recorded it.
206
+ */
207
+ export interface CheckoutConsent {
208
+ /** Whether the buyer ticked the terms. */
209
+ readonly termsAccepted?: boolean;
210
+ /** The wording the buyer saw. */
211
+ readonly termsText?: string;
212
+ /** The version of that wording. */
213
+ readonly termsVersion?: string;
214
+ /** `opt_in`, `opt_out`, or empty when promotions were not asked. */
215
+ readonly promotions?: string;
216
+ /** When Money first recorded the answer. */
217
+ readonly recordTime?: string;
218
+ }
219
+ /** The consent a checkout page collects. */
220
+ export interface CheckoutConsentCollection {
221
+ /**
222
+ * Require a tick accepting `terms_text` before the buyer can pay. The
223
+ * merchant's Stripe account needs a terms of service URL in its public
224
+ * business details; without one the create fails with
225
+ * `processor_terms_url_missing`.
226
+ */
227
+ termsRequired?: boolean;
228
+ /**
229
+ * The wording shown next to the tick; at most 1200 characters. Required
230
+ * with `terms_required`.
231
+ */
232
+ termsText?: string;
233
+ /**
234
+ * Which version of the wording this is, recorded with the consent as
235
+ * evidence; at most 64 characters. Required with `terms_required`.
236
+ */
237
+ termsVersion?: string;
238
+ /**
239
+ * Offer the buyer an opt-in to promotional email where the processor
240
+ * allows it.
241
+ */
242
+ promotions?: boolean;
243
+ }
244
+ /**
245
+ * A Checkout Policy is an environment's seller setting for which buyers
246
+ * consumer checkout refuses, by buyer country (docs/services/money/web-payments.md,
247
+ * "Denying consumer checkout by country"). One per environment, id `default`;
248
+ * an environment without one refuses nobody.
249
+ */
250
+ export interface CheckoutPolicy {
251
+ /** `orgs/{org}/projects/{project}/envs/{env}/checkout_policies/default`. */
252
+ name?: string;
253
+ /** `cpl_<cell><ulid>`; never reused. */
254
+ readonly uid?: string;
255
+ /** Resource metadata. */
256
+ meta?: common.ResourceMeta;
257
+ /** Desired state. */
258
+ spec?: CheckoutPolicySpec;
259
+ }
260
+ /** CheckoutPolicySpec is the caller-writable state of a CheckoutPolicy. */
261
+ export interface CheckoutPolicySpec {
262
+ /**
263
+ * Buyer countries consumer checkout refuses: ISO 3166-1 alpha-2 codes
264
+ * (`DE`), or the group `EU` (the 27 member states). At most 300 entries.
265
+ * Empty refuses nobody.
266
+ */
267
+ deniedCountryCodes?: string[];
268
+ /**
269
+ * Whether a buyer from a denied country who gives a tax id (a business)
270
+ * may still buy. Checkout then asks for the tax id; default false.
271
+ */
272
+ allowTaxIdBuyers?: boolean;
127
273
  }
128
274
  /**
129
275
  * A Checkout Session is a hosted page where a subject pays for catalog
@@ -165,6 +311,20 @@ export interface CheckoutSession {
165
311
  metadata?: Record<string, string>;
166
312
  /** Whether the buyer may enter a promotion code. */
167
313
  allowPromotionCodes?: boolean;
314
+ /**
315
+ * Where the buyer is, upper-case ISO 3166-1 alpha-2, when the caller knows
316
+ * it (for example from the request's IP address). A country the
317
+ * environment's checkout policy denies is refused here, before any page is
318
+ * made, unless the policy lets a business buy. Not trusted for anything
319
+ * else: the billing address the buyer gives is checked again when the
320
+ * payment completes.
321
+ */
322
+ buyerCountryCode?: string;
323
+ /**
324
+ * Countries whose shipping address the hosted page collects, upper-case ISO
325
+ * 3166-1 alpha-2. Empty means no shipping address is collected.
326
+ */
327
+ shippingCountryCodes?: string[];
168
328
  /** The hosted page. */
169
329
  readonly url?: string;
170
330
  /** `open`, `complete`, or `expired`. */
@@ -173,6 +333,68 @@ export interface CheckoutSession {
173
333
  readonly expireTime?: string;
174
334
  /** The processor's session id. */
175
335
  readonly processorSessionId?: string;
336
+ /**
337
+ * Why a completed checkout was refused and refunded instead of delivered:
338
+ * `country_denied` (the billing country is on the checkout policy's list) or
339
+ * `country_unknown` (no billing country to check). Empty otherwise.
340
+ */
341
+ readonly deniedReason?: string;
342
+ /**
343
+ * The billing country the completed checkout was checked against, upper-case
344
+ * ISO 3166-1 alpha-2; empty until completion.
345
+ */
346
+ readonly billingCountryCode?: string;
347
+ /**
348
+ * The billing state or province, upper-case, kept only for the countries
349
+ * whose tax thresholds are per subdivision (`US`, `CA`); empty otherwise.
350
+ * Nothing else of the buyer's address is stored.
351
+ */
352
+ readonly billingSubdivisionCode?: string;
353
+ /**
354
+ * The consent the hosted page collects before it takes payment, for
355
+ * example a required tick for a withdrawal waiver or the terms of sale.
356
+ */
357
+ consentCollection?: CheckoutConsentCollection;
358
+ /** The consent the buyer gave, recorded once the processor reports it. */
359
+ readonly consent?: CheckoutConsent;
360
+ /** The buyer's email address, once the hosted checkout has collected it. */
361
+ readonly customerEmail?: string;
362
+ /**
363
+ * The physical delivery address, when `shipping_country_codes` was set and
364
+ * the hosted checkout has collected it.
365
+ */
366
+ readonly shippingAddress?: ShippingAddress;
367
+ /** The processor's current total in minor units, when it has reported one. */
368
+ readonly amountTotal?: string;
369
+ /** `unpaid`, `paid`, or `revoked`; empty until a one-time checkout settles. */
370
+ readonly paymentStatus?: string;
371
+ /** The processor's live/test mode, once the session has reported it. */
372
+ readonly livemode?: boolean;
373
+ /** The processor payment this checkout produced; empty before settlement. */
374
+ readonly processorPaymentId?: string;
375
+ }
376
+ /** The request of ClientVerifyStorePurchase. */
377
+ export interface ClientVerifyStorePurchaseRequest {
378
+ /** The environment the purchase is verified in. */
379
+ parent: string;
380
+ /** Who bought it: `end_user` of `inst_` and a lower-case UUID. */
381
+ subject: Subject;
382
+ /** `app_store` or `google_play`. */
383
+ store: string;
384
+ /** App Store: the StoreKit 2 signed transaction (`jwsRepresentation`). */
385
+ signedTransaction?: string;
386
+ /** Google Play: the purchase token. */
387
+ purchaseToken?: string;
388
+ /** Google Play: the store product id (for a subscription, its id). */
389
+ productId?: string;
390
+ /** Google Play: the package name, when the connection covers several. */
391
+ packageName?: string;
392
+ /**
393
+ * The account token the app set at purchase (Play `obfuscatedAccountId`,
394
+ * App Store `appAccountToken`). A consistency check only: it must match
395
+ * the subject's derivation and the store's copy.
396
+ */
397
+ accountToken?: string;
176
398
  }
177
399
  /** The request of ConnectMerchantAccount. */
178
400
  export interface ConnectMerchantAccountRequest {
@@ -221,6 +443,29 @@ export interface CreateCheckoutSessionRequest {
221
443
  /** The id, the final name segment; the server assigns one when empty. */
222
444
  checkoutSessionId?: string;
223
445
  }
446
+ /** The request of CreateCreditGrant. */
447
+ export interface CreateCreditGrantRequest {
448
+ /** The environment to create in. */
449
+ parent: string;
450
+ /** The credit grant. */
451
+ creditGrant: CreditGrant;
452
+ }
453
+ /** The request of CreateEntitlementGrant. */
454
+ export interface CreateEntitlementGrantRequest {
455
+ /** The environment the grant is in. */
456
+ parent: string;
457
+ /**
458
+ * The grant's id, also its idempotency: `^[a-z]([a-z0-9_-]{0,61}[a-z0-9])?$`.
459
+ * The same id with the same grant returns the stored one; the same id with
460
+ * another grant is RESOURCE_ALREADY_EXISTS.
461
+ */
462
+ entitlementGrantId: string;
463
+ /**
464
+ * The grant: `subject`, `feature`, `expire_time` (future, at most 400 days
465
+ * out), `campaign`, `reason` and `approval_ref` are required.
466
+ */
467
+ entitlementGrant: EntitlementGrant;
468
+ }
224
469
  /** The request of CreatePortalSession. */
225
470
  export interface CreatePortalSessionRequest {
226
471
  /** The parent to create in. */
@@ -230,6 +475,20 @@ export interface CreatePortalSessionRequest {
230
475
  /** The id, the final name segment; the server assigns one when empty. */
231
476
  portalSessionId?: string;
232
477
  }
478
+ /** The request of CreateRevenueSource. */
479
+ export interface CreateRevenueSourceRequest {
480
+ /** The org to create in: `orgs/{org}`. */
481
+ parent: string;
482
+ /**
483
+ * The source's id; `^[a-z]([a-z0-9_-]{0,61}[a-z0-9])?$`. Empty: Money
484
+ * assigns one.
485
+ */
486
+ revenueSourceId?: string;
487
+ /** The source to create. */
488
+ revenueSource: RevenueSource;
489
+ /** Validate only; write nothing. */
490
+ validateOnly?: boolean;
491
+ }
233
492
  /** The request of CreateStoreConnection. */
234
493
  export interface CreateStoreConnectionRequest {
235
494
  /** The parent to create in. */
@@ -241,6 +500,66 @@ export interface CreateStoreConnectionRequest {
241
500
  /** Validate and return the result without writing anything. */
242
501
  validateOnly?: boolean;
243
502
  }
503
+ /** The request of CreateUsageEvent. */
504
+ export interface CreateUsageEventRequest {
505
+ /** The environment to create in. */
506
+ parent: string;
507
+ /** The usage event. */
508
+ usageEvent: UsageEvent;
509
+ }
510
+ /** The request of CreateUsageMeterPrice. */
511
+ export interface CreateUsageMeterPriceRequest {
512
+ /** The environment to create in. */
513
+ parent: string;
514
+ /** The price. */
515
+ usageMeterPrice: UsageMeterPrice;
516
+ }
517
+ /** The request of CreateUsageReservation. */
518
+ export interface CreateUsageReservationRequest {
519
+ /** The environment to create in. */
520
+ parent: string;
521
+ /** The reservation. */
522
+ usageReservation: UsageReservation;
523
+ }
524
+ /**
525
+ * A Credit Grant is credit a merchant gives a subject: audited, append-only,
526
+ * invoiced at full price and then offset once at invoice issue, soonest
527
+ * expiry first. A change is a new grant that supersedes the old one.
528
+ */
529
+ export interface CreditGrant {
530
+ /** `orgs/{org}/projects/{project}/envs/{env}/credit_grants/{credit_grant}`. */
531
+ name?: string;
532
+ /** `cgrt_<cell><ulid>`; never reused. */
533
+ readonly uid?: string;
534
+ /** Resource metadata. */
535
+ meta?: common.ResourceMeta;
536
+ /** Who receives it. */
537
+ subject?: Subject;
538
+ /** `amount` (a total) or `monthly_cap` (up to the amount in each month). */
539
+ kind?: string;
540
+ /** Minor units, a decimal string. */
541
+ amountMinor?: string;
542
+ /** When it starts applying. */
543
+ startTime?: string;
544
+ /** When it stops applying; required. Not renewing is how charging starts. */
545
+ expireTime?: string;
546
+ /** Who approved it. */
547
+ approver?: string;
548
+ /** Why. */
549
+ reason?: string;
550
+ /** The grant this one replaces. */
551
+ supersedes?: string;
552
+ /**
553
+ * `undecided`, `price_reduction`, or `post_tax_settlement`; no default.
554
+ * `post_tax_settlement` is refused while the merchant has automatic tax on.
555
+ */
556
+ taxTreatment?: string;
557
+ /**
558
+ * `standard` or `hold`; no default. Over the credit, a held invoice stays
559
+ * due but is not collected until an explicit audited release.
560
+ */
561
+ collectionMode?: string;
562
+ }
244
563
  /**
245
564
  * A Customer Subscription is a subject's recurring purchase, mirrored from
246
565
  * the processor after Money read it back. Money writes it; a caller changes it
@@ -274,6 +593,26 @@ export interface CustomerSubscription {
274
593
  readonly trialEndTime?: string;
275
594
  /** The checkout's metadata. */
276
595
  readonly metadata?: Record<string, unknown>;
596
+ /**
597
+ * The buyer's billing country, upper-case ISO 3166-1 alpha-2 (for example
598
+ * `HK`), for a web subscription: the processor customer's billing address
599
+ * (which checkout requires and saves), else the default payment method's
600
+ * billing address. Kept current when the processor reports a subscription
601
+ * or customer change. Empty when unknown, and for store subscriptions.
602
+ */
603
+ readonly billingCountryCode?: string;
604
+ }
605
+ /** The request of DeleteRevenueSource. */
606
+ export interface DeleteRevenueSourceRequest {
607
+ /**
608
+ * The source to delete, with the facts it reported. The `money` source
609
+ * cannot be deleted (pause it instead).
610
+ */
611
+ name: string;
612
+ /** The current etag; when set, the delete happens only if it matches. */
613
+ etag?: string;
614
+ /** Validate only; delete nothing. */
615
+ validateOnly?: boolean;
277
616
  }
278
617
  /** The request of DeleteStoreConnection. */
279
618
  export interface DeleteStoreConnectionRequest {
@@ -300,15 +639,63 @@ export interface EntitlementGrant {
300
639
  /** Resource metadata. */
301
640
  meta?: common.ResourceMeta;
302
641
  /** Who holds it. */
303
- readonly subject?: Subject;
642
+ subject?: Subject;
304
643
  /** The feature key. */
305
- readonly feature?: string;
644
+ feature?: string;
306
645
  /** For a `limit` feature, the allowance as a decimal string. */
307
646
  readonly limit?: string;
308
647
  /** The resource that grants it, for example a customer subscription's name. */
309
648
  readonly source?: string;
310
649
  /** When it ends; unset for no end. */
311
- readonly expireTime?: string;
650
+ expireTime?: string;
651
+ /** A manual grant's campaign (input on create, up to 64 characters). */
652
+ campaign?: string;
653
+ /** A manual grant's reason (input on create, up to 500 characters). */
654
+ reason?: string;
655
+ /**
656
+ * A free-text reference to the approval, for example `CEO 2026-10-02`
657
+ * (input on create, up to 200 characters). A test grant's (`test/<id>`) is
658
+ * set by the server, `synthetic:<env>:<synthetic_time>`, and the input is
659
+ * ignored.
660
+ */
661
+ approvalRef?: string;
662
+ /**
663
+ * The principal that created a manual grant: the verified key's principal,
664
+ * never a request field.
665
+ */
666
+ readonly approver?: string;
667
+ }
668
+ /**
669
+ * An Exchange Rate is the units of one currency per US dollar on one day,
670
+ * from the ECB reference rates (ADR §3). A day the ECB did not publish
671
+ * carries the previous business day's rate, named in `published_on`. The
672
+ * table is the same for every org: any reader that converts uses it.
673
+ */
674
+ export interface ExchangeRate {
675
+ /** `orgs/{org}/exchange_rates/{currency}-{YYYY-MM-DD}`, lower case. */
676
+ name?: string;
677
+ /** The rate's id, as in its name. */
678
+ readonly uid?: string;
679
+ /** Resource metadata. */
680
+ meta?: common.ResourceMeta;
681
+ /** The day, `YYYY-MM-DD`. */
682
+ readonly day?: string;
683
+ /** ISO 4217 code. */
684
+ readonly currencyCode?: string;
685
+ /** Units of the currency per US dollar, as a decimal string. */
686
+ readonly perUsd?: string;
687
+ /** `ecb`. */
688
+ readonly source?: string;
689
+ /**
690
+ * The publication the rate is from: the day itself, or the business day
691
+ * before a weekend or holiday.
692
+ */
693
+ readonly publicationDay?: string;
694
+ }
695
+ /** The request of ExpireCheckoutSession. */
696
+ export interface ExpireCheckoutSessionRequest {
697
+ /** The Money checkout resource to expire. */
698
+ name: string;
312
699
  }
313
700
  /**
314
701
  * A Feature is what an app checks, for example `plus` or
@@ -339,11 +726,21 @@ export interface GetCatalogRequest {
339
726
  /** The name of the catalog to get. */
340
727
  name: string;
341
728
  }
729
+ /** The request of GetCheckoutPolicy. */
730
+ export interface GetCheckoutPolicyRequest {
731
+ /** The name of the checkout policy to get. */
732
+ name: string;
733
+ }
342
734
  /** The request of GetCheckoutSession. */
343
735
  export interface GetCheckoutSessionRequest {
344
736
  /** The name of the checkout session to get. */
345
737
  name: string;
346
738
  }
739
+ /** The request of GetCreditGrant. */
740
+ export interface GetCreditGrantRequest {
741
+ /** The name of the credit grant to get. */
742
+ name: string;
743
+ }
347
744
  /** The request of GetCustomerSubscription. */
348
745
  export interface GetCustomerSubscriptionRequest {
349
746
  /** The name of the customer subscription to get. */
@@ -369,6 +766,35 @@ export interface GetPortalSessionRequest {
369
766
  /** The name of the portal session to get. */
370
767
  name: string;
371
768
  }
769
+ /** The request of GetRevenueSource. */
770
+ export interface GetRevenueSourceRequest {
771
+ /** The name of the source to get. */
772
+ name: string;
773
+ }
774
+ /** The request of GetRevenueSummary. */
775
+ export interface GetRevenueSummaryRequest {
776
+ /** `orgs/{org}/revenue`. */
777
+ name: string;
778
+ /**
779
+ * `today`, `mtd` (month to date, the default), `month` (with `month`), or
780
+ * `range` (with `start_day` and `end_day`). Days are UTC.
781
+ */
782
+ period?: string;
783
+ /** The month of a `month` period, `YYYY-MM`. */
784
+ month?: string;
785
+ /** The first day of a `range`, `YYYY-MM-DD`. */
786
+ startDay?: string;
787
+ /** The last day of a `range`, inclusive; at most 400 days after the first. */
788
+ endDay?: string;
789
+ /** `day` (the default) or `month`. */
790
+ groupBy?: string;
791
+ /** `none` (the default), `source` or `product`. */
792
+ split?: string;
793
+ /** `net` (the default) or `gross`. */
794
+ amount?: string;
795
+ /** The reporting currency, ISO 4217; default `USD`. */
796
+ currencyCode?: string;
797
+ }
372
798
  /** The request of GetStoreConnection. */
373
799
  export interface GetStoreConnectionRequest {
374
800
  /** The name of the store connection to get. */
@@ -379,6 +805,26 @@ export interface GetStorePurchaseRequest {
379
805
  /** The name of the store purchase to get. */
380
806
  name: string;
381
807
  }
808
+ /** The request of GetUsageInvoice. */
809
+ export interface GetUsageInvoiceRequest {
810
+ /** The name of the usage invoice to get. */
811
+ name: string;
812
+ }
813
+ /** The request of GetUsageMeter. */
814
+ export interface GetUsageMeterRequest {
815
+ /** The name of the usage meter to get. */
816
+ name: string;
817
+ }
818
+ /** The request of GetUsageReservation. */
819
+ export interface GetUsageReservationRequest {
820
+ /** The name of the usage reservation to get. */
821
+ name: string;
822
+ }
823
+ /** The request of GetUsageSettings. */
824
+ export interface GetUsageSettingsRequest {
825
+ /** The name of the usage settings to get. */
826
+ name: string;
827
+ }
382
828
  /** GooglePlayConnection is a Play service account and the app's package names. */
383
829
  export interface GooglePlayConnection {
384
830
  /** The apps' package names. */
@@ -415,6 +861,44 @@ export interface ImportLicenceKeyRequest {
415
861
  /** Shown to operators. */
416
862
  spec?: LicenceKeySpec;
417
863
  }
864
+ /** One already-incurred usage event of a batch. */
865
+ export interface IngestedUsageEvent {
866
+ /**
867
+ * The emitter's id of this event, 1 to 128 characters of `[A-Za-z0-9._:-]`;
868
+ * with the meter and its version, the dedupe key.
869
+ */
870
+ eventId?: string;
871
+ /** The meter. */
872
+ meter?: string;
873
+ /** The emitter's version of the meter's definition, 1 or more. */
874
+ meterVersion?: number;
875
+ /** Who used it, as attributed by the emitter. */
876
+ subject?: Subject;
877
+ /** How much, 1 to 2^40. */
878
+ quantity?: string;
879
+ /** When it happened. */
880
+ occurredTime?: string;
881
+ }
882
+ /** What became of one ingested event. */
883
+ export interface IngestedUsageEventResult {
884
+ /** The event's `event_id`. */
885
+ eventId?: string;
886
+ /**
887
+ * `accepted` (recorded now), `duplicate` (already recorded with the same
888
+ * content: a no-op), `conflict` (its key was recorded with other content;
889
+ * this one is never counted) or `rejected` (refused; see `reason`).
890
+ */
891
+ outcome?: string;
892
+ /**
893
+ * For `rejected`: `invalid` (a field is out of range), `unpriced` (no
894
+ * active meter with a price in force at `occurred_time`) or
895
+ * `reservation_required` (the meter records only through a reservation);
896
+ * empty otherwise.
897
+ */
898
+ reason?: string;
899
+ /** The UsageEvent that counts this usage, for `accepted` and `duplicate`. */
900
+ usageEvent?: string;
901
+ }
418
902
  /**
419
903
  * A Licence Key is one Ed25519 signing key Money holds for an environment. The
420
904
  * private half is generated here (or imported once, for a key already pinned in
@@ -528,6 +1012,24 @@ export interface LineItem {
528
1012
  /** How many; default 1. Seats for a per-seat or family price. */
529
1013
  quantity?: number;
530
1014
  }
1015
+ /** The request of ListCreditGrants. */
1016
+ export interface ListCreditGrantsRequest {
1017
+ /** The parent to list in. */
1018
+ parent: string;
1019
+ /** At most this many; default 50, clamped to 1000. */
1020
+ pageSize?: number;
1021
+ /** `next_page_token` of the previous page. */
1022
+ pageToken?: string;
1023
+ /** AIP-160 filter, for example `subject = "…"`. */
1024
+ filter?: string;
1025
+ }
1026
+ /** The response of ListCreditGrants. */
1027
+ export interface ListCreditGrantsResponse {
1028
+ /** The page. */
1029
+ creditGrants?: CreditGrant[];
1030
+ /** The token of the next page; empty on the last page. */
1031
+ nextPageToken?: string;
1032
+ }
531
1033
  /** The request of ListCustomerSubscriptions. */
532
1034
  export interface ListCustomerSubscriptionsRequest {
533
1035
  /** The parent to list in. */
@@ -564,6 +1066,28 @@ export interface ListEntitlementGrantsResponse {
564
1066
  /** The token of the next page; empty on the last page. */
565
1067
  nextPageToken?: string;
566
1068
  }
1069
+ /** The request of ListExchangeRates. */
1070
+ export interface ListExchangeRatesRequest {
1071
+ /** The org reading: `orgs/{org}`. The rates are the same for every org. */
1072
+ parent: string;
1073
+ /** At most this many; default 50, clamped to 1000. */
1074
+ pageSize?: number;
1075
+ /** `next_page_token` of the previous page. */
1076
+ pageToken?: string;
1077
+ /**
1078
+ * AIP-160 filter, comparisons joined with `AND`: `currency_code = "EUR"`,
1079
+ * `day >= "YYYY-MM-DD"`, `day <= "YYYY-MM-DD"`. The days
1080
+ * default to the 31 days to today (UTC), and span at most 400 days.
1081
+ */
1082
+ filter?: string;
1083
+ }
1084
+ /** The response of ListExchangeRates. */
1085
+ export interface ListExchangeRatesResponse {
1086
+ /** The page, newest day first, then by currency. */
1087
+ exchangeRates?: ExchangeRate[];
1088
+ /** The token of the next page; empty on the last page. */
1089
+ nextPageToken?: string;
1090
+ }
567
1091
  /** The request of ListLicenceKeys. */
568
1092
  export interface ListLicenceKeysRequest {
569
1093
  /** The parent to list in. */
@@ -618,6 +1142,45 @@ export interface ListMerchantAccountsResponse {
618
1142
  /** The token of the next page; empty on the last page. */
619
1143
  nextPageToken?: string;
620
1144
  }
1145
+ /** The request of ListRevenueFacts. */
1146
+ export interface ListRevenueFactsRequest {
1147
+ /** The org: `orgs/{org}`. */
1148
+ parent: string;
1149
+ /** At most this many; default 50, clamped to 1000. */
1150
+ pageSize?: number;
1151
+ /** `next_page_token` of the previous page. */
1152
+ pageToken?: string;
1153
+ /**
1154
+ * AIP-160 filter, comparisons joined with `AND`: `source = "…"` (a source
1155
+ * id or name), `basis`, `store_kind`, `product_ref` (each `=`), and
1156
+ * `day >= "YYYY-MM-DD"`, `day <= "YYYY-MM-DD"`. The days default to the 31
1157
+ * days to today (UTC), and span at most 400 days.
1158
+ */
1159
+ filter?: string;
1160
+ }
1161
+ /** The response of ListRevenueFacts. */
1162
+ export interface ListRevenueFactsResponse {
1163
+ /** The page, newest day first. */
1164
+ revenueFacts?: RevenueFact[];
1165
+ /** The token of the next page; empty on the last page. */
1166
+ nextPageToken?: string;
1167
+ }
1168
+ /** The request of ListRevenueSources. */
1169
+ export interface ListRevenueSourcesRequest {
1170
+ /** The org to list in: `orgs/{org}`. */
1171
+ parent: string;
1172
+ /** At most this many; default 50, clamped to 1000. */
1173
+ pageSize?: number;
1174
+ /** `next_page_token` of the previous page. */
1175
+ pageToken?: string;
1176
+ }
1177
+ /** The response of ListRevenueSources. */
1178
+ export interface ListRevenueSourcesResponse {
1179
+ /** The page, by id, each with its freshness. */
1180
+ revenueSources?: RevenueSource[];
1181
+ /** The token of the next page; empty on the last page. */
1182
+ nextPageToken?: string;
1183
+ }
621
1184
  /** The request of ListStoreConnections. */
622
1185
  export interface ListStoreConnectionsRequest {
623
1186
  /** The parent to list in. */
@@ -654,52 +1217,164 @@ export interface ListStorePurchasesResponse {
654
1217
  /** The token of the next page; empty on the last page. */
655
1218
  nextPageToken?: string;
656
1219
  }
657
- /**
658
- * A Merchant Account is the seller an environment charges as on the web: the
659
- * customer's own Stripe account, connected through Stripe Connect OAuth, or
660
- * with a restricted key when OAuth cannot be used (the platform's own
661
- * products). Sylphx stores the account id, and for a key connection the key
662
- * sealed, never in the clear and never returned. `:connect` starts the
663
- * connection; the processor's redirect completes an OAuth one.
664
- */
665
- export interface MerchantAccount {
666
- /**
667
- * `orgs/{org}/projects/{project}/envs/{env}/merchant_accounts/{merchant_account}`;
668
- * the environment's seller is `default`.
669
- */
670
- name?: string;
671
- /** `mac_<cell><ulid>`; never reused. */
672
- readonly uid?: string;
673
- /** Resource metadata. */
674
- meta?: common.ResourceMeta;
675
- /** The processor: `stripe`. */
676
- readonly processor?: string;
677
- /** The connected account id, for example `acct_1Nv…`. */
678
- readonly accountId?: string;
679
- /** Whether the connection is in live mode (false is test mode). */
680
- readonly livemode?: boolean;
681
- /** `connected` or `disconnected`. */
682
- readonly state?: string;
683
- /** Whether the account can take payments now. */
684
- readonly chargesEnabled?: boolean;
685
- /** Whether the account can be paid out. */
686
- readonly payoutsEnabled?: boolean;
687
- /** The business name the processor holds for the account. */
688
- readonly businessName?: string;
689
- /** ISO 3166-1 alpha-2 country of the account. */
690
- readonly regionCode?: string;
691
- /** ISO 4217 default currency of the account, upper case. */
692
- readonly defaultCurrencyCode?: string;
693
- /** When the processor last confirmed these fields. */
694
- readonly refreshTime?: string;
695
- /**
696
- * How the account is called at the processor: `connect` (the platform's
697
- * key acts for a connected account) or `restricted_key` (the account's own
698
- * key, held sealed).
699
- */
700
- readonly credential?: string;
1220
+ /** The request of ListTaxThresholdStatuses. */
1221
+ export interface ListTaxThresholdStatusesRequest {
1222
+ /** The parent to list in. */
1223
+ parent: string;
1224
+ /** At most this many; default 50, clamped to 1000. */
1225
+ pageSize?: number;
1226
+ /** `next_page_token` of the previous page. */
1227
+ pageToken?: string;
701
1228
  }
702
- /**
1229
+ /** The response of ListTaxThresholdStatuses. */
1230
+ export interface ListTaxThresholdStatusesResponse {
1231
+ /** The page. */
1232
+ taxThresholdStatuses?: TaxThresholdStatus[];
1233
+ /** The token of the next page; empty on the last page. */
1234
+ nextPageToken?: string;
1235
+ }
1236
+ /** The request of ListUsageEvents. */
1237
+ export interface ListUsageEventsRequest {
1238
+ /** The parent to list in. */
1239
+ parent: string;
1240
+ /** At most this many; default 50, clamped to 1000. */
1241
+ pageSize?: number;
1242
+ /** `next_page_token` of the previous page. */
1243
+ pageToken?: string;
1244
+ /** AIP-160 filter, for example `subject = "…"`. */
1245
+ filter?: string;
1246
+ }
1247
+ /** The response of ListUsageEvents. */
1248
+ export interface ListUsageEventsResponse {
1249
+ /** The page. */
1250
+ usageEvents?: UsageEvent[];
1251
+ /** The token of the next page; empty on the last page. */
1252
+ nextPageToken?: string;
1253
+ }
1254
+ /** The request of ListUsageInvoices. */
1255
+ export interface ListUsageInvoicesRequest {
1256
+ /** The parent to list in. */
1257
+ parent: string;
1258
+ /** At most this many; default 50, clamped to 1000. */
1259
+ pageSize?: number;
1260
+ /** `next_page_token` of the previous page. */
1261
+ pageToken?: string;
1262
+ /** AIP-160 filter, for example `subject = "…"`. */
1263
+ filter?: string;
1264
+ }
1265
+ /** The response of ListUsageInvoices. */
1266
+ export interface ListUsageInvoicesResponse {
1267
+ /** The page. */
1268
+ usageInvoices?: UsageInvoice[];
1269
+ /** The token of the next page; empty on the last page. */
1270
+ nextPageToken?: string;
1271
+ }
1272
+ /** The request of ListUsageMeterPrices. */
1273
+ export interface ListUsageMeterPricesRequest {
1274
+ /** The parent to list in. */
1275
+ parent: string;
1276
+ /** At most this many; default 50, clamped to 1000. */
1277
+ pageSize?: number;
1278
+ /** `next_page_token` of the previous page. */
1279
+ pageToken?: string;
1280
+ /** AIP-160 filter, for example `meter = "tokens"`. */
1281
+ filter?: string;
1282
+ }
1283
+ /** The response of ListUsageMeterPrices. */
1284
+ export interface ListUsageMeterPricesResponse {
1285
+ /** The page. */
1286
+ usageMeterPrices?: UsageMeterPrice[];
1287
+ /** The token of the next page; empty on the last page. */
1288
+ nextPageToken?: string;
1289
+ }
1290
+ /** The request of ListUsageMeters. */
1291
+ export interface ListUsageMetersRequest {
1292
+ /** The parent to list in. */
1293
+ parent: string;
1294
+ /** At most this many; default 50, clamped to 1000. */
1295
+ pageSize?: number;
1296
+ /** `next_page_token` of the previous page. */
1297
+ pageToken?: string;
1298
+ }
1299
+ /** The response of ListUsageMeters. */
1300
+ export interface ListUsageMetersResponse {
1301
+ /** The page. */
1302
+ usageMeters?: UsageMeter[];
1303
+ /** The token of the next page; empty on the last page. */
1304
+ nextPageToken?: string;
1305
+ }
1306
+ /** The request of ListUsageTiers. */
1307
+ export interface ListUsageTiersRequest {
1308
+ /** The parent to list in. */
1309
+ parent: string;
1310
+ /** At most this many; default 50, clamped to 1000. */
1311
+ pageSize?: number;
1312
+ /** `next_page_token` of the previous page. */
1313
+ pageToken?: string;
1314
+ /** AIP-160 filter, for example `subject = "…"`. */
1315
+ filter?: string;
1316
+ }
1317
+ /** The response of ListUsageTiers. */
1318
+ export interface ListUsageTiersResponse {
1319
+ /** The page. */
1320
+ usageTiers?: UsageTier[];
1321
+ /** The token of the next page; empty on the last page. */
1322
+ nextPageToken?: string;
1323
+ }
1324
+ /**
1325
+ * A Merchant Account is the seller an environment charges as on the web: the
1326
+ * customer's own Stripe account, connected through Stripe Connect OAuth, or
1327
+ * with a restricted key when OAuth cannot be used (the platform's own
1328
+ * products). Sylphx stores the account id, and for a key connection the key
1329
+ * sealed, never in the clear and never returned. `:connect` starts the
1330
+ * connection; the processor's redirect completes an OAuth one.
1331
+ */
1332
+ export interface MerchantAccount {
1333
+ /**
1334
+ * `orgs/{org}/projects/{project}/envs/{env}/merchant_accounts/{merchant_account}`;
1335
+ * the environment's seller is `default`.
1336
+ */
1337
+ name?: string;
1338
+ /** `mac_<cell><ulid>`; never reused. */
1339
+ readonly uid?: string;
1340
+ /** Resource metadata. */
1341
+ meta?: common.ResourceMeta;
1342
+ /** The processor: `stripe`. */
1343
+ readonly processor?: string;
1344
+ /** The connected account id, for example `acct_1Nv…`. */
1345
+ readonly accountId?: string;
1346
+ /** Whether the connection is in live mode (false is test mode). */
1347
+ readonly livemode?: boolean;
1348
+ /** `connected` or `disconnected`. */
1349
+ readonly state?: string;
1350
+ /** Whether the account can take payments now. */
1351
+ readonly chargesEnabled?: boolean;
1352
+ /** Whether the account can be paid out. */
1353
+ readonly payoutsEnabled?: boolean;
1354
+ /** The business name the processor holds for the account. */
1355
+ readonly businessName?: string;
1356
+ /** ISO 3166-1 alpha-2 country of the account. */
1357
+ readonly regionCode?: string;
1358
+ /** ISO 4217 default currency of the account, upper case. */
1359
+ readonly defaultCurrencyCode?: string;
1360
+ /** When the processor last confirmed these fields. */
1361
+ readonly refreshTime?: string;
1362
+ /**
1363
+ * How the account is called at the processor: `connect` (the platform's
1364
+ * key acts for a connected account) or `restricted_key` (the account's own
1365
+ * key, held sealed).
1366
+ */
1367
+ readonly credential?: string;
1368
+ /**
1369
+ * Whether Stripe computes tax on this merchant's checkouts and usage
1370
+ * invoices (its own cost decision: Stripe Tax charges per transaction).
1371
+ * Off by default. Writable through `UpdateMerchantAccount`
1372
+ * (`update_mask = "automatic_tax"`). Turning it on is refused while a live
1373
+ * `post_tax_settlement` credit grant exists.
1374
+ */
1375
+ automaticTax?: boolean;
1376
+ }
1377
+ /**
703
1378
  * A Portal Session is a hosted page where a subject manages its
704
1379
  * subscriptions, payment method, and invoices.
705
1380
  */
@@ -748,6 +1423,16 @@ export interface Price {
748
1423
  * currency is immutable there.
749
1424
  */
750
1425
  defaultCurrency?: string;
1426
+ /**
1427
+ * Optional introductory unit amounts for the first paid billing period of a
1428
+ * new subject's subscription to this product. `unit_amounts` remains the
1429
+ * renewal price. Must cover exactly the same currencies, each strictly lower
1430
+ * than its renewal amount and greater than zero. Recurring prices only;
1431
+ * cannot be combined with a free trial. Web checkout accepts one line item
1432
+ * for an introductory offer and does not combine it with promotion codes.
1433
+ * Store introductory offers are configured and enforced by the store.
1434
+ */
1435
+ introductoryUnitAmounts?: Record<string, string>;
751
1436
  }
752
1437
  /** A Product is one thing sold, with its prices and the features it grants. */
753
1438
  export interface Product {
@@ -791,6 +1476,49 @@ export interface RefreshMerchantAccountRequest {
791
1476
  /** The merchant account to read back. */
792
1477
  name: string;
793
1478
  }
1479
+ /** A processor refund created for a one-time checkout. */
1480
+ export interface Refund {
1481
+ /** The processor's refund id. */
1482
+ readonly id?: string;
1483
+ /** The Money checkout resource this refund belongs to. */
1484
+ readonly checkoutSession?: string;
1485
+ /** The processor payment intent the refund applies to. */
1486
+ readonly paymentIntent?: string;
1487
+ /** Amount refunded in minor units. */
1488
+ readonly amountMinor?: string;
1489
+ /** ISO 4217 currency code. */
1490
+ readonly currencyCode?: string;
1491
+ /** The processor's refund status. */
1492
+ readonly status?: string;
1493
+ }
1494
+ /** The request of RefundCheckoutSession. */
1495
+ export interface RefundCheckoutSessionRequest {
1496
+ /** The Money checkout resource to refund. */
1497
+ name: string;
1498
+ /** Optional partial amount in minor units; empty refunds the remaining amount. */
1499
+ amountMinor?: string;
1500
+ /** Optional processor refund reason. */
1501
+ reason?: string;
1502
+ /** Caller metadata, such as the app's return and order ids. At most 20 keys. */
1503
+ metadata?: Record<string, string>;
1504
+ }
1505
+ /** The processor refund created for this checkout. */
1506
+ export interface RefundCheckoutSessionResponse {
1507
+ /** The refund receipt, read back from the processor after creation. */
1508
+ readonly refund?: Refund;
1509
+ }
1510
+ /** The request of ReleaseUsageInvoiceCollection. */
1511
+ export interface ReleaseUsageInvoiceCollectionRequest {
1512
+ /** The held invoice to release for collection. */
1513
+ name: string;
1514
+ /** Who releases it, and why: both are kept. */
1515
+ reason: string;
1516
+ }
1517
+ /** The request of ReleaseUsageReservation. */
1518
+ export interface ReleaseUsageReservationRequest {
1519
+ /** The reservation to release. */
1520
+ name: string;
1521
+ }
794
1522
  /** The request of ResumeCustomerSubscription. */
795
1523
  export interface ResumeCustomerSubscriptionRequest {
796
1524
  /** The subscription to resume. */
@@ -801,6 +1529,311 @@ export interface RetireLicenceKeyRequest {
801
1529
  /** The key to retire. */
802
1530
  name: string;
803
1531
  }
1532
+ /** One day or month of a RevenueSummary. */
1533
+ export interface RevenueBucket {
1534
+ /** The day, or the first day of the month. */
1535
+ startDay?: string;
1536
+ /** The bucket's total in minor units of the reporting currency. */
1537
+ total?: string;
1538
+ /**
1539
+ * The weakest basis that counted in the bucket: `final` when every row is
1540
+ * a source's final statement, `estimated` or `booked` otherwise.
1541
+ */
1542
+ basis?: string;
1543
+ /** A stale source has not reported this bucket yet. */
1544
+ incomplete?: boolean;
1545
+ /** Daily rows of this bucket with no rate yet. */
1546
+ unconvertedCount?: string;
1547
+ /** The bucket per source or product; empty when `split` is `none`. */
1548
+ lines?: RevenueLine[];
1549
+ }
1550
+ /**
1551
+ * A Revenue Fact is one line a source reported, in that line's own currency
1552
+ * (ADR §1): read for audit and export. Facts are written by Money's own
1553
+ * bookings and by imports, never through this API.
1554
+ */
1555
+ export interface RevenueFact {
1556
+ /** `orgs/{org}/revenue_facts/{revenue_fact}`. */
1557
+ name?: string;
1558
+ /** The fact's id: a hash of its source and external key. */
1559
+ readonly uid?: string;
1560
+ /** Resource metadata. */
1561
+ meta?: common.ResourceMeta;
1562
+ /** The source that reported it: `orgs/{org}/revenue_sources/{id}`. */
1563
+ readonly source?: string;
1564
+ /** The source's own identity for the line. */
1565
+ readonly externalKey?: string;
1566
+ /** `booked`, `estimated` or `final`. */
1567
+ readonly basis?: string;
1568
+ /** `transaction`, `day` or `month`. */
1569
+ readonly granularity?: string;
1570
+ /** The source's reporting day; the first of the month for a month row. */
1571
+ readonly day?: string;
1572
+ /** `stripe`, `app_store`, `google_play`, `ad_network` or `other`. */
1573
+ readonly storeKind?: string;
1574
+ /** The account the source reports for. */
1575
+ readonly accountRef?: string;
1576
+ /** The product reference the source uses. */
1577
+ readonly productRef?: string;
1578
+ /** The store's item id. */
1579
+ readonly sku?: string;
1580
+ /** Buyer country (ISO 3166-1 alpha-2), where the source reports it. */
1581
+ readonly regionCode?: string;
1582
+ /** ISO 4217 code of the amounts. */
1583
+ readonly currencyCode?: string;
1584
+ /** What the buyer paid. */
1585
+ readonly gross?: string;
1586
+ /** The store's or processor's fee. */
1587
+ readonly fee?: string;
1588
+ /** Tax. */
1589
+ readonly tax?: string;
1590
+ /** What the org earns. */
1591
+ readonly net?: string;
1592
+ /** Items or orders, where reported. */
1593
+ readonly units?: string;
1594
+ /** The day the money reached the bank; empty until the source says so. */
1595
+ readonly settledOn?: string;
1596
+ }
1597
+ /** One source's or product's share of a total. */
1598
+ export interface RevenueLine {
1599
+ /**
1600
+ * The source's name (`orgs/{org}/revenue_sources/{id}`), or the product as
1601
+ * `{store_kind}/{product_ref}`.
1602
+ */
1603
+ key?: string;
1604
+ /**
1605
+ * The source's display name, or the product's label; the reference itself
1606
+ * when the product has no label.
1607
+ */
1608
+ label?: string;
1609
+ /** In minor units of the reporting currency. */
1610
+ total?: string;
1611
+ }
1612
+ /**
1613
+ * A Revenue Source is one place an org's revenue is read from. `kind`
1614
+ * selects the connector Money implements once (ADR §2). The `money` source
1615
+ * is implicit, one per environment with Money, made the first time Money
1616
+ * books a sale there; it cannot be created or deleted through the API, only
1617
+ * renamed or paused. A connector's credential is sealed and never returned;
1618
+ * connectors arrive kind by kind, and a source of a kind whose connector has
1619
+ * not shipped yet is registered and reported stale until it first syncs.
1620
+ */
1621
+ export interface RevenueSource {
1622
+ /** `orgs/{org}/revenue_sources/{revenue_source}`. */
1623
+ name?: string;
1624
+ /** The source's id (`rvs-…`); never reused. */
1625
+ readonly uid?: string;
1626
+ /** Resource metadata. */
1627
+ meta?: common.ResourceMeta;
1628
+ /** Desired state. */
1629
+ spec?: RevenueSourceSpec;
1630
+ /** Observed state. */
1631
+ readonly status?: RevenueSourceStatus;
1632
+ }
1633
+ /** RevenueSourceSpec is the caller-writable state of a RevenueSource. */
1634
+ export interface RevenueSourceSpec {
1635
+ /**
1636
+ * `money`, `stripe`, `google_play`, `app_store`, `ad_network`, `file` or
1637
+ * `manual`. Set on create and never changed; `money` is never created.
1638
+ */
1639
+ kind?: string;
1640
+ /** Shown on summaries and in the console. */
1641
+ displayName?: string;
1642
+ /** A paused source is not synced and cannot be run; its facts still count. */
1643
+ paused?: boolean;
1644
+ /**
1645
+ * The connector's settings (an account id, a bucket, a column mapping),
1646
+ * never a credential. At most 32 entries.
1647
+ */
1648
+ config?: Record<string, string>;
1649
+ /**
1650
+ * The connector's credential, such as a Stripe live restricted key with
1651
+ * read access to balance transactions and payouts. Shared by all connector
1652
+ * kinds: sealed on write, never returned; omit it on update to keep it.
1653
+ */
1654
+ credential?: string;
1655
+ }
1656
+ /** RevenueSourceStatus is the observed state of a RevenueSource. */
1657
+ export interface RevenueSourceStatus {
1658
+ /** The generation this status was computed from. */
1659
+ readonly observedGeneration?: string;
1660
+ /**
1661
+ * `Ready` while the source is fresh; `False` with reason `Stale`,
1662
+ * `Paused` or `NeverSynced` otherwise.
1663
+ */
1664
+ readonly conditions?: common.Condition[];
1665
+ /**
1666
+ * For a `money` source, the environment it books:
1667
+ * `orgs/{org}/projects/{project}/envs/{env}`. Empty for every other kind.
1668
+ */
1669
+ readonly environment?: string;
1670
+ /**
1671
+ * When the source last synced successfully. Unset for a `money` source,
1672
+ * which books in real time.
1673
+ */
1674
+ readonly lastSuccessTime?: string;
1675
+ /** The newest day the source holds, `YYYY-MM-DD`; empty when it holds none. */
1676
+ readonly newestDay?: string;
1677
+ /**
1678
+ * The newest day is older than the kind's normal lag plus one day, or the
1679
+ * source has never synced: summaries name it and mark the days it has not
1680
+ * reported as incomplete.
1681
+ */
1682
+ readonly stale?: boolean;
1683
+ /** The last run: `running`, `succeeded` or `failed`; empty before the first. */
1684
+ readonly lastRunState?: string;
1685
+ /** The last failed run's error code; never a response body. */
1686
+ readonly lastRunError?: string;
1687
+ }
1688
+ /**
1689
+ * The Revenue Summary is an org's revenue over a period, read from the daily
1690
+ * roll-up and never from raw facts (ADR §4), converted into one reporting
1691
+ * currency at each day's rate (§3), with the highest basis counting for each
1692
+ * store, product and day (§1 "Which row counts"). Computed on every read;
1693
+ * nothing writes it.
1694
+ */
1695
+ export interface RevenueSummary {
1696
+ /** `orgs/{org}/revenue`. */
1697
+ name?: string;
1698
+ /** The org's id. */
1699
+ readonly uid?: string;
1700
+ /** Resource metadata. */
1701
+ readonly meta?: common.ResourceMeta;
1702
+ /** The first day of the period, `YYYY-MM-DD`. */
1703
+ readonly startDay?: string;
1704
+ /** The last day of the period, inclusive. */
1705
+ readonly endDay?: string;
1706
+ /** The reporting currency every converted amount is in. */
1707
+ readonly currencyCode?: string;
1708
+ /** `net` or `gross`. */
1709
+ readonly amount?: string;
1710
+ /** `day` or `month`. */
1711
+ readonly groupBy?: string;
1712
+ /** `none`, `source` or `product`. */
1713
+ readonly split?: string;
1714
+ /** The period's total, in minor units of the reporting currency. */
1715
+ readonly total?: string;
1716
+ /** One bucket per day or month that holds revenue, oldest first. */
1717
+ readonly buckets?: RevenueBucket[];
1718
+ /**
1719
+ * The period's total per source or product, largest first; empty when
1720
+ * `split` is `none`.
1721
+ */
1722
+ readonly lines?: RevenueLine[];
1723
+ /** Sources that report late: their missing days make the period incomplete. */
1724
+ readonly staleSources?: StaleRevenueSource[];
1725
+ /**
1726
+ * Amounts with no exchange rate for their day yet, in their own currency:
1727
+ * counted here, never in `total`.
1728
+ */
1729
+ readonly unconverted?: UnconvertedAmount[];
1730
+ /** Daily rows that had no rate and are in `unconverted`. */
1731
+ readonly unconvertedCount?: string;
1732
+ /** A stale source has not reported some day of the period. */
1733
+ readonly incomplete?: boolean;
1734
+ /**
1735
+ * Ledger-backed booked volume for this exact period, by app/environment,
1736
+ * channel and original currency. Never FX converted or replaced by imported
1737
+ * estimates/final reports; independent of amount, split and group_by.
1738
+ */
1739
+ readonly bookedVolume?: BookedVolumeLine[];
1740
+ }
1741
+ /** The request of RunRevenueSource. */
1742
+ export interface RunRevenueSourceRequest {
1743
+ /** The source to run. */
1744
+ name: string;
1745
+ /**
1746
+ * `sync` (default) reads what is new; `backfill` re-reads the period
1747
+ * `start_day` to `end_day`.
1748
+ */
1749
+ mode?: string;
1750
+ /** The first day of a backfill, `YYYY-MM-DD`. */
1751
+ startDay?: string;
1752
+ /** The last day of a backfill, `YYYY-MM-DD`, inclusive. */
1753
+ endDay?: string;
1754
+ }
1755
+ /** The response of RunRevenueSource. */
1756
+ export interface RunRevenueSourceResponse {
1757
+ /** The run's id. */
1758
+ run?: string;
1759
+ /** `succeeded`, `failed`, or `running` while a connector works through it. */
1760
+ state?: string;
1761
+ /** The facts the run wrote. */
1762
+ facts?: string;
1763
+ /** The source after the run. */
1764
+ revenueSource?: RevenueSource;
1765
+ }
1766
+ /** The request of SettleUsageReservation. */
1767
+ export interface SettleUsageReservationRequest {
1768
+ /** The reservation to settle. */
1769
+ name: string;
1770
+ /**
1771
+ * What was used, in the meter's base unit; 0 to the granted quantity, or
1772
+ * more after expiry (the work happened).
1773
+ */
1774
+ quantityUsed: string;
1775
+ /** When the work happened; now when absent. */
1776
+ occurredTime?: string;
1777
+ }
1778
+ /** A shipping address collected by the hosted checkout for a physical order. */
1779
+ export interface ShippingAddress {
1780
+ /** Recipient name. */
1781
+ readonly recipient?: string;
1782
+ /** First address line. */
1783
+ readonly line1?: string;
1784
+ /** Optional second address line. */
1785
+ readonly line2?: string;
1786
+ /** City or town. */
1787
+ readonly city?: string;
1788
+ /** State, county or province. */
1789
+ readonly region?: string;
1790
+ /** Postcode. */
1791
+ readonly postalCode?: string;
1792
+ /** Upper-case ISO 3166-1 alpha-2 region code. */
1793
+ readonly regionCode?: string;
1794
+ }
1795
+ /** The request of SnapshotEntitlementGrants. */
1796
+ export interface SnapshotEntitlementGrantsRequest {
1797
+ /** The environment whose entitlement collection is read. */
1798
+ parent: string;
1799
+ /** At most this many; default 50, clamped to 1000. */
1800
+ pageSize?: number;
1801
+ /** `next_page_token` of the previous page of this snapshot. */
1802
+ pageToken?: string;
1803
+ /** AIP-160 filter over entitlement grant fields. */
1804
+ filter?: string;
1805
+ /**
1806
+ * Expected environment-wide collection revision, as a canonical decimal
1807
+ * string. Empty selects the current source snapshot; any nonempty value,
1808
+ * including "0", requires equality or returns HTTP 409 ETAG_MISMATCH.
1809
+ * Send the first response's revision on every subsequent page. Page tokens
1810
+ * also fence that revision and cannot be reused after a collection change.
1811
+ */
1812
+ snapshotRevision?: string;
1813
+ }
1814
+ /** The response of SnapshotEntitlementGrants. */
1815
+ export interface SnapshotEntitlementGrantsResponse {
1816
+ /** The page. */
1817
+ entitlementGrants?: EntitlementGrant[];
1818
+ /** The token of the next page; empty on the last page. */
1819
+ nextPageToken?: string;
1820
+ /**
1821
+ * Always present as a canonical decimal string, including "0" for a source
1822
+ * with no committed grant mutations. Versions all grants in the environment,
1823
+ * regardless of filter, including deletion of the last grant. Not a clock
1824
+ * or resource etag. Rows and revision are read in one database snapshot.
1825
+ */
1826
+ readonly snapshotRevision?: string;
1827
+ }
1828
+ /** A source named on a summary because it reports late. */
1829
+ export interface StaleRevenueSource {
1830
+ /** `orgs/{org}/revenue_sources/{id}`. */
1831
+ source?: string;
1832
+ /** The source's display name. */
1833
+ displayName?: string;
1834
+ /** The newest day it holds; empty when it holds none. */
1835
+ newestDay?: string;
1836
+ }
804
1837
  /**
805
1838
  * A Store Connection is the environment's access to one app store: its App
806
1839
  * Store Server API key or Google Play service account, sealed by Money and
@@ -831,8 +1864,10 @@ export interface StoreConnectionSpec {
831
1864
  /** Google Play. */
832
1865
  googlePlay?: GooglePlayConnection;
833
1866
  /**
834
- * Accept purchases the store marks as sandbox or license-test. Off in
835
- * production: a sandbox purchase is then refused.
1867
+ * Accept purchases the store marks as sandbox or license-test. Off: a
1868
+ * sandbox purchase is refused. On a `production` App Store connection it
1869
+ * also takes App Review and TestFlight purchases, read back from the
1870
+ * sandbox and recorded and granted as `sandbox`, never as production.
836
1871
  */
837
1872
  allowSandbox?: boolean;
838
1873
  /**
@@ -840,6 +1875,13 @@ export interface StoreConnectionSpec {
840
1875
  * Store `appAccountToken`, Play `obfuscatedAccountId`).
841
1876
  */
842
1877
  requireAccountToken?: boolean;
1878
+ /**
1879
+ * Let an app with no server verify its own purchases against this
1880
+ * connection (`store_purchases:clientVerify`, callable with a publishable
1881
+ * key). Off by default, including for every connection created before this
1882
+ * field existed; only a secret key holding `billing:write` can turn it on.
1883
+ */
1884
+ clientVerify?: boolean;
843
1885
  }
844
1886
  /** StoreConnectionStatus is the observed state of a StoreConnection. */
845
1887
  export interface StoreConnectionStatus {
@@ -898,6 +1940,16 @@ export interface StorePurchase {
898
1940
  readonly currencyCode?: string;
899
1941
  /** The subscription it belongs to, for a subscription purchase. */
900
1942
  readonly customerSubscription?: string;
1943
+ /**
1944
+ * ISO 3166-1 alpha-2 country of the buyer's storefront, upper case; empty
1945
+ * when the store did not report one.
1946
+ */
1947
+ readonly regionCode?: string;
1948
+ /**
1949
+ * When the store says the first purchase of this subscription or restored
1950
+ * purchase was made; unset when it did not report one.
1951
+ */
1952
+ readonly originalPurchaseTime?: string;
901
1953
  /**
902
1954
  * Revoked after it was delivered, and its goods come back: its
903
1955
  * entitlements ended, and the app takes back the assets its grant credited,
@@ -921,6 +1973,78 @@ export interface SyncCatalogRequest {
921
1973
  /** The catalog to push. */
922
1974
  name: string;
923
1975
  }
1976
+ /**
1977
+ * A Tax Threshold Status is where the environment's consumer (B2C) paid
1978
+ * sales stand against one jurisdiction's registration threshold for digital
1979
+ * services (docs/services/money/web-payments.md, "Tax registration
1980
+ * thresholds"). It is computed on read from the sales Money recorded and the
1981
+ * threshold table; nothing about it is written by a caller.
1982
+ */
1983
+ export interface TaxThresholdStatus {
1984
+ /**
1985
+ * `orgs/{org}/projects/{project}/envs/{env}/tax_threshold_statuses/{threshold}`,
1986
+ * the threshold's id (`au-gst`, `us-tx`).
1987
+ */
1988
+ name?: string;
1989
+ /** The threshold's id, as in `name`. */
1990
+ readonly uid?: string;
1991
+ /** Resource metadata; not set for a computed view. */
1992
+ meta?: common.ResourceMeta;
1993
+ /** The jurisdiction's country, upper-case ISO 3166-1 alpha-2. */
1994
+ readonly regionCode?: string;
1995
+ /** The jurisdiction's subdivision (a US state, `TX`); empty for a country. */
1996
+ readonly subdivisionCode?: string;
1997
+ /** The tax the threshold registers for, for example `GST`. */
1998
+ readonly taxName?: string;
1999
+ /** The threshold's currency, upper-case ISO 4217. */
2000
+ readonly currencyCode?: string;
2001
+ /**
2002
+ * The amount that triggers registration, integer minor units of
2003
+ * `currency_code`; "0" when the threshold is a transaction count only.
2004
+ */
2005
+ readonly thresholdAmount?: string;
2006
+ /** The transaction count that triggers registration; 0 when none. */
2007
+ readonly thresholdTransactionCount?: string;
2008
+ /** `rolling_12_months`, `calendar_year`, or `prior_or_current_calendar_year`. */
2009
+ readonly windowKind?: string;
2010
+ /** The start (inclusive) of the window the figures below cover. */
2011
+ readonly windowStartTime?: string;
2012
+ /** The end of the window (the moment of the read for a rolling window). */
2013
+ readonly windowEndTime?: string;
2014
+ /**
2015
+ * The consumer paid sales in the window, net of tax, in `currency_code`
2016
+ * minor units. Business sales (a tax id was given) are excluded.
2017
+ */
2018
+ readonly salesAmount?: string;
2019
+ /** The number of those sales. */
2020
+ readonly salesTransactionCount?: string;
2021
+ /**
2022
+ * How close the sales are to the threshold, in whole percent (the higher of
2023
+ * the amount and the count); it can exceed 100.
2024
+ */
2025
+ readonly percent?: number;
2026
+ /**
2027
+ * The highest alert level (70, 90, 100) already sent for this window; 0 if
2028
+ * none.
2029
+ */
2030
+ readonly alertedPercent?: number;
2031
+ /**
2032
+ * Currencies of sales that could not be converted into `currency_code`
2033
+ * (no rate in the rate table) and so are not counted in `sales_amount`.
2034
+ */
2035
+ readonly unconvertedCurrencyCodes?: string[];
2036
+ /** The authority page the threshold comes from. */
2037
+ readonly sourceUrl?: string;
2038
+ /** When the threshold row took effect. */
2039
+ readonly effectiveTime?: string;
2040
+ }
2041
+ /** An amount a summary could not convert yet. */
2042
+ export interface UnconvertedAmount {
2043
+ /** ISO 4217 code. */
2044
+ currencyCode?: string;
2045
+ /** In minor units of that currency. */
2046
+ amount?: string;
2047
+ }
924
2048
  /** The request of UpdateCatalog. */
925
2049
  export interface UpdateCatalogRequest {
926
2050
  /** The catalog to write; `name` identifies it. */
@@ -932,6 +2056,17 @@ export interface UpdateCatalogRequest {
932
2056
  /** Validate and return the result without writing anything. */
933
2057
  validateOnly?: boolean;
934
2058
  }
2059
+ /** The request of UpdateCheckoutPolicy. */
2060
+ export interface UpdateCheckoutPolicyRequest {
2061
+ /** The checkout policy to write; `name` identifies it. */
2062
+ checkoutPolicy: CheckoutPolicy;
2063
+ /** The fields to write; unset writes every populated field. */
2064
+ updateMask?: string;
2065
+ /** Create the policy when it does not exist (declarative upsert). */
2066
+ allowMissing?: boolean;
2067
+ /** Validate and return the result without writing anything. */
2068
+ validateOnly?: boolean;
2069
+ }
935
2070
  /** The request of UpdateCustomerSubscriptionQuantity. */
936
2071
  export interface UpdateCustomerSubscriptionQuantityRequest {
937
2072
  /** The subscription to change. */
@@ -944,6 +2079,25 @@ export interface UpdateCustomerSubscriptionQuantityRequest {
944
2079
  /** How the change is billed; unspecified is `create_prorations`. */
945
2080
  prorationBehavior?: ProrationBehavior;
946
2081
  }
2082
+ /** The request of UpdateMerchantAccount. */
2083
+ export interface UpdateMerchantAccountRequest {
2084
+ /** The merchant account with its new values; `name` selects it. */
2085
+ merchantAccount: MerchantAccount;
2086
+ /** The fields to change. */
2087
+ updateMask?: string;
2088
+ }
2089
+ /** The request of UpdateRevenueSource. */
2090
+ export interface UpdateRevenueSourceRequest {
2091
+ /** The source with its new values; `name` addresses it. */
2092
+ revenueSource: RevenueSource;
2093
+ /**
2094
+ * The fields to change: `spec.display_name`, `spec.paused`,
2095
+ * `spec.config`. Empty changes every one the body sets.
2096
+ */
2097
+ updateMask?: string;
2098
+ /** Validate only; write nothing. */
2099
+ validateOnly?: boolean;
2100
+ }
947
2101
  /** The request of UpdateStoreConnection. */
948
2102
  export interface UpdateStoreConnectionRequest {
949
2103
  /** The store connection to update; `name` identifies it. */
@@ -955,6 +2109,280 @@ export interface UpdateStoreConnectionRequest {
955
2109
  /** Validate and return the result without writing anything. */
956
2110
  validateOnly?: boolean;
957
2111
  }
2112
+ /** The request of UpdateUsageMeter. */
2113
+ export interface UpdateUsageMeterRequest {
2114
+ /** The usage meter with its new values; `name` selects it. */
2115
+ usageMeter: UsageMeter;
2116
+ /** The fields to change. */
2117
+ updateMask?: string;
2118
+ }
2119
+ /** The request of UpdateUsageSettings. */
2120
+ export interface UpdateUsageSettingsRequest {
2121
+ /** The usage settings with its new values; `name` selects it. */
2122
+ usageSettings: UsageSettings;
2123
+ /** The fields to change. */
2124
+ updateMask?: string;
2125
+ }
2126
+ /** The request of UpdateUsageTier. */
2127
+ export interface UpdateUsageTierRequest {
2128
+ /** The usage tier with its new values; `name` selects it. */
2129
+ usageTier: UsageTier;
2130
+ /** The fields to change. */
2131
+ updateMask?: string;
2132
+ }
2133
+ /**
2134
+ * A Usage Event is rated usage, immutable: what a settled reservation or a
2135
+ * direct record produced.
2136
+ */
2137
+ export interface UsageEvent {
2138
+ /** `orgs/{org}/projects/{project}/envs/{env}/usage_events/{usage_event}`. */
2139
+ name?: string;
2140
+ /** `uevt_<cell><ulid>`; never reused. */
2141
+ readonly uid?: string;
2142
+ /** Resource metadata. */
2143
+ meta?: common.ResourceMeta;
2144
+ /** Who used it. */
2145
+ subject?: Subject;
2146
+ /** As on UsageReservation. */
2147
+ subjectProof?: string;
2148
+ /** As on UsageReservation. */
2149
+ actorProof?: string;
2150
+ /** The meter's lookup key. */
2151
+ meter?: string;
2152
+ /** How much, in the meter's base unit. */
2153
+ quantity?: string;
2154
+ /** When the work happened. */
2155
+ occurredTime?: string;
2156
+ /** The rated amount, nano-minor, a decimal string. */
2157
+ readonly amountNano?: string;
2158
+ /** The reservation it settled, when it did. */
2159
+ readonly usageReservation?: string;
2160
+ /** Settled after the reservation expired; the usage is still recorded. */
2161
+ readonly late?: boolean;
2162
+ }
2163
+ /**
2164
+ * A Usage Invoice is Money's own invoice for a subject's usage. A `threshold`
2165
+ * invoice is cut mid-month; the `period` invoice nets those off.
2166
+ */
2167
+ export interface UsageInvoice {
2168
+ /** `orgs/{org}/projects/{project}/envs/{env}/usage_invoices/{usage_invoice}`. */
2169
+ name?: string;
2170
+ /** `uinv_<cell><ulid>`; never reused. */
2171
+ readonly uid?: string;
2172
+ /** Resource metadata. */
2173
+ meta?: common.ResourceMeta;
2174
+ /** The invoice number. */
2175
+ readonly number?: string;
2176
+ /** Who owes it. */
2177
+ readonly subject?: Subject;
2178
+ /** The month, `YYYY-MM`. */
2179
+ readonly period?: string;
2180
+ /** `period` or `threshold`. */
2181
+ readonly kind?: string;
2182
+ /** `tax_pending`, `issued`, or `void`. */
2183
+ readonly state?: string;
2184
+ /** Why it is not issued yet, when `tax_pending` (for example `location_required`, `grant_tax_treatment`). */
2185
+ readonly taxPendingReason?: string;
2186
+ /** The amounts, minor units, decimal strings. */
2187
+ readonly grossMinor?: string;
2188
+ /** Before tax. */
2189
+ readonly subtotalMinor?: string;
2190
+ /** The tax. */
2191
+ readonly taxMinor?: string;
2192
+ /** Credit settled after tax. */
2193
+ readonly postTaxCreditMinor?: string;
2194
+ /** What is owed: subtotal plus tax minus post-tax credit. */
2195
+ readonly totalMinor?: string;
2196
+ /** Paid so far. */
2197
+ readonly amountPaidMinor?: string;
2198
+ /** `standard` or `hold`, fixed at issue. */
2199
+ readonly collectionMode?: string;
2200
+ /** When it was issued. */
2201
+ readonly issueTime?: string;
2202
+ /** When it is due. */
2203
+ readonly dueTime?: string;
2204
+ }
2205
+ /**
2206
+ * A Usage Meter names one kind of usage a merchant bills for: its unit and
2207
+ * whether usage may be recorded without a reservation. The merchant creates
2208
+ * and changes it through this API; its prices are `UsageMeterPrice` records.
2209
+ */
2210
+ export interface UsageMeter {
2211
+ /** `orgs/{org}/projects/{project}/envs/{env}/usage_meters/{usage_meter}`; the id is the meter key. */
2212
+ name?: string;
2213
+ /** `umtr_<cell><ulid>`; never reused. */
2214
+ readonly uid?: string;
2215
+ /** Resource metadata. */
2216
+ meta?: common.ResourceMeta;
2217
+ /**
2218
+ * The unit of one quantity, for example `token`. It cannot change once the
2219
+ * meter has recorded usage.
2220
+ */
2221
+ unit?: string;
2222
+ /** A name for people. */
2223
+ displayName?: string;
2224
+ /** Whether usage may be recorded without a reservation. */
2225
+ reservationOptional?: boolean;
2226
+ /** A retired meter (false) refuses new usage; its history stays. */
2227
+ active?: boolean;
2228
+ /**
2229
+ * The unit price in force now, nano-minor, a decimal string; empty before
2230
+ * the meter's first price.
2231
+ */
2232
+ readonly currentUnitPriceNano?: string;
2233
+ }
2234
+ /**
2235
+ * A Usage Meter Price is one entry of a meter's append-only price history. A
2236
+ * price applies from `effective_time` on, so a change never rewrites usage
2237
+ * already rated.
2238
+ */
2239
+ export interface UsageMeterPrice {
2240
+ /** `orgs/{org}/projects/{project}/envs/{env}/usage_meter_prices/{usage_meter_price}`. */
2241
+ name?: string;
2242
+ /** `umpr_<cell><ulid>`; never reused. */
2243
+ readonly uid?: string;
2244
+ /** Resource metadata. */
2245
+ meta?: common.ResourceMeta;
2246
+ /** The meter's key. */
2247
+ meter?: string;
2248
+ /** ISO 4217; it must be the environment's currency. */
2249
+ currencyCode?: string;
2250
+ /** List price of one unit, nano-minor (a billionth of a minor unit), a decimal string. */
2251
+ unitPriceNano?: string;
2252
+ /**
2253
+ * When it starts applying; now when absent. Not in the past, and after the
2254
+ * meter's latest price.
2255
+ */
2256
+ effectiveTime?: string;
2257
+ /** The processor's tax code for the usage line; empty for the merchant's default. */
2258
+ taxCode?: string;
2259
+ }
2260
+ /**
2261
+ * A Usage Reservation holds usage before the work starts. Settling it records
2262
+ * what was used and releases the rest; releasing it records nothing.
2263
+ */
2264
+ export interface UsageReservation {
2265
+ /** `orgs/{org}/projects/{project}/envs/{env}/usage_reservations/{usage_reservation}`. */
2266
+ name?: string;
2267
+ /** `ures_<cell><ulid>`; never reused. */
2268
+ readonly uid?: string;
2269
+ /** Resource metadata. */
2270
+ meta?: common.ResourceMeta;
2271
+ /** Who uses it. */
2272
+ subject?: Subject;
2273
+ /**
2274
+ * The acting end user's access token, required on every reserve: Money
2275
+ * proves the subject itself, fresh, with the caller's own key
2276
+ * (`auth:sessions:verify`) or the merchant's configured issuer. Never
2277
+ * stored. A raw id is refused with PERMISSION_DENIED (reason `subject_unverified`).
2278
+ */
2279
+ subjectProof?: string;
2280
+ /**
2281
+ * For a customer organization: the token of the acting user, whose
2282
+ * membership of the organization is checked fresh. The subject is Sylphx
2283
+ * Auth's bare organization id (`acme`), never a resource name. Never stored.
2284
+ */
2285
+ actorProof?: string;
2286
+ /** The meter's lookup key. */
2287
+ meter?: string;
2288
+ /** The most the work may use, in the meter's base unit. */
2289
+ maxQuantity?: string;
2290
+ /** How long the hold lasts, at most `600s`; default `600s`. */
2291
+ ttl?: string;
2292
+ /** What was granted: at most `max_quantity`, less under headroom. */
2293
+ readonly grantedQuantity?: string;
2294
+ /** `held`, `settled`, or `released`. */
2295
+ readonly state?: string;
2296
+ /** When the hold ends. */
2297
+ readonly expireTime?: string;
2298
+ /**
2299
+ * While enforcement is dark: why it would have been refused
2300
+ * (`spend_limit_reached`, `no_payment_method`, `account_suspended`); empty otherwise.
2301
+ */
2302
+ readonly darkRefusal?: string;
2303
+ }
2304
+ /**
2305
+ * Usage Settings is the environment's usage-billing account: its currency, the
2306
+ * enforcement switch (dark until a merchant admin turns it on), the free
2307
+ * allowance, the dunning schedule and an extra token issuer. One per
2308
+ * environment (AIP-156 singleton, id `default`).
2309
+ */
2310
+ export interface UsageSettings {
2311
+ /** `orgs/{org}/projects/{project}/envs/{env}/usage_settings/default`. */
2312
+ name?: string;
2313
+ /** `uset_<cell><ulid>`; never reused. */
2314
+ readonly uid?: string;
2315
+ /** Resource metadata. */
2316
+ meta?: common.ResourceMeta;
2317
+ /** The currency usage is rated and invoiced in (ISO 4217, upper case). */
2318
+ currencyCode?: string;
2319
+ /**
2320
+ * While false a reservation is always granted and a would-be refusal is
2321
+ * only recorded. Off until the merchant's admin turns it on.
2322
+ */
2323
+ enforcementEnabled?: boolean;
2324
+ /**
2325
+ * What a subject with no payment method may use each month, nano-minor,
2326
+ * as a decimal string.
2327
+ */
2328
+ freeAllowanceNano?: string;
2329
+ /** Days after an invoice's due time before the subject is past due. */
2330
+ pastDueGraceDays?: number;
2331
+ /** Days after an invoice's due time before the subject is suspended. */
2332
+ suspendGraceDays?: number;
2333
+ /**
2334
+ * A further token issuer (the merchant's own OIDC provider) besides Sylphx
2335
+ * Auth; empty for Sylphx Auth only. It needs `extra_issuer_jwks_url`.
2336
+ */
2337
+ extraIssuer?: string;
2338
+ /** The issuer's HTTPS JWKS URL. */
2339
+ extraIssuerJwksUrl?: string;
2340
+ /** The audience that issuer's tokens must carry; required with `extra_issuer`. */
2341
+ extraIssuerAudience?: string;
2342
+ /**
2343
+ * The claim that names a customer organization in that issuer's tokens;
2344
+ * empty means the issuer proves no organization subject.
2345
+ */
2346
+ extraIssuerOrgClaim?: string;
2347
+ }
2348
+ /** A subject's standing. */
2349
+ export interface UsageStanding {
2350
+ /** `active`, `past_due`, or `suspended`. */
2351
+ state?: string;
2352
+ /** Whether a payment method is on file. */
2353
+ paymentMethodOnFile?: boolean;
2354
+ /**
2355
+ * What the subject may still use now, minor units, a decimal string; empty
2356
+ * when it has no limit.
2357
+ */
2358
+ headroomMinor?: string;
2359
+ /** The amount that makes a threshold invoice be cut, minor units. */
2360
+ thresholdMinor?: string;
2361
+ }
2362
+ /**
2363
+ * A Usage Tier is a trust tier of the merchant's own: the limits a subject
2364
+ * starts at and rises to with payment history. Rank 0 is the base tier.
2365
+ */
2366
+ export interface UsageTier {
2367
+ /** `orgs/{org}/projects/{project}/envs/{env}/usage_tiers/{usage_tier}`; the id is the tier key. */
2368
+ name?: string;
2369
+ /** `utier_<cell><ulid>`; never reused. */
2370
+ readonly uid?: string;
2371
+ /** Resource metadata. */
2372
+ meta?: common.ResourceMeta;
2373
+ /** Order of tiers; 0 is the base tier. */
2374
+ rank?: number;
2375
+ /** Daily exposure limit in minor units, a decimal string; empty for none. */
2376
+ dailyLimitMinor?: string;
2377
+ /** Monthly exposure limit in minor units, a decimal string; empty for none. */
2378
+ monthlyLimitMinor?: string;
2379
+ /** The amount an invoice would make due at which a threshold invoice is cut. */
2380
+ thresholdMinor?: string;
2381
+ /** Paid invoices needed to reach this tier. */
2382
+ requiresPaidInvoices?: number;
2383
+ /** Paid total, minor units, needed to reach this tier. */
2384
+ requiresPaidMinor?: string;
2385
+ }
958
2386
  /** The request of VerifyStorePurchase. */
959
2387
  export interface VerifyStorePurchaseRequest {
960
2388
  /** The environment the purchase is verified in. */
@@ -971,6 +2399,15 @@ export interface VerifyStorePurchaseRequest {
971
2399
  productId?: string;
972
2400
  /** Google Play: the package name, when the connection covers several. */
973
2401
  packageName?: string;
2402
+ /**
2403
+ * Verify fully and return the verdict Money would give, without writing
2404
+ * anything: no record, no subject binding, no Google Play acknowledge or
2405
+ * consume, no entitlement, no ledger posting, no event, and no signed
2406
+ * `grant_token`. Refusals are exactly the ones a real call gives. For
2407
+ * moving existing store sales onto Money, by comparing verdicts with the
2408
+ * seller's own path before switching.
2409
+ */
2410
+ validateOnly?: boolean;
974
2411
  /**
975
2412
  * App Store, instead of `signed_transaction`: the transaction id, for apps
976
2413
  * on original StoreKit whose receipts carry no signed transaction. Money
@@ -998,6 +2435,22 @@ export interface VerifyStorePurchaseResponse {
998
2435
  alreadyVerified?: boolean;
999
2436
  /** The subscription, for a subscription purchase. */
1000
2437
  customerSubscription?: CustomerSubscription;
2438
+ /**
2439
+ * With `validate_only`, the claims the grant would carry (the same JSON a
2440
+ * signed `grant_token` holds); empty otherwise.
2441
+ */
2442
+ grantClaims?: Record<string, unknown>;
2443
+ /**
2444
+ * `ClientVerifyStorePurchase` only: what Money did to finish the purchase
2445
+ * with the store: `acknowledged`, `consumed`, or `retry` (the store call
2446
+ * failed; call again later). Empty on `VerifyStorePurchase`.
2447
+ */
2448
+ storeCompletion?: string;
2449
+ /**
2450
+ * `ClientVerifyStorePurchase` only: the purchase moved from another install
2451
+ * to the caller (restore). Always false until restore transfer is served.
2452
+ */
2453
+ transferred?: boolean;
1001
2454
  }
1002
2455
  /** FeatureKind is how a feature is granted. */
1003
2456
  export type FeatureKind = 'boolean' | 'limit' | (string & {});
@@ -1019,6 +2472,8 @@ export type ProrationBehavior = 'create_prorations' | 'none' | 'always_invoice'
1019
2472
  export declare class MoneyApi {
1020
2473
  /** The `price_catalogs` collection. */
1021
2474
  readonly priceCatalogs: PriceCatalogsCollection;
2475
+ /** The `checkout_policies` collection. */
2476
+ readonly checkoutPolicies: CheckoutPoliciesCollection;
1022
2477
  /** The `store_connections` collection. */
1023
2478
  readonly storeConnections: StoreConnectionsCollection;
1024
2479
  /** The `store_purchases` collection. */
@@ -1031,12 +2486,38 @@ export declare class MoneyApi {
1031
2486
  readonly merchantAccounts: MerchantAccountsCollection;
1032
2487
  /** The `checkout_sessions` collection. */
1033
2488
  readonly checkoutSessions: CheckoutSessionsCollection;
2489
+ /** The `tax_threshold_statuses` collection. */
2490
+ readonly taxThresholdStatuses: TaxThresholdStatusesCollection;
1034
2491
  /** The `portal_sessions` collection. */
1035
2492
  readonly portalSessions: PortalSessionsCollection;
1036
2493
  /** The `licence_keys` collection. */
1037
2494
  readonly licenceKeys: LicenceKeysCollection;
1038
2495
  /** The `licence_tokens` collection. */
1039
2496
  readonly licenceTokens: LicenceTokensCollection;
2497
+ /** The `usage_settings` collection. */
2498
+ readonly usageSettings: UsageSettingsCollection;
2499
+ /** The `usage_tiers` collection. */
2500
+ readonly usageTiers: UsageTiersCollection;
2501
+ /** The `usage_reservations` collection. */
2502
+ readonly usageReservations: UsageReservationsCollection;
2503
+ /** The `usage_events` collection. */
2504
+ readonly usageEvents: UsageEventsCollection;
2505
+ /** The `credit_grants` collection. */
2506
+ readonly creditGrants: CreditGrantsCollection;
2507
+ /** The `usage_invoices` collection. */
2508
+ readonly usageInvoices: UsageInvoicesCollection;
2509
+ /** The `usage_meters` collection. */
2510
+ readonly usageMeters: UsageMetersCollection;
2511
+ /** The `usage_meter_prices` collection. */
2512
+ readonly usageMeterPrices: UsageMeterPricesCollection;
2513
+ /** The `revenue_sources` collection. */
2514
+ readonly revenueSources: RevenueSourcesCollection;
2515
+ /** The `revenue` collection. */
2516
+ readonly revenue: RevenueCollection;
2517
+ /** The `revenue_facts` collection. */
2518
+ readonly revenueFacts: RevenueFactsCollection;
2519
+ /** The `exchange_rates` collection. */
2520
+ readonly exchangeRates: ExchangeRatesCollection;
1040
2521
  constructor(client: runtime.Client);
1041
2522
  }
1042
2523
  /** `price_catalogs` of Sylphx Money: Resource type `money.sylphx.com/PriceCatalog`. */
@@ -1069,6 +2550,28 @@ export declare class PriceCatalogsCollection {
1069
2550
  */
1070
2551
  sync(request: SyncCatalogRequest): Promise<Catalog>;
1071
2552
  }
2553
+ /** `checkout_policies` of Sylphx Money: Resource type `money.sylphx.com/CheckoutPolicy`. */
2554
+ export declare class CheckoutPoliciesCollection {
2555
+ private readonly client;
2556
+ constructor(client: runtime.Client);
2557
+ /**
2558
+ * Gets the environment's checkout policy: which buyer countries consumer
2559
+ * checkout refuses. An environment that never wrote one refuses none.
2560
+ *
2561
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:read` · effect `read`
2562
+ *
2563
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
2564
+ */
2565
+ get(request: GetCheckoutPolicyRequest): Promise<CheckoutPolicy>;
2566
+ /**
2567
+ * Updates the environment's checkout policy, whole.
2568
+ *
2569
+ * `PATCH /v1/{checkout_policy.name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:write` · effect `write`
2570
+ *
2571
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
2572
+ */
2573
+ update(request: UpdateCheckoutPolicyRequest): Promise<CheckoutPolicy>;
2574
+ }
1072
2575
  /** `store_connections` of Sylphx Money: Resource type `money.sylphx.com/StoreConnection`. */
1073
2576
  export declare class StoreConnectionsCollection {
1074
2577
  private readonly client;
@@ -1131,6 +2634,19 @@ export declare class StorePurchasesCollection {
1131
2634
  * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_IN_USE`, `UNAVAILABLE`.
1132
2635
  */
1133
2636
  verify(request: VerifyStorePurchaseRequest): Promise<VerifyStorePurchaseResponse>;
2637
+ /**
2638
+ * Verifies a store purchase for an app with no server: called with the
2639
+ * environment's publishable key (`billing:client`), the subject is an
2640
+ * install id (`inst_` and a UUID), and Money completes the purchase with the
2641
+ * store (acknowledges or consumes it) so the app never calls the store's
2642
+ * server API. Works only on store connections that set `client_verify`.
2643
+ * Re-calling returns the same record and grant.
2644
+ *
2645
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/store_purchases:clientVerify` · permission `billing:client` · effect `write`
2646
+ *
2647
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_IN_USE`, `RATE_LIMITED`, `UNAVAILABLE`.
2648
+ */
2649
+ clientVerify(request: ClientVerifyStorePurchaseRequest): Promise<VerifyStorePurchaseResponse>;
1134
2650
  /**
1135
2651
  * Gets a store purchase.
1136
2652
  *
@@ -1226,15 +2742,25 @@ export declare class EntitlementGrantsCollection {
1226
2742
  */
1227
2743
  get(request: GetEntitlementGrantRequest): Promise<EntitlementGrant>;
1228
2744
  /**
1229
- * Lists entitlement grants.
2745
+ * Lists entitlement grants. Continuation tokens reject collection changes
2746
+ * with ETAG_MISMATCH; restart without a page token after a conflict.
1230
2747
  *
1231
2748
  * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants` · permission `billing:read` · effect `read`
1232
2749
  *
1233
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
2750
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `ETAG_MISMATCH`.
1234
2751
  */
1235
2752
  list(request: ListEntitlementGrantsRequest): Promise<ListEntitlementGrantsResponse>;
1236
2753
  /** Every item of every page of `list`. */
1237
2754
  listAll(request: ListEntitlementGrantsRequest): AsyncGenerator<EntitlementGrant>;
2755
+ /**
2756
+ * Reads a coherent entitlement snapshot with an environment-wide source
2757
+ * revision. Discard every page and restart after ETAG_MISMATCH.
2758
+ *
2759
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants:snapshot` · permission `billing:read` · effect `read`
2760
+ *
2761
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `ETAG_MISMATCH`.
2762
+ */
2763
+ snapshot(request: SnapshotEntitlementGrantsRequest): Promise<SnapshotEntitlementGrantsResponse>;
1238
2764
  /**
1239
2765
  * Answers whether a subject holds a feature now, and how much of it.
1240
2766
  *
@@ -1243,6 +2769,21 @@ export declare class EntitlementGrantsCollection {
1243
2769
  * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
1244
2770
  */
1245
2771
  check(request: CheckEntitlementRequest): Promise<CheckEntitlementResponse>;
2772
+ /**
2773
+ * Creates a manual entitlement grant (support, comp, grace). Append-only.
2774
+ * The subject decides what it needs: an end user the env's Sylphx Auth
2775
+ * stamped as a born-synthetic test account gets a test grant (`test/<id>`,
2776
+ * at most 90 days, approval_ref set by the server) with
2777
+ * `billing:test_grants:write`; any other subject needs the approval-class
2778
+ * `billing:credits.approve` and is refused PERMISSION_DENIED
2779
+ * (`subject_not_synthetic`) otherwise. The approver recorded is the key's
2780
+ * principal.
2781
+ *
2782
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants` · permission `billing:test_grants:write` · effect `write`
2783
+ *
2784
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `RESOURCE_ALREADY_EXISTS`, `UNAVAILABLE`.
2785
+ */
2786
+ create(request: CreateEntitlementGrantRequest): Promise<EntitlementGrant>;
1246
2787
  }
1247
2788
  /** `merchant_accounts` of Sylphx Money: Resource type `money.sylphx.com/MerchantAccount`. */
1248
2789
  export declare class MerchantAccountsCollection {
@@ -1293,6 +2834,14 @@ export declare class MerchantAccountsCollection {
1293
2834
  * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
1294
2835
  */
1295
2836
  disconnect(request: DisconnectMerchantAccountRequest): Promise<MerchantAccount>;
2837
+ /**
2838
+ * Updates the merchant account's own settings: the fields named in `update_mask`.
2839
+ *
2840
+ * `PATCH /v1/{merchant_account.name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:write` · effect `write`
2841
+ *
2842
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
2843
+ */
2844
+ update(request: UpdateMerchantAccountRequest): Promise<MerchantAccount>;
1296
2845
  }
1297
2846
  /** `checkout_sessions` of Sylphx Money: Resource type `money.sylphx.com/CheckoutSession`. */
1298
2847
  export declare class CheckoutSessionsCollection {
@@ -1314,6 +2863,39 @@ export declare class CheckoutSessionsCollection {
1314
2863
  * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1315
2864
  */
1316
2865
  get(request: GetCheckoutSessionRequest): Promise<CheckoutSession>;
2866
+ /**
2867
+ * Expires an open hosted checkout so it can no longer be paid.
2868
+ *
2869
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_sessions/*}:expire` · permission `billing:write` · effect `write`
2870
+ *
2871
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `UNAVAILABLE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
2872
+ */
2873
+ expire(request: ExpireCheckoutSessionRequest): Promise<CheckoutSession>;
2874
+ /**
2875
+ * Refund all or part of a paid one-time checkout.
2876
+ *
2877
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_sessions/*}:refund` · permission `billing:write` · effect `write`
2878
+ *
2879
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `UNAVAILABLE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
2880
+ */
2881
+ refund(request: RefundCheckoutSessionRequest): Promise<RefundCheckoutSessionResponse>;
2882
+ }
2883
+ /** `tax_threshold_statuses` of Sylphx Money: Resource type `money.sylphx.com/TaxThresholdStatus`. */
2884
+ export declare class TaxThresholdStatusesCollection {
2885
+ private readonly client;
2886
+ constructor(client: runtime.Client);
2887
+ /**
2888
+ * Lists where the environment's consumer sales stand against each
2889
+ * jurisdiction's digital-services tax registration threshold, per its own
2890
+ * window. EU and UK have no threshold and are not tracked.
2891
+ *
2892
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/tax_threshold_statuses` · permission `billing:read` · effect `read`
2893
+ *
2894
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
2895
+ */
2896
+ list(request: ListTaxThresholdStatusesRequest): Promise<ListTaxThresholdStatusesResponse>;
2897
+ /** Every item of every page of `list`. */
2898
+ listAll(request: ListTaxThresholdStatusesRequest): AsyncGenerator<TaxThresholdStatus>;
1317
2899
  }
1318
2900
  /** `portal_sessions` of Sylphx Money: Resource type `money.sylphx.com/PortalSession`. */
1319
2901
  export declare class PortalSessionsCollection {
@@ -1404,3 +2986,357 @@ export declare class LicenceTokensCollection {
1404
2986
  /** Every item of every page of `list`. */
1405
2987
  listAll(request: ListLicenceTokensRequest): AsyncGenerator<LicenceToken>;
1406
2988
  }
2989
+ /** `usage_settings` of Sylphx Money: Resource type `money.sylphx.com/UsageSettings`. */
2990
+ export declare class UsageSettingsCollection {
2991
+ private readonly client;
2992
+ constructor(client: runtime.Client);
2993
+ /**
2994
+ * Gets the environment's usage settings.
2995
+ *
2996
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:read` · effect `read`
2997
+ *
2998
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
2999
+ */
3000
+ get(request: GetUsageSettingsRequest): Promise<UsageSettings>;
3001
+ /**
3002
+ * Updates the usage settings, the enforcement switch included. A change is recorded with who made it.
3003
+ *
3004
+ * `PATCH /v1/{usage_settings.name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:write` · effect `write`
3005
+ *
3006
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3007
+ */
3008
+ update(request: UpdateUsageSettingsRequest): Promise<UsageSettings>;
3009
+ }
3010
+ /** `usage_tiers` of Sylphx Money: Resource type `money.sylphx.com/UsageTier`. */
3011
+ export declare class UsageTiersCollection {
3012
+ private readonly client;
3013
+ constructor(client: runtime.Client);
3014
+ /**
3015
+ * Lists usage tiers.
3016
+ *
3017
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_tiers` · permission `billing:read` · effect `read`
3018
+ *
3019
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3020
+ */
3021
+ list(request: ListUsageTiersRequest): Promise<ListUsageTiersResponse>;
3022
+ /** Every item of every page of `list`. */
3023
+ listAll(request: ListUsageTiersRequest): AsyncGenerator<UsageTier>;
3024
+ /**
3025
+ * Creates or updates a usage tier.
3026
+ *
3027
+ * `PATCH /v1/{usage_tier.name=orgs/*\/projects/*\/envs/*\/usage_tiers/*}` · permission `billing:write` · effect `write`
3028
+ *
3029
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3030
+ */
3031
+ update(request: UpdateUsageTierRequest): Promise<UsageTier>;
3032
+ }
3033
+ /** `usage_reservations` of Sylphx Money: Resource type `money.sylphx.com/UsageReservation`. */
3034
+ export declare class UsageReservationsCollection {
3035
+ private readonly client;
3036
+ constructor(client: runtime.Client);
3037
+ /**
3038
+ * Reserves usage before the work starts. Refused with PLAN_LIMIT_REACHED (spend limit, no payment method) or INVALID_STATE (suspended) only while enforcement is on; while it is dark the reservation is granted and the refusal is recorded.
3039
+ *
3040
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_reservations` · permission `billing:metering:write` · effect `write`
3041
+ *
3042
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `PLAN_LIMIT_REACHED`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNAVAILABLE`.
3043
+ */
3044
+ create(request: CreateUsageReservationRequest): Promise<UsageReservation>;
3045
+ /**
3046
+ * Gets a usage reservation.
3047
+ *
3048
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}` · permission `billing:read` · effect `read`
3049
+ *
3050
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
3051
+ */
3052
+ get(request: GetUsageReservationRequest): Promise<UsageReservation>;
3053
+ /**
3054
+ * Settles a reservation with what was used; the unused part returns to headroom. A settle after expiry still records the usage.
3055
+ *
3056
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:settle` · permission `billing:metering:write` · effect `write`
3057
+ *
3058
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3059
+ */
3060
+ settle(request: SettleUsageReservationRequest): Promise<UsageEvent>;
3061
+ /**
3062
+ * Releases a reservation that used nothing.
3063
+ *
3064
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:release` · permission `billing:metering:write` · effect `write`
3065
+ *
3066
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3067
+ */
3068
+ release(request: ReleaseUsageReservationRequest): Promise<UsageReservation>;
3069
+ }
3070
+ /** `usage_events` of Sylphx Money: Resource type `money.sylphx.com/UsageEvent`. */
3071
+ export declare class UsageEventsCollection {
3072
+ private readonly client;
3073
+ constructor(client: runtime.Client);
3074
+ /**
3075
+ * Records usage directly, only for a meter the merchant marked reservation-optional.
3076
+ *
3077
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:metering:write` · effect `write`
3078
+ *
3079
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3080
+ */
3081
+ create(request: CreateUsageEventRequest): Promise<UsageEvent>;
3082
+ /**
3083
+ * Records a batch of already-incurred usage from the merchant's own servers
3084
+ * (Stripe's meter-event model): the caller is a key of the merchant's own org
3085
+ * holding the exact grant `billing:metering:ingest`, which no wildcard covers,
3086
+ * and each event names its subject with no subject proof. Each event is keyed
3087
+ * by its project, meter, meter version and event id: a replay is a no-op
3088
+ * (`duplicate`), and the same key with different content is a `conflict` and
3089
+ * never counted. One result per event, in request order.
3090
+ *
3091
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:batchIngest` · permission `billing:metering:ingest` · effect `write`
3092
+ *
3093
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`.
3094
+ */
3095
+ batchIngest(request: BatchIngestUsageEventsRequest): Promise<BatchIngestUsageEventsResponse>;
3096
+ /**
3097
+ * Lists usage events, newest first.
3098
+ *
3099
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:read` · effect `read`
3100
+ *
3101
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3102
+ */
3103
+ list(request: ListUsageEventsRequest): Promise<ListUsageEventsResponse>;
3104
+ /** Every item of every page of `list`. */
3105
+ listAll(request: ListUsageEventsRequest): AsyncGenerator<UsageEvent>;
3106
+ /**
3107
+ * Reads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.
3108
+ *
3109
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:checkStanding` · permission `billing:read` · effect `read`
3110
+ *
3111
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
3112
+ */
3113
+ checkStanding(request: CheckUsageStandingRequest): Promise<UsageStanding>;
3114
+ }
3115
+ /** `credit_grants` of Sylphx Money: Resource type `money.sylphx.com/CreditGrant`. */
3116
+ export declare class CreditGrantsCollection {
3117
+ private readonly client;
3118
+ constructor(client: runtime.Client);
3119
+ /**
3120
+ * Gives a subject credit. Append-only: a change is a new grant that supersedes the old. Refused with INVALID_STATE (`tax_treatment_unsupported`) for `post_tax_settlement` while the merchant has automatic tax on.
3121
+ *
3122
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:credits.approve` · effect `write`
3123
+ *
3124
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3125
+ */
3126
+ create(request: CreateCreditGrantRequest): Promise<CreditGrant>;
3127
+ /**
3128
+ * Gets a credit grant.
3129
+ *
3130
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/credit_grants/*}` · permission `billing:read` · effect `read`
3131
+ *
3132
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
3133
+ */
3134
+ get(request: GetCreditGrantRequest): Promise<CreditGrant>;
3135
+ /**
3136
+ * Lists credit grants.
3137
+ *
3138
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:read` · effect `read`
3139
+ *
3140
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3141
+ */
3142
+ list(request: ListCreditGrantsRequest): Promise<ListCreditGrantsResponse>;
3143
+ /** Every item of every page of `list`. */
3144
+ listAll(request: ListCreditGrantsRequest): AsyncGenerator<CreditGrant>;
3145
+ }
3146
+ /** `usage_invoices` of Sylphx Money: Resource type `money.sylphx.com/UsageInvoice`. */
3147
+ export declare class UsageInvoicesCollection {
3148
+ private readonly client;
3149
+ constructor(client: runtime.Client);
3150
+ /**
3151
+ * Gets a usage invoice.
3152
+ *
3153
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}` · permission `billing:read` · effect `read`
3154
+ *
3155
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
3156
+ */
3157
+ get(request: GetUsageInvoiceRequest): Promise<UsageInvoice>;
3158
+ /**
3159
+ * Lists usage invoices, newest first.
3160
+ *
3161
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_invoices` · permission `billing:read` · effect `read`
3162
+ *
3163
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3164
+ */
3165
+ list(request: ListUsageInvoicesRequest): Promise<ListUsageInvoicesResponse>;
3166
+ /** Every item of every page of `list`. */
3167
+ listAll(request: ListUsageInvoicesRequest): AsyncGenerator<UsageInvoice>;
3168
+ /**
3169
+ * Releases a held invoice for collection, audited with who and why. Grant expiry or replacement never does.
3170
+ *
3171
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}:releaseCollection` · permission `billing:credits.approve` · effect `write`
3172
+ *
3173
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3174
+ */
3175
+ releaseCollection(request: ReleaseUsageInvoiceCollectionRequest): Promise<UsageInvoice>;
3176
+ }
3177
+ /** `usage_meters` of Sylphx Money: Resource type `money.sylphx.com/UsageMeter`. */
3178
+ export declare class UsageMetersCollection {
3179
+ private readonly client;
3180
+ constructor(client: runtime.Client);
3181
+ /**
3182
+ * Gets a usage meter.
3183
+ *
3184
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:read` · effect `read`
3185
+ *
3186
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
3187
+ */
3188
+ get(request: GetUsageMeterRequest): Promise<UsageMeter>;
3189
+ /**
3190
+ * Lists usage meters.
3191
+ *
3192
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meters` · permission `billing:read` · effect `read`
3193
+ *
3194
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3195
+ */
3196
+ list(request: ListUsageMetersRequest): Promise<ListUsageMetersResponse>;
3197
+ /** Every item of every page of `list`. */
3198
+ listAll(request: ListUsageMetersRequest): AsyncGenerator<UsageMeter>;
3199
+ /**
3200
+ * Creates or updates a usage meter. The unit cannot change once it has recorded usage.
3201
+ *
3202
+ * `PATCH /v1/{usage_meter.name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:write` · effect `write`
3203
+ *
3204
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3205
+ */
3206
+ update(request: UpdateUsageMeterRequest): Promise<UsageMeter>;
3207
+ }
3208
+ /** `usage_meter_prices` of Sylphx Money: Resource type `money.sylphx.com/UsageMeterPrice`. */
3209
+ export declare class UsageMeterPricesCollection {
3210
+ private readonly client;
3211
+ constructor(client: runtime.Client);
3212
+ /**
3213
+ * Appends a price to a meter's history. It applies from its effective time on and never rewrites usage already rated.
3214
+ *
3215
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:write` · effect `write`
3216
+ *
3217
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3218
+ */
3219
+ create(request: CreateUsageMeterPriceRequest): Promise<UsageMeterPrice>;
3220
+ /**
3221
+ * Lists meter prices, newest first; filter by `meter`.
3222
+ *
3223
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:read` · effect `read`
3224
+ *
3225
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3226
+ */
3227
+ list(request: ListUsageMeterPricesRequest): Promise<ListUsageMeterPricesResponse>;
3228
+ /** Every item of every page of `list`. */
3229
+ listAll(request: ListUsageMeterPricesRequest): AsyncGenerator<UsageMeterPrice>;
3230
+ }
3231
+ /** `revenue_sources` of Sylphx Money: Resource type `money.sylphx.com/RevenueSource`. */
3232
+ export declare class RevenueSourcesCollection {
3233
+ private readonly client;
3234
+ constructor(client: runtime.Client);
3235
+ /**
3236
+ * Gets a revenue source, with its freshness. Revenue reporting
3237
+ * (docs/adr/ADR-01M40HRQT0VSXZ1WANP8M318F2) is org-wide: `revenue:read` or
3238
+ * `revenue:write`, held by an org-wide key or an org owner's or admin's
3239
+ * session only; a project or environment key is refused.
3240
+ *
3241
+ * `GET /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:read` · effect `read`
3242
+ *
3243
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
3244
+ */
3245
+ get(request: GetRevenueSourceRequest): Promise<RevenueSource>;
3246
+ /**
3247
+ * Lists the org's revenue sources, with their freshness.
3248
+ *
3249
+ * `GET /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:read` · effect `read`
3250
+ *
3251
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3252
+ */
3253
+ list(request: ListRevenueSourcesRequest): Promise<ListRevenueSourcesResponse>;
3254
+ /** Every item of every page of `list`. */
3255
+ listAll(request: ListRevenueSourcesRequest): AsyncGenerator<RevenueSource>;
3256
+ /**
3257
+ * Registers a revenue source. The `money` source is implicit and never
3258
+ * created here.
3259
+ *
3260
+ * `POST /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:write` · effect `write`
3261
+ *
3262
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3263
+ */
3264
+ create(request: CreateRevenueSourceRequest): Promise<RevenueSource>;
3265
+ /**
3266
+ * Renames, pauses or resumes a revenue source, or changes its settings.
3267
+ *
3268
+ * `PATCH /v1/{revenue_source.name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `write`
3269
+ *
3270
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3271
+ */
3272
+ update(request: UpdateRevenueSourceRequest): Promise<RevenueSource>;
3273
+ /**
3274
+ * Deletes a revenue source and the facts it reported. The `money` source
3275
+ * cannot be deleted; pause it instead.
3276
+ *
3277
+ * `DELETE /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `destructive`
3278
+ *
3279
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3280
+ */
3281
+ delete(request: DeleteRevenueSourceRequest): Promise<Record<string, never>>;
3282
+ /**
3283
+ * Syncs a revenue source now, or backfills a period. A `money` source
3284
+ * fills any booked fact its environment's ledger holds and the facts lack;
3285
+ * a paused source, or one whose connector has not shipped yet, is refused
3286
+ * (`INVALID_STATE`).
3287
+ *
3288
+ * `POST /v1/{name=orgs/*\/revenue_sources/*}:run` · permission `revenue:write` · effect `write`
3289
+ *
3290
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
3291
+ */
3292
+ run(request: RunRevenueSourceRequest): Promise<RunRevenueSourceResponse>;
3293
+ }
3294
+ /** `revenue` of Sylphx Money: Resource type `money.sylphx.com/RevenueSummary`. */
3295
+ export declare class RevenueCollection {
3296
+ private readonly client;
3297
+ constructor(client: runtime.Client);
3298
+ /**
3299
+ * Gets the org's revenue over a period: totals by day or month, split by
3300
+ * source or product, gross or net, in one reporting currency, with the
3301
+ * basis of each bucket, the sources that report late, and what has no
3302
+ * rate yet. Reads only the daily roll-up, bounded by a 5 second statement
3303
+ * timeout. For example `sylphx money revenue summary --period mtd
3304
+ * --split source`.
3305
+ *
3306
+ * `GET /v1/{name=orgs/*\/revenue}` · permission `revenue:read` · effect `read`
3307
+ *
3308
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `UNAVAILABLE`.
3309
+ */
3310
+ get(request: GetRevenueSummaryRequest): Promise<RevenueSummary>;
3311
+ }
3312
+ /** `revenue_facts` of Sylphx Money: Resource type `money.sylphx.com/RevenueFact`. */
3313
+ export declare class RevenueFactsCollection {
3314
+ private readonly client;
3315
+ constructor(client: runtime.Client);
3316
+ /**
3317
+ * Lists the org's revenue facts, newest day first, for audit and export.
3318
+ *
3319
+ * `GET /v1/{parent=orgs/*}/revenue_facts` · permission `revenue:read` · effect `read`
3320
+ *
3321
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `UNAVAILABLE`.
3322
+ */
3323
+ list(request: ListRevenueFactsRequest): Promise<ListRevenueFactsResponse>;
3324
+ /** Every item of every page of `list`. */
3325
+ listAll(request: ListRevenueFactsRequest): AsyncGenerator<RevenueFact>;
3326
+ }
3327
+ /** `exchange_rates` of Sylphx Money: Resource type `money.sylphx.com/ExchangeRate`. */
3328
+ export declare class ExchangeRatesCollection {
3329
+ private readonly client;
3330
+ constructor(client: runtime.Client);
3331
+ /**
3332
+ * Lists the exchange rates Money converts at (units per US dollar by day),
3333
+ * for any reader that converts revenue.
3334
+ *
3335
+ * `GET /v1/{parent=orgs/*}/exchange_rates` · permission `revenue:read` · effect `read`
3336
+ *
3337
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
3338
+ */
3339
+ list(request: ListExchangeRatesRequest): Promise<ListExchangeRatesResponse>;
3340
+ /** Every item of every page of `list`. */
3341
+ listAll(request: ListExchangeRatesRequest): AsyncGenerator<ExchangeRate>;
3342
+ }