merchi_sdk_ts 1.7.5 → 1.7.6

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.
@@ -24,6 +24,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
24
24
  };
25
25
  import { Entity } from '../entity.js';
26
26
  import { User } from './user.js';
27
+ /**
28
+ * Runtime type tag only. The API returns `detailJson` as arbitrary JSON; the
29
+ * entity layer rejects `Object` from decorator metadata, so we use an empty
30
+ * class as the property `type` (same pattern as DraftTemplate.customisationMap).
31
+ */
32
+ var detailJsonPropertyType = /** @class */ (function () {
33
+ function detailJsonPropertyType() {
34
+ }
35
+ return detailJsonPropertyType;
36
+ }());
27
37
  var ShipmentLog = /** @class */ (function (_super) {
28
38
  __extends(ShipmentLog, _super);
29
39
  function ShipmentLog() {
@@ -53,7 +63,7 @@ var ShipmentLog = /** @class */ (function (_super) {
53
63
  __metadata("design:type", String)
54
64
  ], ShipmentLog.prototype, "message", void 0);
55
65
  __decorate([
56
- ShipmentLog.property(),
66
+ ShipmentLog.property({ type: detailJsonPropertyType }),
57
67
  __metadata("design:type", Object)
58
68
  ], ShipmentLog.prototype, "detailJson", void 0);
59
69
  __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_ts",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:merchisdk/merchi_sdk_ts.git",
@@ -2,6 +2,13 @@ import { Entity } from '../entity.js';
2
2
  import type { Shipment } from './shipment.js';
3
3
  import { User } from './user.js';
4
4
 
5
+ /**
6
+ * Runtime type tag only. The API returns `detailJson` as arbitrary JSON; the
7
+ * entity layer rejects `Object` from decorator metadata, so we use an empty
8
+ * class as the property `type` (same pattern as DraftTemplate.customisationMap).
9
+ */
10
+ const detailJsonPropertyType = class {};
11
+
5
12
  export class ShipmentLog extends Entity {
6
13
  protected static resourceName = 'shipment_logs';
7
14
  protected static singularName = 'shipmentLog';
@@ -22,7 +29,7 @@ export class ShipmentLog extends Entity {
22
29
  @ShipmentLog.property({ type: String })
23
30
  public message?: string;
24
31
 
25
- @ShipmentLog.property()
32
+ @ShipmentLog.property({ type: detailJsonPropertyType })
26
33
  public detailJson?: Record<string, unknown> | null;
27
34
 
28
35
  @ShipmentLog.property({ type: Date })