@infrab4a/connect 4.23.0-beta.0 → 4.23.0-beta.1
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.
package/index.cjs.js
CHANGED
|
@@ -334,6 +334,9 @@ tslib.__decorate([
|
|
|
334
334
|
], Product.prototype, "kitProducts", void 0);
|
|
335
335
|
|
|
336
336
|
class ProductErrors extends BaseModel {
|
|
337
|
+
setErrors(...errors) {
|
|
338
|
+
this.errors.push(...errors.filter((error) => !this.errors.includes(error)));
|
|
339
|
+
}
|
|
337
340
|
static get identifiersFields() {
|
|
338
341
|
return ['productId'];
|
|
339
342
|
}
|
package/index.esm.js
CHANGED
|
@@ -328,6 +328,9 @@ __decorate([
|
|
|
328
328
|
], Product.prototype, "kitProducts", void 0);
|
|
329
329
|
|
|
330
330
|
class ProductErrors extends BaseModel {
|
|
331
|
+
setErrors(...errors) {
|
|
332
|
+
this.errors.push(...errors.filter((error) => !this.errors.includes(error)));
|
|
333
|
+
}
|
|
331
334
|
static get identifiersFields() {
|
|
332
335
|
return ['productId'];
|
|
333
336
|
}
|
package/package.json
CHANGED
|
@@ -2,12 +2,13 @@ import { BaseModel } from '../../generic/model';
|
|
|
2
2
|
import { Product } from './product';
|
|
3
3
|
type ProductErrorsIdentifiers = 'productId';
|
|
4
4
|
export declare class ProductErrors extends BaseModel<ProductErrors, ProductErrorsIdentifiers> {
|
|
5
|
+
private errors;
|
|
5
6
|
productId: string;
|
|
6
7
|
hasErrors: boolean;
|
|
7
8
|
createdAt: Date;
|
|
8
9
|
updatedAt: Date;
|
|
9
|
-
errors: string[];
|
|
10
10
|
product: Product;
|
|
11
|
+
setErrors(...errors: string[]): void;
|
|
11
12
|
static get identifiersFields(): ProductErrorsIdentifiers[];
|
|
12
13
|
}
|
|
13
14
|
export {};
|