UNPKG

@techsio/storefront-data

Version:

Medusa-first storefront data layer built on TanStack Query.

46 lines • 1.64 kB
import type Medusa from "@medusajs/js-sdk"; import type { HttpTypes } from "@medusajs/types"; import type { CustomerService } from "./types"; export type MedusaCustomerListInput = { enabled?: boolean; }; export type MedusaCustomerAddressCreateInput = { first_name?: string; last_name?: string; company?: string; address_1?: string; address_2?: string; city?: string; province?: string; postal_code?: string; country_code?: string; phone?: string; is_default_shipping?: boolean; is_default_billing?: boolean; metadata?: Record<string, unknown>; }; export type MedusaCustomerAddressUpdateInput = MedusaCustomerAddressCreateInput; export type MedusaCustomerProfileUpdateInput = { first_name?: string; last_name?: string; phone?: string; company_name?: string; metadata?: Record<string, unknown>; }; /** * Creates a CustomerService for Medusa SDK * * @example * ```typescript * import { createCustomerHooks } from "@techsio/storefront-data/customers/hooks" * import { createMedusaCustomerService } from "@techsio/storefront-data/customers/medusa-service" * import { sdk } from "@/lib/medusa-client" * * const customerHooks = createCustomerHooks({ * service: createMedusaCustomerService(sdk), * queryKeys: customerQueryKeys, * }) * ``` */ export declare function createMedusaCustomerService(sdk: Medusa): CustomerService<HttpTypes.StoreCustomer, HttpTypes.StoreCustomerAddress, MedusaCustomerListInput, MedusaCustomerAddressCreateInput, MedusaCustomerAddressUpdateInput, MedusaCustomerProfileUpdateInput>; //# sourceMappingURL=medusa-service.d.ts.map