@collctiv/l2s-models 1.0.29 → 1.0.31
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/dist/entities/pot.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { type IDataEntity, type ICreatable, type IModifiable, type IUpsertable } from "../global/interfaces.js";
|
|
2
2
|
import type { PotBalance, Balance } from "./balance.js";
|
|
3
|
+
export declare class PotSettings {
|
|
4
|
+
closes: Date | null;
|
|
5
|
+
requested_amount: number | null;
|
|
6
|
+
show_contributions: boolean;
|
|
7
|
+
show_contributors_names: boolean;
|
|
8
|
+
show_contributors_amounts: boolean;
|
|
9
|
+
target: number | null;
|
|
10
|
+
constructor(args?: Partial<PotSettings>);
|
|
11
|
+
}
|
|
3
12
|
export declare class Pot implements IDataEntity, ICreatable, IModifiable, IUpsertable {
|
|
4
13
|
id: string;
|
|
5
14
|
create_date: Date;
|
|
@@ -35,12 +44,4 @@ export declare enum PotStatus {
|
|
|
35
44
|
Closed = "closed",
|
|
36
45
|
Archived = "archived"
|
|
37
46
|
}
|
|
38
|
-
export type PotSettings = {
|
|
39
|
-
closes: Date | null;
|
|
40
|
-
requested_amount: number | null;
|
|
41
|
-
show_contributions: boolean;
|
|
42
|
-
show_contributors_names: boolean;
|
|
43
|
-
show_contributors_amounts: boolean;
|
|
44
|
-
target: number | null;
|
|
45
|
-
};
|
|
46
47
|
//# sourceMappingURL=pot.d.ts.map
|
|
@@ -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;AAChH,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAExD,qBAEa,GAAI,YAAW,WAAW,EAAE,U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b,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;gBAEjB,IAAI,GAAE,OAAO,CAAC,GAAG,GAAC,OAAO,CAAC,UAAU,CAAC,CAAM;CAGjE;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"}
|
package/dist/entities/pot.js
CHANGED
|
@@ -9,6 +9,41 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { Collection, Updatable, Topic, NotCreatable } from "../global/decorators.js";
|
|
11
11
|
import {} from "../global/interfaces.js";
|
|
12
|
+
export class PotSettings {
|
|
13
|
+
closes;
|
|
14
|
+
requested_amount;
|
|
15
|
+
show_contributions;
|
|
16
|
+
show_contributors_names;
|
|
17
|
+
show_contributors_amounts;
|
|
18
|
+
target;
|
|
19
|
+
constructor(args = {}) {
|
|
20
|
+
Object.assign(this, args);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
__decorate([
|
|
24
|
+
Updatable(),
|
|
25
|
+
__metadata("design:type", Date)
|
|
26
|
+
], PotSettings.prototype, "closes", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
Updatable(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], PotSettings.prototype, "requested_amount", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
Updatable(),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], PotSettings.prototype, "show_contributions", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
Updatable(),
|
|
37
|
+
__metadata("design:type", Boolean)
|
|
38
|
+
], PotSettings.prototype, "show_contributors_names", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
Updatable(),
|
|
41
|
+
__metadata("design:type", Boolean)
|
|
42
|
+
], PotSettings.prototype, "show_contributors_amounts", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
Updatable(),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], PotSettings.prototype, "target", void 0);
|
|
12
47
|
let Pot = class Pot {
|
|
13
48
|
id;
|
|
14
49
|
create_date = new Date();
|
|
@@ -45,7 +80,8 @@ __decorate([
|
|
|
45
80
|
], Pot.prototype, "name", void 0);
|
|
46
81
|
__decorate([
|
|
47
82
|
Updatable(),
|
|
48
|
-
|
|
83
|
+
Object(PotSettings),
|
|
84
|
+
__metadata("design:type", PotSettings)
|
|
49
85
|
], Pot.prototype, "settings", void 0);
|
|
50
86
|
__decorate([
|
|
51
87
|
Updatable(),
|
|
@@ -4,6 +4,8 @@ export declare const Topic: (value: string) => (target: any) => void;
|
|
|
4
4
|
export declare const TransactionId: (property: string) => (target: any) => void;
|
|
5
5
|
export declare const NotCreatable: () => (target: any, propertyKey: string) => void;
|
|
6
6
|
export declare const Updatable: () => (target: any, propertyKey: string) => void;
|
|
7
|
+
export declare const Object: <T extends any>(type: new () => T) => (target: any, propertyKey: string) => void;
|
|
8
|
+
export declare const Array: <T extends any>(type: new () => T) => (target: any, propertyKey: string) => void;
|
|
7
9
|
export declare const Attribute: () => (target: any, propertyKey: string) => void;
|
|
8
10
|
export declare const ObjectId: () => (target: any, propertyKey: string) => void;
|
|
9
11
|
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -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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ED,eAAO,MAAM,QAAQ,SACT,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA"}
|
|
@@ -24,6 +24,16 @@ export const Updatable = () => {
|
|
|
24
24
|
Reflect.defineMetadata(`Updatable`, true, target, propertyKey);
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
export const Object = (type) => {
|
|
28
|
+
return (target, propertyKey) => {
|
|
29
|
+
Reflect.defineMetadata(`Type:Object`, type, target, propertyKey);
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const Array = (type) => {
|
|
33
|
+
return (target, propertyKey) => {
|
|
34
|
+
Reflect.defineMetadata(`Type:Array`, type, target, propertyKey);
|
|
35
|
+
};
|
|
36
|
+
};
|
|
27
37
|
export const Attribute = () => {
|
|
28
38
|
return (target, propertyKey) => {
|
|
29
39
|
Reflect.defineMetadata(`Attribute`, true, target, propertyKey);
|