UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

123 lines 4.04 kB
import type { BaseResponse } from '../../../core/base-client'; import type { P21CoreClient } from '../client'; import type { AddressListParams, AddressCorpListParams, AddressEnableParams } from '../schemas'; type ExecuteRequest = P21CoreClient['executeRequest']; /** * Creates the address resource methods * OpenAPI Path: /address → address.* * @description Address management operations for shipping and delivery configuration */ export declare function createAddressResource(executeRequest: ExecuteRequest, createListMethod: P21CoreClient['createListMethod']): { /** * List all addresses with filtering capabilities * @fullPath api.p21Core.address.list * @service p21-core * @domain address-and-shipping-management * @dataMethod addressData.list * @discoverable true */ list: (params?: { limit?: number | undefined; offset?: number | undefined; statusCd?: number | undefined; carrierFlag?: string | undefined; defaultCd?: number | undefined; enabledCd?: number | undefined; } | undefined) => Promise<BaseResponse<unknown[]>>; /** * Get address details by ID * @fullPath api.p21Core.address.get * @service p21-core * @domain address-and-shipping-management * @dataMethod addressData.get * @discoverable true */ get: (params: { id: number; }) => Promise<BaseResponse<unknown>>; /** * Corporate address operations */ corpAddress: { /** * Get corporate address list * @fullPath api.p21Core.address.corpAddress.list * @service p21-core * @domain address-and-shipping-management * @dataMethod addressData.corpAddress.list * @discoverable true */ list: (params: AddressCorpListParams) => Promise<BaseResponse<unknown[]>>; }; /** * Default address operations */ default: { /** * Set address as default shipping method * @fullPath api.p21Core.address.default.get * @service p21-core * @domain address-and-shipping-management * @dataMethod addressData.default.get * @discoverable true */ get: (params: { id: number; }) => Promise<BaseResponse<unknown>>; }; /** * Address enable/disable operations */ enable: { /** * Enable or disable address as shipping method * @fullPath api.p21Core.address.enable.get * @service p21-core * @domain address-and-shipping-management * @dataMethod addressData.enable.get * @discoverable true */ get: (params: AddressEnableParams) => Promise<BaseResponse<unknown>>; }; /** * Address refresh operations */ refresh: { /** * Trigger data refresh for address synchronization * @fullPath api.p21Core.address.refresh.get * @service p21-core * @domain address-and-shipping-management * @dataMethod addressData.refresh.get * @discoverable true */ get: () => Promise<BaseResponse<unknown>>; }; }; /** * Creates the addressData resource methods (data-only versions) */ export declare function createAddressDataResource(address: ReturnType<typeof createAddressResource>): { list: (params?: AddressListParams) => Promise<unknown[]>; get: (params: { id: number; }) => Promise<unknown>; corpAddress: { list: (params: AddressCorpListParams) => Promise<unknown[]>; }; default: { get: (params: { id: number; }) => Promise<unknown>; }; enable: { get: (params: AddressEnableParams) => Promise<unknown>; }; refresh: { get: () => Promise<unknown>; }; }; export type AddressResource = ReturnType<typeof createAddressResource>; export type AddressDataResource = ReturnType<typeof createAddressDataResource>; export {}; //# sourceMappingURL=address.d.ts.map