@collctiv/l2s-models 1.0.3 → 1.0.5
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/payment.d.ts +1 -8
- package/dist/entities/payment.d.ts.map +1 -1
- package/dist/entities/payment.js +1 -12
- package/dist/entities/user.d.ts +3 -19
- package/dist/entities/user.d.ts.map +1 -1
- package/dist/entities/user.js +2 -37
- package/dist/global/interfaces.d.ts +0 -3
- package/dist/global/interfaces.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ export declare class Payment implements IDataEntity, ICreatable, IModifiable, IU
|
|
|
4
4
|
id: string;
|
|
5
5
|
create_date: Date;
|
|
6
6
|
modified_date: Date | null;
|
|
7
|
-
available_date: Date;
|
|
8
7
|
amount: number;
|
|
9
8
|
transaction_id: string;
|
|
10
9
|
billing_details: PaymentBillingDetails;
|
|
@@ -14,18 +13,12 @@ export declare class Payment implements IDataEntity, ICreatable, IModifiable, IU
|
|
|
14
13
|
message: string;
|
|
15
14
|
marketing_opt_in: PaymentMarketingOptIn;
|
|
16
15
|
metadata: any;
|
|
17
|
-
thank_you_sent: boolean;
|
|
18
16
|
provider: PaymentProviderType;
|
|
19
|
-
net_amount: number;
|
|
20
17
|
currency: string;
|
|
21
18
|
fee: number;
|
|
19
|
+
tip: number;
|
|
22
20
|
intent: string;
|
|
23
21
|
pot: PaymentPot;
|
|
24
|
-
service_fee: number;
|
|
25
|
-
subscription_fee: number;
|
|
26
|
-
order_id: string;
|
|
27
|
-
referral_id: string;
|
|
28
|
-
app_fee_amount: number;
|
|
29
22
|
constructor(args?: Partial<Payment>);
|
|
30
23
|
}
|
|
31
24
|
export declare enum PaymentStatus {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../entities/payment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,WA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ED,oBAAY,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,iBAAiB,uBAAuB;IACxC,cAAc,oBAAoB;IAClC,aAAa,mBAAmB;IAChC,eAAe,qBAAqB;IACpC,oBAAoB,0BAA0B;IAC9C,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;CAC/B;AAED,MAAM,MAAM,qBAAqB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,KAAK,qBAAqB,GAAG;IACzB,KAAK,EAAE,OAAO,CAAC;CAClB,CAAA"}
|
package/dist/entities/payment.js
CHANGED
|
@@ -14,7 +14,6 @@ let Payment = class Payment {
|
|
|
14
14
|
id;
|
|
15
15
|
create_date = new Date();
|
|
16
16
|
modified_date;
|
|
17
|
-
available_date = null;
|
|
18
17
|
amount = 0;
|
|
19
18
|
transaction_id = null;
|
|
20
19
|
billing_details = {};
|
|
@@ -24,18 +23,12 @@ let Payment = class Payment {
|
|
|
24
23
|
message = "";
|
|
25
24
|
marketing_opt_in = { email: false };
|
|
26
25
|
metadata = {};
|
|
27
|
-
thank_you_sent = false;
|
|
28
26
|
provider = null;
|
|
29
|
-
net_amount = 0;
|
|
30
27
|
currency = Currency.GBP;
|
|
31
28
|
fee = 0;
|
|
29
|
+
tip = 0;
|
|
32
30
|
intent = null;
|
|
33
31
|
pot = {};
|
|
34
|
-
service_fee = 0;
|
|
35
|
-
subscription_fee = 0;
|
|
36
|
-
order_id = null;
|
|
37
|
-
referral_id = null;
|
|
38
|
-
app_fee_amount = 0;
|
|
39
32
|
constructor(args = {}) {
|
|
40
33
|
Object.assign(this, args);
|
|
41
34
|
}
|
|
@@ -60,10 +53,6 @@ __decorate([
|
|
|
60
53
|
Updatable(),
|
|
61
54
|
__metadata("design:type", Object)
|
|
62
55
|
], Payment.prototype, "metadata", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
Updatable(),
|
|
65
|
-
__metadata("design:type", Boolean)
|
|
66
|
-
], Payment.prototype, "thank_you_sent", void 0);
|
|
67
56
|
Payment = __decorate([
|
|
68
57
|
Collection("payments"),
|
|
69
58
|
TransactionId("transaction_id"),
|
package/dist/entities/user.d.ts
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { type IDataEntity, type ICreatable, type IModifiable, type IUpsertable
|
|
2
|
-
import { Country, Currency
|
|
3
|
-
export declare class User implements IDataEntity, ICreatable, IModifiable, IUpsertable
|
|
1
|
+
import { type IDataEntity, type ICreatable, type IModifiable, type IUpsertable } from "../global/interfaces.js";
|
|
2
|
+
import { Country, Currency } from "../global/enums.js";
|
|
3
|
+
export declare class User implements IDataEntity, ICreatable, IModifiable, IUpsertable {
|
|
4
4
|
id: string;
|
|
5
5
|
create_date: Date;
|
|
6
6
|
modified_date: Date | null;
|
|
7
|
-
external_id: string;
|
|
8
|
-
company_id: string;
|
|
9
7
|
first_name: string;
|
|
10
8
|
last_name: string;
|
|
11
9
|
full_name: string;
|
|
12
10
|
type: UserType;
|
|
13
11
|
email: string;
|
|
14
|
-
kyc?: UserKyc[];
|
|
15
12
|
country: Country;
|
|
16
13
|
currency: Currency;
|
|
17
14
|
gdpr_approved: boolean;
|
|
18
15
|
status: UserStatus;
|
|
19
16
|
id_verified: boolean;
|
|
20
17
|
profile_image: string;
|
|
21
|
-
providers: UserProviders;
|
|
22
18
|
email_verified: boolean;
|
|
23
19
|
constructor(args?: Partial<User>);
|
|
24
20
|
}
|
|
@@ -31,16 +27,4 @@ export declare enum UserStatus {
|
|
|
31
27
|
export declare enum UserType {
|
|
32
28
|
Individual = "individual"
|
|
33
29
|
}
|
|
34
|
-
export type UserProviders = {
|
|
35
|
-
kyc: KycProviderType;
|
|
36
|
-
bank_payouts: PayoutAccountProvider;
|
|
37
|
-
};
|
|
38
|
-
export declare class UserKyc {
|
|
39
|
-
readonly external_id: string;
|
|
40
|
-
readonly first_name: string;
|
|
41
|
-
readonly middle_name: string;
|
|
42
|
-
readonly last_name: string;
|
|
43
|
-
readonly full_name: string;
|
|
44
|
-
constructor(external_id: string, first_name: string, middle_name: string, last_name: string);
|
|
45
|
-
}
|
|
46
30
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../entities/user.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../entities/user.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEvD,qBACa,IAAK,YAAW,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW;IAEnE,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,IAAI,CAAc;IAC/B,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAG3B,UAAU,EAAE,MAAM,CAAQ;IAG1B,SAAS,EAAE,MAAM,CAAQ;IAGzB,SAAS,EAAE,MAAM,CAAQ;IAGzB,IAAI,EAAE,QAAQ,CAAuB;IAGrC,KAAK,EAAE,MAAM,CAAQ;IAGrB,OAAO,EAAE,OAAO,CAAc;IAG9B,QAAQ,EAAE,QAAQ,CAAgB;IAGlC,aAAa,EAAE,OAAO,CAAS;IAG/B,MAAM,EAAE,UAAU,CAAqB;IAGvC,WAAW,EAAE,OAAO,CAAS;IAG7B,aAAa,EAAE,MAAM,CAAQ;IAG7B,cAAc,EAAE,OAAO,CAAS;gBAEpB,IAAI,GAAE,OAAO,CAAC,IAAI,CAAM;CAG9C;AAED,oBAAY,UAAU;IAClB,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,MAAM,WAAW;IACjB,QAAQ,aAAa;CACxB;AAED,oBAAY,QAAQ;IAChB,UAAU,eAAe;CAC5B"}
|
package/dist/entities/user.js
CHANGED
|
@@ -8,37 +8,28 @@ 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
10
|
import {} from "../global/interfaces.js";
|
|
11
|
-
import { Collection, Updatable
|
|
12
|
-
import { Country, Currency
|
|
11
|
+
import { Collection, Updatable } from "../global/decorators.js";
|
|
12
|
+
import { Country, Currency } from "../global/enums.js";
|
|
13
13
|
let User = class User {
|
|
14
14
|
id;
|
|
15
15
|
create_date = new Date();
|
|
16
16
|
modified_date;
|
|
17
|
-
external_id;
|
|
18
|
-
company_id = null;
|
|
19
17
|
first_name = null;
|
|
20
18
|
last_name = null;
|
|
21
19
|
full_name = null;
|
|
22
20
|
type = UserType.Individual;
|
|
23
21
|
email = null;
|
|
24
|
-
kyc;
|
|
25
22
|
country = Country.GB;
|
|
26
23
|
currency = Currency.GBP;
|
|
27
24
|
gdpr_approved = false;
|
|
28
25
|
status = UserStatus.Active;
|
|
29
26
|
id_verified = false;
|
|
30
27
|
profile_image = null;
|
|
31
|
-
providers;
|
|
32
28
|
email_verified = false;
|
|
33
29
|
constructor(args = {}) {
|
|
34
30
|
Object.assign(this, args);
|
|
35
31
|
}
|
|
36
32
|
};
|
|
37
|
-
__decorate([
|
|
38
|
-
Updatable(),
|
|
39
|
-
ObjectId(),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], User.prototype, "company_id", void 0);
|
|
42
33
|
__decorate([
|
|
43
34
|
Updatable(),
|
|
44
35
|
__metadata("design:type", String)
|
|
@@ -59,10 +50,6 @@ __decorate([
|
|
|
59
50
|
Updatable(),
|
|
60
51
|
__metadata("design:type", String)
|
|
61
52
|
], User.prototype, "email", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
Updatable(),
|
|
64
|
-
__metadata("design:type", Array)
|
|
65
|
-
], User.prototype, "kyc", void 0);
|
|
66
53
|
__decorate([
|
|
67
54
|
Updatable(),
|
|
68
55
|
__metadata("design:type", String)
|
|
@@ -87,10 +74,6 @@ __decorate([
|
|
|
87
74
|
Updatable(),
|
|
88
75
|
__metadata("design:type", String)
|
|
89
76
|
], User.prototype, "profile_image", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
Updatable(),
|
|
92
|
-
__metadata("design:type", Object)
|
|
93
|
-
], User.prototype, "providers", void 0);
|
|
94
77
|
__decorate([
|
|
95
78
|
Updatable(),
|
|
96
79
|
__metadata("design:type", Boolean)
|
|
@@ -111,21 +94,3 @@ export var UserType;
|
|
|
111
94
|
(function (UserType) {
|
|
112
95
|
UserType["Individual"] = "individual";
|
|
113
96
|
})(UserType || (UserType = {}));
|
|
114
|
-
export class UserKyc {
|
|
115
|
-
external_id;
|
|
116
|
-
first_name;
|
|
117
|
-
middle_name;
|
|
118
|
-
last_name;
|
|
119
|
-
full_name;
|
|
120
|
-
constructor(external_id, first_name, middle_name, last_name) {
|
|
121
|
-
this.external_id = external_id;
|
|
122
|
-
this.first_name = first_name;
|
|
123
|
-
this.middle_name = middle_name;
|
|
124
|
-
this.last_name = last_name;
|
|
125
|
-
this.full_name = this.first_name;
|
|
126
|
-
if (this.middle_name) {
|
|
127
|
-
this.full_name += ` ${this.middle_name}`;
|
|
128
|
-
}
|
|
129
|
-
this.full_name += ` ${this.last_name}`;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../global/interfaces.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IACxB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IACxB,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../global/interfaces.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IACxB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IACxB,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B"}
|