@nomalism-com/types 0.11.35 → 0.11.37
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.
|
@@ -46,9 +46,6 @@ export interface IEntityMinified {
|
|
|
46
46
|
multimedia_id: string | null;
|
|
47
47
|
integer_only: boolean;
|
|
48
48
|
}
|
|
49
|
-
export interface IFindByIdResponse extends Omit<IEntityExtended, ''> {
|
|
50
|
-
ordered_quantity: number;
|
|
51
|
-
}
|
|
52
49
|
export type IFindRequest = Record<string, unknown>;
|
|
53
50
|
export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
54
51
|
export interface IFindByOwnerIdResponse {
|
|
@@ -218,7 +215,7 @@ export interface IDuplicateProductRequest {
|
|
|
218
215
|
color_id: string[];
|
|
219
216
|
}
|
|
220
217
|
export interface IRepository {
|
|
221
|
-
findById(selector: IShared.IFindByIdRequest): Promise<
|
|
218
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
222
219
|
findByPlot(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
223
220
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
224
221
|
findByRef(selector: IFindByReferenceRequest): Promise<IEntityExtended | null>;
|
|
@@ -233,7 +230,7 @@ export interface IRepository {
|
|
|
233
230
|
bulkUpdate(data: IBulkUpdateRequest): Promise<IShared.IUpdateManyResponse>;
|
|
234
231
|
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
235
232
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
236
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<
|
|
233
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
237
234
|
duplicateProduct(selector: IShared.IFindByIdRequest, body: IDuplicateProductRequest): Promise<string>;
|
|
238
235
|
}
|
|
239
236
|
export type IApi = Omit<IRepository, 'getLabelData'>;
|
|
@@ -230,7 +230,6 @@ var findByIdBodyResponseKeys = {
|
|
|
230
230
|
origin_cabide_product_id: joi_1.default.string().uuid().allow(null).required(),
|
|
231
231
|
origin_cabide_product: joi_1.default.any(),
|
|
232
232
|
cabide_product: joi_1.default.any(),
|
|
233
|
-
ordered_quantity: joi_1.default.number().required(),
|
|
234
233
|
};
|
|
235
234
|
exports.findByIdBodyResponse = joi_1.default
|
|
236
235
|
.object()
|