@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
129 lines • 4.76 kB
TypeScript
import { z } from 'zod';
import { RestockHdrListParams, CreateRestockHdrRequest, UpdateRestockHdrRequest } from '../schemas';
import type { VMIClient } from '../client';
type ExecuteRequest = VMIClient['executeRequest'];
/**
* Creates the restockHdr resource methods
* OpenAPI Path: /restock-hdr → restockHdr.*
* @description Methods for managing restock headers and replenishment operations
*/
export declare function createRestockHdrResource(executeRequest: ExecuteRequest): {
/**
* List restock headers with filtering
* @description Returns restock headers with optional filtering by warehouse and distributor
* @param params Optional filtering and pagination parameters
* @returns Array of restock header objects
* @throws ValidationError When parameters are invalid or response is malformed
*/
list: (params?: RestockHdrListParams) => Promise<{
params: Record<string, unknown> | unknown[];
data: z.objectInputType<{
restockHdrUid: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">[];
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Get restock header details
* @description Returns detailed information for a specific restock header
* @param restockHdrUid Restock header unique identifier
* @returns Restock header details
* @throws ValidationError When response is malformed
*/
get: (restockHdrUid: number) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
restockHdrUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Create restock header
* @description Creates a new restock header for warehouse and distributor combination
* @param request Restock header creation data
* @returns Created restock header information
* @throws ValidationError When request is invalid or response is malformed
*/
create: (request: CreateRestockHdrRequest) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
restockHdrUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Update restock header
* @description Updates restock header configuration
* @param restockHdrUid Restock header unique identifier
* @param request Restock header update data
* @returns Updated restock header information
* @throws ValidationError When request is invalid or response is malformed
*/
update: (restockHdrUid: number, request: UpdateRestockHdrRequest) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
restockHdrUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Delete restock header
* @description Removes restock header and associated data
* @param restockHdrUid Restock header unique identifier
* @returns Boolean indicating successful deletion
* @throws ValidationError When response is malformed
*/
delete: (restockHdrUid: number) => Promise<boolean>;
};
/**
* Creates the restockHdrData resource methods (data-only versions)
*/
export declare function createRestockHdrDataResource(restockHdr: ReturnType<typeof createRestockHdrResource>): {
list: (params?: RestockHdrListParams) => Promise<z.objectInputType<{
restockHdrUid: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">[]>;
get: (restockHdrUid: number) => Promise<{
restockHdrUid: number;
} & {
[k: string]: unknown;
}>;
create: (request: CreateRestockHdrRequest) => Promise<{
restockHdrUid: number;
} & {
[k: string]: unknown;
}>;
update: (restockHdrUid: number, request: UpdateRestockHdrRequest) => Promise<{
restockHdrUid: number;
} & {
[k: string]: unknown;
}>;
};
export type RestockHdrResource = ReturnType<typeof createRestockHdrResource>;
export type RestockHdrDataResource = ReturnType<typeof createRestockHdrDataResource>;
export {};
//# sourceMappingURL=restock-hdr.d.ts.map