@01.software/sdk 0.43.0 → 0.44.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 (37) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +17 -18
  3. package/dist/client.cjs.map +1 -1
  4. package/dist/client.d.cts +6 -6
  5. package/dist/client.d.ts +6 -6
  6. package/dist/client.js.map +1 -1
  7. package/dist/{collection-client-gWsA7BVP.d.ts → collection-client-DWooaiTr.d.ts} +3 -3
  8. package/dist/{collection-client-U70KizLf.d.cts → collection-client-Dyl-CDcj.d.cts} +3 -3
  9. package/dist/{const-BBynifk0.d.cts → const-1vleZ6ov.d.cts} +1 -1
  10. package/dist/{const-_WWHU-gX.d.ts → const-pGDnsy0o.d.ts} +1 -1
  11. package/dist/{index-DPi5NWU8.d.ts → index-DUNySyxV.d.ts} +3 -3
  12. package/dist/{index-Dg4Y6Aq7.d.cts → index-a6g7vqAD.d.cts} +3 -3
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +7 -7
  15. package/dist/index.d.ts +7 -7
  16. package/dist/index.js.map +1 -1
  17. package/dist/{payload-types-DLxkB7Mv.d.cts → payload-types-CDsuOEfM.d.cts} +4 -9
  18. package/dist/{payload-types-DLxkB7Mv.d.ts → payload-types-CDsuOEfM.d.ts} +4 -9
  19. package/dist/query.d.cts +5 -5
  20. package/dist/query.d.ts +5 -5
  21. package/dist/realtime.d.cts +2 -2
  22. package/dist/realtime.d.ts +2 -2
  23. package/dist/server.cjs.map +1 -1
  24. package/dist/server.d.cts +7 -7
  25. package/dist/server.d.ts +7 -7
  26. package/dist/server.js.map +1 -1
  27. package/dist/{types-Bpx5sYKo.d.cts → types-CDND3hzq.d.cts} +12 -7
  28. package/dist/{types-B9lGhZlB.d.ts → types-Dt9FJisi.d.ts} +12 -7
  29. package/dist/{types-B1ngKbWI.d.cts → types-SoXsbKhj.d.cts} +1 -1
  30. package/dist/{types-BiKNBwRA.d.ts → types-oiae_LMm.d.ts} +1 -1
  31. package/dist/ui/form.d.cts +1 -1
  32. package/dist/ui/form.d.ts +1 -1
  33. package/dist/ui/video.d.cts +1 -1
  34. package/dist/ui/video.d.ts +1 -1
  35. package/dist/webhook.d.cts +4 -4
  36. package/dist/webhook.d.ts +4 -4
  37. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { P as PublicCollection, S as ServerCollection } from './const-BBynifk0.cjs';
2
- import { C as CollectionType, P as PublicProduct } from './types-B1ngKbWI.cjs';
3
- import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-DLxkB7Mv.cjs';
1
+ import { P as PublicCollection, S as ServerCollection } from './const-1vleZ6ov.cjs';
2
+ import { C as CollectionType, P as PublicProduct } from './types-SoXsbKhj.cjs';
3
+ import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-CDsuOEfM.cjs';
4
4
 
