@duvdu-v1/duvdu 1.1.108 → 1.1.110
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/producer.model.d.ts +0 -24
- package/build/models/producer.model.js +1 -71
- package/build/models/settings.model.d.ts +33 -0
- package/build/models/settings.model.js +8 -0
- package/build/types/Permissions.d.ts +5 -1
- package/build/types/Permissions.js +9 -0
- package/build/types/model-names.d.ts +3 -2
- package/build/types/model-names.js +2 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export * from './models/follow.model';
|
|
|
65
65
|
export * from './models/session.model';
|
|
66
66
|
export * from './models/userSession.model';
|
|
67
67
|
export * from './models/ranks.model';
|
|
68
|
+
export * from './models/settings.model';
|
|
68
69
|
export * from './services/category.service';
|
|
69
70
|
export * from './services/projectView.service';
|
|
70
71
|
export * from './types/notification.type';
|
package/build/index.js
CHANGED
|
@@ -81,6 +81,7 @@ __exportStar(require("./models/follow.model"), exports);
|
|
|
81
81
|
__exportStar(require("./models/session.model"), exports);
|
|
82
82
|
__exportStar(require("./models/userSession.model"), exports);
|
|
83
83
|
__exportStar(require("./models/ranks.model"), exports);
|
|
84
|
+
__exportStar(require("./models/settings.model"), exports);
|
|
84
85
|
__exportStar(require("./services/category.service"), exports);
|
|
85
86
|
__exportStar(require("./services/projectView.service"), exports);
|
|
86
87
|
__exportStar(require("./types/notification.type"), exports);
|
|
@@ -25,30 +25,6 @@
|
|
|
25
25
|
import { Types } from 'mongoose';
|
|
26
26
|
import { Icategory } from '../types/Category';
|
|
27
27
|
import { Iuser } from '../types/User';
|
|
28
|
-
export interface IproducerBooking {
|
|
29
|
-
producer: Types.ObjectId | Iuser;
|
|
30
|
-
user: Types.ObjectId | Iuser;
|
|
31
|
-
platform: string;
|
|
32
|
-
details: string;
|
|
33
|
-
cycle: string;
|
|
34
|
-
episodes: number;
|
|
35
|
-
episodeduration: number;
|
|
36
|
-
attachments: string[];
|
|
37
|
-
expectedbudget: number;
|
|
38
|
-
expectedprofits: number;
|
|
39
|
-
status: 'pending' | 'accepted' | 'rejected' | 'appoinment pending' | 'appoinment accepted' | 'appoinment rejected';
|
|
40
|
-
appoinment: {
|
|
41
|
-
date: string;
|
|
42
|
-
address: string;
|
|
43
|
-
location: {
|
|
44
|
-
lat: number;
|
|
45
|
-
lng: number;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export declare const ProducerBooking: import("mongoose").Model<IproducerBooking, {}, {}, {}, import("mongoose").Document<unknown, {}, IproducerBooking> & IproducerBooking & {
|
|
50
|
-
_id: Types.ObjectId;
|
|
51
|
-
}, any>;
|
|
52
28
|
export interface Iproducer {
|
|
53
29
|
user: Types.ObjectId | Iuser;
|
|
54
30
|
category: Types.ObjectId | Icategory;
|
|
@@ -1,78 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Producer =
|
|
3
|
+
exports.Producer = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
const cycles_1 = require("../types/cycles");
|
|
6
5
|
const model_names_1 = require("../types/model-names");
|
|
7
|
-
exports.ProducerBooking = (0, mongoose_1.model)(model_names_1.MODELS.producerBooking, new mongoose_1.Schema({
|
|
8
|
-
producer: {
|
|
9
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
10
|
-
ref: model_names_1.MODELS.user
|
|
11
|
-
},
|
|
12
|
-
user: {
|
|
13
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
14
|
-
ref: model_names_1.MODELS.user
|
|
15
|
-
},
|
|
16
|
-
platform: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: null
|
|
19
|
-
},
|
|
20
|
-
details: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: null
|
|
23
|
-
},
|
|
24
|
-
cycle: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: cycles_1.CYCLES.producer
|
|
27
|
-
},
|
|
28
|
-
episodes: {
|
|
29
|
-
type: Number,
|
|
30
|
-
default: null
|
|
31
|
-
},
|
|
32
|
-
episodeduration: {
|
|
33
|
-
type: Number,
|
|
34
|
-
default: null
|
|
35
|
-
},
|
|
36
|
-
attachments: [String],
|
|
37
|
-
expectedbudget: {
|
|
38
|
-
type: Number,
|
|
39
|
-
default: null
|
|
40
|
-
},
|
|
41
|
-
expectedprofits: {
|
|
42
|
-
type: Number,
|
|
43
|
-
default: null
|
|
44
|
-
},
|
|
45
|
-
status: {
|
|
46
|
-
type: String,
|
|
47
|
-
enum: ['pending', 'accepted', 'rejected', 'appoinment pending', 'appoinment accepted', 'appoinment rejected'],
|
|
48
|
-
default: 'pending'
|
|
49
|
-
},
|
|
50
|
-
appoinment: {
|
|
51
|
-
date: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: null
|
|
54
|
-
},
|
|
55
|
-
address: {
|
|
56
|
-
type: String,
|
|
57
|
-
default: null
|
|
58
|
-
},
|
|
59
|
-
location: {
|
|
60
|
-
lat: {
|
|
61
|
-
type: Number,
|
|
62
|
-
default: null
|
|
63
|
-
},
|
|
64
|
-
lng: {
|
|
65
|
-
type: Number,
|
|
66
|
-
default: null
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}, { timestamps: true, collection: model_names_1.MODELS.producerBooking, toJSON: {
|
|
71
|
-
transform(doc, ret) {
|
|
72
|
-
if (ret.attachments)
|
|
73
|
-
ret.attachments = ret.attachments.map((el) => process.env.BUCKET_HOST + '/' + el);
|
|
74
|
-
},
|
|
75
|
-
} }));
|
|
76
6
|
exports.Producer = (0, mongoose_1.model)(model_names_1.MODELS.producer, new mongoose_1.Schema({
|
|
77
7
|
user: {
|
|
78
8
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -0,0 +1,33 @@
|
|
|
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" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
export interface Isetting {
|
|
27
|
+
expirationTime: {
|
|
28
|
+
time: number;
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
export declare const Setting: import("mongoose").Model<Isetting, {}, {}, {}, import("mongoose").Document<unknown, {}, Isetting> & Isetting & {
|
|
32
|
+
_id: import("mongoose").Types.ObjectId;
|
|
33
|
+
}, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Setting = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const model_names_1 = require("../types/model-names");
|
|
6
|
+
exports.Setting = (0, mongoose_1.model)(model_names_1.MODELS.setting, new mongoose_1.Schema({
|
|
7
|
+
expirationTime: [{ time: Number, default: 0 }]
|
|
8
|
+
}, { timestamps: true, collection: model_names_1.MODELS.setting }));
|
|
@@ -55,7 +55,10 @@ export declare enum PERMISSIONS {
|
|
|
55
55
|
deleteProducerHandler = "delete producer",
|
|
56
56
|
createRankHandler = "create rank",
|
|
57
57
|
updateRankHandler = "update rank",
|
|
58
|
-
deleteRankHandler = "delete rank"
|
|
58
|
+
deleteRankHandler = "delete rank",
|
|
59
|
+
createSettingHandler = "create setting",
|
|
60
|
+
updateSettingHandler = "update setting",
|
|
61
|
+
deleteSettingHandler = "delete setting"
|
|
59
62
|
}
|
|
60
63
|
export declare const permissions: {
|
|
61
64
|
auth: PERMISSIONS[];
|
|
@@ -71,4 +74,5 @@ export declare const permissions: {
|
|
|
71
74
|
booking: PERMISSIONS[];
|
|
72
75
|
teamProject: PERMISSIONS[];
|
|
73
76
|
rank: PERMISSIONS[];
|
|
77
|
+
setting: PERMISSIONS[];
|
|
74
78
|
};
|
|
@@ -70,6 +70,10 @@ var PERMISSIONS;
|
|
|
70
70
|
PERMISSIONS["createRankHandler"] = "create rank";
|
|
71
71
|
PERMISSIONS["updateRankHandler"] = "update rank";
|
|
72
72
|
PERMISSIONS["deleteRankHandler"] = "delete rank";
|
|
73
|
+
//setting
|
|
74
|
+
PERMISSIONS["createSettingHandler"] = "create setting";
|
|
75
|
+
PERMISSIONS["updateSettingHandler"] = "update setting";
|
|
76
|
+
PERMISSIONS["deleteSettingHandler"] = "delete setting";
|
|
73
77
|
})(PERMISSIONS || (exports.PERMISSIONS = PERMISSIONS = {}));
|
|
74
78
|
exports.permissions = {
|
|
75
79
|
auth: [
|
|
@@ -144,5 +148,10 @@ exports.permissions = {
|
|
|
144
148
|
PERMISSIONS.createRankHandler,
|
|
145
149
|
PERMISSIONS.updateRankHandler,
|
|
146
150
|
PERMISSIONS.deleteRankHandler
|
|
151
|
+
],
|
|
152
|
+
setting: [
|
|
153
|
+
PERMISSIONS.createSettingHandler,
|
|
154
|
+
PERMISSIONS.updateSettingHandler,
|
|
155
|
+
PERMISSIONS.deleteSettingHandler
|
|
147
156
|
]
|
|
148
157
|
};
|
|
@@ -20,8 +20,9 @@ export declare enum MODELS {
|
|
|
20
20
|
teamProjectBooking = "teamProjects-booking",
|
|
21
21
|
contracts = "contracts",
|
|
22
22
|
producer = "producers",
|
|
23
|
-
|
|
23
|
+
producerContract = "producer-contracts",
|
|
24
24
|
follow = "follow",
|
|
25
25
|
userSession = "user-sessions",
|
|
26
|
-
rank = "ranks"
|
|
26
|
+
rank = "ranks",
|
|
27
|
+
setting = "settings"
|
|
27
28
|
}
|
|
@@ -24,8 +24,9 @@ var MODELS;
|
|
|
24
24
|
MODELS["teamProjectBooking"] = "teamProjects-booking";
|
|
25
25
|
MODELS["contracts"] = "contracts";
|
|
26
26
|
MODELS["producer"] = "producers";
|
|
27
|
-
MODELS["
|
|
27
|
+
MODELS["producerContract"] = "producer-contracts";
|
|
28
28
|
MODELS["follow"] = "follow";
|
|
29
29
|
MODELS["userSession"] = "user-sessions";
|
|
30
30
|
MODELS["rank"] = "ranks";
|
|
31
|
+
MODELS["setting"] = "settings";
|
|
31
32
|
})(MODELS || (exports.MODELS = MODELS = {}));
|