@sylphx/sdk 0.32.31 → 0.32.33
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/connections.d.ts +21 -2
- package/dist/connections.js +9 -2
- package/dist/connections.js.map +1 -1
- package/dist/hosting.d.ts +7 -0
- package/dist/hosting.js +1 -0
- package/dist/hosting.js.map +1 -1
- package/dist/methods.js +44 -0
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +90 -0
- package/dist/money.js +111 -0
- package/dist/money.js.map +1 -1
- package/package.json +1 -1
package/dist/money.d.ts
CHANGED
|
@@ -177,6 +177,14 @@ export interface CancelCustomerSubscriptionRequest {
|
|
|
177
177
|
/** Refund the last payment in full; only with `at_period_end` false. */
|
|
178
178
|
refundLastPayment?: boolean;
|
|
179
179
|
}
|
|
180
|
+
export interface CapturePlatformUsageHoldRequest {
|
|
181
|
+
payerOrg?: string;
|
|
182
|
+
service?: string;
|
|
183
|
+
executionKey?: string;
|
|
184
|
+
actualPicousd?: string;
|
|
185
|
+
/** Stable receipt identity (include the provider/account namespace). */
|
|
186
|
+
terminalReceiptKey?: string;
|
|
187
|
+
}
|
|
180
188
|
/**
|
|
181
189
|
* A Catalog is an environment's features, products, and prices: the desired
|
|
182
190
|
* state Money keeps its merchant account's processor objects equal to, by
|
|
@@ -594,6 +602,11 @@ export interface CheckoutSession {
|
|
|
594
602
|
/** When the browser possession proof expires. The existing wire name is retained. */
|
|
595
603
|
readonly claimSecretExpiresAt?: string;
|
|
596
604
|
}
|
|
605
|
+
export interface ClaimPlatformUsageHoldRequest {
|
|
606
|
+
payerOrg?: string;
|
|
607
|
+
service?: string;
|
|
608
|
+
executionKey?: string;
|
|
609
|
+
}
|
|
597
610
|
/** The request of ClientVerifyStorePurchase. */
|
|
598
611
|
export interface ClientVerifyStorePurchaseRequest {
|
|
599
612
|
/** The environment the purchase is verified in. */
|
|
@@ -1749,6 +1762,28 @@ export interface MerchantAccount {
|
|
|
1749
1762
|
/** Fixed, actionable warnings; never Stripe response bodies or credentials. */
|
|
1750
1763
|
readonly processorWarnings?: string[];
|
|
1751
1764
|
}
|
|
1765
|
+
/**
|
|
1766
|
+
* Authority to dispatch and, separately, a deadline to submit the terminal
|
|
1767
|
+
* receipt. Amounts are canonical decimal strings in pico-USD (10^-12 USD).
|
|
1768
|
+
*/
|
|
1769
|
+
export interface PlatformUsageHoldReceipt {
|
|
1770
|
+
name?: string;
|
|
1771
|
+
readonly uid?: string;
|
|
1772
|
+
meta?: common.ResourceMeta;
|
|
1773
|
+
payerOrg?: string;
|
|
1774
|
+
service?: string;
|
|
1775
|
+
executionKey?: string;
|
|
1776
|
+
upperBoundPicousd?: string;
|
|
1777
|
+
dispatchBy?: string;
|
|
1778
|
+
settleBy?: string;
|
|
1779
|
+
/** pending, in_flight, awaiting_settlement (receipt overdue), captured, released, or expired. */
|
|
1780
|
+
state?: string;
|
|
1781
|
+
capturedPicousd?: string;
|
|
1782
|
+
releasedPicousd?: string;
|
|
1783
|
+
/** Present only for a positive capture; this is the only billable journal. */
|
|
1784
|
+
ledgerTransactionId?: string;
|
|
1785
|
+
replayed?: boolean;
|
|
1786
|
+
}
|
|
1752
1787
|
/**
|
|
1753
1788
|
* A Portal Session is a hosted page where a subject manages its
|
|
1754
1789
|
* subscriptions, payment method, and invoices.
|
|
@@ -2004,6 +2039,13 @@ export interface RefundCheckoutSessionResponse {
|
|
|
2004
2039
|
/** The refund receipt, read back from the processor after creation. */
|
|
2005
2040
|
readonly refund?: Refund;
|
|
2006
2041
|
}
|
|
2042
|
+
export interface ReleasePlatformUsageHoldRequest {
|
|
2043
|
+
payerOrg?: string;
|
|
2044
|
+
service?: string;
|
|
2045
|
+
executionKey?: string;
|
|
2046
|
+
/** Required after claim. An unknown dispatch or missing receipt is not proof. */
|
|
2047
|
+
definitiveNoCharge?: boolean;
|
|
2048
|
+
}
|
|
2007
2049
|
/** The request of ReleaseUsageInvoiceCollection. */
|
|
2008
2050
|
export interface ReleaseUsageInvoiceCollectionRequest {
|
|
2009
2051
|
/** The held invoice to release for collection. */
|
|
@@ -2060,6 +2102,15 @@ export interface ReportStorePurchaseUsageResponse {
|
|
|
2060
2102
|
/** The store purchase that was answered. */
|
|
2061
2103
|
storePurchase?: StorePurchase;
|
|
2062
2104
|
}
|
|
2105
|
+
export interface ReservePlatformUsageHoldRequest {
|
|
2106
|
+
payerOrg?: string;
|
|
2107
|
+
service?: string;
|
|
2108
|
+
/** Use a durable, caller-generated platform-hold:<unique-execution-id>. */
|
|
2109
|
+
executionKey?: string;
|
|
2110
|
+
upperBoundPicousd?: string;
|
|
2111
|
+
dispatchBy?: string;
|
|
2112
|
+
settleBy?: string;
|
|
2113
|
+
}
|
|
2063
2114
|
/** Resolves held evidence without altering its original receipt. */
|
|
2064
2115
|
export interface ResolveBankReceiptRequest {
|
|
2065
2116
|
/** Receipt name. */
|
|
@@ -3155,6 +3206,8 @@ export type ProrationBehavior = 'create_prorations' | 'none' | 'always_invoice'
|
|
|
3155
3206
|
* Namespace of Sylphx Money on `Sylphx`.
|
|
3156
3207
|
*/
|
|
3157
3208
|
export declare class MoneyApi {
|
|
3209
|
+
/** The `platform_usage_holds` collection. */
|
|
3210
|
+
readonly platformUsageHolds: PlatformUsageHoldsCollection;
|
|
3158
3211
|
/** The `bank_transfer_accounts` collection. */
|
|
3159
3212
|
readonly bankTransferAccounts: BankTransferAccountsCollection;
|
|
3160
3213
|
/** The `bank_receipts` collection. */
|
|
@@ -3215,6 +3268,43 @@ export declare class MoneyApi {
|
|
|
3215
3268
|
readonly exchangeRates: ExchangeRatesCollection;
|
|
3216
3269
|
constructor(client: runtime.Client);
|
|
3217
3270
|
}
|
|
3271
|
+
/** `platform_usage_holds` of Sylphx Money: Resource type `money.sylphx.com/PlatformUsageHoldReceipt`. */
|
|
3272
|
+
export declare class PlatformUsageHoldsCollection {
|
|
3273
|
+
private readonly client;
|
|
3274
|
+
constructor(client: runtime.Client);
|
|
3275
|
+
/**
|
|
3276
|
+
* ReservePlatformUsageHold is an internal platform service operation.
|
|
3277
|
+
*
|
|
3278
|
+
* `POST /v1/platform_usage_holds:reserve` · permission `money:platform_usage:write` · effect `write`
|
|
3279
|
+
*
|
|
3280
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
3281
|
+
*/
|
|
3282
|
+
reserve(request: ReservePlatformUsageHoldRequest): Promise<PlatformUsageHoldReceipt>;
|
|
3283
|
+
/**
|
|
3284
|
+
* ClaimPlatformUsageHold is an internal platform service operation.
|
|
3285
|
+
*
|
|
3286
|
+
* `POST /v1/platform_usage_holds:claim` · permission `money:platform_usage:write` · effect `write`
|
|
3287
|
+
*
|
|
3288
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
3289
|
+
*/
|
|
3290
|
+
claim(request: ClaimPlatformUsageHoldRequest): Promise<PlatformUsageHoldReceipt>;
|
|
3291
|
+
/**
|
|
3292
|
+
* CapturePlatformUsageHold is an internal platform service operation.
|
|
3293
|
+
*
|
|
3294
|
+
* `POST /v1/platform_usage_holds:capture` · permission `money:platform_usage:write` · effect `write`
|
|
3295
|
+
*
|
|
3296
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
3297
|
+
*/
|
|
3298
|
+
capture(request: CapturePlatformUsageHoldRequest): Promise<PlatformUsageHoldReceipt>;
|
|
3299
|
+
/**
|
|
3300
|
+
* ReleasePlatformUsageHold is an internal platform service operation.
|
|
3301
|
+
*
|
|
3302
|
+
* `POST /v1/platform_usage_holds:release` · permission `money:platform_usage:write` · effect `write`
|
|
3303
|
+
*
|
|
3304
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
3305
|
+
*/
|
|
3306
|
+
release(request: ReleasePlatformUsageHoldRequest): Promise<PlatformUsageHoldReceipt>;
|
|
3307
|
+
}
|
|
3218
3308
|
/** `bank_transfer_accounts` of Sylphx Money: Resource type `money.sylphx.com/BankTransferAccount`. */
|
|
3219
3309
|
export declare class BankTransferAccountsCollection {
|
|
3220
3310
|
private readonly client;
|
package/dist/money.js
CHANGED
|
@@ -61,6 +61,12 @@ runtime.registerSchemas({
|
|
|
61
61
|
['atPeriodEnd', 'at_period_end'],
|
|
62
62
|
['refundLastPayment', 'refund_last_payment'],
|
|
63
63
|
],
|
|
64
|
+
'sylphx.money.v1.CapturePlatformUsageHoldRequest': [
|
|
65
|
+
['payerOrg', 'payer_org'],
|
|
66
|
+
['executionKey', 'execution_key'],
|
|
67
|
+
['actualPicousd', 'actual_picousd'],
|
|
68
|
+
['terminalReceiptKey', 'terminal_receipt_key'],
|
|
69
|
+
],
|
|
64
70
|
'sylphx.money.v1.Catalog': [
|
|
65
71
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
66
72
|
['spec', 'spec', 'sylphx.money.v1.CatalogSpec'],
|
|
@@ -181,6 +187,10 @@ runtime.registerSchemas({
|
|
|
181
187
|
['claimSecret', 'claim_secret'],
|
|
182
188
|
['claimSecretExpiresAt', 'claim_secret_expires_at'],
|
|
183
189
|
],
|
|
190
|
+
'sylphx.money.v1.ClaimPlatformUsageHoldRequest': [
|
|
191
|
+
['payerOrg', 'payer_org'],
|
|
192
|
+
['executionKey', 'execution_key'],
|
|
193
|
+
],
|
|
184
194
|
'sylphx.money.v1.ClientVerifyStorePurchaseRequest': [
|
|
185
195
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
186
196
|
['signedTransaction', 'signed_transaction'],
|
|
@@ -541,6 +551,17 @@ runtime.registerSchemas({
|
|
|
541
551
|
['processorPermissionsCheckTime', 'processor_permissions_check_time'],
|
|
542
552
|
['processorWarnings', 'processor_warnings'],
|
|
543
553
|
],
|
|
554
|
+
'sylphx.money.v1.PlatformUsageHoldReceipt': [
|
|
555
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
556
|
+
['payerOrg', 'payer_org'],
|
|
557
|
+
['executionKey', 'execution_key'],
|
|
558
|
+
['upperBoundPicousd', 'upper_bound_picousd'],
|
|
559
|
+
['dispatchBy', 'dispatch_by'],
|
|
560
|
+
['settleBy', 'settle_by'],
|
|
561
|
+
['capturedPicousd', 'captured_picousd'],
|
|
562
|
+
['releasedPicousd', 'released_picousd'],
|
|
563
|
+
['ledgerTransactionId', 'ledger_transaction_id'],
|
|
564
|
+
],
|
|
544
565
|
'sylphx.money.v1.PortalSession': [
|
|
545
566
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
546
567
|
['subject', 'subject', 'sylphx.money.v1.Subject'],
|
|
@@ -612,6 +633,11 @@ runtime.registerSchemas({
|
|
|
612
633
|
'sylphx.money.v1.RefundCheckoutSessionResponse': [
|
|
613
634
|
['refund', 'refund', 'sylphx.money.v1.Refund'],
|
|
614
635
|
],
|
|
636
|
+
'sylphx.money.v1.ReleasePlatformUsageHoldRequest': [
|
|
637
|
+
['payerOrg', 'payer_org'],
|
|
638
|
+
['executionKey', 'execution_key'],
|
|
639
|
+
['definitiveNoCharge', 'definitive_no_charge'],
|
|
640
|
+
],
|
|
615
641
|
'sylphx.money.v1.ReleaseUsageInvoiceCollectionRequest': [],
|
|
616
642
|
'sylphx.money.v1.ReleaseUsageReservationRequest': [],
|
|
617
643
|
'sylphx.money.v1.ReportStorePurchaseUsageRequest': [
|
|
@@ -626,6 +652,13 @@ runtime.registerSchemas({
|
|
|
626
652
|
['storeConsumptionRequest', 'store_consumption_request', 'sylphx.money.v1.StoreConsumptionRequest'],
|
|
627
653
|
['storePurchase', 'store_purchase', 'sylphx.money.v1.StorePurchase'],
|
|
628
654
|
],
|
|
655
|
+
'sylphx.money.v1.ReservePlatformUsageHoldRequest': [
|
|
656
|
+
['payerOrg', 'payer_org'],
|
|
657
|
+
['executionKey', 'execution_key'],
|
|
658
|
+
['upperBoundPicousd', 'upper_bound_picousd'],
|
|
659
|
+
['dispatchBy', 'dispatch_by'],
|
|
660
|
+
['settleBy', 'settle_by'],
|
|
661
|
+
],
|
|
629
662
|
'sylphx.money.v1.ResolveBankReceiptRequest': [],
|
|
630
663
|
'sylphx.money.v1.ResumeCustomerSubscriptionRequest': [],
|
|
631
664
|
'sylphx.money.v1.RetireLicenceKeyRequest': [],
|
|
@@ -945,6 +978,8 @@ runtime.registerSchemas({
|
|
|
945
978
|
* Namespace of Sylphx Money on `Sylphx`.
|
|
946
979
|
*/
|
|
947
980
|
export class MoneyApi {
|
|
981
|
+
/** The `platform_usage_holds` collection. */
|
|
982
|
+
platformUsageHolds;
|
|
948
983
|
/** The `bank_transfer_accounts` collection. */
|
|
949
984
|
bankTransferAccounts;
|
|
950
985
|
/** The `bank_receipts` collection. */
|
|
@@ -1004,6 +1039,7 @@ export class MoneyApi {
|
|
|
1004
1039
|
/** The `exchange_rates` collection. */
|
|
1005
1040
|
exchangeRates;
|
|
1006
1041
|
constructor(client) {
|
|
1042
|
+
this.platformUsageHolds = new PlatformUsageHoldsCollection(client);
|
|
1007
1043
|
this.bankTransferAccounts = new BankTransferAccountsCollection(client);
|
|
1008
1044
|
this.bankReceipts = new BankReceiptsCollection(client);
|
|
1009
1045
|
this.processorEvents = new ProcessorEventsCollection(client);
|
|
@@ -1035,6 +1071,81 @@ export class MoneyApi {
|
|
|
1035
1071
|
this.exchangeRates = new ExchangeRatesCollection(client);
|
|
1036
1072
|
}
|
|
1037
1073
|
}
|
|
1074
|
+
/** `platform_usage_holds` of Sylphx Money: Resource type `money.sylphx.com/PlatformUsageHoldReceipt`. */
|
|
1075
|
+
export class PlatformUsageHoldsCollection {
|
|
1076
|
+
client;
|
|
1077
|
+
constructor(client) {
|
|
1078
|
+
this.client = client;
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* ReservePlatformUsageHold is an internal platform service operation.
|
|
1082
|
+
*
|
|
1083
|
+
* `POST /v1/platform_usage_holds:reserve` · permission `money:platform_usage:write` · effect `write`
|
|
1084
|
+
*
|
|
1085
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
1086
|
+
*/
|
|
1087
|
+
async reserve(request) {
|
|
1088
|
+
return this.client.call({
|
|
1089
|
+
method: 'POST',
|
|
1090
|
+
path: `/v1/platform_usage_holds:reserve`,
|
|
1091
|
+
body: runtime.omit(request, []),
|
|
1092
|
+
bodyType: 'sylphx.money.v1.ReservePlatformUsageHoldRequest',
|
|
1093
|
+
responseType: 'sylphx.money.v1.PlatformUsageHoldReceipt',
|
|
1094
|
+
mutation: true,
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* ClaimPlatformUsageHold is an internal platform service operation.
|
|
1099
|
+
*
|
|
1100
|
+
* `POST /v1/platform_usage_holds:claim` · permission `money:platform_usage:write` · effect `write`
|
|
1101
|
+
*
|
|
1102
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
1103
|
+
*/
|
|
1104
|
+
async claim(request) {
|
|
1105
|
+
return this.client.call({
|
|
1106
|
+
method: 'POST',
|
|
1107
|
+
path: `/v1/platform_usage_holds:claim`,
|
|
1108
|
+
body: runtime.omit(request, []),
|
|
1109
|
+
bodyType: 'sylphx.money.v1.ClaimPlatformUsageHoldRequest',
|
|
1110
|
+
responseType: 'sylphx.money.v1.PlatformUsageHoldReceipt',
|
|
1111
|
+
mutation: true,
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* CapturePlatformUsageHold is an internal platform service operation.
|
|
1116
|
+
*
|
|
1117
|
+
* `POST /v1/platform_usage_holds:capture` · permission `money:platform_usage:write` · effect `write`
|
|
1118
|
+
*
|
|
1119
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
1120
|
+
*/
|
|
1121
|
+
async capture(request) {
|
|
1122
|
+
return this.client.call({
|
|
1123
|
+
method: 'POST',
|
|
1124
|
+
path: `/v1/platform_usage_holds:capture`,
|
|
1125
|
+
body: runtime.omit(request, []),
|
|
1126
|
+
bodyType: 'sylphx.money.v1.CapturePlatformUsageHoldRequest',
|
|
1127
|
+
responseType: 'sylphx.money.v1.PlatformUsageHoldReceipt',
|
|
1128
|
+
mutation: true,
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* ReleasePlatformUsageHold is an internal platform service operation.
|
|
1133
|
+
*
|
|
1134
|
+
* `POST /v1/platform_usage_holds:release` · permission `money:platform_usage:write` · effect `write`
|
|
1135
|
+
*
|
|
1136
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `FAILED_PRECONDITION`, `IDEMPOTENCY_KEY_REUSED`, `UNAVAILABLE`.
|
|
1137
|
+
*/
|
|
1138
|
+
async release(request) {
|
|
1139
|
+
return this.client.call({
|
|
1140
|
+
method: 'POST',
|
|
1141
|
+
path: `/v1/platform_usage_holds:release`,
|
|
1142
|
+
body: runtime.omit(request, []),
|
|
1143
|
+
bodyType: 'sylphx.money.v1.ReleasePlatformUsageHoldRequest',
|
|
1144
|
+
responseType: 'sylphx.money.v1.PlatformUsageHoldReceipt',
|
|
1145
|
+
mutation: true,
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1038
1149
|
/** `bank_transfer_accounts` of Sylphx Money: Resource type `money.sylphx.com/BankTransferAccount`. */
|
|
1039
1150
|
export class BankTransferAccountsCollection {
|
|
1040
1151
|
client;
|