@01.software/sdk 0.2.2 → 0.2.4

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,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 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';
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-BFIUYPDZ.cjs';
2
+ export { k as ApiUsage, ae as ApiUsageSelect, A as Audience, aa as AudiencesSelect, b0 as Auth, m as BillingHistory, ag as BillingHistorySelect, u as Brand, B as BrandLogo, aq as BrandLogosSelect, ap as BrandsSelect, K as Cart, aG as CartItemsSelect, aF as CartsSelect, f as CodeBlock, a$ as CollectionsWidget, 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, aT 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, aU as PlaylistImagesSelect, aS as PlaylistsSelect, N as Post, V as PostAuthor, aK as PostAuthorsSelect, aL as PostCategoriesSelect, W as PostCategory, Q as PostImage, aN as PostImagesSelect, X as PostTag, aM as PostTagsSelect, aJ as PostsSelect, o as Product, am as ProductCategoriesSelect, r as ProductCategory, t as ProductCollection, ao as ProductCollectionsSelect, p as ProductImage, ar 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, l as Subscription, af as SubscriptionsSelect, S as SupportedTimezones, h as Tenant, n as TenantLogo, ah as TenantLogosSelect, ad as TenantMetadataSelect, i as TenantMetadatum, j as TenantOgImage, ai as TenantOgImagesSelect, ac as TenantsSelect, aA as TransactionsSelect, g as User, U as UserAuthOperations, a8 as UsersSelect } from './payload-types-BFIUYPDZ.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-DTkwMgvi.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-DTkwMgvi.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-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';
7
+ import { P as PublicCollection, C as CollectionType } from './webhook-BM5spkSP.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-BM5spkSP.cjs';
9
9
  import { Metadata } from 'next';
10
10
  import { GenerateMetadataOptions } from './metadata.cjs';
11
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';
@@ -644,15 +644,15 @@ declare const formatOrderName: (options: ProductOption[]) => string;
644
644
 
645
645
  /**
646
646
  * Resolves a Payload CMS relation field value.
647
- * When depth is 0, relation fields return just the ID (number).
647
+ * When depth is 0, relation fields return just the ID (string or number).
648
648
  * When depth > 0, they return the full document object (T).
649
649
  * This utility normalizes both cases to T | null.
650
650
  *
651
- * @param ref - The relation field value (T, number, null, or undefined)
651
+ * @param ref - The relation field value (T, string, number, null, or undefined)
652
652
  * @returns The resolved document object, or null if not populated
653
653
  */
654
- declare const resolveRelation: <T>(ref: T | number | null | undefined) => T | null;
654
+ declare const resolveRelation: <T>(ref: T | string | number | null | undefined) => T | null;
655
655
  /** @deprecated Use `resolveRelation` instead */
656
- declare const objectFor: <T>(ref: T | number | null | undefined) => T | null;
656
+ declare const objectFor: <T>(ref: T | string | number | null | undefined) => T | null;
657
657
 
658
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,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 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';
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-BFIUYPDZ.js';
2
+ export { k as ApiUsage, ae as ApiUsageSelect, A as Audience, aa as AudiencesSelect, b0 as Auth, m as BillingHistory, ag as BillingHistorySelect, u as Brand, B as BrandLogo, aq as BrandLogosSelect, ap as BrandsSelect, K as Cart, aG as CartItemsSelect, aF as CartsSelect, f as CodeBlock, a$ as CollectionsWidget, 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, aT 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, aU as PlaylistImagesSelect, aS as PlaylistsSelect, N as Post, V as PostAuthor, aK as PostAuthorsSelect, aL as PostCategoriesSelect, W as PostCategory, Q as PostImage, aN as PostImagesSelect, X as PostTag, aM as PostTagsSelect, aJ as PostsSelect, o as Product, am as ProductCategoriesSelect, r as ProductCategory, t as ProductCollection, ao as ProductCollectionsSelect, p as ProductImage, ar 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, l as Subscription, af as SubscriptionsSelect, S as SupportedTimezones, h as Tenant, n as TenantLogo, ah as TenantLogosSelect, ad as TenantMetadataSelect, i as TenantMetadatum, j as TenantOgImage, ai as TenantOgImagesSelect, ac as TenantsSelect, aA as TransactionsSelect, g as User, U as UserAuthOperations, a8 as UsersSelect } from './payload-types-BFIUYPDZ.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-CWsLf5vd.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-CWsLf5vd.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-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';
7
+ import { P as PublicCollection, C as CollectionType } from './webhook-BBp77Khg.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-BBp77Khg.js';
9
9
  import { Metadata } from 'next';
10
10
  import { GenerateMetadataOptions } from './metadata.js';
11
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';
@@ -644,15 +644,15 @@ declare const formatOrderName: (options: ProductOption[]) => string;
644
644
 
645
645
  /**
646
646
  * Resolves a Payload CMS relation field value.
647
- * When depth is 0, relation fields return just the ID (number).
647
+ * When depth is 0, relation fields return just the ID (string or number).
648
648
  * When depth > 0, they return the full document object (T).
649
649
  * This utility normalizes both cases to T | null.
650
650
  *
651
- * @param ref - The relation field value (T, number, null, or undefined)
651
+ * @param ref - The relation field value (T, string, number, null, or undefined)
652
652
  * @returns The resolved document object, or null if not populated
653
653
  */
654
- declare const resolveRelation: <T>(ref: T | number | null | undefined) => T | null;
654
+ declare const resolveRelation: <T>(ref: T | string | number | null | undefined) => T | null;
655
655
  /** @deprecated Use `resolveRelation` instead */
656
- declare const objectFor: <T>(ref: T | number | null | undefined) => T | null;
656
+ declare const objectFor: <T>(ref: T | string | number | null | undefined) => T | null;
657
657
 
658
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
@@ -633,7 +633,8 @@ var ProductApi = class {
633
633
 
634
634
  // src/utils/types.ts
635
635
  var resolveRelation = (ref) => {
636
- if (typeof ref === "number" || ref === null || ref === void 0) return null;
636
+ if (typeof ref === "string" || typeof ref === "number" || ref === null || ref === void 0)
637
+ return null;
637
638
  return ref;
638
639
  };
639
640
  var objectFor = resolveRelation;