@01.software/sdk 0.46.0 → 0.48.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/CHANGELOG.md +75 -1
- package/README.md +81 -7
- package/dist/client.cjs +304 -63
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +304 -63
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-DolMjCoC.d.cts → collection-client-CBup9yOx.d.cts} +4 -4
- package/dist/{collection-client-D6kKrYdq.d.ts → collection-client-D3ExJU-7.d.ts} +4 -4
- package/dist/{const-BAG0MH0u.d.cts → const-BXEi1Kix.d.cts} +4 -4
- package/dist/{const-CaPq2AE4.d.ts → const-k9gHylYa.d.ts} +4 -4
- package/dist/errors.cjs +49 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +3 -3
- package/dist/errors.d.ts +3 -3
- package/dist/errors.js +49 -1
- package/dist/errors.js.map +1 -1
- package/dist/{index-YGrZrxNn.d.cts → index-BCM9CTL7.d.cts} +3 -3
- package/dist/{index-BNICJxBL.d.ts → index-CHGGkcLj.d.ts} +3 -3
- package/dist/index.cjs +308 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +308 -64
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-CJZuXcgF.d.cts → payload-types-B6AZQcB7.d.cts} +182 -15
- package/dist/{payload-types-CJZuXcgF.d.ts → payload-types-B6AZQcB7.d.ts} +182 -15
- package/dist/query.cjs +144 -43
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +144 -43
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +385 -63
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +385 -63
- package/dist/server.js.map +1 -1
- package/dist/storefront-cache.cjs +49 -1
- package/dist/storefront-cache.cjs.map +1 -1
- package/dist/storefront-cache.js +49 -1
- package/dist/storefront-cache.js.map +1 -1
- package/dist/{types-D5p7-m1l.d.cts → types-8us-_C-Q.d.cts} +2 -2
- package/dist/{types-BC6rVmJa.d.ts → types-ByD2zii1.d.ts} +2 -2
- package/dist/{types-xlqBeW2N.d.cts → types-CM2je9Kw.d.cts} +84 -7
- package/dist/{types-C60vHIkY.d.ts → types-DbA5V3mt.d.ts} +84 -7
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/package.json +6 -6
|
@@ -71,6 +71,8 @@ interface Config {
|
|
|
71
71
|
'payment-kernel-operations': PaymentKernelOperation;
|
|
72
72
|
'payment-kernel-operation-attempts': PaymentKernelOperationAttempt;
|
|
73
73
|
'payment-kernel-financial-movements': PaymentKernelFinancialMovement;
|
|
74
|
+
'payment-kernel-provider-receipts': PaymentKernelProviderReceipt;
|
|
75
|
+
'payment-kernel-reconciliation-cases': PaymentKernelReconciliationCase;
|
|
74
76
|
'order-status-logs': OrderStatusLog;
|
|
75
77
|
'inventory-reservations': InventoryReservation;
|
|
76
78
|
'fulfillment-orders': FulfillmentOrder;
|
|
@@ -302,6 +304,8 @@ interface Config {
|
|
|
302
304
|
'payment-kernel-operations': PaymentKernelOperationsSelect<false> | PaymentKernelOperationsSelect<true>;
|
|
303
305
|
'payment-kernel-operation-attempts': PaymentKernelOperationAttemptsSelect<false> | PaymentKernelOperationAttemptsSelect<true>;
|
|
304
306
|
'payment-kernel-financial-movements': PaymentKernelFinancialMovementsSelect<false> | PaymentKernelFinancialMovementsSelect<true>;
|
|
307
|
+
'payment-kernel-provider-receipts': PaymentKernelProviderReceiptsSelect<false> | PaymentKernelProviderReceiptsSelect<true>;
|
|
308
|
+
'payment-kernel-reconciliation-cases': PaymentKernelReconciliationCasesSelect<false> | PaymentKernelReconciliationCasesSelect<true>;
|
|
305
309
|
'order-status-logs': OrderStatusLogsSelect<false> | OrderStatusLogsSelect<true>;
|
|
306
310
|
'inventory-reservations': InventoryReservationsSelect<false> | InventoryReservationsSelect<true>;
|
|
307
311
|
'fulfillment-orders': FulfillmentOrdersSelect<false> | FulfillmentOrdersSelect<true>;
|
|
@@ -606,6 +610,14 @@ interface Tenant {
|
|
|
606
610
|
id: string;
|
|
607
611
|
webhookPurgeFencedAt?: string | null;
|
|
608
612
|
name: string;
|
|
613
|
+
/**
|
|
614
|
+
* TEST is a time-limited space with separate data and keys and no external effects.
|
|
615
|
+
*/
|
|
616
|
+
tenantPurpose?: ('production' | 'test') | null;
|
|
617
|
+
/**
|
|
618
|
+
* A TEST tenant can be used for at most 30 days from creation.
|
|
619
|
+
*/
|
|
620
|
+
testExpiresAt?: string | null;
|
|
609
621
|
/**
|
|
610
622
|
* URL-safe identifier (auto-generated)
|
|
611
623
|
*/
|
|
@@ -2933,7 +2945,7 @@ interface ShippingPolicy {
|
|
|
2933
2945
|
*/
|
|
2934
2946
|
baseAmount?: number | null;
|
|
2935
2947
|
/**
|
|
2936
|
-
* Read-only rollout field.
|
|
2948
|
+
* Read-only rollout field. Set up free shipping with an order-amount rate row priced at 0, or with an automatic free_shipping discount that sets a minimum order amount. When you use a rate row, cap the existing paid row with Max Amount so both rows never apply together.
|
|
2937
2949
|
*/
|
|
2938
2950
|
freeShippingMinAmount?: number | null;
|
|
2939
2951
|
rates?: {
|
|
@@ -2975,7 +2987,13 @@ interface ShippingPolicy {
|
|
|
2975
2987
|
* Estimated delivery days
|
|
2976
2988
|
*/
|
|
2977
2989
|
estimatedDays?: number | null;
|
|
2990
|
+
/**
|
|
2991
|
+
* When off, this policy is skipped and orders price against the default shipping policy.
|
|
2992
|
+
*/
|
|
2978
2993
|
isActive?: boolean | null;
|
|
2994
|
+
/**
|
|
2995
|
+
* Checking this clears the current default policy. Orders without an explicit policy and newly created products follow this one.
|
|
2996
|
+
*/
|
|
2979
2997
|
isDefault?: boolean | null;
|
|
2980
2998
|
metadata?: {
|
|
2981
2999
|
[k: string]: unknown;
|
|
@@ -3395,14 +3413,26 @@ interface Discount {
|
|
|
3395
3413
|
* Amount in KRW (won)
|
|
3396
3414
|
*/
|
|
3397
3415
|
maxDiscountAmount?: number | null;
|
|
3416
|
+
/**
|
|
3417
|
+
* Start of the validity window (empty = starts immediately)
|
|
3418
|
+
*/
|
|
3398
3419
|
startsAt?: string | null;
|
|
3420
|
+
/**
|
|
3421
|
+
* End of the validity window. Must be after the start; empty = never ends.
|
|
3422
|
+
*/
|
|
3399
3423
|
endsAt?: string | null;
|
|
3400
3424
|
customerSelection?: {
|
|
3425
|
+
/**
|
|
3426
|
+
* Choosing Included or Excluded requires at least one target below.
|
|
3427
|
+
*/
|
|
3401
3428
|
type?: ('all' | 'included' | 'excluded') | null;
|
|
3402
3429
|
customers?: (string | Customer)[] | null;
|
|
3403
3430
|
customerGroups?: (string | CustomerGroup)[] | null;
|
|
3404
3431
|
};
|
|
3405
3432
|
productSelection?: {
|
|
3433
|
+
/**
|
|
3434
|
+
* Choosing Included or Excluded requires at least one target below.
|
|
3435
|
+
*/
|
|
3406
3436
|
type?: ('all' | 'included' | 'excluded') | null;
|
|
3407
3437
|
products?: (string | Product)[] | null;
|
|
3408
3438
|
collections?: (string | ProductCollection)[] | null;
|
|
@@ -3416,7 +3446,7 @@ interface Discount {
|
|
|
3416
3446
|
*/
|
|
3417
3447
|
pricingMarket?: (string | null) | Market;
|
|
3418
3448
|
/**
|
|
3419
|
-
* Total usage limit (empty = unlimited)
|
|
3449
|
+
* Total usage limit (1 or more, empty = unlimited)
|
|
3420
3450
|
*/
|
|
3421
3451
|
maxUses?: number | null;
|
|
3422
3452
|
/**
|
|
@@ -3424,7 +3454,7 @@ interface Discount {
|
|
|
3424
3454
|
*/
|
|
3425
3455
|
usesCount?: number | null;
|
|
3426
3456
|
/**
|
|
3427
|
-
* Usage limit per customer (empty = unlimited)
|
|
3457
|
+
* Usage limit per customer (1 or more, empty = unlimited)
|
|
3428
3458
|
*/
|
|
3429
3459
|
maxUsesPerCustomer?: number | null;
|
|
3430
3460
|
/**
|
|
@@ -3435,6 +3465,9 @@ interface Discount {
|
|
|
3435
3465
|
* Allow combining with other discounts
|
|
3436
3466
|
*/
|
|
3437
3467
|
isCombinable?: boolean | null;
|
|
3468
|
+
/**
|
|
3469
|
+
* Only across-order allocation is supported. Each-line-item is always rejected at checkout and cannot be saved.
|
|
3470
|
+
*/
|
|
3438
3471
|
allocationMethod?: ('across' | 'each') | null;
|
|
3439
3472
|
/**
|
|
3440
3473
|
* Discount priority (higher = first)
|
|
@@ -3505,7 +3538,15 @@ interface PaymentSession {
|
|
|
3505
3538
|
*/
|
|
3506
3539
|
slotState: 'held' | 'reconciling' | 'released' | 'spent';
|
|
3507
3540
|
provider: string;
|
|
3541
|
+
/**
|
|
3542
|
+
* Internal execution provenance for managed adapters and the custom bridge.
|
|
3543
|
+
*/
|
|
3544
|
+
sessionOrigin?: ('managed_adapter' | 'custom_bridge') | null;
|
|
3508
3545
|
providerSessionId: string;
|
|
3546
|
+
/**
|
|
3547
|
+
* Provider Hosted URL exposed only through an ownership-checked PaymentSession response.
|
|
3548
|
+
*/
|
|
3549
|
+
providerActionUrl?: string | null;
|
|
3509
3550
|
providerAccount?: (string | null) | CommercePaymentAccount;
|
|
3510
3551
|
credentialVersion?: number | null;
|
|
3511
3552
|
environment?: string | null;
|
|
@@ -3561,6 +3602,8 @@ interface PaymentSession {
|
|
|
3561
3602
|
deletedAt?: string | null;
|
|
3562
3603
|
}
|
|
3563
3604
|
/**
|
|
3605
|
+
* Connect a Toss Payments or PortOne account and register its payment credentials.
|
|
3606
|
+
*
|
|
3564
3607
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
3565
3608
|
* via the `definition` "commerce-payment-accounts".
|
|
3566
3609
|
*/
|
|
@@ -3573,26 +3616,51 @@ interface CommercePaymentAccount {
|
|
|
3573
3616
|
*/
|
|
3574
3617
|
profileName: string;
|
|
3575
3618
|
/**
|
|
3576
|
-
*
|
|
3619
|
+
* Provider account identity, immutable after registration (Toss mId / PortOne storeId).
|
|
3577
3620
|
*/
|
|
3578
3621
|
providerAccountKey: string;
|
|
3579
3622
|
environment: 'test' | 'live';
|
|
3580
3623
|
markets: (string | Market)[];
|
|
3581
3624
|
tossConfiguration?: {
|
|
3625
|
+
/**
|
|
3626
|
+
* Toss client key. Must use the test_ / live_ prefix matching the registered environment.
|
|
3627
|
+
*/
|
|
3582
3628
|
clientKey: string;
|
|
3583
3629
|
secretKey?: string | null;
|
|
3630
|
+
/**
|
|
3631
|
+
* Encrypted on save and never shown again. Leave blank to keep the registered key.
|
|
3632
|
+
*/
|
|
3633
|
+
secretKeyInput?: string | null;
|
|
3634
|
+
/**
|
|
3635
|
+
* Toss payment widget payment-method UI key (e.g. DEFAULT).
|
|
3636
|
+
*/
|
|
3584
3637
|
paymentMethodVariantKey: string;
|
|
3638
|
+
/**
|
|
3639
|
+
* Toss payment widget agreement UI key (e.g. AGREEMENT).
|
|
3640
|
+
*/
|
|
3585
3641
|
agreementVariantKey: string;
|
|
3586
3642
|
paymentMethodPolicy: 'instant_only';
|
|
3587
3643
|
};
|
|
3588
3644
|
portOneConfiguration?: {
|
|
3589
3645
|
apiSecret?: string | null;
|
|
3646
|
+
/**
|
|
3647
|
+
* Encrypted on save and never shown again. Leave blank to keep the registered secret.
|
|
3648
|
+
*/
|
|
3649
|
+
apiSecretInput?: string | null;
|
|
3650
|
+
webhookSecret?: string | null;
|
|
3651
|
+
/**
|
|
3652
|
+
* Encrypted on save and never shown again. Leave blank to keep the registered secret.
|
|
3653
|
+
*/
|
|
3654
|
+
webhookSecretInput?: string | null;
|
|
3655
|
+
/**
|
|
3656
|
+
* PortOne channel/store profile key.
|
|
3657
|
+
*/
|
|
3590
3658
|
profileKey: string;
|
|
3591
3659
|
/**
|
|
3592
3660
|
* Hosted Payment Session country (ISO 3166-1 alpha-2 uppercase).
|
|
3593
3661
|
*/
|
|
3594
3662
|
country: string;
|
|
3595
|
-
allowedPaymentMethods: ('CARD_KR' | 'N_PAY' | 'KAKAO_PAY' | 'TOSS_PAY')[];
|
|
3663
|
+
allowedPaymentMethods: ('CARD_KR' | 'N_PAY' | 'KAKAO_PAY' | 'TOSS_PAY' | 'CARD_INTERNATIONAL' | 'PAY_PAL' | 'UNION_PAY' | 'ALIPAY_CN' | 'ALIPAY_HK' | 'TRUE_MONEY' | 'DANA' | 'TOUCH_N_GO' | 'G_CASH' | 'WE_CHAT_PAY' | 'KLARNA' | 'E_CONTEXT' | 'GRAB_PAY_MY' | 'GRAB_PAY_SG' | 'SHOPEE_PAY_TH' | 'PAY_PAY' | 'BPI' | 'RABBIT_LINE_PAY' | 'CONVENIENCE_STORE_JP' | 'AMAZON_PAY' | 'RAKUTEN_PAY' | 'D_BARAI' | 'AU_PAY' | 'MERPAY')[];
|
|
3596
3664
|
};
|
|
3597
3665
|
/**
|
|
3598
3666
|
* When enabled, this connection is eligible for new PaymentSessions.
|
|
@@ -5837,17 +5905,68 @@ interface PaymentKernelFinancialMovement {
|
|
|
5837
5905
|
tenant?: (string | null) | Tenant;
|
|
5838
5906
|
operation: string | PaymentKernelOperation;
|
|
5839
5907
|
providerObjectIdentity: string | PaymentKernelProviderObjectIdentity;
|
|
5840
|
-
movementKind: 'capture_confirmed' | 'refund_reservation' | 'refund_confirmed' | 'refund_reservation_release';
|
|
5908
|
+
movementKind: 'capture_confirmed' | 'refund_reservation' | 'refund_confirmed' | 'refund_reservation_release' | 'dispute_loss' | 'reversal' | 'fee' | 'adjustment' | 'settled';
|
|
5841
5909
|
movementIdentity: string;
|
|
5842
5910
|
reservationMovement?: (string | null) | PaymentKernelFinancialMovement;
|
|
5843
5911
|
terminalAttempt?: (string | null) | PaymentKernelOperationAttempt;
|
|
5844
5912
|
definitivelyFailedAttempt?: (string | null) | PaymentKernelOperationAttempt;
|
|
5913
|
+
providerReceipt?: (string | null) | PaymentKernelProviderReceipt;
|
|
5845
5914
|
amount: number;
|
|
5846
5915
|
currency: string;
|
|
5847
5916
|
effectiveAt: string;
|
|
5848
5917
|
updatedAt: string;
|
|
5849
5918
|
createdAt: string;
|
|
5850
5919
|
}
|
|
5920
|
+
/**
|
|
5921
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
5922
|
+
* via the `definition` "payment-kernel-provider-receipts".
|
|
5923
|
+
*/
|
|
5924
|
+
interface PaymentKernelProviderReceipt {
|
|
5925
|
+
id: string;
|
|
5926
|
+
tenant?: (string | null) | Tenant;
|
|
5927
|
+
provider: string;
|
|
5928
|
+
providerAccountKey: string;
|
|
5929
|
+
environment: 'test' | 'live';
|
|
5930
|
+
providerConnection: string | PaymentKernelProviderConnection;
|
|
5931
|
+
credentialGeneration: string | PaymentKernelCredentialGeneration;
|
|
5932
|
+
providerObjectIdentity?: (string | null) | PaymentKernelProviderObjectIdentity;
|
|
5933
|
+
eventKind: string;
|
|
5934
|
+
eventId: string;
|
|
5935
|
+
bodyHash: string;
|
|
5936
|
+
rawPayload?: string | null;
|
|
5937
|
+
authenticatedAt: string;
|
|
5938
|
+
rawPayloadRetainedUntil: string;
|
|
5939
|
+
rawPayloadRedactedAt?: string | null;
|
|
5940
|
+
state: 'authenticated' | 'conflicting';
|
|
5941
|
+
updatedAt: string;
|
|
5942
|
+
createdAt: string;
|
|
5943
|
+
}
|
|
5944
|
+
/**
|
|
5945
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
5946
|
+
* via the `definition` "payment-kernel-reconciliation-cases".
|
|
5947
|
+
*/
|
|
5948
|
+
interface PaymentKernelReconciliationCase {
|
|
5949
|
+
id: string;
|
|
5950
|
+
tenant?: (string | null) | Tenant;
|
|
5951
|
+
provider: string;
|
|
5952
|
+
providerAccountKey: string;
|
|
5953
|
+
environment: 'test' | 'live';
|
|
5954
|
+
providerConnection: string | PaymentKernelProviderConnection;
|
|
5955
|
+
currency: string;
|
|
5956
|
+
periodStart: string;
|
|
5957
|
+
periodEnd: string;
|
|
5958
|
+
exceptionIdentity: string;
|
|
5959
|
+
capturedPrincipal: number;
|
|
5960
|
+
refundedPrincipal: number;
|
|
5961
|
+
disputeLoss: number;
|
|
5962
|
+
adjustments: number;
|
|
5963
|
+
fees: number;
|
|
5964
|
+
expectedSettledNet: number;
|
|
5965
|
+
reportedSettledNet: number;
|
|
5966
|
+
state: 'open' | 'reconciled';
|
|
5967
|
+
updatedAt: string;
|
|
5968
|
+
createdAt: string;
|
|
5969
|
+
}
|
|
5851
5970
|
/**
|
|
5852
5971
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
5853
5972
|
* via the `definition` "order-status-logs".
|
|
@@ -8397,9 +8516,6 @@ interface Form {
|
|
|
8397
8516
|
blockType: 'textarea';
|
|
8398
8517
|
})[] | null;
|
|
8399
8518
|
submitButtonLabel?: string | null;
|
|
8400
|
-
/**
|
|
8401
|
-
* Choose whether to display an on-page message or redirect to a different page after they submit the form.
|
|
8402
|
-
*/
|
|
8403
8519
|
confirmationType?: ('message' | 'redirect') | null;
|
|
8404
8520
|
confirmationMessage?: {
|
|
8405
8521
|
root: {
|
|
@@ -8419,9 +8535,6 @@ interface Form {
|
|
|
8419
8535
|
redirect?: {
|
|
8420
8536
|
url: string;
|
|
8421
8537
|
};
|
|
8422
|
-
/**
|
|
8423
|
-
* Send custom emails when the form submits. Use comma separated lists to send the same email to multiple recipients. To reference a value from this form, wrap that field's name with double curly brackets, i.e. {{firstName}}. You can use a wildcard {{*}} to output all data and {{*:table}} to format it as an HTML table in the email.
|
|
8424
|
-
*/
|
|
8425
8538
|
emails?: {
|
|
8426
8539
|
emailTo?: string | null;
|
|
8427
8540
|
cc?: string | null;
|
|
@@ -8429,9 +8542,6 @@ interface Form {
|
|
|
8429
8542
|
replyTo?: string | null;
|
|
8430
8543
|
emailFrom?: string | null;
|
|
8431
8544
|
subject: string;
|
|
8432
|
-
/**
|
|
8433
|
-
* Enter the message that should be sent in this email.
|
|
8434
|
-
*/
|
|
8435
8545
|
message?: {
|
|
8436
8546
|
root: {
|
|
8437
8547
|
type: string;
|
|
@@ -8897,6 +9007,8 @@ interface WebhookOutboxDeliveriesSelect<T extends boolean = true> {
|
|
|
8897
9007
|
interface TenantsSelect<T extends boolean = true> {
|
|
8898
9008
|
webhookPurgeFencedAt?: T;
|
|
8899
9009
|
name?: T;
|
|
9010
|
+
tenantPurpose?: T;
|
|
9011
|
+
testExpiresAt?: T;
|
|
8900
9012
|
slug?: T;
|
|
8901
9013
|
previewDestinations?: T | {
|
|
8902
9014
|
origin?: T;
|
|
@@ -10223,7 +10335,9 @@ interface PaymentSessionsSelect<T extends boolean = true> {
|
|
|
10223
10335
|
finalizationStatus?: T;
|
|
10224
10336
|
slotState?: T;
|
|
10225
10337
|
provider?: T;
|
|
10338
|
+
sessionOrigin?: T;
|
|
10226
10339
|
providerSessionId?: T;
|
|
10340
|
+
providerActionUrl?: T;
|
|
10227
10341
|
providerAccount?: T;
|
|
10228
10342
|
credentialVersion?: T;
|
|
10229
10343
|
environment?: T;
|
|
@@ -10519,12 +10633,61 @@ interface PaymentKernelFinancialMovementsSelect<T extends boolean = true> {
|
|
|
10519
10633
|
reservationMovement?: T;
|
|
10520
10634
|
terminalAttempt?: T;
|
|
10521
10635
|
definitivelyFailedAttempt?: T;
|
|
10636
|
+
providerReceipt?: T;
|
|
10522
10637
|
amount?: T;
|
|
10523
10638
|
currency?: T;
|
|
10524
10639
|
effectiveAt?: T;
|
|
10525
10640
|
updatedAt?: T;
|
|
10526
10641
|
createdAt?: T;
|
|
10527
10642
|
}
|
|
10643
|
+
/**
|
|
10644
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
10645
|
+
* via the `definition` "payment-kernel-provider-receipts_select".
|
|
10646
|
+
*/
|
|
10647
|
+
interface PaymentKernelProviderReceiptsSelect<T extends boolean = true> {
|
|
10648
|
+
tenant?: T;
|
|
10649
|
+
provider?: T;
|
|
10650
|
+
providerAccountKey?: T;
|
|
10651
|
+
environment?: T;
|
|
10652
|
+
providerConnection?: T;
|
|
10653
|
+
credentialGeneration?: T;
|
|
10654
|
+
providerObjectIdentity?: T;
|
|
10655
|
+
eventKind?: T;
|
|
10656
|
+
eventId?: T;
|
|
10657
|
+
bodyHash?: T;
|
|
10658
|
+
rawPayload?: T;
|
|
10659
|
+
authenticatedAt?: T;
|
|
10660
|
+
rawPayloadRetainedUntil?: T;
|
|
10661
|
+
rawPayloadRedactedAt?: T;
|
|
10662
|
+
state?: T;
|
|
10663
|
+
updatedAt?: T;
|
|
10664
|
+
createdAt?: T;
|
|
10665
|
+
}
|
|
10666
|
+
/**
|
|
10667
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
10668
|
+
* via the `definition` "payment-kernel-reconciliation-cases_select".
|
|
10669
|
+
*/
|
|
10670
|
+
interface PaymentKernelReconciliationCasesSelect<T extends boolean = true> {
|
|
10671
|
+
tenant?: T;
|
|
10672
|
+
provider?: T;
|
|
10673
|
+
providerAccountKey?: T;
|
|
10674
|
+
environment?: T;
|
|
10675
|
+
providerConnection?: T;
|
|
10676
|
+
currency?: T;
|
|
10677
|
+
periodStart?: T;
|
|
10678
|
+
periodEnd?: T;
|
|
10679
|
+
exceptionIdentity?: T;
|
|
10680
|
+
capturedPrincipal?: T;
|
|
10681
|
+
refundedPrincipal?: T;
|
|
10682
|
+
disputeLoss?: T;
|
|
10683
|
+
adjustments?: T;
|
|
10684
|
+
fees?: T;
|
|
10685
|
+
expectedSettledNet?: T;
|
|
10686
|
+
reportedSettledNet?: T;
|
|
10687
|
+
state?: T;
|
|
10688
|
+
updatedAt?: T;
|
|
10689
|
+
createdAt?: T;
|
|
10690
|
+
}
|
|
10528
10691
|
/**
|
|
10529
10692
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
10530
10693
|
* via the `definition` "order-status-logs_select".
|
|
@@ -12843,12 +13006,16 @@ interface CommercePaymentAccountsSelect<T extends boolean = true> {
|
|
|
12843
13006
|
tossConfiguration?: T | {
|
|
12844
13007
|
clientKey?: T;
|
|
12845
13008
|
secretKey?: T;
|
|
13009
|
+
secretKeyInput?: T;
|
|
12846
13010
|
paymentMethodVariantKey?: T;
|
|
12847
13011
|
agreementVariantKey?: T;
|
|
12848
13012
|
paymentMethodPolicy?: T;
|
|
12849
13013
|
};
|
|
12850
13014
|
portOneConfiguration?: T | {
|
|
12851
13015
|
apiSecret?: T;
|
|
13016
|
+
apiSecretInput?: T;
|
|
13017
|
+
webhookSecret?: T;
|
|
13018
|
+
webhookSecretInput?: T;
|
|
12852
13019
|
profileKey?: T;
|
|
12853
13020
|
country?: T;
|
|
12854
13021
|
allowedPaymentMethods?: T;
|
package/dist/query.cjs
CHANGED
|
@@ -540,34 +540,78 @@ var SDKError = class extends Error {
|
|
|
540
540
|
};
|
|
541
541
|
var COMMERCE_ERROR_CODES = [
|
|
542
542
|
"validation_failed",
|
|
543
|
+
"bad_request",
|
|
543
544
|
"unauthorized",
|
|
544
545
|
"forbidden",
|
|
546
|
+
"account_suspended",
|
|
547
|
+
"key_invalid",
|
|
548
|
+
"pat_tenant_header_forbidden",
|
|
549
|
+
"tenant_mismatch",
|
|
550
|
+
"test_tenant_expired",
|
|
551
|
+
"token_invalid",
|
|
545
552
|
"token_expired",
|
|
546
553
|
"origin_not_allowed",
|
|
547
554
|
"server_credentials_required",
|
|
555
|
+
"role_denied",
|
|
556
|
+
"scope_denied",
|
|
557
|
+
"feature_disabled",
|
|
548
558
|
"not_found",
|
|
549
559
|
"conflict",
|
|
560
|
+
"locked",
|
|
550
561
|
"cart_revision_conflict",
|
|
551
562
|
"rate_limit_exceeded",
|
|
552
563
|
"usage_limit_exceeded",
|
|
553
564
|
"service_unavailable",
|
|
554
565
|
"idempotency_conflict",
|
|
555
566
|
"idempotency_in_progress",
|
|
567
|
+
"idempotency_key_required",
|
|
568
|
+
"invalid_idempotency_key",
|
|
556
569
|
"cart_not_active",
|
|
557
570
|
"cart_locked",
|
|
558
571
|
"cart_empty",
|
|
559
572
|
"cart_market_unavailable",
|
|
560
573
|
"cart_market_mismatch",
|
|
561
574
|
"checkout_not_open",
|
|
575
|
+
"checkout_already_open",
|
|
562
576
|
"payment_slot_held",
|
|
563
577
|
"reservation_expired",
|
|
564
578
|
"payment_session_not_cancelable",
|
|
579
|
+
"payment_session_conflict",
|
|
565
580
|
"provider_identity_mismatch",
|
|
581
|
+
"payment_method_unavailable",
|
|
566
582
|
"provider_unavailable",
|
|
567
583
|
"lock_timeout",
|
|
568
584
|
"price_changed",
|
|
569
585
|
"pricing_fact_in_use",
|
|
570
586
|
"insufficient_stock",
|
|
587
|
+
"reservation_conflict",
|
|
588
|
+
"stock_lock_unavailable",
|
|
589
|
+
"variant_not_found",
|
|
590
|
+
"variant_stock_write_failed",
|
|
591
|
+
"stock_invariant_violation",
|
|
592
|
+
"payment_confirmation_in_flight",
|
|
593
|
+
"checkout_reservation_release_requires_transaction",
|
|
594
|
+
"admission_metadata_invalid",
|
|
595
|
+
"admission_metadata_required",
|
|
596
|
+
"capacity_exceeded",
|
|
597
|
+
"occurrence_lock_unavailable",
|
|
598
|
+
"occurrence_not_open",
|
|
599
|
+
"admission_type_capacity_exceeded",
|
|
600
|
+
"admission_type_occurrence_mismatch",
|
|
601
|
+
"admission_hold_expired",
|
|
602
|
+
"admission_hold_checkout_item_conflict",
|
|
603
|
+
"admission_hold_checkout_conflict",
|
|
604
|
+
"admission_hold_quantity_mismatch",
|
|
605
|
+
"admission_hold_unbound",
|
|
606
|
+
"admission_hold_missing",
|
|
607
|
+
"admission_hold_checkout_item_missing",
|
|
608
|
+
"admission_hold_expiry_failed",
|
|
609
|
+
"admission_hold_expiry_requires_transaction",
|
|
610
|
+
"admission_hold_line_item_mismatch",
|
|
611
|
+
"admission_materialization_failed",
|
|
612
|
+
"variant_inactive",
|
|
613
|
+
"variant_product_mismatch",
|
|
614
|
+
"product_not_public",
|
|
571
615
|
"market_not_found",
|
|
572
616
|
"market_shipping_currency_unsupported",
|
|
573
617
|
"missing_market_rate",
|
|
@@ -592,7 +636,11 @@ var COMMERCE_ERROR_CODES = [
|
|
|
592
636
|
"discount_min_order_amount",
|
|
593
637
|
"discount_currency_scope_required",
|
|
594
638
|
"discount_allocation_method_unsupported",
|
|
595
|
-
"currency_mismatch"
|
|
639
|
+
"currency_mismatch",
|
|
640
|
+
"customer_token_required",
|
|
641
|
+
"market_required",
|
|
642
|
+
"server_derived",
|
|
643
|
+
"internal_error"
|
|
596
644
|
];
|
|
597
645
|
var COMMERCE_ERROR_CODE_SET = new Set(
|
|
598
646
|
COMMERCE_ERROR_CODES
|
|
@@ -757,12 +805,14 @@ function listingPageSearchParams(options) {
|
|
|
757
805
|
|
|
758
806
|
// ../../internal/http-contracts/src/index.ts
|
|
759
807
|
var operationBrand = /* @__PURE__ */ Symbol("sdk-http-operation");
|
|
760
|
-
var operation = (collection, method, path) => Object.freeze({
|
|
808
|
+
var operation = (collection, method, path, errorFamily) => Object.freeze({
|
|
761
809
|
[operationBrand]: true,
|
|
762
810
|
collection,
|
|
763
811
|
method,
|
|
764
|
-
path
|
|
812
|
+
path,
|
|
813
|
+
...errorFamily && { errorFamily }
|
|
765
814
|
});
|
|
815
|
+
var strictCommerceOperation = (collection, method, path) => operation(collection, method, path, "commerce");
|
|
766
816
|
var COMMERCE_ENDPOINT_OPERATIONS = {
|
|
767
817
|
products: {
|
|
768
818
|
detail: operation("products", "get", "/detail"),
|
|
@@ -795,13 +845,13 @@ var COMMERCE_ENDPOINT_OPERATIONS = {
|
|
|
795
845
|
byPayment: operation("orders", "get", "/by-payment"),
|
|
796
846
|
cancel: operation("orders", "post", "/cancel"),
|
|
797
847
|
resolveCancelRefund: operation("orders", "post", "/resolve-cancel-refund"),
|
|
798
|
-
checkout:
|
|
848
|
+
checkout: strictCommerceOperation("orders", "post", "/checkout"),
|
|
799
849
|
createFulfillment: operation("orders", "post", "/create-fulfillment"),
|
|
800
850
|
updateFulfillment: operation("orders", "post", "/update-fulfillment")
|
|
801
851
|
},
|
|
802
852
|
checkouts: {
|
|
803
|
-
detail:
|
|
804
|
-
query:
|
|
853
|
+
detail: strictCommerceOperation("checkouts", "post", "/detail"),
|
|
854
|
+
query: strictCommerceOperation("checkouts", "post", "/query")
|
|
805
855
|
},
|
|
806
856
|
transactions: {
|
|
807
857
|
update: operation("transactions", "post", "/update")
|
|
@@ -822,29 +872,58 @@ var COMMERCE_ENDPOINT_OPERATIONS = {
|
|
|
822
872
|
bulkImport: operation("fulfillments", "post", "/bulk-import")
|
|
823
873
|
},
|
|
824
874
|
carts: {
|
|
825
|
-
create:
|
|
826
|
-
retrieve:
|
|
827
|
-
mine:
|
|
828
|
-
merge:
|
|
829
|
-
addItem:
|
|
830
|
-
updateItem:
|
|
831
|
-
removeItem:
|
|
832
|
-
updateDiscountCodes:
|
|
833
|
-
|
|
834
|
-
|
|
875
|
+
create: strictCommerceOperation("carts", "post", "/create"),
|
|
876
|
+
retrieve: strictCommerceOperation("carts", "post", "/retrieve"),
|
|
877
|
+
mine: strictCommerceOperation("carts", "post", "/mine"),
|
|
878
|
+
merge: strictCommerceOperation("carts", "post", "/merge"),
|
|
879
|
+
addItem: strictCommerceOperation("carts", "post", "/add-item"),
|
|
880
|
+
updateItem: strictCommerceOperation("carts", "post", "/update-item"),
|
|
881
|
+
removeItem: strictCommerceOperation("carts", "post", "/remove-item"),
|
|
882
|
+
updateDiscountCodes: strictCommerceOperation(
|
|
883
|
+
"carts",
|
|
884
|
+
"post",
|
|
885
|
+
"/update-discount-codes"
|
|
886
|
+
),
|
|
887
|
+
updateAttributes: strictCommerceOperation(
|
|
888
|
+
"carts",
|
|
889
|
+
"post",
|
|
890
|
+
"/update-attributes"
|
|
891
|
+
),
|
|
892
|
+
clear: strictCommerceOperation("carts", "post", "/clear")
|
|
835
893
|
},
|
|
836
894
|
paymentSessions: {
|
|
837
|
-
create:
|
|
838
|
-
retrieve:
|
|
839
|
-
cancel:
|
|
895
|
+
create: strictCommerceOperation("payment-sessions", "post", "/create"),
|
|
896
|
+
retrieve: strictCommerceOperation("payment-sessions", "post", "/retrieve"),
|
|
897
|
+
cancel: strictCommerceOperation("payment-sessions", "post", "/cancel"),
|
|
840
898
|
server: {
|
|
841
|
-
create:
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
899
|
+
create: strictCommerceOperation(
|
|
900
|
+
"payment-sessions",
|
|
901
|
+
"post",
|
|
902
|
+
"/server/create"
|
|
903
|
+
),
|
|
904
|
+
retrieve: strictCommerceOperation(
|
|
905
|
+
"payment-sessions",
|
|
906
|
+
"post",
|
|
907
|
+
"/server/retrieve"
|
|
908
|
+
),
|
|
909
|
+
cancel: strictCommerceOperation(
|
|
910
|
+
"payment-sessions",
|
|
911
|
+
"post",
|
|
912
|
+
"/server/cancel"
|
|
913
|
+
),
|
|
914
|
+
confirm: strictCommerceOperation(
|
|
915
|
+
"payment-sessions",
|
|
916
|
+
"post",
|
|
917
|
+
"/server/confirm"
|
|
918
|
+
)
|
|
845
919
|
},
|
|
846
920
|
custom: {
|
|
847
921
|
create: operation("orders", "post", "/custom-payment-sessions"),
|
|
922
|
+
retrieve: operation(
|
|
923
|
+
"orders",
|
|
924
|
+
"post",
|
|
925
|
+
"/custom-payment-sessions/retrieve"
|
|
926
|
+
),
|
|
848
927
|
confirm: operation("orders", "post", "/custom-payment-sessions/confirm")
|
|
849
928
|
}
|
|
850
929
|
},
|
|
@@ -870,6 +949,11 @@ var EVENTS_ENDPOINT_OPERATIONS = {
|
|
|
870
949
|
)
|
|
871
950
|
}
|
|
872
951
|
};
|
|
952
|
+
var COMMUNITY_ENDPOINT_OPERATIONS = {
|
|
953
|
+
posts: {
|
|
954
|
+
detail: operation("posts", "get", "/detail")
|
|
955
|
+
}
|
|
956
|
+
};
|
|
873
957
|
function resolveOperationTemplate(descriptor) {
|
|
874
958
|
return descriptor.collection ? `/api/${descriptor.collection}${descriptor.path}` : `/api${descriptor.path}`;
|
|
875
959
|
}
|
|
@@ -929,12 +1013,12 @@ var COMMERCE_ENDPOINTS = {
|
|
|
929
1013
|
updateFulfillment: endpoint("POST", "/api/orders/update-fulfillment")
|
|
930
1014
|
},
|
|
931
1015
|
checkouts: {
|
|
932
|
-
create:
|
|
933
|
-
retrieve:
|
|
1016
|
+
create: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.orders.checkout),
|
|
1017
|
+
retrieve: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.checkouts.detail),
|
|
934
1018
|
server: {
|
|
935
|
-
create:
|
|
936
|
-
retrieve:
|
|
937
|
-
query:
|
|
1019
|
+
create: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.orders.checkout),
|
|
1020
|
+
retrieve: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.checkouts.detail),
|
|
1021
|
+
query: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.checkouts.query)
|
|
938
1022
|
}
|
|
939
1023
|
},
|
|
940
1024
|
returns: {
|
|
@@ -952,10 +1036,10 @@ var COMMERCE_ENDPOINTS = {
|
|
|
952
1036
|
bulkImport: endpoint("POST", "/api/fulfillments/bulk-import")
|
|
953
1037
|
},
|
|
954
1038
|
carts: {
|
|
955
|
-
create:
|
|
1039
|
+
create: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.create),
|
|
956
1040
|
retrieve: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.retrieve),
|
|
957
|
-
mine:
|
|
958
|
-
merge:
|
|
1041
|
+
mine: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.mine),
|
|
1042
|
+
merge: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.merge),
|
|
959
1043
|
server: {
|
|
960
1044
|
// Server credentials are an authorization lane, not a second Cart
|
|
961
1045
|
// transport. These must stay bound to the registered shared operations.
|
|
@@ -975,29 +1059,46 @@ var COMMERCE_ENDPOINTS = {
|
|
|
975
1059
|
clear: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.clear)
|
|
976
1060
|
},
|
|
977
1061
|
addItem: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.addItem),
|
|
978
|
-
updateItem:
|
|
979
|
-
removeItem:
|
|
980
|
-
updateDiscountCodes:
|
|
981
|
-
|
|
982
|
-
|
|
1062
|
+
updateItem: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.updateItem),
|
|
1063
|
+
removeItem: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.removeItem),
|
|
1064
|
+
updateDiscountCodes: sharedEndpoint(
|
|
1065
|
+
COMMERCE_ENDPOINT_OPERATIONS.carts.updateDiscountCodes
|
|
1066
|
+
),
|
|
1067
|
+
updateAttributes: sharedEndpoint(
|
|
1068
|
+
COMMERCE_ENDPOINT_OPERATIONS.carts.updateAttributes
|
|
1069
|
+
),
|
|
1070
|
+
clear: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.carts.clear)
|
|
983
1071
|
},
|
|
984
1072
|
paymentSessions: {
|
|
985
|
-
create:
|
|
986
|
-
retrieve:
|
|
987
|
-
|
|
1073
|
+
create: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.create),
|
|
1074
|
+
retrieve: sharedEndpoint(
|
|
1075
|
+
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.retrieve
|
|
1076
|
+
),
|
|
1077
|
+
cancel: sharedEndpoint(COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.cancel),
|
|
988
1078
|
custom: {
|
|
989
1079
|
create: sharedEndpoint(
|
|
990
1080
|
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.custom.create
|
|
991
1081
|
),
|
|
1082
|
+
retrieve: sharedEndpoint(
|
|
1083
|
+
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.custom.retrieve
|
|
1084
|
+
),
|
|
992
1085
|
confirm: sharedEndpoint(
|
|
993
1086
|
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.custom.confirm
|
|
994
1087
|
)
|
|
995
1088
|
},
|
|
996
1089
|
server: {
|
|
997
|
-
create:
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1090
|
+
create: sharedEndpoint(
|
|
1091
|
+
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.server.create
|
|
1092
|
+
),
|
|
1093
|
+
retrieve: sharedEndpoint(
|
|
1094
|
+
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.server.retrieve
|
|
1095
|
+
),
|
|
1096
|
+
cancel: sharedEndpoint(
|
|
1097
|
+
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.server.cancel
|
|
1098
|
+
),
|
|
1099
|
+
confirm: sharedEndpoint(
|
|
1100
|
+
COMMERCE_ENDPOINT_OPERATIONS.paymentSessions.server.confirm
|
|
1101
|
+
)
|
|
1001
1102
|
}
|
|
1002
1103
|
},
|
|
1003
1104
|
shippingPolicies: {
|