@01.software/sdk 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
- import { O as Order, a as Cart, b as CartItem, P as Product, c as OrderItem$1, T as Transaction, d as Fulfillment, R as Return } from './payload-types-DfQct8Dj.cjs';
2
- export { A as Article, e as ArticleAuthor, f as ArticleCategory, g as ArticleTag, D as Document, I as Image, h as Post, i as PostCategory, j as ProductVariant, k as Tenant, V as Video } from './payload-types-DfQct8Dj.cjs';
1
+ import { O as Order, a as Cart, b as CartItem, P as Product, c as OrderItem$1, T as Transaction, d as Fulfillment, R as Return } from './payload-types-D7lnu9By.cjs';
2
+ export { A as Article, e as ArticleAuthor, f as ArticleCategory, g as ArticleTag, D as Document, I as Image, h as Post, i as PostCategory, j as ProductVariant, k as Tenant, V as Video } from './payload-types-D7lnu9By.cjs';
3
3
  import { Sort, Where } from 'payload';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { QueryClient, InfiniteData } from '@tanstack/react-query';
6
6
  import { Metadata } from 'next';
7
- import { C as CollectionType } from './webhook-CJq7v5Da.cjs';
8
- export { d as CUSTOMER_PASSWORD_RESET_OPERATION, g as CustomerAuthWebhookEvent, h as CustomerAuthWebhookHandlers, e as CustomerPasswordResetWebhookData, f as CustomerPasswordResetWebhookEvent, a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, k as createCustomerAuthWebhookHandler, m as createTypedWebhookHandler, l as handleWebhook, j as isCustomerPasswordResetWebhookEvent, i as isValidWebhookEvent } from './webhook-CJq7v5Da.cjs';
9
- import { P as PublicCollection } from './const-CkhnGqnb.cjs';
10
- export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS } from './const-CkhnGqnb.cjs';
7
+ import { C as CollectionType } from './webhook-C4BwXP5T.cjs';
8
+ export { d as CUSTOMER_PASSWORD_RESET_OPERATION, g as CustomerAuthWebhookEvent, h as CustomerAuthWebhookHandlers, e as CustomerPasswordResetWebhookData, f as CustomerPasswordResetWebhookEvent, a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, k as createCustomerAuthWebhookHandler, m as createTypedWebhookHandler, l as handleWebhook, j as isCustomerPasswordResetWebhookEvent, i as isValidWebhookEvent } from './webhook-C4BwXP5T.cjs';
9
+ import { P as PublicCollection } from './const-BApEF1Hu.cjs';
10
+ export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS } from './const-BApEF1Hu.cjs';
11
11
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
12
12
  export { b as IMAGE_SIZES, I as ImageData, a as ImagePalette, f as ImagePlaceholderOptions, d as getImageLqip, e as getImagePalette, h as getImagePlaceholderStyle, c as getImageSrcSet, g as getImageUrl } from './image-TT8lTsk5.cjs';
13
13
  export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from './video-DbLL8yuc.cjs';
@@ -1045,11 +1045,30 @@ type UpdateOrderParams = {
1045
1045
  orderNumber: string;
1046
1046
  status: Order['status'];
1047
1047
  };
1048
+ type TransactionStatus = 'pending' | 'paid' | 'failed' | 'canceled';
1048
1049
  type UpdateTransactionParams = {
1049
1050
  pgPaymentId: string;
1050
- status: Transaction['status'];
1051
+ status: TransactionStatus;
1051
1052
  paymentMethod?: string;
1052
1053
  receiptUrl?: string;
1054
+ paymentKey?: string;
1055
+ amount?: number;
1056
+ };
1057
+ type RestockAction = 'return_to_stock' | 'discard';
1058
+ type ReturnWithRefundItem = {
1059
+ orderItem: string | number;
1060
+ quantity: number;
1061
+ restockAction?: RestockAction;
1062
+ };
1063
+ type ReturnWithRefundParams = {
1064
+ orderNumber: string;
1065
+ reason?: ReturnReason;
1066
+ reasonDetail?: string;
1067
+ returnItems: ReturnWithRefundItem[];
1068
+ refundAmount: number;
1069
+ pgPaymentId: string;
1070
+ paymentKey?: string;
1071
+ refundReceiptUrl?: string;
1053
1072
  };
