@merchi/sdk 1.42.10 → 1.42.12

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.
@@ -14,4 +14,5 @@ export var FieldType;
14
14
  FieldType[FieldType["TURNAROUND_TIME"] = 12] = "TURNAROUND_TIME";
15
15
  FieldType[FieldType["COLOUR_EXTRACT"] = 13] = "COLOUR_EXTRACT";
16
16
  FieldType[FieldType["AREA"] = 14] = "AREA";
17
+ FieldType[FieldType["PANTONE_COLOUR_SELECT"] = 15] = "PANTONE_COLOUR_SELECT";
17
18
  })(FieldType || (FieldType = {}));
@@ -88,6 +88,10 @@ var Company = /** @class */ (function (_super) {
88
88
  Company.property({ type: Date }),
89
89
  __metadata("design:type", Object)
90
90
  ], Company.prototype, "archived", void 0);
91
+ __decorate([
92
+ Company.property({ type: Date }),
93
+ __metadata("design:type", Object)
94
+ ], Company.prototype, "created", void 0);
91
95
  __decorate([
92
96
  Company.property(),
93
97
  __metadata("design:type", Number)
@@ -226,6 +226,10 @@ var Domain = /** @class */ (function (_super) {
226
226
  Domain.property({ type: Date }),
227
227
  __metadata("design:type", Object)
228
228
  ], Domain.prototype, "archived", void 0);
229
+ __decorate([
230
+ Domain.property({ type: Date }),
231
+ __metadata("design:type", Object)
232
+ ], Domain.prototype, "created", void 0);
229
233
  __decorate([
230
234
  Domain.property(),
231
235
  __metadata("design:type", Number)
@@ -47,6 +47,9 @@ var VariationField = /** @class */ (function (_super) {
47
47
  if (_this.fieldType === undefined) {
48
48
  throw new Error('fieldType is undefined, did you forget to embed it?');
49
49
  }
50
+ if (_this.fieldType === FieldType.PANTONE_COLOUR_SELECT) {
51
+ return !_this.allowAllPantones;
52
+ }
50
53
  var selectable = new Set([FieldType.SELECT,
51
54
  FieldType.CHECKBOX,
52
55
  FieldType.RADIO,
@@ -74,6 +77,11 @@ var VariationField = /** @class */ (function (_super) {
74
77
  result.onceOffCost = 0;
75
78
  result.variationFiles = [];
76
79
  }
80
+ else if (_this.fieldType === FieldType.PANTONE_COLOUR_SELECT &&
81
+ _this.allowAllPantones) {
82
+ result.value = _this.defaultValue;
83
+ result.onceOffCost = _this.variationCost;
84
+ }
77
85
  else if (_this.fieldType === FieldType.AREA) {
78
86
  result.value = _this.defaultValue;
79
87
  result.onceOffCost = 0;
@@ -213,6 +221,10 @@ var VariationField = /** @class */ (function (_super) {
213
221
  VariationField.property(),
214
222
  __metadata("design:type", Boolean)
215
223
  ], VariationField.prototype, "allowDecimal", void 0);
224
+ __decorate([
225
+ VariationField.property(),
226
+ __metadata("design:type", Boolean)
227
+ ], VariationField.prototype, "allowAllPantones", void 0);
216
228
  __decorate([
217
229
  VariationField.property(),
218
230
  __metadata("design:type", Boolean)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merchi/sdk",
3
- "version": "1.42.10",
3
+ "version": "1.42.12",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "repository": {
@@ -13,4 +13,5 @@ export enum FieldType {
13
13
  TURNAROUND_TIME = 12,
14
14
  COLOUR_EXTRACT = 13,
15
15
  AREA = 14,
16
+ PANTONE_COLOUR_SELECT = 15,
16
17
  }
@@ -33,6 +33,9 @@ export class Company extends Entity {
33
33
  @Company.property({type: Date})
34
34
  public archived?: Date | null;
35
35
 
36
+ @Company.property({type: Date})
37
+ public created?: Date | null;
38
+
36
39
  @Company.property()
37
40
  public id?: number;
38
41
 
@@ -439,6 +439,9 @@ export class Domain extends Entity {
439
439
  @Domain.property({type: Date})
440
440
  public archived?: Date | null;
441
441
 
442
+ @Domain.property({type: Date})
443
+ public created?: Date | null;
444
+
442
445
  @Domain.property()
443
446
  public id?: number;
444
447
 
@@ -80,6 +80,9 @@ export class VariationField extends Entity {
80
80
  @VariationField.property()
81
81
  public allowDecimal?: boolean;
82
82
 
83
+ @VariationField.property()
84
+ public allowAllPantones?: boolean;
85
+
83
86
  @VariationField.property()
84
87
  public isHtml?: boolean;
85
88
 
@@ -207,6 +210,9 @@ export class VariationField extends Entity {
207
210
  if (this.fieldType === undefined) {
208
211
  throw new Error('fieldType is undefined, did you forget to embed it?');
209
212
  }
213
+ if (this.fieldType === FieldType.PANTONE_COLOUR_SELECT) {
214
+ return !this.allowAllPantones;
215
+ }
210
216
  const selectable = new Set([FieldType.SELECT,
211
217
  FieldType.CHECKBOX,
212
218
  FieldType.RADIO,
@@ -233,6 +239,12 @@ export class VariationField extends Entity {
233
239
  result.value = this.defaultValue;
234
240
  result.onceOffCost = 0;
235
241
  result.variationFiles = [];
242
+ } else if (
243
+ this.fieldType === FieldType.PANTONE_COLOUR_SELECT &&
244
+ this.allowAllPantones
245
+ ) {
246
+ result.value = this.defaultValue;
247
+ result.onceOffCost = this.variationCost;
236
248
  } else if (this.fieldType === FieldType.AREA) {
237
249
  result.value = this.defaultValue;
238
250
  result.onceOffCost = 0;