glitch-javascript-sdk 3.15.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/hosting-runtime.js +1 -1
- package/dist/browser/hosting-runtime.js.map +1 -1
- package/dist/cjs/index.js +7495 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Microtransactions.d.ts +256 -34
- package/dist/esm/index.js +7529 -20
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/util/Requests.d.ts +3 -1
- package/dist/index.d.ts +260 -36
- package/guides/commerce-delivery-receiver.mjs +117 -0
- package/guides/microtransactions.md +98 -17
- package/package.json +1 -1
- package/src/api/Microtransactions.ts +223 -33
- package/src/routes/MicrotransactionsRoute.ts +11 -0
- package/src/util/Requests.ts +2 -2
- package/src/util/Session.ts +3 -2
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { AxiosProgressEvent, AxiosPromise, AxiosRequestConfig } from 'axios';
|
|
2
2
|
export type MicrotransactionEnvironment = 'sandbox' | 'live';
|
|
3
|
+
export type MicrotransactionProviderName = 'stripe' | 'xsolla';
|
|
3
4
|
export type MicrotransactionProductType = 'durable' | 'consumable' | 'currency' | 'bundle' | 'pass';
|
|
4
5
|
export type MicrotransactionCurrency = 'USD' | 'EUR' | 'GBP' | 'CAD' | 'AUD' | 'JPY' | 'BRL' | 'INR' | 'KRW';
|
|
5
6
|
export type MicrotransactionProductStatus = 'draft' | 'active' | 'archived';
|
|
6
|
-
export type MicrotransactionPaymentStatus = 'created' | 'action_required' | 'pending' | 'unknown' | 'paid' | 'failed' | 'canceled' | 'refund_pending' | 'partially_refunded' | 'refunded' | 'disputed' | 'quarantined';
|
|
7
|
+
export type MicrotransactionPaymentStatus = 'created' | 'action_required' | 'pending' | 'unknown' | 'paid' | 'failed' | 'canceled' | 'refund_pending' | 'partially_refunded' | 'refunded' | 'disputed' | 'quarantined' | 'refund_review';
|
|
8
|
+
export type MicrotransactionRefundStatus = 'requested' | 'linked' | 'unknown' | 'pending' | 'submitted' | 'succeeded' | 'failed' | 'canceled';
|
|
9
|
+
export type MicrotransactionDeliveryStatus = 'pending' | 'retrying' | 'processing' | 'acknowledged' | 'failed' | 'superseded';
|
|
10
|
+
export type MicrotransactionPayoutStatus = 'pending' | 'transferred' | 'bank_paid' | 'bank_pending' | 'bank_failed' | 'transfer_reversed';
|
|
7
11
|
export type MicrotransactionFulfillmentStatus = 'not_ready' | 'pending' | 'delivered' | 'retrying' | 'failed' | 'revoked' | 'partially_recovered';
|
|
8
12
|
export type MicrotransactionAbility = 'commerce:read' | 'commerce:write' | 'commerce:finance' | 'commerce:fulfill';
|
|
9
|
-
export type MicrotransactionErrorCode = 'authentication_required' | 'permission_denied' | '
|
|
13
|
+
export type MicrotransactionErrorCode = 'authentication_required' | 'permission_denied' | 'not_found' | 'not_eligible' | 'quote_expired' | 'already_owned' | 'idempotency_conflict' | 'payment_unknown' | 'rate_limited' | 'invalid_revenue_configuration' | 'fulfillment_pending' | 'provider_unavailable';
|
|
10
14
|
/** The backend's JSON envelope; Axios returns this envelope in response.data. */
|
|
11
15
|
export interface MicrotransactionResponse<T> {
|
|
12
16
|
data: T;
|
|
@@ -29,6 +33,41 @@ export interface MicrotransactionSessionOptions extends MicrotransactionRequestO
|
|
|
29
33
|
export interface MicrotransactionEnvironmentFilter {
|
|
30
34
|
environment?: MicrotransactionEnvironment;
|
|
31
35
|
}
|
|
36
|
+
/** Catalog discovery defaults to 200 records per page; absence on page one is not proof a SKU is unused. */
|
|
37
|
+
export interface MicrotransactionProductListFilters {
|
|
38
|
+
page?: number;
|
|
39
|
+
per_page?: number;
|
|
40
|
+
status?: MicrotransactionProductStatus;
|
|
41
|
+
/** Exact SKU, not a substring search. */
|
|
42
|
+
sku?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Administrative lists default to page 1 / 25 records and are scoped to the authorized title. */
|
|
45
|
+
export interface MicrotransactionManagementListFilters extends MicrotransactionEnvironmentFilter {
|
|
46
|
+
page?: number;
|
|
47
|
+
per_page?: number;
|
|
48
|
+
status?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface MicrotransactionOrderListFilters extends MicrotransactionManagementListFilters {
|
|
51
|
+
product_id?: string;
|
|
52
|
+
status?: MicrotransactionPaymentStatus;
|
|
53
|
+
payment_status?: MicrotransactionPaymentStatus;
|
|
54
|
+
}
|
|
55
|
+
export interface MicrotransactionRelatedListFilters extends MicrotransactionManagementListFilters {
|
|
56
|
+
order_id?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface MicrotransactionRefundListFilters extends MicrotransactionRelatedListFilters {
|
|
59
|
+
status?: MicrotransactionRefundStatus;
|
|
60
|
+
}
|
|
61
|
+
export interface MicrotransactionDeliveryListFilters extends MicrotransactionRelatedListFilters {
|
|
62
|
+
status?: MicrotransactionDeliveryStatus;
|
|
63
|
+
}
|
|
64
|
+
export interface MicrotransactionPayoutListFilters extends MicrotransactionRelatedListFilters {
|
|
65
|
+
status?: MicrotransactionPayoutStatus;
|
|
66
|
+
}
|
|
67
|
+
/** @deprecated Optional compatibility field only; no confirmation or human-approval gate is enforced. */
|
|
68
|
+
export interface MicrotransactionLegacyConfirmation {
|
|
69
|
+
confirm?: boolean;
|
|
70
|
+
}
|
|
32
71
|
/** Self-only purchase-history filters. Identity comes from authentication, never a user_id argument. */
|
|
33
72
|
export interface MicrotransactionMyPurchasesFilters extends MicrotransactionEnvironmentFilter {
|
|
34
73
|
/** Page number, integer 1–10000. Defaults to 1; ordering is created_at DESC, id DESC. */
|
|
@@ -88,7 +127,7 @@ export interface MicrotransactionProductInput {
|
|
|
88
127
|
starts_at?: string | null;
|
|
89
128
|
ends_at?: string | null;
|
|
90
129
|
max_per_order?: number;
|
|
91
|
-
/**
|
|
130
|
+
/** @deprecated Ignored compatibility field. Title authorization and immutable-data validation remain required. */
|
|
92
131
|
confirm?: boolean;
|
|
93
132
|
}
|
|
94
133
|
export interface MicrotransactionProduct extends Omit<MicrotransactionProductInput, 'confirm' | 'status' | 'media_ids'> {
|
|
@@ -102,14 +141,149 @@ export interface MicrotransactionProduct extends Omit<MicrotransactionProductInp
|
|
|
102
141
|
updated_at: string;
|
|
103
142
|
}
|
|
104
143
|
export interface MicrotransactionProvider {
|
|
105
|
-
provider:
|
|
144
|
+
provider: MicrotransactionProviderName;
|
|
106
145
|
environment: MicrotransactionEnvironment;
|
|
107
146
|
configured: boolean;
|
|
108
|
-
|
|
147
|
+
/** Actual external provider/account capability, not a manual approval flag. */
|
|
148
|
+
available: boolean;
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
priority: number;
|
|
109
151
|
countries: string[];
|
|
110
152
|
currencies: string[];
|
|
153
|
+
minimum_amounts: Record<string, number>;
|
|
111
154
|
channels: string[];
|
|
112
|
-
|
|
155
|
+
payment_methods: string[];
|
|
156
|
+
configuration: MicrotransactionProviderConfiguration;
|
|
157
|
+
account: {
|
|
158
|
+
id: string;
|
|
159
|
+
country: string | null;
|
|
160
|
+
charges_enabled: boolean;
|
|
161
|
+
payouts_enabled: boolean;
|
|
162
|
+
requirements_due: string[];
|
|
163
|
+
} | null;
|
|
164
|
+
/** The game's payout target. Do not substitute the platform processing account's payouts_enabled. */
|
|
165
|
+
payout_account: {
|
|
166
|
+
source: 'platform' | 'user' | 'community' | 'managed';
|
|
167
|
+
id: string | null;
|
|
168
|
+
available: boolean;
|
|
169
|
+
country: string | null;
|
|
170
|
+
transfers_active: boolean;
|
|
171
|
+
payouts_enabled: boolean;
|
|
172
|
+
requirements_due: string[];
|
|
173
|
+
reasons: string[];
|
|
174
|
+
};
|
|
175
|
+
tax: {
|
|
176
|
+
status: string;
|
|
177
|
+
missing_fields: string[];
|
|
178
|
+
};
|
|
179
|
+
reasons: string[];
|
|
180
|
+
checked_at: string | null;
|
|
181
|
+
revision?: number;
|
|
182
|
+
}
|
|
183
|
+
export interface MicrotransactionProviderSku {
|
|
184
|
+
/** Provider SKU, 1–100 characters. */
|
|
185
|
+
sku: string;
|
|
186
|
+
currency: MicrotransactionCurrency;
|
|
187
|
+
amount_minor: number;
|
|
188
|
+
}
|
|
189
|
+
export interface MicrotransactionProviderConfiguration {
|
|
190
|
+
tax_mode: 'automatic' | 'disabled';
|
|
191
|
+
/** Stripe tax code txcd_ followed by exactly eight digits. */
|
|
192
|
+
tax_code: string | null;
|
|
193
|
+
payout_source: 'platform' | 'user' | 'community' | 'managed';
|
|
194
|
+
/** Xsolla public project ID, 1–20 decimal digits. */
|
|
195
|
+
project_id: string | null;
|
|
196
|
+
/** Maximum 200 mappings. */
|
|
197
|
+
sku_map: Record<string, MicrotransactionProviderSku>;
|
|
198
|
+
}
|
|
199
|
+
/** Developer preferences and an optional new owned Xsolla webhook secret only; never platform credentials, arbitrary payees, or availability facts. */
|
|
200
|
+
export interface MicrotransactionProviderInput extends Partial<MicrotransactionProviderConfiguration>, MicrotransactionLegacyConfirmation {
|
|
201
|
+
environment: MicrotransactionEnvironment;
|
|
202
|
+
enabled?: boolean;
|
|
203
|
+
priority?: number;
|
|
204
|
+
countries?: string[];
|
|
205
|
+
currencies?: MicrotransactionCurrency[];
|
|
206
|
+
minimum_amounts?: Record<string, number>;
|
|
207
|
+
/** Write-only NEW owned Xsolla project secret, 16–512 chars, finance scope. Never a platform API key or MCP token; never returned/logged or put in game code. Existing platform/historical bindings cannot be overwritten. */
|
|
208
|
+
webhook_secret?: string;
|
|
209
|
+
}
|
|
210
|
+
export interface MicrotransactionProviderOnboardingInput extends MicrotransactionLegacyConfirmation {
|
|
211
|
+
environment: MicrotransactionEnvironment;
|
|
212
|
+
country: string;
|
|
213
|
+
/** Stable caller-created key. Reuse with identical input after uncertain retries; never generate inside a retry. */
|
|
214
|
+
idempotency_key: string;
|
|
215
|
+
}
|
|
216
|
+
export interface MicrotransactionProviderOnboarding {
|
|
217
|
+
title_id: string;
|
|
218
|
+
provider: 'stripe';
|
|
219
|
+
environment: MicrotransactionEnvironment;
|
|
220
|
+
account_id: string;
|
|
221
|
+
/** Single-use provider onboarding URL on connect.stripe.com; do not log or persist it. */
|
|
222
|
+
onboarding_url: string;
|
|
223
|
+
expires_at: string;
|
|
224
|
+
status: 'requires_provider_onboarding';
|
|
225
|
+
reused: boolean;
|
|
226
|
+
}
|
|
227
|
+
export interface MicrotransactionDeliverySettings {
|
|
228
|
+
title_id: string;
|
|
229
|
+
environment: MicrotransactionEnvironment;
|
|
230
|
+
enabled: boolean;
|
|
231
|
+
url: string | null;
|
|
232
|
+
signature_algorithm: 'ed25519' | 'hmac-sha256';
|
|
233
|
+
/** Public verification material only. The private signing key never leaves the server. */
|
|
234
|
+
verification_public_key: string | null;
|
|
235
|
+
key_id: string | null;
|
|
236
|
+
revision: number;
|
|
237
|
+
configured: boolean;
|
|
238
|
+
}
|
|
239
|
+
export interface MicrotransactionDeliverySettingsInput extends MicrotransactionLegacyConfirmation {
|
|
240
|
+
environment: MicrotransactionEnvironment;
|
|
241
|
+
enabled?: boolean;
|
|
242
|
+
url?: string | null;
|
|
243
|
+
}
|
|
244
|
+
export interface MicrotransactionDelivery {
|
|
245
|
+
id: string;
|
|
246
|
+
order_id: string;
|
|
247
|
+
event_type: string;
|
|
248
|
+
status: MicrotransactionDeliveryStatus;
|
|
249
|
+
attempts: number;
|
|
250
|
+
next_attempt_at: string | null;
|
|
251
|
+
acknowledged_at: string | null;
|
|
252
|
+
created_at: string;
|
|
253
|
+
updated_at: string;
|
|
254
|
+
}
|
|
255
|
+
/** Replay/acknowledgement return only this safe subset, not the list's timestamps. */
|
|
256
|
+
export type MicrotransactionDeliveryResult = Pick<MicrotransactionDelivery, 'id' | 'order_id' | 'status' | 'event_type' | 'attempts' | 'acknowledged_at'>;
|
|
257
|
+
export interface MicrotransactionRefundRecord {
|
|
258
|
+
id: string;
|
|
259
|
+
order_id: string;
|
|
260
|
+
status: MicrotransactionRefundStatus;
|
|
261
|
+
amount_minor: number;
|
|
262
|
+
reason: string;
|
|
263
|
+
idempotency_key: string | null;
|
|
264
|
+
record_type: 'request' | 'execution';
|
|
265
|
+
execution_refund_id: string | null;
|
|
266
|
+
execution_status: MicrotransactionRefundStatus | null;
|
|
267
|
+
request_resolution: 'linked_to_execution' | 'not_executed' | null;
|
|
268
|
+
order_refunded_minor: number | null;
|
|
269
|
+
failure_code: string | null;
|
|
270
|
+
created_at: string;
|
|
271
|
+
updated_at: string;
|
|
272
|
+
}
|
|
273
|
+
export interface MicrotransactionPayout {
|
|
274
|
+
id: string;
|
|
275
|
+
order_id: string;
|
|
276
|
+
status: MicrotransactionPayoutStatus;
|
|
277
|
+
amount_minor: number;
|
|
278
|
+
provider_reference: string | null;
|
|
279
|
+
created_at: string;
|
|
280
|
+
updated_at: string;
|
|
281
|
+
}
|
|
282
|
+
export interface MicrotransactionRefundInput extends MicrotransactionLegacyConfirmation {
|
|
283
|
+
reason: string;
|
|
284
|
+
amount_minor?: number;
|
|
285
|
+
/** REQUIRED stable operation key, scoped to title/order. Reuse identical input on retry; changes conflict. */
|
|
286
|
+
idempotency_key: string;
|
|
113
287
|
}
|
|
114
288
|
export interface MicrotransactionReadiness {
|
|
115
289
|
status: 'disabled' | 'draft' | 'sandbox' | 'ready' | 'live' | 'degraded' | 'suspended';
|
|
@@ -133,8 +307,9 @@ export interface MicrotransactionSettingsInput {
|
|
|
133
307
|
currencies?: MicrotransactionCurrency[];
|
|
134
308
|
branding?: Omit<MicrotransactionBranding, 'logo_media'>;
|
|
135
309
|
support_email?: string | null;
|
|
310
|
+
/** @deprecated Legacy delivery alias requiring BOTH commerce:write and commerce:fulfill; prefer updateDeliverySettings/getDeliverySettings. */
|
|
136
311
|
webhook_url?: string | null;
|
|
137
|
-
/**
|
|
312
|
+
/** @deprecated Ignored compatibility field. Authorized title editors save directly; actual provider/sales restrictions remain. */
|
|
138
313
|
confirm?: boolean;
|
|
139
314
|
}
|
|
140
315
|
export interface MicrotransactionSettings extends Omit<Required<MicrotransactionSettingsInput>, 'confirm'> {
|
|
@@ -215,6 +390,13 @@ export interface MicrotransactionOrder {
|
|
|
215
390
|
items: MicrotransactionGrant[];
|
|
216
391
|
entitlements?: MicrotransactionEntitlement[];
|
|
217
392
|
}
|
|
393
|
+
export interface MicrotransactionOrderDetail extends MicrotransactionOrder {
|
|
394
|
+
/** Optional, permission-scoped management relationships. Omission is not proof no records exist. */
|
|
395
|
+
refunds?: Array<Pick<MicrotransactionRefundRecord, 'id' | 'order_id' | 'status'> & Partial<MicrotransactionRefundRecord>>;
|
|
396
|
+
deliveries?: MicrotransactionDelivery[];
|
|
397
|
+
payouts?: Array<Pick<MicrotransactionPayout, 'id' | 'order_id' | 'status'> & Partial<MicrotransactionPayout>>;
|
|
398
|
+
financial_details_included?: boolean;
|
|
399
|
+
}
|
|
218
400
|
export type MicrotransactionGrantUsageStatus = 'unused' | 'partially_used' | 'used_up' | 'owned' | 'expired' | 'revoked' | 'not_delivered' | 'unavailable';
|
|
219
401
|
/** One purchase's server-calculated grant lot, not the player's aggregate inventory balance. */
|
|
220
402
|
export interface MicrotransactionGrantUsage {
|
|
@@ -365,8 +547,10 @@ export interface MicrotransactionConsumeInput {
|
|
|
365
547
|
}
|
|
366
548
|
export interface MicrotransactionRefund {
|
|
367
549
|
refund_id: string;
|
|
368
|
-
status:
|
|
550
|
+
status: MicrotransactionRefundStatus;
|
|
369
551
|
order_id: string;
|
|
552
|
+
idempotency_key: string;
|
|
553
|
+
failure_code: string | null;
|
|
370
554
|
refund_allocation?: 'pro_rata_all_grants';
|
|
371
555
|
}
|
|
372
556
|
export interface MicrotransactionRefundRequest {
|
|
@@ -389,14 +573,16 @@ export interface MicrotransactionEarnings {
|
|
|
389
573
|
payouts_enabled: boolean;
|
|
390
574
|
reserve_days?: number;
|
|
391
575
|
}
|
|
392
|
-
export type MicrotransactionOperation = 'settings.get' | 'settings.update' | 'products.list' | 'products.create' | 'products.update' | 'products.archive' | 'providers.list' | 'readiness.get' | 'orders.list' | 'orders.get' | 'earnings.get' | 'refunds.request' | 'deliveries.replay' | 'integration.get' | 'integration.verify';
|
|
576
|
+
export type MicrotransactionOperation = 'settings.get' | 'settings.update' | 'products.list' | 'products.create' | 'products.update' | 'products.archive' | 'providers.list' | 'providers.update' | 'providers.refresh' | 'providers.onboarding' | 'readiness.get' | 'orders.list' | 'orders.get' | 'orders.reconcile' | 'earnings.get' | 'refunds.list' | 'refunds.get' | 'refunds.create' | 'refunds.request' | 'refunds.reconcile' | 'delivery.settings.get' | 'delivery.settings.update' | 'deliveries.list' | 'deliveries.replay' | 'deliveries.acknowledge' | 'payouts.list' | 'integration.get' | 'integration.verify';
|
|
393
577
|
export interface MicrotransactionOperationCapability {
|
|
394
578
|
operation: MicrotransactionOperation;
|
|
395
579
|
description: string;
|
|
396
580
|
ability: MicrotransactionAbility;
|
|
397
581
|
input_schema: Record<string, unknown>;
|
|
398
|
-
|
|
399
|
-
|
|
582
|
+
http_method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
583
|
+
mutates: boolean;
|
|
584
|
+
requires_confirmation: false;
|
|
585
|
+
requires_human_approval: false;
|
|
400
586
|
examples: Array<Record<string, unknown>>;
|
|
401
587
|
output_description: string;
|
|
402
588
|
}
|
|
@@ -428,42 +614,78 @@ declare class Microtransactions {
|
|
|
428
614
|
static settings(title_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionSettings>>;
|
|
429
615
|
/** Atomic policy update. Sandbox/off by default. Cannot disable the final working revenue model. */
|
|
430
616
|
static updateSettings(title_id: string, data: MicrotransactionSettingsInput, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionSettings>>;
|
|
431
|
-
/** Read-only country/provider
|
|
617
|
+
/** Read-only current country/provider capability and revenue readiness; never fabricates availability. */
|
|
432
618
|
static readiness(title_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionReadiness>>;
|
|
433
|
-
/**
|
|
619
|
+
/** Paginated admin catalog including drafts/archives. Default 200, per_page 1–200/page 1–10000. Use exact sku to resolve uncertain creates. */
|
|
620
|
+
static listProducts(title_id: string, params?: MicrotransactionProductListFilters, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
621
|
+
products: MicrotransactionProduct[];
|
|
622
|
+
pagination: MicrotransactionPurchasePagination;
|
|
623
|
+
}>>;
|
|
624
|
+
/** @deprecated Compatibility overload for the earlier second-argument request options. */
|
|
434
625
|
static listProducts(title_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
435
626
|
products: MicrotransactionProduct[];
|
|
627
|
+
pagination: MicrotransactionPurchasePagination;
|
|
436
628
|
}>>;
|
|
437
629
|
/** Save a catalog product. Prices use integer minor units and attached media must belong to the title. */
|
|
438
630
|
static createProduct(title_id: string, data: MicrotransactionProductInput, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionProduct>>;
|
|
439
631
|
/** Update a product version. Existing order snapshots remain unchanged. */
|
|
440
632
|
static updateProduct(title_id: string, product_id: string, data: Partial<MicrotransactionProductInput>, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionProduct>>;
|
|
441
|
-
/**
|
|
442
|
-
static archiveProduct(title_id: string, product_id: string, data:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
633
|
+
/** Direct authorized archive. Never deletes financial history or bypasses the last-revenue-model rule. */
|
|
634
|
+
static archiveProduct(title_id: string, product_id: string, data?: MicrotransactionLegacyConfirmation, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionProduct>>;
|
|
635
|
+
/** Actual provider configuration/capability facts; no credentials or manual approval flag. */
|
|
636
|
+
static providers(title_id: string, params?: MicrotransactionEnvironmentFilter, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
637
|
+
providers: MicrotransactionProvider[];
|
|
638
|
+
}>>;
|
|
639
|
+
/** @deprecated Compatibility overload for the earlier second-argument request options. */
|
|
446
640
|
static providers(title_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
447
641
|
providers: MicrotransactionProvider[];
|
|
448
642
|
}>>;
|
|
643
|
+
/** Direct commerce:finance configuration. Saving preferences does not fabricate external capability; inspect available/reasons. */
|
|
644
|
+
static updateProvider(title_id: string, provider: MicrotransactionProviderName, data: MicrotransactionProviderInput, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionProvider>>;
|
|
645
|
+
/** Refresh authenticated external provider facts. May update cached state; never creates a payment or invents eligibility. */
|
|
646
|
+
static refreshProvider(title_id: string, provider: MicrotransactionProviderName, data: {
|
|
647
|
+
environment: MicrotransactionEnvironment;
|
|
648
|
+
}, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionProvider>>;
|
|
649
|
+
/** Start/reuse owned Stripe Connect onboarding with one stable key. Provider KYC is factual setup, not a Glitch approval workflow. */
|
|
650
|
+
static createProviderOnboarding(title_id: string, data: MicrotransactionProviderOnboardingInput, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionProviderOnboarding>>;
|
|
651
|
+
/** Read title/environment delivery settings and the Ed25519 PUBLIC verification key. */
|
|
652
|
+
static getDeliverySettings(title_id: string, params?: MicrotransactionEnvironmentFilter, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionDeliverySettings>>;
|
|
653
|
+
/** Direct commerce:fulfill setup. Private/metadata network targets and private-key inputs remain forbidden. */
|
|
654
|
+
static updateDeliverySettings(title_id: string, data: MicrotransactionDeliverySettingsInput, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionDeliverySettings>>;
|
|
655
|
+
/** Discover safe event IDs/statuses before replay or acknowledge. Page 1–10000, per_page 1–100, default 25. */
|
|
656
|
+
static listDeliveries(title_id: string, params?: MicrotransactionDeliveryListFilters, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
657
|
+
deliveries: MicrotransactionDelivery[];
|
|
658
|
+
pagination: MicrotransactionPurchasePagination;
|
|
659
|
+
}>>;
|
|
660
|
+
/** Financially scoped refund operation discovery; pending/unknown is not completed. */
|
|
661
|
+
static listRefunds(title_id: string, params?: MicrotransactionRefundListFilters, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
662
|
+
refunds: MicrotransactionRefundRecord[];
|
|
663
|
+
pagination: MicrotransactionPurchasePagination;
|
|
664
|
+
}>>;
|
|
665
|
+
/** Inspect one same-title refund operation. */
|
|
666
|
+
static getRefund(title_id: string, refund_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionRefundRecord>>;
|
|
667
|
+
/** Query/retry the original persisted refund with its existing identity, never generate a new refund key. */
|
|
668
|
+
static reconcileRefund(title_id: string, refund_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionRefundRecord>>;
|
|
669
|
+
/** Discover provider transfer/payout records; transferred funds are not automatically a verified bank payout. */
|
|
670
|
+
static listPayouts(title_id: string, params?: MicrotransactionPayoutListFilters, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
671
|
+
payouts: MicrotransactionPayout[];
|
|
672
|
+
pagination: MicrotransactionPurchasePagination;
|
|
673
|
+
}>>;
|
|
449
674
|
/** Admin read of separate-currency balances; pending is not withdrawable revenue. */
|
|
450
675
|
static earnings(title_id: string, params?: MicrotransactionEnvironmentFilter, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionEarnings>>;
|
|
451
|
-
/** Admin
|
|
452
|
-
static listOrders(title_id: string, params?:
|
|
676
|
+
/** Admin paginated redacted orders. Page 1–10000/per_page 1–100 (default 25); own-player history is separate. */
|
|
677
|
+
static listOrders(title_id: string, params?: MicrotransactionOrderListFilters, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
453
678
|
orders: MicrotransactionOrder[];
|
|
679
|
+
pagination: MicrotransactionPurchasePagination;
|
|
454
680
|
}>>;
|
|
455
681
|
/** Owner JWT/scoped player token or title admin. An arbitrary order UUID grants no access. */
|
|
456
|
-
static getOrder(title_id: string, order_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<
|
|
457
|
-
/**
|
|
458
|
-
static
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
amount_minor?: number;
|
|
462
|
-
}, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionRefund>>;
|
|
682
|
+
static getOrder(title_id: string, order_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionOrderDetail>>;
|
|
683
|
+
/** Financially scoped original-provider reconciliation. Does not reroute or start a different purchase. */
|
|
684
|
+
static reconcileOrder(title_id: string, order_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionOrderDetail>>;
|
|
685
|
+
/** Direct commerce:finance refund. REQUIRED stable idempotency_key; omission is an error, never auto-filled. Same-key changed input conflicts. */
|
|
686
|
+
static refundOrder(title_id: string, order_id: string, data: MicrotransactionRefundInput, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionRefund>>;
|
|
463
687
|
/** Replay the same immutable event. Receiver must deduplicate event_id. This cannot mint goods. */
|
|
464
|
-
static replayDelivery(title_id: string, delivery_id: string, data:
|
|
465
|
-
confirm: true;
|
|
466
|
-
}, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<Record<string, unknown>>>;
|
|
688
|
+
static replayDelivery(title_id: string, delivery_id: string, data?: MicrotransactionLegacyConfirmation, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionDeliveryResult>>;
|
|
467
689
|
/** Public eligible catalog. Sandbox is restricted by backend environment/admin policy. */
|
|
468
690
|
static catalog(title_id: string, params?: MicrotransactionCatalogFilter, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionCatalog>>;
|
|
469
691
|
/** User-authenticated quote. Clients select product/quantity, never monetary values or seller accounts. */
|
|
@@ -506,7 +728,7 @@ declare class Microtransactions {
|
|
|
506
728
|
/** Record integration proof from a genuinely paid, fulfilled sandbox order with a claimed game handoff. */
|
|
507
729
|
static verifyIntegration(title_id: string, data: {
|
|
508
730
|
order_id: string;
|
|
509
|
-
confirm
|
|
731
|
+
confirm?: boolean;
|
|
510
732
|
}, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionReadiness>>;
|
|
511
733
|
/** Restore authoritative durable ownership/current consumable balances, never mutable cloud-save balances. */
|
|
512
734
|
static listEntitlements(title_id: string, params?: MicrotransactionEnvironmentFilter, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<{
|
|
@@ -538,10 +760,10 @@ declare class Microtransactions {
|
|
|
538
760
|
/** Trusted title server with commerce:fulfill or admin JWT acknowledges the immutable event. */
|
|
539
761
|
static acknowledgeDelivery(title_id: string, delivery_id: string, data: {
|
|
540
762
|
event_id: string;
|
|
541
|
-
}, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<
|
|
542
|
-
/** Title MCP token, never a runtime install token. Describes
|
|
763
|
+
}, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionDeliveryResult>>;
|
|
764
|
+
/** Title MCP token, never a runtime install token. Describes arguments, abilities, mutation semantics and provider facts. */
|
|
543
765
|
static mcpCapabilities(title_id: string, options?: MicrotransactionRequestOptions): AxiosPromise<MicrotransactionResponse<MicrotransactionCapabilities>>;
|
|
544
|
-
/** Execute
|
|
766
|
+
/** Execute a discovered authorized operation directly. Legacy confirm is ignored and not forwarded. */
|
|
545
767
|
static mcpOperation<T = Record<string, unknown>>(title_id: string, operation: MicrotransactionOperation, data: {
|
|
546
768
|
arguments: Record<string, unknown>;
|
|
547
769
|
confirm?: boolean;
|