@01.software/sdk 0.2.9-dev.260305.35fd2d4 → 0.2.9-dev.260306.1a05ae3
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/{auth-CDyJoENT.d.cts → auth-CveDznSJ.d.cts} +1 -1
- package/dist/{auth-Gb34eOkR.d.ts → auth-DmZlBU74.d.ts} +1 -1
- package/dist/auth.d.cts +2 -2
- package/dist/auth.d.ts +2 -2
- package/dist/components.cjs +128 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +62 -3
- package/dist/components.d.ts +62 -3
- package/dist/components.js +128 -0
- package/dist/components.js.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -14
- package/dist/index.d.ts +22 -14
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BFAXKjly.d.cts → payload-types-CoLxaq7L.d.cts} +154 -154
- package/dist/{payload-types-BFAXKjly.d.ts → payload-types-CoLxaq7L.d.ts} +154 -154
- package/dist/{webhook-CmbS5Uu3.d.cts → webhook-BESEe9jO.d.cts} +1 -1
- package/dist/{webhook-Ct6PD0Ys.d.ts → webhook-DuERNp5A.d.ts} +1 -1
- package/dist/webhook.d.cts +2 -2
- package/dist/webhook.d.ts +2 -2
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { O as Order, a as OrderProduct, T as Transaction, b as Fulfillment, R as Return, C as CartItem, P as
|
|
2
|
-
export { k as ApiUsage, ag as ApiUsageSelect, A as Audience, ac as AudiencesSelect, b4 as Auth, m as BillingHistory, ai as BillingHistorySelect, u as Brand, B as BrandLogo, as as BrandLogosSelect, ar as BrandsSelect, K as Cart,
|
|
3
|
-
import { F as FetchOptions, A as ApiQueryOptions, P as PayloadFindResponse, a as PayloadMutationResponse, C as ClientBrowserConfig, b as ClientState, c as ClientServerConfig } from './auth-
|
|
4
|
-
export { t as API_URLS, f as ApiError, y as ApiQueryReactOptions, w as ClientMetadata, g as ConfigError, d as DebugConfig, D as DeepPartial, s as Environment, e as ErrorLogger, E as ExtractArrayType, J as JwtPayload, N as NetworkError, x as PaginationMeta, R as RetryConfig, S as SDKError, T as TimeoutError, U as UsageLimitError, V as ValidationError, q as createApiKey, o as createServerToken, p as decodeServerToken, k as isApiError, l as isConfigError, h as isNetworkError, i as isSDKError, m as isTimeoutError, n as isUsageLimitError, j as isValidationError, r as parseApiKey, u as resolveApiUrl, v as verifyServerToken } from './auth-
|
|
1
|
+
import { O as Order, a as OrderProduct, T as Transaction, b as Fulfillment, R as Return, C as CartItem, P as Product } from './payload-types-CoLxaq7L.cjs';
|
|
2
|
+
export { k as ApiUsage, ag as ApiUsageSelect, A as Audience, ac as AudiencesSelect, b4 as Auth, m as BillingHistory, ai as BillingHistorySelect, u as Brand, B as BrandLogo, as as BrandLogosSelect, ar as BrandsSelect, K as Cart, aJ as CartItemsSelect, aI as CartsSelect, f as CodeBlock, b3 as CollectionsWidget, c as Config, w as Customer, z as CustomerAddress, aF as CustomerAddressesSelect, d as CustomerAuthOperations, x as CustomerGroup, y as CustomerGroupImage, aH as CustomerGroupImagesSelect, aG as CustomerGroupsSelect, aE as CustomersSelect, L as Discount, aK as DiscountsSelect, Y as Document, aR as DocumentCategoriesSelect, $ as DocumentCategory, _ as DocumentImage, aT as DocumentImagesSelect, Z as DocumentType, aS as DocumentTypesSelect, aQ as DocumentsSelect, E as EmailLog, ad as EmailLogsSelect, H as Exchange, J as ExchangeProduct, aC as ExchangeProductsSelect, aB as ExchangesSelect, a3 as Flow, a4 as FlowImage, aY as FlowImagesSelect, aX as FlowsSelect, F as Form, a5 as FormSubmission, a_ as FormSubmissionsSelect, aZ as FormsSelect, D as FulfillmentItem, ay as FulfillmentItemsSelect, ax as FulfillmentsSelect, I as IframeBlock, M as Media, ab as MediaSelect, a1 as Music, aV as MusicsSelect, av as OrderProductsSelect, au as OrdersSelect, a6 as PayloadKv, a$ as PayloadKvSelect, a7 as PayloadLockedDocument, b0 as PayloadLockedDocumentsSelect, a9 as PayloadMigration, b2 as PayloadMigrationsSelect, a8 as PayloadPreference, b1 as PayloadPreferencesSelect, e as PlayerBlock, a0 as Playlist, a2 as PlaylistImage, aW as PlaylistImagesSelect, aU as PlaylistsSelect, N as Post, V as PostAuthor, aM as PostAuthorsSelect, aN as PostCategoriesSelect, W as PostCategory, Q as PostImage, aP as PostImagesSelect, X as PostTag, aO as PostTagsSelect, aL as PostsSelect, ao as ProductCategoriesSelect, r as ProductCategory, t as ProductCollection, aq as ProductCollectionsSelect, o as ProductImage, at as ProductImagesSelect, q as ProductOption, an as ProductOptionsSelect, s as ProductTag, ap as ProductTagsSelect, p as ProductVariant, am as ProductVariantsSelect, al as ProductsSelect, G as ReturnProduct, aA as ReturnProductsSelect, az as ReturnsSelect, aD as ShippingPoliciesSelect, v as ShippingPolicy, l as Subscription, ah as SubscriptionsSelect, S as SupportedTimezones, h as Tenant, n as TenantLogo, aj as TenantLogosSelect, af as TenantMetadataSelect, i as TenantMetadatum, j as TenantOgImage, ak as TenantOgImagesSelect, ae as TenantsSelect, aw as TransactionsSelect, g as User, U as UserAuthOperations, aa as UsersSelect } from './payload-types-CoLxaq7L.cjs';
|
|
3
|
+
import { F as FetchOptions, A as ApiQueryOptions, P as PayloadFindResponse, a as PayloadMutationResponse, C as ClientBrowserConfig, b as ClientState, c as ClientServerConfig } from './auth-CveDznSJ.cjs';
|
|
4
|
+
export { t as API_URLS, f as ApiError, y as ApiQueryReactOptions, w as ClientMetadata, g as ConfigError, d as DebugConfig, D as DeepPartial, s as Environment, e as ErrorLogger, E as ExtractArrayType, J as JwtPayload, N as NetworkError, x as PaginationMeta, R as RetryConfig, S as SDKError, T as TimeoutError, U as UsageLimitError, V as ValidationError, q as createApiKey, o as createServerToken, p as decodeServerToken, k as isApiError, l as isConfigError, h as isNetworkError, i as isSDKError, m as isTimeoutError, n as isUsageLimitError, j as isValidationError, r as parseApiKey, u as resolveApiUrl, v as verifyServerToken } from './auth-CveDznSJ.cjs';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import { QueryClient } from '@tanstack/react-query';
|
|
7
|
-
import { P as PublicCollection, C as CollectionType } from './webhook-
|
|
8
|
-
export { b as COLLECTIONS, a as Collection, c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-
|
|
7
|
+
import { P as PublicCollection, C as CollectionType } from './webhook-BESEe9jO.cjs';
|
|
8
|
+
export { b as COLLECTIONS, a as Collection, c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-BESEe9jO.cjs';
|
|
9
9
|
import { Metadata } from 'next';
|
|
10
10
|
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';
|
|
11
11
|
import 'payload';
|
|
@@ -16,12 +16,17 @@ interface OrderApiOptions {
|
|
|
16
16
|
baseUrl?: string;
|
|
17
17
|
}
|
|
18
18
|
type CreateOrderParams = {
|
|
19
|
-
paymentId: string;
|
|
20
19
|
orderNumber: string;
|
|
21
|
-
|
|
20
|
+
customer?: string;
|
|
21
|
+
customerSnapshot: {
|
|
22
|
+
name?: string;
|
|
23
|
+
email: string;
|
|
24
|
+
phone?: string;
|
|
25
|
+
};
|
|
22
26
|
shippingAddress: Order['shippingAddress'];
|
|
23
27
|
orderProducts: Omit<OrderProduct, 'id' | 'brand' | 'createdAt' | 'updatedAt' | 'order' | 'status'>[];
|
|
24
28
|
totalAmount: number;
|
|
29
|
+
paymentId?: string;
|
|
25
30
|
};
|
|
26
31
|
type UpdateOrderParams = {
|
|
27
32
|
orderNumber: string;
|
|
@@ -30,18 +35,18 @@ type UpdateOrderParams = {
|
|
|
30
35
|
type UpdateTransactionParams = {
|
|
31
36
|
paymentId: string;
|
|
32
37
|
status: Transaction['status'];
|
|
33
|
-
paymentMethod
|
|
34
|
-
receiptUrl
|
|
38
|
+
paymentMethod?: string;
|
|
39
|
+
receiptUrl?: string;
|
|
35
40
|
};
|
|
36
41
|
type CheckoutParams = {
|
|
37
42
|
cartId: string;
|
|
38
|
-
paymentId: string;
|
|
39
43
|
orderNumber: string;
|
|
40
44
|
customerSnapshot: {
|
|
41
45
|
name?: string;
|
|
42
46
|
email: string;
|
|
43
47
|
phone?: string;
|
|
44
48
|
};
|
|
49
|
+
paymentId?: string;
|
|
45
50
|
};
|
|
46
51
|
type CreateFulfillmentParams = {
|
|
47
52
|
orderNumber: string;
|
|
@@ -71,7 +76,7 @@ type UpdateReturnParams = {
|
|
|
71
76
|
};
|
|
72
77
|
type ReturnWithRefundParams = {
|
|
73
78
|
orderNumber: string;
|
|
74
|
-
reason?:
|
|
79
|
+
reason?: 'change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other';
|
|
75
80
|
reasonDetail?: string;
|
|
76
81
|
returnProducts: Array<{
|
|
77
82
|
orderProduct: string;
|
|
@@ -681,7 +686,10 @@ declare function getQueryClient(): QueryClient;
|
|
|
681
686
|
|
|
682
687
|
declare const generateOrderNumber: () => string;
|
|
683
688
|
|
|
684
|
-
|
|
689
|
+
type OrderItem = {
|
|
690
|
+
product: Product | string | null | undefined;
|
|
691
|
+
};
|
|
692
|
+
declare const formatOrderName: (items: OrderItem[]) => string;
|
|
685
693
|
|
|
686
694
|
/**
|
|
687
695
|
* Resolves a Payload CMS relation field value.
|
|
@@ -696,4 +704,4 @@ declare const resolveRelation: <T>(ref: T | string | null | undefined) => T | nu
|
|
|
696
704
|
/** @deprecated Use `resolveRelation` instead */
|
|
697
705
|
declare const objectFor: <T>(ref: T | string | null | undefined) => T | null;
|
|
698
706
|
|
|
699
|
-
export { type AddItemParams, ApiQueryOptions, BrowserClient, BrowserClient as BrowserClientType, CartApi, type CartApiOptions, CartItem, type CheckoutParams, ClientBrowserConfig, ClientServerConfig, ClientState, CollectionClient, type CollectionDetailQueryParams, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, CollectionType, type CreateFulfillmentParams, type CreateOrderParams, type CreateReturnParams, CustomerAuth, type CustomerAuthOptions, type CustomerAuthResponse, type CustomerLoginData, type CustomerProfile, type CustomerRefreshResponse, type CustomerRegisterData, Fulfillment, type GenerateMetadataOptions, type GetOrderParams, Order, OrderApi, type OrderApiOptions, OrderProduct, PayloadFindResponse, PayloadMutationResponse, ProductApi, type ProductApiOptions,
|
|
707
|
+
export { type AddItemParams, ApiQueryOptions, BrowserClient, BrowserClient as BrowserClientType, CartApi, type CartApiOptions, CartItem, type CheckoutParams, ClientBrowserConfig, ClientServerConfig, ClientState, CollectionClient, type CollectionDetailQueryParams, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, CollectionType, type CreateFulfillmentParams, type CreateOrderParams, type CreateReturnParams, CustomerAuth, type CustomerAuthOptions, type CustomerAuthResponse, type CustomerLoginData, type CustomerProfile, type CustomerRefreshResponse, type CustomerRegisterData, Fulfillment, type GenerateMetadataOptions, type GetOrderParams, Order, OrderApi, type OrderApiOptions, OrderProduct, PayloadFindResponse, PayloadMutationResponse, Product, ProductApi, type ProductApiOptions, PublicCollection, QueryHooks, type ReadOnlyQueryBuilder, type ReadOnlyQueryHooks, type RemoveItemParams, Return, type ReturnWithRefundParams, ServerClient, ServerClient as ServerClientType, type StockCheckParams, type StockCheckResponse, type StockCheckResult, Transaction, type UpdateItemParams, type UpdateOrderParams, type UpdateReturnParams, type UpdateTransactionParams, collectionKeys, createBrowserClient, createServerClient, customerKeys, formatOrderName, generateOrderNumber, getQueryClient, objectFor, resolveRelation };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { O as Order, a as OrderProduct, T as Transaction, b as Fulfillment, R as Return, C as CartItem, P as
|
|
2
|
-
export { k as ApiUsage, ag as ApiUsageSelect, A as Audience, ac as AudiencesSelect, b4 as Auth, m as BillingHistory, ai as BillingHistorySelect, u as Brand, B as BrandLogo, as as BrandLogosSelect, ar as BrandsSelect, K as Cart,
|
|
3
|
-
import { F as FetchOptions, A as ApiQueryOptions, P as PayloadFindResponse, a as PayloadMutationResponse, C as ClientBrowserConfig, b as ClientState, c as ClientServerConfig } from './auth-
|
|
4
|
-
export { t as API_URLS, f as ApiError, y as ApiQueryReactOptions, w as ClientMetadata, g as ConfigError, d as DebugConfig, D as DeepPartial, s as Environment, e as ErrorLogger, E as ExtractArrayType, J as JwtPayload, N as NetworkError, x as PaginationMeta, R as RetryConfig, S as SDKError, T as TimeoutError, U as UsageLimitError, V as ValidationError, q as createApiKey, o as createServerToken, p as decodeServerToken, k as isApiError, l as isConfigError, h as isNetworkError, i as isSDKError, m as isTimeoutError, n as isUsageLimitError, j as isValidationError, r as parseApiKey, u as resolveApiUrl, v as verifyServerToken } from './auth-
|
|
1
|
+
import { O as Order, a as OrderProduct, T as Transaction, b as Fulfillment, R as Return, C as CartItem, P as Product } from './payload-types-CoLxaq7L.js';
|
|
2
|
+
export { k as ApiUsage, ag as ApiUsageSelect, A as Audience, ac as AudiencesSelect, b4 as Auth, m as BillingHistory, ai as BillingHistorySelect, u as Brand, B as BrandLogo, as as BrandLogosSelect, ar as BrandsSelect, K as Cart, aJ as CartItemsSelect, aI as CartsSelect, f as CodeBlock, b3 as CollectionsWidget, c as Config, w as Customer, z as CustomerAddress, aF as CustomerAddressesSelect, d as CustomerAuthOperations, x as CustomerGroup, y as CustomerGroupImage, aH as CustomerGroupImagesSelect, aG as CustomerGroupsSelect, aE as CustomersSelect, L as Discount, aK as DiscountsSelect, Y as Document, aR as DocumentCategoriesSelect, $ as DocumentCategory, _ as DocumentImage, aT as DocumentImagesSelect, Z as DocumentType, aS as DocumentTypesSelect, aQ as DocumentsSelect, E as EmailLog, ad as EmailLogsSelect, H as Exchange, J as ExchangeProduct, aC as ExchangeProductsSelect, aB as ExchangesSelect, a3 as Flow, a4 as FlowImage, aY as FlowImagesSelect, aX as FlowsSelect, F as Form, a5 as FormSubmission, a_ as FormSubmissionsSelect, aZ as FormsSelect, D as FulfillmentItem, ay as FulfillmentItemsSelect, ax as FulfillmentsSelect, I as IframeBlock, M as Media, ab as MediaSelect, a1 as Music, aV as MusicsSelect, av as OrderProductsSelect, au as OrdersSelect, a6 as PayloadKv, a$ as PayloadKvSelect, a7 as PayloadLockedDocument, b0 as PayloadLockedDocumentsSelect, a9 as PayloadMigration, b2 as PayloadMigrationsSelect, a8 as PayloadPreference, b1 as PayloadPreferencesSelect, e as PlayerBlock, a0 as Playlist, a2 as PlaylistImage, aW as PlaylistImagesSelect, aU as PlaylistsSelect, N as Post, V as PostAuthor, aM as PostAuthorsSelect, aN as PostCategoriesSelect, W as PostCategory, Q as PostImage, aP as PostImagesSelect, X as PostTag, aO as PostTagsSelect, aL as PostsSelect, ao as ProductCategoriesSelect, r as ProductCategory, t as ProductCollection, aq as ProductCollectionsSelect, o as ProductImage, at as ProductImagesSelect, q as ProductOption, an as ProductOptionsSelect, s as ProductTag, ap as ProductTagsSelect, p as ProductVariant, am as ProductVariantsSelect, al as ProductsSelect, G as ReturnProduct, aA as ReturnProductsSelect, az as ReturnsSelect, aD as ShippingPoliciesSelect, v as ShippingPolicy, l as Subscription, ah as SubscriptionsSelect, S as SupportedTimezones, h as Tenant, n as TenantLogo, aj as TenantLogosSelect, af as TenantMetadataSelect, i as TenantMetadatum, j as TenantOgImage, ak as TenantOgImagesSelect, ae as TenantsSelect, aw as TransactionsSelect, g as User, U as UserAuthOperations, aa as UsersSelect } from './payload-types-CoLxaq7L.js';
|
|
3
|
+
import { F as FetchOptions, A as ApiQueryOptions, P as PayloadFindResponse, a as PayloadMutationResponse, C as ClientBrowserConfig, b as ClientState, c as ClientServerConfig } from './auth-DmZlBU74.js';
|
|
4
|
+
export { t as API_URLS, f as ApiError, y as ApiQueryReactOptions, w as ClientMetadata, g as ConfigError, d as DebugConfig, D as DeepPartial, s as Environment, e as ErrorLogger, E as ExtractArrayType, J as JwtPayload, N as NetworkError, x as PaginationMeta, R as RetryConfig, S as SDKError, T as TimeoutError, U as UsageLimitError, V as ValidationError, q as createApiKey, o as createServerToken, p as decodeServerToken, k as isApiError, l as isConfigError, h as isNetworkError, i as isSDKError, m as isTimeoutError, n as isUsageLimitError, j as isValidationError, r as parseApiKey, u as resolveApiUrl, v as verifyServerToken } from './auth-DmZlBU74.js';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import { QueryClient } from '@tanstack/react-query';
|
|
7
|
-
import { P as PublicCollection, C as CollectionType } from './webhook-
|
|
8
|
-
export { b as COLLECTIONS, a as Collection, c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-
|
|
7
|
+
import { P as PublicCollection, C as CollectionType } from './webhook-DuERNp5A.js';
|
|
8
|
+
export { b as COLLECTIONS, a as Collection, c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-DuERNp5A.js';
|
|
9
9
|
import { Metadata } from 'next';
|
|
10
10
|
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';
|
|
11
11
|
import 'payload';
|
|
@@ -16,12 +16,17 @@ interface OrderApiOptions {
|
|
|
16
16
|
baseUrl?: string;
|
|
17
17
|
}
|
|
18
18
|
type CreateOrderParams = {
|
|
19
|
-
paymentId: string;
|
|
20
19
|
orderNumber: string;
|
|
21
|
-
|
|
20
|
+
customer?: string;
|
|
21
|
+
customerSnapshot: {
|
|
22
|
+
name?: string;
|
|
23
|
+
email: string;
|
|
24
|
+
phone?: string;
|
|
25
|
+
};
|
|
22
26
|
shippingAddress: Order['shippingAddress'];
|
|
23
27
|
orderProducts: Omit<OrderProduct, 'id' | 'brand' | 'createdAt' | 'updatedAt' | 'order' | 'status'>[];
|
|
24
28
|
totalAmount: number;
|
|
29
|
+
paymentId?: string;
|
|
25
30
|
};
|
|
26
31
|
type UpdateOrderParams = {
|
|
27
32
|
orderNumber: string;
|
|
@@ -30,18 +35,18 @@ type UpdateOrderParams = {
|
|
|
30
35
|
type UpdateTransactionParams = {
|
|
31
36
|
paymentId: string;
|
|
32
37
|
status: Transaction['status'];
|
|
33
|
-
paymentMethod
|
|
34
|
-
receiptUrl
|
|
38
|
+
paymentMethod?: string;
|
|
39
|
+
receiptUrl?: string;
|
|
35
40
|
};
|
|
36
41
|
type CheckoutParams = {
|
|
37
42
|
cartId: string;
|
|
38
|
-
paymentId: string;
|
|
39
43
|
orderNumber: string;
|
|
40
44
|
customerSnapshot: {
|
|
41
45
|
name?: string;
|
|
42
46
|
email: string;
|
|
43
47
|
phone?: string;
|
|
44
48
|
};
|
|
49
|
+
paymentId?: string;
|
|
45
50
|
};
|
|
46
51
|
type CreateFulfillmentParams = {
|
|
47
52
|
orderNumber: string;
|
|
@@ -71,7 +76,7 @@ type UpdateReturnParams = {
|
|
|
71
76
|
};
|
|
72
77
|
type ReturnWithRefundParams = {
|
|
73
78
|
orderNumber: string;
|
|
74
|
-
reason?:
|
|
79
|
+
reason?: 'change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other';
|
|
75
80
|
reasonDetail?: string;
|
|
76
81
|
returnProducts: Array<{
|
|
77
82
|
orderProduct: string;
|
|
@@ -681,7 +686,10 @@ declare function getQueryClient(): QueryClient;
|
|
|
681
686
|
|
|
682
687
|
declare const generateOrderNumber: () => string;
|
|
683
688
|
|
|
684
|
-
|
|
689
|
+
type OrderItem = {
|
|
690
|
+
product: Product | string | null | undefined;
|
|
691
|
+
};
|
|
692
|
+
declare const formatOrderName: (items: OrderItem[]) => string;
|
|
685
693
|
|
|
686
694
|
/**
|
|
687
695
|
* Resolves a Payload CMS relation field value.
|
|
@@ -696,4 +704,4 @@ declare const resolveRelation: <T>(ref: T | string | null | undefined) => T | nu
|
|
|
696
704
|
/** @deprecated Use `resolveRelation` instead */
|
|
697
705
|
declare const objectFor: <T>(ref: T | string | null | undefined) => T | null;
|
|
698
706
|
|
|
699
|
-
export { type AddItemParams, ApiQueryOptions, BrowserClient, BrowserClient as BrowserClientType, CartApi, type CartApiOptions, CartItem, type CheckoutParams, ClientBrowserConfig, ClientServerConfig, ClientState, CollectionClient, type CollectionDetailQueryParams, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, CollectionType, type CreateFulfillmentParams, type CreateOrderParams, type CreateReturnParams, CustomerAuth, type CustomerAuthOptions, type CustomerAuthResponse, type CustomerLoginData, type CustomerProfile, type CustomerRefreshResponse, type CustomerRegisterData, Fulfillment, type GenerateMetadataOptions, type GetOrderParams, Order, OrderApi, type OrderApiOptions, OrderProduct, PayloadFindResponse, PayloadMutationResponse, ProductApi, type ProductApiOptions,
|
|
707
|
+
export { type AddItemParams, ApiQueryOptions, BrowserClient, BrowserClient as BrowserClientType, CartApi, type CartApiOptions, CartItem, type CheckoutParams, ClientBrowserConfig, ClientServerConfig, ClientState, CollectionClient, type CollectionDetailQueryParams, type CollectionInfiniteQueryParams, CollectionQueryBuilder, type CollectionQueryParams, CollectionType, type CreateFulfillmentParams, type CreateOrderParams, type CreateReturnParams, CustomerAuth, type CustomerAuthOptions, type CustomerAuthResponse, type CustomerLoginData, type CustomerProfile, type CustomerRefreshResponse, type CustomerRegisterData, Fulfillment, type GenerateMetadataOptions, type GetOrderParams, Order, OrderApi, type OrderApiOptions, OrderProduct, PayloadFindResponse, PayloadMutationResponse, Product, ProductApi, type ProductApiOptions, PublicCollection, QueryHooks, type ReadOnlyQueryBuilder, type ReadOnlyQueryHooks, type RemoveItemParams, Return, type ReturnWithRefundParams, ServerClient, ServerClient as ServerClientType, type StockCheckParams, type StockCheckResponse, type StockCheckResult, Transaction, type UpdateItemParams, type UpdateOrderParams, type UpdateReturnParams, type UpdateTransactionParams, collectionKeys, createBrowserClient, createServerClient, customerKeys, formatOrderName, generateOrderNumber, getQueryClient, objectFor, resolveRelation };
|
package/dist/index.js
CHANGED
|
@@ -156,8 +156,8 @@ var createUsageLimitError = (message, usage, details, userMessage, suggestion) =
|
|
|
156
156
|
// src/core/client/types.ts
|
|
157
157
|
var API_URLS = {
|
|
158
158
|
local: "http://localhost:3000",
|
|
159
|
-
development: "https://dev.01.software",
|
|
160
|
-
staging: "https://stg.01.software",
|
|
159
|
+
development: "https://api-dev.01.software",
|
|
160
|
+
staging: "https://api-stg.01.software",
|
|
161
161
|
production: "https://api.01.software"
|
|
162
162
|
};
|
|
163
163
|
function resolveApiUrl(config) {
|
|
@@ -1987,11 +1987,11 @@ var generateOrderNumber = () => {
|
|
|
1987
1987
|
};
|
|
1988
1988
|
|
|
1989
1989
|
// src/utils/order/formatOrderName.ts
|
|
1990
|
-
var formatOrderName = (
|
|
1990
|
+
var formatOrderName = (items) => {
|
|
1991
1991
|
var _a, _b;
|
|
1992
|
-
if (
|
|
1993
|
-
const firstTitle = ((_b = resolveRelation((_a =
|
|
1994
|
-
return
|
|
1992
|
+
if (items.length === 0) return "";
|
|
1993
|
+
const firstTitle = ((_b = resolveRelation((_a = items[0]) == null ? void 0 : _a.product)) == null ? void 0 : _b.title) || "";
|
|
1994
|
+
return items.length === 1 ? firstTitle : `${firstTitle} \uC678 ${items.length - 1}\uAC74`;
|
|
1995
1995
|
};
|
|
1996
1996
|
export {
|
|
1997
1997
|
ApiError,
|