UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

213 lines 9.8 kB
import { z } from 'zod'; import type { BaseResponse } from '../../../core/base-client'; import { InvProfileLine, InvProfileLineListParams, CreateInvProfileLineRequest, UpdateInvProfileLineRequest, InvProfileHdrListParams, CreateInvProfileHdrRequest, UpdateInvProfileHdrRequest } from '../schemas'; import type { VMIClient } from '../client'; type ExecuteRequest = VMIClient['executeRequest']; /** * Creates the invProfileHdr resource methods * OpenAPI Path: /inv-profile-hdr → invProfileHdr.* * @description Methods for managing inventory profiles that define min/max/reorder quantities for automated replenishment */ export declare function createInvProfileHdrResource(executeRequest: ExecuteRequest): { /** * List inventory profile headers * @description Returns inventory profile headers for a customer with pagination * @param params Filtering and pagination parameters (customerId is required) * @returns Array of inventory profile header objects * @throws ValidationError When parameters are invalid or response is malformed */ list: (params?: InvProfileHdrListParams) => Promise<{ params: Record<string, unknown> | unknown[]; data: z.objectInputType<{ invProfileHdrUid: z.ZodNumber; }, z.ZodTypeAny, "passthrough">[]; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; /** * Get inventory profile header details * @description Returns detailed information for a specific inventory profile header * @param invProfileHdrUid Inventory profile header unique identifier * @returns Inventory profile header details * @throws ValidationError When response is malformed */ get: (invProfileHdrUid: number) => Promise<{ params: Record<string, unknown> | unknown[]; data: { invProfileHdrUid: number; } & { [k: string]: unknown; }; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; /** * Create new inventory profile header * @description Creates a new inventory profile header container * @param request Inventory profile header creation data * @returns Created inventory profile header information * @throws ValidationError When request is invalid or response is malformed */ create: (request: CreateInvProfileHdrRequest) => Promise<{ params: Record<string, unknown> | unknown[]; data: { invProfileHdrUid: number; } & { [k: string]: unknown; }; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; /** * Update inventory profile header * @description Updates inventory profile header information * @param invProfileHdrUid Inventory profile header unique identifier * @param request Inventory profile header update data * @returns Updated inventory profile header information * @throws ValidationError When request is invalid or response is malformed */ update: (invProfileHdrUid: number, request: UpdateInvProfileHdrRequest) => Promise<{ params: Record<string, unknown> | unknown[]; data: { invProfileHdrUid: number; } & { [k: string]: unknown; }; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; /** * Delete inventory profile header * @description Removes inventory profile header and associated lines * @param invProfileHdrUid Inventory profile header unique identifier * @returns Boolean indicating successful deletion * @throws ValidationError When response is malformed */ delete: (invProfileHdrUid: number) => Promise<boolean>; /** * Upload endpoints for bulk profile creation * @description Methods for uploading Excel files to create inventory profiles */ upload: { /** * Upload Excel file to create inventory profile headers * @description Uploads an Excel file to bulk create inventory profile headers for a customer * @param customerId Customer unique identifier * @returns Upload result response * @throws ValidationError When request is invalid or response is malformed */ create: (customerId: number) => Promise<BaseResponse<unknown>>; }; /** * Inventory profile lines sub-endpoints * @description Methods for managing inventory profile lines (individual item configurations within headers) */ invProfileLine: { /** * List inventory profile lines for a header * @description Returns inventory profile lines within a specific header with pagination * @param invProfileHdrUid Inventory profile header unique identifier * @param params Optional pagination parameters * @returns Array of inventory profile line objects * @throws ValidationError When parameters are invalid or response is malformed */ list: (invProfileHdrUid: number, params?: InvProfileLineListParams) => Promise<BaseResponse<InvProfileLine[]>>; /** * Get specific inventory profile line * @description Returns detailed information for a specific inventory profile line * @param invProfileHdrUid Inventory profile header unique identifier * @param invProfileLineUid Inventory profile line unique identifier * @returns Inventory profile line details * @throws ValidationError When response is malformed */ get: (invProfileHdrUid: number, invProfileLineUid: number) => Promise<BaseResponse<InvProfileLine>>; /** * Create inventory profile line * @description Creates a new inventory profile line with min/max/reorder quantities * @param invProfileHdrUid Inventory profile header unique identifier * @param request Inventory profile line creation data * @returns Created inventory profile line information * @throws ValidationError When request is invalid or response is malformed */ create: (invProfileHdrUid: number, request: CreateInvProfileLineRequest) => Promise<BaseResponse<InvProfileLine>>; /** * Update inventory profile line * @description Updates inventory profile line quantities and settings * @param invProfileHdrUid Inventory profile header unique identifier * @param invProfileLineUid Inventory profile line unique identifier * @param request Inventory profile line update data * @returns Updated inventory profile line information * @throws ValidationError When request is invalid or response is malformed */ update: (invProfileHdrUid: number, invProfileLineUid: number, request: UpdateInvProfileLineRequest) => Promise<BaseResponse<InvProfileLine>>; /** * Delete inventory profile line * @description Removes inventory profile line from header * @param invProfileHdrUid Inventory profile header unique identifier * @param invProfileLineUid Inventory profile line unique identifier * @returns Boolean indicating successful deletion * @throws ValidationError When response is malformed */ delete: (invProfileHdrUid: number, invProfileLineUid: number) => Promise<boolean>; }; }; /** * Creates the invProfileHdrData resource methods (data-only versions) */ export declare function createInvProfileHdrDataResource(invProfileHdr: ReturnType<typeof createInvProfileHdrResource>): { list: (params?: InvProfileHdrListParams) => Promise<z.objectInputType<{ invProfileHdrUid: z.ZodNumber; }, z.ZodTypeAny, "passthrough">[]>; get: (invProfileHdrUid: number) => Promise<{ invProfileHdrUid: number; } & { [k: string]: unknown; }>; create: (request: CreateInvProfileHdrRequest) => Promise<{ invProfileHdrUid: number; } & { [k: string]: unknown; }>; update: (invProfileHdrUid: number, request: UpdateInvProfileHdrRequest) => Promise<{ invProfileHdrUid: number; } & { [k: string]: unknown; }>; upload: { create: (customerId: number) => Promise<unknown>; }; invProfileLine: { list: (invProfileHdrUid: number, params?: InvProfileLineListParams) => Promise<z.objectOutputType<{ invProfileLineUid: z.ZodNumber; }, z.ZodTypeAny, "passthrough">[]>; get: (invProfileHdrUid: number, invProfileLineUid: number) => Promise<z.objectOutputType<{ invProfileLineUid: z.ZodNumber; }, z.ZodTypeAny, "passthrough">>; create: (invProfileHdrUid: number, request: CreateInvProfileLineRequest) => Promise<z.objectOutputType<{ invProfileLineUid: z.ZodNumber; }, z.ZodTypeAny, "passthrough">>; update: (invProfileHdrUid: number, invProfileLineUid: number, request: UpdateInvProfileLineRequest) => Promise<z.objectOutputType<{ invProfileLineUid: z.ZodNumber; }, z.ZodTypeAny, "passthrough">>; }; }; export type InvProfileHdrResource = ReturnType<typeof createInvProfileHdrResource>; export type InvProfileHdrDataResource = ReturnType<typeof createInvProfileHdrDataResource>; export {}; //# sourceMappingURL=inv-profile-hdr.d.ts.map