@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
42 lines • 3.01 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvProfileUploadResponseSchema = exports.InvProfileLineResponseSchema = exports.InvProfileLineListResponseSchema = exports.InvProfileHdrResponseSchema = exports.InvProfileHdrListResponseSchema = exports.InvProfileUploadDataSchema = exports.InvProfileUploadParamsSchema = exports.UpdateInvProfileLineRequestSchema = exports.CreateInvProfileLineRequestSchema = exports.UpdateInvProfileHdrRequestSchema = exports.CreateInvProfileHdrRequestSchema = exports.InvProfileLineListParamsSchema = exports.InvProfileHdrListParamsSchema = exports.InvProfileLineSchema = exports.InvProfileHdrSchema = void 0;
const zod_1 = require("zod");
const schemas_1 = require("../../../core/schemas");
const common_1 = require("./common");
/** Inv profile header - key field only, passthrough for API flexibility */
exports.InvProfileHdrSchema = zod_1.z.object({ invProfileHdrUid: zod_1.z.number() }).passthrough();
/** Inv profile line - key field only, passthrough for API flexibility */
exports.InvProfileLineSchema = zod_1.z.object({ invProfileLineUid: zod_1.z.number() }).passthrough();
exports.InvProfileHdrListParamsSchema = schemas_1.BaseGetParamsSchema.extend({
customerId: zod_1.z.number().optional(),
limit: zod_1.z.number().optional().default(10),
offset: zod_1.z.number().optional().default(0),
});
exports.InvProfileLineListParamsSchema = schemas_1.BaseGetParamsSchema.extend({
limit: zod_1.z.number().optional().default(10),
offset: zod_1.z.number().optional().default(0),
});
/** Create request - passthrough for flexible input */
exports.CreateInvProfileHdrRequestSchema = zod_1.z.object({}).passthrough();
/** Update request - passthrough for flexible input */
exports.UpdateInvProfileHdrRequestSchema = zod_1.z.object({}).passthrough();
/** Create line request - requires type validation for enum */
exports.CreateInvProfileLineRequestSchema = zod_1.z
.object({
invProfileLineType: common_1.InvProfileLineTypeSchema,
})
.passthrough();
/** Update line request - passthrough for flexible input */
exports.UpdateInvProfileLineRequestSchema = zod_1.z.object({}).passthrough();
exports.InvProfileUploadParamsSchema = zod_1.z.object({
customerId: zod_1.z.coerce.number(),
});
/** Upload data - passthrough for API flexibility */
exports.InvProfileUploadDataSchema = zod_1.z.object({}).passthrough();
exports.InvProfileHdrListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.InvProfileHdrSchema));
exports.InvProfileHdrResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.InvProfileHdrSchema);
exports.InvProfileLineListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.InvProfileLineSchema));
exports.InvProfileLineResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.InvProfileLineSchema);
exports.InvProfileUploadResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.InvProfileUploadDataSchema);
//# sourceMappingURL=profiles.js.map