@duvdu-v1/duvdu 1.1.302 → 1.1.304
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/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/models/fundedTransactions.model.d.ts +42 -0
- package/build/models/fundedTransactions.model.js +20 -0
- package/build/models/transactions.model.d.ts +5 -1
- package/build/models/transactions.model.js +4 -0
- package/build/types/Permissions.js +3 -13
- package/build/types/model-names.d.ts +2 -1
- package/build/types/model-names.js +1 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export * from './models/Bookmark-projects.model';
|
|
|
84
84
|
export * from './models/contractCancel.model';
|
|
85
85
|
export * from './models/transactions.model';
|
|
86
86
|
export * from './models/pages.model';
|
|
87
|
+
export * from './models/fundedTransactions.model';
|
|
87
88
|
export * from './services/category.service';
|
|
88
89
|
export * from './services/projectView.service';
|
|
89
90
|
export * from './services/rank.service';
|
package/build/index.js
CHANGED
|
@@ -101,6 +101,7 @@ __exportStar(require("./models/Bookmark-projects.model"), exports);
|
|
|
101
101
|
__exportStar(require("./models/contractCancel.model"), exports);
|
|
102
102
|
__exportStar(require("./models/transactions.model"), exports);
|
|
103
103
|
__exportStar(require("./models/pages.model"), exports);
|
|
104
|
+
__exportStar(require("./models/fundedTransactions.model"), exports);
|
|
104
105
|
__exportStar(require("./services/category.service"), exports);
|
|
105
106
|
__exportStar(require("./services/projectView.service"), exports);
|
|
106
107
|
__exportStar(require("./services/rank.service"), exports);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import { Types } from 'mongoose';
|
|
26
|
+
export declare enum FundedTransactionStatus {
|
|
27
|
+
PENDING = "pending",
|
|
28
|
+
SUCCESS = "success",
|
|
29
|
+
FAILED = "failed"
|
|
30
|
+
}
|
|
31
|
+
export interface IFundedTransaction {
|
|
32
|
+
user: Types.ObjectId;
|
|
33
|
+
fundAmount: number;
|
|
34
|
+
fundAttachment: string;
|
|
35
|
+
fundingAmount: number;
|
|
36
|
+
transaction: Types.ObjectId;
|
|
37
|
+
status: FundedTransactionStatus;
|
|
38
|
+
createdBy: Types.ObjectId;
|
|
39
|
+
}
|
|
40
|
+
export declare const FundedTransaction: import("mongoose").Model<IFundedTransaction, {}, {}, {}, import("mongoose").Document<unknown, {}, IFundedTransaction> & IFundedTransaction & {
|
|
41
|
+
_id: Types.ObjectId;
|
|
42
|
+
}, any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FundedTransaction = exports.FundedTransactionStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const model_names_1 = require("../types/model-names");
|
|
6
|
+
var FundedTransactionStatus;
|
|
7
|
+
(function (FundedTransactionStatus) {
|
|
8
|
+
FundedTransactionStatus["PENDING"] = "pending";
|
|
9
|
+
FundedTransactionStatus["SUCCESS"] = "success";
|
|
10
|
+
FundedTransactionStatus["FAILED"] = "failed";
|
|
11
|
+
})(FundedTransactionStatus || (exports.FundedTransactionStatus = FundedTransactionStatus = {}));
|
|
12
|
+
exports.FundedTransaction = (0, mongoose_1.model)(model_names_1.MODELS.fundedTransaction, new mongoose_1.Schema({
|
|
13
|
+
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
14
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
15
|
+
fundAmount: { type: Number, default: 0 },
|
|
16
|
+
fundAttachment: { type: String, default: null },
|
|
17
|
+
fundingAmount: { type: Number, default: 0 },
|
|
18
|
+
transaction: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.transaction },
|
|
19
|
+
status: { type: String, default: FundedTransactionStatus.PENDING },
|
|
20
|
+
}, { timestamps: true, collection: model_names_1.MODELS.fundedTransaction }));
|
|
@@ -26,7 +26,8 @@ import { Types } from 'mongoose';
|
|
|
26
26
|
export declare enum TransactionStatus {
|
|
27
27
|
PENDING = "pending",
|
|
28
28
|
SUCCESS = "success",
|
|
29
|
-
FAILED = "failed"
|
|
29
|
+
FAILED = "failed",
|
|
30
|
+
FUNDED = "funded"
|
|
30
31
|
}
|
|
31
32
|
export declare enum TransactionType {
|
|
32
33
|
DEPOSIT = "deposit",
|
|
@@ -42,6 +43,9 @@ export interface ITransaction {
|
|
|
42
43
|
model: string;
|
|
43
44
|
isSubscription: boolean;
|
|
44
45
|
type: TransactionType;
|
|
46
|
+
fundedAt: Date;
|
|
47
|
+
fundAttachment: string[];
|
|
48
|
+
fundingAmount: number;
|
|
45
49
|
}
|
|
46
50
|
export declare const Transaction: import("mongoose").Model<ITransaction, {}, {}, {}, import("mongoose").Document<unknown, {}, ITransaction> & ITransaction & {
|
|
47
51
|
_id: Types.ObjectId;
|
|
@@ -8,6 +8,7 @@ var TransactionStatus;
|
|
|
8
8
|
TransactionStatus["PENDING"] = "pending";
|
|
9
9
|
TransactionStatus["SUCCESS"] = "success";
|
|
10
10
|
TransactionStatus["FAILED"] = "failed";
|
|
11
|
+
TransactionStatus["FUNDED"] = "funded";
|
|
11
12
|
})(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
|
|
12
13
|
var TransactionType;
|
|
13
14
|
(function (TransactionType) {
|
|
@@ -24,4 +25,7 @@ exports.Transaction = (0, mongoose_1.model)(model_names_1.MODELS.transaction, ne
|
|
|
24
25
|
model: { type: String, default: null },
|
|
25
26
|
isSubscription: { type: Boolean, default: false },
|
|
26
27
|
type: { type: String, default: TransactionType.DEPOSIT },
|
|
28
|
+
fundedAt: { type: Date, default: null },
|
|
29
|
+
fundAttachment: { type: [String], default: [] },
|
|
30
|
+
fundingAmount: { type: Number, default: 0 },
|
|
27
31
|
}));
|
|
@@ -208,19 +208,9 @@ exports.permissions = {
|
|
|
208
208
|
PERMISSIONS.acceptCancelContract,
|
|
209
209
|
PERMISSIONS.deleteCancelContract,
|
|
210
210
|
],
|
|
211
|
-
projectReview: [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
],
|
|
215
|
-
contractReview: [
|
|
216
|
-
PERMISSIONS.listContractsReviews,
|
|
217
|
-
PERMISSIONS.deleteContractsReviews,
|
|
218
|
-
],
|
|
219
|
-
tickets: [
|
|
220
|
-
PERMISSIONS.listTickets,
|
|
221
|
-
PERMISSIONS.updateTicket,
|
|
222
|
-
PERMISSIONS.removeTicket,
|
|
223
|
-
],
|
|
211
|
+
projectReview: [PERMISSIONS.listProjectReviews, PERMISSIONS.deleteProjectReviews],
|
|
212
|
+
contractReview: [PERMISSIONS.listContractsReviews, PERMISSIONS.deleteContractsReviews],
|
|
213
|
+
tickets: [PERMISSIONS.listTickets, PERMISSIONS.updateTicket, PERMISSIONS.removeTicket],
|
|
224
214
|
reports: [
|
|
225
215
|
PERMISSIONS.listReports,
|
|
226
216
|
PERMISSIONS.getReportHandler,
|