@collctiv/l2s-models 1.0.17 → 1.0.19

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.
@@ -1,4 +1,5 @@
1
1
  import { type IDataEntity, type ICreatable, type IModifiable, type IUpsertable } from "../global/interfaces.js";
2
+ import type { PotBalance, Balance } from "./balance.js";
2
3
  export declare class Pot implements IDataEntity, ICreatable, IModifiable, IUpsertable {
3
4
  id: string;
4
5
  create_date: Date;
@@ -12,6 +13,7 @@ export declare class Pot implements IDataEntity, ICreatable, IModifiable, IUpser
12
13
  created_by: string;
13
14
  owner: string;
14
15
  slug: string;
16
+ readonly balance?: Balance<PotBalance>;
15
17
  constructor(args?: Partial<Pot>);
16
18
  }
17
19
  export declare enum PotCategory {
@@ -1 +1 @@
1
- {"version":3,"file":"pot.d.ts","sourceRoot":"","sources":["../../entities/pot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEhH,qBAEa,GAAI,YAAW,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW;IAElE,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,IAAI,CAAc;IAG/B,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAG3B,WAAW,EAAE,MAAM,CAAC;IAGpB,aAAa,EAAE,MAAM,CAAC;IAGtB,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,WAAW,CAAC;IAGtB,MAAM,EAAE,SAAS,CAAkB;IAEnC,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;gBAED,IAAI,GAAE,OAAO,CAAC,GAAG,CAAM;CAG7C;AAED,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;I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IAEpB,SACgB,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;gBAE3B,IAAI,GAAE,OAAO,CAAC,GAAG,CAAM;CAG7C;AAED,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB;AAED,oBAAY,SAAS;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,QAAQ,aAAa;CACxB;AAED,MAAM,MAAM,WAAW,GAAG;IACtB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,uBAAuB,EAAE,OAAO,CAAC;IACjC,yBAAyB,EAAE,OAAO,CAAC;IACnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAA"}
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { Collection, Updatable, Topic } from "../global/decorators.js";
10
+ import { Collection, Updatable, Topic, NotCreatable } from "../global/decorators.js";
11
11
  import {} from "../global/interfaces.js";
12
12
  let Pot = class Pot {
13
13
  id;
@@ -22,6 +22,7 @@ let Pot = class Pot {
22
22
  created_by;
23
23
  owner;
24
24
  slug;
25
+ balance;
25
26
  constructor(args = {}) {
26
27
  Object.assign(this, args);
27
28
  }
@@ -50,6 +51,10 @@ __decorate([
50
51
  Updatable(),
51
52
  __metadata("design:type", String)
52
53
  ], Pot.prototype, "status", void 0);
54
+ __decorate([
55
+ NotCreatable(),
56
+ __metadata("design:type", Function)
57
+ ], Pot.prototype, "balance", void 0);
53
58
  Pot = __decorate([
54
59
  Collection("pots"),
55
60
  Topic("pots"),
@@ -2,6 +2,7 @@ import "reflect-metadata";
2
2
  export declare const Collection: (value: string) => (target: any) => void;
3
3
  export declare const Topic: (value: string) => (target: any) => void;
4
4
  export declare const TransactionId: (property: string) => (target: any) => void;
5
+ export declare const NotCreatable: () => (target: any, propertyKey: string) => void;
5
6
  export declare const Updatable: () => (target: any, propertyKey: string) => void;
6
7
  export declare const Attribute: () => (target: any, propertyKey: string) => void;
7
8
  export declare const ObjectId: () => (target: any, propertyKey: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../global/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,MAC5B,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,MACvB,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,MAClC,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,SAAS,SACV,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,SAAS,SACV,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,QAAQ,SACT,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA"}
1
+ {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../global/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,MAC5B,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,MACvB,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,MAClC,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,YAAY,SACb,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,SAAS,SACV,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,SAAS,SACV,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,QAAQ,SACT,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA"}
@@ -14,6 +14,11 @@ export const TransactionId = (property) => {
14
14
  Reflect.defineMetadata(`TransactionId`, property, target);
15
15
  };
16
16
  };
17
+ export const NotCreatable = () => {
18
+ return (target, propertyKey) => {
19
+ Reflect.defineMetadata(`NotCreatable`, true, target, propertyKey);
20
+ };
21
+ };
17
22
  export const Updatable = () => {
18
23
  return (target, propertyKey) => {
19
24
  Reflect.defineMetadata(`Updatable`, true, target, propertyKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@collctiv/l2s-models",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "L2S models, interfaces, types and enums",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",