@collctiv/l2s-models 1.0.16 → 1.0.17

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,19 +1,21 @@
1
1
  import type { IDataEntity } from "../global/interfaces.js";
2
- export declare class Balance implements IDataEntity {
2
+ export declare class Balance<T extends IBalanceData> implements IDataEntity {
3
3
  id: string;
4
4
  user_id: string;
5
5
  type: BalanceType;
6
- data: PotBalance | UserBalance;
7
- constructor(args?: Partial<Balance>);
6
+ data: T;
7
+ constructor(args?: Partial<Balance<T>>);
8
8
  }
9
9
  export declare enum BalanceType {
10
10
  Pot = "pot"
11
11
  }
12
- export type PotBalance = {
13
- pot_id: string;
12
+ export interface IBalanceData {
13
+ type: BalanceType;
14
+ }
15
+ export type PotBalance = IBalanceData & {
14
16
  amount: number;
15
17
  volume: number;
16
18
  pending: string[];
17
19
  };
18
- export type UserBalance = {};
20
+ export type UserBalance = IBalanceData & {};
19
21
  //# sourceMappingURL=balance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../entities/balance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,qBACa,OAAQ,YAAW,WAAW;IAEhC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC;gBAEnB,IAAI,GAAE,OAAO,CAAC,OAAO,CAAM;CAGjD;AAED,oBAAY,WAAW;IACnB,GAAG,QAAQ;CACd;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,EAEzB,CAAA"}
1
+ {"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../entities/balance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,qBACa,OAAO,CAAC,CAAC,SAAS,YAAY,CAAE,YAAW,WAAW;IAExD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,CAAC,CAAC;gBAEI,IAAI,GAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAM;CAGpD;AAED,oBAAY,WAAW;IACnB,GAAG,QAAQ;CACd;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,EAExC,CAAA"}
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Collection } from "../global/decorators.js";
11
11
  let Balance = class Balance {
12
- id;
12
+ id; // pot id | user id
13
13
  user_id;
14
14
  type;
15
15
  data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@collctiv/l2s-models",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "L2S models, interfaces, types and enums",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",