@sylphx/sdk 0.32.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 +20 -0
- package/dist/access.d.ts +34 -0
- package/dist/access.js +14 -2
- 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.js +1 -1
- package/dist/artifacts.js +1 -1
- package/dist/assets.js +1 -1
- package/dist/auth/client.js +1 -1
- 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.js +1 -1
- package/dist/auth.d.ts +201 -2
- package/dist/auth.js +148 -2
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +86 -8
- package/dist/billing.js +39 -1
- package/dist/billing.js.map +1 -1
- package/dist/broker.js +1 -1
- package/dist/build.d.ts +361 -28
- package/dist/build.js +302 -10
- package/dist/build.js.map +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.js +1 -1
- package/dist/config.js +1 -1
- package/dist/connections.js +1 -1
- package/dist/data.d.ts +52 -0
- package/dist/data.js +57 -1
- package/dist/data.js.map +1 -1
- package/dist/entitlement.js +1 -1
- package/dist/events/realtime.js +1 -1
- package/dist/events/webhooks.js +1 -1
- package/dist/events.js +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.js +1 -1
- package/dist/ids.d.ts +152 -2
- package/dist/ids.js +32 -2
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +20 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.js +1 -1
- package/dist/knowledge.d.ts +1192 -0
- package/dist/knowledge.js +1002 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/localization.js +1 -1
- package/dist/methods.js +1563 -40
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +1687 -7
- package/dist/money.js +1269 -1
- package/dist/money.js.map +1 -1
- package/dist/network.js +1 -1
- package/dist/notify.d.ts +346 -1
- package/dist/notify.js +249 -1
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +138 -0
- package/dist/observability.js +89 -1
- 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.js +1 -1
- package/dist/runners.js +1 -1
- package/dist/runtime.js +1 -1
- package/dist/sandboxes.js +1 -1
- package/dist/secrets.d.ts +336 -0
- package/dist/secrets.js +268 -1
- package/dist/secrets.js.map +1 -1
- package/dist/workflows.d.ts +119 -3
- package/dist/workflows.js +144 -4
- package/dist/workflows.js.map +1 -1
- package/package.json +2 -2
package/dist/money.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by sylphx-gen 0.1.0 from contracts@
|
|
1
|
+
// @generated by sylphx-gen 0.1.0 from contracts@c8a7361c53e572321b0ec9fb014fd1e8279b007b62562423038e0d0e5b9d767a. Do not edit.
|
|
2
2
|
// `sylphx.money.v1`.
|
|
3
3
|
import * as runtime from './runtime.js';
|
|
4
4
|
import './common.js';
|
|
@@ -11,6 +11,12 @@ runtime.registerSchemas({
|
|
|
11
11
|
['appAppleId', 'app_apple_id'],
|
|
12
12
|
['accountTokenPrefix', 'account_token_prefix'],
|
|
13
13
|
],
|
|
14
|
+
'sylphx.money.v1.BatchIngestUsageEventsRequest': [
|
|
15
|
+
['usageEvents', 'usage_events', 'sylphx.money.v1.IngestedUsageEvent'],
|
|
16
|
+
],
|
|
17
|
+
'sylphx.money.v1.BatchIngestUsageEventsResponse': [
|
|
18
|
+
['results', 'results', 'sylphx.money.v1.IngestedUsageEventResult'],
|
|
19
|
+
],
|
|
14
20
|
'sylphx.money.v1.CancelCustomerSubscriptionRequest': [
|
|
15
21
|
['atPeriodEnd', 'at_period_end'],
|
|
16
22
|
['refundLastPayment', 'refund_last_payment'],
|
|
@@ -43,6 +49,19 @@ runtime.registerSchemas({
|
|
|
43
49
|
['entitlementGrant', 'entitlement_grant'],
|
|
44
50
|
['expireTime', 'expire_time'],
|
|
45
51
|
],
|
|
52
|
+
'sylphx.money.v1.CheckUsageStandingRequest': [
|
|
53
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
54
|
+
['subjectProof', 'subject_proof'],
|
|
55
|
+
['actorProof', 'actor_proof'],
|
|
56
|
+
],
|
|
57
|
+
'sylphx.money.v1.CheckoutPolicy': [
|
|
58
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
59
|
+
['spec', 'spec', 'sylphx.money.v1.CheckoutPolicySpec'],
|
|
60
|
+
],
|
|
61
|
+
'sylphx.money.v1.CheckoutPolicySpec': [
|
|
62
|
+
['deniedCountryCodes', 'denied_country_codes'],
|
|
63
|
+
['allowTaxIdBuyers', 'allow_tax_id_buyers'],
|
|
64
|
+
],
|
|
46
65
|
'sylphx.money.v1.CheckoutSession': [
|
|
47
66
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
48
67
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
@@ -52,8 +71,20 @@ runtime.registerSchemas({
|
|
|
52
71
|
['currencyCode', 'currency_code'],
|
|
53
72
|
['metadata', 'metadata', undefined, 'map'],
|
|
54
73
|
['allowPromotionCodes', 'allow_promotion_codes'],
|
|
74
|
+
['buyerCountryCode', 'buyer_country_code'],
|
|
55
75
|
['expireTime', 'expire_time'],
|
|
56
76
|
['processorSessionId', 'processor_session_id'],
|
|
77
|
+
['deniedReason', 'denied_reason'],
|
|
78
|
+
['billingCountryCode', 'billing_country_code'],
|
|
79
|
+
['billingSubdivisionCode', 'billing_subdivision_code'],
|
|
80
|
+
],
|
|
81
|
+
'sylphx.money.v1.ClientVerifyStorePurchaseRequest': [
|
|
82
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
83
|
+
['signedTransaction', 'signed_transaction'],
|
|
84
|
+
['purchaseToken', 'purchase_token'],
|
|
85
|
+
['productId', 'product_id'],
|
|
86
|
+
['packageName', 'package_name'],
|
|
87
|
+
['accountToken', 'account_token'],
|
|
57
88
|
],
|
|
58
89
|
'sylphx.money.v1.ConnectMerchantAccountRequest': [
|
|
59
90
|
['merchantAccountId', 'merchant_account_id'],
|
|
@@ -69,15 +100,45 @@ runtime.registerSchemas({
|
|
|
69
100
|
['checkoutSession', 'checkout_session', 'sylphx.money.v1.CheckoutSession'],
|
|
70
101
|
['checkoutSessionId', 'checkout_session_id'],
|
|
71
102
|
],
|
|
103
|
+
'sylphx.money.v1.CreateCreditGrantRequest': [
|
|
104
|
+
['creditGrant', 'credit_grant', 'sylphx.money.v1.CreditGrant'],
|
|
105
|
+
],
|
|
106
|
+
'sylphx.money.v1.CreateEntitlementGrantRequest': [
|
|
107
|
+
['entitlementGrantId', 'entitlement_grant_id'],
|
|
108
|
+
['entitlementGrant', 'entitlement_grant', 'sylphx.money.v1.EntitlementGrant'],
|
|
109
|
+
],
|
|
72
110
|
'sylphx.money.v1.CreatePortalSessionRequest': [
|
|
73
111
|
['portalSession', 'portal_session', 'sylphx.money.v1.PortalSession'],
|
|
74
112
|
['portalSessionId', 'portal_session_id'],
|
|
75
113
|
],
|
|
114
|
+
'sylphx.money.v1.CreateRevenueSourceRequest': [
|
|
115
|
+
['revenueSourceId', 'revenue_source_id'],
|
|
116
|
+
['revenueSource', 'revenue_source', 'sylphx.money.v1.RevenueSource'],
|
|
117
|
+
['validateOnly', 'validate_only'],
|
|
118
|
+
],
|
|
76
119
|
'sylphx.money.v1.CreateStoreConnectionRequest': [
|
|
77
120
|
['storeConnectionId', 'store_connection_id'],
|
|
78
121
|
['storeConnection', 'store_connection', 'sylphx.money.v1.StoreConnection'],
|
|
79
122
|
['validateOnly', 'validate_only'],
|
|
80
123
|
],
|
|
124
|
+
'sylphx.money.v1.CreateUsageEventRequest': [
|
|
125
|
+
['usageEvent', 'usage_event', 'sylphx.money.v1.UsageEvent'],
|
|
126
|
+
],
|
|
127
|
+
'sylphx.money.v1.CreateUsageMeterPriceRequest': [
|
|
128
|
+
['usageMeterPrice', 'usage_meter_price', 'sylphx.money.v1.UsageMeterPrice'],
|
|
129
|
+
],
|
|
130
|
+
'sylphx.money.v1.CreateUsageReservationRequest': [
|
|
131
|
+
['usageReservation', 'usage_reservation', 'sylphx.money.v1.UsageReservation'],
|
|
132
|
+
],
|
|
133
|
+
'sylphx.money.v1.CreditGrant': [
|
|
134
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
135
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
136
|
+
['amountMinor', 'amount_minor'],
|
|
137
|
+
['startTime', 'start_time'],
|
|
138
|
+
['expireTime', 'expire_time'],
|
|
139
|
+
['taxTreatment', 'tax_treatment'],
|
|
140
|
+
['collectionMode', 'collection_mode'],
|
|
141
|
+
],
|
|
81
142
|
'sylphx.money.v1.CustomerSubscription': [
|
|
82
143
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
83
144
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
@@ -88,12 +149,22 @@ runtime.registerSchemas({
|
|
|
88
149
|
['trialEndTime', 'trial_end_time'],
|
|
89
150
|
['metadata', 'metadata', undefined, 'json'],
|
|
90
151
|
],
|
|
152
|
+
'sylphx.money.v1.DeleteRevenueSourceRequest': [
|
|
153
|
+
['validateOnly', 'validate_only'],
|
|
154
|
+
],
|
|
91
155
|
'sylphx.money.v1.DeleteStoreConnectionRequest': [],
|
|
92
156
|
'sylphx.money.v1.DisconnectMerchantAccountRequest': [],
|
|
93
157
|
'sylphx.money.v1.EntitlementGrant': [
|
|
94
158
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
95
159
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
96
160
|
['expireTime', 'expire_time'],
|
|
161
|
+
['approvalRef', 'approval_ref'],
|
|
162
|
+
],
|
|
163
|
+
'sylphx.money.v1.ExchangeRate': [
|
|
164
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
165
|
+
['currencyCode', 'currency_code'],
|
|
166
|
+
['perUsd', 'per_usd'],
|
|
167
|
+
['publicationDay', 'publication_day'],
|
|
97
168
|
],
|
|
98
169
|
'sylphx.money.v1.Feature': [
|
|
99
170
|
['displayName', 'display_name'],
|
|
@@ -103,14 +174,27 @@ runtime.registerSchemas({
|
|
|
103
174
|
['spec', 'spec', 'sylphx.money.v1.LicenceKeySpec'],
|
|
104
175
|
],
|
|
105
176
|
'sylphx.money.v1.GetCatalogRequest': [],
|
|
177
|
+
'sylphx.money.v1.GetCheckoutPolicyRequest': [],
|
|
106
178
|
'sylphx.money.v1.GetCheckoutSessionRequest': [],
|
|
179
|
+
'sylphx.money.v1.GetCreditGrantRequest': [],
|
|
107
180
|
'sylphx.money.v1.GetCustomerSubscriptionRequest': [],
|
|
108
181
|
'sylphx.money.v1.GetEntitlementGrantRequest': [],
|
|
109
182
|
'sylphx.money.v1.GetLicenceKeyRequest': [],
|
|
110
183
|
'sylphx.money.v1.GetMerchantAccountRequest': [],
|
|
111
184
|
'sylphx.money.v1.GetPortalSessionRequest': [],
|
|
185
|
+
'sylphx.money.v1.GetRevenueSourceRequest': [],
|
|
186
|
+
'sylphx.money.v1.GetRevenueSummaryRequest': [
|
|
187
|
+
['startDay', 'start_day'],
|
|
188
|
+
['endDay', 'end_day'],
|
|
189
|
+
['groupBy', 'group_by'],
|
|
190
|
+
['currencyCode', 'currency_code'],
|
|
191
|
+
],
|
|
112
192
|
'sylphx.money.v1.GetStoreConnectionRequest': [],
|
|
113
193
|
'sylphx.money.v1.GetStorePurchaseRequest': [],
|
|
194
|
+
'sylphx.money.v1.GetUsageInvoiceRequest': [],
|
|
195
|
+
'sylphx.money.v1.GetUsageMeterRequest': [],
|
|
196
|
+
'sylphx.money.v1.GetUsageReservationRequest': [],
|
|
197
|
+
'sylphx.money.v1.GetUsageSettingsRequest': [],
|
|
114
198
|
'sylphx.money.v1.GooglePlayConnection': [
|
|
115
199
|
['packageNames', 'package_names'],
|
|
116
200
|
['serviceAccountJson', 'service_account_json'],
|
|
@@ -123,6 +207,16 @@ runtime.registerSchemas({
|
|
|
123
207
|
['expectedPublicKey', 'expected_public_key'],
|
|
124
208
|
['spec', 'spec', 'sylphx.money.v1.LicenceKeySpec'],
|
|
125
209
|
],
|
|
210
|
+
'sylphx.money.v1.IngestedUsageEvent': [
|
|
211
|
+
['eventId', 'event_id'],
|
|
212
|
+
['meterVersion', 'meter_version'],
|
|
213
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
214
|
+
['occurredTime', 'occurred_time'],
|
|
215
|
+
],
|
|
216
|
+
'sylphx.money.v1.IngestedUsageEventResult': [
|
|
217
|
+
['eventId', 'event_id'],
|
|
218
|
+
['usageEvent', 'usage_event'],
|
|
219
|
+
],
|
|
126
220
|
'sylphx.money.v1.LicenceKey': [
|
|
127
221
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
128
222
|
['spec', 'spec', 'sylphx.money.v1.LicenceKeySpec'],
|
|
@@ -147,6 +241,14 @@ runtime.registerSchemas({
|
|
|
147
241
|
['expireTime', 'expire_time'],
|
|
148
242
|
],
|
|
149
243
|
'sylphx.money.v1.LineItem': [],
|
|
244
|
+
'sylphx.money.v1.ListCreditGrantsRequest': [
|
|
245
|
+
['pageSize', 'page_size'],
|
|
246
|
+
['pageToken', 'page_token'],
|
|
247
|
+
],
|
|
248
|
+
'sylphx.money.v1.ListCreditGrantsResponse': [
|
|
249
|
+
['creditGrants', 'credit_grants', 'sylphx.money.v1.CreditGrant'],
|
|
250
|
+
['nextPageToken', 'next_page_token'],
|
|
251
|
+
],
|
|
150
252
|
'sylphx.money.v1.ListCustomerSubscriptionsRequest': [
|
|
151
253
|
['pageSize', 'page_size'],
|
|
152
254
|
['pageToken', 'page_token'],
|
|
@@ -163,6 +265,14 @@ runtime.registerSchemas({
|
|
|
163
265
|
['entitlementGrants', 'entitlement_grants', 'sylphx.money.v1.EntitlementGrant'],
|
|
164
266
|
['nextPageToken', 'next_page_token'],
|
|
165
267
|
],
|
|
268
|
+
'sylphx.money.v1.ListExchangeRatesRequest': [
|
|
269
|
+
['pageSize', 'page_size'],
|
|
270
|
+
['pageToken', 'page_token'],
|
|
271
|
+
],
|
|
272
|
+
'sylphx.money.v1.ListExchangeRatesResponse': [
|
|
273
|
+
['exchangeRates', 'exchange_rates', 'sylphx.money.v1.ExchangeRate'],
|
|
274
|
+
['nextPageToken', 'next_page_token'],
|
|
275
|
+
],
|
|
166
276
|
'sylphx.money.v1.ListLicenceKeysRequest': [
|
|
167
277
|
['pageSize', 'page_size'],
|
|
168
278
|
['pageToken', 'page_token'],
|
|
@@ -187,6 +297,22 @@ runtime.registerSchemas({
|
|
|
187
297
|
['merchantAccounts', 'merchant_accounts', 'sylphx.money.v1.MerchantAccount'],
|
|
188
298
|
['nextPageToken', 'next_page_token'],
|
|
189
299
|
],
|
|
300
|
+
'sylphx.money.v1.ListRevenueFactsRequest': [
|
|
301
|
+
['pageSize', 'page_size'],
|
|
302
|
+
['pageToken', 'page_token'],
|
|
303
|
+
],
|
|
304
|
+
'sylphx.money.v1.ListRevenueFactsResponse': [
|
|
305
|
+
['revenueFacts', 'revenue_facts', 'sylphx.money.v1.RevenueFact'],
|
|
306
|
+
['nextPageToken', 'next_page_token'],
|
|
307
|
+
],
|
|
308
|
+
'sylphx.money.v1.ListRevenueSourcesRequest': [
|
|
309
|
+
['pageSize', 'page_size'],
|
|
310
|
+
['pageToken', 'page_token'],
|
|
311
|
+
],
|
|
312
|
+
'sylphx.money.v1.ListRevenueSourcesResponse': [
|
|
313
|
+
['revenueSources', 'revenue_sources', 'sylphx.money.v1.RevenueSource'],
|
|
314
|
+
['nextPageToken', 'next_page_token'],
|
|
315
|
+
],
|
|
190
316
|
'sylphx.money.v1.ListStoreConnectionsRequest': [
|
|
191
317
|
['pageSize', 'page_size'],
|
|
192
318
|
['pageToken', 'page_token'],
|
|
@@ -203,6 +329,54 @@ runtime.registerSchemas({
|
|
|
203
329
|
['storePurchases', 'store_purchases', 'sylphx.money.v1.StorePurchase'],
|
|
204
330
|
['nextPageToken', 'next_page_token'],
|
|
205
331
|
],
|
|
332
|
+
'sylphx.money.v1.ListTaxThresholdStatusesRequest': [
|
|
333
|
+
['pageSize', 'page_size'],
|
|
334
|
+
['pageToken', 'page_token'],
|
|
335
|
+
],
|
|
336
|
+
'sylphx.money.v1.ListTaxThresholdStatusesResponse': [
|
|
337
|
+
['taxThresholdStatuses', 'tax_threshold_statuses', 'sylphx.money.v1.TaxThresholdStatus'],
|
|
338
|
+
['nextPageToken', 'next_page_token'],
|
|
339
|
+
],
|
|
340
|
+
'sylphx.money.v1.ListUsageEventsRequest': [
|
|
341
|
+
['pageSize', 'page_size'],
|
|
342
|
+
['pageToken', 'page_token'],
|
|
343
|
+
],
|
|
344
|
+
'sylphx.money.v1.ListUsageEventsResponse': [
|
|
345
|
+
['usageEvents', 'usage_events', 'sylphx.money.v1.UsageEvent'],
|
|
346
|
+
['nextPageToken', 'next_page_token'],
|
|
347
|
+
],
|
|
348
|
+
'sylphx.money.v1.ListUsageInvoicesRequest': [
|
|
349
|
+
['pageSize', 'page_size'],
|
|
350
|
+
['pageToken', 'page_token'],
|
|
351
|
+
],
|
|
352
|
+
'sylphx.money.v1.ListUsageInvoicesResponse': [
|
|
353
|
+
['usageInvoices', 'usage_invoices', 'sylphx.money.v1.UsageInvoice'],
|
|
354
|
+
['nextPageToken', 'next_page_token'],
|
|
355
|
+
],
|
|
356
|
+
'sylphx.money.v1.ListUsageMeterPricesRequest': [
|
|
357
|
+
['pageSize', 'page_size'],
|
|
358
|
+
['pageToken', 'page_token'],
|
|
359
|
+
],
|
|
360
|
+
'sylphx.money.v1.ListUsageMeterPricesResponse': [
|
|
361
|
+
['usageMeterPrices', 'usage_meter_prices', 'sylphx.money.v1.UsageMeterPrice'],
|
|
362
|
+
['nextPageToken', 'next_page_token'],
|
|
363
|
+
],
|
|
364
|
+
'sylphx.money.v1.ListUsageMetersRequest': [
|
|
365
|
+
['pageSize', 'page_size'],
|
|
366
|
+
['pageToken', 'page_token'],
|
|
367
|
+
],
|
|
368
|
+
'sylphx.money.v1.ListUsageMetersResponse': [
|
|
369
|
+
['usageMeters', 'usage_meters', 'sylphx.money.v1.UsageMeter'],
|
|
370
|
+
['nextPageToken', 'next_page_token'],
|
|
371
|
+
],
|
|
372
|
+
'sylphx.money.v1.ListUsageTiersRequest': [
|
|
373
|
+
['pageSize', 'page_size'],
|
|
374
|
+
['pageToken', 'page_token'],
|
|
375
|
+
],
|
|
376
|
+
'sylphx.money.v1.ListUsageTiersResponse': [
|
|
377
|
+
['usageTiers', 'usage_tiers', 'sylphx.money.v1.UsageTier'],
|
|
378
|
+
['nextPageToken', 'next_page_token'],
|
|
379
|
+
],
|
|
206
380
|
'sylphx.money.v1.MerchantAccount': [
|
|
207
381
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
208
382
|
['accountId', 'account_id'],
|
|
@@ -212,6 +386,7 @@ runtime.registerSchemas({
|
|
|
212
386
|
['regionCode', 'region_code'],
|
|
213
387
|
['defaultCurrencyCode', 'default_currency_code'],
|
|
214
388
|
['refreshTime', 'refresh_time'],
|
|
389
|
+
['automaticTax', 'automatic_tax'],
|
|
215
390
|
],
|
|
216
391
|
'sylphx.money.v1.PortalSession': [
|
|
217
392
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
@@ -235,8 +410,70 @@ runtime.registerSchemas({
|
|
|
235
410
|
['licence', 'licence', 'sylphx.money.v1.LicencePolicy'],
|
|
236
411
|
],
|
|
237
412
|
'sylphx.money.v1.RefreshMerchantAccountRequest': [],
|
|
413
|
+
'sylphx.money.v1.ReleaseUsageInvoiceCollectionRequest': [],
|
|
414
|
+
'sylphx.money.v1.ReleaseUsageReservationRequest': [],
|
|
238
415
|
'sylphx.money.v1.ResumeCustomerSubscriptionRequest': [],
|
|
239
416
|
'sylphx.money.v1.RetireLicenceKeyRequest': [],
|
|
417
|
+
'sylphx.money.v1.RevenueBucket': [
|
|
418
|
+
['startDay', 'start_day'],
|
|
419
|
+
['unconvertedCount', 'unconverted_count'],
|
|
420
|
+
['lines', 'lines', 'sylphx.money.v1.RevenueLine'],
|
|
421
|
+
],
|
|
422
|
+
'sylphx.money.v1.RevenueFact': [
|
|
423
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
424
|
+
['externalKey', 'external_key'],
|
|
425
|
+
['storeKind', 'store_kind'],
|
|
426
|
+
['accountRef', 'account_ref'],
|
|
427
|
+
['productRef', 'product_ref'],
|
|
428
|
+
['regionCode', 'region_code'],
|
|
429
|
+
['currencyCode', 'currency_code'],
|
|
430
|
+
['settledOn', 'settled_on'],
|
|
431
|
+
],
|
|
432
|
+
'sylphx.money.v1.RevenueLine': [],
|
|
433
|
+
'sylphx.money.v1.RevenueSource': [
|
|
434
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
435
|
+
['spec', 'spec', 'sylphx.money.v1.RevenueSourceSpec'],
|
|
436
|
+
['status', 'status', 'sylphx.money.v1.RevenueSourceStatus'],
|
|
437
|
+
],
|
|
438
|
+
'sylphx.money.v1.RevenueSourceSpec': [
|
|
439
|
+
['displayName', 'display_name'],
|
|
440
|
+
['config', 'config', undefined, 'map'],
|
|
441
|
+
],
|
|
442
|
+
'sylphx.money.v1.RevenueSourceStatus': [
|
|
443
|
+
['observedGeneration', 'observed_generation'],
|
|
444
|
+
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
445
|
+
['lastSuccessTime', 'last_success_time'],
|
|
446
|
+
['newestDay', 'newest_day'],
|
|
447
|
+
['lastRunState', 'last_run_state'],
|
|
448
|
+
['lastRunError', 'last_run_error'],
|
|
449
|
+
],
|
|
450
|
+
'sylphx.money.v1.RevenueSummary': [
|
|
451
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
452
|
+
['startDay', 'start_day'],
|
|
453
|
+
['endDay', 'end_day'],
|
|
454
|
+
['currencyCode', 'currency_code'],
|
|
455
|
+
['groupBy', 'group_by'],
|
|
456
|
+
['buckets', 'buckets', 'sylphx.money.v1.RevenueBucket'],
|
|
457
|
+
['lines', 'lines', 'sylphx.money.v1.RevenueLine'],
|
|
458
|
+
['staleSources', 'stale_sources', 'sylphx.money.v1.StaleRevenueSource'],
|
|
459
|
+
['unconverted', 'unconverted', 'sylphx.money.v1.UnconvertedAmount'],
|
|
460
|
+
['unconvertedCount', 'unconverted_count'],
|
|
461
|
+
],
|
|
462
|
+
'sylphx.money.v1.RunRevenueSourceRequest': [
|
|
463
|
+
['startDay', 'start_day'],
|
|
464
|
+
['endDay', 'end_day'],
|
|
465
|
+
],
|
|
466
|
+
'sylphx.money.v1.RunRevenueSourceResponse': [
|
|
467
|
+
['revenueSource', 'revenue_source', 'sylphx.money.v1.RevenueSource'],
|
|
468
|
+
],
|
|
469
|
+
'sylphx.money.v1.SettleUsageReservationRequest': [
|
|
470
|
+
['quantityUsed', 'quantity_used'],
|
|
471
|
+
['occurredTime', 'occurred_time'],
|
|
472
|
+
],
|
|
473
|
+
'sylphx.money.v1.StaleRevenueSource': [
|
|
474
|
+
['displayName', 'display_name'],
|
|
475
|
+
['newestDay', 'newest_day'],
|
|
476
|
+
],
|
|
240
477
|
'sylphx.money.v1.StoreConnection': [
|
|
241
478
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
242
479
|
['spec', 'spec', 'sylphx.money.v1.StoreConnectionSpec'],
|
|
@@ -247,6 +484,7 @@ runtime.registerSchemas({
|
|
|
247
484
|
['googlePlay', 'google_play', 'sylphx.money.v1.GooglePlayConnection'],
|
|
248
485
|
['allowSandbox', 'allow_sandbox'],
|
|
249
486
|
['requireAccountToken', 'require_account_token'],
|
|
487
|
+
['clientVerify', 'client_verify'],
|
|
250
488
|
],
|
|
251
489
|
'sylphx.money.v1.StoreConnectionStatus': [
|
|
252
490
|
['observedGeneration', 'observed_generation'],
|
|
@@ -266,6 +504,8 @@ runtime.registerSchemas({
|
|
|
266
504
|
['revokeTime', 'revoke_time'],
|
|
267
505
|
['currencyCode', 'currency_code'],
|
|
268
506
|
['customerSubscription', 'customer_subscription'],
|
|
507
|
+
['regionCode', 'region_code'],
|
|
508
|
+
['originalPurchaseTime', 'original_purchase_time'],
|
|
269
509
|
['clawBack', 'claw_back'],
|
|
270
510
|
],
|
|
271
511
|
'sylphx.money.v1.Subject': [
|
|
@@ -273,27 +513,147 @@ runtime.registerSchemas({
|
|
|
273
513
|
['customerOrganization', 'customer_organization'],
|
|
274
514
|
],
|
|
275
515
|
'sylphx.money.v1.SyncCatalogRequest': [],
|
|
516
|
+
'sylphx.money.v1.TaxThresholdStatus': [
|
|
517
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
518
|
+
['regionCode', 'region_code'],
|
|
519
|
+
['subdivisionCode', 'subdivision_code'],
|
|
520
|
+
['taxName', 'tax_name'],
|
|
521
|
+
['currencyCode', 'currency_code'],
|
|
522
|
+
['thresholdAmount', 'threshold_amount'],
|
|
523
|
+
['thresholdTransactionCount', 'threshold_transaction_count'],
|
|
524
|
+
['windowKind', 'window_kind'],
|
|
525
|
+
['windowStartTime', 'window_start_time'],
|
|
526
|
+
['windowEndTime', 'window_end_time'],
|
|
527
|
+
['salesAmount', 'sales_amount'],
|
|
528
|
+
['salesTransactionCount', 'sales_transaction_count'],
|
|
529
|
+
['alertedPercent', 'alerted_percent'],
|
|
530
|
+
['unconvertedCurrencyCodes', 'unconverted_currency_codes'],
|
|
531
|
+
['sourceUrl', 'source_url'],
|
|
532
|
+
['effectiveTime', 'effective_time'],
|
|
533
|
+
],
|
|
534
|
+
'sylphx.money.v1.UnconvertedAmount': [
|
|
535
|
+
['currencyCode', 'currency_code'],
|
|
536
|
+
],
|
|
276
537
|
'sylphx.money.v1.UpdateCatalogRequest': [
|
|
277
538
|
['catalog', 'catalog', 'sylphx.money.v1.Catalog'],
|
|
278
539
|
['updateMask', 'update_mask'],
|
|
279
540
|
['allowMissing', 'allow_missing'],
|
|
280
541
|
['validateOnly', 'validate_only'],
|
|
281
542
|
],
|
|
543
|
+
'sylphx.money.v1.UpdateCheckoutPolicyRequest': [
|
|
544
|
+
['checkoutPolicy', 'checkout_policy', 'sylphx.money.v1.CheckoutPolicy'],
|
|
545
|
+
['updateMask', 'update_mask'],
|
|
546
|
+
['allowMissing', 'allow_missing'],
|
|
547
|
+
['validateOnly', 'validate_only'],
|
|
548
|
+
],
|
|
282
549
|
'sylphx.money.v1.UpdateCustomerSubscriptionQuantityRequest': [
|
|
283
550
|
['prorationBehavior', 'proration_behavior'],
|
|
284
551
|
],
|
|
552
|
+
'sylphx.money.v1.UpdateMerchantAccountRequest': [
|
|
553
|
+
['merchantAccount', 'merchant_account', 'sylphx.money.v1.MerchantAccount'],
|
|
554
|
+
['updateMask', 'update_mask'],
|
|
555
|
+
],
|
|
556
|
+
'sylphx.money.v1.UpdateRevenueSourceRequest': [
|
|
557
|
+
['revenueSource', 'revenue_source', 'sylphx.money.v1.RevenueSource'],
|
|
558
|
+
['updateMask', 'update_mask'],
|
|
559
|
+
['validateOnly', 'validate_only'],
|
|
560
|
+
],
|
|
285
561
|
'sylphx.money.v1.UpdateStoreConnectionRequest': [
|
|
286
562
|
['storeConnection', 'store_connection', 'sylphx.money.v1.StoreConnection'],
|
|
287
563
|
['updateMask', 'update_mask'],
|
|
288
564
|
['allowMissing', 'allow_missing'],
|
|
289
565
|
['validateOnly', 'validate_only'],
|
|
290
566
|
],
|
|
567
|
+
'sylphx.money.v1.UpdateUsageMeterRequest': [
|
|
568
|
+
['usageMeter', 'usage_meter', 'sylphx.money.v1.UsageMeter'],
|
|
569
|
+
['updateMask', 'update_mask'],
|
|
570
|
+
],
|
|
571
|
+
'sylphx.money.v1.UpdateUsageSettingsRequest': [
|
|
572
|
+
['usageSettings', 'usage_settings', 'sylphx.money.v1.UsageSettings'],
|
|
573
|
+
['updateMask', 'update_mask'],
|
|
574
|
+
],
|
|
575
|
+
'sylphx.money.v1.UpdateUsageTierRequest': [
|
|
576
|
+
['usageTier', 'usage_tier', 'sylphx.money.v1.UsageTier'],
|
|
577
|
+
['updateMask', 'update_mask'],
|
|
578
|
+
],
|
|
579
|
+
'sylphx.money.v1.UsageEvent': [
|
|
580
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
581
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
582
|
+
['subjectProof', 'subject_proof'],
|
|
583
|
+
['actorProof', 'actor_proof'],
|
|
584
|
+
['occurredTime', 'occurred_time'],
|
|
585
|
+
['amountNano', 'amount_nano'],
|
|
586
|
+
['usageReservation', 'usage_reservation'],
|
|
587
|
+
],
|
|
588
|
+
'sylphx.money.v1.UsageInvoice': [
|
|
589
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
590
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
591
|
+
['taxPendingReason', 'tax_pending_reason'],
|
|
592
|
+
['grossMinor', 'gross_minor'],
|
|
593
|
+
['subtotalMinor', 'subtotal_minor'],
|
|
594
|
+
['taxMinor', 'tax_minor'],
|
|
595
|
+
['postTaxCreditMinor', 'post_tax_credit_minor'],
|
|
596
|
+
['totalMinor', 'total_minor'],
|
|
597
|
+
['amountPaidMinor', 'amount_paid_minor'],
|
|
598
|
+
['collectionMode', 'collection_mode'],
|
|
599
|
+
['issueTime', 'issue_time'],
|
|
600
|
+
['dueTime', 'due_time'],
|
|
601
|
+
],
|
|
602
|
+
'sylphx.money.v1.UsageMeter': [
|
|
603
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
604
|
+
['displayName', 'display_name'],
|
|
605
|
+
['reservationOptional', 'reservation_optional'],
|
|
606
|
+
['currentUnitPriceNano', 'current_unit_price_nano'],
|
|
607
|
+
],
|
|
608
|
+
'sylphx.money.v1.UsageMeterPrice': [
|
|
609
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
610
|
+
['currencyCode', 'currency_code'],
|
|
611
|
+
['unitPriceNano', 'unit_price_nano'],
|
|
612
|
+
['effectiveTime', 'effective_time'],
|
|
613
|
+
['taxCode', 'tax_code'],
|
|
614
|
+
],
|
|
615
|
+
'sylphx.money.v1.UsageReservation': [
|
|
616
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
617
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
618
|
+
['subjectProof', 'subject_proof'],
|
|
619
|
+
['actorProof', 'actor_proof'],
|
|
620
|
+
['maxQuantity', 'max_quantity'],
|
|
621
|
+
['grantedQuantity', 'granted_quantity'],
|
|
622
|
+
['expireTime', 'expire_time'],
|
|
623
|
+
['darkRefusal', 'dark_refusal'],
|
|
624
|
+
],
|
|
625
|
+
'sylphx.money.v1.UsageSettings': [
|
|
626
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
627
|
+
['currencyCode', 'currency_code'],
|
|
628
|
+
['enforcementEnabled', 'enforcement_enabled'],
|
|
629
|
+
['freeAllowanceNano', 'free_allowance_nano'],
|
|
630
|
+
['pastDueGraceDays', 'past_due_grace_days'],
|
|
631
|
+
['suspendGraceDays', 'suspend_grace_days'],
|
|
632
|
+
['extraIssuer', 'extra_issuer'],
|
|
633
|
+
['extraIssuerJwksUrl', 'extra_issuer_jwks_url'],
|
|
634
|
+
['extraIssuerAudience', 'extra_issuer_audience'],
|
|
635
|
+
['extraIssuerOrgClaim', 'extra_issuer_org_claim'],
|
|
636
|
+
],
|
|
637
|
+
'sylphx.money.v1.UsageStanding': [
|
|
638
|
+
['paymentMethodOnFile', 'payment_method_on_file'],
|
|
639
|
+
['headroomMinor', 'headroom_minor'],
|
|
640
|
+
['thresholdMinor', 'threshold_minor'],
|
|
641
|
+
],
|
|
642
|
+
'sylphx.money.v1.UsageTier': [
|
|
643
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
644
|
+
['dailyLimitMinor', 'daily_limit_minor'],
|
|
645
|
+
['monthlyLimitMinor', 'monthly_limit_minor'],
|
|
646
|
+
['thresholdMinor', 'threshold_minor'],
|
|
647
|
+
['requiresPaidInvoices', 'requires_paid_invoices'],
|
|
648
|
+
['requiresPaidMinor', 'requires_paid_minor'],
|
|
649
|
+
],
|
|
291
650
|
'sylphx.money.v1.VerifyStorePurchaseRequest': [
|
|
292
651
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
293
652
|
['signedTransaction', 'signed_transaction'],
|
|
294
653
|
['purchaseToken', 'purchase_token'],
|
|
295
654
|
['productId', 'product_id'],
|
|
296
655
|
['packageName', 'package_name'],
|
|
656
|
+
['validateOnly', 'validate_only'],
|
|
297
657
|
['transactionId', 'transaction_id'],
|
|
298
658
|
['bundleId', 'bundle_id'],
|
|
299
659
|
],
|
|
@@ -302,6 +662,8 @@ runtime.registerSchemas({
|
|
|
302
662
|
['grantToken', 'grant_token'],
|
|
303
663
|
['alreadyVerified', 'already_verified'],
|
|
304
664
|
['customerSubscription', 'customer_subscription', 'sylphx.money.v1.CustomerSubscription'],
|
|
665
|
+
['grantClaims', 'grant_claims', undefined, 'json'],
|
|
666
|
+
['storeCompletion', 'store_completion'],
|
|
305
667
|
],
|
|
306
668
|
});
|
|
307
669
|
/**
|
|
@@ -315,6 +677,8 @@ runtime.registerSchemas({
|
|
|
315
677
|
export class MoneyApi {
|
|
316
678
|
/** The `price_catalogs` collection. */
|
|
317
679
|
priceCatalogs;
|
|
680
|
+
/** The `checkout_policies` collection. */
|
|
681
|
+
checkoutPolicies;
|
|
318
682
|
/** The `store_connections` collection. */
|
|
319
683
|
storeConnections;
|
|
320
684
|
/** The `store_purchases` collection. */
|
|
@@ -327,23 +691,63 @@ export class MoneyApi {
|
|
|
327
691
|
merchantAccounts;
|
|
328
692
|
/** The `checkout_sessions` collection. */
|
|
329
693
|
checkoutSessions;
|
|
694
|
+
/** The `tax_threshold_statuses` collection. */
|
|
695
|
+
taxThresholdStatuses;
|
|
330
696
|
/** The `portal_sessions` collection. */
|
|
331
697
|
portalSessions;
|
|
332
698
|
/** The `licence_keys` collection. */
|
|
333
699
|
licenceKeys;
|
|
334
700
|
/** The `licence_tokens` collection. */
|
|
335
701
|
licenceTokens;
|
|
702
|
+
/** The `usage_settings` collection. */
|
|
703
|
+
usageSettings;
|
|
704
|
+
/** The `usage_tiers` collection. */
|
|
705
|
+
usageTiers;
|
|
706
|
+
/** The `usage_reservations` collection. */
|
|
707
|
+
usageReservations;
|
|
708
|
+
/** The `usage_events` collection. */
|
|
709
|
+
usageEvents;
|
|
710
|
+
/** The `credit_grants` collection. */
|
|
711
|
+
creditGrants;
|
|
712
|
+
/** The `usage_invoices` collection. */
|
|
713
|
+
usageInvoices;
|
|
714
|
+
/** The `usage_meters` collection. */
|
|
715
|
+
usageMeters;
|
|
716
|
+
/** The `usage_meter_prices` collection. */
|
|
717
|
+
usageMeterPrices;
|
|
718
|
+
/** The `revenue_sources` collection. */
|
|
719
|
+
revenueSources;
|
|
720
|
+
/** The `revenue` collection. */
|
|
721
|
+
revenue;
|
|
722
|
+
/** The `revenue_facts` collection. */
|
|
723
|
+
revenueFacts;
|
|
724
|
+
/** The `exchange_rates` collection. */
|
|
725
|
+
exchangeRates;
|
|
336
726
|
constructor(client) {
|
|
337
727
|
this.priceCatalogs = new PriceCatalogsCollection(client);
|
|
728
|
+
this.checkoutPolicies = new CheckoutPoliciesCollection(client);
|
|
338
729
|
this.storeConnections = new StoreConnectionsCollection(client);
|
|
339
730
|
this.storePurchases = new StorePurchasesCollection(client);
|
|
340
731
|
this.customerSubscriptions = new CustomerSubscriptionsCollection(client);
|
|
341
732
|
this.entitlementGrants = new EntitlementGrantsCollection(client);
|
|
342
733
|
this.merchantAccounts = new MerchantAccountsCollection(client);
|
|
343
734
|
this.checkoutSessions = new CheckoutSessionsCollection(client);
|
|
735
|
+
this.taxThresholdStatuses = new TaxThresholdStatusesCollection(client);
|
|
344
736
|
this.portalSessions = new PortalSessionsCollection(client);
|
|
345
737
|
this.licenceKeys = new LicenceKeysCollection(client);
|
|
346
738
|
this.licenceTokens = new LicenceTokensCollection(client);
|
|
739
|
+
this.usageSettings = new UsageSettingsCollection(client);
|
|
740
|
+
this.usageTiers = new UsageTiersCollection(client);
|
|
741
|
+
this.usageReservations = new UsageReservationsCollection(client);
|
|
742
|
+
this.usageEvents = new UsageEventsCollection(client);
|
|
743
|
+
this.creditGrants = new CreditGrantsCollection(client);
|
|
744
|
+
this.usageInvoices = new UsageInvoicesCollection(client);
|
|
745
|
+
this.usageMeters = new UsageMetersCollection(client);
|
|
746
|
+
this.usageMeterPrices = new UsageMeterPricesCollection(client);
|
|
747
|
+
this.revenueSources = new RevenueSourcesCollection(client);
|
|
748
|
+
this.revenue = new RevenueCollection(client);
|
|
749
|
+
this.revenueFacts = new RevenueFactsCollection(client);
|
|
750
|
+
this.exchangeRates = new ExchangeRatesCollection(client);
|
|
347
751
|
}
|
|
348
752
|
}
|
|
349
753
|
/** `price_catalogs` of Sylphx Money: Resource type `money.sylphx.com/PriceCatalog`. */
|
|
@@ -404,6 +808,47 @@ export class PriceCatalogsCollection {
|
|
|
404
808
|
});
|
|
405
809
|
}
|
|
406
810
|
}
|
|
811
|
+
/** `checkout_policies` of Sylphx Money: Resource type `money.sylphx.com/CheckoutPolicy`. */
|
|
812
|
+
export class CheckoutPoliciesCollection {
|
|
813
|
+
client;
|
|
814
|
+
constructor(client) {
|
|
815
|
+
this.client = client;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Gets the environment's checkout policy: which buyer countries consumer
|
|
819
|
+
* checkout refuses. An environment that never wrote one refuses none.
|
|
820
|
+
*
|
|
821
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:read` · effect `read`
|
|
822
|
+
*
|
|
823
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
824
|
+
*/
|
|
825
|
+
async get(request) {
|
|
826
|
+
return this.client.call({
|
|
827
|
+
method: 'GET',
|
|
828
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/checkout_policies/*', 'name')}`,
|
|
829
|
+
responseType: 'sylphx.money.v1.CheckoutPolicy',
|
|
830
|
+
mutation: false,
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Updates the environment's checkout policy, whole.
|
|
835
|
+
*
|
|
836
|
+
* `PATCH /v1/{checkout_policy.name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:write` · effect `write`
|
|
837
|
+
*
|
|
838
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
839
|
+
*/
|
|
840
|
+
async update(request) {
|
|
841
|
+
return this.client.call({
|
|
842
|
+
method: 'PATCH',
|
|
843
|
+
path: `/v1/${runtime.pathParam(request.checkoutPolicy?.name, 'orgs/*/projects/*/envs/*/checkout_policies/*', 'checkout_policy.name')}`,
|
|
844
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
845
|
+
body: request.checkoutPolicy ?? {},
|
|
846
|
+
bodyType: 'sylphx.money.v1.CheckoutPolicy',
|
|
847
|
+
responseType: 'sylphx.money.v1.CheckoutPolicy',
|
|
848
|
+
mutation: true,
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
}
|
|
407
852
|
/** `store_connections` of Sylphx Money: Resource type `money.sylphx.com/StoreConnection`. */
|
|
408
853
|
export class StoreConnectionsCollection {
|
|
409
854
|
client;
|
|
@@ -530,6 +975,28 @@ export class StorePurchasesCollection {
|
|
|
530
975
|
mutation: true,
|
|
531
976
|
});
|
|
532
977
|
}
|
|
978
|
+
/**
|
|
979
|
+
* Verifies a store purchase for an app with no server: called with the
|
|
980
|
+
* environment's publishable key (`billing:client`), the subject is an
|
|
981
|
+
* install id (`inst_` and a UUID), and Money completes the purchase with the
|
|
982
|
+
* store (acknowledges or consumes it) so the app never calls the store's
|
|
983
|
+
* server API. Works only on store connections that set `client_verify`.
|
|
984
|
+
* Re-calling returns the same record and grant.
|
|
985
|
+
*
|
|
986
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/store_purchases:clientVerify` · permission `billing:client` · effect `write`
|
|
987
|
+
*
|
|
988
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_IN_USE`, `RATE_LIMITED`, `UNAVAILABLE`.
|
|
989
|
+
*/
|
|
990
|
+
async clientVerify(request) {
|
|
991
|
+
return this.client.call({
|
|
992
|
+
method: 'POST',
|
|
993
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/store_purchases:clientVerify`,
|
|
994
|
+
body: runtime.omit(request, ['parent']),
|
|
995
|
+
bodyType: 'sylphx.money.v1.ClientVerifyStorePurchaseRequest',
|
|
996
|
+
responseType: 'sylphx.money.v1.VerifyStorePurchaseResponse',
|
|
997
|
+
mutation: true,
|
|
998
|
+
});
|
|
999
|
+
}
|
|
533
1000
|
/**
|
|
534
1001
|
* Gets a store purchase.
|
|
535
1002
|
*
|
|
@@ -763,6 +1230,25 @@ export class EntitlementGrantsCollection {
|
|
|
763
1230
|
mutation: true,
|
|
764
1231
|
});
|
|
765
1232
|
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Creates a manual entitlement grant (support, comp, grace). Append-only;
|
|
1235
|
+
* needs the approval-class scope. The approver recorded is the key's principal.
|
|
1236
|
+
*
|
|
1237
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants` · permission `billing:credits.approve` · effect `write`
|
|
1238
|
+
*
|
|
1239
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `RESOURCE_ALREADY_EXISTS`.
|
|
1240
|
+
*/
|
|
1241
|
+
async create(request) {
|
|
1242
|
+
return this.client.call({
|
|
1243
|
+
method: 'POST',
|
|
1244
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/entitlement_grants`,
|
|
1245
|
+
query: { entitlement_grant_id: request.entitlementGrantId },
|
|
1246
|
+
body: request.entitlementGrant ?? {},
|
|
1247
|
+
bodyType: 'sylphx.money.v1.EntitlementGrant',
|
|
1248
|
+
responseType: 'sylphx.money.v1.EntitlementGrant',
|
|
1249
|
+
mutation: true,
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
766
1252
|
}
|
|
767
1253
|
/** `merchant_accounts` of Sylphx Money: Resource type `money.sylphx.com/MerchantAccount`. */
|
|
768
1254
|
export class MerchantAccountsCollection {
|
|
@@ -866,6 +1352,24 @@ export class MerchantAccountsCollection {
|
|
|
866
1352
|
mutation: true,
|
|
867
1353
|
});
|
|
868
1354
|
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Updates the merchant account's own settings: the fields named in `update_mask`.
|
|
1357
|
+
*
|
|
1358
|
+
* `PATCH /v1/{merchant_account.name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:write` · effect `write`
|
|
1359
|
+
*
|
|
1360
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1361
|
+
*/
|
|
1362
|
+
async update(request) {
|
|
1363
|
+
return this.client.call({
|
|
1364
|
+
method: 'PATCH',
|
|
1365
|
+
path: `/v1/${runtime.pathParam(request.merchantAccount?.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'merchant_account.name')}`,
|
|
1366
|
+
query: { update_mask: request.updateMask },
|
|
1367
|
+
body: request.merchantAccount ?? {},
|
|
1368
|
+
bodyType: 'sylphx.money.v1.MerchantAccount',
|
|
1369
|
+
responseType: 'sylphx.money.v1.MerchantAccount',
|
|
1370
|
+
mutation: true,
|
|
1371
|
+
});
|
|
1372
|
+
}
|
|
869
1373
|
}
|
|
870
1374
|
/** `checkout_sessions` of Sylphx Money: Resource type `money.sylphx.com/CheckoutSession`. */
|
|
871
1375
|
export class CheckoutSessionsCollection {
|
|
@@ -907,6 +1411,42 @@ export class CheckoutSessionsCollection {
|
|
|
907
1411
|
});
|
|
908
1412
|
}
|
|
909
1413
|
}
|
|
1414
|
+
/** `tax_threshold_statuses` of Sylphx Money: Resource type `money.sylphx.com/TaxThresholdStatus`. */
|
|
1415
|
+
export class TaxThresholdStatusesCollection {
|
|
1416
|
+
client;
|
|
1417
|
+
constructor(client) {
|
|
1418
|
+
this.client = client;
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* Lists where the environment's consumer sales stand against each
|
|
1422
|
+
* jurisdiction's digital-services tax registration threshold, per its own
|
|
1423
|
+
* window. EU and UK have no threshold and are not tracked.
|
|
1424
|
+
*
|
|
1425
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/tax_threshold_statuses` · permission `billing:read` · effect `read`
|
|
1426
|
+
*
|
|
1427
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1428
|
+
*/
|
|
1429
|
+
async list(request) {
|
|
1430
|
+
return this.client.call({
|
|
1431
|
+
method: 'GET',
|
|
1432
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/tax_threshold_statuses`,
|
|
1433
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
1434
|
+
responseType: 'sylphx.money.v1.ListTaxThresholdStatusesResponse',
|
|
1435
|
+
mutation: false,
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
/** Every item of every page of `list`. */
|
|
1439
|
+
async *listAll(request) {
|
|
1440
|
+
let next = request;
|
|
1441
|
+
for (;;) {
|
|
1442
|
+
const page = await this.list(next);
|
|
1443
|
+
yield* page.taxThresholdStatuses ?? [];
|
|
1444
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1445
|
+
return;
|
|
1446
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
910
1450
|
/** `portal_sessions` of Sylphx Money: Resource type `money.sylphx.com/PortalSession`. */
|
|
911
1451
|
export class PortalSessionsCollection {
|
|
912
1452
|
client;
|
|
@@ -1087,4 +1627,732 @@ export class LicenceTokensCollection {
|
|
|
1087
1627
|
}
|
|
1088
1628
|
}
|
|
1089
1629
|
}
|
|
1630
|
+
/** `usage_settings` of Sylphx Money: Resource type `money.sylphx.com/UsageSettings`. */
|
|
1631
|
+
export class UsageSettingsCollection {
|
|
1632
|
+
client;
|
|
1633
|
+
constructor(client) {
|
|
1634
|
+
this.client = client;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Gets the environment's usage settings.
|
|
1638
|
+
*
|
|
1639
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:read` · effect `read`
|
|
1640
|
+
*
|
|
1641
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1642
|
+
*/
|
|
1643
|
+
async get(request) {
|
|
1644
|
+
return this.client.call({
|
|
1645
|
+
method: 'GET',
|
|
1646
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_settings/*', 'name')}`,
|
|
1647
|
+
responseType: 'sylphx.money.v1.UsageSettings',
|
|
1648
|
+
mutation: false,
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Updates the usage settings, the enforcement switch included. A change is recorded with who made it.
|
|
1653
|
+
*
|
|
1654
|
+
* `PATCH /v1/{usage_settings.name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:write` · effect `write`
|
|
1655
|
+
*
|
|
1656
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1657
|
+
*/
|
|
1658
|
+
async update(request) {
|
|
1659
|
+
return this.client.call({
|
|
1660
|
+
method: 'PATCH',
|
|
1661
|
+
path: `/v1/${runtime.pathParam(request.usageSettings?.name, 'orgs/*/projects/*/envs/*/usage_settings/*', 'usage_settings.name')}`,
|
|
1662
|
+
query: { update_mask: request.updateMask },
|
|
1663
|
+
body: request.usageSettings ?? {},
|
|
1664
|
+
bodyType: 'sylphx.money.v1.UsageSettings',
|
|
1665
|
+
responseType: 'sylphx.money.v1.UsageSettings',
|
|
1666
|
+
mutation: true,
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
/** `usage_tiers` of Sylphx Money: Resource type `money.sylphx.com/UsageTier`. */
|
|
1671
|
+
export class UsageTiersCollection {
|
|
1672
|
+
client;
|
|
1673
|
+
constructor(client) {
|
|
1674
|
+
this.client = client;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Lists usage tiers.
|
|
1678
|
+
*
|
|
1679
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_tiers` · permission `billing:read` · effect `read`
|
|
1680
|
+
*
|
|
1681
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1682
|
+
*/
|
|
1683
|
+
async list(request) {
|
|
1684
|
+
return this.client.call({
|
|
1685
|
+
method: 'GET',
|
|
1686
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_tiers`,
|
|
1687
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
1688
|
+
responseType: 'sylphx.money.v1.ListUsageTiersResponse',
|
|
1689
|
+
mutation: false,
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1692
|
+
/** Every item of every page of `list`. */
|
|
1693
|
+
async *listAll(request) {
|
|
1694
|
+
let next = request;
|
|
1695
|
+
for (;;) {
|
|
1696
|
+
const page = await this.list(next);
|
|
1697
|
+
yield* page.usageTiers ?? [];
|
|
1698
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1699
|
+
return;
|
|
1700
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* Creates or updates a usage tier.
|
|
1705
|
+
*
|
|
1706
|
+
* `PATCH /v1/{usage_tier.name=orgs/*\/projects/*\/envs/*\/usage_tiers/*}` · permission `billing:write` · effect `write`
|
|
1707
|
+
*
|
|
1708
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1709
|
+
*/
|
|
1710
|
+
async update(request) {
|
|
1711
|
+
return this.client.call({
|
|
1712
|
+
method: 'PATCH',
|
|
1713
|
+
path: `/v1/${runtime.pathParam(request.usageTier?.name, 'orgs/*/projects/*/envs/*/usage_tiers/*', 'usage_tier.name')}`,
|
|
1714
|
+
query: { update_mask: request.updateMask },
|
|
1715
|
+
body: request.usageTier ?? {},
|
|
1716
|
+
bodyType: 'sylphx.money.v1.UsageTier',
|
|
1717
|
+
responseType: 'sylphx.money.v1.UsageTier',
|
|
1718
|
+
mutation: true,
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
/** `usage_reservations` of Sylphx Money: Resource type `money.sylphx.com/UsageReservation`. */
|
|
1723
|
+
export class UsageReservationsCollection {
|
|
1724
|
+
client;
|
|
1725
|
+
constructor(client) {
|
|
1726
|
+
this.client = client;
|
|
1727
|
+
}
|
|
1728
|
+
/**
|
|
1729
|
+
* 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.
|
|
1730
|
+
*
|
|
1731
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_reservations` · permission `billing:metering:write` · effect `write`
|
|
1732
|
+
*
|
|
1733
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `PLAN_LIMIT_REACHED`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNAVAILABLE`.
|
|
1734
|
+
*/
|
|
1735
|
+
async create(request) {
|
|
1736
|
+
return this.client.call({
|
|
1737
|
+
method: 'POST',
|
|
1738
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_reservations`,
|
|
1739
|
+
body: request.usageReservation ?? {},
|
|
1740
|
+
bodyType: 'sylphx.money.v1.UsageReservation',
|
|
1741
|
+
responseType: 'sylphx.money.v1.UsageReservation',
|
|
1742
|
+
mutation: true,
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1745
|
+
/**
|
|
1746
|
+
* Gets a usage reservation.
|
|
1747
|
+
*
|
|
1748
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}` · permission `billing:read` · effect `read`
|
|
1749
|
+
*
|
|
1750
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1751
|
+
*/
|
|
1752
|
+
async get(request) {
|
|
1753
|
+
return this.client.call({
|
|
1754
|
+
method: 'GET',
|
|
1755
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_reservations/*', 'name')}`,
|
|
1756
|
+
responseType: 'sylphx.money.v1.UsageReservation',
|
|
1757
|
+
mutation: false,
|
|
1758
|
+
});
|
|
1759
|
+
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Settles a reservation with what was used; the unused part returns to headroom. A settle after expiry still records the usage.
|
|
1762
|
+
*
|
|
1763
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:settle` · permission `billing:metering:write` · effect `write`
|
|
1764
|
+
*
|
|
1765
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1766
|
+
*/
|
|
1767
|
+
async settle(request) {
|
|
1768
|
+
return this.client.call({
|
|
1769
|
+
method: 'POST',
|
|
1770
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_reservations/*', 'name')}:settle`,
|
|
1771
|
+
body: runtime.omit(request, ['name']),
|
|
1772
|
+
bodyType: 'sylphx.money.v1.SettleUsageReservationRequest',
|
|
1773
|
+
responseType: 'sylphx.money.v1.UsageEvent',
|
|
1774
|
+
mutation: true,
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
/**
|
|
1778
|
+
* Releases a reservation that used nothing.
|
|
1779
|
+
*
|
|
1780
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:release` · permission `billing:metering:write` · effect `write`
|
|
1781
|
+
*
|
|
1782
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1783
|
+
*/
|
|
1784
|
+
async release(request) {
|
|
1785
|
+
return this.client.call({
|
|
1786
|
+
method: 'POST',
|
|
1787
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_reservations/*', 'name')}:release`,
|
|
1788
|
+
body: runtime.omit(request, ['name']),
|
|
1789
|
+
bodyType: 'sylphx.money.v1.ReleaseUsageReservationRequest',
|
|
1790
|
+
responseType: 'sylphx.money.v1.UsageReservation',
|
|
1791
|
+
mutation: true,
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
/** `usage_events` of Sylphx Money: Resource type `money.sylphx.com/UsageEvent`. */
|
|
1796
|
+
export class UsageEventsCollection {
|
|
1797
|
+
client;
|
|
1798
|
+
constructor(client) {
|
|
1799
|
+
this.client = client;
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Records usage directly, only for a meter the merchant marked reservation-optional.
|
|
1803
|
+
*
|
|
1804
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:metering:write` · effect `write`
|
|
1805
|
+
*
|
|
1806
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1807
|
+
*/
|
|
1808
|
+
async create(request) {
|
|
1809
|
+
return this.client.call({
|
|
1810
|
+
method: 'POST',
|
|
1811
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events`,
|
|
1812
|
+
body: request.usageEvent ?? {},
|
|
1813
|
+
bodyType: 'sylphx.money.v1.UsageEvent',
|
|
1814
|
+
responseType: 'sylphx.money.v1.UsageEvent',
|
|
1815
|
+
mutation: true,
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Records a batch of already-incurred usage from the merchant's own servers
|
|
1820
|
+
* (Stripe's meter-event model): the caller is a key of the merchant's own org
|
|
1821
|
+
* holding the exact grant `billing:metering:ingest`, which no wildcard covers,
|
|
1822
|
+
* and each event names its subject with no subject proof. Each event is keyed
|
|
1823
|
+
* by its project, meter, meter version and event id: a replay is a no-op
|
|
1824
|
+
* (`duplicate`), and the same key with different content is a `conflict` and
|
|
1825
|
+
* never counted. One result per event, in request order.
|
|
1826
|
+
*
|
|
1827
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:batchIngest` · permission `billing:metering:ingest` · effect `write`
|
|
1828
|
+
*
|
|
1829
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`.
|
|
1830
|
+
*/
|
|
1831
|
+
async batchIngest(request) {
|
|
1832
|
+
return this.client.call({
|
|
1833
|
+
method: 'POST',
|
|
1834
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events:batchIngest`,
|
|
1835
|
+
body: runtime.omit(request, ['parent']),
|
|
1836
|
+
bodyType: 'sylphx.money.v1.BatchIngestUsageEventsRequest',
|
|
1837
|
+
responseType: 'sylphx.money.v1.BatchIngestUsageEventsResponse',
|
|
1838
|
+
mutation: true,
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* Lists usage events, newest first.
|
|
1843
|
+
*
|
|
1844
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:read` · effect `read`
|
|
1845
|
+
*
|
|
1846
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1847
|
+
*/
|
|
1848
|
+
async list(request) {
|
|
1849
|
+
return this.client.call({
|
|
1850
|
+
method: 'GET',
|
|
1851
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events`,
|
|
1852
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
1853
|
+
responseType: 'sylphx.money.v1.ListUsageEventsResponse',
|
|
1854
|
+
mutation: false,
|
|
1855
|
+
});
|
|
1856
|
+
}
|
|
1857
|
+
/** Every item of every page of `list`. */
|
|
1858
|
+
async *listAll(request) {
|
|
1859
|
+
let next = request;
|
|
1860
|
+
for (;;) {
|
|
1861
|
+
const page = await this.list(next);
|
|
1862
|
+
yield* page.usageEvents ?? [];
|
|
1863
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1864
|
+
return;
|
|
1865
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* Reads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.
|
|
1870
|
+
*
|
|
1871
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:checkStanding` · permission `billing:read` · effect `read`
|
|
1872
|
+
*
|
|
1873
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1874
|
+
*/
|
|
1875
|
+
async checkStanding(request) {
|
|
1876
|
+
return this.client.call({
|
|
1877
|
+
method: 'POST',
|
|
1878
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events:checkStanding`,
|
|
1879
|
+
body: runtime.omit(request, ['parent']),
|
|
1880
|
+
bodyType: 'sylphx.money.v1.CheckUsageStandingRequest',
|
|
1881
|
+
responseType: 'sylphx.money.v1.UsageStanding',
|
|
1882
|
+
mutation: true,
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
/** `credit_grants` of Sylphx Money: Resource type `money.sylphx.com/CreditGrant`. */
|
|
1887
|
+
export class CreditGrantsCollection {
|
|
1888
|
+
client;
|
|
1889
|
+
constructor(client) {
|
|
1890
|
+
this.client = client;
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* 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.
|
|
1894
|
+
*
|
|
1895
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:credits.approve` · effect `write`
|
|
1896
|
+
*
|
|
1897
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1898
|
+
*/
|
|
1899
|
+
async create(request) {
|
|
1900
|
+
return this.client.call({
|
|
1901
|
+
method: 'POST',
|
|
1902
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/credit_grants`,
|
|
1903
|
+
body: request.creditGrant ?? {},
|
|
1904
|
+
bodyType: 'sylphx.money.v1.CreditGrant',
|
|
1905
|
+
responseType: 'sylphx.money.v1.CreditGrant',
|
|
1906
|
+
mutation: true,
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* Gets a credit grant.
|
|
1911
|
+
*
|
|
1912
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/credit_grants/*}` · permission `billing:read` · effect `read`
|
|
1913
|
+
*
|
|
1914
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1915
|
+
*/
|
|
1916
|
+
async get(request) {
|
|
1917
|
+
return this.client.call({
|
|
1918
|
+
method: 'GET',
|
|
1919
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/credit_grants/*', 'name')}`,
|
|
1920
|
+
responseType: 'sylphx.money.v1.CreditGrant',
|
|
1921
|
+
mutation: false,
|
|
1922
|
+
});
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* Lists credit grants.
|
|
1926
|
+
*
|
|
1927
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:read` · effect `read`
|
|
1928
|
+
*
|
|
1929
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1930
|
+
*/
|
|
1931
|
+
async list(request) {
|
|
1932
|
+
return this.client.call({
|
|
1933
|
+
method: 'GET',
|
|
1934
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/credit_grants`,
|
|
1935
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
1936
|
+
responseType: 'sylphx.money.v1.ListCreditGrantsResponse',
|
|
1937
|
+
mutation: false,
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1940
|
+
/** Every item of every page of `list`. */
|
|
1941
|
+
async *listAll(request) {
|
|
1942
|
+
let next = request;
|
|
1943
|
+
for (;;) {
|
|
1944
|
+
const page = await this.list(next);
|
|
1945
|
+
yield* page.creditGrants ?? [];
|
|
1946
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1947
|
+
return;
|
|
1948
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
/** `usage_invoices` of Sylphx Money: Resource type `money.sylphx.com/UsageInvoice`. */
|
|
1953
|
+
export class UsageInvoicesCollection {
|
|
1954
|
+
client;
|
|
1955
|
+
constructor(client) {
|
|
1956
|
+
this.client = client;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* Gets a usage invoice.
|
|
1960
|
+
*
|
|
1961
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}` · permission `billing:read` · effect `read`
|
|
1962
|
+
*
|
|
1963
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1964
|
+
*/
|
|
1965
|
+
async get(request) {
|
|
1966
|
+
return this.client.call({
|
|
1967
|
+
method: 'GET',
|
|
1968
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_invoices/*', 'name')}`,
|
|
1969
|
+
responseType: 'sylphx.money.v1.UsageInvoice',
|
|
1970
|
+
mutation: false,
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1973
|
+
/**
|
|
1974
|
+
* Lists usage invoices, newest first.
|
|
1975
|
+
*
|
|
1976
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_invoices` · permission `billing:read` · effect `read`
|
|
1977
|
+
*
|
|
1978
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1979
|
+
*/
|
|
1980
|
+
async list(request) {
|
|
1981
|
+
return this.client.call({
|
|
1982
|
+
method: 'GET',
|
|
1983
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_invoices`,
|
|
1984
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
1985
|
+
responseType: 'sylphx.money.v1.ListUsageInvoicesResponse',
|
|
1986
|
+
mutation: false,
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
/** Every item of every page of `list`. */
|
|
1990
|
+
async *listAll(request) {
|
|
1991
|
+
let next = request;
|
|
1992
|
+
for (;;) {
|
|
1993
|
+
const page = await this.list(next);
|
|
1994
|
+
yield* page.usageInvoices ?? [];
|
|
1995
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1996
|
+
return;
|
|
1997
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
/**
|
|
2001
|
+
* Releases a held invoice for collection, audited with who and why. Grant expiry or replacement never does.
|
|
2002
|
+
*
|
|
2003
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}:releaseCollection` · permission `billing:credits.approve` · effect `write`
|
|
2004
|
+
*
|
|
2005
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2006
|
+
*/
|
|
2007
|
+
async releaseCollection(request) {
|
|
2008
|
+
return this.client.call({
|
|
2009
|
+
method: 'POST',
|
|
2010
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_invoices/*', 'name')}:releaseCollection`,
|
|
2011
|
+
body: runtime.omit(request, ['name']),
|
|
2012
|
+
bodyType: 'sylphx.money.v1.ReleaseUsageInvoiceCollectionRequest',
|
|
2013
|
+
responseType: 'sylphx.money.v1.UsageInvoice',
|
|
2014
|
+
mutation: true,
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
/** `usage_meters` of Sylphx Money: Resource type `money.sylphx.com/UsageMeter`. */
|
|
2019
|
+
export class UsageMetersCollection {
|
|
2020
|
+
client;
|
|
2021
|
+
constructor(client) {
|
|
2022
|
+
this.client = client;
|
|
2023
|
+
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Gets a usage meter.
|
|
2026
|
+
*
|
|
2027
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:read` · effect `read`
|
|
2028
|
+
*
|
|
2029
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2030
|
+
*/
|
|
2031
|
+
async get(request) {
|
|
2032
|
+
return this.client.call({
|
|
2033
|
+
method: 'GET',
|
|
2034
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_meters/*', 'name')}`,
|
|
2035
|
+
responseType: 'sylphx.money.v1.UsageMeter',
|
|
2036
|
+
mutation: false,
|
|
2037
|
+
});
|
|
2038
|
+
}
|
|
2039
|
+
/**
|
|
2040
|
+
* Lists usage meters.
|
|
2041
|
+
*
|
|
2042
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meters` · permission `billing:read` · effect `read`
|
|
2043
|
+
*
|
|
2044
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2045
|
+
*/
|
|
2046
|
+
async list(request) {
|
|
2047
|
+
return this.client.call({
|
|
2048
|
+
method: 'GET',
|
|
2049
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_meters`,
|
|
2050
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
2051
|
+
responseType: 'sylphx.money.v1.ListUsageMetersResponse',
|
|
2052
|
+
mutation: false,
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
/** Every item of every page of `list`. */
|
|
2056
|
+
async *listAll(request) {
|
|
2057
|
+
let next = request;
|
|
2058
|
+
for (;;) {
|
|
2059
|
+
const page = await this.list(next);
|
|
2060
|
+
yield* page.usageMeters ?? [];
|
|
2061
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2062
|
+
return;
|
|
2063
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* Creates or updates a usage meter. The unit cannot change once it has recorded usage.
|
|
2068
|
+
*
|
|
2069
|
+
* `PATCH /v1/{usage_meter.name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:write` · effect `write`
|
|
2070
|
+
*
|
|
2071
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2072
|
+
*/
|
|
2073
|
+
async update(request) {
|
|
2074
|
+
return this.client.call({
|
|
2075
|
+
method: 'PATCH',
|
|
2076
|
+
path: `/v1/${runtime.pathParam(request.usageMeter?.name, 'orgs/*/projects/*/envs/*/usage_meters/*', 'usage_meter.name')}`,
|
|
2077
|
+
query: { update_mask: request.updateMask },
|
|
2078
|
+
body: request.usageMeter ?? {},
|
|
2079
|
+
bodyType: 'sylphx.money.v1.UsageMeter',
|
|
2080
|
+
responseType: 'sylphx.money.v1.UsageMeter',
|
|
2081
|
+
mutation: true,
|
|
2082
|
+
});
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
/** `usage_meter_prices` of Sylphx Money: Resource type `money.sylphx.com/UsageMeterPrice`. */
|
|
2086
|
+
export class UsageMeterPricesCollection {
|
|
2087
|
+
client;
|
|
2088
|
+
constructor(client) {
|
|
2089
|
+
this.client = client;
|
|
2090
|
+
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Appends a price to a meter's history. It applies from its effective time on and never rewrites usage already rated.
|
|
2093
|
+
*
|
|
2094
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:write` · effect `write`
|
|
2095
|
+
*
|
|
2096
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2097
|
+
*/
|
|
2098
|
+
async create(request) {
|
|
2099
|
+
return this.client.call({
|
|
2100
|
+
method: 'POST',
|
|
2101
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_meter_prices`,
|
|
2102
|
+
body: request.usageMeterPrice ?? {},
|
|
2103
|
+
bodyType: 'sylphx.money.v1.UsageMeterPrice',
|
|
2104
|
+
responseType: 'sylphx.money.v1.UsageMeterPrice',
|
|
2105
|
+
mutation: true,
|
|
2106
|
+
});
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Lists meter prices, newest first; filter by `meter`.
|
|
2110
|
+
*
|
|
2111
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:read` · effect `read`
|
|
2112
|
+
*
|
|
2113
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2114
|
+
*/
|
|
2115
|
+
async list(request) {
|
|
2116
|
+
return this.client.call({
|
|
2117
|
+
method: 'GET',
|
|
2118
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_meter_prices`,
|
|
2119
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2120
|
+
responseType: 'sylphx.money.v1.ListUsageMeterPricesResponse',
|
|
2121
|
+
mutation: false,
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
/** Every item of every page of `list`. */
|
|
2125
|
+
async *listAll(request) {
|
|
2126
|
+
let next = request;
|
|
2127
|
+
for (;;) {
|
|
2128
|
+
const page = await this.list(next);
|
|
2129
|
+
yield* page.usageMeterPrices ?? [];
|
|
2130
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2131
|
+
return;
|
|
2132
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
/** `revenue_sources` of Sylphx Money: Resource type `money.sylphx.com/RevenueSource`. */
|
|
2137
|
+
export class RevenueSourcesCollection {
|
|
2138
|
+
client;
|
|
2139
|
+
constructor(client) {
|
|
2140
|
+
this.client = client;
|
|
2141
|
+
}
|
|
2142
|
+
/**
|
|
2143
|
+
* Gets a revenue source, with its freshness. Revenue reporting
|
|
2144
|
+
* (docs/adr/ADR-01M40HRQT0VSXZ1WANP8M318F2) is org-wide: `revenue:read` or
|
|
2145
|
+
* `revenue:write`, held by an org-wide key or an org owner's or admin's
|
|
2146
|
+
* session only; a project or environment key is refused.
|
|
2147
|
+
*
|
|
2148
|
+
* `GET /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:read` · effect `read`
|
|
2149
|
+
*
|
|
2150
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2151
|
+
*/
|
|
2152
|
+
async get(request) {
|
|
2153
|
+
return this.client.call({
|
|
2154
|
+
method: 'GET',
|
|
2155
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue_sources/*', 'name')}`,
|
|
2156
|
+
responseType: 'sylphx.money.v1.RevenueSource',
|
|
2157
|
+
mutation: false,
|
|
2158
|
+
});
|
|
2159
|
+
}
|
|
2160
|
+
/**
|
|
2161
|
+
* Lists the org's revenue sources, with their freshness.
|
|
2162
|
+
*
|
|
2163
|
+
* `GET /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:read` · effect `read`
|
|
2164
|
+
*
|
|
2165
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2166
|
+
*/
|
|
2167
|
+
async list(request) {
|
|
2168
|
+
return this.client.call({
|
|
2169
|
+
method: 'GET',
|
|
2170
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/revenue_sources`,
|
|
2171
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
2172
|
+
responseType: 'sylphx.money.v1.ListRevenueSourcesResponse',
|
|
2173
|
+
mutation: false,
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
/** Every item of every page of `list`. */
|
|
2177
|
+
async *listAll(request) {
|
|
2178
|
+
let next = request;
|
|
2179
|
+
for (;;) {
|
|
2180
|
+
const page = await this.list(next);
|
|
2181
|
+
yield* page.revenueSources ?? [];
|
|
2182
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2183
|
+
return;
|
|
2184
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* Registers a revenue source. The `money` source is implicit and never
|
|
2189
|
+
* created here.
|
|
2190
|
+
*
|
|
2191
|
+
* `POST /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:write` · effect `write`
|
|
2192
|
+
*
|
|
2193
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2194
|
+
*/
|
|
2195
|
+
async create(request) {
|
|
2196
|
+
return this.client.call({
|
|
2197
|
+
method: 'POST',
|
|
2198
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/revenue_sources`,
|
|
2199
|
+
query: { revenue_source_id: request.revenueSourceId, validate_only: request.validateOnly },
|
|
2200
|
+
body: request.revenueSource ?? {},
|
|
2201
|
+
bodyType: 'sylphx.money.v1.RevenueSource',
|
|
2202
|
+
responseType: 'sylphx.money.v1.RevenueSource',
|
|
2203
|
+
mutation: true,
|
|
2204
|
+
});
|
|
2205
|
+
}
|
|
2206
|
+
/**
|
|
2207
|
+
* Renames, pauses or resumes a revenue source, or changes its settings.
|
|
2208
|
+
*
|
|
2209
|
+
* `PATCH /v1/{revenue_source.name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `write`
|
|
2210
|
+
*
|
|
2211
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2212
|
+
*/
|
|
2213
|
+
async update(request) {
|
|
2214
|
+
return this.client.call({
|
|
2215
|
+
method: 'PATCH',
|
|
2216
|
+
path: `/v1/${runtime.pathParam(request.revenueSource?.name, 'orgs/*/revenue_sources/*', 'revenue_source.name')}`,
|
|
2217
|
+
query: { update_mask: request.updateMask, validate_only: request.validateOnly },
|
|
2218
|
+
body: request.revenueSource ?? {},
|
|
2219
|
+
bodyType: 'sylphx.money.v1.RevenueSource',
|
|
2220
|
+
responseType: 'sylphx.money.v1.RevenueSource',
|
|
2221
|
+
mutation: true,
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
/**
|
|
2225
|
+
* Deletes a revenue source and the facts it reported. The `money` source
|
|
2226
|
+
* cannot be deleted; pause it instead.
|
|
2227
|
+
*
|
|
2228
|
+
* `DELETE /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `destructive`
|
|
2229
|
+
*
|
|
2230
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2231
|
+
*/
|
|
2232
|
+
async delete(request) {
|
|
2233
|
+
return this.client.call({
|
|
2234
|
+
method: 'DELETE',
|
|
2235
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue_sources/*', 'name')}`,
|
|
2236
|
+
query: { etag: request.etag, validate_only: request.validateOnly },
|
|
2237
|
+
mutation: true,
|
|
2238
|
+
});
|
|
2239
|
+
}
|
|
2240
|
+
/**
|
|
2241
|
+
* Syncs a revenue source now, or backfills a period. A `money` source
|
|
2242
|
+
* fills any booked fact its environment's ledger holds and the facts lack;
|
|
2243
|
+
* a paused source, or one whose connector has not shipped yet, is refused
|
|
2244
|
+
* (`INVALID_STATE`).
|
|
2245
|
+
*
|
|
2246
|
+
* `POST /v1/{name=orgs/*\/revenue_sources/*}:run` · permission `revenue:write` · effect `write`
|
|
2247
|
+
*
|
|
2248
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2249
|
+
*/
|
|
2250
|
+
async run(request) {
|
|
2251
|
+
return this.client.call({
|
|
2252
|
+
method: 'POST',
|
|
2253
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue_sources/*', 'name')}:run`,
|
|
2254
|
+
body: runtime.omit(request, ['name']),
|
|
2255
|
+
bodyType: 'sylphx.money.v1.RunRevenueSourceRequest',
|
|
2256
|
+
responseType: 'sylphx.money.v1.RunRevenueSourceResponse',
|
|
2257
|
+
mutation: true,
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
/** `revenue` of Sylphx Money: Resource type `money.sylphx.com/RevenueSummary`. */
|
|
2262
|
+
export class RevenueCollection {
|
|
2263
|
+
client;
|
|
2264
|
+
constructor(client) {
|
|
2265
|
+
this.client = client;
|
|
2266
|
+
}
|
|
2267
|
+
/**
|
|
2268
|
+
* Gets the org's revenue over a period: totals by day or month, split by
|
|
2269
|
+
* source or product, gross or net, in one reporting currency, with the
|
|
2270
|
+
* basis of each bucket, the sources that report late, and what has no
|
|
2271
|
+
* rate yet. Reads only the daily roll-up, bounded by a 5 second statement
|
|
2272
|
+
* timeout. For example `sylphx money revenue summary --period mtd
|
|
2273
|
+
* --split source`.
|
|
2274
|
+
*
|
|
2275
|
+
* `GET /v1/{name=orgs/*\/revenue}` · permission `revenue:read` · effect `read`
|
|
2276
|
+
*
|
|
2277
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `UNAVAILABLE`.
|
|
2278
|
+
*/
|
|
2279
|
+
async get(request) {
|
|
2280
|
+
return this.client.call({
|
|
2281
|
+
method: 'GET',
|
|
2282
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue', 'name')}`,
|
|
2283
|
+
query: { period: request.period, month: request.month, start_day: request.startDay, end_day: request.endDay, group_by: request.groupBy, split: request.split, amount: request.amount, currency_code: request.currencyCode },
|
|
2284
|
+
responseType: 'sylphx.money.v1.RevenueSummary',
|
|
2285
|
+
mutation: false,
|
|
2286
|
+
});
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
/** `revenue_facts` of Sylphx Money: Resource type `money.sylphx.com/RevenueFact`. */
|
|
2290
|
+
export class RevenueFactsCollection {
|
|
2291
|
+
client;
|
|
2292
|
+
constructor(client) {
|
|
2293
|
+
this.client = client;
|
|
2294
|
+
}
|
|
2295
|
+
/**
|
|
2296
|
+
* Lists the org's revenue facts, newest day first, for audit and export.
|
|
2297
|
+
*
|
|
2298
|
+
* `GET /v1/{parent=orgs/*}/revenue_facts` · permission `revenue:read` · effect `read`
|
|
2299
|
+
*
|
|
2300
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `UNAVAILABLE`.
|
|
2301
|
+
*/
|
|
2302
|
+
async list(request) {
|
|
2303
|
+
return this.client.call({
|
|
2304
|
+
method: 'GET',
|
|
2305
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/revenue_facts`,
|
|
2306
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2307
|
+
responseType: 'sylphx.money.v1.ListRevenueFactsResponse',
|
|
2308
|
+
mutation: false,
|
|
2309
|
+
});
|
|
2310
|
+
}
|
|
2311
|
+
/** Every item of every page of `list`. */
|
|
2312
|
+
async *listAll(request) {
|
|
2313
|
+
let next = request;
|
|
2314
|
+
for (;;) {
|
|
2315
|
+
const page = await this.list(next);
|
|
2316
|
+
yield* page.revenueFacts ?? [];
|
|
2317
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2318
|
+
return;
|
|
2319
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
/** `exchange_rates` of Sylphx Money: Resource type `money.sylphx.com/ExchangeRate`. */
|
|
2324
|
+
export class ExchangeRatesCollection {
|
|
2325
|
+
client;
|
|
2326
|
+
constructor(client) {
|
|
2327
|
+
this.client = client;
|
|
2328
|
+
}
|
|
2329
|
+
/**
|
|
2330
|
+
* Lists the exchange rates Money converts at (units per US dollar by day),
|
|
2331
|
+
* for any reader that converts revenue.
|
|
2332
|
+
*
|
|
2333
|
+
* `GET /v1/{parent=orgs/*}/exchange_rates` · permission `revenue:read` · effect `read`
|
|
2334
|
+
*
|
|
2335
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2336
|
+
*/
|
|
2337
|
+
async list(request) {
|
|
2338
|
+
return this.client.call({
|
|
2339
|
+
method: 'GET',
|
|
2340
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/exchange_rates`,
|
|
2341
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2342
|
+
responseType: 'sylphx.money.v1.ListExchangeRatesResponse',
|
|
2343
|
+
mutation: false,
|
|
2344
|
+
});
|
|
2345
|
+
}
|
|
2346
|
+
/** Every item of every page of `list`. */
|
|
2347
|
+
async *listAll(request) {
|
|
2348
|
+
let next = request;
|
|
2349
|
+
for (;;) {
|
|
2350
|
+
const page = await this.list(next);
|
|
2351
|
+
yield* page.exchangeRates ?? [];
|
|
2352
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2353
|
+
return;
|
|
2354
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
1090
2358
|
//# sourceMappingURL=money.js.map
|