@01.software/sdk 0.48.0 → 0.51.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +157 -1
  2. package/MIGRATION.md +56 -0
  3. package/README.md +276 -49
  4. package/dist/client.cjs +375 -161
  5. package/dist/client.cjs.map +1 -1
  6. package/dist/client.d.cts +7 -6
  7. package/dist/client.d.ts +7 -6
  8. package/dist/client.js +375 -161
  9. package/dist/client.js.map +1 -1
  10. package/dist/{collection-client-CBup9yOx.d.cts → collection-client-CWAeuzV4.d.cts} +6 -4
  11. package/dist/{collection-client-D3ExJU-7.d.ts → collection-client-hYvVfHIm.d.ts} +6 -4
  12. package/dist/{const-k9gHylYa.d.ts → const-D8LixhAJ.d.cts} +5 -5
  13. package/dist/{const-BXEi1Kix.d.cts → const-JD8obaKg.d.ts} +5 -5
  14. package/dist/embedded-admin/server.cjs +306 -0
  15. package/dist/embedded-admin/server.cjs.map +1 -0
  16. package/dist/embedded-admin/server.d.cts +33 -0
  17. package/dist/embedded-admin/server.d.ts +33 -0
  18. package/dist/embedded-admin/server.js +288 -0
  19. package/dist/embedded-admin/server.js.map +1 -0
  20. package/dist/embedded-admin.cjs +400 -0
  21. package/dist/embedded-admin.cjs.map +1 -0
  22. package/dist/embedded-admin.d.cts +61 -0
  23. package/dist/embedded-admin.d.ts +61 -0
  24. package/dist/embedded-admin.js +377 -0
  25. package/dist/embedded-admin.js.map +1 -0
  26. package/dist/errors.cjs +64 -15
  27. package/dist/errors.cjs.map +1 -1
  28. package/dist/errors.d.cts +13 -4
  29. package/dist/errors.d.ts +13 -4
  30. package/dist/errors.js +64 -15
  31. package/dist/errors.js.map +1 -1
  32. package/dist/{index-BCM9CTL7.d.cts → index-B0Hjh3Ey.d.ts} +72 -10
  33. package/dist/{index-CHGGkcLj.d.ts → index-Bu0kCc6o.d.cts} +72 -10
  34. package/dist/index.cjs +470 -429
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +9 -67
  37. package/dist/index.d.ts +9 -67
  38. package/dist/index.js +470 -429
  39. package/dist/index.js.map +1 -1
  40. package/dist/{payload-types-B6AZQcB7.d.cts → payload-types-BOsckg8B.d.cts} +396 -57
  41. package/dist/{payload-types-B6AZQcB7.d.ts → payload-types-BOsckg8B.d.ts} +396 -57
  42. package/dist/query.cjs +115 -70
  43. package/dist/query.cjs.map +1 -1
  44. package/dist/query.d.cts +5 -5
  45. package/dist/query.d.ts +5 -5
  46. package/dist/query.js +115 -70
  47. package/dist/query.js.map +1 -1
  48. package/dist/realtime.d.cts +2 -2
  49. package/dist/realtime.d.ts +2 -2
  50. package/dist/server.cjs +591 -186
  51. package/dist/server.cjs.map +1 -1
  52. package/dist/server.d.cts +8 -7
  53. package/dist/server.d.ts +8 -7
  54. package/dist/server.js +591 -186
  55. package/dist/server.js.map +1 -1
  56. package/dist/storefront-cache.cjs +22 -0
  57. package/dist/storefront-cache.cjs.map +1 -1
  58. package/dist/storefront-cache.js +22 -0
  59. package/dist/storefront-cache.js.map +1 -1
  60. package/dist/{types-ByD2zii1.d.ts → types-5ZlcAFuU.d.ts} +2 -2
  61. package/dist/{types-8us-_C-Q.d.cts → types-B14sEt1z.d.cts} +2 -2
  62. package/dist/{types-CM2je9Kw.d.cts → types-Bj8j7VHU.d.ts} +107 -26
  63. package/dist/{types-DbA5V3mt.d.ts → types-CM5qiR2k.d.cts} +107 -26
  64. package/dist/ui/form.d.cts +1 -1
  65. package/dist/ui/form.d.ts +1 -1
  66. package/dist/ui/video.d.cts +1 -1
  67. package/dist/ui/video.d.ts +1 -1
  68. package/dist/webhook.cjs +124 -80
  69. package/dist/webhook.cjs.map +1 -1
  70. package/dist/webhook.d.cts +21 -5
  71. package/dist/webhook.d.ts +21 -5
  72. package/dist/webhook.js +124 -80
  73. package/dist/webhook.js.map +1 -1
  74. package/package.json +27 -5
