@duvdu-v1/duvdu 1.1.301 → 1.1.303
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.d.ts +5 -0
- package/build/types/Permissions.js +18 -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: null },
|
|
30
|
+
fundingAmount: { type: Number, default: 0 },
|
|
27
31
|
}));
|
|
@@ -41,6 +41,10 @@ export declare enum PERMISSIONS {
|
|
|
41
41
|
getReport = "get-report",
|
|
42
42
|
updateReport = "update-report",
|
|
43
43
|
deleteReport = "delete-report",
|
|
44
|
+
createPage = "create-page",
|
|
45
|
+
updatePage = "update-page",
|
|
46
|
+
deletePage = "delete-page",
|
|
47
|
+
listPages = "list-pages",
|
|
44
48
|
bookmarks = "bookmarks",
|
|
45
49
|
createTicket = "create ticket",
|
|
46
50
|
getAllTickets = "get-all-tickets",
|
|
@@ -100,6 +104,7 @@ export declare const permissions: {
|
|
|
100
104
|
contractReview: PERMISSIONS[];
|
|
101
105
|
tickets: PERMISSIONS[];
|
|
102
106
|
reports: PERMISSIONS[];
|
|
107
|
+
pages: PERMISSIONS[];
|
|
103
108
|
bookmarks: PERMISSIONS[];
|
|
104
109
|
ticket: PERMISSIONS[];
|
|
105
110
|
terms: PERMISSIONS[];
|
|
@@ -57,6 +57,11 @@ var PERMISSIONS;
|
|
|
57
57
|
PERMISSIONS["getReport"] = "get-report";
|
|
58
58
|
PERMISSIONS["updateReport"] = "update-report";
|
|
59
59
|
PERMISSIONS["deleteReport"] = "delete-report";
|
|
60
|
+
// pages
|
|
61
|
+
PERMISSIONS["createPage"] = "create-page";
|
|
62
|
+
PERMISSIONS["updatePage"] = "update-page";
|
|
63
|
+
PERMISSIONS["deletePage"] = "delete-page";
|
|
64
|
+
PERMISSIONS["listPages"] = "list-pages";
|
|
60
65
|
PERMISSIONS["bookmarks"] = "bookmarks";
|
|
61
66
|
PERMISSIONS["createTicket"] = "create ticket";
|
|
62
67
|
PERMISSIONS["getAllTickets"] = "get-all-tickets";
|
|
@@ -159,6 +164,10 @@ exports.permissions = {
|
|
|
159
164
|
PERMISSIONS.getReport,
|
|
160
165
|
PERMISSIONS.updateReport,
|
|
161
166
|
PERMISSIONS.deleteReport,
|
|
167
|
+
PERMISSIONS.createPage,
|
|
168
|
+
PERMISSIONS.updatePage,
|
|
169
|
+
PERMISSIONS.deletePage,
|
|
170
|
+
PERMISSIONS.listPages,
|
|
162
171
|
],
|
|
163
172
|
category: [
|
|
164
173
|
PERMISSIONS.createCategory,
|
|
@@ -199,25 +208,21 @@ exports.permissions = {
|
|
|
199
208
|
PERMISSIONS.acceptCancelContract,
|
|
200
209
|
PERMISSIONS.deleteCancelContract,
|
|
201
210
|
],
|
|
202
|
-
projectReview: [
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
],
|
|
206
|
-
contractReview: [
|
|
207
|
-
PERMISSIONS.listContractsReviews,
|
|
208
|
-
PERMISSIONS.deleteContractsReviews,
|
|
209
|
-
],
|
|
210
|
-
tickets: [
|
|
211
|
-
PERMISSIONS.listTickets,
|
|
212
|
-
PERMISSIONS.updateTicket,
|
|
213
|
-
PERMISSIONS.removeTicket,
|
|
214
|
-
],
|
|
211
|
+
projectReview: [PERMISSIONS.listProjectReviews, PERMISSIONS.deleteProjectReviews],
|
|
212
|
+
contractReview: [PERMISSIONS.listContractsReviews, PERMISSIONS.deleteContractsReviews],
|
|
213
|
+
tickets: [PERMISSIONS.listTickets, PERMISSIONS.updateTicket, PERMISSIONS.removeTicket],
|
|
215
214
|
reports: [
|
|
216
215
|
PERMISSIONS.listReports,
|
|
217
216
|
PERMISSIONS.getReportHandler,
|
|
218
217
|
PERMISSIONS.updateReportHandler,
|
|
219
218
|
PERMISSIONS.deleteReportHandler,
|
|
220
219
|
],
|
|
220
|
+
pages: [
|
|
221
|
+
PERMISSIONS.createPage,
|
|
222
|
+
PERMISSIONS.updatePage,
|
|
223
|
+
PERMISSIONS.deletePage,
|
|
224
|
+
PERMISSIONS.listPages,
|
|
225
|
+
],
|
|
221
226
|
bookmarks: [PERMISSIONS.bookmarks],
|
|
222
227
|
ticket: [
|
|
223
228
|
PERMISSIONS.createTicket,
|