1054
1073
  type CheckoutParams = {
1055
1074
  cartId: string;
@@ -1101,15 +1120,6 @@ type UpdateReturnParams = {
1101
1120
  returnId: string;
1102
1121
  status: 'processing' | 'approved' | 'rejected' | 'completed';
1103
1122
  };
1104
- type ReturnWithRefundParams = {
1105
- orderNumber: string;
1106
- reason?: ReturnReason;
1107
- reasonDetail?: string;
1108
- returnItems: ReturnItem[];
1109
- refundAmount: number;
1110
- pgPaymentId: string;
1111
- refundReceiptUrl?: string;
1112
- };
1113
1123
  declare class OrderApi extends BaseApi {
1114
1124
  constructor(options: OrderApiOptions);
1115
1125
  createOrder(params: CreateOrderParams): Promise<Order>;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { O as Order, a as Cart, b as CartItem, P as Product, c as OrderItem$1, T as Transaction, d as Fulfillment, R as Return } from './payload-types-DfQct8Dj.js';
2
- export { A as Article, e as ArticleAuthor, f as ArticleCategory, g as ArticleTag, D as Document, I as Image, h as Post, i as PostCategory, j as ProductVariant, k as Tenant, V as Video } from './payload-types-DfQct8Dj.js';
1
+ import { O as Order, a as Cart, b as CartItem, P as Product, c as OrderItem$1, T as Transaction, d as Fulfillment, R as Return } from './payload-types-D7lnu9By.js';
2
+ export { A as Article, e as ArticleAuthor, f as ArticleCategory, g as ArticleTag, D as Document, I as Image, h as Post, i as PostCategory, j as ProductVariant, k as Tenant, V as Video } from './payload-types-D7lnu9By.js';
3
3
  import { Sort, Where } from 'payload';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { QueryClient, InfiniteData } from '@tanstack/react-query';
6
6
  import { Metadata } from 'next';
7
- import { C as CollectionType } from './webhook-CKqXQInG.js';
8
- export { d as CUSTOMER_PASSWORD_RESET_OPERATION, g as CustomerAuthWebhookEvent, h as CustomerAuthWebhookHandlers, e as CustomerPasswordResetWebhookData, f as CustomerPasswordResetWebhookEvent, a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, k as createCustomerAuthWebhookHandler, m as createTypedWebhookHandler, l as handleWebhook, j as isCustomerPasswordResetWebhookEvent, i as isValidWebhookEvent } from './webhook-CKqXQInG.js';
9
- import { P as PublicCollection } from './const-B9oeZoDy.js';
10
- export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS } from './const-B9oeZoDy.js';
7
+ import { C as CollectionType } from './webhook-C6vne8Ve.js';
8
+ export { d as CUSTOMER_PASSWORD_RESET_OPERATION, g as CustomerAuthWebhookEvent, h as CustomerAuthWebhookHandlers, e as CustomerPasswordResetWebhookData, f as CustomerPasswordResetWebhookEvent, a as WebhookEvent, b as WebhookHandler, W as WebhookOperation, c as WebhookOptions, k as createCustomerAuthWebhookHandler, m as createTypedWebhookHandler, l as handleWebhook, j as isCustomerPasswordResetWebhookEvent, i as isValidWebhookEvent } from './webhook-C6vne8Ve.js';
9
+ import { P as PublicCollection } from './const-BNJRuk3V.js';
10
+ export { a as COLLECTIONS, C as Collection, I as INTERNAL_COLLECTIONS } from './const-BNJRuk3V.js';
11
11
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
12
12
  export { b as IMAGE_SIZES, I as ImageData, a as ImagePalette, f as ImagePlaceholderOptions, d as getImageLqip, e as getImagePalette, h as getImagePlaceholderStyle, c as getImageSrcSet, g as getImageUrl } from './image-TT8lTsk5.js';
13
13
  export { e as VideoGifOptions, V as VideoThumbnailOptions, a as getVideoGif, c as getVideoMp4Url, d as getVideoStoryboard, b as getVideoStreamUrl, g as getVideoThumbnail } from './video-DbLL8yuc.js';
@@ -1045,11 +1045,30 @@ type UpdateOrderParams = {
1045
1045
  orderNumber: string;
1046
1046
  status: Order['status'];
1047
1047
  };
1048
+ type TransactionStatus = 'pending' | 'paid' | 'failed' | 'canceled';
1048
1049
  type UpdateTransactionParams = {
1049
1050
  pgPaymentId: string;
1050
- status: Transaction['status'];
1051
+ status: TransactionStatus;
1051
1052
  paymentMethod?: string;
1052
1053
  receiptUrl?: string;
1054
+ paymentKey?: string;
1055
+ amount?: number;
1056
+ };
1057
+ type RestockAction = 'return_to_stock' | 'discard';
1058
+ type ReturnWithRefundItem = {
1059
+ orderItem: string | number;
1060
+ quantity: number;
1061
+ restockAction?: RestockAction;
1062
+ };
1063
+ type ReturnWithRefundParams = {
1064
+ orderNumber: string;
1065
+ reason?: ReturnReason;
1066
+ reasonDetail?: string;
1067
+ returnItems: ReturnWithRefundItem[];
1068
+ refundAmount: number;
1069
+ pgPaymentId: string;
1070
+ paymentKey?: string;
1071
+ refundReceiptUrl?: string;
1053
1072
  };
1054
1073
  type CheckoutParams = {
1055
1074
  cartId: string;
@@ -1101,15 +1120,6 @@ type UpdateReturnParams = {
1101
1120
  returnId: string;
1102
1121
  status: 'processing' | 'approved' | 'rejected' | 'completed';
1103
1122
  };
1104
- type ReturnWithRefundParams = {
1105
- orderNumber: string;
1106
- reason?: ReturnReason;
1107
- reasonDetail?: string;
1108
- returnItems: ReturnItem[];
1109
- refundAmount: number;
1110
- pgPaymentId: string;
1111
- refundReceiptUrl?: string;
1112
- };
1113
1123
  declare class OrderApi extends BaseApi {
1114
1124
  constructor(options: OrderApiOptions);
1115
1125
  createOrder(params: CreateOrderParams): Promise<Order>;
package/dist/index.js CHANGED
@@ -1052,6 +1052,7 @@ var COLLECTIONS = [
1052
1052
  // Events
1053
1053
  "event-calendars",
1054
1054
  "events",
1055
+ "event-categories",
1055
1056
  "event-occurrences",
1056
1057
  "event-tags"
1057
1058
  ];