@@ -62,6 +62,7 @@ interface Config {
62
62
  'payment-event-inbox': PaymentEventInbox;
63
63
  'payment-refund-attempts': PaymentRefundAttempt;
64
64
  'portone-payment-interactions': PortonePaymentInteraction;
65
+ 'commerce-payment-webhook-routes': CommercePaymentWebhookRoute;
65
66
  'payment-kernel-external-integrations': PaymentKernelExternalIntegration;
66
67
  'payment-kernel-owner-identities': PaymentKernelOwnerIdentity;
67
68
  'payment-kernel-provider-connections': PaymentKernelProviderConnection;
@@ -73,6 +74,8 @@ interface Config {
73
74
  'payment-kernel-financial-movements': PaymentKernelFinancialMovement;
74
75
  'payment-kernel-provider-receipts': PaymentKernelProviderReceipt;
75
76
  'payment-kernel-reconciliation-cases': PaymentKernelReconciliationCase;
77
+ 'payment-kernel-results': PaymentKernelResult;
78
+ 'payment-kernel-owner-commits': PaymentKernelOwnerCommit;
76
79
  'order-status-logs': OrderStatusLog;
77
80
  'inventory-reservations': InventoryReservation;
78
81
  'fulfillment-orders': FulfillmentOrder;
@@ -295,6 +298,7 @@ interface Config {
295
298
  'payment-event-inbox': PaymentEventInboxSelect<false> | PaymentEventInboxSelect<true>;
296
299
  'payment-refund-attempts': PaymentRefundAttemptsSelect<false> | PaymentRefundAttemptsSelect<true>;
297
300
  'portone-payment-interactions': PortonePaymentInteractionsSelect<false> | PortonePaymentInteractionsSelect<true>;
301
+ 'commerce-payment-webhook-routes': CommercePaymentWebhookRoutesSelect<false> | CommercePaymentWebhookRoutesSelect<true>;
298
302
  'payment-kernel-external-integrations': PaymentKernelExternalIntegrationsSelect<false> | PaymentKernelExternalIntegrationsSelect<true>;
299
303
  'payment-kernel-owner-identities': PaymentKernelOwnerIdentitiesSelect<false> | PaymentKernelOwnerIdentitiesSelect<true>;
300
304
  'payment-kernel-provider-connections': PaymentKernelProviderConnectionsSelect<false> | PaymentKernelProviderConnectionsSelect<true>;
@@ -306,6 +310,8 @@ interface Config {
306
310
  'payment-kernel-financial-movements': PaymentKernelFinancialMovementsSelect<false> | PaymentKernelFinancialMovementsSelect<true>;
307
311
  'payment-kernel-provider-receipts': PaymentKernelProviderReceiptsSelect<false> | PaymentKernelProviderReceiptsSelect<true>;
308
312
  'payment-kernel-reconciliation-cases': PaymentKernelReconciliationCasesSelect<false> | PaymentKernelReconciliationCasesSelect<true>;
313
+ 'payment-kernel-results': PaymentKernelResultsSelect<false> | PaymentKernelResultsSelect<true>;
314
+ 'payment-kernel-owner-commits': PaymentKernelOwnerCommitsSelect<false> | PaymentKernelOwnerCommitsSelect<true>;
309
315
  'order-status-logs': OrderStatusLogsSelect<false> | OrderStatusLogsSelect<true>;
310
316
  'inventory-reservations': InventoryReservationsSelect<false> | InventoryReservationsSelect<true>;
311
317
  'fulfillment-orders': FulfillmentOrdersSelect<false> | FulfillmentOrdersSelect<true>;
@@ -684,6 +690,15 @@ interface Tenant {
684
690
  origin: string;
685
691
  id?: string | null;
686
692
  }[] | null;
693
+ /**
694
+ * Managed from the dedicated Console developer-settings screen.
695
+ */
696
+ embeddedAdminApp?: {
697
+ enabled?: boolean | null;
698
+ label?: string | null;
699
+ origin?: string | null;
700
+ path?: string | null;
701
+ };
687
702
  /**
688
703
  * Workspace-wide email sender settings. Applies to every send, including commerce notifications and password resets.
689
704
  */
@@ -810,7 +825,7 @@ interface Tenant {
810
825
  deletedAt?: string | null;
811
826
  }
812
827
  /**
813
- * Manage Admin Panel users and permission details.
828
+ * Manage Console users and permission details.
814
829
  *
815
830
  * This interface was referenced by `Config`'s JSON-Schema
816
831
  * via the `definition` "users".
@@ -838,11 +853,11 @@ interface User {
838
853
  suspendedAt?: string | null;
839
854
  suspendedReason?: string | null;
840
855
  /**
841
- * Timezone used for admin UI and notifications, such as Asia/Seoul.
856
+ * Timezone used for Console UI and notifications, such as Asia/Seoul.
842
857
  */
843
858
  timezone?: string | null;
844
859
  /**
845
- * Admin UI language or locale code, such as ko or en.
860
+ * Console UI language or locale code, such as ko or en.
846
861
  */
847
862
  locale?: string | null;
848
863
  avatar?: (string | null) | Image;
@@ -1040,12 +1055,12 @@ interface CommerceNotificationIntent {
1040
1055
  * Stable key that prevents duplicate notification intents within a tenant.
1041
1056
  */
1042
1057
  dedupeKey: string;
1043
- event: 'orderPaid' | 'orderCanceled' | 'fulfillmentShipped' | 'orderDelivered' | 'returnRequested' | 'returnApproved' | 'returnRejected' | 'returnCanceled' | 'returnCompleted' | 'eventRegistrationConfirmed' | 'eventOccurrenceCanceled';
1058
+ event: 'orderPaid' | 'orderCanceled' | 'fulfillmentShipped' | 'orderDelivered' | 'returnRequested' | 'returnApproved' | 'returnRejected' | 'returnCanceled' | 'returnCompleted' | 'paymentReconciliationRequired' | 'paymentRefundRequiresAttention' | 'eventRegistrationConfirmed' | 'eventOccurrenceCanceled';
1044
1059
  status: 'queued' | 'processing' | 'sent' | 'failed' | 'canceled';
1045
1060
  /**
1046
- * Customer email address targeted by this notification.
1061
+ * Customer email target. Operator-only payment incident notifications leave this empty.
1047
1062
  */
1048
- recipientEmail: string;
1063
+ recipientEmail?: string | null;
1049
1064
  /**
1050
1065
  * Consent classification used by the send-time eligibility gate.
1051
1066
  */
@@ -1355,10 +1370,6 @@ interface Customer {
1355
1370
  customData?: {
1356
1371
  [k: string]: unknown;
1357
1372
  } | unknown[] | string | number | boolean | null;
1358
- /**
1359
- * Marks a minor customer. When enabled, guardian consent fields are managed as compliance evidence.
1360
- */
1361
- isMinor?: boolean | null;
1362
1373
  marketingConsent?: {
1363
1374
  email?: {
1364
1375
  state?: ('not_subscribed' | 'pending' | 'subscribed' | 'unsubscribed') | null;
@@ -1409,27 +1420,6 @@ interface Customer {
1409
1420
  unsubscribedAt?: string | null;
1410
1421
  };
1411
1422
  };
1412
- /**
1413
- * Guardian consent evidence for a minor customer. May contain guardian PII.
1414
- */
1415
- guardianConsent?: {
1416
- /**
1417
- * Whether guardian consent has been collected. Internal compliance marker for minor-customer handling.
1418
- */
1419
- hasGuardianConsent?: boolean | null;
1420
- /**
1421
- * Guardian name. Treat as guardian PII.
1422
- */
1423
- guardianName?: string | null;
1424
- /**
1425
- * Guardian phone number. Treat as guardian PII.
1426
- */
1427
- guardianPhone?: string | null;
1428
- /**
1429
- * Timestamp when guardian consent was recorded. Read-only audit evidence.
1430
- */
1431
- guardianConsentedAt?: string | null;
1432
- };
1433
1423
  acceptsTos?: boolean | null;
1434
1424
  tosVersion?: string | null;
1435
1425
  /**
@@ -3547,6 +3537,12 @@ interface PaymentSession {
3547
3537
  * Provider Hosted URL exposed only through an ownership-checked PaymentSession response.
3548
3538
  */
3549
3539
  providerActionUrl?: string | null;
3540
+ /**
3541
+ * Versioned provider browser action projected only after ownership checks.
3542
+ */
3543
+ providerAction?: {
3544
+ [k: string]: unknown;
3545
+ } | unknown[] | string | number | boolean | null;
3550
3546
  providerAccount?: (string | null) | CommercePaymentAccount;
3551
3547
  credentialVersion?: number | null;
3552
3548
  environment?: string | null;
@@ -3563,10 +3559,10 @@ interface PaymentSession {
3563
3559
  captureSequence?: number | null;
3564
3560
  providerObservedAt?: string | null;
3565
3561
  /**
3566
- * Immutable PortOne capture observation stored before local ledger finalization.
3562
+ * Immutable provider capture observation stored before local ledger finalization.
3567
3563
  */
3568
3564
  providerCaptureEvidence?: {
3569
- provider?: 'portone' | null;
3565
+ provider?: ('portone' | 'toss') | null;
3570
3566
  providerAccount?: (string | null) | CommercePaymentAccount;
3571
3567
  providerAccountKey?: string | null;
3572
3568
  environment?: ('test' | 'live') | null;
@@ -3576,7 +3572,7 @@ interface PaymentSession {
3576
3572
  currency?: string | null;
3577
3573
  observationId?: string | null;
3578
3574
  observedAt?: string | null;
3579
- verificationSource?: ('portone_authenticated_response' | 'portone_authoritative_lookup') | null;
3575
+ verificationSource?: ('portone_authenticated_response' | 'portone_authoritative_lookup' | 'toss_authenticated_response' | 'toss_authoritative_lookup') | null;
3580
3576
  };
3581
3577
  expiresAt?: string | null;
3582
3578
  captureInFlightAt?: string | null;
@@ -3623,12 +3619,12 @@ interface CommercePaymentAccount {
3623
3619
  markets: (string | Market)[];
3624
3620
  tossConfiguration?: {
3625
3621
  /**
3626
- * Toss client key. Must use the test_ / live_ prefix matching the registered environment.
3622
+ * Toss Widget client key. Must use the test_gck_ / live_gck_ prefix matching the registered environment.
3627
3623
  */
3628
3624
  clientKey: string;
3629
3625
  secretKey?: string | null;
3630
3626
  /**
3631
- * Encrypted on save and never shown again. Leave blank to keep the registered key.
3627
+ * Enter the test_gsk_ / live_gsk_ key matching the environment. It is encrypted on save and never shown again; leave blank to keep it.
3632
3628
  */
3633
3629
  secretKeyInput?: string | null;
3634
3630
  /**
@@ -3655,17 +3651,29 @@ interface CommercePaymentAccount {
3655
3651
  /**
3656
3652
  * PortOne channel/store profile key.
3657
3653
  */
3658
- profileKey: string;
3654
+ profileKey?: string | null;
3659
3655
  /**
3660
3656
  * Hosted Payment Session country (ISO 3166-1 alpha-2 uppercase).
3661
3657
  */
3662
- country: string;
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')[];
3658
+ country?: string | null;
3659
+ 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')[] | null;
3660
+ /**
3661
+ * Currently supports only PortOne Standard V2 Toss Payments (new module) CARD channels. A redirect URL is required for mobile checkout.
3662
+ */
3663
+ standardV2?: {
3664
+ channelKey?: string | null;
3665
+ redirectUrl?: string | null;
3666
+ };
3664
3667
  };
3665
3668
  /**
3666
- * When enabled, this connection is eligible for new PaymentSessions.
3669
+ * Enabled only by the activation action after configuration attestation. Deactivation is always available.
3667
3670
  */
3668
3671
  isActive?: boolean | null;
3672
+ connectionReadinessState: 'pending' | 'configuration_attested' | 'pre_readiness_accepted';
3673
+ readinessCredentialVersion?: number | null;
3674
+ readinessConfigurationDigest?: string | null;
3675
+ readinessCheckedAt?: string | null;
3676
+ readinessReasonCode?: ('awaiting_verification' | 'configuration_changed' | 'credential_changed' | 'toss_configuration_attestation_v1' | 'toss_widget_render_failed_v1' | 'toss_provider_account_key_mismatch_v1' | 'portone_configuration_acknowledgement_v1' | 'pre_readiness_active_cutover') | null;
3669
3677
  credentialVersion?: number | null;
3670
3678
  credentialState: 'active' | 'archived_refundable' | 'revoked' | 'destruction_pending' | 'destroyed';
3671
3679
  rotatedAt?: string | null;
@@ -3739,6 +3747,15 @@ interface Event {
3739
3747
  */
3740
3748
  timezone?: string | null;
3741
3749
  isAllDay?: boolean | null;
3750
+ /**
3751
+ * Authoritative all-day start date (YYYY-MM-DD).
3752
+ */
3753
+ allDayStartDate?: string | null;
3754
+ /**
3755
+ * Authoritative exclusive all-day end date (YYYY-MM-DD).
3756
+ */
3757
+ allDayEndDateExclusive?: string | null;
3758
+ allDayAuthorityTimezone?: string | null;
3742
3759
  /**
3743
3760
  * Optional. Leave empty for a one-time event.
3744
3761
  */
@@ -3758,6 +3775,10 @@ interface Event {
3758
3775
  endMode?: ('never' | 'count' | 'until') | null;
3759
3776
  count?: number | null;
3760
3777
  until?: string | null;
3778
+ /**
3779
+ * Authoritative all-day recurrence end date. Enter YYYY-MM-DD.
3780
+ */
3781
+ untilDate?: string | null;
3761
3782
  /**
3762
3783
  * RFC 5545 RRULE string for advanced users. Use the repeat fields above for common schedules.
3763
3784
  */
@@ -3975,6 +3996,9 @@ interface EventOccurrence {
3975
3996
  */
3976
3997
  timezone?: string | null;
3977
3998
  isAllDay?: boolean | null;
3999
+ allDayStartDate?: string | null;
4000
+ allDayEndDateExclusive?: string | null;
4001
+ allDayAuthorityTimezone?: string | null;
3978
4002
  status?: ('scheduled' | 'canceled' | 'completed') | null;
3979
4003
  /**
3980
4004
  * Server-derived copy of whether the parent event is exposed to public reads. Follows the event status, visibility, and trashed state automatically.
@@ -4470,7 +4494,7 @@ interface PersonalAccessToken {
4470
4494
  lastUsedIp?: string | null;
4471
4495
  revokedAt?: string | null;
4472
4496
  /**
4473
- * User who revoked the PAT for audit traceability.
4497
+ * User who revoked the PAT. This is null for API-KEY-038 OIDC machine revocation, whose workflow receipt proves the audit actor.
4474
4498
  */
4475
4499
  revokedBy?: (string | null) | User;
4476
4500
  /**
@@ -4512,6 +4536,10 @@ interface AuditLog {
4512
4536
  interface WebhookEvent {
4513
4537
  id: string;
4514
4538
  tenant?: (string | null) | Tenant;
4539
+ /**
4540
+ * New runtime rows require tenant or global. Null marks legacy/old-runtime evidence during expand and is treated as unresolved like unknown.
4541
+ */
4542
+ ownershipScope?: ('tenant' | 'global' | 'unknown') | null;
4515
4543
  /**
4516
4544
  * Provider
4517
4545
  */
@@ -4566,6 +4594,26 @@ interface WebhookDelivery {
4566
4594
  * Operation that produced this delivery attempt.
4567
4595
  */
4568
4596
  operation?: string | null;
4597
+ /**
4598
+ * Semantic event type, recorded for commerce notification deliveries only. Example: commerce.notification. Empty for ordinary collection deliveries.
4599
+ */
4600
+ eventType?: string | null;
4601
+ /**
4602
+ * Commerce notification event, e.g. orderCanceled. A 2xx receiver response does not prove the receiver handled this event.
4603
+ */
4604
+ notificationEvent?: string | null;
4605
+ /**
4606
+ * Notification intent identifier. With the dedupe key it forms the semantic idempotency identity.
4607
+ */
4608
+ notificationIntentId?: string | null;
4609
+ /**
4610
+ * Notification dedupe key. Distinct from delivery id, which identifies the delivery attempt only.
4611
+ */
4612
+ notificationDedupeKey?: string | null;
4613
+ /**
4614
+ * Identifier of the source object that produced this delivery. Its collection is the collection field.
4615
+ */
4616
+ sourceId?: string | null;
4569
4617
  /**
4570
4618
  * Path that produced the delivery attempt.
4571
4619
  */
@@ -4635,13 +4683,13 @@ interface Webhook {
4635
4683
  */
4636
4684
  secretRotatedBy?: (string | null) | User;
4637
4685
  /**
4638
- * Collections to subscribe to. Leave empty to receive every supported collection event.
4686
+ * Collections to subscribe to. Leaving this empty is a wildcard for ordinary collection create/update events only; commerce notifications need an explicit row for their source collection (orders, fulfillments, returns).
4639
4687
  */
4640
4688
  subscriptions?: {
4641
4689
  /**
4642
- * Receives create/update events for this collection.
4690
+ * Receives create/update events for this collection, plus commerce notifications whose source is this collection.
4643
4691
  */
4644
- collection: 'tenant-metadata' | 'tenant-logos' | 'images' | 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-categories' | 'product-tags' | 'product-collections' | 'markets' | 'brands' | 'brand-logos' | 'orders' | 'order-items' | 'transactions' | 'fulfillment-orders' | 'fulfillment-order-items' | 'fulfillments' | 'fulfillment-items' | 'returns' | 'return-items' | 'carts' | 'cart-items' | 'discounts' | 'shipping-policies' | 'shipping-zones' | 'customers' | 'customer-profiles' | 'customer-addresses' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-items' | 'gallery-categories' | 'gallery-tags' | 'links' | 'link-categories' | 'link-tags' | 'forms' | 'form-submissions' | 'articles' | 'article-authors' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'canvases' | 'canvas-node-types' | 'canvas-edge-types' | 'canvas-categories' | 'canvas-tags' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'post-tags' | 'customer-profile-stats' | 'customer-profile-lists' | 'event-calendars' | 'events' | 'event-categories' | 'event-occurrences' | 'event-tags' | 'membership-plans' | 'membership-plan-prices' | 'canvas-nodes' | 'canvas-edges';
4692
+ collection: 'tenant-metadata' | 'tenant-logos' | 'images' | 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-categories' | 'product-tags' | 'product-collections' | 'markets' | 'brands' | 'brand-logos' | 'orders' | 'order-items' | 'transactions' | 'fulfillment-orders' | 'fulfillment-order-items' | 'fulfillments' | 'fulfillment-items' | 'returns' | 'return-items' | 'carts' | 'cart-items' | 'discounts' | 'shipping-policies' | 'shipping-zones' | 'customers' | 'customer-profiles' | 'customer-addresses' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-items' | 'gallery-categories' | 'gallery-tags' | 'links' | 'link-categories' | 'link-tags' | 'forms' | 'form-submissions' | 'articles' | 'article-authors' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'canvases' | 'canvas-node-types' | 'canvas-edge-types' | 'canvas-categories' | 'canvas-tags' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'post-tags' | 'customer-profile-stats' | 'customer-profile-lists' | 'event-calendars' | 'events' | 'event-categories' | 'event-occurrences' | 'event-tags' | 'membership-plans' | 'membership-plan-prices' | 'canvas-nodes' | 'canvas-edges' | 'payment-sessions' | 'payment-refund-attempts';
4645
4693
  id?: string | null;
4646
4694
  }[] | null;
4647
4695
  isActive?: boolean | null;
@@ -5684,10 +5732,10 @@ interface PaymentRefundAttempt {
5684
5732
  tenant?: (string | null) | Tenant;
5685
5733
  status: 'provider_pending' | 'provider_succeeded' | 'reconciliation_required' | 'local_committed' | 'failed';
5686
5734
  order: string | Order;
5687
- paymentSession: string | PaymentSession;
5735
+ paymentSession?: (string | null) | PaymentSession;
5688
5736
  paymentTransaction: string | Transaction;
5689
- providerAccount: string | CommercePaymentAccount;
5690
- credentialVersion: number;
5737
+ providerAccount?: (string | null) | CommercePaymentAccount;
5738
+ credentialVersion?: number | null;
5691
5739
  provider: string;
5692
5740
  environment: string;
5693
5741
  providerOrderId: string;
@@ -5711,6 +5759,94 @@ interface PaymentRefundAttempt {
5711
5759
  localRefundedAmount?: number | null;
5712
5760
  localCommittedAt?: string | null;
5713
5761
  lastErrorCode?: string | null;
5762
+ returnOperation?: {
5763
+ version: 2;
5764
+ requestFingerprint: string;
5765
+ envelope: {
5766
+ version: 1;
5767
+ tenantId: string;
5768
+ orderId: string;
5769
+ orderNumber: string;
5770
+ source: {
5771
+ kind: 'existing_return';
5772
+ returnId: string;
5773
+ } | {
5774
+ kind: 'direct_return';
5775
+ };
5776
+ payment: {
5777
+ paymentTransactionId: string;
5778
+ paymentSessionId: null | string;
5779
+ providerAccountId: null | string;
5780
+ credentialVersion: null | number;
5781
+ provider: 'toss' | 'portone';
5782
+ environment: 'test' | 'live' | 'legacy';
5783
+ providerOrderId: string;
5784
+ paymentKey: string;
5785
+ pgPaymentId: string;
5786
+ currency: string;
5787
+ };
5788
+ /**
5789
+ * @minItems 1
5790
+ * @maxItems 100
5791
+ */
5792
+ items: [
5793
+ {
5794
+ orderItemId: string;
5795
+ quantity: number;
5796
+ restockAction: 'return_to_stock' | 'discard';
5797
+ restockingFee: number;
5798
+ },
5799
+ ...{
5800
+ orderItemId: string;
5801
+ quantity: number;
5802
+ restockAction: 'return_to_stock' | 'discard';
5803
+ restockingFee: number;
5804
+ }[]
5805
+ ];
5806
+ lineRefundAmount: number;
5807
+ returnShippingFee: number;
5808
+ initialShippingRefundAmount: number;
5809
+ restockingFeeTotal: number;
5810
+ providerRefundAmount: number;
5811
+ metadata: {
5812
+ initialShippingRefundOverrideNote: null | string;
5813
+ reason: null | string;
5814
+ reasonDetail: null | string;
5815
+ refundReceiptUrl: null | string;
5816
+ };
5817
+ actorFingerprint: string;
5818
+ };
5819
+ } | null;
5820
+ returnFinalizationStatus: 'not_applicable' | 'pending' | 'succeeded';
5821
+ finalizedReturn?: (string | null) | Return;
5822
+ returnRefundTransaction?: (string | null) | Transaction;
5823
+ returnFinalizedAt?: string | null;
5824
+ returnLastErrorCode?: string | null;
5825
+ returnSuccessResponse?: {
5826
+ version: 1;
5827
+ body: {
5828
+ return: {
5829
+ id: string;
5830
+ status: 'completed';
5831
+ refundAmount: number;
5832
+ returnShippingFee: number;
5833
+ initialShippingRefundAmount: number;
5834
+ completedAt: string;
5835
+ };
5836
+ transaction: {
5837
+ id: string;
5838
+ type: 'refund';
5839
+ kind: 'refund';
5840
+ status: 'refunded';
5841
+ amount: number;
5842
+ providerEventId: string | null;
5843
+ };
5844
+ refundSeq: number;
5845
+ };
5846
+ } | null;
5847
+ returnResponseOutcome?: {
5848
+ [k: string]: unknown;
5849
+ } | unknown[] | string | number | boolean | null;
5714
5850
  updatedAt: string;
5715
5851
  createdAt: string;
5716
5852
  }
@@ -5757,6 +5893,45 @@ interface PortonePaymentInteraction {
5757
5893
  updatedAt: string;
5758
5894
  createdAt: string;
5759
5895
  }
5896
+ /**
5897
+ * This interface was referenced by `Config`'s JSON-Schema
5898
+ * via the `definition` "commerce-payment-webhook-routes".
5899
+ */
5900
+ interface CommercePaymentWebhookRoute {
5901
+ id: string;
5902
+ tenant?: (string | null) | Tenant;
5903
+ provider: 'portone';
5904
+ /**
5905
+ * PortOne storeId this route serves.
5906
+ */
5907
+ providerAccountKey: string;
5908
+ /**
5909
+ * Server-issued routing identifier for the PortOne console webhook URL path. Not an authentication token.
5910
+ */
5911
+ anchor: string;
5912
+ state: 'pending' | 'verified' | 'draining' | 'revoked';
5913
+ rotationReason: 'initial' | 'normal' | 'compromise';
5914
+ supersedesRoute?: (string | null) | CommercePaymentWebhookRoute;
5915
+ issuedAt?: string | null;
5916
+ verifiedAt?: string | null;
5917
+ testReadbackAttestedAt?: string | null;
5918
+ testLastSignedDeliveryAt?: string | null;
5919
+ liveReadbackAttestedAt?: string | null;
5920
+ liveLastSignedDeliveryAt?: string | null;
5921
+ storeKeyedLastSignedDeliveryAt?: string | null;
5922
+ drainStartedAt?: string | null;
5923
+ revokedAt?: string | null;
5924
+ /**
5925
+ * Webhook URL the operator read back from the PortOne console for that environment.
5926
+ */
5927
+ testReadbackUrl?: string | null;
5928
+ /**
5929
+ * Webhook URL the operator read back from the PortOne console for that environment.
5930
+ */
5931
+ liveReadbackUrl?: string | null;
5932
+ updatedAt: string;
5933
+ createdAt: string;
5934
+ }
5760
5935
  /**
5761
5936
  * This interface was referenced by `Config`'s JSON-Schema
5762
5937
  * via the `definition` "payment-kernel-external-integrations".
@@ -5967,6 +6142,51 @@ interface PaymentKernelReconciliationCase {
5967
6142
  updatedAt: string;
5968
6143
  createdAt: string;
5969
6144
  }
6145
+ /**
6146
+ * This interface was referenced by `Config`'s JSON-Schema
6147
+ * via the `definition` "payment-kernel-results".
6148
+ */
6149
+ interface PaymentKernelResult {
6150
+ id: string;
6151
+ tenant?: (string | null) | Tenant;
6152
+ operation: string | PaymentKernelOperation;
6153
+ obligation: string | PaymentKernelObligation;
6154
+ ownerIdentity: string | PaymentKernelOwnerIdentity;
6155
+ ownerKind: 'commerce_checkout' | 'event_ticket_purchase';
6156
+ ownerId: string;
6157
+ operationKind: 'capture' | 'refund' | 'void' | 'lookup' | 'dispute' | 'reconciliation';
6158
+ outcome: 'succeeded' | 'definitively_failed';
6159
+ providerObjectIdentity: string | PaymentKernelProviderObjectIdentity;
6160
+ provider: string;
6161
+ providerAccountKey: string;
6162
+ environment: 'test' | 'live';
6163
+ objectKind: string;
6164
+ objectId: string;
6165
+ terminalAttempt: string | PaymentKernelOperationAttempt;
6166
+ sourceMovement?: (string | null) | PaymentKernelFinancialMovement;
6167
+ sourceMovementKind?: ('capture_confirmed' | 'refund_reservation' | 'refund_confirmed' | 'refund_reservation_release' | 'dispute_loss' | 'reversal' | 'fee' | 'adjustment' | 'settled') | null;
6168
+ sourceProviderReceipt?: (string | null) | PaymentKernelProviderReceipt;
6169
+ amount: number;
6170
+ currency: string;
6171
+ providerOutcomeAt: string;
6172
+ updatedAt: string;
6173
+ createdAt: string;
6174
+ }
6175
+ /**
6176
+ * This interface was referenced by `Config`'s JSON-Schema
6177
+ * via the `definition` "payment-kernel-owner-commits".
6178
+ */
6179
+ interface PaymentKernelOwnerCommit {
6180
+ id: string;
6181
+ tenant?: (string | null) | Tenant;
6182
+ kernelResult: string | PaymentKernelResult;
6183
+ ownerIdentity: string | PaymentKernelOwnerIdentity;
6184
+ ownerKind: 'commerce_checkout' | 'event_ticket_purchase';
6185
+ ownerId: string;
6186
+ committedAt: string;
6187
+ updatedAt: string;
6188
+ createdAt: string;
6189
+ }
5970
6190
  /**
5971
6191
  * This interface was referenced by `Config`'s JSON-Schema
5972
6192
  * via the `definition` "order-status-logs".
@@ -8272,6 +8492,22 @@ interface CustomerMembership {
8272
8492
  currency: 'KRW' | 'USD' | 'EUR' | 'JPY';
8273
8493
  billingInterval: 'month' | 'year';
8274
8494
  intervalCount: number;
8495
+ /**
8496
+ * Trial-day snapshot captured when the subscribe intent is created
8497
+ */
8498
+ trialDaysSnapshot?: number | null;
8499
+ /**
8500
+ * Immutable original period start for the subscribe intent
8501
+ */
8502
+ subscribePeriodStart?: string | null;
8503
+ /**
8504
+ * Immutable original period end for the subscribe intent
8505
+ */
8506
+ subscribePeriodEnd?: string | null;
8507
+ /**
8508
+ * Immutable SHA-256 digest of historical paid-admission recovery basis
8509
+ */
8510
+ historicalPaidRecoveryEvidence?: string | null;
8275
8511
  currentPeriodStart?: string | null;
8276
8512
  currentPeriodEnd?: string | null;
8277
8513
  nextBillingAt?: string | null;
@@ -8308,7 +8544,7 @@ interface MembershipCharge {
8308
8544
  id: string;
8309
8545
  tenant?: (string | null) | Tenant;
8310
8546
  membership: string | CustomerMembership;
8311
- customer?: (string | null) | Customer;
8547
+ customer: string | Customer;
8312
8548
  amount: number;
8313
8549
  currency: 'KRW' | 'USD' | 'EUR' | 'JPY';
8314
8550
  status: 'pending' | 'paid' | 'failed' | 'refunded' | 'voided' | 'disputed';
@@ -8318,9 +8554,9 @@ interface MembershipCharge {
8318
8554
  pgRefundId?: string | null;
8319
8555
  pgProvider?: string | null;
8320
8556
  periodStart: string;
8321
- periodEnd?: string | null;
8557
+ periodEnd: string;
8322
8558
  paidAt?: string | null;
8323
- idempotencyKey?: string | null;
8559
+ idempotencyKey: string;
8324
8560
  updatedAt: string;
8325
8561
  createdAt: string;
8326
8562
  }
@@ -8939,6 +9175,7 @@ interface AuditLogsSelect<T extends boolean = true> {
8939
9175
  */
8940
9176
  interface WebhookEventsSelect<T extends boolean = true> {
8941
9177
  tenant?: T;
9178
+ ownershipScope?: T;
8942
9179
  provider?: T;
8943
9180
  eventId?: T;
8944
9181
  receivedAt?: T;
@@ -8960,6 +9197,11 @@ interface WebhookDeliveriesSelect<T extends boolean = true> {
8960
9197
  endpointUrlHash?: T;
8961
9198
  collection?: T;
8962
9199
  operation?: T;
9200
+ eventType?: T;
9201
+ notificationEvent?: T;
9202
+ notificationIntentId?: T;
9203
+ notificationDedupeKey?: T;
9204
+ sourceId?: T;
8963
9205
  source?: T;
8964
9206
  statusCode?: T;
8965
9207
  errorKind?: T;
@@ -9031,6 +9273,12 @@ interface TenantsSelect<T extends boolean = true> {
9031
9273
  origin?: T;
9032
9274
  id?: T;
9033
9275
  };
9276
+ embeddedAdminApp?: T | {
9277
+ enabled?: T;
9278
+ label?: T;
9279
+ origin?: T;
9280
+ path?: T;
9281
+ };
9034
9282
  senderIdentity?: T | {
9035
9283
  displayName?: T;
9036
9284
  replyTo?: T;
@@ -10338,6 +10586,7 @@ interface PaymentSessionsSelect<T extends boolean = true> {
10338
10586
  sessionOrigin?: T;
10339
10587
  providerSessionId?: T;
10340
10588
  providerActionUrl?: T;
10589
+ providerAction?: T;
10341
10590
  providerAccount?: T;
10342
10591
  credentialVersion?: T;
10343
10592
  environment?: T;
@@ -10447,6 +10696,14 @@ interface PaymentRefundAttemptsSelect<T extends boolean = true> {
10447
10696
  localRefundedAmount?: T;
10448
10697
  localCommittedAt?: T;
10449
10698
  lastErrorCode?: T;
10699
+ returnOperation?: T;
10700
+ returnFinalizationStatus?: T;
10701
+ finalizedReturn?: T;
10702
+ returnRefundTransaction?: T;
10703
+ returnFinalizedAt?: T;
10704
+ returnLastErrorCode?: T;
10705
+ returnSuccessResponse?: T;
10706
+ returnResponseOutcome?: T;
10450
10707
  updatedAt?: T;
10451
10708
  createdAt?: T;
10452
10709
  }
@@ -10489,6 +10746,32 @@ interface PortonePaymentInteractionsSelect<T extends boolean = true> {
10489
10746
  updatedAt?: T;
10490
10747
  createdAt?: T;
10491
10748
  }
10749
+ /**
10750
+ * This interface was referenced by `Config`'s JSON-Schema
10751
+ * via the `definition` "commerce-payment-webhook-routes_select".
10752
+ */
10753
+ interface CommercePaymentWebhookRoutesSelect<T extends boolean = true> {
10754
+ tenant?: T;
10755
+ provider?: T;
10756
+ providerAccountKey?: T;
10757
+ anchor?: T;
10758
+ state?: T;
10759
+ rotationReason?: T;
10760
+ supersedesRoute?: T;
10761
+ issuedAt?: T;
10762
+ verifiedAt?: T;
10763
+ testReadbackAttestedAt?: T;
10764
+ testLastSignedDeliveryAt?: T;
10765
+ liveReadbackAttestedAt?: T;
10766
+ liveLastSignedDeliveryAt?: T;
10767
+ storeKeyedLastSignedDeliveryAt?: T;
10768
+ drainStartedAt?: T;
10769
+ revokedAt?: T;
10770
+ testReadbackUrl?: T;
10771
+ liveReadbackUrl?: T;
10772
+ updatedAt?: T;
10773
+ createdAt?: T;
10774
+ }
10492
10775
  /**
10493
10776
  * This interface was referenced by `Config`'s JSON-Schema
10494
10777
  * via the `definition` "payment-kernel-external-integrations_select".
@@ -10688,6 +10971,49 @@ interface PaymentKernelReconciliationCasesSelect<T extends boolean = true> {
10688
10971
  updatedAt?: T;
10689
10972
  createdAt?: T;
10690
10973
  }
10974
+ /**
10975
+ * This interface was referenced by `Config`'s JSON-Schema
10976
+ * via the `definition` "payment-kernel-results_select".
10977
+ */
10978
+ interface PaymentKernelResultsSelect<T extends boolean = true> {
10979
+ tenant?: T;
10980
+ operation?: T;
10981
+ obligation?: T;
10982
+ ownerIdentity?: T;
10983
+ ownerKind?: T;
10984
+ ownerId?: T;
10985
+ operationKind?: T;
10986
+ outcome?: T;
10987
+ providerObjectIdentity?: T;
10988
+ provider?: T;
10989
+ providerAccountKey?: T;
10990
+ environment?: T;
10991
+ objectKind?: T;
10992
+ objectId?: T;
10993
+ terminalAttempt?: T;
10994
+ sourceMovement?: T;
10995
+ sourceMovementKind?: T;
10996
+ sourceProviderReceipt?: T;
10997
+ amount?: T;
10998
+ currency?: T;
10999
+ providerOutcomeAt?: T;
11000
+ updatedAt?: T;
11001
+ createdAt?: T;
11002
+ }
11003
+ /**
11004
+ * This interface was referenced by `Config`'s JSON-Schema
11005
+ * via the `definition` "payment-kernel-owner-commits_select".
11006
+ */
11007
+ interface PaymentKernelOwnerCommitsSelect<T extends boolean = true> {
11008
+ tenant?: T;
11009
+ kernelResult?: T;
11010
+ ownerIdentity?: T;
11011
+ ownerKind?: T;
11012
+ ownerId?: T;
11013
+ committedAt?: T;
11014
+ updatedAt?: T;
11015
+ createdAt?: T;
11016
+ }
10691
11017
  /**
10692
11018
  * This interface was referenced by `Config`'s JSON-Schema
10693
11019
  * via the `definition` "order-status-logs_select".
@@ -11035,7 +11361,6 @@ interface CustomersSelect<T extends boolean = true> {
11035
11361
  lastOrderAt?: T;
11036
11362
  profile?: T;
11037
11363
  customData?: T;
11038
- isMinor?: T;
11039
11364
  marketingConsent?: T | {
11040
11365
  email?: T | {
11041
11366
  state?: T;
@@ -11068,12 +11393,6 @@ interface CustomersSelect<T extends boolean = true> {
11068
11393
  unsubscribedAt?: T;
11069
11394
  };
11070
11395
  };
11071
- guardianConsent?: T | {
11072
- hasGuardianConsent?: T;
11073
- guardianName?: T;
11074
- guardianPhone?: T;
11075
- guardianConsentedAt?: T;
11076
- };
11077
11396
  acceptsTos?: T;
11078
11397
  tosVersion?: T;
11079
11398
  withdrawReason?: T;
@@ -12635,6 +12954,9 @@ interface EventsSelect<T extends boolean = true> {
12635
12954
  endsAt?: T;
12636
12955
  timezone?: T;
12637
12956
  isAllDay?: T;
12957
+ allDayStartDate?: T;
12958
+ allDayEndDateExclusive?: T;
12959
+ allDayAuthorityTimezone?: T;
12638
12960
  recurrence?: T | {
12639
12961
  frequency?: T;
12640
12962
  interval?: T;
@@ -12642,6 +12964,7 @@ interface EventsSelect<T extends boolean = true> {
12642
12964
  endMode?: T;
12643
12965
  count?: T;
12644
12966
  until?: T;
12967
+ untilDate?: T;
12645
12968
  rrule?: T;
12646
12969
  rdates?: T | {
12647
12970
  date?: T;
@@ -12782,6 +13105,9 @@ interface EventOccurrencesSelect<T extends boolean = true> {
12782
13105
  endsAt?: T;
12783
13106
  timezone?: T;
12784
13107
  isAllDay?: T;
13108
+ allDayStartDate?: T;
13109
+ allDayEndDateExclusive?: T;
13110
+ allDayAuthorityTimezone?: T;
12785
13111
  status?: T;
12786
13112
  parentPublic?: T;
12787
13113
  locationOverride?: T | {
@@ -12931,6 +13257,10 @@ interface CustomerMembershipsSelect<T extends boolean = true> {
12931
13257
  currency?: T;
12932
13258
  billingInterval?: T;
12933
13259
  intervalCount?: T;
13260
+ trialDaysSnapshot?: T;
13261
+ subscribePeriodStart?: T;
13262
+ subscribePeriodEnd?: T;
13263
+ historicalPaidRecoveryEvidence?: T;
12934
13264
  currentPeriodStart?: T;
12935
13265
  currentPeriodEnd?: T;
12936
13266
  nextBillingAt?: T;
@@ -13019,8 +13349,17 @@ interface CommercePaymentAccountsSelect<T extends boolean = true> {
13019
13349
  profileKey?: T;
13020
13350
  country?: T;
13021
13351
  allowedPaymentMethods?: T;
13352
+ standardV2?: T | {
13353
+ channelKey?: T;
13354
+ redirectUrl?: T;
13355
+ };
13022
13356
  };
13023
13357
  isActive?: T;
13358
+ connectionReadinessState?: T;
13359
+ readinessCredentialVersion?: T;
13360
+ readinessConfigurationDigest?: T;
13361
+ readinessCheckedAt?: T;
13362
+ readinessReasonCode?: T;
13024
13363
  credentialVersion?: T;
13025
13364
  credentialState?: T;
13026
13365
  rotatedAt?: T;