@sylphx/sdk 0.31.0 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -4
- package/dist/access.d.ts +146 -17
- package/dist/access.js +114 -8
- package/dist/access.js.map +1 -1
- package/dist/agents.d.ts +1564 -0
- package/dist/agents.js +1096 -0
- package/dist/agents.js.map +1 -0
- package/dist/ai.d.ts +1 -2
- package/dist/ai.js +2 -3
- package/dist/ai.js.map +1 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +2 -2
- package/dist/assets.d.ts +447 -0
- package/dist/assets.js +266 -0
- package/dist/assets.js.map +1 -0
- package/dist/auth/client.d.ts +239 -0
- package/dist/auth/client.js +337 -0
- package/dist/auth/client.js.map +1 -0
- package/dist/auth/end-user-keys-mock.d.ts +83 -0
- package/dist/auth/end-user-keys-mock.js +427 -0
- package/dist/auth/end-user-keys-mock.js.map +1 -0
- package/dist/auth/end-user-keys.d.ts +219 -0
- package/dist/auth/end-user-keys.js +240 -0
- package/dist/auth/end-user-keys.js.map +1 -0
- package/dist/auth/verify.d.ts +38 -3
- package/dist/auth/verify.js +58 -8
- package/dist/auth/verify.js.map +1 -1
- package/dist/auth.d.ts +656 -9
- package/dist/auth.js +563 -6
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +99 -21
- package/dist/billing.js +43 -5
- package/dist/billing.js.map +1 -1
- package/dist/broker.d.ts +5 -4
- package/dist/broker.js +3 -3
- package/dist/broker.js.map +1 -1
- package/dist/build.d.ts +362 -29
- package/dist/build.js +302 -10
- package/dist/build.js.map +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.d.ts +140 -0
- package/dist/config/flags.js +462 -0
- package/dist/config/flags.js.map +1 -0
- package/dist/config.d.ts +380 -15
- package/dist/config.js +283 -5
- package/dist/config.js.map +1 -1
- package/dist/connections.d.ts +6 -6
- package/dist/connections.js +3 -3
- package/dist/data.d.ts +612 -7
- package/dist/data.js +566 -4
- package/dist/data.js.map +1 -1
- package/dist/entitlement.d.ts +10 -8
- package/dist/entitlement.js +3 -4
- package/dist/entitlement.js.map +1 -1
- package/dist/events/realtime.d.ts +69 -0
- package/dist/events/realtime.js +107 -0
- package/dist/events/realtime.js.map +1 -0
- package/dist/events/webhooks.d.ts +40 -0
- package/dist/events/webhooks.js +110 -0
- package/dist/events/webhooks.js.map +1 -0
- package/dist/events.d.ts +369 -22
- package/dist/events.js +311 -8
- package/dist/events.js.map +1 -1
- package/dist/flags.d.ts +18 -0
- package/dist/flags.js +44 -0
- package/dist/flags.js.map +1 -0
- package/dist/hosting.d.ts +13 -14
- package/dist/hosting.js +3 -4
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +987 -0
- package/dist/ids.js +317 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +25 -1
- package/dist/index.js +34 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts +2 -2
- package/dist/keys.js +3 -3
- package/dist/knowledge.d.ts +1192 -0
- package/dist/knowledge.js +1002 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/localization.d.ts +663 -0
- package/dist/localization.js +491 -0
- package/dist/localization.js.map +1 -0
- package/dist/methods.js +3251 -133
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +3086 -0
- package/dist/money.js +2358 -0
- package/dist/money.js.map +1 -0
- package/dist/network.d.ts +4 -5
- package/dist/network.js +3 -4
- package/dist/network.js.map +1 -1
- package/dist/notify.d.ts +667 -125
- package/dist/notify.js +471 -73
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +322 -7
- package/dist/observability.js +244 -8
- package/dist/observability.js.map +1 -1
- package/dist/realtime.d.ts +404 -0
- package/dist/realtime.js +312 -0
- package/dist/realtime.js.map +1 -0
- package/dist/release.d.ts +14 -15
- package/dist/release.js +3 -4
- package/dist/release.js.map +1 -1
- package/dist/runners.d.ts +2 -3
- package/dist/runners.js +3 -4
- package/dist/runners.js.map +1 -1
- package/dist/runtime.d.ts +5 -1
- package/dist/runtime.js +7 -3
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes.d.ts +64 -20
- package/dist/sandboxes.js +9 -4
- package/dist/sandboxes.js.map +1 -1
- package/dist/secrets.d.ts +342 -6
- package/dist/secrets.js +271 -4
- package/dist/secrets.js.map +1 -1
- package/dist/workflows.d.ts +969 -15
- package/dist/workflows.js +815 -6
- package/dist/workflows.js.map +1 -1
- package/package.json +2 -2
package/dist/money.d.ts
ADDED
|
@@ -0,0 +1,3086 @@
|
|
|
1
|
+
import * as runtime from './runtime.js';
|
|
2
|
+
import './common.js';
|
|
3
|
+
import type * as common from './common.js';
|
|
4
|
+
/** AppStoreConnection is an App Store Server API key and the app's bundle ids. */
|
|
5
|
+
export interface AppStoreConnection {
|
|
6
|
+
/** The apps' bundle ids. */
|
|
7
|
+
bundleIds?: string[];
|
|
8
|
+
/** The App Store Connect issuer id. */
|
|
9
|
+
issuerId?: string;
|
|
10
|
+
/** The In-App Purchase key id. */
|
|
11
|
+
keyId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The In-App Purchase key (`.p8` PEM). Write-only: sealed on write, never
|
|
14
|
+
* returned; omit it on update to keep the stored key.
|
|
15
|
+
*/
|
|
16
|
+
privateKey?: string;
|
|
17
|
+
/** The app's Apple id: when set, production notifications must carry it. */
|
|
18
|
+
appAppleId?: string;
|
|
19
|
+
/**
|
|
20
|
+
* An earlier `appAccountToken` scheme the app's shipped builds use: the
|
|
21
|
+
* token is UUIDv5 in the URL namespace of this prefix followed by the
|
|
22
|
+
* subject id (for example `https://accounts.example.com/v2/`). Tokens in
|
|
23
|
+
* Money's own scheme are always accepted as well.
|
|
24
|
+
*/
|
|
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
|
+
/** The request of CancelCustomerSubscription. */
|
|
49
|
+
export interface CancelCustomerSubscriptionRequest {
|
|
50
|
+
/** The subscription to cancel. */
|
|
51
|
+
name: string;
|
|
52
|
+
/** End it at the period end (true) or now (false). */
|
|
53
|
+
atPeriodEnd?: boolean;
|
|
54
|
+
/** Refund the last payment in full; only with `at_period_end` false. */
|
|
55
|
+
refundLastPayment?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A Catalog is an environment's features, products, and prices: the desired
|
|
59
|
+
* state Money keeps its merchant account's processor objects equal to, by
|
|
60
|
+
* lookup key. It is declared in `sylphx.toml` `[money]` or written here.
|
|
61
|
+
*/
|
|
62
|
+
export interface Catalog {
|
|
63
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/price_catalogs/default`. */
|
|
64
|
+
name?: string;
|
|
65
|
+
/** `cat_<cell><ulid>`; never reused. */
|
|
66
|
+
readonly uid?: string;
|
|
67
|
+
/** Resource metadata. */
|
|
68
|
+
meta?: common.ResourceMeta;
|
|
69
|
+
/** Desired state. */
|
|
70
|
+
spec?: CatalogSpec;
|
|
71
|
+
/** Observed state. */
|
|
72
|
+
readonly status?: CatalogStatus;
|
|
73
|
+
}
|
|
74
|
+
/** CatalogSpec is the caller-writable state of a Catalog. */
|
|
75
|
+
export interface CatalogSpec {
|
|
76
|
+
/** What an entitlement can grant. */
|
|
77
|
+
features?: Feature[];
|
|
78
|
+
/** What is sold. */
|
|
79
|
+
products?: Product[];
|
|
80
|
+
/**
|
|
81
|
+
* How long a signed store-purchase grant is valid, from the moment it is
|
|
82
|
+
* issued; a client re-verifies to renew it. Default 7 days, 1 hour to 30
|
|
83
|
+
* days.
|
|
84
|
+
*/
|
|
85
|
+
clientGrantTtl?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Whether a delivered one-time purchase whose money the store or processor
|
|
88
|
+
* takes back (a refund, a void, a chargeback) gives back its goods: its
|
|
89
|
+
* entitlements end, and the refund event asks the app to take back the
|
|
90
|
+
* assets it granted, up to what the subject still holds. Applies once the
|
|
91
|
+
* project is enabled for take-backs, to refunds dated from then on; unset
|
|
92
|
+
* then means on.
|
|
93
|
+
*/
|
|
94
|
+
refundClawBack?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/** CatalogStatus is the observed state of a Catalog. */
|
|
97
|
+
export interface CatalogStatus {
|
|
98
|
+
/** The generation this status was computed from. */
|
|
99
|
+
readonly observedGeneration?: string;
|
|
100
|
+
/** Synced, Reconciling, Stalled. */
|
|
101
|
+
readonly conditions?: common.Condition[];
|
|
102
|
+
/** When the processor last matched the spec. */
|
|
103
|
+
readonly syncTime?: string;
|
|
104
|
+
/** The processor object behind each price, by lookup key. */
|
|
105
|
+
readonly processorPriceIds?: Record<string, string>;
|
|
106
|
+
}
|
|
107
|
+
/** The request of ChangeCustomerSubscriptionPlan. */
|
|
108
|
+
export interface ChangeCustomerSubscriptionPlanRequest {
|
|
109
|
+
/** The subscription to change. */
|
|
110
|
+
name: string;
|
|
111
|
+
/** The key of the catalog product to move to. */
|
|
112
|
+
product: string;
|
|
113
|
+
/**
|
|
114
|
+
* The key of the product's recurring price (for example monthly or yearly).
|
|
115
|
+
* Optional when the product has one recurring price.
|
|
116
|
+
*/
|
|
117
|
+
price?: string;
|
|
118
|
+
/** How the change is billed; unspecified is `create_prorations`. */
|
|
119
|
+
prorationBehavior?: ProrationBehavior;
|
|
120
|
+
/**
|
|
121
|
+
* Run every check and answer the subscription as it would read, without
|
|
122
|
+
* changing anything.
|
|
123
|
+
*/
|
|
124
|
+
validateOnly?: boolean;
|
|
125
|
+
}
|
|
126
|
+
/** The request of CheckEntitlement. */
|
|
127
|
+
export interface CheckEntitlementRequest {
|
|
128
|
+
/** The environment to check in. */
|
|
129
|
+
parent: string;
|
|
130
|
+
/** Who. */
|
|
131
|
+
subject: Subject;
|
|
132
|
+
/** The feature key. */
|
|
133
|
+
feature: string;
|
|
134
|
+
}
|
|
135
|
+
/** The response of CheckEntitlement. */
|
|
136
|
+
export interface CheckEntitlementResponse {
|
|
137
|
+
/** Whether the subject holds the feature now. */
|
|
138
|
+
entitled?: boolean;
|
|
139
|
+
/** For a `limit` feature, the largest allowance the subject holds. */
|
|
140
|
+
limit?: string;
|
|
141
|
+
/** The grant that answers, when entitled. */
|
|
142
|
+
entitlementGrant?: string;
|
|
143
|
+
/**
|
|
144
|
+
* When the answering grant ends; unset for no end. A caller may cache the
|
|
145
|
+
* answer until then.
|
|
146
|
+
*/
|
|
147
|
+
expireTime?: string;
|
|
148
|
+
/**
|
|
149
|
+
* The answering grant's source, for example `<checkout session>/line_items/<n>`:
|
|
150
|
+
* the `grant` claim of an offline licence token.
|
|
151
|
+
*/
|
|
152
|
+
source?: string;
|
|
153
|
+
}
|
|
154
|
+
/** The request of CheckUsageStanding. */
|
|
155
|
+
export interface CheckUsageStandingRequest {
|
|
156
|
+
/** The environment. */
|
|
157
|
+
parent: string;
|
|
158
|
+
/** Whose standing. */
|
|
159
|
+
subject: Subject;
|
|
160
|
+
/** As on UsageReservation: a verified token for the subject. */
|
|
161
|
+
subjectProof: string;
|
|
162
|
+
/** For a customer organization: the acting user's token. */
|
|
163
|
+
actorProof?: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* A Checkout Policy is an environment's seller setting for which buyers
|
|
167
|
+
* consumer checkout refuses, by buyer country (docs/services/money/web-payments.md,
|
|
168
|
+
* "Denying consumer checkout by country"). One per environment, id `default`;
|
|
169
|
+
* an environment without one refuses nobody.
|
|
170
|
+
*/
|
|
171
|
+
export interface CheckoutPolicy {
|
|
172
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/checkout_policies/default`. */
|
|
173
|
+
name?: string;
|
|
174
|
+
/** `cpl_<cell><ulid>`; never reused. */
|
|
175
|
+
readonly uid?: string;
|
|
176
|
+
/** Resource metadata. */
|
|
177
|
+
meta?: common.ResourceMeta;
|
|
178
|
+
/** Desired state. */
|
|
179
|
+
spec?: CheckoutPolicySpec;
|
|
180
|
+
}
|
|
181
|
+
/** CheckoutPolicySpec is the caller-writable state of a CheckoutPolicy. */
|
|
182
|
+
export interface CheckoutPolicySpec {
|
|
183
|
+
/**
|
|
184
|
+
* Buyer countries consumer checkout refuses: ISO 3166-1 alpha-2 codes
|
|
185
|
+
* (`DE`), or the group `EU` (the 27 member states). At most 300 entries.
|
|
186
|
+
* Empty refuses nobody.
|
|
187
|
+
*/
|
|
188
|
+
deniedCountryCodes?: string[];
|
|
189
|
+
/**
|
|
190
|
+
* Whether a buyer from a denied country who gives a tax id (a business)
|
|
191
|
+
* may still buy. Checkout then asks for the tax id; default false.
|
|
192
|
+
*/
|
|
193
|
+
allowTaxIdBuyers?: boolean;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* A Checkout Session is a hosted page where a subject pays for catalog
|
|
197
|
+
* prices. Money creates the processor's session on the environment's
|
|
198
|
+
* merchant account and returns its URL.
|
|
199
|
+
*/
|
|
200
|
+
export interface CheckoutSession {
|
|
201
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/checkout_sessions/{checkout_session}`. */
|
|
202
|
+
name?: string;
|
|
203
|
+
/** `chk_<cell><ulid>`; never reused. */
|
|
204
|
+
readonly uid?: string;
|
|
205
|
+
/** Resource metadata. */
|
|
206
|
+
meta?: common.ResourceMeta;
|
|
207
|
+
/** Who pays and is entitled. */
|
|
208
|
+
subject?: Subject;
|
|
209
|
+
/**
|
|
210
|
+
* What is bought: catalog prices by lookup key. One recurring price makes a
|
|
211
|
+
* subscription; one-time prices make an order.
|
|
212
|
+
*/
|
|
213
|
+
lineItems?: LineItem[];
|
|
214
|
+
/**
|
|
215
|
+
* Where the buyer lands after paying; `{CHECKOUT_SESSION_ID}` is replaced
|
|
216
|
+
* by the processor's session id. HTTPS only.
|
|
217
|
+
*/
|
|
218
|
+
successUrl?: string;
|
|
219
|
+
/** Where the buyer lands on cancel. HTTPS only. */
|
|
220
|
+
cancelUrl?: string;
|
|
221
|
+
/**
|
|
222
|
+
* The currency to charge in, upper-case ISO 4217; default the processor's
|
|
223
|
+
* choice for the buyer among the prices' currencies.
|
|
224
|
+
*/
|
|
225
|
+
currencyCode?: string;
|
|
226
|
+
/** The page language, for example `en` or `zh-HK`; default automatic. */
|
|
227
|
+
locale?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Copied to the subscription or order, for example attribution
|
|
230
|
+
* (`utm_source`, `ref`). At most 20 keys.
|
|
231
|
+
*/
|
|
232
|
+
metadata?: Record<string, string>;
|
|
233
|
+
/** Whether the buyer may enter a promotion code. */
|
|
234
|
+
allowPromotionCodes?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Where the buyer is, upper-case ISO 3166-1 alpha-2, when the caller knows
|
|
237
|
+
* it (for example from the request's IP address). A country the
|
|
238
|
+
* environment's checkout policy denies is refused here, before any page is
|
|
239
|
+
* made, unless the policy lets a business buy. Not trusted for anything
|
|
240
|
+
* else: the billing address the buyer gives is checked again when the
|
|
241
|
+
* payment completes.
|
|
242
|
+
*/
|
|
243
|
+
buyerCountryCode?: string;
|
|
244
|
+
/** The hosted page. */
|
|
245
|
+
readonly url?: string;
|
|
246
|
+
/** `open`, `complete`, or `expired`. */
|
|
247
|
+
readonly state?: string;
|
|
248
|
+
/** When the page stops accepting payment. */
|
|
249
|
+
readonly expireTime?: string;
|
|
250
|
+
/** The processor's session id. */
|
|
251
|
+
readonly processorSessionId?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Why a completed checkout was refused and refunded instead of delivered:
|
|
254
|
+
* `country_denied` (the billing country is on the checkout policy's list) or
|
|
255
|
+
* `country_unknown` (no billing country to check). Empty otherwise.
|
|
256
|
+
*/
|
|
257
|
+
readonly deniedReason?: string;
|
|
258
|
+
/**
|
|
259
|
+
* The billing country the completed checkout was checked against, upper-case
|
|
260
|
+
* ISO 3166-1 alpha-2; empty until completion.
|
|
261
|
+
*/
|
|
262
|
+
readonly billingCountryCode?: string;
|
|
263
|
+
/**
|
|
264
|
+
* The billing state or province, upper-case, kept only for the countries
|
|
265
|
+
* whose tax thresholds are per subdivision (`US`, `CA`); empty otherwise.
|
|
266
|
+
* Nothing else of the buyer's address is stored.
|
|
267
|
+
*/
|
|
268
|
+
readonly billingSubdivisionCode?: string;
|
|
269
|
+
}
|
|
270
|
+
/** The request of ClientVerifyStorePurchase. */
|
|
271
|
+
export interface ClientVerifyStorePurchaseRequest {
|
|
272
|
+
/** The environment the purchase is verified in. */
|
|
273
|
+
parent: string;
|
|
274
|
+
/** Who bought it: `end_user` of `inst_` and a lower-case UUID. */
|
|
275
|
+
subject: Subject;
|
|
276
|
+
/** `app_store` or `google_play`. */
|
|
277
|
+
store: string;
|
|
278
|
+
/** App Store: the StoreKit 2 signed transaction (`jwsRepresentation`). */
|
|
279
|
+
signedTransaction?: string;
|
|
280
|
+
/** Google Play: the purchase token. */
|
|
281
|
+
purchaseToken?: string;
|
|
282
|
+
/** Google Play: the store product id (for a subscription, its id). */
|
|
283
|
+
productId?: string;
|
|
284
|
+
/** Google Play: the package name, when the connection covers several. */
|
|
285
|
+
packageName?: string;
|
|
286
|
+
/**
|
|
287
|
+
* The account token the app set at purchase (Play `obfuscatedAccountId`,
|
|
288
|
+
* App Store `appAccountToken`). A consistency check only: it must match
|
|
289
|
+
* the subject's derivation and the store's copy.
|
|
290
|
+
*/
|
|
291
|
+
accountToken?: string;
|
|
292
|
+
}
|
|
293
|
+
/** The request of ConnectMerchantAccount. */
|
|
294
|
+
export interface ConnectMerchantAccountRequest {
|
|
295
|
+
/** The environment whose seller this becomes. */
|
|
296
|
+
parent: string;
|
|
297
|
+
/** The merchant account id; default `default`. */
|
|
298
|
+
merchantAccountId?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Where the browser returns after the processor, with `status` and, on
|
|
301
|
+
* success, `merchant_account` in the query. HTTPS only. Required for the
|
|
302
|
+
* OAuth connection; unused, and so optional, with `restricted_key`.
|
|
303
|
+
*/
|
|
304
|
+
returnUrl?: string;
|
|
305
|
+
/**
|
|
306
|
+
* A Stripe restricted key (`rk_test_…` or `rk_live_…`); when set, no OAuth
|
|
307
|
+
* happens: the account is read and connected at once. Write-only: sealed on
|
|
308
|
+
* write, never returned, never logged. A secret key (`sk_…`) is refused,
|
|
309
|
+
* because a restricted key can be limited to what payments need.
|
|
310
|
+
*/
|
|
311
|
+
restrictedKey?: string;
|
|
312
|
+
}
|
|
313
|
+
/** The response of ConnectMerchantAccount. */
|
|
314
|
+
export interface ConnectMerchantAccountResponse {
|
|
315
|
+
/**
|
|
316
|
+
* The processor's authorisation page for an owner of the account to open;
|
|
317
|
+
* empty when the connection completed in this call.
|
|
318
|
+
*/
|
|
319
|
+
authorizeUrl?: string;
|
|
320
|
+
/**
|
|
321
|
+
* When the link stops working; unset when the connection completed in this
|
|
322
|
+
* call.
|
|
323
|
+
*/
|
|
324
|
+
expireTime?: string;
|
|
325
|
+
/**
|
|
326
|
+
* The merchant account, connected; set when the connection completed in
|
|
327
|
+
* this call, which is every connection made with a restricted key.
|
|
328
|
+
*/
|
|
329
|
+
merchantAccount?: MerchantAccount;
|
|
330
|
+
}
|
|
331
|
+
/** The request of CreateCheckoutSession. */
|
|
332
|
+
export interface CreateCheckoutSessionRequest {
|
|
333
|
+
/** The parent to create in. */
|
|
334
|
+
parent: string;
|
|
335
|
+
/** The checkout to create; only caller-writable fields are read. */
|
|
336
|
+
checkoutSession: CheckoutSession;
|
|
337
|
+
/** The id, the final name segment; the server assigns one when empty. */
|
|
338
|
+
checkoutSessionId?: string;
|
|
339
|
+
}
|
|
340
|
+
/** The request of CreateCreditGrant. */
|
|
341
|
+
export interface CreateCreditGrantRequest {
|
|
342
|
+
/** The environment to create in. */
|
|
343
|
+
parent: string;
|
|
344
|
+
/** The credit grant. */
|
|
345
|
+
creditGrant: CreditGrant;
|
|
346
|
+
}
|
|
347
|
+
/** The request of CreateEntitlementGrant. */
|
|
348
|
+
export interface CreateEntitlementGrantRequest {
|
|
349
|
+
/** The environment the grant is in. */
|
|
350
|
+
parent: string;
|
|
351
|
+
/**
|
|
352
|
+
* The grant's id, also its idempotency: `^[a-z]([a-z0-9_-]{0,61}[a-z0-9])?$`.
|
|
353
|
+
* The same id with the same grant returns the stored one; the same id with
|
|
354
|
+
* another grant is RESOURCE_ALREADY_EXISTS.
|
|
355
|
+
*/
|
|
356
|
+
entitlementGrantId: string;
|
|
357
|
+
/**
|
|
358
|
+
* The grant: `subject`, `feature`, `expire_time` (future, at most 400 days
|
|
359
|
+
* out), `campaign`, `reason` and `approval_ref` are required.
|
|
360
|
+
*/
|
|
361
|
+
entitlementGrant: EntitlementGrant;
|
|
362
|
+
}
|
|
363
|
+
/** The request of CreatePortalSession. */
|
|
364
|
+
export interface CreatePortalSessionRequest {
|
|
365
|
+
/** The parent to create in. */
|
|
366
|
+
parent: string;
|
|
367
|
+
/** The portal session to create; only caller-writable fields are read. */
|
|
368
|
+
portalSession: PortalSession;
|
|
369
|
+
/** The id, the final name segment; the server assigns one when empty. */
|
|
370
|
+
portalSessionId?: string;
|
|
371
|
+
}
|
|
372
|
+
/** The request of CreateRevenueSource. */
|
|
373
|
+
export interface CreateRevenueSourceRequest {
|
|
374
|
+
/** The org to create in: `orgs/{org}`. */
|
|
375
|
+
parent: string;
|
|
376
|
+
/**
|
|
377
|
+
* The source's id; `^[a-z]([a-z0-9_-]{0,61}[a-z0-9])?$`. Empty: Money
|
|
378
|
+
* assigns one.
|
|
379
|
+
*/
|
|
380
|
+
revenueSourceId?: string;
|
|
381
|
+
/** The source to create. */
|
|
382
|
+
revenueSource: RevenueSource;
|
|
383
|
+
/** Validate only; write nothing. */
|
|
384
|
+
validateOnly?: boolean;
|
|
385
|
+
}
|
|
386
|
+
/** The request of CreateStoreConnection. */
|
|
387
|
+
export interface CreateStoreConnectionRequest {
|
|
388
|
+
/** The parent to create in. */
|
|
389
|
+
parent: string;
|
|
390
|
+
/** The store connection id, the final name segment. */
|
|
391
|
+
storeConnectionId: string;
|
|
392
|
+
/** The store connection to create; only caller-writable fields are read. */
|
|
393
|
+
storeConnection: StoreConnection;
|
|
394
|
+
/** Validate and return the result without writing anything. */
|
|
395
|
+
validateOnly?: boolean;
|
|
396
|
+
}
|
|
397
|
+
/** The request of CreateUsageEvent. */
|
|
398
|
+
export interface CreateUsageEventRequest {
|
|
399
|
+
/** The environment to create in. */
|
|
400
|
+
parent: string;
|
|
401
|
+
/** The usage event. */
|
|
402
|
+
usageEvent: UsageEvent;
|
|
403
|
+
}
|
|
404
|
+
/** The request of CreateUsageMeterPrice. */
|
|
405
|
+
export interface CreateUsageMeterPriceRequest {
|
|
406
|
+
/** The environment to create in. */
|
|
407
|
+
parent: string;
|
|
408
|
+
/** The price. */
|
|
409
|
+
usageMeterPrice: UsageMeterPrice;
|
|
410
|
+
}
|
|
411
|
+
/** The request of CreateUsageReservation. */
|
|
412
|
+
export interface CreateUsageReservationRequest {
|
|
413
|
+
/** The environment to create in. */
|
|
414
|
+
parent: string;
|
|
415
|
+
/** The reservation. */
|
|
416
|
+
usageReservation: UsageReservation;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* A Credit Grant is credit a merchant gives a subject: audited, append-only,
|
|
420
|
+
* invoiced at full price and then offset once at invoice issue, soonest
|
|
421
|
+
* expiry first. A change is a new grant that supersedes the old one.
|
|
422
|
+
*/
|
|
423
|
+
export interface CreditGrant {
|
|
424
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/credit_grants/{credit_grant}`. */
|
|
425
|
+
name?: string;
|
|
426
|
+
/** `cgrt_<cell><ulid>`; never reused. */
|
|
427
|
+
readonly uid?: string;
|
|
428
|
+
/** Resource metadata. */
|
|
429
|
+
meta?: common.ResourceMeta;
|
|
430
|
+
/** Who receives it. */
|
|
431
|
+
subject?: Subject;
|
|
432
|
+
/** `amount` (a total) or `monthly_cap` (up to the amount in each month). */
|
|
433
|
+
kind?: string;
|
|
434
|
+
/** Minor units, a decimal string. */
|
|
435
|
+
amountMinor?: string;
|
|
436
|
+
/** When it starts applying. */
|
|
437
|
+
startTime?: string;
|
|
438
|
+
/** When it stops applying; required. Not renewing is how charging starts. */
|
|
439
|
+
expireTime?: string;
|
|
440
|
+
/** Who approved it. */
|
|
441
|
+
approver?: string;
|
|
442
|
+
/** Why. */
|
|
443
|
+
reason?: string;
|
|
444
|
+
/** The grant this one replaces. */
|
|
445
|
+
supersedes?: string;
|
|
446
|
+
/**
|
|
447
|
+
* `undecided`, `price_reduction`, or `post_tax_settlement`; no default.
|
|
448
|
+
* `post_tax_settlement` is refused while the merchant has automatic tax on.
|
|
449
|
+
*/
|
|
450
|
+
taxTreatment?: string;
|
|
451
|
+
/**
|
|
452
|
+
* `standard` or `hold`; no default. Over the credit, a held invoice stays
|
|
453
|
+
* due but is not collected until an explicit audited release.
|
|
454
|
+
*/
|
|
455
|
+
collectionMode?: string;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* A Customer Subscription is a subject's recurring purchase, mirrored from
|
|
459
|
+
* the processor after Money read it back. Money writes it; a caller changes it
|
|
460
|
+
* only through `:cancel` and `:resume`.
|
|
461
|
+
*/
|
|
462
|
+
export interface CustomerSubscription {
|
|
463
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/customer_subscriptions/{customer_subscription}`. */
|
|
464
|
+
name?: string;
|
|
465
|
+
/** `csb_<cell><ulid>`; never reused. */
|
|
466
|
+
readonly uid?: string;
|
|
467
|
+
/** Resource metadata. */
|
|
468
|
+
meta?: common.ResourceMeta;
|
|
469
|
+
/** Who holds it. */
|
|
470
|
+
readonly subject?: Subject;
|
|
471
|
+
/** `stripe`, `app_store`, or `google_play`. */
|
|
472
|
+
readonly source?: string;
|
|
473
|
+
/** The processor's subscription id. */
|
|
474
|
+
readonly processorSubscriptionId?: string;
|
|
475
|
+
/**
|
|
476
|
+
* `trialing`, `active`, `past_due`, `paused`, `canceled`, `unpaid`,
|
|
477
|
+
* `incomplete`, or `incomplete_expired`, as the processor reports it.
|
|
478
|
+
*/
|
|
479
|
+
readonly status?: string;
|
|
480
|
+
/** The prices, by lookup key, and their quantities. */
|
|
481
|
+
readonly items?: LineItem[];
|
|
482
|
+
/** The end of the paid period. */
|
|
483
|
+
readonly currentPeriodEndTime?: string;
|
|
484
|
+
/** Whether it ends at `current_period_end_time` instead of renewing. */
|
|
485
|
+
readonly cancelAtPeriodEnd?: boolean;
|
|
486
|
+
/** The end of the trial, when there is one. */
|
|
487
|
+
readonly trialEndTime?: string;
|
|
488
|
+
/** The checkout's metadata. */
|
|
489
|
+
readonly metadata?: Record<string, unknown>;
|
|
490
|
+
}
|
|
491
|
+
/** The request of DeleteRevenueSource. */
|
|
492
|
+
export interface DeleteRevenueSourceRequest {
|
|
493
|
+
/**
|
|
494
|
+
* The source to delete, with the facts it reported. The `money` source
|
|
495
|
+
* cannot be deleted (pause it instead).
|
|
496
|
+
*/
|
|
497
|
+
name: string;
|
|
498
|
+
/** The current etag; when set, the delete happens only if it matches. */
|
|
499
|
+
etag?: string;
|
|
500
|
+
/** Validate only; delete nothing. */
|
|
501
|
+
validateOnly?: boolean;
|
|
502
|
+
}
|
|
503
|
+
/** The request of DeleteStoreConnection. */
|
|
504
|
+
export interface DeleteStoreConnectionRequest {
|
|
505
|
+
/** The name of the store connection to delete. */
|
|
506
|
+
name: string;
|
|
507
|
+
/** The ETag the caller read; the delete fails if it changed. */
|
|
508
|
+
etag?: string;
|
|
509
|
+
}
|
|
510
|
+
/** The request of DisconnectMerchantAccount. */
|
|
511
|
+
export interface DisconnectMerchantAccountRequest {
|
|
512
|
+
/** The merchant account to disconnect. */
|
|
513
|
+
name: string;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* An Entitlement Grant is one feature a subject holds, from one source: a
|
|
517
|
+
* subscription, an order, a store purchase, or a manual grant. Money derives
|
|
518
|
+
* it; a client event never writes one.
|
|
519
|
+
*/
|
|
520
|
+
export interface EntitlementGrant {
|
|
521
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/entitlement_grants/{entitlement_grant}`. */
|
|
522
|
+
name?: string;
|
|
523
|
+
/** `egr_<cell><ulid>`; never reused. */
|
|
524
|
+
readonly uid?: string;
|
|
525
|
+
/** Resource metadata. */
|
|
526
|
+
meta?: common.ResourceMeta;
|
|
527
|
+
/** Who holds it. */
|
|
528
|
+
subject?: Subject;
|
|
529
|
+
/** The feature key. */
|
|
530
|
+
feature?: string;
|
|
531
|
+
/** For a `limit` feature, the allowance as a decimal string. */
|
|
532
|
+
readonly limit?: string;
|
|
533
|
+
/** The resource that grants it, for example a customer subscription's name. */
|
|
534
|
+
readonly source?: string;
|
|
535
|
+
/** When it ends; unset for no end. */
|
|
536
|
+
expireTime?: string;
|
|
537
|
+
/** A manual grant's campaign (input on create, up to 64 characters). */
|
|
538
|
+
campaign?: string;
|
|
539
|
+
/** A manual grant's reason (input on create, up to 500 characters). */
|
|
540
|
+
reason?: string;
|
|
541
|
+
/**
|
|
542
|
+
* A free-text reference to the approval, for example `CEO 2026-10-02`
|
|
543
|
+
* (input on create, up to 200 characters).
|
|
544
|
+
*/
|
|
545
|
+
approvalRef?: string;
|
|
546
|
+
/**
|
|
547
|
+
* The principal that created a manual grant: the verified key's principal,
|
|
548
|
+
* never a request field.
|
|
549
|
+
*/
|
|
550
|
+
readonly approver?: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* An Exchange Rate is the units of one currency per US dollar on one day,
|
|
554
|
+
* from the ECB reference rates (ADR §3). A day the ECB did not publish
|
|
555
|
+
* carries the previous business day's rate, named in `published_on`. The
|
|
556
|
+
* table is the same for every org: any reader that converts uses it.
|
|
557
|
+
*/
|
|
558
|
+
export interface ExchangeRate {
|
|
559
|
+
/** `orgs/{org}/exchange_rates/{currency}-{YYYY-MM-DD}`, lower case. */
|
|
560
|
+
name?: string;
|
|
561
|
+
/** The rate's id, as in its name. */
|
|
562
|
+
readonly uid?: string;
|
|
563
|
+
/** Resource metadata. */
|
|
564
|
+
meta?: common.ResourceMeta;
|
|
565
|
+
/** The day, `YYYY-MM-DD`. */
|
|
566
|
+
readonly day?: string;
|
|
567
|
+
/** ISO 4217 code. */
|
|
568
|
+
readonly currencyCode?: string;
|
|
569
|
+
/** Units of the currency per US dollar, as a decimal string. */
|
|
570
|
+
readonly perUsd?: string;
|
|
571
|
+
/** `ecb`. */
|
|
572
|
+
readonly source?: string;
|
|
573
|
+
/**
|
|
574
|
+
* The publication the rate is from: the day itself, or the business day
|
|
575
|
+
* before a weekend or holiday.
|
|
576
|
+
*/
|
|
577
|
+
readonly publicationDay?: string;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* A Feature is what an app checks, for example `plus` or
|
|
581
|
+
* `exports.per_month`.
|
|
582
|
+
*/
|
|
583
|
+
export interface Feature {
|
|
584
|
+
/** The key the app checks; `^[a-z][a-z0-9_.]{0,63}$`. */
|
|
585
|
+
key?: string;
|
|
586
|
+
/** `boolean` (on or off) or `limit` (a numeric allowance). */
|
|
587
|
+
kind?: FeatureKind;
|
|
588
|
+
/** Shown to people. */
|
|
589
|
+
displayName?: string;
|
|
590
|
+
}
|
|
591
|
+
/** The request of GenerateLicenceKey. */
|
|
592
|
+
export interface GenerateLicenceKeyRequest {
|
|
593
|
+
/** The environment the key belongs to. */
|
|
594
|
+
parent: string;
|
|
595
|
+
/**
|
|
596
|
+
* The key's id; `^[a-z]([a-z0-9_-]{0,61}[a-z0-9])?$`. Empty: Money assigns
|
|
597
|
+
* one.
|
|
598
|
+
*/
|
|
599
|
+
licenceKeyId?: string;
|
|
600
|
+
/** Shown to operators. */
|
|
601
|
+
spec?: LicenceKeySpec;
|
|
602
|
+
}
|
|
603
|
+
/** The request of GetCatalog. */
|
|
604
|
+
export interface GetCatalogRequest {
|
|
605
|
+
/** The name of the catalog to get. */
|
|
606
|
+
name: string;
|
|
607
|
+
}
|
|
608
|
+
/** The request of GetCheckoutPolicy. */
|
|
609
|
+
export interface GetCheckoutPolicyRequest {
|
|
610
|
+
/** The name of the checkout policy to get. */
|
|
611
|
+
name: string;
|
|
612
|
+
}
|
|
613
|
+
/** The request of GetCheckoutSession. */
|
|
614
|
+
export interface GetCheckoutSessionRequest {
|
|
615
|
+
/** The name of the checkout session to get. */
|
|
616
|
+
name: string;
|
|
617
|
+
}
|
|
618
|
+
/** The request of GetCreditGrant. */
|
|
619
|
+
export interface GetCreditGrantRequest {
|
|
620
|
+
/** The name of the credit grant to get. */
|
|
621
|
+
name: string;
|
|
622
|
+
}
|
|
623
|
+
/** The request of GetCustomerSubscription. */
|
|
624
|
+
export interface GetCustomerSubscriptionRequest {
|
|
625
|
+
/** The name of the customer subscription to get. */
|
|
626
|
+
name: string;
|
|
627
|
+
}
|
|
628
|
+
/** The request of GetEntitlementGrant. */
|
|
629
|
+
export interface GetEntitlementGrantRequest {
|
|
630
|
+
/** The name of the entitlement grant to get. */
|
|
631
|
+
name: string;
|
|
632
|
+
}
|
|
633
|
+
/** The request of GetLicenceKey. */
|
|
634
|
+
export interface GetLicenceKeyRequest {
|
|
635
|
+
/** The name of the licence key to get. */
|
|
636
|
+
name: string;
|
|
637
|
+
}
|
|
638
|
+
/** The request of GetMerchantAccount. */
|
|
639
|
+
export interface GetMerchantAccountRequest {
|
|
640
|
+
/** The name of the merchant account to get. */
|
|
641
|
+
name: string;
|
|
642
|
+
}
|
|
643
|
+
/** The request of GetPortalSession. */
|
|
644
|
+
export interface GetPortalSessionRequest {
|
|
645
|
+
/** The name of the portal session to get. */
|
|
646
|
+
name: string;
|
|
647
|
+
}
|
|
648
|
+
/** The request of GetRevenueSource. */
|
|
649
|
+
export interface GetRevenueSourceRequest {
|
|
650
|
+
/** The name of the source to get. */
|
|
651
|
+
name: string;
|
|
652
|
+
}
|
|
653
|
+
/** The request of GetRevenueSummary. */
|
|
654
|
+
export interface GetRevenueSummaryRequest {
|
|
655
|
+
/** `orgs/{org}/revenue`. */
|
|
656
|
+
name: string;
|
|
657
|
+
/**
|
|
658
|
+
* `today`, `mtd` (month to date, the default), `month` (with `month`), or
|
|
659
|
+
* `range` (with `start_day` and `end_day`). Days are UTC.
|
|
660
|
+
*/
|
|
661
|
+
period?: string;
|
|
662
|
+
/** The month of a `month` period, `YYYY-MM`. */
|
|
663
|
+
month?: string;
|
|
664
|
+
/** The first day of a `range`, `YYYY-MM-DD`. */
|
|
665
|
+
startDay?: string;
|
|
666
|
+
/** The last day of a `range`, inclusive; at most 400 days after the first. */
|
|
667
|
+
endDay?: string;
|
|
668
|
+
/** `day` (the default) or `month`. */
|
|
669
|
+
groupBy?: string;
|
|
670
|
+
/** `none` (the default), `source` or `product`. */
|
|
671
|
+
split?: string;
|
|
672
|
+
/** `net` (the default) or `gross`. */
|
|
673
|
+
amount?: string;
|
|
674
|
+
/** The reporting currency, ISO 4217; default `USD`. */
|
|
675
|
+
currencyCode?: string;
|
|
676
|
+
}
|
|
677
|
+
/** The request of GetStoreConnection. */
|
|
678
|
+
export interface GetStoreConnectionRequest {
|
|
679
|
+
/** The name of the store connection to get. */
|
|
680
|
+
name: string;
|
|
681
|
+
}
|
|
682
|
+
/** The request of GetStorePurchase. */
|
|
683
|
+
export interface GetStorePurchaseRequest {
|
|
684
|
+
/** The name of the store purchase to get. */
|
|
685
|
+
name: string;
|
|
686
|
+
}
|
|
687
|
+
/** The request of GetUsageInvoice. */
|
|
688
|
+
export interface GetUsageInvoiceRequest {
|
|
689
|
+
/** The name of the usage invoice to get. */
|
|
690
|
+
name: string;
|
|
691
|
+
}
|
|
692
|
+
/** The request of GetUsageMeter. */
|
|
693
|
+
export interface GetUsageMeterRequest {
|
|
694
|
+
/** The name of the usage meter to get. */
|
|
695
|
+
name: string;
|
|
696
|
+
}
|
|
697
|
+
/** The request of GetUsageReservation. */
|
|
698
|
+
export interface GetUsageReservationRequest {
|
|
699
|
+
/** The name of the usage reservation to get. */
|
|
700
|
+
name: string;
|
|
701
|
+
}
|
|
702
|
+
/** The request of GetUsageSettings. */
|
|
703
|
+
export interface GetUsageSettingsRequest {
|
|
704
|
+
/** The name of the usage settings to get. */
|
|
705
|
+
name: string;
|
|
706
|
+
}
|
|
707
|
+
/** GooglePlayConnection is a Play service account and the app's package names. */
|
|
708
|
+
export interface GooglePlayConnection {
|
|
709
|
+
/** The apps' package names. */
|
|
710
|
+
packageNames?: string[];
|
|
711
|
+
/**
|
|
712
|
+
* The service account's JSON key. Write-only: sealed on write, never
|
|
713
|
+
* returned; omit it on update to keep the stored key.
|
|
714
|
+
*/
|
|
715
|
+
serviceAccountJson?: string;
|
|
716
|
+
/**
|
|
717
|
+
* The audience Play's Pub/Sub push token must carry for real-time developer
|
|
718
|
+
* notifications; unset refuses them.
|
|
719
|
+
*/
|
|
720
|
+
notificationAudience?: string;
|
|
721
|
+
/** The service account Pub/Sub pushes as. */
|
|
722
|
+
notificationServiceAccount?: string;
|
|
723
|
+
}
|
|
724
|
+
/** The request of ImportLicenceKey. */
|
|
725
|
+
export interface ImportLicenceKeyRequest {
|
|
726
|
+
/** The environment the key belongs to. */
|
|
727
|
+
parent: string;
|
|
728
|
+
/** The key's id; as on GenerateLicenceKeyRequest. Required. */
|
|
729
|
+
licenceKeyId: string;
|
|
730
|
+
/**
|
|
731
|
+
* The Ed25519 private key as PKCS8 DER in standard base64. Write-only:
|
|
732
|
+
* sealed on import, never returned.
|
|
733
|
+
*/
|
|
734
|
+
privateKeyPkcs8: string;
|
|
735
|
+
/**
|
|
736
|
+
* The public key shipped clients pin, raw base64url without padding. The
|
|
737
|
+
* import is refused unless it is the public half of the imported key.
|
|
738
|
+
*/
|
|
739
|
+
expectedPublicKey: string;
|
|
740
|
+
/** Shown to operators. */
|
|
741
|
+
spec?: LicenceKeySpec;
|
|
742
|
+
}
|
|
743
|
+
/** One already-incurred usage event of a batch. */
|
|
744
|
+
export interface IngestedUsageEvent {
|
|
745
|
+
/**
|
|
746
|
+
* The emitter's id of this event, 1 to 128 characters of `[A-Za-z0-9._:-]`;
|
|
747
|
+
* with the meter and its version, the dedupe key.
|
|
748
|
+
*/
|
|
749
|
+
eventId?: string;
|
|
750
|
+
/** The meter. */
|
|
751
|
+
meter?: string;
|
|
752
|
+
/** The emitter's version of the meter's definition, 1 or more. */
|
|
753
|
+
meterVersion?: number;
|
|
754
|
+
/** Who used it, as attributed by the emitter. */
|
|
755
|
+
subject?: Subject;
|
|
756
|
+
/** How much, 1 to 2^40. */
|
|
757
|
+
quantity?: string;
|
|
758
|
+
/** When it happened. */
|
|
759
|
+
occurredTime?: string;
|
|
760
|
+
}
|
|
761
|
+
/** What became of one ingested event. */
|
|
762
|
+
export interface IngestedUsageEventResult {
|
|
763
|
+
/** The event's `event_id`. */
|
|
764
|
+
eventId?: string;
|
|
765
|
+
/**
|
|
766
|
+
* `accepted` (recorded now), `duplicate` (already recorded with the same
|
|
767
|
+
* content: a no-op), `conflict` (its key was recorded with other content;
|
|
768
|
+
* this one is never counted) or `rejected` (refused; see `reason`).
|
|
769
|
+
*/
|
|
770
|
+
outcome?: string;
|
|
771
|
+
/**
|
|
772
|
+
* For `rejected`: `invalid` (a field is out of range), `unpriced` (no
|
|
773
|
+
* active meter with a price in force at `occurred_time`) or
|
|
774
|
+
* `reservation_required` (the meter records only through a reservation);
|
|
775
|
+
* empty otherwise.
|
|
776
|
+
*/
|
|
777
|
+
reason?: string;
|
|
778
|
+
/** The UsageEvent that counts this usage, for `accepted` and `duplicate`. */
|
|
779
|
+
usageEvent?: string;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* A Licence Key is one Ed25519 signing key Money holds for an environment. The
|
|
783
|
+
* private half is generated here (or imported once, for a key already pinned in
|
|
784
|
+
* shipped clients), sealed with Money's seal keys, and never returned or
|
|
785
|
+
* logged. The public half is exported keyless at
|
|
786
|
+
* `GET /v1/money/licence_keys/{uid}`, in the raw base64url form a client pins.
|
|
787
|
+
*/
|
|
788
|
+
export interface LicenceKey {
|
|
789
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/licence_keys/{licence_key}`. */
|
|
790
|
+
name?: string;
|
|
791
|
+
/**
|
|
792
|
+
* `lkey_<cell><ulid>`; never reused. The keyless public export is addressed
|
|
793
|
+
* by it.
|
|
794
|
+
*/
|
|
795
|
+
readonly uid?: string;
|
|
796
|
+
/** Resource metadata. */
|
|
797
|
+
meta?: common.ResourceMeta;
|
|
798
|
+
/** Desired state. */
|
|
799
|
+
spec?: LicenceKeySpec;
|
|
800
|
+
/** Observed state. */
|
|
801
|
+
readonly status?: LicenceKeyStatus;
|
|
802
|
+
}
|
|
803
|
+
/** LicenceKeySpec is the caller-writable state of a LicenceKey. */
|
|
804
|
+
export interface LicenceKeySpec {
|
|
805
|
+
/** Shown to operators. */
|
|
806
|
+
description?: string;
|
|
807
|
+
}
|
|
808
|
+
/** LicenceKeyStatus is the observed state of a LicenceKey. */
|
|
809
|
+
export interface LicenceKeyStatus {
|
|
810
|
+
/** The generation this status was computed from. */
|
|
811
|
+
readonly observedGeneration?: string;
|
|
812
|
+
/** Ready while the key exists. */
|
|
813
|
+
readonly conditions?: common.Condition[];
|
|
814
|
+
/**
|
|
815
|
+
* `active` signs new terms; `retired` signs only terms already frozen to it
|
|
816
|
+
* and stays exported for verification.
|
|
817
|
+
*/
|
|
818
|
+
readonly state?: string;
|
|
819
|
+
/** `generated` or `imported`. */
|
|
820
|
+
readonly origin?: string;
|
|
821
|
+
/** The raw Ed25519 public key, base64url without padding. */
|
|
822
|
+
readonly publicKey?: string;
|
|
823
|
+
/** When the key was retired. */
|
|
824
|
+
readonly retireTime?: string;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* A LicencePolicy is the product-owned rule for the offline licence a paid
|
|
828
|
+
* one-time purchase of the product carries. Written by the merchant with the
|
|
829
|
+
* catalog (`billing:write`); it names no key material, only the LicenceKey that
|
|
830
|
+
* signs. A licence is refused on a consumable product and on a product with a
|
|
831
|
+
* recurring price. There is no grace period.
|
|
832
|
+
*/
|
|
833
|
+
export interface LicencePolicy {
|
|
834
|
+
/** The token scheme; `sylphx-offline-ed25519-v1`. */
|
|
835
|
+
scheme?: string;
|
|
836
|
+
/** The `plan` the token carries. */
|
|
837
|
+
plan?: string;
|
|
838
|
+
/** The `product` the token carries (what the client checks it against). */
|
|
839
|
+
tokenProduct?: string;
|
|
840
|
+
/** The id of the LicenceKey that signs new terms. */
|
|
841
|
+
key?: string;
|
|
842
|
+
/** How long one purchase lasts. */
|
|
843
|
+
term?: LicenceTerm;
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* A LicenceTerm is a length of time with explicit arithmetic: `days` add
|
|
847
|
+
* exact 86 400 000 ms multiples to the UTC instant; `calendar_months` and
|
|
848
|
+
* `calendar_years` add months to the UTC calendar date, keep the time of day,
|
|
849
|
+
* and clamp a day that does not exist in the target month to the month's last
|
|
850
|
+
* day (2028-02-29 plus one year is 2029-02-28).
|
|
851
|
+
*/
|
|
852
|
+
export interface LicenceTerm {
|
|
853
|
+
/** The unit of `count`. */
|
|
854
|
+
unit?: LicenceTermUnit;
|
|
855
|
+
/** How many units; at least 1. */
|
|
856
|
+
count?: number;
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* A Licence Token is one issued offline licence, re-derived from its frozen
|
|
860
|
+
* term: the same bytes every time. Money derives it; nothing writes one.
|
|
861
|
+
*/
|
|
862
|
+
export interface LicenceToken {
|
|
863
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/licence_tokens/{licence_token}`. */
|
|
864
|
+
name?: string;
|
|
865
|
+
/** `ltok_<cell><ulid>`; never reused. */
|
|
866
|
+
readonly uid?: string;
|
|
867
|
+
/** Resource metadata. */
|
|
868
|
+
meta?: common.ResourceMeta;
|
|
869
|
+
/**
|
|
870
|
+
* The grant source the term was frozen for:
|
|
871
|
+
* `<checkout session name>/line_items/<n>`.
|
|
872
|
+
*/
|
|
873
|
+
readonly source?: string;
|
|
874
|
+
/** The checkout line the token is for. */
|
|
875
|
+
readonly line?: number;
|
|
876
|
+
/** The token: `base64url(payload) "." base64url(signature)`. */
|
|
877
|
+
readonly token?: string;
|
|
878
|
+
/** The `product` the token carries. */
|
|
879
|
+
readonly tokenProduct?: string;
|
|
880
|
+
/** When the term was frozen. */
|
|
881
|
+
readonly issueTime?: string;
|
|
882
|
+
/** When the token expires. */
|
|
883
|
+
readonly expireTime?: string;
|
|
884
|
+
/** The seats the token carries. */
|
|
885
|
+
readonly seats?: number;
|
|
886
|
+
}
|
|
887
|
+
/** A Line Item is one catalog price and its quantity. */
|
|
888
|
+
export interface LineItem {
|
|
889
|
+
/** The price's lookup key. */
|
|
890
|
+
price?: string;
|
|
891
|
+
/** How many; default 1. Seats for a per-seat or family price. */
|
|
892
|
+
quantity?: number;
|
|
893
|
+
}
|
|
894
|
+
/** The request of ListCreditGrants. */
|
|
895
|
+
export interface ListCreditGrantsRequest {
|
|
896
|
+
/** The parent to list in. */
|
|
897
|
+
parent: string;
|
|
898
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
899
|
+
pageSize?: number;
|
|
900
|
+
/** `next_page_token` of the previous page. */
|
|
901
|
+
pageToken?: string;
|
|
902
|
+
/** AIP-160 filter, for example `subject = "…"`. */
|
|
903
|
+
filter?: string;
|
|
904
|
+
}
|
|
905
|
+
/** The response of ListCreditGrants. */
|
|
906
|
+
export interface ListCreditGrantsResponse {
|
|
907
|
+
/** The page. */
|
|
908
|
+
creditGrants?: CreditGrant[];
|
|
909
|
+
/** The token of the next page; empty on the last page. */
|
|
910
|
+
nextPageToken?: string;
|
|
911
|
+
}
|
|
912
|
+
/** The request of ListCustomerSubscriptions. */
|
|
913
|
+
export interface ListCustomerSubscriptionsRequest {
|
|
914
|
+
/** The parent to list in. */
|
|
915
|
+
parent: string;
|
|
916
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
917
|
+
pageSize?: number;
|
|
918
|
+
/** `next_page_token` of the previous page. */
|
|
919
|
+
pageToken?: string;
|
|
920
|
+
/** AIP-160 filter over filterable fields. */
|
|
921
|
+
filter?: string;
|
|
922
|
+
}
|
|
923
|
+
/** The response of ListCustomerSubscriptions. */
|
|
924
|
+
export interface ListCustomerSubscriptionsResponse {
|
|
925
|
+
/** The page. */
|
|
926
|
+
customerSubscriptions?: CustomerSubscription[];
|
|
927
|
+
/** The token of the next page; empty on the last page. */
|
|
928
|
+
nextPageToken?: string;
|
|
929
|
+
}
|
|
930
|
+
/** The request of ListEntitlementGrants. */
|
|
931
|
+
export interface ListEntitlementGrantsRequest {
|
|
932
|
+
/** The parent to list in. */
|
|
933
|
+
parent: string;
|
|
934
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
935
|
+
pageSize?: number;
|
|
936
|
+
/** `next_page_token` of the previous page. */
|
|
937
|
+
pageToken?: string;
|
|
938
|
+
/** AIP-160 filter over filterable fields, for example `feature = "plus"`. */
|
|
939
|
+
filter?: string;
|
|
940
|
+
}
|
|
941
|
+
/** The response of ListEntitlementGrants. */
|
|
942
|
+
export interface ListEntitlementGrantsResponse {
|
|
943
|
+
/** The page. */
|
|
944
|
+
entitlementGrants?: EntitlementGrant[];
|
|
945
|
+
/** The token of the next page; empty on the last page. */
|
|
946
|
+
nextPageToken?: string;
|
|
947
|
+
}
|
|
948
|
+
/** The request of ListExchangeRates. */
|
|
949
|
+
export interface ListExchangeRatesRequest {
|
|
950
|
+
/** The org reading: `orgs/{org}`. The rates are the same for every org. */
|
|
951
|
+
parent: string;
|
|
952
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
953
|
+
pageSize?: number;
|
|
954
|
+
/** `next_page_token` of the previous page. */
|
|
955
|
+
pageToken?: string;
|
|
956
|
+
/**
|
|
957
|
+
* AIP-160 filter, comparisons joined with `AND`: `currency_code = "EUR"`,
|
|
958
|
+
* `day >= "YYYY-MM-DD"`, `day <= "YYYY-MM-DD"`. The days
|
|
959
|
+
* default to the 31 days to today (UTC), and span at most 400 days.
|
|
960
|
+
*/
|
|
961
|
+
filter?: string;
|
|
962
|
+
}
|
|
963
|
+
/** The response of ListExchangeRates. */
|
|
964
|
+
export interface ListExchangeRatesResponse {
|
|
965
|
+
/** The page, newest day first, then by currency. */
|
|
966
|
+
exchangeRates?: ExchangeRate[];
|
|
967
|
+
/** The token of the next page; empty on the last page. */
|
|
968
|
+
nextPageToken?: string;
|
|
969
|
+
}
|
|
970
|
+
/** The request of ListLicenceKeys. */
|
|
971
|
+
export interface ListLicenceKeysRequest {
|
|
972
|
+
/** The parent to list in. */
|
|
973
|
+
parent: string;
|
|
974
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
975
|
+
pageSize?: number;
|
|
976
|
+
/** `next_page_token` of the previous page. */
|
|
977
|
+
pageToken?: string;
|
|
978
|
+
}
|
|
979
|
+
/** The response of ListLicenceKeys. */
|
|
980
|
+
export interface ListLicenceKeysResponse {
|
|
981
|
+
/** The page. */
|
|
982
|
+
licenceKeys?: LicenceKey[];
|
|
983
|
+
/** The token of the next page; empty on the last page. */
|
|
984
|
+
nextPageToken?: string;
|
|
985
|
+
}
|
|
986
|
+
/** The request of ListLicenceTokens. */
|
|
987
|
+
export interface ListLicenceTokensRequest {
|
|
988
|
+
/** The environment to list in. */
|
|
989
|
+
parent: string;
|
|
990
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
991
|
+
pageSize?: number;
|
|
992
|
+
/** `next_page_token` of the previous page. */
|
|
993
|
+
pageToken?: string;
|
|
994
|
+
/**
|
|
995
|
+
* AIP-160 filter. It must name whose tokens (else `INVALID_FIELD`): `end_user = "…"` or
|
|
996
|
+
* `customer_organization = "…"`; `token_product = "…"` (joined with `AND`)
|
|
997
|
+
* keeps only that product, and no `token_product` lists every product.
|
|
998
|
+
*/
|
|
999
|
+
filter?: string;
|
|
1000
|
+
}
|
|
1001
|
+
/** The response of ListLicenceTokens. */
|
|
1002
|
+
export interface ListLicenceTokensResponse {
|
|
1003
|
+
/** Every unexpired token of a paid order, newest first. */
|
|
1004
|
+
licenceTokens?: LicenceToken[];
|
|
1005
|
+
/** The token of the next page; empty on the last page. */
|
|
1006
|
+
nextPageToken?: string;
|
|
1007
|
+
}
|
|
1008
|
+
/** The request of ListMerchantAccounts. */
|
|
1009
|
+
export interface ListMerchantAccountsRequest {
|
|
1010
|
+
/** The parent to list in. */
|
|
1011
|
+
parent: string;
|
|
1012
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1013
|
+
pageSize?: number;
|
|
1014
|
+
/** `next_page_token` of the previous page. */
|
|
1015
|
+
pageToken?: string;
|
|
1016
|
+
}
|
|
1017
|
+
/** The response of ListMerchantAccounts. */
|
|
1018
|
+
export interface ListMerchantAccountsResponse {
|
|
1019
|
+
/** The page. */
|
|
1020
|
+
merchantAccounts?: MerchantAccount[];
|
|
1021
|
+
/** The token of the next page; empty on the last page. */
|
|
1022
|
+
nextPageToken?: string;
|
|
1023
|
+
}
|
|
1024
|
+
/** The request of ListRevenueFacts. */
|
|
1025
|
+
export interface ListRevenueFactsRequest {
|
|
1026
|
+
/** The org: `orgs/{org}`. */
|
|
1027
|
+
parent: string;
|
|
1028
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1029
|
+
pageSize?: number;
|
|
1030
|
+
/** `next_page_token` of the previous page. */
|
|
1031
|
+
pageToken?: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* AIP-160 filter, comparisons joined with `AND`: `source = "…"` (a source
|
|
1034
|
+
* id or name), `basis`, `store_kind`, `product_ref` (each `=`), and
|
|
1035
|
+
* `day >= "YYYY-MM-DD"`, `day <= "YYYY-MM-DD"`. The days default to the 31
|
|
1036
|
+
* days to today (UTC), and span at most 400 days.
|
|
1037
|
+
*/
|
|
1038
|
+
filter?: string;
|
|
1039
|
+
}
|
|
1040
|
+
/** The response of ListRevenueFacts. */
|
|
1041
|
+
export interface ListRevenueFactsResponse {
|
|
1042
|
+
/** The page, newest day first. */
|
|
1043
|
+
revenueFacts?: RevenueFact[];
|
|
1044
|
+
/** The token of the next page; empty on the last page. */
|
|
1045
|
+
nextPageToken?: string;
|
|
1046
|
+
}
|
|
1047
|
+
/** The request of ListRevenueSources. */
|
|
1048
|
+
export interface ListRevenueSourcesRequest {
|
|
1049
|
+
/** The org to list in: `orgs/{org}`. */
|
|
1050
|
+
parent: string;
|
|
1051
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1052
|
+
pageSize?: number;
|
|
1053
|
+
/** `next_page_token` of the previous page. */
|
|
1054
|
+
pageToken?: string;
|
|
1055
|
+
}
|
|
1056
|
+
/** The response of ListRevenueSources. */
|
|
1057
|
+
export interface ListRevenueSourcesResponse {
|
|
1058
|
+
/** The page, by id, each with its freshness. */
|
|
1059
|
+
revenueSources?: RevenueSource[];
|
|
1060
|
+
/** The token of the next page; empty on the last page. */
|
|
1061
|
+
nextPageToken?: string;
|
|
1062
|
+
}
|
|
1063
|
+
/** The request of ListStoreConnections. */
|
|
1064
|
+
export interface ListStoreConnectionsRequest {
|
|
1065
|
+
/** The parent to list in. */
|
|
1066
|
+
parent: string;
|
|
1067
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1068
|
+
pageSize?: number;
|
|
1069
|
+
/** `next_page_token` of the previous page. */
|
|
1070
|
+
pageToken?: string;
|
|
1071
|
+
/** AIP-160 filter over filterable fields. */
|
|
1072
|
+
filter?: string;
|
|
1073
|
+
}
|
|
1074
|
+
/** The response of ListStoreConnections. */
|
|
1075
|
+
export interface ListStoreConnectionsResponse {
|
|
1076
|
+
/** The page. */
|
|
1077
|
+
storeConnections?: StoreConnection[];
|
|
1078
|
+
/** The token of the next page; empty on the last page. */
|
|
1079
|
+
nextPageToken?: string;
|
|
1080
|
+
}
|
|
1081
|
+
/** The request of ListStorePurchases. */
|
|
1082
|
+
export interface ListStorePurchasesRequest {
|
|
1083
|
+
/** The parent to list in. */
|
|
1084
|
+
parent: string;
|
|
1085
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1086
|
+
pageSize?: number;
|
|
1087
|
+
/** `next_page_token` of the previous page. */
|
|
1088
|
+
pageToken?: string;
|
|
1089
|
+
/** AIP-160 filter over filterable fields, for example `transaction_id = "…"`. */
|
|
1090
|
+
filter?: string;
|
|
1091
|
+
}
|
|
1092
|
+
/** The response of ListStorePurchases. */
|
|
1093
|
+
export interface ListStorePurchasesResponse {
|
|
1094
|
+
/** The page. */
|
|
1095
|
+
storePurchases?: StorePurchase[];
|
|
1096
|
+
/** The token of the next page; empty on the last page. */
|
|
1097
|
+
nextPageToken?: string;
|
|
1098
|
+
}
|
|
1099
|
+
/** The request of ListTaxThresholdStatuses. */
|
|
1100
|
+
export interface ListTaxThresholdStatusesRequest {
|
|
1101
|
+
/** The parent to list in. */
|
|
1102
|
+
parent: string;
|
|
1103
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1104
|
+
pageSize?: number;
|
|
1105
|
+
/** `next_page_token` of the previous page. */
|
|
1106
|
+
pageToken?: string;
|
|
1107
|
+
}
|
|
1108
|
+
/** The response of ListTaxThresholdStatuses. */
|
|
1109
|
+
export interface ListTaxThresholdStatusesResponse {
|
|
1110
|
+
/** The page. */
|
|
1111
|
+
taxThresholdStatuses?: TaxThresholdStatus[];
|
|
1112
|
+
/** The token of the next page; empty on the last page. */
|
|
1113
|
+
nextPageToken?: string;
|
|
1114
|
+
}
|
|
1115
|
+
/** The request of ListUsageEvents. */
|
|
1116
|
+
export interface ListUsageEventsRequest {
|
|
1117
|
+
/** The parent to list in. */
|
|
1118
|
+
parent: string;
|
|
1119
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1120
|
+
pageSize?: number;
|
|
1121
|
+
/** `next_page_token` of the previous page. */
|
|
1122
|
+
pageToken?: string;
|
|
1123
|
+
/** AIP-160 filter, for example `subject = "…"`. */
|
|
1124
|
+
filter?: string;
|
|
1125
|
+
}
|
|
1126
|
+
/** The response of ListUsageEvents. */
|
|
1127
|
+
export interface ListUsageEventsResponse {
|
|
1128
|
+
/** The page. */
|
|
1129
|
+
usageEvents?: UsageEvent[];
|
|
1130
|
+
/** The token of the next page; empty on the last page. */
|
|
1131
|
+
nextPageToken?: string;
|
|
1132
|
+
}
|
|
1133
|
+
/** The request of ListUsageInvoices. */
|
|
1134
|
+
export interface ListUsageInvoicesRequest {
|
|
1135
|
+
/** The parent to list in. */
|
|
1136
|
+
parent: string;
|
|
1137
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1138
|
+
pageSize?: number;
|
|
1139
|
+
/** `next_page_token` of the previous page. */
|
|
1140
|
+
pageToken?: string;
|
|
1141
|
+
/** AIP-160 filter, for example `subject = "…"`. */
|
|
1142
|
+
filter?: string;
|
|
1143
|
+
}
|
|
1144
|
+
/** The response of ListUsageInvoices. */
|
|
1145
|
+
export interface ListUsageInvoicesResponse {
|
|
1146
|
+
/** The page. */
|
|
1147
|
+
usageInvoices?: UsageInvoice[];
|
|
1148
|
+
/** The token of the next page; empty on the last page. */
|
|
1149
|
+
nextPageToken?: string;
|
|
1150
|
+
}
|
|
1151
|
+
/** The request of ListUsageMeterPrices. */
|
|
1152
|
+
export interface ListUsageMeterPricesRequest {
|
|
1153
|
+
/** The parent to list in. */
|
|
1154
|
+
parent: string;
|
|
1155
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1156
|
+
pageSize?: number;
|
|
1157
|
+
/** `next_page_token` of the previous page. */
|
|
1158
|
+
pageToken?: string;
|
|
1159
|
+
/** AIP-160 filter, for example `meter = "tokens"`. */
|
|
1160
|
+
filter?: string;
|
|
1161
|
+
}
|
|
1162
|
+
/** The response of ListUsageMeterPrices. */
|
|
1163
|
+
export interface ListUsageMeterPricesResponse {
|
|
1164
|
+
/** The page. */
|
|
1165
|
+
usageMeterPrices?: UsageMeterPrice[];
|
|
1166
|
+
/** The token of the next page; empty on the last page. */
|
|
1167
|
+
nextPageToken?: string;
|
|
1168
|
+
}
|
|
1169
|
+
/** The request of ListUsageMeters. */
|
|
1170
|
+
export interface ListUsageMetersRequest {
|
|
1171
|
+
/** The parent to list in. */
|
|
1172
|
+
parent: string;
|
|
1173
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1174
|
+
pageSize?: number;
|
|
1175
|
+
/** `next_page_token` of the previous page. */
|
|
1176
|
+
pageToken?: string;
|
|
1177
|
+
}
|
|
1178
|
+
/** The response of ListUsageMeters. */
|
|
1179
|
+
export interface ListUsageMetersResponse {
|
|
1180
|
+
/** The page. */
|
|
1181
|
+
usageMeters?: UsageMeter[];
|
|
1182
|
+
/** The token of the next page; empty on the last page. */
|
|
1183
|
+
nextPageToken?: string;
|
|
1184
|
+
}
|
|
1185
|
+
/** The request of ListUsageTiers. */
|
|
1186
|
+
export interface ListUsageTiersRequest {
|
|
1187
|
+
/** The parent to list in. */
|
|
1188
|
+
parent: string;
|
|
1189
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
1190
|
+
pageSize?: number;
|
|
1191
|
+
/** `next_page_token` of the previous page. */
|
|
1192
|
+
pageToken?: string;
|
|
1193
|
+
/** AIP-160 filter, for example `subject = "…"`. */
|
|
1194
|
+
filter?: string;
|
|
1195
|
+
}
|
|
1196
|
+
/** The response of ListUsageTiers. */
|
|
1197
|
+
export interface ListUsageTiersResponse {
|
|
1198
|
+
/** The page. */
|
|
1199
|
+
usageTiers?: UsageTier[];
|
|
1200
|
+
/** The token of the next page; empty on the last page. */
|
|
1201
|
+
nextPageToken?: string;
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* A Merchant Account is the seller an environment charges as on the web: the
|
|
1205
|
+
* customer's own Stripe account, connected through Stripe Connect OAuth, or
|
|
1206
|
+
* with a restricted key when OAuth cannot be used (the platform's own
|
|
1207
|
+
* products). Sylphx stores the account id, and for a key connection the key
|
|
1208
|
+
* sealed, never in the clear and never returned. `:connect` starts the
|
|
1209
|
+
* connection; the processor's redirect completes an OAuth one.
|
|
1210
|
+
*/
|
|
1211
|
+
export interface MerchantAccount {
|
|
1212
|
+
/**
|
|
1213
|
+
* `orgs/{org}/projects/{project}/envs/{env}/merchant_accounts/{merchant_account}`;
|
|
1214
|
+
* the environment's seller is `default`.
|
|
1215
|
+
*/
|
|
1216
|
+
name?: string;
|
|
1217
|
+
/** `mac_<cell><ulid>`; never reused. */
|
|
1218
|
+
readonly uid?: string;
|
|
1219
|
+
/** Resource metadata. */
|
|
1220
|
+
meta?: common.ResourceMeta;
|
|
1221
|
+
/** The processor: `stripe`. */
|
|
1222
|
+
readonly processor?: string;
|
|
1223
|
+
/** The connected account id, for example `acct_1Nv…`. */
|
|
1224
|
+
readonly accountId?: string;
|
|
1225
|
+
/** Whether the connection is in live mode (false is test mode). */
|
|
1226
|
+
readonly livemode?: boolean;
|
|
1227
|
+
/** `connected` or `disconnected`. */
|
|
1228
|
+
readonly state?: string;
|
|
1229
|
+
/** Whether the account can take payments now. */
|
|
1230
|
+
readonly chargesEnabled?: boolean;
|
|
1231
|
+
/** Whether the account can be paid out. */
|
|
1232
|
+
readonly payoutsEnabled?: boolean;
|
|
1233
|
+
/** The business name the processor holds for the account. */
|
|
1234
|
+
readonly businessName?: string;
|
|
1235
|
+
/** ISO 3166-1 alpha-2 country of the account. */
|
|
1236
|
+
readonly regionCode?: string;
|
|
1237
|
+
/** ISO 4217 default currency of the account, upper case. */
|
|
1238
|
+
readonly defaultCurrencyCode?: string;
|
|
1239
|
+
/** When the processor last confirmed these fields. */
|
|
1240
|
+
readonly refreshTime?: string;
|
|
1241
|
+
/**
|
|
1242
|
+
* How the account is called at the processor: `connect` (the platform's
|
|
1243
|
+
* key acts for a connected account) or `restricted_key` (the account's own
|
|
1244
|
+
* key, held sealed).
|
|
1245
|
+
*/
|
|
1246
|
+
readonly credential?: string;
|
|
1247
|
+
/**
|
|
1248
|
+
* Whether Stripe computes tax on this merchant's checkouts and usage
|
|
1249
|
+
* invoices (its own cost decision: Stripe Tax charges per transaction).
|
|
1250
|
+
* Off by default. Writable through `UpdateMerchantAccount`
|
|
1251
|
+
* (`update_mask = "automatic_tax"`). Turning it on is refused while a live
|
|
1252
|
+
* `post_tax_settlement` credit grant exists.
|
|
1253
|
+
*/
|
|
1254
|
+
automaticTax?: boolean;
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* A Portal Session is a hosted page where a subject manages its
|
|
1258
|
+
* subscriptions, payment method, and invoices.
|
|
1259
|
+
*/
|
|
1260
|
+
export interface PortalSession {
|
|
1261
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/portal_sessions/{portal_session}`. */
|
|
1262
|
+
name?: string;
|
|
1263
|
+
/** `pts_<cell><ulid>`; never reused. */
|
|
1264
|
+
readonly uid?: string;
|
|
1265
|
+
/** Resource metadata. */
|
|
1266
|
+
meta?: common.ResourceMeta;
|
|
1267
|
+
/** Whose portal. */
|
|
1268
|
+
subject?: Subject;
|
|
1269
|
+
/** Where the portal's back link goes. HTTPS only. */
|
|
1270
|
+
returnUrl?: string;
|
|
1271
|
+
/** The hosted page; valid for a few minutes. */
|
|
1272
|
+
readonly url?: string;
|
|
1273
|
+
}
|
|
1274
|
+
/** A Price is one way to pay for a product, named by its lookup key. */
|
|
1275
|
+
export interface Price {
|
|
1276
|
+
/**
|
|
1277
|
+
* The lookup key the app uses; `^[a-z][a-z0-9_]{0,63}$`, unique in the
|
|
1278
|
+
* catalog.
|
|
1279
|
+
*/
|
|
1280
|
+
key?: string;
|
|
1281
|
+
/** Unset for a one-time price; `day`, `week`, `month`, or `year`. */
|
|
1282
|
+
recurringInterval?: string;
|
|
1283
|
+
/** Intervals per period; default 1. */
|
|
1284
|
+
recurringIntervalCount?: number;
|
|
1285
|
+
/**
|
|
1286
|
+
* Unit amount per ISO 4217 currency code in upper case, as a decimal string
|
|
1287
|
+
* of minor units, for example `{"USD": "499", "GBP": "399"}`. The processor's
|
|
1288
|
+
* base currency is `default_currency` when set, else the first currency in
|
|
1289
|
+
* code order.
|
|
1290
|
+
*/
|
|
1291
|
+
unitAmounts?: Record<string, string>;
|
|
1292
|
+
/** `inclusive` (the amount includes tax) or `exclusive`. */
|
|
1293
|
+
taxBehavior?: string;
|
|
1294
|
+
/** Free trial days for a recurring price. */
|
|
1295
|
+
trialDays?: number;
|
|
1296
|
+
/** Whether checkout may sell this price. */
|
|
1297
|
+
archived?: boolean;
|
|
1298
|
+
/**
|
|
1299
|
+
* The processor's base currency: an upper-case ISO 4217 code that is a key of
|
|
1300
|
+
* `unit_amounts`. Unset uses the first currency in code order. Changing it
|
|
1301
|
+
* creates a new processor price under the same lookup key, because the base
|
|
1302
|
+
* currency is immutable there.
|
|
1303
|
+
*/
|
|
1304
|
+
defaultCurrency?: string;
|
|
1305
|
+
}
|
|
1306
|
+
/** A Product is one thing sold, with its prices and the features it grants. */
|
|
1307
|
+
export interface Product {
|
|
1308
|
+
/** The product key; `^[a-z][a-z0-9_]{0,63}$`. */
|
|
1309
|
+
key?: string;
|
|
1310
|
+
/** Shown on checkout and invoices. */
|
|
1311
|
+
displayName?: string;
|
|
1312
|
+
/** Shown on checkout. */
|
|
1313
|
+
description?: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Feature grants: a feature key and, for a `limit` feature, the allowance as
|
|
1316
|
+
* a decimal string; `true` for a boolean feature.
|
|
1317
|
+
*/
|
|
1318
|
+
features?: Record<string, string>;
|
|
1319
|
+
/** The product's prices. */
|
|
1320
|
+
prices?: Price[];
|
|
1321
|
+
/**
|
|
1322
|
+
* Store product ids that sell this product, by store (`app_store`,
|
|
1323
|
+
* `google_play`).
|
|
1324
|
+
*/
|
|
1325
|
+
storeProductIds?: Record<string, string>;
|
|
1326
|
+
/**
|
|
1327
|
+
* Whether one purchase is used up (a pack of game currency) rather than
|
|
1328
|
+
* kept (an unlock or a subscription).
|
|
1329
|
+
*/
|
|
1330
|
+
consumable?: boolean;
|
|
1331
|
+
/**
|
|
1332
|
+
* What one unit grants in the app's own assets, by asset code, as decimal
|
|
1333
|
+
* strings, for example `{"GEMS": "650"}`. Carried in the signed grant so the
|
|
1334
|
+
* app's server credits exactly this.
|
|
1335
|
+
*/
|
|
1336
|
+
grants?: Record<string, string>;
|
|
1337
|
+
/**
|
|
1338
|
+
* The offline licence a paid one-time purchase carries; refused on a
|
|
1339
|
+
* consumable product and on a product with a recurring price.
|
|
1340
|
+
*/
|
|
1341
|
+
licence?: LicencePolicy;
|
|
1342
|
+
}
|
|
1343
|
+
/** The request of RefreshMerchantAccount. */
|
|
1344
|
+
export interface RefreshMerchantAccountRequest {
|
|
1345
|
+
/** The merchant account to read back. */
|
|
1346
|
+
name: string;
|
|
1347
|
+
}
|
|
1348
|
+
/** The request of ReleaseUsageInvoiceCollection. */
|
|
1349
|
+
export interface ReleaseUsageInvoiceCollectionRequest {
|
|
1350
|
+
/** The held invoice to release for collection. */
|
|
1351
|
+
name: string;
|
|
1352
|
+
/** Who releases it, and why: both are kept. */
|
|
1353
|
+
reason: string;
|
|
1354
|
+
}
|
|
1355
|
+
/** The request of ReleaseUsageReservation. */
|
|
1356
|
+
export interface ReleaseUsageReservationRequest {
|
|
1357
|
+
/** The reservation to release. */
|
|
1358
|
+
name: string;
|
|
1359
|
+
}
|
|
1360
|
+
/** The request of ResumeCustomerSubscription. */
|
|
1361
|
+
export interface ResumeCustomerSubscriptionRequest {
|
|
1362
|
+
/** The subscription to resume. */
|
|
1363
|
+
name: string;
|
|
1364
|
+
}
|
|
1365
|
+
/** The request of RetireLicenceKey. */
|
|
1366
|
+
export interface RetireLicenceKeyRequest {
|
|
1367
|
+
/** The key to retire. */
|
|
1368
|
+
name: string;
|
|
1369
|
+
}
|
|
1370
|
+
/** One day or month of a RevenueSummary. */
|
|
1371
|
+
export interface RevenueBucket {
|
|
1372
|
+
/** The day, or the first day of the month. */
|
|
1373
|
+
startDay?: string;
|
|
1374
|
+
/** The bucket's total in minor units of the reporting currency. */
|
|
1375
|
+
total?: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* The weakest basis that counted in the bucket: `final` when every row is
|
|
1378
|
+
* a source's final statement, `estimated` or `booked` otherwise.
|
|
1379
|
+
*/
|
|
1380
|
+
basis?: string;
|
|
1381
|
+
/** A stale source has not reported this bucket yet. */
|
|
1382
|
+
incomplete?: boolean;
|
|
1383
|
+
/** Daily rows of this bucket with no rate yet. */
|
|
1384
|
+
unconvertedCount?: string;
|
|
1385
|
+
/** The bucket per source or product; empty when `split` is `none`. */
|
|
1386
|
+
lines?: RevenueLine[];
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* A Revenue Fact is one line a source reported, in that line's own currency
|
|
1390
|
+
* (ADR §1): read for audit and export. Facts are written by Money's own
|
|
1391
|
+
* bookings and by imports, never through this API.
|
|
1392
|
+
*/
|
|
1393
|
+
export interface RevenueFact {
|
|
1394
|
+
/** `orgs/{org}/revenue_facts/{revenue_fact}`. */
|
|
1395
|
+
name?: string;
|
|
1396
|
+
/** The fact's id: a hash of its source and external key. */
|
|
1397
|
+
readonly uid?: string;
|
|
1398
|
+
/** Resource metadata. */
|
|
1399
|
+
meta?: common.ResourceMeta;
|
|
1400
|
+
/** The source that reported it: `orgs/{org}/revenue_sources/{id}`. */
|
|
1401
|
+
readonly source?: string;
|
|
1402
|
+
/** The source's own identity for the line. */
|
|
1403
|
+
readonly externalKey?: string;
|
|
1404
|
+
/** `booked`, `estimated` or `final`. */
|
|
1405
|
+
readonly basis?: string;
|
|
1406
|
+
/** `transaction`, `day` or `month`. */
|
|
1407
|
+
readonly granularity?: string;
|
|
1408
|
+
/** The source's reporting day; the first of the month for a month row. */
|
|
1409
|
+
readonly day?: string;
|
|
1410
|
+
/** `stripe`, `app_store`, `google_play`, `ad_network` or `other`. */
|
|
1411
|
+
readonly storeKind?: string;
|
|
1412
|
+
/** The account the source reports for. */
|
|
1413
|
+
readonly accountRef?: string;
|
|
1414
|
+
/** The product reference the source uses. */
|
|
1415
|
+
readonly productRef?: string;
|
|
1416
|
+
/** The store's item id. */
|
|
1417
|
+
readonly sku?: string;
|
|
1418
|
+
/** Buyer country (ISO 3166-1 alpha-2), where the source reports it. */
|
|
1419
|
+
readonly regionCode?: string;
|
|
1420
|
+
/** ISO 4217 code of the amounts. */
|
|
1421
|
+
readonly currencyCode?: string;
|
|
1422
|
+
/** What the buyer paid. */
|
|
1423
|
+
readonly gross?: string;
|
|
1424
|
+
/** The store's or processor's fee. */
|
|
1425
|
+
readonly fee?: string;
|
|
1426
|
+
/** Tax. */
|
|
1427
|
+
readonly tax?: string;
|
|
1428
|
+
/** What the org earns. */
|
|
1429
|
+
readonly net?: string;
|
|
1430
|
+
/** Items or orders, where reported. */
|
|
1431
|
+
readonly units?: string;
|
|
1432
|
+
/** The day the money reached the bank; empty until the source says so. */
|
|
1433
|
+
readonly settledOn?: string;
|
|
1434
|
+
}
|
|
1435
|
+
/** One source's or product's share of a total. */
|
|
1436
|
+
export interface RevenueLine {
|
|
1437
|
+
/**
|
|
1438
|
+
* The source's name (`orgs/{org}/revenue_sources/{id}`), or the product as
|
|
1439
|
+
* `{store_kind}/{product_ref}`.
|
|
1440
|
+
*/
|
|
1441
|
+
key?: string;
|
|
1442
|
+
/**
|
|
1443
|
+
* The source's display name, or the product's label; the reference itself
|
|
1444
|
+
* when the product has no label.
|
|
1445
|
+
*/
|
|
1446
|
+
label?: string;
|
|
1447
|
+
/** In minor units of the reporting currency. */
|
|
1448
|
+
total?: string;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* A Revenue Source is one place an org's revenue is read from. `kind`
|
|
1452
|
+
* selects the connector Money implements once (ADR §2). The `money` source
|
|
1453
|
+
* is implicit, one per environment with Money, made the first time Money
|
|
1454
|
+
* books a sale there; it cannot be created or deleted through the API, only
|
|
1455
|
+
* renamed or paused. A connector's credential is sealed and never returned;
|
|
1456
|
+
* connectors arrive kind by kind, and a source of a kind whose connector has
|
|
1457
|
+
* not shipped yet is registered and reported stale until it first syncs.
|
|
1458
|
+
*/
|
|
1459
|
+
export interface RevenueSource {
|
|
1460
|
+
/** `orgs/{org}/revenue_sources/{revenue_source}`. */
|
|
1461
|
+
name?: string;
|
|
1462
|
+
/** The source's id (`rvs-…`); never reused. */
|
|
1463
|
+
readonly uid?: string;
|
|
1464
|
+
/** Resource metadata. */
|
|
1465
|
+
meta?: common.ResourceMeta;
|
|
1466
|
+
/** Desired state. */
|
|
1467
|
+
spec?: RevenueSourceSpec;
|
|
1468
|
+
/** Observed state. */
|
|
1469
|
+
readonly status?: RevenueSourceStatus;
|
|
1470
|
+
}
|
|
1471
|
+
/** RevenueSourceSpec is the caller-writable state of a RevenueSource. */
|
|
1472
|
+
export interface RevenueSourceSpec {
|
|
1473
|
+
/**
|
|
1474
|
+
* `money`, `stripe`, `google_play`, `app_store`, `ad_network`, `file` or
|
|
1475
|
+
* `manual`. Set on create and never changed; `money` is never created.
|
|
1476
|
+
*/
|
|
1477
|
+
kind?: string;
|
|
1478
|
+
/** Shown on summaries and in the console. */
|
|
1479
|
+
displayName?: string;
|
|
1480
|
+
/** A paused source is not synced and cannot be run; its facts still count. */
|
|
1481
|
+
paused?: boolean;
|
|
1482
|
+
/**
|
|
1483
|
+
* The connector's settings (an account id, a bucket, a column mapping),
|
|
1484
|
+
* never a credential. At most 32 entries.
|
|
1485
|
+
*/
|
|
1486
|
+
config?: Record<string, string>;
|
|
1487
|
+
}
|
|
1488
|
+
/** RevenueSourceStatus is the observed state of a RevenueSource. */
|
|
1489
|
+
export interface RevenueSourceStatus {
|
|
1490
|
+
/** The generation this status was computed from. */
|
|
1491
|
+
readonly observedGeneration?: string;
|
|
1492
|
+
/**
|
|
1493
|
+
* `Ready` while the source is fresh; `False` with reason `Stale`,
|
|
1494
|
+
* `Paused` or `NeverSynced` otherwise.
|
|
1495
|
+
*/
|
|
1496
|
+
readonly conditions?: common.Condition[];
|
|
1497
|
+
/**
|
|
1498
|
+
* For a `money` source, the environment it books:
|
|
1499
|
+
* `orgs/{org}/projects/{project}/envs/{env}`. Empty for every other kind.
|
|
1500
|
+
*/
|
|
1501
|
+
readonly environment?: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* When the source last synced successfully. Unset for a `money` source,
|
|
1504
|
+
* which books in real time.
|
|
1505
|
+
*/
|
|
1506
|
+
readonly lastSuccessTime?: string;
|
|
1507
|
+
/** The newest day the source holds, `YYYY-MM-DD`; empty when it holds none. */
|
|
1508
|
+
readonly newestDay?: string;
|
|
1509
|
+
/**
|
|
1510
|
+
* The newest day is older than the kind's normal lag plus one day, or the
|
|
1511
|
+
* source has never synced: summaries name it and mark the days it has not
|
|
1512
|
+
* reported as incomplete.
|
|
1513
|
+
*/
|
|
1514
|
+
readonly stale?: boolean;
|
|
1515
|
+
/** The last run: `running`, `succeeded` or `failed`; empty before the first. */
|
|
1516
|
+
readonly lastRunState?: string;
|
|
1517
|
+
/** The last failed run's error code; never a response body. */
|
|
1518
|
+
readonly lastRunError?: string;
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* The Revenue Summary is an org's revenue over a period, read from the daily
|
|
1522
|
+
* roll-up and never from raw facts (ADR §4), converted into one reporting
|
|
1523
|
+
* currency at each day's rate (§3), with the highest basis counting for each
|
|
1524
|
+
* store, product and day (§1 "Which row counts"). Computed on every read;
|
|
1525
|
+
* nothing writes it.
|
|
1526
|
+
*/
|
|
1527
|
+
export interface RevenueSummary {
|
|
1528
|
+
/** `orgs/{org}/revenue`. */
|
|
1529
|
+
name?: string;
|
|
1530
|
+
/** The org's id. */
|
|
1531
|
+
readonly uid?: string;
|
|
1532
|
+
/** Resource metadata. */
|
|
1533
|
+
readonly meta?: common.ResourceMeta;
|
|
1534
|
+
/** The first day of the period, `YYYY-MM-DD`. */
|
|
1535
|
+
readonly startDay?: string;
|
|
1536
|
+
/** The last day of the period, inclusive. */
|
|
1537
|
+
readonly endDay?: string;
|
|
1538
|
+
/** The reporting currency every converted amount is in. */
|
|
1539
|
+
readonly currencyCode?: string;
|
|
1540
|
+
/** `net` or `gross`. */
|
|
1541
|
+
readonly amount?: string;
|
|
1542
|
+
/** `day` or `month`. */
|
|
1543
|
+
readonly groupBy?: string;
|
|
1544
|
+
/** `none`, `source` or `product`. */
|
|
1545
|
+
readonly split?: string;
|
|
1546
|
+
/** The period's total, in minor units of the reporting currency. */
|
|
1547
|
+
readonly total?: string;
|
|
1548
|
+
/** One bucket per day or month that holds revenue, oldest first. */
|
|
1549
|
+
readonly buckets?: RevenueBucket[];
|
|
1550
|
+
/**
|
|
1551
|
+
* The period's total per source or product, largest first; empty when
|
|
1552
|
+
* `split` is `none`.
|
|
1553
|
+
*/
|
|
1554
|
+
readonly lines?: RevenueLine[];
|
|
1555
|
+
/** Sources that report late: their missing days make the period incomplete. */
|
|
1556
|
+
readonly staleSources?: StaleRevenueSource[];
|
|
1557
|
+
/**
|
|
1558
|
+
* Amounts with no exchange rate for their day yet, in their own currency:
|
|
1559
|
+
* counted here, never in `total`.
|
|
1560
|
+
*/
|
|
1561
|
+
readonly unconverted?: UnconvertedAmount[];
|
|
1562
|
+
/** Daily rows that had no rate and are in `unconverted`. */
|
|
1563
|
+
readonly unconvertedCount?: string;
|
|
1564
|
+
/** A stale source has not reported some day of the period. */
|
|
1565
|
+
readonly incomplete?: boolean;
|
|
1566
|
+
}
|
|
1567
|
+
/** The request of RunRevenueSource. */
|
|
1568
|
+
export interface RunRevenueSourceRequest {
|
|
1569
|
+
/** The source to run. */
|
|
1570
|
+
name: string;
|
|
1571
|
+
/**
|
|
1572
|
+
* `sync` (default) reads what is new; `backfill` re-reads the period
|
|
1573
|
+
* `start_day` to `end_day`.
|
|
1574
|
+
*/
|
|
1575
|
+
mode?: string;
|
|
1576
|
+
/** The first day of a backfill, `YYYY-MM-DD`. */
|
|
1577
|
+
startDay?: string;
|
|
1578
|
+
/** The last day of a backfill, `YYYY-MM-DD`, inclusive. */
|
|
1579
|
+
endDay?: string;
|
|
1580
|
+
}
|
|
1581
|
+
/** The response of RunRevenueSource. */
|
|
1582
|
+
export interface RunRevenueSourceResponse {
|
|
1583
|
+
/** The run's id. */
|
|
1584
|
+
run?: string;
|
|
1585
|
+
/** `succeeded`, `failed`, or `running` while a connector works through it. */
|
|
1586
|
+
state?: string;
|
|
1587
|
+
/** The facts the run wrote. */
|
|
1588
|
+
facts?: string;
|
|
1589
|
+
/** The source after the run. */
|
|
1590
|
+
revenueSource?: RevenueSource;
|
|
1591
|
+
}
|
|
1592
|
+
/** The request of SettleUsageReservation. */
|
|
1593
|
+
export interface SettleUsageReservationRequest {
|
|
1594
|
+
/** The reservation to settle. */
|
|
1595
|
+
name: string;
|
|
1596
|
+
/**
|
|
1597
|
+
* What was used, in the meter's base unit; 0 to the granted quantity, or
|
|
1598
|
+
* more after expiry (the work happened).
|
|
1599
|
+
*/
|
|
1600
|
+
quantityUsed: string;
|
|
1601
|
+
/** When the work happened; now when absent. */
|
|
1602
|
+
occurredTime?: string;
|
|
1603
|
+
}
|
|
1604
|
+
/** A source named on a summary because it reports late. */
|
|
1605
|
+
export interface StaleRevenueSource {
|
|
1606
|
+
/** `orgs/{org}/revenue_sources/{id}`. */
|
|
1607
|
+
source?: string;
|
|
1608
|
+
/** The source's display name. */
|
|
1609
|
+
displayName?: string;
|
|
1610
|
+
/** The newest day it holds; empty when it holds none. */
|
|
1611
|
+
newestDay?: string;
|
|
1612
|
+
}
|
|
1613
|
+
/**
|
|
1614
|
+
* A Store Connection is the environment's access to one app store: its App
|
|
1615
|
+
* Store Server API key or Google Play service account, sealed by Money and
|
|
1616
|
+
* never returned, and the apps (bundle ids or package names) it covers.
|
|
1617
|
+
*/
|
|
1618
|
+
export interface StoreConnection {
|
|
1619
|
+
/**
|
|
1620
|
+
* `orgs/{org}/projects/{project}/envs/{env}/store_connections/{store_connection}`;
|
|
1621
|
+
* by convention `app-store` or `google-play`.
|
|
1622
|
+
*/
|
|
1623
|
+
name?: string;
|
|
1624
|
+
/**
|
|
1625
|
+
* `stc_<cell><ulid>`; never reused. Store notifications for this
|
|
1626
|
+
* connection are sent to a URL that carries it.
|
|
1627
|
+
*/
|
|
1628
|
+
readonly uid?: string;
|
|
1629
|
+
/** Resource metadata. */
|
|
1630
|
+
meta?: common.ResourceMeta;
|
|
1631
|
+
/** Desired state. */
|
|
1632
|
+
spec?: StoreConnectionSpec;
|
|
1633
|
+
/** Observed state. */
|
|
1634
|
+
readonly status?: StoreConnectionStatus;
|
|
1635
|
+
}
|
|
1636
|
+
/** StoreConnectionSpec is the caller-writable state of a StoreConnection. */
|
|
1637
|
+
export interface StoreConnectionSpec {
|
|
1638
|
+
/** The App Store. */
|
|
1639
|
+
appStore?: AppStoreConnection;
|
|
1640
|
+
/** Google Play. */
|
|
1641
|
+
googlePlay?: GooglePlayConnection;
|
|
1642
|
+
/**
|
|
1643
|
+
* Accept purchases the store marks as sandbox or license-test. Off: a
|
|
1644
|
+
* sandbox purchase is refused. On a `production` App Store connection it
|
|
1645
|
+
* also takes App Review and TestFlight purchases, read back from the
|
|
1646
|
+
* sandbox and recorded and granted as `sandbox`, never as production.
|
|
1647
|
+
*/
|
|
1648
|
+
allowSandbox?: boolean;
|
|
1649
|
+
/**
|
|
1650
|
+
* Refuse a purchase that does not carry the subject's account token (App
|
|
1651
|
+
* Store `appAccountToken`, Play `obfuscatedAccountId`).
|
|
1652
|
+
*/
|
|
1653
|
+
requireAccountToken?: boolean;
|
|
1654
|
+
/**
|
|
1655
|
+
* Let an app with no server verify its own purchases against this
|
|
1656
|
+
* connection (`store_purchases:clientVerify`, callable with a publishable
|
|
1657
|
+
* key). Off by default, including for every connection created before this
|
|
1658
|
+
* field existed; only a secret key holding `billing:write` can turn it on.
|
|
1659
|
+
*/
|
|
1660
|
+
clientVerify?: boolean;
|
|
1661
|
+
}
|
|
1662
|
+
/** StoreConnectionStatus is the observed state of a StoreConnection. */
|
|
1663
|
+
export interface StoreConnectionStatus {
|
|
1664
|
+
/** The generation this status was computed from. */
|
|
1665
|
+
readonly observedGeneration?: string;
|
|
1666
|
+
/** Ready when a credential is stored. */
|
|
1667
|
+
readonly conditions?: common.Condition[];
|
|
1668
|
+
/** Whether a credential is stored. */
|
|
1669
|
+
readonly credentialSet?: boolean;
|
|
1670
|
+
/** Where the store sends its notifications for this connection. */
|
|
1671
|
+
readonly notificationUrl?: string;
|
|
1672
|
+
/** The service account's email, read from the stored key (Play only). */
|
|
1673
|
+
readonly serviceAccountEmail?: string;
|
|
1674
|
+
}
|
|
1675
|
+
/**
|
|
1676
|
+
* A Store Purchase is one store transaction Money verified with the store and
|
|
1677
|
+
* bound to one subject. Re-verifying it returns the same record and grant.
|
|
1678
|
+
*/
|
|
1679
|
+
export interface StorePurchase {
|
|
1680
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/store_purchases/{store_purchase}`. */
|
|
1681
|
+
name?: string;
|
|
1682
|
+
/** `spu_<cell><ulid>`; never reused. */
|
|
1683
|
+
readonly uid?: string;
|
|
1684
|
+
/** Resource metadata. */
|
|
1685
|
+
meta?: common.ResourceMeta;
|
|
1686
|
+
/** Who it belongs to. */
|
|
1687
|
+
readonly subject?: Subject;
|
|
1688
|
+
/** `app_store` or `google_play`. */
|
|
1689
|
+
readonly store?: string;
|
|
1690
|
+
/** The store product id. */
|
|
1691
|
+
readonly productId?: string;
|
|
1692
|
+
/** The catalog product it sells, when the catalog maps the store product. */
|
|
1693
|
+
readonly product?: string;
|
|
1694
|
+
/** The bundle id or package name. */
|
|
1695
|
+
readonly bundleOrPackage?: string;
|
|
1696
|
+
/** The store's transaction id (App Store transaction id, Play order id). */
|
|
1697
|
+
readonly transactionId?: string;
|
|
1698
|
+
/** The first transaction of a subscription or restored purchase. */
|
|
1699
|
+
readonly originalTransactionId?: string;
|
|
1700
|
+
/** Units bought. */
|
|
1701
|
+
readonly quantity?: number;
|
|
1702
|
+
/** `production` or `sandbox`. */
|
|
1703
|
+
readonly environment?: string;
|
|
1704
|
+
/** `purchased`, `pending`, or `revoked`. */
|
|
1705
|
+
readonly state?: string;
|
|
1706
|
+
/** When the store says it was bought. */
|
|
1707
|
+
readonly purchaseTime?: string;
|
|
1708
|
+
/** When the store refunded or revoked it. */
|
|
1709
|
+
readonly revokeTime?: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* The price the store charged, in minor units of `currency`, when the store
|
|
1712
|
+
* reports it.
|
|
1713
|
+
*/
|
|
1714
|
+
readonly price?: string;
|
|
1715
|
+
/** ISO 4217 currency of `price`. */
|
|
1716
|
+
readonly currencyCode?: string;
|
|
1717
|
+
/** The subscription it belongs to, for a subscription purchase. */
|
|
1718
|
+
readonly customerSubscription?: string;
|
|
1719
|
+
/**
|
|
1720
|
+
* ISO 3166-1 alpha-2 country of the buyer's storefront, upper case; empty
|
|
1721
|
+
* when the store did not report one.
|
|
1722
|
+
*/
|
|
1723
|
+
readonly regionCode?: string;
|
|
1724
|
+
/**
|
|
1725
|
+
* When the store says the first purchase of this subscription or restored
|
|
1726
|
+
* purchase was made; unset when it did not report one.
|
|
1727
|
+
*/
|
|
1728
|
+
readonly originalPurchaseTime?: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* Revoked after it was delivered, and its goods come back: its
|
|
1731
|
+
* entitlements ended, and the app takes back the assets its grant credited,
|
|
1732
|
+
* up to what the subject still holds. False while it stands, and for a
|
|
1733
|
+
* refund the catalog's `refund_claw_back` lets the subject keep.
|
|
1734
|
+
*/
|
|
1735
|
+
readonly clawBack?: boolean;
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* A Subject is who pays and holds entitlements: exactly one of an end user
|
|
1739
|
+
* or a customer organization of the app.
|
|
1740
|
+
*/
|
|
1741
|
+
export interface Subject {
|
|
1742
|
+
/** An end user's id (Sylphx Auth, or the app's own OIDC issuer). */
|
|
1743
|
+
endUser?: string;
|
|
1744
|
+
/** A customer organization's id. */
|
|
1745
|
+
customerOrganization?: string;
|
|
1746
|
+
}
|
|
1747
|
+
/** The request of SyncCatalog. */
|
|
1748
|
+
export interface SyncCatalogRequest {
|
|
1749
|
+
/** The catalog to push. */
|
|
1750
|
+
name: string;
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* A Tax Threshold Status is where the environment's consumer (B2C) paid
|
|
1754
|
+
* sales stand against one jurisdiction's registration threshold for digital
|
|
1755
|
+
* services (docs/services/money/web-payments.md, "Tax registration
|
|
1756
|
+
* thresholds"). It is computed on read from the sales Money recorded and the
|
|
1757
|
+
* threshold table; nothing about it is written by a caller.
|
|
1758
|
+
*/
|
|
1759
|
+
export interface TaxThresholdStatus {
|
|
1760
|
+
/**
|
|
1761
|
+
* `orgs/{org}/projects/{project}/envs/{env}/tax_threshold_statuses/{threshold}`,
|
|
1762
|
+
* the threshold's id (`au-gst`, `us-tx`).
|
|
1763
|
+
*/
|
|
1764
|
+
name?: string;
|
|
1765
|
+
/** The threshold's id, as in `name`. */
|
|
1766
|
+
readonly uid?: string;
|
|
1767
|
+
/** Resource metadata; not set for a computed view. */
|
|
1768
|
+
meta?: common.ResourceMeta;
|
|
1769
|
+
/** The jurisdiction's country, upper-case ISO 3166-1 alpha-2. */
|
|
1770
|
+
readonly regionCode?: string;
|
|
1771
|
+
/** The jurisdiction's subdivision (a US state, `TX`); empty for a country. */
|
|
1772
|
+
readonly subdivisionCode?: string;
|
|
1773
|
+
/** The tax the threshold registers for, for example `GST`. */
|
|
1774
|
+
readonly taxName?: string;
|
|
1775
|
+
/** The threshold's currency, upper-case ISO 4217. */
|
|
1776
|
+
readonly currencyCode?: string;
|
|
1777
|
+
/**
|
|
1778
|
+
* The amount that triggers registration, integer minor units of
|
|
1779
|
+
* `currency_code`; "0" when the threshold is a transaction count only.
|
|
1780
|
+
*/
|
|
1781
|
+
readonly thresholdAmount?: string;
|
|
1782
|
+
/** The transaction count that triggers registration; 0 when none. */
|
|
1783
|
+
readonly thresholdTransactionCount?: string;
|
|
1784
|
+
/** `rolling_12_months`, `calendar_year`, or `prior_or_current_calendar_year`. */
|
|
1785
|
+
readonly windowKind?: string;
|
|
1786
|
+
/** The start (inclusive) of the window the figures below cover. */
|
|
1787
|
+
readonly windowStartTime?: string;
|
|
1788
|
+
/** The end of the window (the moment of the read for a rolling window). */
|
|
1789
|
+
readonly windowEndTime?: string;
|
|
1790
|
+
/**
|
|
1791
|
+
* The consumer paid sales in the window, net of tax, in `currency_code`
|
|
1792
|
+
* minor units. Business sales (a tax id was given) are excluded.
|
|
1793
|
+
*/
|
|
1794
|
+
readonly salesAmount?: string;
|
|
1795
|
+
/** The number of those sales. */
|
|
1796
|
+
readonly salesTransactionCount?: string;
|
|
1797
|
+
/**
|
|
1798
|
+
* How close the sales are to the threshold, in whole percent (the higher of
|
|
1799
|
+
* the amount and the count); it can exceed 100.
|
|
1800
|
+
*/
|
|
1801
|
+
readonly percent?: number;
|
|
1802
|
+
/**
|
|
1803
|
+
* The highest alert level (70, 90, 100) already sent for this window; 0 if
|
|
1804
|
+
* none.
|
|
1805
|
+
*/
|
|
1806
|
+
readonly alertedPercent?: number;
|
|
1807
|
+
/**
|
|
1808
|
+
* Currencies of sales that could not be converted into `currency_code`
|
|
1809
|
+
* (no rate in the rate table) and so are not counted in `sales_amount`.
|
|
1810
|
+
*/
|
|
1811
|
+
readonly unconvertedCurrencyCodes?: string[];
|
|
1812
|
+
/** The authority page the threshold comes from. */
|
|
1813
|
+
readonly sourceUrl?: string;
|
|
1814
|
+
/** When the threshold row took effect. */
|
|
1815
|
+
readonly effectiveTime?: string;
|
|
1816
|
+
}
|
|
1817
|
+
/** An amount a summary could not convert yet. */
|
|
1818
|
+
export interface UnconvertedAmount {
|
|
1819
|
+
/** ISO 4217 code. */
|
|
1820
|
+
currencyCode?: string;
|
|
1821
|
+
/** In minor units of that currency. */
|
|
1822
|
+
amount?: string;
|
|
1823
|
+
}
|
|
1824
|
+
/** The request of UpdateCatalog. */
|
|
1825
|
+
export interface UpdateCatalogRequest {
|
|
1826
|
+
/** The catalog to write; `name` identifies it. */
|
|
1827
|
+
catalog: Catalog;
|
|
1828
|
+
/** The fields to write; unset writes every populated field. */
|
|
1829
|
+
updateMask?: string;
|
|
1830
|
+
/** Create the catalog when it does not exist (declarative upsert). */
|
|
1831
|
+
allowMissing?: boolean;
|
|
1832
|
+
/** Validate and return the result without writing anything. */
|
|
1833
|
+
validateOnly?: boolean;
|
|
1834
|
+
}
|
|
1835
|
+
/** The request of UpdateCheckoutPolicy. */
|
|
1836
|
+
export interface UpdateCheckoutPolicyRequest {
|
|
1837
|
+
/** The checkout policy to write; `name` identifies it. */
|
|
1838
|
+
checkoutPolicy: CheckoutPolicy;
|
|
1839
|
+
/** The fields to write; unset writes every populated field. */
|
|
1840
|
+
updateMask?: string;
|
|
1841
|
+
/** Create the policy when it does not exist (declarative upsert). */
|
|
1842
|
+
allowMissing?: boolean;
|
|
1843
|
+
/** Validate and return the result without writing anything. */
|
|
1844
|
+
validateOnly?: boolean;
|
|
1845
|
+
}
|
|
1846
|
+
/** The request of UpdateCustomerSubscriptionQuantity. */
|
|
1847
|
+
export interface UpdateCustomerSubscriptionQuantityRequest {
|
|
1848
|
+
/** The subscription to change. */
|
|
1849
|
+
name: string;
|
|
1850
|
+
/**
|
|
1851
|
+
* The new quantity (seats) of the subscription's one item; at least 1.
|
|
1852
|
+
* To end the subscription, cancel it.
|
|
1853
|
+
*/
|
|
1854
|
+
quantity: string;
|
|
1855
|
+
/** How the change is billed; unspecified is `create_prorations`. */
|
|
1856
|
+
prorationBehavior?: ProrationBehavior;
|
|
1857
|
+
}
|
|
1858
|
+
/** The request of UpdateMerchantAccount. */
|
|
1859
|
+
export interface UpdateMerchantAccountRequest {
|
|
1860
|
+
/** The merchant account with its new values; `name` selects it. */
|
|
1861
|
+
merchantAccount: MerchantAccount;
|
|
1862
|
+
/** The fields to change. */
|
|
1863
|
+
updateMask?: string;
|
|
1864
|
+
}
|
|
1865
|
+
/** The request of UpdateRevenueSource. */
|
|
1866
|
+
export interface UpdateRevenueSourceRequest {
|
|
1867
|
+
/** The source with its new values; `name` addresses it. */
|
|
1868
|
+
revenueSource: RevenueSource;
|
|
1869
|
+
/**
|
|
1870
|
+
* The fields to change: `spec.display_name`, `spec.paused`,
|
|
1871
|
+
* `spec.config`. Empty changes every one the body sets.
|
|
1872
|
+
*/
|
|
1873
|
+
updateMask?: string;
|
|
1874
|
+
/** Validate only; write nothing. */
|
|
1875
|
+
validateOnly?: boolean;
|
|
1876
|
+
}
|
|
1877
|
+
/** The request of UpdateStoreConnection. */
|
|
1878
|
+
export interface UpdateStoreConnectionRequest {
|
|
1879
|
+
/** The store connection to update; `name` identifies it. */
|
|
1880
|
+
storeConnection: StoreConnection;
|
|
1881
|
+
/** The fields to write; unset writes every populated field. */
|
|
1882
|
+
updateMask?: string;
|
|
1883
|
+
/** Create the store connection when it does not exist (declarative upsert). */
|
|
1884
|
+
allowMissing?: boolean;
|
|
1885
|
+
/** Validate and return the result without writing anything. */
|
|
1886
|
+
validateOnly?: boolean;
|
|
1887
|
+
}
|
|
1888
|
+
/** The request of UpdateUsageMeter. */
|
|
1889
|
+
export interface UpdateUsageMeterRequest {
|
|
1890
|
+
/** The usage meter with its new values; `name` selects it. */
|
|
1891
|
+
usageMeter: UsageMeter;
|
|
1892
|
+
/** The fields to change. */
|
|
1893
|
+
updateMask?: string;
|
|
1894
|
+
}
|
|
1895
|
+
/** The request of UpdateUsageSettings. */
|
|
1896
|
+
export interface UpdateUsageSettingsRequest {
|
|
1897
|
+
/** The usage settings with its new values; `name` selects it. */
|
|
1898
|
+
usageSettings: UsageSettings;
|
|
1899
|
+
/** The fields to change. */
|
|
1900
|
+
updateMask?: string;
|
|
1901
|
+
}
|
|
1902
|
+
/** The request of UpdateUsageTier. */
|
|
1903
|
+
export interface UpdateUsageTierRequest {
|
|
1904
|
+
/** The usage tier with its new values; `name` selects it. */
|
|
1905
|
+
usageTier: UsageTier;
|
|
1906
|
+
/** The fields to change. */
|
|
1907
|
+
updateMask?: string;
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* A Usage Event is rated usage, immutable: what a settled reservation or a
|
|
1911
|
+
* direct record produced.
|
|
1912
|
+
*/
|
|
1913
|
+
export interface UsageEvent {
|
|
1914
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/usage_events/{usage_event}`. */
|
|
1915
|
+
name?: string;
|
|
1916
|
+
/** `uevt_<cell><ulid>`; never reused. */
|
|
1917
|
+
readonly uid?: string;
|
|
1918
|
+
/** Resource metadata. */
|
|
1919
|
+
meta?: common.ResourceMeta;
|
|
1920
|
+
/** Who used it. */
|
|
1921
|
+
subject?: Subject;
|
|
1922
|
+
/** As on UsageReservation. */
|
|
1923
|
+
subjectProof?: string;
|
|
1924
|
+
/** As on UsageReservation. */
|
|
1925
|
+
actorProof?: string;
|
|
1926
|
+
/** The meter's lookup key. */
|
|
1927
|
+
meter?: string;
|
|
1928
|
+
/** How much, in the meter's base unit. */
|
|
1929
|
+
quantity?: string;
|
|
1930
|
+
/** When the work happened. */
|
|
1931
|
+
occurredTime?: string;
|
|
1932
|
+
/** The rated amount, nano-minor, a decimal string. */
|
|
1933
|
+
readonly amountNano?: string;
|
|
1934
|
+
/** The reservation it settled, when it did. */
|
|
1935
|
+
readonly usageReservation?: string;
|
|
1936
|
+
/** Settled after the reservation expired; the usage is still recorded. */
|
|
1937
|
+
readonly late?: boolean;
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* A Usage Invoice is Money's own invoice for a subject's usage. A `threshold`
|
|
1941
|
+
* invoice is cut mid-month; the `period` invoice nets those off.
|
|
1942
|
+
*/
|
|
1943
|
+
export interface UsageInvoice {
|
|
1944
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/usage_invoices/{usage_invoice}`. */
|
|
1945
|
+
name?: string;
|
|
1946
|
+
/** `uinv_<cell><ulid>`; never reused. */
|
|
1947
|
+
readonly uid?: string;
|
|
1948
|
+
/** Resource metadata. */
|
|
1949
|
+
meta?: common.ResourceMeta;
|
|
1950
|
+
/** The invoice number. */
|
|
1951
|
+
readonly number?: string;
|
|
1952
|
+
/** Who owes it. */
|
|
1953
|
+
readonly subject?: Subject;
|
|
1954
|
+
/** The month, `YYYY-MM`. */
|
|
1955
|
+
readonly period?: string;
|
|
1956
|
+
/** `period` or `threshold`. */
|
|
1957
|
+
readonly kind?: string;
|
|
1958
|
+
/** `tax_pending`, `issued`, or `void`. */
|
|
1959
|
+
readonly state?: string;
|
|
1960
|
+
/** Why it is not issued yet, when `tax_pending` (for example `location_required`, `grant_tax_treatment`). */
|
|
1961
|
+
readonly taxPendingReason?: string;
|
|
1962
|
+
/** The amounts, minor units, decimal strings. */
|
|
1963
|
+
readonly grossMinor?: string;
|
|
1964
|
+
/** Before tax. */
|
|
1965
|
+
readonly subtotalMinor?: string;
|
|
1966
|
+
/** The tax. */
|
|
1967
|
+
readonly taxMinor?: string;
|
|
1968
|
+
/** Credit settled after tax. */
|
|
1969
|
+
readonly postTaxCreditMinor?: string;
|
|
1970
|
+
/** What is owed: subtotal plus tax minus post-tax credit. */
|
|
1971
|
+
readonly totalMinor?: string;
|
|
1972
|
+
/** Paid so far. */
|
|
1973
|
+
readonly amountPaidMinor?: string;
|
|
1974
|
+
/** `standard` or `hold`, fixed at issue. */
|
|
1975
|
+
readonly collectionMode?: string;
|
|
1976
|
+
/** When it was issued. */
|
|
1977
|
+
readonly issueTime?: string;
|
|
1978
|
+
/** When it is due. */
|
|
1979
|
+
readonly dueTime?: string;
|
|
1980
|
+
}
|
|
1981
|
+
/**
|
|
1982
|
+
* A Usage Meter names one kind of usage a merchant bills for: its unit and
|
|
1983
|
+
* whether usage may be recorded without a reservation. The merchant creates
|
|
1984
|
+
* and changes it through this API; its prices are `UsageMeterPrice` records.
|
|
1985
|
+
*/
|
|
1986
|
+
export interface UsageMeter {
|
|
1987
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/usage_meters/{usage_meter}`; the id is the meter key. */
|
|
1988
|
+
name?: string;
|
|
1989
|
+
/** `umtr_<cell><ulid>`; never reused. */
|
|
1990
|
+
readonly uid?: string;
|
|
1991
|
+
/** Resource metadata. */
|
|
1992
|
+
meta?: common.ResourceMeta;
|
|
1993
|
+
/**
|
|
1994
|
+
* The unit of one quantity, for example `token`. It cannot change once the
|
|
1995
|
+
* meter has recorded usage.
|
|
1996
|
+
*/
|
|
1997
|
+
unit?: string;
|
|
1998
|
+
/** A name for people. */
|
|
1999
|
+
displayName?: string;
|
|
2000
|
+
/** Whether usage may be recorded without a reservation. */
|
|
2001
|
+
reservationOptional?: boolean;
|
|
2002
|
+
/** A retired meter (false) refuses new usage; its history stays. */
|
|
2003
|
+
active?: boolean;
|
|
2004
|
+
/**
|
|
2005
|
+
* The unit price in force now, nano-minor, a decimal string; empty before
|
|
2006
|
+
* the meter's first price.
|
|
2007
|
+
*/
|
|
2008
|
+
readonly currentUnitPriceNano?: string;
|
|
2009
|
+
}
|
|
2010
|
+
/**
|
|
2011
|
+
* A Usage Meter Price is one entry of a meter's append-only price history. A
|
|
2012
|
+
* price applies from `effective_time` on, so a change never rewrites usage
|
|
2013
|
+
* already rated.
|
|
2014
|
+
*/
|
|
2015
|
+
export interface UsageMeterPrice {
|
|
2016
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/usage_meter_prices/{usage_meter_price}`. */
|
|
2017
|
+
name?: string;
|
|
2018
|
+
/** `umpr_<cell><ulid>`; never reused. */
|
|
2019
|
+
readonly uid?: string;
|
|
2020
|
+
/** Resource metadata. */
|
|
2021
|
+
meta?: common.ResourceMeta;
|
|
2022
|
+
/** The meter's key. */
|
|
2023
|
+
meter?: string;
|
|
2024
|
+
/** ISO 4217; it must be the environment's currency. */
|
|
2025
|
+
currencyCode?: string;
|
|
2026
|
+
/** List price of one unit, nano-minor (a billionth of a minor unit), a decimal string. */
|
|
2027
|
+
unitPriceNano?: string;
|
|
2028
|
+
/**
|
|
2029
|
+
* When it starts applying; now when absent. Not in the past, and after the
|
|
2030
|
+
* meter's latest price.
|
|
2031
|
+
*/
|
|
2032
|
+
effectiveTime?: string;
|
|
2033
|
+
/** The processor's tax code for the usage line; empty for the merchant's default. */
|
|
2034
|
+
taxCode?: string;
|
|
2035
|
+
}
|
|
2036
|
+
/**
|
|
2037
|
+
* A Usage Reservation holds usage before the work starts. Settling it records
|
|
2038
|
+
* what was used and releases the rest; releasing it records nothing.
|
|
2039
|
+
*/
|
|
2040
|
+
export interface UsageReservation {
|
|
2041
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/usage_reservations/{usage_reservation}`. */
|
|
2042
|
+
name?: string;
|
|
2043
|
+
/** `ures_<cell><ulid>`; never reused. */
|
|
2044
|
+
readonly uid?: string;
|
|
2045
|
+
/** Resource metadata. */
|
|
2046
|
+
meta?: common.ResourceMeta;
|
|
2047
|
+
/** Who uses it. */
|
|
2048
|
+
subject?: Subject;
|
|
2049
|
+
/**
|
|
2050
|
+
* The acting end user's access token, required on every reserve: Money
|
|
2051
|
+
* proves the subject itself, fresh, with the caller's own key
|
|
2052
|
+
* (`auth:sessions:verify`) or the merchant's configured issuer. Never
|
|
2053
|
+
* stored. A raw id is refused with PERMISSION_DENIED (reason `subject_unverified`).
|
|
2054
|
+
*/
|
|
2055
|
+
subjectProof?: string;
|
|
2056
|
+
/**
|
|
2057
|
+
* For a customer organization: the token of the acting user, whose
|
|
2058
|
+
* membership of the organization is checked fresh. The subject is Sylphx
|
|
2059
|
+
* Auth's bare organization id (`acme`), never a resource name. Never stored.
|
|
2060
|
+
*/
|
|
2061
|
+
actorProof?: string;
|
|
2062
|
+
/** The meter's lookup key. */
|
|
2063
|
+
meter?: string;
|
|
2064
|
+
/** The most the work may use, in the meter's base unit. */
|
|
2065
|
+
maxQuantity?: string;
|
|
2066
|
+
/** How long the hold lasts, at most `600s`; default `600s`. */
|
|
2067
|
+
ttl?: string;
|
|
2068
|
+
/** What was granted: at most `max_quantity`, less under headroom. */
|
|
2069
|
+
readonly grantedQuantity?: string;
|
|
2070
|
+
/** `held`, `settled`, or `released`. */
|
|
2071
|
+
readonly state?: string;
|
|
2072
|
+
/** When the hold ends. */
|
|
2073
|
+
readonly expireTime?: string;
|
|
2074
|
+
/**
|
|
2075
|
+
* While enforcement is dark: why it would have been refused
|
|
2076
|
+
* (`spend_limit_reached`, `no_payment_method`, `account_suspended`); empty otherwise.
|
|
2077
|
+
*/
|
|
2078
|
+
readonly darkRefusal?: string;
|
|
2079
|
+
}
|
|
2080
|
+
/**
|
|
2081
|
+
* Usage Settings is the environment's usage-billing account: its currency, the
|
|
2082
|
+
* enforcement switch (dark until a merchant admin turns it on), the free
|
|
2083
|
+
* allowance, the dunning schedule and an extra token issuer. One per
|
|
2084
|
+
* environment (AIP-156 singleton, id `default`).
|
|
2085
|
+
*/
|
|
2086
|
+
export interface UsageSettings {
|
|
2087
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/usage_settings/default`. */
|
|
2088
|
+
name?: string;
|
|
2089
|
+
/** `uset_<cell><ulid>`; never reused. */
|
|
2090
|
+
readonly uid?: string;
|
|
2091
|
+
/** Resource metadata. */
|
|
2092
|
+
meta?: common.ResourceMeta;
|
|
2093
|
+
/** The currency usage is rated and invoiced in (ISO 4217, upper case). */
|
|
2094
|
+
currencyCode?: string;
|
|
2095
|
+
/**
|
|
2096
|
+
* While false a reservation is always granted and a would-be refusal is
|
|
2097
|
+
* only recorded. Off until the merchant's admin turns it on.
|
|
2098
|
+
*/
|
|
2099
|
+
enforcementEnabled?: boolean;
|
|
2100
|
+
/**
|
|
2101
|
+
* What a subject with no payment method may use each month, nano-minor,
|
|
2102
|
+
* as a decimal string.
|
|
2103
|
+
*/
|
|
2104
|
+
freeAllowanceNano?: string;
|
|
2105
|
+
/** Days after an invoice's due time before the subject is past due. */
|
|
2106
|
+
pastDueGraceDays?: number;
|
|
2107
|
+
/** Days after an invoice's due time before the subject is suspended. */
|
|
2108
|
+
suspendGraceDays?: number;
|
|
2109
|
+
/**
|
|
2110
|
+
* A further token issuer (the merchant's own OIDC provider) besides Sylphx
|
|
2111
|
+
* Auth; empty for Sylphx Auth only. It needs `extra_issuer_jwks_url`.
|
|
2112
|
+
*/
|
|
2113
|
+
extraIssuer?: string;
|
|
2114
|
+
/** The issuer's HTTPS JWKS URL. */
|
|
2115
|
+
extraIssuerJwksUrl?: string;
|
|
2116
|
+
/** The audience that issuer's tokens must carry; required with `extra_issuer`. */
|
|
2117
|
+
extraIssuerAudience?: string;
|
|
2118
|
+
/**
|
|
2119
|
+
* The claim that names a customer organization in that issuer's tokens;
|
|
2120
|
+
* empty means the issuer proves no organization subject.
|
|
2121
|
+
*/
|
|
2122
|
+
extraIssuerOrgClaim?: string;
|
|
2123
|
+
}
|
|
2124
|
+
/** A subject's standing. */
|
|
2125
|
+
export interface UsageStanding {
|
|
2126
|
+
/** `active`, `past_due`, or `suspended`. */
|
|
2127
|
+
state?: string;
|
|
2128
|
+
/** Whether a payment method is on file. */
|
|
2129
|
+
paymentMethodOnFile?: boolean;
|
|
2130
|
+
/**
|
|
2131
|
+
* What the subject may still use now, minor units, a decimal string; empty
|
|
2132
|
+
* when it has no limit.
|
|
2133
|
+
*/
|
|
2134
|
+
headroomMinor?: string;
|
|
2135
|
+
/** The amount that makes a threshold invoice be cut, minor units. */
|
|
2136
|
+
thresholdMinor?: string;
|
|
2137
|
+
}
|
|
2138
|
+
/**
|
|
2139
|
+
* A Usage Tier is a trust tier of the merchant's own: the limits a subject
|
|
2140
|
+
* starts at and rises to with payment history. Rank 0 is the base tier.
|
|
2141
|
+
*/
|
|
2142
|
+
export interface UsageTier {
|
|
2143
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/usage_tiers/{usage_tier}`; the id is the tier key. */
|
|
2144
|
+
name?: string;
|
|
2145
|
+
/** `utier_<cell><ulid>`; never reused. */
|
|
2146
|
+
readonly uid?: string;
|
|
2147
|
+
/** Resource metadata. */
|
|
2148
|
+
meta?: common.ResourceMeta;
|
|
2149
|
+
/** Order of tiers; 0 is the base tier. */
|
|
2150
|
+
rank?: number;
|
|
2151
|
+
/** Daily exposure limit in minor units, a decimal string; empty for none. */
|
|
2152
|
+
dailyLimitMinor?: string;
|
|
2153
|
+
/** Monthly exposure limit in minor units, a decimal string; empty for none. */
|
|
2154
|
+
monthlyLimitMinor?: string;
|
|
2155
|
+
/** The amount an invoice would make due at which a threshold invoice is cut. */
|
|
2156
|
+
thresholdMinor?: string;
|
|
2157
|
+
/** Paid invoices needed to reach this tier. */
|
|
2158
|
+
requiresPaidInvoices?: number;
|
|
2159
|
+
/** Paid total, minor units, needed to reach this tier. */
|
|
2160
|
+
requiresPaidMinor?: string;
|
|
2161
|
+
}
|
|
2162
|
+
/** The request of VerifyStorePurchase. */
|
|
2163
|
+
export interface VerifyStorePurchaseRequest {
|
|
2164
|
+
/** The environment the purchase is verified in. */
|
|
2165
|
+
parent: string;
|
|
2166
|
+
/** Who bought it. */
|
|
2167
|
+
subject: Subject;
|
|
2168
|
+
/** `app_store` or `google_play`. */
|
|
2169
|
+
store: string;
|
|
2170
|
+
/** App Store: the StoreKit 2 signed transaction (`jwsRepresentation`). */
|
|
2171
|
+
signedTransaction?: string;
|
|
2172
|
+
/** Google Play: the purchase token. */
|
|
2173
|
+
purchaseToken?: string;
|
|
2174
|
+
/** Google Play: the store product id (for a subscription, its id). */
|
|
2175
|
+
productId?: string;
|
|
2176
|
+
/** Google Play: the package name, when the connection covers several. */
|
|
2177
|
+
packageName?: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* Verify fully and return the verdict Money would give, without writing
|
|
2180
|
+
* anything: no record, no subject binding, no Google Play acknowledge or
|
|
2181
|
+
* consume, no entitlement, no ledger posting, no event, and no signed
|
|
2182
|
+
* `grant_token`. Refusals are exactly the ones a real call gives. For
|
|
2183
|
+
* moving existing store sales onto Money, by comparing verdicts with the
|
|
2184
|
+
* seller's own path before switching.
|
|
2185
|
+
*/
|
|
2186
|
+
validateOnly?: boolean;
|
|
2187
|
+
/**
|
|
2188
|
+
* App Store, instead of `signed_transaction`: the transaction id, for apps
|
|
2189
|
+
* on original StoreKit whose receipts carry no signed transaction. Money
|
|
2190
|
+
* reads the transaction from Apple with the connection's key; Apple's
|
|
2191
|
+
* signed answer is the proof.
|
|
2192
|
+
*/
|
|
2193
|
+
transactionId?: string;
|
|
2194
|
+
/** App Store, with `transaction_id`: the app's bundle id. */
|
|
2195
|
+
bundleId?: string;
|
|
2196
|
+
}
|
|
2197
|
+
/** The response of VerifyStorePurchase. */
|
|
2198
|
+
export interface VerifyStorePurchaseResponse {
|
|
2199
|
+
/** The verified purchase. */
|
|
2200
|
+
storePurchase?: StorePurchase;
|
|
2201
|
+
/**
|
|
2202
|
+
* A compact EdDSA JWS (`typ` `money-grant+jwt`) the app's server or client
|
|
2203
|
+
* verifies offline against Money's published keys; it names the subject,
|
|
2204
|
+
* the store product, the transaction, the quantity, and the catalog grants.
|
|
2205
|
+
*/
|
|
2206
|
+
grantToken?: string;
|
|
2207
|
+
/**
|
|
2208
|
+
* Whether this transaction was verified before; the record and grant are
|
|
2209
|
+
* the same.
|
|
2210
|
+
*/
|
|
2211
|
+
alreadyVerified?: boolean;
|
|
2212
|
+
/** The subscription, for a subscription purchase. */
|
|
2213
|
+
customerSubscription?: CustomerSubscription;
|
|
2214
|
+
/**
|
|
2215
|
+
* With `validate_only`, the claims the grant would carry (the same JSON a
|
|
2216
|
+
* signed `grant_token` holds); empty otherwise.
|
|
2217
|
+
*/
|
|
2218
|
+
grantClaims?: Record<string, unknown>;
|
|
2219
|
+
/**
|
|
2220
|
+
* `ClientVerifyStorePurchase` only: what Money did to finish the purchase
|
|
2221
|
+
* with the store: `acknowledged`, `consumed`, or `retry` (the store call
|
|
2222
|
+
* failed; call again later). Empty on `VerifyStorePurchase`.
|
|
2223
|
+
*/
|
|
2224
|
+
storeCompletion?: string;
|
|
2225
|
+
/**
|
|
2226
|
+
* `ClientVerifyStorePurchase` only: the purchase moved from another install
|
|
2227
|
+
* to the caller (restore). Always false until restore transfer is served.
|
|
2228
|
+
*/
|
|
2229
|
+
transferred?: boolean;
|
|
2230
|
+
}
|
|
2231
|
+
/** FeatureKind is how a feature is granted. */
|
|
2232
|
+
export type FeatureKind = 'boolean' | 'limit' | (string & {});
|
|
2233
|
+
/** LicenceTermUnit is the unit of a licence term. */
|
|
2234
|
+
export type LicenceTermUnit = 'calendar_years' | 'calendar_months' | 'days' | (string & {});
|
|
2235
|
+
/**
|
|
2236
|
+
* ProrationBehavior is how a subscription change is billed for the rest of
|
|
2237
|
+
* the current period.
|
|
2238
|
+
*/
|
|
2239
|
+
export type ProrationBehavior = 'create_prorations' | 'none' | 'always_invoice' | (string & {});
|
|
2240
|
+
/**
|
|
2241
|
+
* MoneyService is Sylphx Money's customer payments: an app sells to its own
|
|
2242
|
+
* users through the stores and processors Money integrates once, and asks one
|
|
2243
|
+
* question on its request path, "does this subject have this feature"
|
|
2244
|
+
* (docs/services/money/customer-payments.md).
|
|
2245
|
+
*
|
|
2246
|
+
* Namespace of Sylphx Money on `Sylphx`.
|
|
2247
|
+
*/
|
|
2248
|
+
export declare class MoneyApi {
|
|
2249
|
+
/** The `price_catalogs` collection. */
|
|
2250
|
+
readonly priceCatalogs: PriceCatalogsCollection;
|
|
2251
|
+
/** The `checkout_policies` collection. */
|
|
2252
|
+
readonly checkoutPolicies: CheckoutPoliciesCollection;
|
|
2253
|
+
/** The `store_connections` collection. */
|
|
2254
|
+
readonly storeConnections: StoreConnectionsCollection;
|
|
2255
|
+
/** The `store_purchases` collection. */
|
|
2256
|
+
readonly storePurchases: StorePurchasesCollection;
|
|
2257
|
+
/** The `customer_subscriptions` collection. */
|
|
2258
|
+
readonly customerSubscriptions: CustomerSubscriptionsCollection;
|
|
2259
|
+
/** The `entitlement_grants` collection. */
|
|
2260
|
+
readonly entitlementGrants: EntitlementGrantsCollection;
|
|
2261
|
+
/** The `merchant_accounts` collection. */
|
|
2262
|
+
readonly merchantAccounts: MerchantAccountsCollection;
|
|
2263
|
+
/** The `checkout_sessions` collection. */
|
|
2264
|
+
readonly checkoutSessions: CheckoutSessionsCollection;
|
|
2265
|
+
/** The `tax_threshold_statuses` collection. */
|
|
2266
|
+
readonly taxThresholdStatuses: TaxThresholdStatusesCollection;
|
|
2267
|
+
/** The `portal_sessions` collection. */
|
|
2268
|
+
readonly portalSessions: PortalSessionsCollection;
|
|
2269
|
+
/** The `licence_keys` collection. */
|
|
2270
|
+
readonly licenceKeys: LicenceKeysCollection;
|
|
2271
|
+
/** The `licence_tokens` collection. */
|
|
2272
|
+
readonly licenceTokens: LicenceTokensCollection;
|
|
2273
|
+
/** The `usage_settings` collection. */
|
|
2274
|
+
readonly usageSettings: UsageSettingsCollection;
|
|
2275
|
+
/** The `usage_tiers` collection. */
|
|
2276
|
+
readonly usageTiers: UsageTiersCollection;
|
|
2277
|
+
/** The `usage_reservations` collection. */
|
|
2278
|
+
readonly usageReservations: UsageReservationsCollection;
|
|
2279
|
+
/** The `usage_events` collection. */
|
|
2280
|
+
readonly usageEvents: UsageEventsCollection;
|
|
2281
|
+
/** The `credit_grants` collection. */
|
|
2282
|
+
readonly creditGrants: CreditGrantsCollection;
|
|
2283
|
+
/** The `usage_invoices` collection. */
|
|
2284
|
+
readonly usageInvoices: UsageInvoicesCollection;
|
|
2285
|
+
/** The `usage_meters` collection. */
|
|
2286
|
+
readonly usageMeters: UsageMetersCollection;
|
|
2287
|
+
/** The `usage_meter_prices` collection. */
|
|
2288
|
+
readonly usageMeterPrices: UsageMeterPricesCollection;
|
|
2289
|
+
/** The `revenue_sources` collection. */
|
|
2290
|
+
readonly revenueSources: RevenueSourcesCollection;
|
|
2291
|
+
/** The `revenue` collection. */
|
|
2292
|
+
readonly revenue: RevenueCollection;
|
|
2293
|
+
/** The `revenue_facts` collection. */
|
|
2294
|
+
readonly revenueFacts: RevenueFactsCollection;
|
|
2295
|
+
/** The `exchange_rates` collection. */
|
|
2296
|
+
readonly exchangeRates: ExchangeRatesCollection;
|
|
2297
|
+
constructor(client: runtime.Client);
|
|
2298
|
+
}
|
|
2299
|
+
/** `price_catalogs` of Sylphx Money: Resource type `money.sylphx.com/PriceCatalog`. */
|
|
2300
|
+
export declare class PriceCatalogsCollection {
|
|
2301
|
+
private readonly client;
|
|
2302
|
+
constructor(client: runtime.Client);
|
|
2303
|
+
/**
|
|
2304
|
+
* Gets the environment's catalog.
|
|
2305
|
+
*
|
|
2306
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/price_catalogs/*}` · permission `billing:read` · effect `read`
|
|
2307
|
+
*
|
|
2308
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2309
|
+
*/
|
|
2310
|
+
get(request: GetCatalogRequest): Promise<Catalog>;
|
|
2311
|
+
/**
|
|
2312
|
+
* Updates the environment's catalog: its features and products, whole.
|
|
2313
|
+
*
|
|
2314
|
+
* `PATCH /v1/{catalog.name=orgs/*\/projects/*\/envs/*\/price_catalogs/*}` · permission `billing:write` · effect `write`
|
|
2315
|
+
*
|
|
2316
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2317
|
+
*/
|
|
2318
|
+
update(request: UpdateCatalogRequest): Promise<Catalog>;
|
|
2319
|
+
/**
|
|
2320
|
+
* Pushes the catalog to the merchant account's processor now: products and
|
|
2321
|
+
* prices by lookup key; an amount change makes a new price.
|
|
2322
|
+
*
|
|
2323
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/price_catalogs/*}:sync` · permission `billing:write` · effect `write`
|
|
2324
|
+
*
|
|
2325
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `UNAVAILABLE`.
|
|
2326
|
+
*/
|
|
2327
|
+
sync(request: SyncCatalogRequest): Promise<Catalog>;
|
|
2328
|
+
}
|
|
2329
|
+
/** `checkout_policies` of Sylphx Money: Resource type `money.sylphx.com/CheckoutPolicy`. */
|
|
2330
|
+
export declare class CheckoutPoliciesCollection {
|
|
2331
|
+
private readonly client;
|
|
2332
|
+
constructor(client: runtime.Client);
|
|
2333
|
+
/**
|
|
2334
|
+
* Gets the environment's checkout policy: which buyer countries consumer
|
|
2335
|
+
* checkout refuses. An environment that never wrote one refuses none.
|
|
2336
|
+
*
|
|
2337
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:read` · effect `read`
|
|
2338
|
+
*
|
|
2339
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2340
|
+
*/
|
|
2341
|
+
get(request: GetCheckoutPolicyRequest): Promise<CheckoutPolicy>;
|
|
2342
|
+
/**
|
|
2343
|
+
* Updates the environment's checkout policy, whole.
|
|
2344
|
+
*
|
|
2345
|
+
* `PATCH /v1/{checkout_policy.name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:write` · effect `write`
|
|
2346
|
+
*
|
|
2347
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2348
|
+
*/
|
|
2349
|
+
update(request: UpdateCheckoutPolicyRequest): Promise<CheckoutPolicy>;
|
|
2350
|
+
}
|
|
2351
|
+
/** `store_connections` of Sylphx Money: Resource type `money.sylphx.com/StoreConnection`. */
|
|
2352
|
+
export declare class StoreConnectionsCollection {
|
|
2353
|
+
private readonly client;
|
|
2354
|
+
constructor(client: runtime.Client);
|
|
2355
|
+
/**
|
|
2356
|
+
* Gets a store connection.
|
|
2357
|
+
*
|
|
2358
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/store_connections/*}` · permission `billing:read` · effect `read`
|
|
2359
|
+
*
|
|
2360
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2361
|
+
*/
|
|
2362
|
+
get(request: GetStoreConnectionRequest): Promise<StoreConnection>;
|
|
2363
|
+
/**
|
|
2364
|
+
* Lists store connections.
|
|
2365
|
+
*
|
|
2366
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/store_connections` · permission `billing:read` · effect `read`
|
|
2367
|
+
*
|
|
2368
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2369
|
+
*/
|
|
2370
|
+
list(request: ListStoreConnectionsRequest): Promise<ListStoreConnectionsResponse>;
|
|
2371
|
+
/** Every item of every page of `list`. */
|
|
2372
|
+
listAll(request: ListStoreConnectionsRequest): AsyncGenerator<StoreConnection>;
|
|
2373
|
+
/**
|
|
2374
|
+
* Creates a store connection; its credential is sealed and never returned.
|
|
2375
|
+
*
|
|
2376
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/store_connections` · permission `billing:write` · effect `write`
|
|
2377
|
+
*
|
|
2378
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2379
|
+
*/
|
|
2380
|
+
create(request: CreateStoreConnectionRequest): Promise<StoreConnection>;
|
|
2381
|
+
/**
|
|
2382
|
+
* Updates a store connection; a new credential replaces the stored one.
|
|
2383
|
+
*
|
|
2384
|
+
* `PATCH /v1/{store_connection.name=orgs/*\/projects/*\/envs/*\/store_connections/*}` · permission `billing:write` · effect `write`
|
|
2385
|
+
*
|
|
2386
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2387
|
+
*/
|
|
2388
|
+
update(request: UpdateStoreConnectionRequest): Promise<StoreConnection>;
|
|
2389
|
+
/**
|
|
2390
|
+
* Deletes a store connection and its sealed credential.
|
|
2391
|
+
*
|
|
2392
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/store_connections/*}` · permission `billing:write` · effect `destructive`
|
|
2393
|
+
*
|
|
2394
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2395
|
+
*/
|
|
2396
|
+
delete(request: DeleteStoreConnectionRequest): Promise<Record<string, never>>;
|
|
2397
|
+
}
|
|
2398
|
+
/** `store_purchases` of Sylphx Money: Resource type `money.sylphx.com/StorePurchase`. */
|
|
2399
|
+
export declare class StorePurchasesCollection {
|
|
2400
|
+
private readonly client;
|
|
2401
|
+
constructor(client: runtime.Client);
|
|
2402
|
+
/**
|
|
2403
|
+
* Verifies a store purchase with the store, binds it to the subject, and
|
|
2404
|
+
* returns its record and a signed grant. Re-verifying returns the same
|
|
2405
|
+
* record and grant. Called from the app's server with a secret key that
|
|
2406
|
+
* holds `billing:write`; a publishable key cannot call it.
|
|
2407
|
+
*
|
|
2408
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/store_purchases:verify` · permission `billing:write` · effect `write`
|
|
2409
|
+
*
|
|
2410
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_IN_USE`, `UNAVAILABLE`.
|
|
2411
|
+
*/
|
|
2412
|
+
verify(request: VerifyStorePurchaseRequest): Promise<VerifyStorePurchaseResponse>;
|
|
2413
|
+
/**
|
|
2414
|
+
* Verifies a store purchase for an app with no server: called with the
|
|
2415
|
+
* environment's publishable key (`billing:client`), the subject is an
|
|
2416
|
+
* install id (`inst_` and a UUID), and Money completes the purchase with the
|
|
2417
|
+
* store (acknowledges or consumes it) so the app never calls the store's
|
|
2418
|
+
* server API. Works only on store connections that set `client_verify`.
|
|
2419
|
+
* Re-calling returns the same record and grant.
|
|
2420
|
+
*
|
|
2421
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/store_purchases:clientVerify` · permission `billing:client` · effect `write`
|
|
2422
|
+
*
|
|
2423
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_IN_USE`, `RATE_LIMITED`, `UNAVAILABLE`.
|
|
2424
|
+
*/
|
|
2425
|
+
clientVerify(request: ClientVerifyStorePurchaseRequest): Promise<VerifyStorePurchaseResponse>;
|
|
2426
|
+
/**
|
|
2427
|
+
* Gets a store purchase.
|
|
2428
|
+
*
|
|
2429
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/store_purchases/*}` · permission `billing:read` · effect `read`
|
|
2430
|
+
*
|
|
2431
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2432
|
+
*/
|
|
2433
|
+
get(request: GetStorePurchaseRequest): Promise<StorePurchase>;
|
|
2434
|
+
/**
|
|
2435
|
+
* Lists store purchases, newest first.
|
|
2436
|
+
*
|
|
2437
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/store_purchases` · permission `billing:read` · effect `read`
|
|
2438
|
+
*
|
|
2439
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2440
|
+
*/
|
|
2441
|
+
list(request: ListStorePurchasesRequest): Promise<ListStorePurchasesResponse>;
|
|
2442
|
+
/** Every item of every page of `list`. */
|
|
2443
|
+
listAll(request: ListStorePurchasesRequest): AsyncGenerator<StorePurchase>;
|
|
2444
|
+
}
|
|
2445
|
+
/** `customer_subscriptions` of Sylphx Money: Resource type `money.sylphx.com/CustomerSubscription`. */
|
|
2446
|
+
export declare class CustomerSubscriptionsCollection {
|
|
2447
|
+
private readonly client;
|
|
2448
|
+
constructor(client: runtime.Client);
|
|
2449
|
+
/**
|
|
2450
|
+
* Gets a customer subscription.
|
|
2451
|
+
*
|
|
2452
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/customer_subscriptions/*}` · permission `billing:read` · effect `read`
|
|
2453
|
+
*
|
|
2454
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2455
|
+
*/
|
|
2456
|
+
get(request: GetCustomerSubscriptionRequest): Promise<CustomerSubscription>;
|
|
2457
|
+
/**
|
|
2458
|
+
* Lists customer subscriptions, newest first.
|
|
2459
|
+
*
|
|
2460
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/customer_subscriptions` · permission `billing:read` · effect `read`
|
|
2461
|
+
*
|
|
2462
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2463
|
+
*/
|
|
2464
|
+
list(request: ListCustomerSubscriptionsRequest): Promise<ListCustomerSubscriptionsResponse>;
|
|
2465
|
+
/** Every item of every page of `list`. */
|
|
2466
|
+
listAll(request: ListCustomerSubscriptionsRequest): AsyncGenerator<CustomerSubscription>;
|
|
2467
|
+
/**
|
|
2468
|
+
* Cancels a web subscription, now or at the period end, and optionally
|
|
2469
|
+
* refunds its last payment (for example a statutory cancellation window).
|
|
2470
|
+
*
|
|
2471
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_subscriptions/*}:cancel` · permission `billing:write` · effect `destructive`
|
|
2472
|
+
*
|
|
2473
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `UNAVAILABLE`.
|
|
2474
|
+
*/
|
|
2475
|
+
cancel(request: CancelCustomerSubscriptionRequest): Promise<CustomerSubscription>;
|
|
2476
|
+
/**
|
|
2477
|
+
* Resumes a web subscription set to cancel at its period end.
|
|
2478
|
+
*
|
|
2479
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_subscriptions/*}:resume` · permission `billing:write` · effect `write`
|
|
2480
|
+
*
|
|
2481
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `UNAVAILABLE`.
|
|
2482
|
+
*/
|
|
2483
|
+
resume(request: ResumeCustomerSubscriptionRequest): Promise<CustomerSubscription>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Changes the seat quantity of a web subscription, now, and syncs the
|
|
2486
|
+
* processor's subscription item to it. A retry with the same
|
|
2487
|
+
* `Idempotency-Key` (required) and the same request changes nothing twice.
|
|
2488
|
+
*
|
|
2489
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_subscriptions/*}:updateQuantity` · permission `billing:write` · effect `write`
|
|
2490
|
+
*
|
|
2491
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNAVAILABLE`.
|
|
2492
|
+
*/
|
|
2493
|
+
updateQuantity(request: UpdateCustomerSubscriptionQuantityRequest): Promise<CustomerSubscription>;
|
|
2494
|
+
/**
|
|
2495
|
+
* Move a web subscription onto another recurring catalog plan.
|
|
2496
|
+
*
|
|
2497
|
+
* Stripe changes the subscription's one item and bills the difference as
|
|
2498
|
+
* `proration_behavior` says; Money reads the subscription back and replaces
|
|
2499
|
+
* its entitlements from it. Needs an `Idempotency-Key` unless `validate_only`.
|
|
2500
|
+
* A store subscription is refused (`store_managed`): the store owns it.
|
|
2501
|
+
*
|
|
2502
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_subscriptions/*}:changePlan` · permission `billing:write` · effect `write`
|
|
2503
|
+
*
|
|
2504
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNAVAILABLE`.
|
|
2505
|
+
*/
|
|
2506
|
+
changePlan(request: ChangeCustomerSubscriptionPlanRequest): Promise<CustomerSubscription>;
|
|
2507
|
+
}
|
|
2508
|
+
/** `entitlement_grants` of Sylphx Money: Resource type `money.sylphx.com/EntitlementGrant`. */
|
|
2509
|
+
export declare class EntitlementGrantsCollection {
|
|
2510
|
+
private readonly client;
|
|
2511
|
+
constructor(client: runtime.Client);
|
|
2512
|
+
/**
|
|
2513
|
+
* Gets an entitlement grant.
|
|
2514
|
+
*
|
|
2515
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/entitlement_grants/*}` · permission `billing:read` · effect `read`
|
|
2516
|
+
*
|
|
2517
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2518
|
+
*/
|
|
2519
|
+
get(request: GetEntitlementGrantRequest): Promise<EntitlementGrant>;
|
|
2520
|
+
/**
|
|
2521
|
+
* Lists entitlement grants.
|
|
2522
|
+
*
|
|
2523
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants` · permission `billing:read` · effect `read`
|
|
2524
|
+
*
|
|
2525
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2526
|
+
*/
|
|
2527
|
+
list(request: ListEntitlementGrantsRequest): Promise<ListEntitlementGrantsResponse>;
|
|
2528
|
+
/** Every item of every page of `list`. */
|
|
2529
|
+
listAll(request: ListEntitlementGrantsRequest): AsyncGenerator<EntitlementGrant>;
|
|
2530
|
+
/**
|
|
2531
|
+
* Answers whether a subject holds a feature now, and how much of it.
|
|
2532
|
+
*
|
|
2533
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants:check` · permission `billing:read` · effect `read`
|
|
2534
|
+
*
|
|
2535
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
2536
|
+
*/
|
|
2537
|
+
check(request: CheckEntitlementRequest): Promise<CheckEntitlementResponse>;
|
|
2538
|
+
/**
|
|
2539
|
+
* Creates a manual entitlement grant (support, comp, grace). Append-only;
|
|
2540
|
+
* needs the approval-class scope. The approver recorded is the key's principal.
|
|
2541
|
+
*
|
|
2542
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants` · permission `billing:credits.approve` · effect `write`
|
|
2543
|
+
*
|
|
2544
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `RESOURCE_ALREADY_EXISTS`.
|
|
2545
|
+
*/
|
|
2546
|
+
create(request: CreateEntitlementGrantRequest): Promise<EntitlementGrant>;
|
|
2547
|
+
}
|
|
2548
|
+
/** `merchant_accounts` of Sylphx Money: Resource type `money.sylphx.com/MerchantAccount`. */
|
|
2549
|
+
export declare class MerchantAccountsCollection {
|
|
2550
|
+
private readonly client;
|
|
2551
|
+
constructor(client: runtime.Client);
|
|
2552
|
+
/**
|
|
2553
|
+
* Gets a merchant account.
|
|
2554
|
+
*
|
|
2555
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:read` · effect `read`
|
|
2556
|
+
*
|
|
2557
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2558
|
+
*/
|
|
2559
|
+
get(request: GetMerchantAccountRequest): Promise<MerchantAccount>;
|
|
2560
|
+
/**
|
|
2561
|
+
* Lists merchant accounts.
|
|
2562
|
+
*
|
|
2563
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/merchant_accounts` · permission `billing:read` · effect `read`
|
|
2564
|
+
*
|
|
2565
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2566
|
+
*/
|
|
2567
|
+
list(request: ListMerchantAccountsRequest): Promise<ListMerchantAccountsResponse>;
|
|
2568
|
+
/** Every item of every page of `list`. */
|
|
2569
|
+
listAll(request: ListMerchantAccountsRequest): AsyncGenerator<MerchantAccount>;
|
|
2570
|
+
/**
|
|
2571
|
+
* Starts connecting a Stripe account: returns the processor's authorisation
|
|
2572
|
+
* URL for an org owner to open, which the processor's redirect completes.
|
|
2573
|
+
* With a restricted key in the request the account connects at once
|
|
2574
|
+
* instead, and the connected merchant account comes back in the response.
|
|
2575
|
+
*
|
|
2576
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/merchant_accounts:connect` · permission `billing:write` · effect `write`
|
|
2577
|
+
*
|
|
2578
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNAVAILABLE`.
|
|
2579
|
+
*/
|
|
2580
|
+
connect(request: ConnectMerchantAccountRequest): Promise<ConnectMerchantAccountResponse>;
|
|
2581
|
+
/**
|
|
2582
|
+
* Reads the connected account back from the processor.
|
|
2583
|
+
*
|
|
2584
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}:refresh` · permission `billing:write` · effect `write`
|
|
2585
|
+
*
|
|
2586
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
|
|
2587
|
+
*/
|
|
2588
|
+
refresh(request: RefreshMerchantAccountRequest): Promise<MerchantAccount>;
|
|
2589
|
+
/**
|
|
2590
|
+
* Disconnects the account: Sylphx loses access; checkout is refused.
|
|
2591
|
+
*
|
|
2592
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}:disconnect` · permission `billing:write` · effect `destructive`
|
|
2593
|
+
*
|
|
2594
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
|
|
2595
|
+
*/
|
|
2596
|
+
disconnect(request: DisconnectMerchantAccountRequest): Promise<MerchantAccount>;
|
|
2597
|
+
/**
|
|
2598
|
+
* Updates the merchant account's own settings: the fields named in `update_mask`.
|
|
2599
|
+
*
|
|
2600
|
+
* `PATCH /v1/{merchant_account.name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:write` · effect `write`
|
|
2601
|
+
*
|
|
2602
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2603
|
+
*/
|
|
2604
|
+
update(request: UpdateMerchantAccountRequest): Promise<MerchantAccount>;
|
|
2605
|
+
}
|
|
2606
|
+
/** `checkout_sessions` of Sylphx Money: Resource type `money.sylphx.com/CheckoutSession`. */
|
|
2607
|
+
export declare class CheckoutSessionsCollection {
|
|
2608
|
+
private readonly client;
|
|
2609
|
+
constructor(client: runtime.Client);
|
|
2610
|
+
/**
|
|
2611
|
+
* Creates a hosted checkout for a subject.
|
|
2612
|
+
*
|
|
2613
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/checkout_sessions` · permission `billing:write` · effect `write`
|
|
2614
|
+
*
|
|
2615
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `UNAVAILABLE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2616
|
+
*/
|
|
2617
|
+
create(request: CreateCheckoutSessionRequest): Promise<CheckoutSession>;
|
|
2618
|
+
/**
|
|
2619
|
+
* Gets a checkout session.
|
|
2620
|
+
*
|
|
2621
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_sessions/*}` · permission `billing:read` · effect `read`
|
|
2622
|
+
*
|
|
2623
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2624
|
+
*/
|
|
2625
|
+
get(request: GetCheckoutSessionRequest): Promise<CheckoutSession>;
|
|
2626
|
+
}
|
|
2627
|
+
/** `tax_threshold_statuses` of Sylphx Money: Resource type `money.sylphx.com/TaxThresholdStatus`. */
|
|
2628
|
+
export declare class TaxThresholdStatusesCollection {
|
|
2629
|
+
private readonly client;
|
|
2630
|
+
constructor(client: runtime.Client);
|
|
2631
|
+
/**
|
|
2632
|
+
* Lists where the environment's consumer sales stand against each
|
|
2633
|
+
* jurisdiction's digital-services tax registration threshold, per its own
|
|
2634
|
+
* window. EU and UK have no threshold and are not tracked.
|
|
2635
|
+
*
|
|
2636
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/tax_threshold_statuses` · permission `billing:read` · effect `read`
|
|
2637
|
+
*
|
|
2638
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
2639
|
+
*/
|
|
2640
|
+
list(request: ListTaxThresholdStatusesRequest): Promise<ListTaxThresholdStatusesResponse>;
|
|
2641
|
+
/** Every item of every page of `list`. */
|
|
2642
|
+
listAll(request: ListTaxThresholdStatusesRequest): AsyncGenerator<TaxThresholdStatus>;
|
|
2643
|
+
}
|
|
2644
|
+
/** `portal_sessions` of Sylphx Money: Resource type `money.sylphx.com/PortalSession`. */
|
|
2645
|
+
export declare class PortalSessionsCollection {
|
|
2646
|
+
private readonly client;
|
|
2647
|
+
constructor(client: runtime.Client);
|
|
2648
|
+
/**
|
|
2649
|
+
* Creates a customer portal session for a subject.
|
|
2650
|
+
*
|
|
2651
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/portal_sessions` · permission `billing:write` · effect `write`
|
|
2652
|
+
*
|
|
2653
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `UNAVAILABLE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2654
|
+
*/
|
|
2655
|
+
create(request: CreatePortalSessionRequest): Promise<PortalSession>;
|
|
2656
|
+
/**
|
|
2657
|
+
* Gets a portal session.
|
|
2658
|
+
*
|
|
2659
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/portal_sessions/*}` · permission `billing:read` · effect `read`
|
|
2660
|
+
*
|
|
2661
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2662
|
+
*/
|
|
2663
|
+
get(request: GetPortalSessionRequest): Promise<PortalSession>;
|
|
2664
|
+
}
|
|
2665
|
+
/** `licence_keys` of Sylphx Money: Resource type `money.sylphx.com/LicenceKey`. */
|
|
2666
|
+
export declare class LicenceKeysCollection {
|
|
2667
|
+
private readonly client;
|
|
2668
|
+
constructor(client: runtime.Client);
|
|
2669
|
+
/**
|
|
2670
|
+
* Generates a licence key: Money creates the Ed25519 key, seals it, and never
|
|
2671
|
+
* returns the private half. Needs the approval-class scope, which the developer
|
|
2672
|
+
* role does not hold.
|
|
2673
|
+
*
|
|
2674
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/licence_keys:generate` · permission `billing:licence_keys.approve` · effect `write`
|
|
2675
|
+
*
|
|
2676
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2677
|
+
*/
|
|
2678
|
+
generate(request: GenerateLicenceKeyRequest): Promise<LicenceKey>;
|
|
2679
|
+
/**
|
|
2680
|
+
* Imports an existing Ed25519 key (PKCS8), for a key already pinned in shipped
|
|
2681
|
+
* clients. Refused unless the expected public key is the imported key's public
|
|
2682
|
+
* half.
|
|
2683
|
+
*
|
|
2684
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/licence_keys:import` · permission `billing:licence_keys.approve` · effect `write`
|
|
2685
|
+
*
|
|
2686
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2687
|
+
*/
|
|
2688
|
+
import(request: ImportLicenceKeyRequest): Promise<LicenceKey>;
|
|
2689
|
+
/**
|
|
2690
|
+
* Retires a licence key: it stops signing new terms and stays exported for
|
|
2691
|
+
* verification.
|
|
2692
|
+
*
|
|
2693
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/licence_keys/*}:retire` · permission `billing:licence_keys.approve` · effect `write`
|
|
2694
|
+
*
|
|
2695
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2696
|
+
*/
|
|
2697
|
+
retire(request: RetireLicenceKeyRequest): Promise<LicenceKey>;
|
|
2698
|
+
/**
|
|
2699
|
+
* Gets a licence key (its public half, never the private).
|
|
2700
|
+
*
|
|
2701
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/licence_keys/*}` · permission `billing:read` · effect `read`
|
|
2702
|
+
*
|
|
2703
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2704
|
+
*/
|
|
2705
|
+
get(request: GetLicenceKeyRequest): Promise<LicenceKey>;
|
|
2706
|
+
/**
|
|
2707
|
+
* Lists licence keys, newest first.
|
|
2708
|
+
*
|
|
2709
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/licence_keys` · permission `billing:read` · effect `read`
|
|
2710
|
+
*
|
|
2711
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `PAGE_TOKEN_MISMATCH`.
|
|
2712
|
+
*/
|
|
2713
|
+
list(request: ListLicenceKeysRequest): Promise<ListLicenceKeysResponse>;
|
|
2714
|
+
/** Every item of every page of `list`. */
|
|
2715
|
+
listAll(request: ListLicenceKeysRequest): AsyncGenerator<LicenceKey>;
|
|
2716
|
+
}
|
|
2717
|
+
/** `licence_tokens` of Sylphx Money: Resource type `money.sylphx.com/LicenceToken`. */
|
|
2718
|
+
export declare class LicenceTokensCollection {
|
|
2719
|
+
private readonly client;
|
|
2720
|
+
constructor(client: runtime.Client);
|
|
2721
|
+
/**
|
|
2722
|
+
* Lists a subject's unexpired offline licence tokens of paid orders, for
|
|
2723
|
+
* support. Re-derived from the frozen terms: the same bytes as at purchase.
|
|
2724
|
+
*
|
|
2725
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/licence_tokens` · permission `billing:read` · effect `read`
|
|
2726
|
+
*
|
|
2727
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2728
|
+
*/
|
|
2729
|
+
list(request: ListLicenceTokensRequest): Promise<ListLicenceTokensResponse>;
|
|
2730
|
+
/** Every item of every page of `list`. */
|
|
2731
|
+
listAll(request: ListLicenceTokensRequest): AsyncGenerator<LicenceToken>;
|
|
2732
|
+
}
|
|
2733
|
+
/** `usage_settings` of Sylphx Money: Resource type `money.sylphx.com/UsageSettings`. */
|
|
2734
|
+
export declare class UsageSettingsCollection {
|
|
2735
|
+
private readonly client;
|
|
2736
|
+
constructor(client: runtime.Client);
|
|
2737
|
+
/**
|
|
2738
|
+
* Gets the environment's usage settings.
|
|
2739
|
+
*
|
|
2740
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:read` · effect `read`
|
|
2741
|
+
*
|
|
2742
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2743
|
+
*/
|
|
2744
|
+
get(request: GetUsageSettingsRequest): Promise<UsageSettings>;
|
|
2745
|
+
/**
|
|
2746
|
+
* Updates the usage settings, the enforcement switch included. A change is recorded with who made it.
|
|
2747
|
+
*
|
|
2748
|
+
* `PATCH /v1/{usage_settings.name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:write` · effect `write`
|
|
2749
|
+
*
|
|
2750
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2751
|
+
*/
|
|
2752
|
+
update(request: UpdateUsageSettingsRequest): Promise<UsageSettings>;
|
|
2753
|
+
}
|
|
2754
|
+
/** `usage_tiers` of Sylphx Money: Resource type `money.sylphx.com/UsageTier`. */
|
|
2755
|
+
export declare class UsageTiersCollection {
|
|
2756
|
+
private readonly client;
|
|
2757
|
+
constructor(client: runtime.Client);
|
|
2758
|
+
/**
|
|
2759
|
+
* Lists usage tiers.
|
|
2760
|
+
*
|
|
2761
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_tiers` · permission `billing:read` · effect `read`
|
|
2762
|
+
*
|
|
2763
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2764
|
+
*/
|
|
2765
|
+
list(request: ListUsageTiersRequest): Promise<ListUsageTiersResponse>;
|
|
2766
|
+
/** Every item of every page of `list`. */
|
|
2767
|
+
listAll(request: ListUsageTiersRequest): AsyncGenerator<UsageTier>;
|
|
2768
|
+
/**
|
|
2769
|
+
* Creates or updates a usage tier.
|
|
2770
|
+
*
|
|
2771
|
+
* `PATCH /v1/{usage_tier.name=orgs/*\/projects/*\/envs/*\/usage_tiers/*}` · permission `billing:write` · effect `write`
|
|
2772
|
+
*
|
|
2773
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2774
|
+
*/
|
|
2775
|
+
update(request: UpdateUsageTierRequest): Promise<UsageTier>;
|
|
2776
|
+
}
|
|
2777
|
+
/** `usage_reservations` of Sylphx Money: Resource type `money.sylphx.com/UsageReservation`. */
|
|
2778
|
+
export declare class UsageReservationsCollection {
|
|
2779
|
+
private readonly client;
|
|
2780
|
+
constructor(client: runtime.Client);
|
|
2781
|
+
/**
|
|
2782
|
+
* 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.
|
|
2783
|
+
*
|
|
2784
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_reservations` · permission `billing:metering:write` · effect `write`
|
|
2785
|
+
*
|
|
2786
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `PLAN_LIMIT_REACHED`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNAVAILABLE`.
|
|
2787
|
+
*/
|
|
2788
|
+
create(request: CreateUsageReservationRequest): Promise<UsageReservation>;
|
|
2789
|
+
/**
|
|
2790
|
+
* Gets a usage reservation.
|
|
2791
|
+
*
|
|
2792
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}` · permission `billing:read` · effect `read`
|
|
2793
|
+
*
|
|
2794
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2795
|
+
*/
|
|
2796
|
+
get(request: GetUsageReservationRequest): Promise<UsageReservation>;
|
|
2797
|
+
/**
|
|
2798
|
+
* Settles a reservation with what was used; the unused part returns to headroom. A settle after expiry still records the usage.
|
|
2799
|
+
*
|
|
2800
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:settle` · permission `billing:metering:write` · effect `write`
|
|
2801
|
+
*
|
|
2802
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2803
|
+
*/
|
|
2804
|
+
settle(request: SettleUsageReservationRequest): Promise<UsageEvent>;
|
|
2805
|
+
/**
|
|
2806
|
+
* Releases a reservation that used nothing.
|
|
2807
|
+
*
|
|
2808
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:release` · permission `billing:metering:write` · effect `write`
|
|
2809
|
+
*
|
|
2810
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2811
|
+
*/
|
|
2812
|
+
release(request: ReleaseUsageReservationRequest): Promise<UsageReservation>;
|
|
2813
|
+
}
|
|
2814
|
+
/** `usage_events` of Sylphx Money: Resource type `money.sylphx.com/UsageEvent`. */
|
|
2815
|
+
export declare class UsageEventsCollection {
|
|
2816
|
+
private readonly client;
|
|
2817
|
+
constructor(client: runtime.Client);
|
|
2818
|
+
/**
|
|
2819
|
+
* Records usage directly, only for a meter the merchant marked reservation-optional.
|
|
2820
|
+
*
|
|
2821
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:metering:write` · effect `write`
|
|
2822
|
+
*
|
|
2823
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2824
|
+
*/
|
|
2825
|
+
create(request: CreateUsageEventRequest): Promise<UsageEvent>;
|
|
2826
|
+
/**
|
|
2827
|
+
* Records a batch of already-incurred usage from the merchant's own servers
|
|
2828
|
+
* (Stripe's meter-event model): the caller is a key of the merchant's own org
|
|
2829
|
+
* holding the exact grant `billing:metering:ingest`, which no wildcard covers,
|
|
2830
|
+
* and each event names its subject with no subject proof. Each event is keyed
|
|
2831
|
+
* by its project, meter, meter version and event id: a replay is a no-op
|
|
2832
|
+
* (`duplicate`), and the same key with different content is a `conflict` and
|
|
2833
|
+
* never counted. One result per event, in request order.
|
|
2834
|
+
*
|
|
2835
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:batchIngest` · permission `billing:metering:ingest` · effect `write`
|
|
2836
|
+
*
|
|
2837
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`.
|
|
2838
|
+
*/
|
|
2839
|
+
batchIngest(request: BatchIngestUsageEventsRequest): Promise<BatchIngestUsageEventsResponse>;
|
|
2840
|
+
/**
|
|
2841
|
+
* Lists usage events, newest first.
|
|
2842
|
+
*
|
|
2843
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:read` · effect `read`
|
|
2844
|
+
*
|
|
2845
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2846
|
+
*/
|
|
2847
|
+
list(request: ListUsageEventsRequest): Promise<ListUsageEventsResponse>;
|
|
2848
|
+
/** Every item of every page of `list`. */
|
|
2849
|
+
listAll(request: ListUsageEventsRequest): AsyncGenerator<UsageEvent>;
|
|
2850
|
+
/**
|
|
2851
|
+
* Reads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.
|
|
2852
|
+
*
|
|
2853
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:checkStanding` · permission `billing:read` · effect `read`
|
|
2854
|
+
*
|
|
2855
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
2856
|
+
*/
|
|
2857
|
+
checkStanding(request: CheckUsageStandingRequest): Promise<UsageStanding>;
|
|
2858
|
+
}
|
|
2859
|
+
/** `credit_grants` of Sylphx Money: Resource type `money.sylphx.com/CreditGrant`. */
|
|
2860
|
+
export declare class CreditGrantsCollection {
|
|
2861
|
+
private readonly client;
|
|
2862
|
+
constructor(client: runtime.Client);
|
|
2863
|
+
/**
|
|
2864
|
+
* 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.
|
|
2865
|
+
*
|
|
2866
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:credits.approve` · effect `write`
|
|
2867
|
+
*
|
|
2868
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2869
|
+
*/
|
|
2870
|
+
create(request: CreateCreditGrantRequest): Promise<CreditGrant>;
|
|
2871
|
+
/**
|
|
2872
|
+
* Gets a credit grant.
|
|
2873
|
+
*
|
|
2874
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/credit_grants/*}` · permission `billing:read` · effect `read`
|
|
2875
|
+
*
|
|
2876
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2877
|
+
*/
|
|
2878
|
+
get(request: GetCreditGrantRequest): Promise<CreditGrant>;
|
|
2879
|
+
/**
|
|
2880
|
+
* Lists credit grants.
|
|
2881
|
+
*
|
|
2882
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:read` · effect `read`
|
|
2883
|
+
*
|
|
2884
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2885
|
+
*/
|
|
2886
|
+
list(request: ListCreditGrantsRequest): Promise<ListCreditGrantsResponse>;
|
|
2887
|
+
/** Every item of every page of `list`. */
|
|
2888
|
+
listAll(request: ListCreditGrantsRequest): AsyncGenerator<CreditGrant>;
|
|
2889
|
+
}
|
|
2890
|
+
/** `usage_invoices` of Sylphx Money: Resource type `money.sylphx.com/UsageInvoice`. */
|
|
2891
|
+
export declare class UsageInvoicesCollection {
|
|
2892
|
+
private readonly client;
|
|
2893
|
+
constructor(client: runtime.Client);
|
|
2894
|
+
/**
|
|
2895
|
+
* Gets a usage invoice.
|
|
2896
|
+
*
|
|
2897
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}` · permission `billing:read` · effect `read`
|
|
2898
|
+
*
|
|
2899
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2900
|
+
*/
|
|
2901
|
+
get(request: GetUsageInvoiceRequest): Promise<UsageInvoice>;
|
|
2902
|
+
/**
|
|
2903
|
+
* Lists usage invoices, newest first.
|
|
2904
|
+
*
|
|
2905
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_invoices` · permission `billing:read` · effect `read`
|
|
2906
|
+
*
|
|
2907
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2908
|
+
*/
|
|
2909
|
+
list(request: ListUsageInvoicesRequest): Promise<ListUsageInvoicesResponse>;
|
|
2910
|
+
/** Every item of every page of `list`. */
|
|
2911
|
+
listAll(request: ListUsageInvoicesRequest): AsyncGenerator<UsageInvoice>;
|
|
2912
|
+
/**
|
|
2913
|
+
* Releases a held invoice for collection, audited with who and why. Grant expiry or replacement never does.
|
|
2914
|
+
*
|
|
2915
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}:releaseCollection` · permission `billing:credits.approve` · effect `write`
|
|
2916
|
+
*
|
|
2917
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2918
|
+
*/
|
|
2919
|
+
releaseCollection(request: ReleaseUsageInvoiceCollectionRequest): Promise<UsageInvoice>;
|
|
2920
|
+
}
|
|
2921
|
+
/** `usage_meters` of Sylphx Money: Resource type `money.sylphx.com/UsageMeter`. */
|
|
2922
|
+
export declare class UsageMetersCollection {
|
|
2923
|
+
private readonly client;
|
|
2924
|
+
constructor(client: runtime.Client);
|
|
2925
|
+
/**
|
|
2926
|
+
* Gets a usage meter.
|
|
2927
|
+
*
|
|
2928
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:read` · effect `read`
|
|
2929
|
+
*
|
|
2930
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2931
|
+
*/
|
|
2932
|
+
get(request: GetUsageMeterRequest): Promise<UsageMeter>;
|
|
2933
|
+
/**
|
|
2934
|
+
* Lists usage meters.
|
|
2935
|
+
*
|
|
2936
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meters` · permission `billing:read` · effect `read`
|
|
2937
|
+
*
|
|
2938
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2939
|
+
*/
|
|
2940
|
+
list(request: ListUsageMetersRequest): Promise<ListUsageMetersResponse>;
|
|
2941
|
+
/** Every item of every page of `list`. */
|
|
2942
|
+
listAll(request: ListUsageMetersRequest): AsyncGenerator<UsageMeter>;
|
|
2943
|
+
/**
|
|
2944
|
+
* Creates or updates a usage meter. The unit cannot change once it has recorded usage.
|
|
2945
|
+
*
|
|
2946
|
+
* `PATCH /v1/{usage_meter.name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:write` · effect `write`
|
|
2947
|
+
*
|
|
2948
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2949
|
+
*/
|
|
2950
|
+
update(request: UpdateUsageMeterRequest): Promise<UsageMeter>;
|
|
2951
|
+
}
|
|
2952
|
+
/** `usage_meter_prices` of Sylphx Money: Resource type `money.sylphx.com/UsageMeterPrice`. */
|
|
2953
|
+
export declare class UsageMeterPricesCollection {
|
|
2954
|
+
private readonly client;
|
|
2955
|
+
constructor(client: runtime.Client);
|
|
2956
|
+
/**
|
|
2957
|
+
* Appends a price to a meter's history. It applies from its effective time on and never rewrites usage already rated.
|
|
2958
|
+
*
|
|
2959
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:write` · effect `write`
|
|
2960
|
+
*
|
|
2961
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2962
|
+
*/
|
|
2963
|
+
create(request: CreateUsageMeterPriceRequest): Promise<UsageMeterPrice>;
|
|
2964
|
+
/**
|
|
2965
|
+
* Lists meter prices, newest first; filter by `meter`.
|
|
2966
|
+
*
|
|
2967
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:read` · effect `read`
|
|
2968
|
+
*
|
|
2969
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2970
|
+
*/
|
|
2971
|
+
list(request: ListUsageMeterPricesRequest): Promise<ListUsageMeterPricesResponse>;
|
|
2972
|
+
/** Every item of every page of `list`. */
|
|
2973
|
+
listAll(request: ListUsageMeterPricesRequest): AsyncGenerator<UsageMeterPrice>;
|
|
2974
|
+
}
|
|
2975
|
+
/** `revenue_sources` of Sylphx Money: Resource type `money.sylphx.com/RevenueSource`. */
|
|
2976
|
+
export declare class RevenueSourcesCollection {
|
|
2977
|
+
private readonly client;
|
|
2978
|
+
constructor(client: runtime.Client);
|
|
2979
|
+
/**
|
|
2980
|
+
* Gets a revenue source, with its freshness. Revenue reporting
|
|
2981
|
+
* (docs/adr/ADR-01M40HRQT0VSXZ1WANP8M318F2) is org-wide: `revenue:read` or
|
|
2982
|
+
* `revenue:write`, held by an org-wide key or an org owner's or admin's
|
|
2983
|
+
* session only; a project or environment key is refused.
|
|
2984
|
+
*
|
|
2985
|
+
* `GET /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:read` · effect `read`
|
|
2986
|
+
*
|
|
2987
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2988
|
+
*/
|
|
2989
|
+
get(request: GetRevenueSourceRequest): Promise<RevenueSource>;
|
|
2990
|
+
/**
|
|
2991
|
+
* Lists the org's revenue sources, with their freshness.
|
|
2992
|
+
*
|
|
2993
|
+
* `GET /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:read` · effect `read`
|
|
2994
|
+
*
|
|
2995
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2996
|
+
*/
|
|
2997
|
+
list(request: ListRevenueSourcesRequest): Promise<ListRevenueSourcesResponse>;
|
|
2998
|
+
/** Every item of every page of `list`. */
|
|
2999
|
+
listAll(request: ListRevenueSourcesRequest): AsyncGenerator<RevenueSource>;
|
|
3000
|
+
/**
|
|
3001
|
+
* Registers a revenue source. The `money` source is implicit and never
|
|
3002
|
+
* created here.
|
|
3003
|
+
*
|
|
3004
|
+
* `POST /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:write` · effect `write`
|
|
3005
|
+
*
|
|
3006
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
3007
|
+
*/
|
|
3008
|
+
create(request: CreateRevenueSourceRequest): Promise<RevenueSource>;
|
|
3009
|
+
/**
|
|
3010
|
+
* Renames, pauses or resumes a revenue source, or changes its settings.
|
|
3011
|
+
*
|
|
3012
|
+
* `PATCH /v1/{revenue_source.name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `write`
|
|
3013
|
+
*
|
|
3014
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
3015
|
+
*/
|
|
3016
|
+
update(request: UpdateRevenueSourceRequest): Promise<RevenueSource>;
|
|
3017
|
+
/**
|
|
3018
|
+
* Deletes a revenue source and the facts it reported. The `money` source
|
|
3019
|
+
* cannot be deleted; pause it instead.
|
|
3020
|
+
*
|
|
3021
|
+
* `DELETE /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `destructive`
|
|
3022
|
+
*
|
|
3023
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
3024
|
+
*/
|
|
3025
|
+
delete(request: DeleteRevenueSourceRequest): Promise<Record<string, never>>;
|
|
3026
|
+
/**
|
|
3027
|
+
* Syncs a revenue source now, or backfills a period. A `money` source
|
|
3028
|
+
* fills any booked fact its environment's ledger holds and the facts lack;
|
|
3029
|
+
* a paused source, or one whose connector has not shipped yet, is refused
|
|
3030
|
+
* (`INVALID_STATE`).
|
|
3031
|
+
*
|
|
3032
|
+
* `POST /v1/{name=orgs/*\/revenue_sources/*}:run` · permission `revenue:write` · effect `write`
|
|
3033
|
+
*
|
|
3034
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
3035
|
+
*/
|
|
3036
|
+
run(request: RunRevenueSourceRequest): Promise<RunRevenueSourceResponse>;
|
|
3037
|
+
}
|
|
3038
|
+
/** `revenue` of Sylphx Money: Resource type `money.sylphx.com/RevenueSummary`. */
|
|
3039
|
+
export declare class RevenueCollection {
|
|
3040
|
+
private readonly client;
|
|
3041
|
+
constructor(client: runtime.Client);
|
|
3042
|
+
/**
|
|
3043
|
+
* Gets the org's revenue over a period: totals by day or month, split by
|
|
3044
|
+
* source or product, gross or net, in one reporting currency, with the
|
|
3045
|
+
* basis of each bucket, the sources that report late, and what has no
|
|
3046
|
+
* rate yet. Reads only the daily roll-up, bounded by a 5 second statement
|
|
3047
|
+
* timeout. For example `sylphx money revenue summary --period mtd
|
|
3048
|
+
* --split source`.
|
|
3049
|
+
*
|
|
3050
|
+
* `GET /v1/{name=orgs/*\/revenue}` · permission `revenue:read` · effect `read`
|
|
3051
|
+
*
|
|
3052
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `UNAVAILABLE`.
|
|
3053
|
+
*/
|
|
3054
|
+
get(request: GetRevenueSummaryRequest): Promise<RevenueSummary>;
|
|
3055
|
+
}
|
|
3056
|
+
/** `revenue_facts` of Sylphx Money: Resource type `money.sylphx.com/RevenueFact`. */
|
|
3057
|
+
export declare class RevenueFactsCollection {
|
|
3058
|
+
private readonly client;
|
|
3059
|
+
constructor(client: runtime.Client);
|
|
3060
|
+
/**
|
|
3061
|
+
* Lists the org's revenue facts, newest day first, for audit and export.
|
|
3062
|
+
*
|
|
3063
|
+
* `GET /v1/{parent=orgs/*}/revenue_facts` · permission `revenue:read` · effect `read`
|
|
3064
|
+
*
|
|
3065
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `UNAVAILABLE`.
|
|
3066
|
+
*/
|
|
3067
|
+
list(request: ListRevenueFactsRequest): Promise<ListRevenueFactsResponse>;
|
|
3068
|
+
/** Every item of every page of `list`. */
|
|
3069
|
+
listAll(request: ListRevenueFactsRequest): AsyncGenerator<RevenueFact>;
|
|
3070
|
+
}
|
|
3071
|
+
/** `exchange_rates` of Sylphx Money: Resource type `money.sylphx.com/ExchangeRate`. */
|
|
3072
|
+
export declare class ExchangeRatesCollection {
|
|
3073
|
+
private readonly client;
|
|
3074
|
+
constructor(client: runtime.Client);
|
|
3075
|
+
/**
|
|
3076
|
+
* Lists the exchange rates Money converts at (units per US dollar by day),
|
|
3077
|
+
* for any reader that converts revenue.
|
|
3078
|
+
*
|
|
3079
|
+
* `GET /v1/{parent=orgs/*}/exchange_rates` · permission `revenue:read` · effect `read`
|
|
3080
|
+
*
|
|
3081
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
3082
|
+
*/
|
|
3083
|
+
list(request: ListExchangeRatesRequest): Promise<ListExchangeRatesResponse>;
|
|
3084
|
+
/** Every item of every page of `list`. */
|
|
3085
|
+
listAll(request: ListExchangeRatesRequest): AsyncGenerator<ExchangeRate>;
|
|
3086
|
+
}
|