@nomalism-com/types 0.10.26 → 0.10.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -152,6 +152,9 @@ export interface IFindByReferenceRequest {
|
|
|
152
152
|
available?: boolean;
|
|
153
153
|
type?: IProductType;
|
|
154
154
|
}
|
|
155
|
+
export interface IValidateByReferenceRequest extends IFindByReferenceRequest {
|
|
156
|
+
billing_country_id?: string;
|
|
157
|
+
}
|
|
155
158
|
export interface ILabelResponse {
|
|
156
159
|
product_parts: {
|
|
157
160
|
compositions: {
|
|
@@ -214,7 +217,7 @@ export interface IRepository {
|
|
|
214
217
|
findByPlot(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
215
218
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
216
219
|
findByRef(selector: IFindByReferenceRequest): Promise<IEntityExtended | null>;
|
|
217
|
-
validateByRef(selector:
|
|
220
|
+
validateByRef(selector: IValidateByReferenceRequest): Promise<IEntityMinified | null>;
|
|
218
221
|
findByProductType(params: IFindByProductTypeRequest): Promise<IFindByProductTypeResponse[]>;
|
|
219
222
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
220
223
|
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
@@ -6,6 +6,7 @@ export declare const findQuery: joi.ObjectSchema<any>;
|
|
|
6
6
|
export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
|
|
7
7
|
export declare const basicSearchQuery: joi.ObjectSchema<any>;
|
|
8
8
|
export declare const findByRef: joi.ObjectSchema<any>;
|
|
9
|
+
export declare const validateByRef: joi.ObjectSchema<any>;
|
|
9
10
|
export declare const findOrCreateProductionProductBody: joi.ObjectSchema<any>;
|
|
10
11
|
export declare const findByProductTypeParams: joi.ObjectSchema<any>;
|
|
11
12
|
export declare const printLabelQuery: joi.ObjectSchema<any>;
|
|
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
var _a, _b, _c, _d;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.duplicateProductBody = exports.printLabelQuery = exports.findByProductTypeParams = exports.findOrCreateProductionProductBody = exports.findByRef = exports.basicSearchQuery = exports.findWithPaginationQuery = exports.findQuery = exports.bulkUpdateBody = exports.updateBody = exports.createBody = void 0;
|
|
18
|
+
exports.duplicateProductBody = exports.printLabelQuery = exports.findByProductTypeParams = exports.findOrCreateProductionProductBody = exports.validateByRef = exports.findByRef = exports.basicSearchQuery = exports.findWithPaginationQuery = exports.findQuery = exports.bulkUpdateBody = exports.updateBody = exports.createBody = void 0;
|
|
19
19
|
var joi_1 = __importDefault(require("joi"));
|
|
20
20
|
var messages_1 = require("../../../shared/messages");
|
|
21
21
|
var interface_1 = require("./interface");
|
|
@@ -115,6 +115,11 @@ var findByRefKeys = {
|
|
|
115
115
|
.valid.apply(_c, interface_1.productTypes).optional(),
|
|
116
116
|
};
|
|
117
117
|
exports.findByRef = joi_1.default.object().keys(findByRefKeys).messages(messages_1.messages);
|
|
118
|
+
var validateByRefKeys = __assign(__assign({}, findByRefKeys), { billing_country_id: joi_1.default.string().uuid().optional() });
|
|
119
|
+
exports.validateByRef = joi_1.default
|
|
120
|
+
.object()
|
|
121
|
+
.keys(validateByRefKeys)
|
|
122
|
+
.messages(messages_1.messages);
|
|
118
123
|
var findOrCreateProductionProductKeys = {
|
|
119
124
|
name: joi_1.default.string().required(),
|
|
120
125
|
type: joi_1.default.string().required(),
|