5
5
  interface CustomerScopedApiOptions {
6
6
  publishableKey?: string;
@@ -532,6 +532,13 @@ type CreateOrderLineItemsInput = {
532
532
  */
533
533
  orderItems?: never;
534
534
  };
535
+ type PaymentProviderInput = {
536
+ pgPaymentId: string;
537
+ pgProvider: string;
538
+ } | {
539
+ pgPaymentId?: never;
540
+ pgProvider?: never;
541
+ };
535
542
  type CreateOrderBodyBase = {
536
543
  orderNumber: string;
537
544
  customer?: string;
@@ -539,9 +546,8 @@ type CreateOrderBodyBase = {
539
546
  shippingAddress?: Order['shippingAddress'];
540
547
  totalAmount: number;
541
548
  shippingAmount?: number;
542
- pgPaymentId?: string;
543
549
  discountCode?: string;
544
- };
550
+ } & PaymentProviderInput;
545
551
  type CreateOrderParams = WithIdempotencyKey<CreateOrderBodyBase & CreateOrderLineItemsInput>;
546
552
  type UpdateOrderParams = {
547
553
  orderNumber: string;
@@ -729,9 +735,8 @@ type CheckoutParams = WithIdempotencyKey<{
729
735
  orderNumber: string;
730
736
  customerSnapshot: CustomerSnapshot;
731
737
  shippingAddress?: CheckoutShippingAddress;
732
- pgPaymentId?: string;
733
738
  discountCode?: string;
734
- }>;
739
+ } & PaymentProviderInput>;
735
740
  type CreateFulfillmentParams = WithIdempotencyKey<{
736
741
  orderNumber: string;
737
742
  fulfillmentOrderId?: string | number;
@@ -1,6 +1,6 @@
1
- import { P as PublicCollection, S as ServerCollection } from './const-_WWHU-gX.js';
2
- import { C as CollectionType, P as PublicProduct } from './types-BiKNBwRA.js';
3
- import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-DLxkB7Mv.js';
1
+ import { P as PublicCollection, S as ServerCollection } from './const-pGDnsy0o.js';
2
+ import { C as CollectionType, P as PublicProduct } from './types-oiae_LMm.js';
3
+ import { O as Order, m as Transaction, n as Fulfillment, R as Return } from './payload-types-CDsuOEfM.js';
4
4
 
5
5
  interface CustomerScopedApiOptions {
6
6
  publishableKey?: string;
@@ -532,6 +532,13 @@ type CreateOrderLineItemsInput = {
532
532
  */
533
533
  orderItems?: never;
534
534
  };
535
+ type PaymentProviderInput = {
536
+ pgPaymentId: string;
537
+ pgProvider: string;
538
+ } | {
539
+ pgPaymentId?: never;
540
+ pgProvider?: never;
541
+ };
535
542
  type CreateOrderBodyBase = {
536
543
  orderNumber: string;
537
544
  customer?: string;
@@ -539,9 +546,8 @@ type CreateOrderBodyBase = {
539
546
  shippingAddress?: Order['shippingAddress'];
540
547
  totalAmount: number;
541
548
  shippingAmount?: number;
542
- pgPaymentId?: string;
543
549
  discountCode?: string;
544
- };
550
+ } & PaymentProviderInput;
545
551
  type CreateOrderParams = WithIdempotencyKey<CreateOrderBodyBase & CreateOrderLineItemsInput>;
546
552
  type UpdateOrderParams = {
547
553
  orderNumber: string;
@@ -729,9 +735,8 @@ type CheckoutParams = WithIdempotencyKey<{
729
735
  orderNumber: string;
730
736
  customerSnapshot: CustomerSnapshot;
731
737
  shippingAddress?: CheckoutShippingAddress;
732
- pgPaymentId?: string;
733
738
  discountCode?: string;
734
- }>;
739
+ } & PaymentProviderInput>;
735
740
  type CreateFulfillmentParams = WithIdempotencyKey<{
736
741
  orderNumber: string;
737
742
  fulfillmentOrderId?: string | number;
@@ -1,4 +1,4 @@
1
- import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-DLxkB7Mv.cjs';
1
+ import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-CDsuOEfM.cjs';
2
2
 
3
3
  type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
4
4
  type PublicCustomerProfileListEntry = {
@@ -1,4 +1,4 @@
1
- import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-DLxkB7Mv.js';
1
+ import { P as Product, C as CustomerProfile, a as CustomerProfileStat, b as CustomerProfileList, c as ProductCollection, d as Config } from './payload-types-CDsuOEfM.js';
2
2
 
3
3
  type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
4
4
  type PublicCustomerProfileListEntry = {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { F as Form } from '../payload-types-DLxkB7Mv.cjs';
2
+ import { F as Form } from '../payload-types-CDsuOEfM.cjs';
3
3
  import { RichTextData } from './rich-text.cjs';
4
4
  import '@payloadcms/richtext-lexical';
5
5
  import '@payloadcms/richtext-lexical/lexical';
package/dist/ui/form.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { F as Form } from '../payload-types-DLxkB7Mv.js';
2
+ import { F as Form } from '../payload-types-CDsuOEfM.js';
3
3
  import { RichTextData } from './rich-text.js';
4
4
  import '@payloadcms/richtext-lexical';
5
5
  import '@payloadcms/richtext-lexical/lexical';
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
3
3
  export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
4
- import { V as Video } from '../payload-types-DLxkB7Mv.cjs';
4
+ import { V as Video } from '../payload-types-CDsuOEfM.cjs';
5
5
  export { V as VideoGifOptions, a as VideoThumbnailOptions, g as getVideoGif, b as getVideoMp4Url, c as getVideoStoryboard, d as getVideoStreamUrl, e as getVideoThumbnail } from '../video-WR_TFO9a.cjs';
6
6
 
7
7
  interface VideoPlayerCSSProperties extends CSSProperties {
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import { MuxPlayerProps, MuxPlayerRefAttributes } from '@mux/mux-player-react';
3
3
  export { MuxPlayerRefAttributes as VideoPlayerRef } from '@mux/mux-player-react';
4
- import { V as Video } from '../payload-types-DLxkB7Mv.js';
4
+ import { V as Video } from '../payload-types-CDsuOEfM.js';
5
5
  export { V as VideoGifOptions, a as VideoThumbnailOptions, g as getVideoGif, b as getVideoMp4Url, c as getVideoStoryboard, d as getVideoStreamUrl, e as getVideoThumbnail } from '../video-WR_TFO9a.js';
6
6
 
7
7
  interface VideoPlayerCSSProperties extends CSSProperties {
@@ -1,7 +1,7 @@
1
- export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-Dg4Y6Aq7.cjs';
2
- import { W as Webhook } from './payload-types-DLxkB7Mv.cjs';
3
- import './const-BBynifk0.cjs';
4
- import './types-B1ngKbWI.cjs';
1
+ export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-a6g7vqAD.cjs';
2
+ import { W as Webhook } from './payload-types-CDsuOEfM.cjs';
3
+ import './const-1vleZ6ov.cjs';
4
+ import './types-SoXsbKhj.cjs';
5
5
 
6
6
  /**
7
7
  * Webhook records returned from ordinary list/find — `secret` is encrypted at
package/dist/webhook.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-DPi5NWU8.js';
2
- import { W as Webhook } from './payload-types-DLxkB7Mv.js';
3
- import './const-_WWHU-gX.js';
4
- import './types-BiKNBwRA.js';
1
+ export { C as COMMERCE_NOTIFICATION_EVENTS, a as COMMERCE_NOTIFICATION_EVENT_TYPE, b as COMMERCE_NOTIFICATION_OPERATION, c as CUSTOMER_PASSWORD_RESET_OPERATION, d as CollectionWebhookOperation, e as CommerceEmailChannel, f as CommerceEmailConfig, g as CommerceEmailEventConfig, h as CommerceEmailEventHandlers, i as CommerceEmailHandlerContext, j as CommerceNotification, k as CommerceNotificationData, l as CommerceNotificationEventHandlers, m as CommerceNotificationEventName, n as CommerceNotificationHandlerContext, o as CommerceNotificationSource, p as CommerceNotificationSourceCollection, q as CommerceNotificationWebhookEvent, r as CustomerAuthWebhookEvent, s as CustomerAuthWebhookHandlers, t as CustomerPasswordResetWebhookData, u as CustomerPasswordResetWebhookEvent, O as ORDER_CHANGED_EVENT_TYPE, v as OrderChangedWebhookEvent, W as WebhookChange, w as WebhookCommerceNotificationChange, x as WebhookEvent, y as WebhookHandler, z as WebhookKnownOperation, A as WebhookOperation, B as WebhookOptions, D as WebhookOrderChange, E as WebhookOrderMoved, F as WebhookOrderScope, G as createCommerceEmailWebhookHandler, H as createCommerceNotificationWebhookHandler, I as createCustomerAuthWebhookHandler, J as createTypedWebhookHandler, K as defineCommerceEmailConfig, L as getCommerceNotificationIdempotencyKey, M as handleWebhook, N as isCommerceNotificationWebhookEvent, P as isCustomerPasswordResetWebhookEvent, Q as isOrderChangedWebhookEvent, R as isValidWebhookEvent, S as isWebhookCollection, T as isWebhookOperation } from './index-DUNySyxV.js';
2
+ import { W as Webhook } from './payload-types-CDsuOEfM.js';
3
+ import './const-pGDnsy0o.js';
4
+ import './types-oiae_LMm.js';
5
5
 
6
6
  /**
7
7
  * Webhook records returned from ordinary list/find — `secret` is encrypted at
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@01.software/sdk",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "description": "01.software SDK",
5
5
  "author": "<office@01.works>",
6
6
  "repository": {