@sylphx/sdk 0.32.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/dist/access.d.ts +50 -1
- package/dist/access.js +14 -2
- package/dist/access.js.map +1 -1
- package/dist/agents.d.ts +2002 -0
- package/dist/agents.js +1367 -0
- package/dist/agents.js.map +1 -0
- package/dist/ai.js +1 -1
- package/dist/ai.js.map +1 -1
- package/dist/analytics.d.ts +232 -0
- package/dist/analytics.js +126 -0
- package/dist/analytics.js.map +1 -0
- package/dist/artifacts.d.ts +47 -1
- package/dist/artifacts.js +30 -2
- package/dist/artifacts.js.map +1 -1
- package/dist/assets.js +1 -1
- package/dist/assets.js.map +1 -1
- package/dist/auth/client.d.ts +34 -3
- package/dist/auth/client.js +42 -5
- package/dist/auth/client.js.map +1 -1
- package/dist/auth/continue-mock.d.ts +21 -0
- package/dist/auth/continue-mock.js +75 -0
- package/dist/auth/continue-mock.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.js +1 -1
- package/dist/auth/verify.js.map +1 -1
- package/dist/auth.d.ts +370 -2
- package/dist/auth.js +282 -2
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +96 -11
- package/dist/billing.js +41 -1
- package/dist/billing.js.map +1 -1
- package/dist/broker.d.ts +165 -33
- package/dist/broker.js +103 -7
- package/dist/broker.js.map +1 -1
- package/dist/browser-upload.d.ts +101 -0
- package/dist/browser-upload.js +130 -0
- package/dist/browser-upload.js.map +1 -0
- package/dist/build.d.ts +361 -28
- 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/common.js.map +1 -1
- package/dist/config/flags.d.ts +12 -2
- package/dist/config/flags.js +54 -6
- package/dist/config/flags.js.map +1 -1
- package/dist/config.d.ts +24 -0
- package/dist/config.js +22 -1
- package/dist/config.js.map +1 -1
- package/dist/connections.d.ts +128 -25
- package/dist/connections.js +72 -25
- package/dist/connections.js.map +1 -1
- package/dist/data.d.ts +358 -13
- package/dist/data.js +166 -9
- package/dist/data.js.map +1 -1
- package/dist/entitlement.js +1 -1
- package/dist/entitlement.js.map +1 -1
- package/dist/events/realtime.js +1 -1
- package/dist/events/realtime.js.map +1 -1
- package/dist/events/webhooks.js +1 -1
- package/dist/events/webhooks.js.map +1 -1
- package/dist/events.d.ts +36 -0
- package/dist/events.js +29 -1
- package/dist/events.js.map +1 -1
- package/dist/flags.d.ts +20 -0
- package/dist/flags.js +48 -0
- package/dist/flags.js.map +1 -0
- package/dist/hosting.js +1 -1
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +192 -2
- package/dist/ids.js +40 -2
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +32 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.js +1 -1
- package/dist/keys.js.map +1 -1
- package/dist/knowledge.d.ts +1215 -0
- package/dist/knowledge.js +1012 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/localization.js +1 -1
- package/dist/localization.js.map +1 -1
- package/dist/methods.js +1938 -15
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +1989 -53
- package/dist/money.js +1401 -19
- package/dist/money.js.map +1 -1
- package/dist/network.js +1 -1
- package/dist/network.js.map +1 -1
- package/dist/notify.d.ts +686 -1
- package/dist/notify.js +552 -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/release.js.map +1 -1
- package/dist/runners.js +1 -1
- package/dist/runners.js.map +1 -1
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.js +54 -1
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes/stream-mock.d.ts +124 -0
- package/dist/sandboxes/stream-mock.js +476 -0
- package/dist/sandboxes/stream-mock.js.map +1 -0
- package/dist/sandboxes/stream.d.ts +407 -0
- package/dist/sandboxes/stream.js +335 -0
- package/dist/sandboxes/stream.js.map +1 -0
- package/dist/sandboxes.d.ts +94 -17
- package/dist/sandboxes.js +33 -4
- package/dist/sandboxes.js.map +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
|
|
1
|
+
// @generated by sylphx-gen. Do not edit.
|
|
2
2
|
// `sylphx.money.v1`.
|
|
3
3
|
import * as runtime from './runtime.js';
|
|
4
4
|
import './common.js';
|
|
@@ -11,6 +11,17 @@ 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
|
+
],
|
|
20
|
+
'sylphx.money.v1.BookedVolumeLine': [
|
|
21
|
+
['productRef', 'product_ref'],
|
|
22
|
+
['currencyCode', 'currency_code'],
|
|
23
|
+
['postingCount', 'posting_count'],
|
|
24
|
+
],
|
|
14
25
|
'sylphx.money.v1.CancelCustomerSubscriptionRequest': [
|
|
15
26
|
['atPeriodEnd', 'at_period_end'],
|
|
16
27
|
['refundLastPayment', 'refund_last_payment'],
|
|
@@ -25,6 +36,7 @@ runtime.registerSchemas({
|
|
|
25
36
|
['products', 'products', 'sylphx.money.v1.Product'],
|
|
26
37
|
['clientGrantTtl', 'client_grant_ttl'],
|
|
27
38
|
['refundClawBack', 'refund_claw_back'],
|
|
39
|
+
['applicationData', 'application_data', undefined, 'json'],
|
|
28
40
|
],
|
|
29
41
|
'sylphx.money.v1.CatalogStatus': [
|
|
30
42
|
['observedGeneration', 'observed_generation'],
|
|
@@ -43,6 +55,30 @@ runtime.registerSchemas({
|
|
|
43
55
|
['entitlementGrant', 'entitlement_grant'],
|
|
44
56
|
['expireTime', 'expire_time'],
|
|
45
57
|
],
|
|
58
|
+
'sylphx.money.v1.CheckUsageStandingRequest': [
|
|
59
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
60
|
+
['subjectProof', 'subject_proof'],
|
|
61
|
+
['actorProof', 'actor_proof'],
|
|
62
|
+
],
|
|
63
|
+
'sylphx.money.v1.CheckoutConsent': [
|
|
64
|
+
['termsAccepted', 'terms_accepted'],
|
|
65
|
+
['termsText', 'terms_text'],
|
|
66
|
+
['termsVersion', 'terms_version'],
|
|
67
|
+
['recordTime', 'record_time'],
|
|
68
|
+
],
|
|
69
|
+
'sylphx.money.v1.CheckoutConsentCollection': [
|
|
70
|
+
['termsRequired', 'terms_required'],
|
|
71
|
+
['termsText', 'terms_text'],
|
|
72
|
+
['termsVersion', 'terms_version'],
|
|
73
|
+
],
|
|
74
|
+
'sylphx.money.v1.CheckoutPolicy': [
|
|
75
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
76
|
+
['spec', 'spec', 'sylphx.money.v1.CheckoutPolicySpec'],
|
|
77
|
+
],
|
|
78
|
+
'sylphx.money.v1.CheckoutPolicySpec': [
|
|
79
|
+
['deniedCountryCodes', 'denied_country_codes'],
|
|
80
|
+
['allowTaxIdBuyers', 'allow_tax_id_buyers'],
|
|
81
|
+
],
|
|
46
82
|
'sylphx.money.v1.CheckoutSession': [
|
|
47
83
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
48
84
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
@@ -52,8 +88,28 @@ runtime.registerSchemas({
|
|
|
52
88
|
['currencyCode', 'currency_code'],
|
|
53
89
|
['metadata', 'metadata', undefined, 'map'],
|
|
54
90
|
['allowPromotionCodes', 'allow_promotion_codes'],
|
|
91
|
+
['buyerCountryCode', 'buyer_country_code'],
|
|
92
|
+
['shippingCountryCodes', 'shipping_country_codes'],
|
|
55
93
|
['expireTime', 'expire_time'],
|
|
56
94
|
['processorSessionId', 'processor_session_id'],
|
|
95
|
+
['deniedReason', 'denied_reason'],
|
|
96
|
+
['billingCountryCode', 'billing_country_code'],
|
|
97
|
+
['billingSubdivisionCode', 'billing_subdivision_code'],
|
|
98
|
+
['consentCollection', 'consent_collection', 'sylphx.money.v1.CheckoutConsentCollection'],
|
|
99
|
+
['consent', 'consent', 'sylphx.money.v1.CheckoutConsent'],
|
|
100
|
+
['customerEmail', 'customer_email'],
|
|
101
|
+
['shippingAddress', 'shipping_address', 'sylphx.money.v1.ShippingAddress'],
|
|
102
|
+
['amountTotal', 'amount_total'],
|
|
103
|
+
['paymentStatus', 'payment_status'],
|
|
104
|
+
['processorPaymentId', 'processor_payment_id'],
|
|
105
|
+
],
|
|
106
|
+
'sylphx.money.v1.ClientVerifyStorePurchaseRequest': [
|
|
107
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
108
|
+
['signedTransaction', 'signed_transaction'],
|
|
109
|
+
['purchaseToken', 'purchase_token'],
|
|
110
|
+
['productId', 'product_id'],
|
|
111
|
+
['packageName', 'package_name'],
|
|
112
|
+
['accountToken', 'account_token'],
|
|
57
113
|
],
|
|
58
114
|
'sylphx.money.v1.ConnectMerchantAccountRequest': [
|
|
59
115
|
['merchantAccountId', 'merchant_account_id'],
|
|
@@ -69,15 +125,45 @@ runtime.registerSchemas({
|
|
|
69
125
|
['checkoutSession', 'checkout_session', 'sylphx.money.v1.CheckoutSession'],
|
|
70
126
|
['checkoutSessionId', 'checkout_session_id'],
|
|
71
127
|
],
|
|
128
|
+
'sylphx.money.v1.CreateCreditGrantRequest': [
|
|
129
|
+
['creditGrant', 'credit_grant', 'sylphx.money.v1.CreditGrant'],
|
|
130
|
+
],
|
|
131
|
+
'sylphx.money.v1.CreateEntitlementGrantRequest': [
|
|
132
|
+
['entitlementGrantId', 'entitlement_grant_id'],
|
|
133
|
+
['entitlementGrant', 'entitlement_grant', 'sylphx.money.v1.EntitlementGrant'],
|
|
134
|
+
],
|
|
72
135
|
'sylphx.money.v1.CreatePortalSessionRequest': [
|
|
73
136
|
['portalSession', 'portal_session', 'sylphx.money.v1.PortalSession'],
|
|
74
137
|
['portalSessionId', 'portal_session_id'],
|
|
75
138
|
],
|
|
139
|
+
'sylphx.money.v1.CreateRevenueSourceRequest': [
|
|
140
|
+
['revenueSourceId', 'revenue_source_id'],
|
|
141
|
+
['revenueSource', 'revenue_source', 'sylphx.money.v1.RevenueSource'],
|
|
142
|
+
['validateOnly', 'validate_only'],
|
|
143
|
+
],
|
|
76
144
|
'sylphx.money.v1.CreateStoreConnectionRequest': [
|
|
77
145
|
['storeConnectionId', 'store_connection_id'],
|
|
78
146
|
['storeConnection', 'store_connection', 'sylphx.money.v1.StoreConnection'],
|
|
79
147
|
['validateOnly', 'validate_only'],
|
|
80
148
|
],
|
|
149
|
+
'sylphx.money.v1.CreateUsageEventRequest': [
|
|
150
|
+
['usageEvent', 'usage_event', 'sylphx.money.v1.UsageEvent'],
|
|
151
|
+
],
|
|
152
|
+
'sylphx.money.v1.CreateUsageMeterPriceRequest': [
|
|
153
|
+
['usageMeterPrice', 'usage_meter_price', 'sylphx.money.v1.UsageMeterPrice'],
|
|
154
|
+
],
|
|
155
|
+
'sylphx.money.v1.CreateUsageReservationRequest': [
|
|
156
|
+
['usageReservation', 'usage_reservation', 'sylphx.money.v1.UsageReservation'],
|
|
157
|
+
],
|
|
158
|
+
'sylphx.money.v1.CreditGrant': [
|
|
159
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
160
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
161
|
+
['amountMinor', 'amount_minor'],
|
|
162
|
+
['startTime', 'start_time'],
|
|
163
|
+
['expireTime', 'expire_time'],
|
|
164
|
+
['taxTreatment', 'tax_treatment'],
|
|
165
|
+
['collectionMode', 'collection_mode'],
|
|
166
|
+
],
|
|
81
167
|
'sylphx.money.v1.CustomerSubscription': [
|
|
82
168
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
83
169
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
@@ -87,6 +173,10 @@ runtime.registerSchemas({
|
|
|
87
173
|
['cancelAtPeriodEnd', 'cancel_at_period_end'],
|
|
88
174
|
['trialEndTime', 'trial_end_time'],
|
|
89
175
|
['metadata', 'metadata', undefined, 'json'],
|
|
176
|
+
['billingCountryCode', 'billing_country_code'],
|
|
177
|
+
],
|
|
178
|
+
'sylphx.money.v1.DeleteRevenueSourceRequest': [
|
|
179
|
+
['validateOnly', 'validate_only'],
|
|
90
180
|
],
|
|
91
181
|
'sylphx.money.v1.DeleteStoreConnectionRequest': [],
|
|
92
182
|
'sylphx.money.v1.DisconnectMerchantAccountRequest': [],
|
|
@@ -94,7 +184,15 @@ runtime.registerSchemas({
|
|
|
94
184
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
95
185
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
96
186
|
['expireTime', 'expire_time'],
|
|
187
|
+
['approvalRef', 'approval_ref'],
|
|
188
|
+
],
|
|
189
|
+
'sylphx.money.v1.ExchangeRate': [
|
|
190
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
191
|
+
['currencyCode', 'currency_code'],
|
|
192
|
+
['perUsd', 'per_usd'],
|
|
193
|
+
['publicationDay', 'publication_day'],
|
|
97
194
|
],
|
|
195
|
+
'sylphx.money.v1.ExpireCheckoutSessionRequest': [],
|
|
98
196
|
'sylphx.money.v1.Feature': [
|
|
99
197
|
['displayName', 'display_name'],
|
|
100
198
|
],
|
|
@@ -103,14 +201,27 @@ runtime.registerSchemas({
|
|
|
103
201
|
['spec', 'spec', 'sylphx.money.v1.LicenceKeySpec'],
|
|
104
202
|
],
|
|
105
203
|
'sylphx.money.v1.GetCatalogRequest': [],
|
|
204
|
+
'sylphx.money.v1.GetCheckoutPolicyRequest': [],
|
|
106
205
|
'sylphx.money.v1.GetCheckoutSessionRequest': [],
|
|
206
|
+
'sylphx.money.v1.GetCreditGrantRequest': [],
|
|
107
207
|
'sylphx.money.v1.GetCustomerSubscriptionRequest': [],
|
|
108
208
|
'sylphx.money.v1.GetEntitlementGrantRequest': [],
|
|
109
209
|
'sylphx.money.v1.GetLicenceKeyRequest': [],
|
|
110
210
|
'sylphx.money.v1.GetMerchantAccountRequest': [],
|
|
111
211
|
'sylphx.money.v1.GetPortalSessionRequest': [],
|
|
212
|
+
'sylphx.money.v1.GetRevenueSourceRequest': [],
|
|
213
|
+
'sylphx.money.v1.GetRevenueSummaryRequest': [
|
|
214
|
+
['startDay', 'start_day'],
|
|
215
|
+
['endDay', 'end_day'],
|
|
216
|
+
['groupBy', 'group_by'],
|
|
217
|
+
['currencyCode', 'currency_code'],
|
|
218
|
+
],
|
|
112
219
|
'sylphx.money.v1.GetStoreConnectionRequest': [],
|
|
113
220
|
'sylphx.money.v1.GetStorePurchaseRequest': [],
|
|
221
|
+
'sylphx.money.v1.GetUsageInvoiceRequest': [],
|
|
222
|
+
'sylphx.money.v1.GetUsageMeterRequest': [],
|
|
223
|
+
'sylphx.money.v1.GetUsageReservationRequest': [],
|
|
224
|
+
'sylphx.money.v1.GetUsageSettingsRequest': [],
|
|
114
225
|
'sylphx.money.v1.GooglePlayConnection': [
|
|
115
226
|
['packageNames', 'package_names'],
|
|
116
227
|
['serviceAccountJson', 'service_account_json'],
|
|
@@ -123,6 +234,16 @@ runtime.registerSchemas({
|
|
|
123
234
|
['expectedPublicKey', 'expected_public_key'],
|
|
124
235
|
['spec', 'spec', 'sylphx.money.v1.LicenceKeySpec'],
|
|
125
236
|
],
|
|
237
|
+
'sylphx.money.v1.IngestedUsageEvent': [
|
|
238
|
+
['eventId', 'event_id'],
|
|
239
|
+
['meterVersion', 'meter_version'],
|
|
240
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
241
|
+
['occurredTime', 'occurred_time'],
|
|
242
|
+
],
|
|
243
|
+
'sylphx.money.v1.IngestedUsageEventResult': [
|
|
244
|
+
['eventId', 'event_id'],
|
|
245
|
+
['usageEvent', 'usage_event'],
|
|
246
|
+
],
|
|
126
247
|
'sylphx.money.v1.LicenceKey': [
|
|
127
248
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
128
249
|
['spec', 'spec', 'sylphx.money.v1.LicenceKeySpec'],
|
|
@@ -147,6 +268,14 @@ runtime.registerSchemas({
|
|
|
147
268
|
['expireTime', 'expire_time'],
|
|
148
269
|
],
|
|
149
270
|
'sylphx.money.v1.LineItem': [],
|
|
271
|
+
'sylphx.money.v1.ListCreditGrantsRequest': [
|
|
272
|
+
['pageSize', 'page_size'],
|
|
273
|
+
['pageToken', 'page_token'],
|
|
274
|
+
],
|
|
275
|
+
'sylphx.money.v1.ListCreditGrantsResponse': [
|
|
276
|
+
['creditGrants', 'credit_grants', 'sylphx.money.v1.CreditGrant'],
|
|
277
|
+
['nextPageToken', 'next_page_token'],
|
|
278
|
+
],
|
|
150
279
|
'sylphx.money.v1.ListCustomerSubscriptionsRequest': [
|
|
151
280
|
['pageSize', 'page_size'],
|
|
152
281
|
['pageToken', 'page_token'],
|
|
@@ -163,6 +292,14 @@ runtime.registerSchemas({
|
|
|
163
292
|
['entitlementGrants', 'entitlement_grants', 'sylphx.money.v1.EntitlementGrant'],
|
|
164
293
|
['nextPageToken', 'next_page_token'],
|
|
165
294
|
],
|
|
295
|
+
'sylphx.money.v1.ListExchangeRatesRequest': [
|
|
296
|
+
['pageSize', 'page_size'],
|
|
297
|
+
['pageToken', 'page_token'],
|
|
298
|
+
],
|
|
299
|
+
'sylphx.money.v1.ListExchangeRatesResponse': [
|
|
300
|
+
['exchangeRates', 'exchange_rates', 'sylphx.money.v1.ExchangeRate'],
|
|
301
|
+
['nextPageToken', 'next_page_token'],
|
|
302
|
+
],
|
|
166
303
|
'sylphx.money.v1.ListLicenceKeysRequest': [
|
|
167
304
|
['pageSize', 'page_size'],
|
|
168
305
|
['pageToken', 'page_token'],
|
|
@@ -187,6 +324,22 @@ runtime.registerSchemas({
|
|
|
187
324
|
['merchantAccounts', 'merchant_accounts', 'sylphx.money.v1.MerchantAccount'],
|
|
188
325
|
['nextPageToken', 'next_page_token'],
|
|
189
326
|
],
|
|
327
|
+
'sylphx.money.v1.ListRevenueFactsRequest': [
|
|
328
|
+
['pageSize', 'page_size'],
|
|
329
|
+
['pageToken', 'page_token'],
|
|
330
|
+
],
|
|
331
|
+
'sylphx.money.v1.ListRevenueFactsResponse': [
|
|
332
|
+
['revenueFacts', 'revenue_facts', 'sylphx.money.v1.RevenueFact'],
|
|
333
|
+
['nextPageToken', 'next_page_token'],
|
|
334
|
+
],
|
|
335
|
+
'sylphx.money.v1.ListRevenueSourcesRequest': [
|
|
336
|
+
['pageSize', 'page_size'],
|
|
337
|
+
['pageToken', 'page_token'],
|
|
338
|
+
],
|
|
339
|
+
'sylphx.money.v1.ListRevenueSourcesResponse': [
|
|
340
|
+
['revenueSources', 'revenue_sources', 'sylphx.money.v1.RevenueSource'],
|
|
341
|
+
['nextPageToken', 'next_page_token'],
|
|
342
|
+
],
|
|
190
343
|
'sylphx.money.v1.ListStoreConnectionsRequest': [
|
|
191
344
|
['pageSize', 'page_size'],
|
|
192
345
|
['pageToken', 'page_token'],
|
|
@@ -203,6 +356,54 @@ runtime.registerSchemas({
|
|
|
203
356
|
['storePurchases', 'store_purchases', 'sylphx.money.v1.StorePurchase'],
|
|
204
357
|
['nextPageToken', 'next_page_token'],
|
|
205
358
|
],
|
|
359
|
+
'sylphx.money.v1.ListTaxThresholdStatusesRequest': [
|
|
360
|
+
['pageSize', 'page_size'],
|
|
361
|
+
['pageToken', 'page_token'],
|
|
362
|
+
],
|
|
363
|
+
'sylphx.money.v1.ListTaxThresholdStatusesResponse': [
|
|
364
|
+
['taxThresholdStatuses', 'tax_threshold_statuses', 'sylphx.money.v1.TaxThresholdStatus'],
|
|
365
|
+
['nextPageToken', 'next_page_token'],
|
|
366
|
+
],
|
|
367
|
+
'sylphx.money.v1.ListUsageEventsRequest': [
|
|
368
|
+
['pageSize', 'page_size'],
|
|
369
|
+
['pageToken', 'page_token'],
|
|
370
|
+
],
|
|
371
|
+
'sylphx.money.v1.ListUsageEventsResponse': [
|
|
372
|
+
['usageEvents', 'usage_events', 'sylphx.money.v1.UsageEvent'],
|
|
373
|
+
['nextPageToken', 'next_page_token'],
|
|
374
|
+
],
|
|
375
|
+
'sylphx.money.v1.ListUsageInvoicesRequest': [
|
|
376
|
+
['pageSize', 'page_size'],
|
|
377
|
+
['pageToken', 'page_token'],
|
|
378
|
+
],
|
|
379
|
+
'sylphx.money.v1.ListUsageInvoicesResponse': [
|
|
380
|
+
['usageInvoices', 'usage_invoices', 'sylphx.money.v1.UsageInvoice'],
|
|
381
|
+
['nextPageToken', 'next_page_token'],
|
|
382
|
+
],
|
|
383
|
+
'sylphx.money.v1.ListUsageMeterPricesRequest': [
|
|
384
|
+
['pageSize', 'page_size'],
|
|
385
|
+
['pageToken', 'page_token'],
|
|
386
|
+
],
|
|
387
|
+
'sylphx.money.v1.ListUsageMeterPricesResponse': [
|
|
388
|
+
['usageMeterPrices', 'usage_meter_prices', 'sylphx.money.v1.UsageMeterPrice'],
|
|
389
|
+
['nextPageToken', 'next_page_token'],
|
|
390
|
+
],
|
|
391
|
+
'sylphx.money.v1.ListUsageMetersRequest': [
|
|
392
|
+
['pageSize', 'page_size'],
|
|
393
|
+
['pageToken', 'page_token'],
|
|
394
|
+
],
|
|
395
|
+
'sylphx.money.v1.ListUsageMetersResponse': [
|
|
396
|
+
['usageMeters', 'usage_meters', 'sylphx.money.v1.UsageMeter'],
|
|
397
|
+
['nextPageToken', 'next_page_token'],
|
|
398
|
+
],
|
|
399
|
+
'sylphx.money.v1.ListUsageTiersRequest': [
|
|
400
|
+
['pageSize', 'page_size'],
|
|
401
|
+
['pageToken', 'page_token'],
|
|
402
|
+
],
|
|
403
|
+
'sylphx.money.v1.ListUsageTiersResponse': [
|
|
404
|
+
['usageTiers', 'usage_tiers', 'sylphx.money.v1.UsageTier'],
|
|
405
|
+
['nextPageToken', 'next_page_token'],
|
|
406
|
+
],
|
|
206
407
|
'sylphx.money.v1.MerchantAccount': [
|
|
207
408
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
208
409
|
['accountId', 'account_id'],
|
|
@@ -212,6 +413,7 @@ runtime.registerSchemas({
|
|
|
212
413
|
['regionCode', 'region_code'],
|
|
213
414
|
['defaultCurrencyCode', 'default_currency_code'],
|
|
214
415
|
['refreshTime', 'refresh_time'],
|
|
416
|
+
['automaticTax', 'automatic_tax'],
|
|
215
417
|
],
|
|
216
418
|
'sylphx.money.v1.PortalSession': [
|
|
217
419
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
@@ -225,6 +427,7 @@ runtime.registerSchemas({
|
|
|
225
427
|
['taxBehavior', 'tax_behavior'],
|
|
226
428
|
['trialDays', 'trial_days'],
|
|
227
429
|
['defaultCurrency', 'default_currency'],
|
|
430
|
+
['introductoryUnitAmounts', 'introductory_unit_amounts', undefined, 'map'],
|
|
228
431
|
],
|
|
229
432
|
'sylphx.money.v1.Product': [
|
|
230
433
|
['displayName', 'display_name'],
|
|
@@ -235,8 +438,98 @@ runtime.registerSchemas({
|
|
|
235
438
|
['licence', 'licence', 'sylphx.money.v1.LicencePolicy'],
|
|
236
439
|
],
|
|
237
440
|
'sylphx.money.v1.RefreshMerchantAccountRequest': [],
|
|
441
|
+
'sylphx.money.v1.Refund': [
|
|
442
|
+
['checkoutSession', 'checkout_session'],
|
|
443
|
+
['paymentIntent', 'payment_intent'],
|
|
444
|
+
['amountMinor', 'amount_minor'],
|
|
445
|
+
['currencyCode', 'currency_code'],
|
|
446
|
+
],
|
|
447
|
+
'sylphx.money.v1.RefundCheckoutSessionRequest': [
|
|
448
|
+
['amountMinor', 'amount_minor'],
|
|
449
|
+
['metadata', 'metadata', undefined, 'map'],
|
|
450
|
+
],
|
|
451
|
+
'sylphx.money.v1.RefundCheckoutSessionResponse': [
|
|
452
|
+
['refund', 'refund', 'sylphx.money.v1.Refund'],
|
|
453
|
+
],
|
|
454
|
+
'sylphx.money.v1.ReleaseUsageInvoiceCollectionRequest': [],
|
|
455
|
+
'sylphx.money.v1.ReleaseUsageReservationRequest': [],
|
|
238
456
|
'sylphx.money.v1.ResumeCustomerSubscriptionRequest': [],
|
|
239
457
|
'sylphx.money.v1.RetireLicenceKeyRequest': [],
|
|
458
|
+
'sylphx.money.v1.RevenueBucket': [
|
|
459
|
+
['startDay', 'start_day'],
|
|
460
|
+
['unconvertedCount', 'unconverted_count'],
|
|
461
|
+
['lines', 'lines', 'sylphx.money.v1.RevenueLine'],
|
|
462
|
+
],
|
|
463
|
+
'sylphx.money.v1.RevenueFact': [
|
|
464
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
465
|
+
['externalKey', 'external_key'],
|
|
466
|
+
['storeKind', 'store_kind'],
|
|
467
|
+
['accountRef', 'account_ref'],
|
|
468
|
+
['productRef', 'product_ref'],
|
|
469
|
+
['regionCode', 'region_code'],
|
|
470
|
+
['currencyCode', 'currency_code'],
|
|
471
|
+
['settledOn', 'settled_on'],
|
|
472
|
+
],
|
|
473
|
+
'sylphx.money.v1.RevenueLine': [],
|
|
474
|
+
'sylphx.money.v1.RevenueSource': [
|
|
475
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
476
|
+
['spec', 'spec', 'sylphx.money.v1.RevenueSourceSpec'],
|
|
477
|
+
['status', 'status', 'sylphx.money.v1.RevenueSourceStatus'],
|
|
478
|
+
],
|
|
479
|
+
'sylphx.money.v1.RevenueSourceSpec': [
|
|
480
|
+
['displayName', 'display_name'],
|
|
481
|
+
['config', 'config', undefined, 'map'],
|
|
482
|
+
],
|
|
483
|
+
'sylphx.money.v1.RevenueSourceStatus': [
|
|
484
|
+
['observedGeneration', 'observed_generation'],
|
|
485
|
+
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
486
|
+
['lastSuccessTime', 'last_success_time'],
|
|
487
|
+
['newestDay', 'newest_day'],
|
|
488
|
+
['lastRunState', 'last_run_state'],
|
|
489
|
+
['lastRunError', 'last_run_error'],
|
|
490
|
+
],
|
|
491
|
+
'sylphx.money.v1.RevenueSummary': [
|
|
492
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
493
|
+
['startDay', 'start_day'],
|
|
494
|
+
['endDay', 'end_day'],
|
|
495
|
+
['currencyCode', 'currency_code'],
|
|
496
|
+
['groupBy', 'group_by'],
|
|
497
|
+
['buckets', 'buckets', 'sylphx.money.v1.RevenueBucket'],
|
|
498
|
+
['lines', 'lines', 'sylphx.money.v1.RevenueLine'],
|
|
499
|
+
['staleSources', 'stale_sources', 'sylphx.money.v1.StaleRevenueSource'],
|
|
500
|
+
['unconverted', 'unconverted', 'sylphx.money.v1.UnconvertedAmount'],
|
|
501
|
+
['unconvertedCount', 'unconverted_count'],
|
|
502
|
+
['bookedVolume', 'booked_volume', 'sylphx.money.v1.BookedVolumeLine'],
|
|
503
|
+
],
|
|
504
|
+
'sylphx.money.v1.RunRevenueSourceRequest': [
|
|
505
|
+
['startDay', 'start_day'],
|
|
506
|
+
['endDay', 'end_day'],
|
|
507
|
+
],
|
|
508
|
+
'sylphx.money.v1.RunRevenueSourceResponse': [
|
|
509
|
+
['revenueSource', 'revenue_source', 'sylphx.money.v1.RevenueSource'],
|
|
510
|
+
],
|
|
511
|
+
'sylphx.money.v1.SettleUsageReservationRequest': [
|
|
512
|
+
['quantityUsed', 'quantity_used'],
|
|
513
|
+
['occurredTime', 'occurred_time'],
|
|
514
|
+
],
|
|
515
|
+
'sylphx.money.v1.ShippingAddress': [
|
|
516
|
+
['postalCode', 'postal_code'],
|
|
517
|
+
['regionCode', 'region_code'],
|
|
518
|
+
],
|
|
519
|
+
'sylphx.money.v1.SnapshotEntitlementGrantsRequest': [
|
|
520
|
+
['pageSize', 'page_size'],
|
|
521
|
+
['pageToken', 'page_token'],
|
|
522
|
+
['snapshotRevision', 'snapshot_revision'],
|
|
523
|
+
],
|
|
524
|
+
'sylphx.money.v1.SnapshotEntitlementGrantsResponse': [
|
|
525
|
+
['entitlementGrants', 'entitlement_grants', 'sylphx.money.v1.EntitlementGrant'],
|
|
526
|
+
['nextPageToken', 'next_page_token'],
|
|
527
|
+
['snapshotRevision', 'snapshot_revision'],
|
|
528
|
+
],
|
|
529
|
+
'sylphx.money.v1.StaleRevenueSource': [
|
|
530
|
+
['displayName', 'display_name'],
|
|
531
|
+
['newestDay', 'newest_day'],
|
|
532
|
+
],
|
|
240
533
|
'sylphx.money.v1.StoreConnection': [
|
|
241
534
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
242
535
|
['spec', 'spec', 'sylphx.money.v1.StoreConnectionSpec'],
|
|
@@ -247,6 +540,7 @@ runtime.registerSchemas({
|
|
|
247
540
|
['googlePlay', 'google_play', 'sylphx.money.v1.GooglePlayConnection'],
|
|
248
541
|
['allowSandbox', 'allow_sandbox'],
|
|
249
542
|
['requireAccountToken', 'require_account_token'],
|
|
543
|
+
['clientVerify', 'client_verify'],
|
|
250
544
|
],
|
|
251
545
|
'sylphx.money.v1.StoreConnectionStatus': [
|
|
252
546
|
['observedGeneration', 'observed_generation'],
|
|
@@ -266,6 +560,8 @@ runtime.registerSchemas({
|
|
|
266
560
|
['revokeTime', 'revoke_time'],
|
|
267
561
|
['currencyCode', 'currency_code'],
|
|
268
562
|
['customerSubscription', 'customer_subscription'],
|
|
563
|
+
['regionCode', 'region_code'],
|
|
564
|
+
['originalPurchaseTime', 'original_purchase_time'],
|
|
269
565
|
['clawBack', 'claw_back'],
|
|
270
566
|
],
|
|
271
567
|
'sylphx.money.v1.Subject': [
|
|
@@ -273,27 +569,147 @@ runtime.registerSchemas({
|
|
|
273
569
|
['customerOrganization', 'customer_organization'],
|
|
274
570
|
],
|
|
275
571
|
'sylphx.money.v1.SyncCatalogRequest': [],
|
|
572
|
+
'sylphx.money.v1.TaxThresholdStatus': [
|
|
573
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
574
|
+
['regionCode', 'region_code'],
|
|
575
|
+
['subdivisionCode', 'subdivision_code'],
|
|
576
|
+
['taxName', 'tax_name'],
|
|
577
|
+
['currencyCode', 'currency_code'],
|
|
578
|
+
['thresholdAmount', 'threshold_amount'],
|
|
579
|
+
['thresholdTransactionCount', 'threshold_transaction_count'],
|
|
580
|
+
['windowKind', 'window_kind'],
|
|
581
|
+
['windowStartTime', 'window_start_time'],
|
|
582
|
+
['windowEndTime', 'window_end_time'],
|
|
583
|
+
['salesAmount', 'sales_amount'],
|
|
584
|
+
['salesTransactionCount', 'sales_transaction_count'],
|
|
585
|
+
['alertedPercent', 'alerted_percent'],
|
|
586
|
+
['unconvertedCurrencyCodes', 'unconverted_currency_codes'],
|
|
587
|
+
['sourceUrl', 'source_url'],
|
|
588
|
+
['effectiveTime', 'effective_time'],
|
|
589
|
+
],
|
|
590
|
+
'sylphx.money.v1.UnconvertedAmount': [
|
|
591
|
+
['currencyCode', 'currency_code'],
|
|
592
|
+
],
|
|
276
593
|
'sylphx.money.v1.UpdateCatalogRequest': [
|
|
277
594
|
['catalog', 'catalog', 'sylphx.money.v1.Catalog'],
|
|
278
595
|
['updateMask', 'update_mask'],
|
|
279
596
|
['allowMissing', 'allow_missing'],
|
|
280
597
|
['validateOnly', 'validate_only'],
|
|
281
598
|
],
|
|
599
|
+
'sylphx.money.v1.UpdateCheckoutPolicyRequest': [
|
|
600
|
+
['checkoutPolicy', 'checkout_policy', 'sylphx.money.v1.CheckoutPolicy'],
|
|
601
|
+
['updateMask', 'update_mask'],
|
|
602
|
+
['allowMissing', 'allow_missing'],
|
|
603
|
+
['validateOnly', 'validate_only'],
|
|
604
|
+
],
|
|
282
605
|
'sylphx.money.v1.UpdateCustomerSubscriptionQuantityRequest': [
|
|
283
606
|
['prorationBehavior', 'proration_behavior'],
|
|
284
607
|
],
|
|
608
|
+
'sylphx.money.v1.UpdateMerchantAccountRequest': [
|
|
609
|
+
['merchantAccount', 'merchant_account', 'sylphx.money.v1.MerchantAccount'],
|
|
610
|
+
['updateMask', 'update_mask'],
|
|
611
|
+
],
|
|
612
|
+
'sylphx.money.v1.UpdateRevenueSourceRequest': [
|
|
613
|
+
['revenueSource', 'revenue_source', 'sylphx.money.v1.RevenueSource'],
|
|
614
|
+
['updateMask', 'update_mask'],
|
|
615
|
+
['validateOnly', 'validate_only'],
|
|
616
|
+
],
|
|
285
617
|
'sylphx.money.v1.UpdateStoreConnectionRequest': [
|
|
286
618
|
['storeConnection', 'store_connection', 'sylphx.money.v1.StoreConnection'],
|
|
287
619
|
['updateMask', 'update_mask'],
|
|
288
620
|
['allowMissing', 'allow_missing'],
|
|
289
621
|
['validateOnly', 'validate_only'],
|
|
290
622
|
],
|
|
623
|
+
'sylphx.money.v1.UpdateUsageMeterRequest': [
|
|
624
|
+
['usageMeter', 'usage_meter', 'sylphx.money.v1.UsageMeter'],
|
|
625
|
+
['updateMask', 'update_mask'],
|
|
626
|
+
],
|
|
627
|
+
'sylphx.money.v1.UpdateUsageSettingsRequest': [
|
|
628
|
+
['usageSettings', 'usage_settings', 'sylphx.money.v1.UsageSettings'],
|
|
629
|
+
['updateMask', 'update_mask'],
|
|
630
|
+
],
|
|
631
|
+
'sylphx.money.v1.UpdateUsageTierRequest': [
|
|
632
|
+
['usageTier', 'usage_tier', 'sylphx.money.v1.UsageTier'],
|
|
633
|
+
['updateMask', 'update_mask'],
|
|
634
|
+
],
|
|
635
|
+
'sylphx.money.v1.UsageEvent': [
|
|
636
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
637
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
638
|
+
['subjectProof', 'subject_proof'],
|
|
639
|
+
['actorProof', 'actor_proof'],
|
|
640
|
+
['occurredTime', 'occurred_time'],
|
|
641
|
+
['amountNano', 'amount_nano'],
|
|
642
|
+
['usageReservation', 'usage_reservation'],
|
|
643
|
+
],
|
|
644
|
+
'sylphx.money.v1.UsageInvoice': [
|
|
645
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
646
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
647
|
+
['taxPendingReason', 'tax_pending_reason'],
|
|
648
|
+
['grossMinor', 'gross_minor'],
|
|
649
|
+
['subtotalMinor', 'subtotal_minor'],
|
|
650
|
+
['taxMinor', 'tax_minor'],
|
|
651
|
+
['postTaxCreditMinor', 'post_tax_credit_minor'],
|
|
652
|
+
['totalMinor', 'total_minor'],
|
|
653
|
+
['amountPaidMinor', 'amount_paid_minor'],
|
|
654
|
+
['collectionMode', 'collection_mode'],
|
|
655
|
+
['issueTime', 'issue_time'],
|
|
656
|
+
['dueTime', 'due_time'],
|
|
657
|
+
],
|
|
658
|
+
'sylphx.money.v1.UsageMeter': [
|
|
659
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
660
|
+
['displayName', 'display_name'],
|
|
661
|
+
['reservationOptional', 'reservation_optional'],
|
|
662
|
+
['currentUnitPriceNano', 'current_unit_price_nano'],
|
|
663
|
+
],
|
|
664
|
+
'sylphx.money.v1.UsageMeterPrice': [
|
|
665
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
666
|
+
['currencyCode', 'currency_code'],
|
|
667
|
+
['unitPriceNano', 'unit_price_nano'],
|
|
668
|
+
['effectiveTime', 'effective_time'],
|
|
669
|
+
['taxCode', 'tax_code'],
|
|
670
|
+
],
|
|
671
|
+
'sylphx.money.v1.UsageReservation': [
|
|
672
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
673
|
+
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
674
|
+
['subjectProof', 'subject_proof'],
|
|
675
|
+
['actorProof', 'actor_proof'],
|
|
676
|
+
['maxQuantity', 'max_quantity'],
|
|
677
|
+
['grantedQuantity', 'granted_quantity'],
|
|
678
|
+
['expireTime', 'expire_time'],
|
|
679
|
+
['darkRefusal', 'dark_refusal'],
|
|
680
|
+
],
|
|
681
|
+
'sylphx.money.v1.UsageSettings': [
|
|
682
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
683
|
+
['currencyCode', 'currency_code'],
|
|
684
|
+
['enforcementEnabled', 'enforcement_enabled'],
|
|
685
|
+
['freeAllowanceNano', 'free_allowance_nano'],
|
|
686
|
+
['pastDueGraceDays', 'past_due_grace_days'],
|
|
687
|
+
['suspendGraceDays', 'suspend_grace_days'],
|
|
688
|
+
['extraIssuer', 'extra_issuer'],
|
|
689
|
+
['extraIssuerJwksUrl', 'extra_issuer_jwks_url'],
|
|
690
|
+
['extraIssuerAudience', 'extra_issuer_audience'],
|
|
691
|
+
['extraIssuerOrgClaim', 'extra_issuer_org_claim'],
|
|
692
|
+
],
|
|
693
|
+
'sylphx.money.v1.UsageStanding': [
|
|
694
|
+
['paymentMethodOnFile', 'payment_method_on_file'],
|
|
695
|
+
['headroomMinor', 'headroom_minor'],
|
|
696
|
+
['thresholdMinor', 'threshold_minor'],
|
|
697
|
+
],
|
|
698
|
+
'sylphx.money.v1.UsageTier': [
|
|
699
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
700
|
+
['dailyLimitMinor', 'daily_limit_minor'],
|
|
701
|
+
['monthlyLimitMinor', 'monthly_limit_minor'],
|
|
702
|
+
['thresholdMinor', 'threshold_minor'],
|
|
703
|
+
['requiresPaidInvoices', 'requires_paid_invoices'],
|
|
704
|
+
['requiresPaidMinor', 'requires_paid_minor'],
|
|
705
|
+
],
|
|
291
706
|
'sylphx.money.v1.VerifyStorePurchaseRequest': [
|
|
292
707
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
293
708
|
['signedTransaction', 'signed_transaction'],
|
|
294
709
|
['purchaseToken', 'purchase_token'],
|
|
295
710
|
['productId', 'product_id'],
|
|
296
711
|
['packageName', 'package_name'],
|
|
712
|
+
['validateOnly', 'validate_only'],
|
|
297
713
|
['transactionId', 'transaction_id'],
|
|
298
714
|
['bundleId', 'bundle_id'],
|
|
299
715
|
],
|
|
@@ -302,6 +718,8 @@ runtime.registerSchemas({
|
|
|
302
718
|
['grantToken', 'grant_token'],
|
|
303
719
|
['alreadyVerified', 'already_verified'],
|
|
304
720
|
['customerSubscription', 'customer_subscription', 'sylphx.money.v1.CustomerSubscription'],
|
|
721
|
+
['grantClaims', 'grant_claims', undefined, 'json'],
|
|
722
|
+
['storeCompletion', 'store_completion'],
|
|
305
723
|
],
|
|
306
724
|
});
|
|
307
725
|
/**
|
|
@@ -315,6 +733,8 @@ runtime.registerSchemas({
|
|
|
315
733
|
export class MoneyApi {
|
|
316
734
|
/** The `price_catalogs` collection. */
|
|
317
735
|
priceCatalogs;
|
|
736
|
+
/** The `checkout_policies` collection. */
|
|
737
|
+
checkoutPolicies;
|
|
318
738
|
/** The `store_connections` collection. */
|
|
319
739
|
storeConnections;
|
|
320
740
|
/** The `store_purchases` collection. */
|
|
@@ -327,23 +747,63 @@ export class MoneyApi {
|
|
|
327
747
|
merchantAccounts;
|
|
328
748
|
/** The `checkout_sessions` collection. */
|
|
329
749
|
checkoutSessions;
|
|
750
|
+
/** The `tax_threshold_statuses` collection. */
|
|
751
|
+
taxThresholdStatuses;
|
|
330
752
|
/** The `portal_sessions` collection. */
|
|
331
753
|
portalSessions;
|
|
332
754
|
/** The `licence_keys` collection. */
|
|
333
755
|
licenceKeys;
|
|
334
756
|
/** The `licence_tokens` collection. */
|
|
335
757
|
licenceTokens;
|
|
758
|
+
/** The `usage_settings` collection. */
|
|
759
|
+
usageSettings;
|
|
760
|
+
/** The `usage_tiers` collection. */
|
|
761
|
+
usageTiers;
|
|
762
|
+
/** The `usage_reservations` collection. */
|
|
763
|
+
usageReservations;
|
|
764
|
+
/** The `usage_events` collection. */
|
|
765
|
+
usageEvents;
|
|
766
|
+
/** The `credit_grants` collection. */
|
|
767
|
+
creditGrants;
|
|
768
|
+
/** The `usage_invoices` collection. */
|
|
769
|
+
usageInvoices;
|
|
770
|
+
/** The `usage_meters` collection. */
|
|
771
|
+
usageMeters;
|
|
772
|
+
/** The `usage_meter_prices` collection. */
|
|
773
|
+
usageMeterPrices;
|
|
774
|
+
/** The `revenue_sources` collection. */
|
|
775
|
+
revenueSources;
|
|
776
|
+
/** The `revenue` collection. */
|
|
777
|
+
revenue;
|
|
778
|
+
/** The `revenue_facts` collection. */
|
|
779
|
+
revenueFacts;
|
|
780
|
+
/** The `exchange_rates` collection. */
|
|
781
|
+
exchangeRates;
|
|
336
782
|
constructor(client) {
|
|
337
783
|
this.priceCatalogs = new PriceCatalogsCollection(client);
|
|
784
|
+
this.checkoutPolicies = new CheckoutPoliciesCollection(client);
|
|
338
785
|
this.storeConnections = new StoreConnectionsCollection(client);
|
|
339
786
|
this.storePurchases = new StorePurchasesCollection(client);
|
|
340
787
|
this.customerSubscriptions = new CustomerSubscriptionsCollection(client);
|
|
341
788
|
this.entitlementGrants = new EntitlementGrantsCollection(client);
|
|
342
789
|
this.merchantAccounts = new MerchantAccountsCollection(client);
|
|
343
790
|
this.checkoutSessions = new CheckoutSessionsCollection(client);
|
|
791
|
+
this.taxThresholdStatuses = new TaxThresholdStatusesCollection(client);
|
|
344
792
|
this.portalSessions = new PortalSessionsCollection(client);
|
|
345
793
|
this.licenceKeys = new LicenceKeysCollection(client);
|
|
346
794
|
this.licenceTokens = new LicenceTokensCollection(client);
|
|
795
|
+
this.usageSettings = new UsageSettingsCollection(client);
|
|
796
|
+
this.usageTiers = new UsageTiersCollection(client);
|
|
797
|
+
this.usageReservations = new UsageReservationsCollection(client);
|
|
798
|
+
this.usageEvents = new UsageEventsCollection(client);
|
|
799
|
+
this.creditGrants = new CreditGrantsCollection(client);
|
|
800
|
+
this.usageInvoices = new UsageInvoicesCollection(client);
|
|
801
|
+
this.usageMeters = new UsageMetersCollection(client);
|
|
802
|
+
this.usageMeterPrices = new UsageMeterPricesCollection(client);
|
|
803
|
+
this.revenueSources = new RevenueSourcesCollection(client);
|
|
804
|
+
this.revenue = new RevenueCollection(client);
|
|
805
|
+
this.revenueFacts = new RevenueFactsCollection(client);
|
|
806
|
+
this.exchangeRates = new ExchangeRatesCollection(client);
|
|
347
807
|
}
|
|
348
808
|
}
|
|
349
809
|
/** `price_catalogs` of Sylphx Money: Resource type `money.sylphx.com/PriceCatalog`. */
|
|
@@ -404,6 +864,47 @@ export class PriceCatalogsCollection {
|
|
|
404
864
|
});
|
|
405
865
|
}
|
|
406
866
|
}
|
|
867
|
+
/** `checkout_policies` of Sylphx Money: Resource type `money.sylphx.com/CheckoutPolicy`. */
|
|
868
|
+
export class CheckoutPoliciesCollection {
|
|
869
|
+
client;
|
|
870
|
+
constructor(client) {
|
|
871
|
+
this.client = client;
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Gets the environment's checkout policy: which buyer countries consumer
|
|
875
|
+
* checkout refuses. An environment that never wrote one refuses none.
|
|
876
|
+
*
|
|
877
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:read` · effect `read`
|
|
878
|
+
*
|
|
879
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
880
|
+
*/
|
|
881
|
+
async get(request) {
|
|
882
|
+
return this.client.call({
|
|
883
|
+
method: 'GET',
|
|
884
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/checkout_policies/*', 'name')}`,
|
|
885
|
+
responseType: 'sylphx.money.v1.CheckoutPolicy',
|
|
886
|
+
mutation: false,
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* Updates the environment's checkout policy, whole.
|
|
891
|
+
*
|
|
892
|
+
* `PATCH /v1/{checkout_policy.name=orgs/*\/projects/*\/envs/*\/checkout_policies/*}` · permission `billing:write` · effect `write`
|
|
893
|
+
*
|
|
894
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
895
|
+
*/
|
|
896
|
+
async update(request) {
|
|
897
|
+
return this.client.call({
|
|
898
|
+
method: 'PATCH',
|
|
899
|
+
path: `/v1/${runtime.pathParam(request.checkoutPolicy?.name, 'orgs/*/projects/*/envs/*/checkout_policies/*', 'checkout_policy.name')}`,
|
|
900
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
901
|
+
body: request.checkoutPolicy ?? {},
|
|
902
|
+
bodyType: 'sylphx.money.v1.CheckoutPolicy',
|
|
903
|
+
responseType: 'sylphx.money.v1.CheckoutPolicy',
|
|
904
|
+
mutation: true,
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
}
|
|
407
908
|
/** `store_connections` of Sylphx Money: Resource type `money.sylphx.com/StoreConnection`. */
|
|
408
909
|
export class StoreConnectionsCollection {
|
|
409
910
|
client;
|
|
@@ -530,6 +1031,28 @@ export class StorePurchasesCollection {
|
|
|
530
1031
|
mutation: true,
|
|
531
1032
|
});
|
|
532
1033
|
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Verifies a store purchase for an app with no server: called with the
|
|
1036
|
+
* environment's publishable key (`billing:client`), the subject is an
|
|
1037
|
+
* install id (`inst_` and a UUID), and Money completes the purchase with the
|
|
1038
|
+
* store (acknowledges or consumes it) so the app never calls the store's
|
|
1039
|
+
* server API. Works only on store connections that set `client_verify`.
|
|
1040
|
+
* Re-calling returns the same record and grant.
|
|
1041
|
+
*
|
|
1042
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/store_purchases:clientVerify` · permission `billing:client` · effect `write`
|
|
1043
|
+
*
|
|
1044
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_IN_USE`, `RATE_LIMITED`, `UNAVAILABLE`.
|
|
1045
|
+
*/
|
|
1046
|
+
async clientVerify(request) {
|
|
1047
|
+
return this.client.call({
|
|
1048
|
+
method: 'POST',
|
|
1049
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/store_purchases:clientVerify`,
|
|
1050
|
+
body: runtime.omit(request, ['parent']),
|
|
1051
|
+
bodyType: 'sylphx.money.v1.ClientVerifyStorePurchaseRequest',
|
|
1052
|
+
responseType: 'sylphx.money.v1.VerifyStorePurchaseResponse',
|
|
1053
|
+
mutation: true,
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
533
1056
|
/**
|
|
534
1057
|
* Gets a store purchase.
|
|
535
1058
|
*
|
|
@@ -720,11 +1243,12 @@ export class EntitlementGrantsCollection {
|
|
|
720
1243
|
});
|
|
721
1244
|
}
|
|
722
1245
|
/**
|
|
723
|
-
* Lists entitlement grants.
|
|
1246
|
+
* Lists entitlement grants. Continuation tokens reject collection changes
|
|
1247
|
+
* with ETAG_MISMATCH; restart without a page token after a conflict.
|
|
724
1248
|
*
|
|
725
1249
|
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants` · permission `billing:read` · effect `read`
|
|
726
1250
|
*
|
|
727
|
-
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1251
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `ETAG_MISMATCH`.
|
|
728
1252
|
*/
|
|
729
1253
|
async list(request) {
|
|
730
1254
|
return this.client.call({
|
|
@@ -746,6 +1270,23 @@ export class EntitlementGrantsCollection {
|
|
|
746
1270
|
next = { ...request, pageToken: page.nextPageToken };
|
|
747
1271
|
}
|
|
748
1272
|
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Reads a coherent entitlement snapshot with an environment-wide source
|
|
1275
|
+
* revision. Discard every page and restart after ETAG_MISMATCH.
|
|
1276
|
+
*
|
|
1277
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants:snapshot` · permission `billing:read` · effect `read`
|
|
1278
|
+
*
|
|
1279
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `ETAG_MISMATCH`.
|
|
1280
|
+
*/
|
|
1281
|
+
async snapshot(request) {
|
|
1282
|
+
return this.client.call({
|
|
1283
|
+
method: 'GET',
|
|
1284
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/entitlement_grants:snapshot`,
|
|
1285
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, snapshot_revision: request.snapshotRevision },
|
|
1286
|
+
responseType: 'sylphx.money.v1.SnapshotEntitlementGrantsResponse',
|
|
1287
|
+
mutation: false,
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
749
1290
|
/**
|
|
750
1291
|
* Answers whether a subject holds a feature now, and how much of it.
|
|
751
1292
|
*
|
|
@@ -763,6 +1304,31 @@ export class EntitlementGrantsCollection {
|
|
|
763
1304
|
mutation: true,
|
|
764
1305
|
});
|
|
765
1306
|
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Creates a manual entitlement grant (support, comp, grace). Append-only.
|
|
1309
|
+
* The subject decides what it needs: an end user the env's Sylphx Auth
|
|
1310
|
+
* stamped as a born-synthetic test account gets a test grant (`test/<id>`,
|
|
1311
|
+
* at most 90 days, approval_ref set by the server) with
|
|
1312
|
+
* `billing:test_grants:write`; any other subject needs the approval-class
|
|
1313
|
+
* `billing:credits.approve` and is refused PERMISSION_DENIED
|
|
1314
|
+
* (`subject_not_synthetic`) otherwise. The approver recorded is the key's
|
|
1315
|
+
* principal.
|
|
1316
|
+
*
|
|
1317
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/entitlement_grants` · permission `billing:test_grants:write` · effect `write`
|
|
1318
|
+
*
|
|
1319
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `RESOURCE_ALREADY_EXISTS`, `UNAVAILABLE`.
|
|
1320
|
+
*/
|
|
1321
|
+
async create(request) {
|
|
1322
|
+
return this.client.call({
|
|
1323
|
+
method: 'POST',
|
|
1324
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/entitlement_grants`,
|
|
1325
|
+
query: { entitlement_grant_id: request.entitlementGrantId },
|
|
1326
|
+
body: request.entitlementGrant ?? {},
|
|
1327
|
+
bodyType: 'sylphx.money.v1.EntitlementGrant',
|
|
1328
|
+
responseType: 'sylphx.money.v1.EntitlementGrant',
|
|
1329
|
+
mutation: true,
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
766
1332
|
}
|
|
767
1333
|
/** `merchant_accounts` of Sylphx Money: Resource type `money.sylphx.com/MerchantAccount`. */
|
|
768
1334
|
export class MerchantAccountsCollection {
|
|
@@ -866,6 +1432,24 @@ export class MerchantAccountsCollection {
|
|
|
866
1432
|
mutation: true,
|
|
867
1433
|
});
|
|
868
1434
|
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Updates the merchant account's own settings: the fields named in `update_mask`.
|
|
1437
|
+
*
|
|
1438
|
+
* `PATCH /v1/{merchant_account.name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:write` · effect `write`
|
|
1439
|
+
*
|
|
1440
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1441
|
+
*/
|
|
1442
|
+
async update(request) {
|
|
1443
|
+
return this.client.call({
|
|
1444
|
+
method: 'PATCH',
|
|
1445
|
+
path: `/v1/${runtime.pathParam(request.merchantAccount?.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'merchant_account.name')}`,
|
|
1446
|
+
query: { update_mask: request.updateMask },
|
|
1447
|
+
body: request.merchantAccount ?? {},
|
|
1448
|
+
bodyType: 'sylphx.money.v1.MerchantAccount',
|
|
1449
|
+
responseType: 'sylphx.money.v1.MerchantAccount',
|
|
1450
|
+
mutation: true,
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
869
1453
|
}
|
|
870
1454
|
/** `checkout_sessions` of Sylphx Money: Resource type `money.sylphx.com/CheckoutSession`. */
|
|
871
1455
|
export class CheckoutSessionsCollection {
|
|
@@ -906,28 +1490,98 @@ export class CheckoutSessionsCollection {
|
|
|
906
1490
|
mutation: false,
|
|
907
1491
|
});
|
|
908
1492
|
}
|
|
909
|
-
}
|
|
910
|
-
/** `portal_sessions` of Sylphx Money: Resource type `money.sylphx.com/PortalSession`. */
|
|
911
|
-
export class PortalSessionsCollection {
|
|
912
|
-
client;
|
|
913
|
-
constructor(client) {
|
|
914
|
-
this.client = client;
|
|
915
|
-
}
|
|
916
1493
|
/**
|
|
917
|
-
*
|
|
1494
|
+
* Expires an open hosted checkout so it can no longer be paid.
|
|
918
1495
|
*
|
|
919
|
-
* `POST /v1/{
|
|
1496
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_sessions/*}:expire` · permission `billing:write` · effect `write`
|
|
920
1497
|
*
|
|
921
|
-
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `
|
|
1498
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `UNAVAILABLE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
922
1499
|
*/
|
|
923
|
-
async
|
|
1500
|
+
async expire(request) {
|
|
924
1501
|
return this.client.call({
|
|
925
1502
|
method: 'POST',
|
|
926
|
-
path: `/v1/${runtime.pathParam(request.
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1503
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/checkout_sessions/*', 'name')}:expire`,
|
|
1504
|
+
body: runtime.omit(request, ['name']),
|
|
1505
|
+
bodyType: 'sylphx.money.v1.ExpireCheckoutSessionRequest',
|
|
1506
|
+
responseType: 'sylphx.money.v1.CheckoutSession',
|
|
1507
|
+
mutation: true,
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Refund all or part of a paid one-time checkout.
|
|
1512
|
+
*
|
|
1513
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/checkout_sessions/*}:refund` · permission `billing:write` · effect `write`
|
|
1514
|
+
*
|
|
1515
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `UNAVAILABLE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1516
|
+
*/
|
|
1517
|
+
async refund(request) {
|
|
1518
|
+
return this.client.call({
|
|
1519
|
+
method: 'POST',
|
|
1520
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/checkout_sessions/*', 'name')}:refund`,
|
|
1521
|
+
body: runtime.omit(request, ['name']),
|
|
1522
|
+
bodyType: 'sylphx.money.v1.RefundCheckoutSessionRequest',
|
|
1523
|
+
responseType: 'sylphx.money.v1.RefundCheckoutSessionResponse',
|
|
1524
|
+
mutation: true,
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
/** `tax_threshold_statuses` of Sylphx Money: Resource type `money.sylphx.com/TaxThresholdStatus`. */
|
|
1529
|
+
export class TaxThresholdStatusesCollection {
|
|
1530
|
+
client;
|
|
1531
|
+
constructor(client) {
|
|
1532
|
+
this.client = client;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Lists where the environment's consumer sales stand against each
|
|
1536
|
+
* jurisdiction's digital-services tax registration threshold, per its own
|
|
1537
|
+
* window. EU and UK have no threshold and are not tracked.
|
|
1538
|
+
*
|
|
1539
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/tax_threshold_statuses` · permission `billing:read` · effect `read`
|
|
1540
|
+
*
|
|
1541
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1542
|
+
*/
|
|
1543
|
+
async list(request) {
|
|
1544
|
+
return this.client.call({
|
|
1545
|
+
method: 'GET',
|
|
1546
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/tax_threshold_statuses`,
|
|
1547
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
1548
|
+
responseType: 'sylphx.money.v1.ListTaxThresholdStatusesResponse',
|
|
1549
|
+
mutation: false,
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
/** Every item of every page of `list`. */
|
|
1553
|
+
async *listAll(request) {
|
|
1554
|
+
let next = request;
|
|
1555
|
+
for (;;) {
|
|
1556
|
+
const page = await this.list(next);
|
|
1557
|
+
yield* page.taxThresholdStatuses ?? [];
|
|
1558
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1559
|
+
return;
|
|
1560
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
/** `portal_sessions` of Sylphx Money: Resource type `money.sylphx.com/PortalSession`. */
|
|
1565
|
+
export class PortalSessionsCollection {
|
|
1566
|
+
client;
|
|
1567
|
+
constructor(client) {
|
|
1568
|
+
this.client = client;
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Creates a customer portal session for a subject.
|
|
1572
|
+
*
|
|
1573
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/portal_sessions` · permission `billing:write` · effect `write`
|
|
1574
|
+
*
|
|
1575
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `UNAVAILABLE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1576
|
+
*/
|
|
1577
|
+
async create(request) {
|
|
1578
|
+
return this.client.call({
|
|
1579
|
+
method: 'POST',
|
|
1580
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/portal_sessions`,
|
|
1581
|
+
query: { portal_session_id: request.portalSessionId },
|
|
1582
|
+
body: request.portalSession ?? {},
|
|
1583
|
+
bodyType: 'sylphx.money.v1.PortalSession',
|
|
1584
|
+
responseType: 'sylphx.money.v1.PortalSession',
|
|
931
1585
|
mutation: true,
|
|
932
1586
|
});
|
|
933
1587
|
}
|
|
@@ -1087,4 +1741,732 @@ export class LicenceTokensCollection {
|
|
|
1087
1741
|
}
|
|
1088
1742
|
}
|
|
1089
1743
|
}
|
|
1744
|
+
/** `usage_settings` of Sylphx Money: Resource type `money.sylphx.com/UsageSettings`. */
|
|
1745
|
+
export class UsageSettingsCollection {
|
|
1746
|
+
client;
|
|
1747
|
+
constructor(client) {
|
|
1748
|
+
this.client = client;
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Gets the environment's usage settings.
|
|
1752
|
+
*
|
|
1753
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:read` · effect `read`
|
|
1754
|
+
*
|
|
1755
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1756
|
+
*/
|
|
1757
|
+
async get(request) {
|
|
1758
|
+
return this.client.call({
|
|
1759
|
+
method: 'GET',
|
|
1760
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_settings/*', 'name')}`,
|
|
1761
|
+
responseType: 'sylphx.money.v1.UsageSettings',
|
|
1762
|
+
mutation: false,
|
|
1763
|
+
});
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* Updates the usage settings, the enforcement switch included. A change is recorded with who made it.
|
|
1767
|
+
*
|
|
1768
|
+
* `PATCH /v1/{usage_settings.name=orgs/*\/projects/*\/envs/*\/usage_settings/*}` · permission `billing:write` · effect `write`
|
|
1769
|
+
*
|
|
1770
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1771
|
+
*/
|
|
1772
|
+
async update(request) {
|
|
1773
|
+
return this.client.call({
|
|
1774
|
+
method: 'PATCH',
|
|
1775
|
+
path: `/v1/${runtime.pathParam(request.usageSettings?.name, 'orgs/*/projects/*/envs/*/usage_settings/*', 'usage_settings.name')}`,
|
|
1776
|
+
query: { update_mask: request.updateMask },
|
|
1777
|
+
body: request.usageSettings ?? {},
|
|
1778
|
+
bodyType: 'sylphx.money.v1.UsageSettings',
|
|
1779
|
+
responseType: 'sylphx.money.v1.UsageSettings',
|
|
1780
|
+
mutation: true,
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
/** `usage_tiers` of Sylphx Money: Resource type `money.sylphx.com/UsageTier`. */
|
|
1785
|
+
export class UsageTiersCollection {
|
|
1786
|
+
client;
|
|
1787
|
+
constructor(client) {
|
|
1788
|
+
this.client = client;
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Lists usage tiers.
|
|
1792
|
+
*
|
|
1793
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_tiers` · permission `billing:read` · effect `read`
|
|
1794
|
+
*
|
|
1795
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1796
|
+
*/
|
|
1797
|
+
async list(request) {
|
|
1798
|
+
return this.client.call({
|
|
1799
|
+
method: 'GET',
|
|
1800
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_tiers`,
|
|
1801
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
1802
|
+
responseType: 'sylphx.money.v1.ListUsageTiersResponse',
|
|
1803
|
+
mutation: false,
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
/** Every item of every page of `list`. */
|
|
1807
|
+
async *listAll(request) {
|
|
1808
|
+
let next = request;
|
|
1809
|
+
for (;;) {
|
|
1810
|
+
const page = await this.list(next);
|
|
1811
|
+
yield* page.usageTiers ?? [];
|
|
1812
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1813
|
+
return;
|
|
1814
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Creates or updates a usage tier.
|
|
1819
|
+
*
|
|
1820
|
+
* `PATCH /v1/{usage_tier.name=orgs/*\/projects/*\/envs/*\/usage_tiers/*}` · permission `billing:write` · effect `write`
|
|
1821
|
+
*
|
|
1822
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1823
|
+
*/
|
|
1824
|
+
async update(request) {
|
|
1825
|
+
return this.client.call({
|
|
1826
|
+
method: 'PATCH',
|
|
1827
|
+
path: `/v1/${runtime.pathParam(request.usageTier?.name, 'orgs/*/projects/*/envs/*/usage_tiers/*', 'usage_tier.name')}`,
|
|
1828
|
+
query: { update_mask: request.updateMask },
|
|
1829
|
+
body: request.usageTier ?? {},
|
|
1830
|
+
bodyType: 'sylphx.money.v1.UsageTier',
|
|
1831
|
+
responseType: 'sylphx.money.v1.UsageTier',
|
|
1832
|
+
mutation: true,
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
/** `usage_reservations` of Sylphx Money: Resource type `money.sylphx.com/UsageReservation`. */
|
|
1837
|
+
export class UsageReservationsCollection {
|
|
1838
|
+
client;
|
|
1839
|
+
constructor(client) {
|
|
1840
|
+
this.client = client;
|
|
1841
|
+
}
|
|
1842
|
+
/**
|
|
1843
|
+
* 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.
|
|
1844
|
+
*
|
|
1845
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_reservations` · permission `billing:metering:write` · effect `write`
|
|
1846
|
+
*
|
|
1847
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `PLAN_LIMIT_REACHED`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNAVAILABLE`.
|
|
1848
|
+
*/
|
|
1849
|
+
async create(request) {
|
|
1850
|
+
return this.client.call({
|
|
1851
|
+
method: 'POST',
|
|
1852
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_reservations`,
|
|
1853
|
+
body: request.usageReservation ?? {},
|
|
1854
|
+
bodyType: 'sylphx.money.v1.UsageReservation',
|
|
1855
|
+
responseType: 'sylphx.money.v1.UsageReservation',
|
|
1856
|
+
mutation: true,
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Gets a usage reservation.
|
|
1861
|
+
*
|
|
1862
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}` · permission `billing:read` · effect `read`
|
|
1863
|
+
*
|
|
1864
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1865
|
+
*/
|
|
1866
|
+
async get(request) {
|
|
1867
|
+
return this.client.call({
|
|
1868
|
+
method: 'GET',
|
|
1869
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_reservations/*', 'name')}`,
|
|
1870
|
+
responseType: 'sylphx.money.v1.UsageReservation',
|
|
1871
|
+
mutation: false,
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Settles a reservation with what was used; the unused part returns to headroom. A settle after expiry still records the usage.
|
|
1876
|
+
*
|
|
1877
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:settle` · permission `billing:metering:write` · effect `write`
|
|
1878
|
+
*
|
|
1879
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1880
|
+
*/
|
|
1881
|
+
async settle(request) {
|
|
1882
|
+
return this.client.call({
|
|
1883
|
+
method: 'POST',
|
|
1884
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_reservations/*', 'name')}:settle`,
|
|
1885
|
+
body: runtime.omit(request, ['name']),
|
|
1886
|
+
bodyType: 'sylphx.money.v1.SettleUsageReservationRequest',
|
|
1887
|
+
responseType: 'sylphx.money.v1.UsageEvent',
|
|
1888
|
+
mutation: true,
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* Releases a reservation that used nothing.
|
|
1893
|
+
*
|
|
1894
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_reservations/*}:release` · permission `billing:metering:write` · effect `write`
|
|
1895
|
+
*
|
|
1896
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1897
|
+
*/
|
|
1898
|
+
async release(request) {
|
|
1899
|
+
return this.client.call({
|
|
1900
|
+
method: 'POST',
|
|
1901
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_reservations/*', 'name')}:release`,
|
|
1902
|
+
body: runtime.omit(request, ['name']),
|
|
1903
|
+
bodyType: 'sylphx.money.v1.ReleaseUsageReservationRequest',
|
|
1904
|
+
responseType: 'sylphx.money.v1.UsageReservation',
|
|
1905
|
+
mutation: true,
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
/** `usage_events` of Sylphx Money: Resource type `money.sylphx.com/UsageEvent`. */
|
|
1910
|
+
export class UsageEventsCollection {
|
|
1911
|
+
client;
|
|
1912
|
+
constructor(client) {
|
|
1913
|
+
this.client = client;
|
|
1914
|
+
}
|
|
1915
|
+
/**
|
|
1916
|
+
* Records usage directly, only for a meter the merchant marked reservation-optional.
|
|
1917
|
+
*
|
|
1918
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:metering:write` · effect `write`
|
|
1919
|
+
*
|
|
1920
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1921
|
+
*/
|
|
1922
|
+
async create(request) {
|
|
1923
|
+
return this.client.call({
|
|
1924
|
+
method: 'POST',
|
|
1925
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events`,
|
|
1926
|
+
body: request.usageEvent ?? {},
|
|
1927
|
+
bodyType: 'sylphx.money.v1.UsageEvent',
|
|
1928
|
+
responseType: 'sylphx.money.v1.UsageEvent',
|
|
1929
|
+
mutation: true,
|
|
1930
|
+
});
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* Records a batch of already-incurred usage from the merchant's own servers
|
|
1934
|
+
* (Stripe's meter-event model): the caller is a key of the merchant's own org
|
|
1935
|
+
* holding the exact grant `billing:metering:ingest`, which no wildcard covers,
|
|
1936
|
+
* and each event names its subject with no subject proof. Each event is keyed
|
|
1937
|
+
* by its project, meter, meter version and event id: a replay is a no-op
|
|
1938
|
+
* (`duplicate`), and the same key with different content is a `conflict` and
|
|
1939
|
+
* never counted. One result per event, in request order.
|
|
1940
|
+
*
|
|
1941
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:batchIngest` · permission `billing:metering:ingest` · effect `write`
|
|
1942
|
+
*
|
|
1943
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`.
|
|
1944
|
+
*/
|
|
1945
|
+
async batchIngest(request) {
|
|
1946
|
+
return this.client.call({
|
|
1947
|
+
method: 'POST',
|
|
1948
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events:batchIngest`,
|
|
1949
|
+
body: runtime.omit(request, ['parent']),
|
|
1950
|
+
bodyType: 'sylphx.money.v1.BatchIngestUsageEventsRequest',
|
|
1951
|
+
responseType: 'sylphx.money.v1.BatchIngestUsageEventsResponse',
|
|
1952
|
+
mutation: true,
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
/**
|
|
1956
|
+
* Lists usage events, newest first.
|
|
1957
|
+
*
|
|
1958
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events` · permission `billing:read` · effect `read`
|
|
1959
|
+
*
|
|
1960
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1961
|
+
*/
|
|
1962
|
+
async list(request) {
|
|
1963
|
+
return this.client.call({
|
|
1964
|
+
method: 'GET',
|
|
1965
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events`,
|
|
1966
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
1967
|
+
responseType: 'sylphx.money.v1.ListUsageEventsResponse',
|
|
1968
|
+
mutation: false,
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1971
|
+
/** Every item of every page of `list`. */
|
|
1972
|
+
async *listAll(request) {
|
|
1973
|
+
let next = request;
|
|
1974
|
+
for (;;) {
|
|
1975
|
+
const page = await this.list(next);
|
|
1976
|
+
yield* page.usageEvents ?? [];
|
|
1977
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
1978
|
+
return;
|
|
1979
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
/**
|
|
1983
|
+
* Reads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.
|
|
1984
|
+
*
|
|
1985
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_events:checkStanding` · permission `billing:read` · effect `read`
|
|
1986
|
+
*
|
|
1987
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1988
|
+
*/
|
|
1989
|
+
async checkStanding(request) {
|
|
1990
|
+
return this.client.call({
|
|
1991
|
+
method: 'POST',
|
|
1992
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_events:checkStanding`,
|
|
1993
|
+
body: runtime.omit(request, ['parent']),
|
|
1994
|
+
bodyType: 'sylphx.money.v1.CheckUsageStandingRequest',
|
|
1995
|
+
responseType: 'sylphx.money.v1.UsageStanding',
|
|
1996
|
+
mutation: true,
|
|
1997
|
+
});
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
/** `credit_grants` of Sylphx Money: Resource type `money.sylphx.com/CreditGrant`. */
|
|
2001
|
+
export class CreditGrantsCollection {
|
|
2002
|
+
client;
|
|
2003
|
+
constructor(client) {
|
|
2004
|
+
this.client = client;
|
|
2005
|
+
}
|
|
2006
|
+
/**
|
|
2007
|
+
* 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.
|
|
2008
|
+
*
|
|
2009
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:credits.approve` · effect `write`
|
|
2010
|
+
*
|
|
2011
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNKNOWN_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2012
|
+
*/
|
|
2013
|
+
async create(request) {
|
|
2014
|
+
return this.client.call({
|
|
2015
|
+
method: 'POST',
|
|
2016
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/credit_grants`,
|
|
2017
|
+
body: request.creditGrant ?? {},
|
|
2018
|
+
bodyType: 'sylphx.money.v1.CreditGrant',
|
|
2019
|
+
responseType: 'sylphx.money.v1.CreditGrant',
|
|
2020
|
+
mutation: true,
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
/**
|
|
2024
|
+
* Gets a credit grant.
|
|
2025
|
+
*
|
|
2026
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/credit_grants/*}` · permission `billing:read` · effect `read`
|
|
2027
|
+
*
|
|
2028
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2029
|
+
*/
|
|
2030
|
+
async get(request) {
|
|
2031
|
+
return this.client.call({
|
|
2032
|
+
method: 'GET',
|
|
2033
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/credit_grants/*', 'name')}`,
|
|
2034
|
+
responseType: 'sylphx.money.v1.CreditGrant',
|
|
2035
|
+
mutation: false,
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
/**
|
|
2039
|
+
* Lists credit grants.
|
|
2040
|
+
*
|
|
2041
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/credit_grants` · permission `billing:read` · effect `read`
|
|
2042
|
+
*
|
|
2043
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2044
|
+
*/
|
|
2045
|
+
async list(request) {
|
|
2046
|
+
return this.client.call({
|
|
2047
|
+
method: 'GET',
|
|
2048
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/credit_grants`,
|
|
2049
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2050
|
+
responseType: 'sylphx.money.v1.ListCreditGrantsResponse',
|
|
2051
|
+
mutation: false,
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
/** Every item of every page of `list`. */
|
|
2055
|
+
async *listAll(request) {
|
|
2056
|
+
let next = request;
|
|
2057
|
+
for (;;) {
|
|
2058
|
+
const page = await this.list(next);
|
|
2059
|
+
yield* page.creditGrants ?? [];
|
|
2060
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2061
|
+
return;
|
|
2062
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
/** `usage_invoices` of Sylphx Money: Resource type `money.sylphx.com/UsageInvoice`. */
|
|
2067
|
+
export class UsageInvoicesCollection {
|
|
2068
|
+
client;
|
|
2069
|
+
constructor(client) {
|
|
2070
|
+
this.client = client;
|
|
2071
|
+
}
|
|
2072
|
+
/**
|
|
2073
|
+
* Gets a usage invoice.
|
|
2074
|
+
*
|
|
2075
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}` · permission `billing:read` · effect `read`
|
|
2076
|
+
*
|
|
2077
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2078
|
+
*/
|
|
2079
|
+
async get(request) {
|
|
2080
|
+
return this.client.call({
|
|
2081
|
+
method: 'GET',
|
|
2082
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_invoices/*', 'name')}`,
|
|
2083
|
+
responseType: 'sylphx.money.v1.UsageInvoice',
|
|
2084
|
+
mutation: false,
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Lists usage invoices, newest first.
|
|
2089
|
+
*
|
|
2090
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_invoices` · permission `billing:read` · effect `read`
|
|
2091
|
+
*
|
|
2092
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2093
|
+
*/
|
|
2094
|
+
async list(request) {
|
|
2095
|
+
return this.client.call({
|
|
2096
|
+
method: 'GET',
|
|
2097
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_invoices`,
|
|
2098
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2099
|
+
responseType: 'sylphx.money.v1.ListUsageInvoicesResponse',
|
|
2100
|
+
mutation: false,
|
|
2101
|
+
});
|
|
2102
|
+
}
|
|
2103
|
+
/** Every item of every page of `list`. */
|
|
2104
|
+
async *listAll(request) {
|
|
2105
|
+
let next = request;
|
|
2106
|
+
for (;;) {
|
|
2107
|
+
const page = await this.list(next);
|
|
2108
|
+
yield* page.usageInvoices ?? [];
|
|
2109
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2110
|
+
return;
|
|
2111
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
/**
|
|
2115
|
+
* Releases a held invoice for collection, audited with who and why. Grant expiry or replacement never does.
|
|
2116
|
+
*
|
|
2117
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/usage_invoices/*}:releaseCollection` · permission `billing:credits.approve` · effect `write`
|
|
2118
|
+
*
|
|
2119
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2120
|
+
*/
|
|
2121
|
+
async releaseCollection(request) {
|
|
2122
|
+
return this.client.call({
|
|
2123
|
+
method: 'POST',
|
|
2124
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_invoices/*', 'name')}:releaseCollection`,
|
|
2125
|
+
body: runtime.omit(request, ['name']),
|
|
2126
|
+
bodyType: 'sylphx.money.v1.ReleaseUsageInvoiceCollectionRequest',
|
|
2127
|
+
responseType: 'sylphx.money.v1.UsageInvoice',
|
|
2128
|
+
mutation: true,
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
/** `usage_meters` of Sylphx Money: Resource type `money.sylphx.com/UsageMeter`. */
|
|
2133
|
+
export class UsageMetersCollection {
|
|
2134
|
+
client;
|
|
2135
|
+
constructor(client) {
|
|
2136
|
+
this.client = client;
|
|
2137
|
+
}
|
|
2138
|
+
/**
|
|
2139
|
+
* Gets a usage meter.
|
|
2140
|
+
*
|
|
2141
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:read` · effect `read`
|
|
2142
|
+
*
|
|
2143
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2144
|
+
*/
|
|
2145
|
+
async get(request) {
|
|
2146
|
+
return this.client.call({
|
|
2147
|
+
method: 'GET',
|
|
2148
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/usage_meters/*', 'name')}`,
|
|
2149
|
+
responseType: 'sylphx.money.v1.UsageMeter',
|
|
2150
|
+
mutation: false,
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* Lists usage meters.
|
|
2155
|
+
*
|
|
2156
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meters` · permission `billing:read` · effect `read`
|
|
2157
|
+
*
|
|
2158
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2159
|
+
*/
|
|
2160
|
+
async list(request) {
|
|
2161
|
+
return this.client.call({
|
|
2162
|
+
method: 'GET',
|
|
2163
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_meters`,
|
|
2164
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
2165
|
+
responseType: 'sylphx.money.v1.ListUsageMetersResponse',
|
|
2166
|
+
mutation: false,
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
/** Every item of every page of `list`. */
|
|
2170
|
+
async *listAll(request) {
|
|
2171
|
+
let next = request;
|
|
2172
|
+
for (;;) {
|
|
2173
|
+
const page = await this.list(next);
|
|
2174
|
+
yield* page.usageMeters ?? [];
|
|
2175
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2176
|
+
return;
|
|
2177
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
/**
|
|
2181
|
+
* Creates or updates a usage meter. The unit cannot change once it has recorded usage.
|
|
2182
|
+
*
|
|
2183
|
+
* `PATCH /v1/{usage_meter.name=orgs/*\/projects/*\/envs/*\/usage_meters/*}` · permission `billing:write` · effect `write`
|
|
2184
|
+
*
|
|
2185
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2186
|
+
*/
|
|
2187
|
+
async update(request) {
|
|
2188
|
+
return this.client.call({
|
|
2189
|
+
method: 'PATCH',
|
|
2190
|
+
path: `/v1/${runtime.pathParam(request.usageMeter?.name, 'orgs/*/projects/*/envs/*/usage_meters/*', 'usage_meter.name')}`,
|
|
2191
|
+
query: { update_mask: request.updateMask },
|
|
2192
|
+
body: request.usageMeter ?? {},
|
|
2193
|
+
bodyType: 'sylphx.money.v1.UsageMeter',
|
|
2194
|
+
responseType: 'sylphx.money.v1.UsageMeter',
|
|
2195
|
+
mutation: true,
|
|
2196
|
+
});
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
/** `usage_meter_prices` of Sylphx Money: Resource type `money.sylphx.com/UsageMeterPrice`. */
|
|
2200
|
+
export class UsageMeterPricesCollection {
|
|
2201
|
+
client;
|
|
2202
|
+
constructor(client) {
|
|
2203
|
+
this.client = client;
|
|
2204
|
+
}
|
|
2205
|
+
/**
|
|
2206
|
+
* Appends a price to a meter's history. It applies from its effective time on and never rewrites usage already rated.
|
|
2207
|
+
*
|
|
2208
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:write` · effect `write`
|
|
2209
|
+
*
|
|
2210
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2211
|
+
*/
|
|
2212
|
+
async create(request) {
|
|
2213
|
+
return this.client.call({
|
|
2214
|
+
method: 'POST',
|
|
2215
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_meter_prices`,
|
|
2216
|
+
body: request.usageMeterPrice ?? {},
|
|
2217
|
+
bodyType: 'sylphx.money.v1.UsageMeterPrice',
|
|
2218
|
+
responseType: 'sylphx.money.v1.UsageMeterPrice',
|
|
2219
|
+
mutation: true,
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
/**
|
|
2223
|
+
* Lists meter prices, newest first; filter by `meter`.
|
|
2224
|
+
*
|
|
2225
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/usage_meter_prices` · permission `billing:read` · effect `read`
|
|
2226
|
+
*
|
|
2227
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2228
|
+
*/
|
|
2229
|
+
async list(request) {
|
|
2230
|
+
return this.client.call({
|
|
2231
|
+
method: 'GET',
|
|
2232
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/usage_meter_prices`,
|
|
2233
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2234
|
+
responseType: 'sylphx.money.v1.ListUsageMeterPricesResponse',
|
|
2235
|
+
mutation: false,
|
|
2236
|
+
});
|
|
2237
|
+
}
|
|
2238
|
+
/** Every item of every page of `list`. */
|
|
2239
|
+
async *listAll(request) {
|
|
2240
|
+
let next = request;
|
|
2241
|
+
for (;;) {
|
|
2242
|
+
const page = await this.list(next);
|
|
2243
|
+
yield* page.usageMeterPrices ?? [];
|
|
2244
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2245
|
+
return;
|
|
2246
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
/** `revenue_sources` of Sylphx Money: Resource type `money.sylphx.com/RevenueSource`. */
|
|
2251
|
+
export class RevenueSourcesCollection {
|
|
2252
|
+
client;
|
|
2253
|
+
constructor(client) {
|
|
2254
|
+
this.client = client;
|
|
2255
|
+
}
|
|
2256
|
+
/**
|
|
2257
|
+
* Gets a revenue source, with its freshness. Revenue reporting
|
|
2258
|
+
* (docs/adr/ADR-01M40HRQT0VSXZ1WANP8M318F2) is org-wide: `revenue:read` or
|
|
2259
|
+
* `revenue:write`, held by an org-wide key or an org owner's or admin's
|
|
2260
|
+
* session only; a project or environment key is refused.
|
|
2261
|
+
*
|
|
2262
|
+
* `GET /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:read` · effect `read`
|
|
2263
|
+
*
|
|
2264
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
2265
|
+
*/
|
|
2266
|
+
async get(request) {
|
|
2267
|
+
return this.client.call({
|
|
2268
|
+
method: 'GET',
|
|
2269
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue_sources/*', 'name')}`,
|
|
2270
|
+
responseType: 'sylphx.money.v1.RevenueSource',
|
|
2271
|
+
mutation: false,
|
|
2272
|
+
});
|
|
2273
|
+
}
|
|
2274
|
+
/**
|
|
2275
|
+
* Lists the org's revenue sources, with their freshness.
|
|
2276
|
+
*
|
|
2277
|
+
* `GET /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:read` · effect `read`
|
|
2278
|
+
*
|
|
2279
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2280
|
+
*/
|
|
2281
|
+
async list(request) {
|
|
2282
|
+
return this.client.call({
|
|
2283
|
+
method: 'GET',
|
|
2284
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/revenue_sources`,
|
|
2285
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
2286
|
+
responseType: 'sylphx.money.v1.ListRevenueSourcesResponse',
|
|
2287
|
+
mutation: false,
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
/** Every item of every page of `list`. */
|
|
2291
|
+
async *listAll(request) {
|
|
2292
|
+
let next = request;
|
|
2293
|
+
for (;;) {
|
|
2294
|
+
const page = await this.list(next);
|
|
2295
|
+
yield* page.revenueSources ?? [];
|
|
2296
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2297
|
+
return;
|
|
2298
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
/**
|
|
2302
|
+
* Registers a revenue source. The `money` source is implicit and never
|
|
2303
|
+
* created here.
|
|
2304
|
+
*
|
|
2305
|
+
* `POST /v1/{parent=orgs/*}/revenue_sources` · permission `revenue:write` · effect `write`
|
|
2306
|
+
*
|
|
2307
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2308
|
+
*/
|
|
2309
|
+
async create(request) {
|
|
2310
|
+
return this.client.call({
|
|
2311
|
+
method: 'POST',
|
|
2312
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/revenue_sources`,
|
|
2313
|
+
query: { revenue_source_id: request.revenueSourceId, validate_only: request.validateOnly },
|
|
2314
|
+
body: request.revenueSource ?? {},
|
|
2315
|
+
bodyType: 'sylphx.money.v1.RevenueSource',
|
|
2316
|
+
responseType: 'sylphx.money.v1.RevenueSource',
|
|
2317
|
+
mutation: true,
|
|
2318
|
+
});
|
|
2319
|
+
}
|
|
2320
|
+
/**
|
|
2321
|
+
* Renames, pauses or resumes a revenue source, or changes its settings.
|
|
2322
|
+
*
|
|
2323
|
+
* `PATCH /v1/{revenue_source.name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `write`
|
|
2324
|
+
*
|
|
2325
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2326
|
+
*/
|
|
2327
|
+
async update(request) {
|
|
2328
|
+
return this.client.call({
|
|
2329
|
+
method: 'PATCH',
|
|
2330
|
+
path: `/v1/${runtime.pathParam(request.revenueSource?.name, 'orgs/*/revenue_sources/*', 'revenue_source.name')}`,
|
|
2331
|
+
query: { update_mask: request.updateMask, validate_only: request.validateOnly },
|
|
2332
|
+
body: request.revenueSource ?? {},
|
|
2333
|
+
bodyType: 'sylphx.money.v1.RevenueSource',
|
|
2334
|
+
responseType: 'sylphx.money.v1.RevenueSource',
|
|
2335
|
+
mutation: true,
|
|
2336
|
+
});
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* Deletes a revenue source and the facts it reported. The `money` source
|
|
2340
|
+
* cannot be deleted; pause it instead.
|
|
2341
|
+
*
|
|
2342
|
+
* `DELETE /v1/{name=orgs/*\/revenue_sources/*}` · permission `revenue:write` · effect `destructive`
|
|
2343
|
+
*
|
|
2344
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2345
|
+
*/
|
|
2346
|
+
async delete(request) {
|
|
2347
|
+
return this.client.call({
|
|
2348
|
+
method: 'DELETE',
|
|
2349
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue_sources/*', 'name')}`,
|
|
2350
|
+
query: { etag: request.etag, validate_only: request.validateOnly },
|
|
2351
|
+
mutation: true,
|
|
2352
|
+
});
|
|
2353
|
+
}
|
|
2354
|
+
/**
|
|
2355
|
+
* Syncs a revenue source now, or backfills a period. A `money` source
|
|
2356
|
+
* fills any booked fact its environment's ledger holds and the facts lack;
|
|
2357
|
+
* a paused source, or one whose connector has not shipped yet, is refused
|
|
2358
|
+
* (`INVALID_STATE`).
|
|
2359
|
+
*
|
|
2360
|
+
* `POST /v1/{name=orgs/*\/revenue_sources/*}:run` · permission `revenue:write` · effect `write`
|
|
2361
|
+
*
|
|
2362
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
2363
|
+
*/
|
|
2364
|
+
async run(request) {
|
|
2365
|
+
return this.client.call({
|
|
2366
|
+
method: 'POST',
|
|
2367
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue_sources/*', 'name')}:run`,
|
|
2368
|
+
body: runtime.omit(request, ['name']),
|
|
2369
|
+
bodyType: 'sylphx.money.v1.RunRevenueSourceRequest',
|
|
2370
|
+
responseType: 'sylphx.money.v1.RunRevenueSourceResponse',
|
|
2371
|
+
mutation: true,
|
|
2372
|
+
});
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
/** `revenue` of Sylphx Money: Resource type `money.sylphx.com/RevenueSummary`. */
|
|
2376
|
+
export class RevenueCollection {
|
|
2377
|
+
client;
|
|
2378
|
+
constructor(client) {
|
|
2379
|
+
this.client = client;
|
|
2380
|
+
}
|
|
2381
|
+
/**
|
|
2382
|
+
* Gets the org's revenue over a period: totals by day or month, split by
|
|
2383
|
+
* source or product, gross or net, in one reporting currency, with the
|
|
2384
|
+
* basis of each bucket, the sources that report late, and what has no
|
|
2385
|
+
* rate yet. Reads only the daily roll-up, bounded by a 5 second statement
|
|
2386
|
+
* timeout. For example `sylphx money revenue summary --period mtd
|
|
2387
|
+
* --split source`.
|
|
2388
|
+
*
|
|
2389
|
+
* `GET /v1/{name=orgs/*\/revenue}` · permission `revenue:read` · effect `read`
|
|
2390
|
+
*
|
|
2391
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `UNAVAILABLE`.
|
|
2392
|
+
*/
|
|
2393
|
+
async get(request) {
|
|
2394
|
+
return this.client.call({
|
|
2395
|
+
method: 'GET',
|
|
2396
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/revenue', 'name')}`,
|
|
2397
|
+
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 },
|
|
2398
|
+
responseType: 'sylphx.money.v1.RevenueSummary',
|
|
2399
|
+
mutation: false,
|
|
2400
|
+
});
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
/** `revenue_facts` of Sylphx Money: Resource type `money.sylphx.com/RevenueFact`. */
|
|
2404
|
+
export class RevenueFactsCollection {
|
|
2405
|
+
client;
|
|
2406
|
+
constructor(client) {
|
|
2407
|
+
this.client = client;
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* Lists the org's revenue facts, newest day first, for audit and export.
|
|
2411
|
+
*
|
|
2412
|
+
* `GET /v1/{parent=orgs/*}/revenue_facts` · permission `revenue:read` · effect `read`
|
|
2413
|
+
*
|
|
2414
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`, `UNAVAILABLE`.
|
|
2415
|
+
*/
|
|
2416
|
+
async list(request) {
|
|
2417
|
+
return this.client.call({
|
|
2418
|
+
method: 'GET',
|
|
2419
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/revenue_facts`,
|
|
2420
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2421
|
+
responseType: 'sylphx.money.v1.ListRevenueFactsResponse',
|
|
2422
|
+
mutation: false,
|
|
2423
|
+
});
|
|
2424
|
+
}
|
|
2425
|
+
/** Every item of every page of `list`. */
|
|
2426
|
+
async *listAll(request) {
|
|
2427
|
+
let next = request;
|
|
2428
|
+
for (;;) {
|
|
2429
|
+
const page = await this.list(next);
|
|
2430
|
+
yield* page.revenueFacts ?? [];
|
|
2431
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2432
|
+
return;
|
|
2433
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
/** `exchange_rates` of Sylphx Money: Resource type `money.sylphx.com/ExchangeRate`. */
|
|
2438
|
+
export class ExchangeRatesCollection {
|
|
2439
|
+
client;
|
|
2440
|
+
constructor(client) {
|
|
2441
|
+
this.client = client;
|
|
2442
|
+
}
|
|
2443
|
+
/**
|
|
2444
|
+
* Lists the exchange rates Money converts at (units per US dollar by day),
|
|
2445
|
+
* for any reader that converts revenue.
|
|
2446
|
+
*
|
|
2447
|
+
* `GET /v1/{parent=orgs/*}/exchange_rates` · permission `revenue:read` · effect `read`
|
|
2448
|
+
*
|
|
2449
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
2450
|
+
*/
|
|
2451
|
+
async list(request) {
|
|
2452
|
+
return this.client.call({
|
|
2453
|
+
method: 'GET',
|
|
2454
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/exchange_rates`,
|
|
2455
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
2456
|
+
responseType: 'sylphx.money.v1.ListExchangeRatesResponse',
|
|
2457
|
+
mutation: false,
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
/** Every item of every page of `list`. */
|
|
2461
|
+
async *listAll(request) {
|
|
2462
|
+
let next = request;
|
|
2463
|
+
for (;;) {
|
|
2464
|
+
const page = await this.list(next);
|
|
2465
|
+
yield* page.exchangeRates ?? [];
|
|
2466
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2467
|
+
return;
|
|
2468
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
1090
2472
|
//# sourceMappingURL=money.js.map
|