@01.software/sdk 0.2.0 → 0.2.2
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-BC0CWHt_.d.ts → auth-BwIP4t_T.d.ts} +1 -1
- package/dist/{auth-BE80zCjC.d.cts → auth-BwRoNck8.d.cts} +1 -1
- package/dist/auth.d.cts +2 -2
- package/dist/auth.d.ts +2 -2
- package/dist/components.cjs +692 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +67 -2
- package/dist/components.d.ts +67 -2
- package/dist/components.js +692 -1
- package/dist/components.js.map +1 -1
- package/dist/image-TT8lTsk5.d.cts +82 -0
- package/dist/image-TT8lTsk5.d.ts +82 -0
- package/dist/index.cjs +37 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -49
- package/dist/index.d.ts +8 -49
- package/dist/index.js +37 -28
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.cts +1 -1
- package/dist/metadata.d.ts +1 -1
- package/dist/{payload-types-BWJZhklJ.d.cts → payload-types-DPdUroGM.d.cts} +110 -15
- package/dist/{payload-types-BWJZhklJ.d.ts → payload-types-DPdUroGM.d.ts} +110 -15
- package/dist/{webhook-DMxUpnQD.d.cts → webhook-4iCoQzsv.d.cts} +2 -2
- package/dist/{webhook-CcdyGpCb.d.ts → webhook-DRpqvA6W.d.ts} +2 -2
- package/dist/webhook.d.cts +2 -2
- package/dist/webhook.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import { O as Order, a as OrderProduct, T as Transaction,
|
|
2
|
-
export {
|
|
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 ProductOption } from './payload-types-DPdUroGM.cjs';
|
|
2
|
+
export { l as ApiUsage, ag as ApiUsageSelect, A as Audience, aa as AudiencesSelect, a$ as Auth, V as Author, aN as AuthorsSelect, n as BillingHistory, ai as BillingHistorySelect, u as Brand, B as BrandLogo, ar as BrandLogosSelect, aq as BrandsSelect, K as Cart, aG as CartItemsSelect, aF as CartsSelect, f as CodeBlock, c as Config, w as Customer, z as CustomerAddress, aC as CustomerAddressesSelect, d as CustomerAuthOperations, x as CustomerGroup, y as CustomerGroupImage, aE as CustomerGroupImagesSelect, aD as CustomerGroupsSelect, aB as CustomersSelect, L as Discount, aH as DiscountsSelect, Y as Document, aP as DocumentCategoriesSelect, $ as DocumentCategory, _ as DocumentImage, aR as DocumentImagesSelect, Z as DocumentType, aQ as DocumentTypesSelect, aO as DocumentsSelect, E as EmailLog, ab as EmailLogsSelect, G as Exchange, H as ExchangeProduct, ax as ExchangeProductsSelect, aw as ExchangesSelect, F as Form, a3 as FormSubmission, aW as FormSubmissionsSelect, aV as FormsSelect, J as FulfillmentItem, az as FulfillmentItemsSelect, ay as FulfillmentsSelect, I as IframeBlock, M as Media, a9 as MediaSelect, a1 as Music, aU as MusicsSelect, at as OrderProductsSelect, as as OrdersSelect, a4 as PayloadKv, aX as PayloadKvSelect, a5 as PayloadLockedDocument, aY as PayloadLockedDocumentsSelect, a7 as PayloadMigration, a_ as PayloadMigrationsSelect, a6 as PayloadPreference, aZ as PayloadPreferencesSelect, e as PlayerBlock, a0 as Playlist, a2 as PlaylistImage, aT as PlaylistImagesSelect, aS as PlaylistsSelect, N as Post, aK as PostCategoriesSelect, W as PostCategory, Q as PostImage, aM as PostImagesSelect, X as PostTag, aL as PostTagsSelect, aJ as PostsSelect, o as Product, am as ProductCategoriesSelect, r as ProductCategory, t as ProductCollection, ap as ProductCollectionsSelect, p as ProductImage, ao as ProductImagesSelect, al as ProductOptionsSelect, s as ProductTag, an as ProductTagsSelect, q as ProductVariant, ak as ProductVariantsSelect, aj as ProductsSelect, D as ReturnProduct, av as ReturnProductsSelect, au as ReturnsSelect, aI as ShippingPoliciesSelect, v as ShippingPolicy, m as Subscription, ah as SubscriptionsSelect, S as SupportedTimezones, h as Tenant, k as TenantLogo, ae as TenantLogosSelect, ad as TenantMetadataSelect, i as TenantMetadatum, j as TenantOgImage, af as TenantOgImagesSelect, ac as TenantsSelect, aA as TransactionsSelect, g as User, U as UserAuthOperations, a8 as UsersSelect } from './payload-types-DPdUroGM.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-BwRoNck8.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-BwRoNck8.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-4iCoQzsv.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-4iCoQzsv.cjs';
|
|
9
9
|
import { Metadata } from 'next';
|
|
10
10
|
import { GenerateMetadataOptions } from './metadata.cjs';
|
|
11
|
-
export {
|
|
11
|
+
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';
|
|
12
12
|
import 'payload';
|
|
13
|
-
import 'react';
|
|
14
|
-
import '@payloadcms/richtext-lexical';
|
|
15
|
-
import '@payloadcms/richtext-lexical/lexical';
|
|
16
|
-
import '@payloadcms/richtext-lexical/react';
|
|
17
13
|
|
|
18
14
|
interface OrderApiOptions {
|
|
19
15
|
clientKey: string;
|
|
@@ -642,43 +638,6 @@ declare function createServerClient(options: ClientServerConfig): ServerClient;
|
|
|
642
638
|
|
|
643
639
|
declare function getQueryClient(): QueryClient;
|
|
644
640
|
|
|
645
|
-
/** Common image data shape from Payload CMS upload collections */
|
|
646
|
-
interface ImageData {
|
|
647
|
-
url?: string | null;
|
|
648
|
-
width?: number | null;
|
|
649
|
-
height?: number | null;
|
|
650
|
-
alt?: string | null;
|
|
651
|
-
sizes?: Record<string, {
|
|
652
|
-
url?: string | null;
|
|
653
|
-
width?: number | null;
|
|
654
|
-
height?: number | null;
|
|
655
|
-
} | undefined>;
|
|
656
|
-
}
|
|
657
|
-
/** Pre-generated image size breakpoints (px) */
|
|
658
|
-
declare const IMAGE_SIZES: readonly [384, 768, 1536];
|
|
659
|
-
/**
|
|
660
|
-
* Returns the optimal image URL for a given display width.
|
|
661
|
-
*
|
|
662
|
-
* Picks the smallest pre-generated size whose width >= displayWidth × dpr.
|
|
663
|
-
* Falls back to the original URL when no matching size exists.
|
|
664
|
-
*
|
|
665
|
-
* @param image - Payload image document
|
|
666
|
-
* @param displayWidth - CSS pixel width the image will be displayed at
|
|
667
|
-
* @param dpr - Device pixel ratio (default: 1)
|
|
668
|
-
* @returns URL string, or empty string if no URL is available
|
|
669
|
-
*/
|
|
670
|
-
declare function getImageUrl(image: ImageData, displayWidth: number, dpr?: number): string;
|
|
671
|
-
/**
|
|
672
|
-
* Generates an HTML `srcset` attribute string from pre-generated sizes.
|
|
673
|
-
*
|
|
674
|
-
* Includes all available sizes plus the original image.
|
|
675
|
-
* Example output: `"url-384 384w, url-768 768w, url-1536 1536w, url-original 2000w"`
|
|
676
|
-
*
|
|
677
|
-
* @param image - Payload image document
|
|
678
|
-
* @returns srcset string, or empty string if no URLs are available
|
|
679
|
-
*/
|
|
680
|
-
declare function getImageSrcSet(image: ImageData): string;
|
|
681
|
-
|
|
682
641
|
declare const generateOrderNumber: () => string;
|
|
683
642
|
|
|
684
643
|
declare const formatOrderName: (options: ProductOption[]) => string;
|
|
@@ -696,4 +655,4 @@ declare const resolveRelation: <T>(ref: T | number | null | undefined) => T | nu
|
|
|
696
655
|
/** @deprecated Use `resolveRelation` instead */
|
|
697
656
|
declare const objectFor: <T>(ref: T | number | null | undefined) => T | null;
|
|
698
657
|
|
|
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 GetOrderParams,
|
|
658
|
+
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 GetOrderParams, Order, OrderApi, type OrderApiOptions, OrderProduct, PayloadFindResponse, PayloadMutationResponse, ProductApi, type ProductApiOptions, ProductOption, 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,19 +1,15 @@
|
|
|
1
|
-
import { O as Order, a as OrderProduct, T as Transaction,
|
|
2
|
-
export {
|
|
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 ProductOption } from './payload-types-DPdUroGM.js';
|
|
2
|
+
export { l as ApiUsage, ag as ApiUsageSelect, A as Audience, aa as AudiencesSelect, a$ as Auth, V as Author, aN as AuthorsSelect, n as BillingHistory, ai as BillingHistorySelect, u as Brand, B as BrandLogo, ar as BrandLogosSelect, aq as BrandsSelect, K as Cart, aG as CartItemsSelect, aF as CartsSelect, f as CodeBlock, c as Config, w as Customer, z as CustomerAddress, aC as CustomerAddressesSelect, d as CustomerAuthOperations, x as CustomerGroup, y as CustomerGroupImage, aE as CustomerGroupImagesSelect, aD as CustomerGroupsSelect, aB as CustomersSelect, L as Discount, aH as DiscountsSelect, Y as Document, aP as DocumentCategoriesSelect, $ as DocumentCategory, _ as DocumentImage, aR as DocumentImagesSelect, Z as DocumentType, aQ as DocumentTypesSelect, aO as DocumentsSelect, E as EmailLog, ab as EmailLogsSelect, G as Exchange, H as ExchangeProduct, ax as ExchangeProductsSelect, aw as ExchangesSelect, F as Form, a3 as FormSubmission, aW as FormSubmissionsSelect, aV as FormsSelect, J as FulfillmentItem, az as FulfillmentItemsSelect, ay as FulfillmentsSelect, I as IframeBlock, M as Media, a9 as MediaSelect, a1 as Music, aU as MusicsSelect, at as OrderProductsSelect, as as OrdersSelect, a4 as PayloadKv, aX as PayloadKvSelect, a5 as PayloadLockedDocument, aY as PayloadLockedDocumentsSelect, a7 as PayloadMigration, a_ as PayloadMigrationsSelect, a6 as PayloadPreference, aZ as PayloadPreferencesSelect, e as PlayerBlock, a0 as Playlist, a2 as PlaylistImage, aT as PlaylistImagesSelect, aS as PlaylistsSelect, N as Post, aK as PostCategoriesSelect, W as PostCategory, Q as PostImage, aM as PostImagesSelect, X as PostTag, aL as PostTagsSelect, aJ as PostsSelect, o as Product, am as ProductCategoriesSelect, r as ProductCategory, t as ProductCollection, ap as ProductCollectionsSelect, p as ProductImage, ao as ProductImagesSelect, al as ProductOptionsSelect, s as ProductTag, an as ProductTagsSelect, q as ProductVariant, ak as ProductVariantsSelect, aj as ProductsSelect, D as ReturnProduct, av as ReturnProductsSelect, au as ReturnsSelect, aI as ShippingPoliciesSelect, v as ShippingPolicy, m as Subscription, ah as SubscriptionsSelect, S as SupportedTimezones, h as Tenant, k as TenantLogo, ae as TenantLogosSelect, ad as TenantMetadataSelect, i as TenantMetadatum, j as TenantOgImage, af as TenantOgImagesSelect, ac as TenantsSelect, aA as TransactionsSelect, g as User, U as UserAuthOperations, a8 as UsersSelect } from './payload-types-DPdUroGM.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-BwIP4t_T.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-BwIP4t_T.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-DRpqvA6W.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-DRpqvA6W.js';
|
|
9
9
|
import { Metadata } from 'next';
|
|
10
10
|
import { GenerateMetadataOptions } from './metadata.js';
|
|
11
|
-
export {
|
|
11
|
+
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';
|
|
12
12
|
import 'payload';
|
|
13
|
-
import 'react';
|
|
14
|
-
import '@payloadcms/richtext-lexical';
|
|
15
|
-
import '@payloadcms/richtext-lexical/lexical';
|
|
16
|
-
import '@payloadcms/richtext-lexical/react';
|
|
17
13
|
|
|
18
14
|
interface OrderApiOptions {
|
|
19
15
|
clientKey: string;
|
|
@@ -642,43 +638,6 @@ declare function createServerClient(options: ClientServerConfig): ServerClient;
|
|
|
642
638
|
|
|
643
639
|
declare function getQueryClient(): QueryClient;
|
|
644
640
|
|
|
645
|
-
/** Common image data shape from Payload CMS upload collections */
|
|
646
|
-
interface ImageData {
|
|
647
|
-
url?: string | null;
|
|
648
|
-
width?: number | null;
|
|
649
|
-
height?: number | null;
|
|
650
|
-
alt?: string | null;
|
|
651
|
-
sizes?: Record<string, {
|
|
652
|
-
url?: string | null;
|
|
653
|
-
width?: number | null;
|
|
654
|
-
height?: number | null;
|
|
655
|
-
} | undefined>;
|
|
656
|
-
}
|
|
657
|
-
/** Pre-generated image size breakpoints (px) */
|
|
658
|
-
declare const IMAGE_SIZES: readonly [384, 768, 1536];
|
|
659
|
-
/**
|
|
660
|
-
* Returns the optimal image URL for a given display width.
|
|
661
|
-
*
|
|
662
|
-
* Picks the smallest pre-generated size whose width >= displayWidth × dpr.
|
|
663
|
-
* Falls back to the original URL when no matching size exists.
|
|
664
|
-
*
|
|
665
|
-
* @param image - Payload image document
|
|
666
|
-
* @param displayWidth - CSS pixel width the image will be displayed at
|
|
667
|
-
* @param dpr - Device pixel ratio (default: 1)
|
|
668
|
-
* @returns URL string, or empty string if no URL is available
|
|
669
|
-
*/
|
|
670
|
-
declare function getImageUrl(image: ImageData, displayWidth: number, dpr?: number): string;
|
|
671
|
-
/**
|
|
672
|
-
* Generates an HTML `srcset` attribute string from pre-generated sizes.
|
|
673
|
-
*
|
|
674
|
-
* Includes all available sizes plus the original image.
|
|
675
|
-
* Example output: `"url-384 384w, url-768 768w, url-1536 1536w, url-original 2000w"`
|
|
676
|
-
*
|
|
677
|
-
* @param image - Payload image document
|
|
678
|
-
* @returns srcset string, or empty string if no URLs are available
|
|
679
|
-
*/
|
|
680
|
-
declare function getImageSrcSet(image: ImageData): string;
|
|
681
|
-
|
|
682
641
|
declare const generateOrderNumber: () => string;
|
|
683
642
|
|
|
684
643
|
declare const formatOrderName: (options: ProductOption[]) => string;
|
|
@@ -696,4 +655,4 @@ declare const resolveRelation: <T>(ref: T | number | null | undefined) => T | nu
|
|
|
696
655
|
/** @deprecated Use `resolveRelation` instead */
|
|
697
656
|
declare const objectFor: <T>(ref: T | number | null | undefined) => T | null;
|
|
698
657
|
|
|
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 GetOrderParams,
|
|
658
|
+
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 GetOrderParams, Order, OrderApi, type OrderApiOptions, OrderProduct, PayloadFindResponse, PayloadMutationResponse, ProductApi, type ProductApiOptions, ProductOption, 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
|
@@ -1060,6 +1060,7 @@ var COLLECTIONS = [
|
|
|
1060
1060
|
"shipping-policies",
|
|
1061
1061
|
"documents",
|
|
1062
1062
|
"document-categories",
|
|
1063
|
+
"document-types",
|
|
1063
1064
|
"document-images",
|
|
1064
1065
|
"posts",
|
|
1065
1066
|
"post-categories",
|
|
@@ -1846,6 +1847,39 @@ function getImageSrcSet(image) {
|
|
|
1846
1847
|
}
|
|
1847
1848
|
return parts.join(", ");
|
|
1848
1849
|
}
|
|
1850
|
+
function getImageLqip(image) {
|
|
1851
|
+
var _a;
|
|
1852
|
+
return (_a = image.lqip) != null ? _a : void 0;
|
|
1853
|
+
}
|
|
1854
|
+
function getImagePalette(image) {
|
|
1855
|
+
var _a;
|
|
1856
|
+
return (_a = image.palette) != null ? _a : void 0;
|
|
1857
|
+
}
|
|
1858
|
+
function getImagePlaceholderStyle(image, options) {
|
|
1859
|
+
var _a, _b, _c;
|
|
1860
|
+
const type = (_a = options == null ? void 0 : options.type) != null ? _a : "blur";
|
|
1861
|
+
const paletteColor = (_b = options == null ? void 0 : options.paletteColor) != null ? _b : "muted";
|
|
1862
|
+
if (type === "none") return {};
|
|
1863
|
+
const color = (_c = image.palette) == null ? void 0 : _c[paletteColor];
|
|
1864
|
+
if (type === "blur") {
|
|
1865
|
+
const lqip = image.lqip;
|
|
1866
|
+
if (lqip) {
|
|
1867
|
+
return {
|
|
1868
|
+
backgroundImage: `url(${lqip})`,
|
|
1869
|
+
backgroundSize: "cover",
|
|
1870
|
+
backgroundPosition: "center"
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
if (color) {
|
|
1874
|
+
return { backgroundColor: color };
|
|
1875
|
+
}
|
|
1876
|
+
return {};
|
|
1877
|
+
}
|
|
1878
|
+
if (color) {
|
|
1879
|
+
return { backgroundColor: color };
|
|
1880
|
+
}
|
|
1881
|
+
return {};
|
|
1882
|
+
}
|
|
1849
1883
|
|
|
1850
1884
|
// src/utils/order/generateOrderNumber.ts
|
|
1851
1885
|
var generateOrderNumber = () => {
|
|
@@ -1866,33 +1900,6 @@ var formatOrderName = (options) => {
|
|
|
1866
1900
|
const firstTitle = ((_b = resolveRelation((_a = options[0]) == null ? void 0 : _a.product)) == null ? void 0 : _b.title) || "";
|
|
1867
1901
|
return options.length === 1 ? firstTitle : `${firstTitle} \uC678 ${options.length - 1}\uAC74`;
|
|
1868
1902
|
};
|
|
1869
|
-
|
|
1870
|
-
// src/components/RichTextContent/index.tsx
|
|
1871
|
-
import React from "react";
|
|
1872
|
-
import {
|
|
1873
|
-
defaultJSXConverters,
|
|
1874
|
-
LinkJSXConverter,
|
|
1875
|
-
RichText
|
|
1876
|
-
} from "@payloadcms/richtext-lexical/react";
|
|
1877
|
-
function RichTextContent({
|
|
1878
|
-
data,
|
|
1879
|
-
className,
|
|
1880
|
-
internalDocToHref,
|
|
1881
|
-
blocks
|
|
1882
|
-
}) {
|
|
1883
|
-
return /* @__PURE__ */ React.createElement(
|
|
1884
|
-
RichText,
|
|
1885
|
-
{
|
|
1886
|
-
data,
|
|
1887
|
-
className,
|
|
1888
|
-
converters: __spreadProps(__spreadValues(__spreadValues({}, defaultJSXConverters), LinkJSXConverter({
|
|
1889
|
-
internalDocToHref
|
|
1890
|
-
})), {
|
|
1891
|
-
blocks: blocks ? blocks : void 0
|
|
1892
|
-
})
|
|
1893
|
-
}
|
|
1894
|
-
);
|
|
1895
|
-
}
|
|
1896
1903
|
export {
|
|
1897
1904
|
ApiError,
|
|
1898
1905
|
BrowserClient,
|
|
@@ -1907,7 +1914,6 @@ export {
|
|
|
1907
1914
|
OrderApi,
|
|
1908
1915
|
ProductApi,
|
|
1909
1916
|
QueryHooks,
|
|
1910
|
-
RichTextContent,
|
|
1911
1917
|
ServerClient,
|
|
1912
1918
|
TimeoutError,
|
|
1913
1919
|
UsageLimitError,
|
|
@@ -1922,6 +1928,9 @@ export {
|
|
|
1922
1928
|
decodeServerToken,
|
|
1923
1929
|
formatOrderName,
|
|
1924
1930
|
generateOrderNumber,
|
|
1931
|
+
getImageLqip,
|
|
1932
|
+
getImagePalette,
|
|
1933
|
+
getImagePlaceholderStyle,
|
|
1925
1934
|
getImageSrcSet,
|
|
1926
1935
|
getImageUrl,
|
|
1927
1936
|
getQueryClient,
|