gemcap-be-common 1.3.78 → 1.3.79
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/models/CRMProspectSharepoint.model.d.ts +43 -0
- package/models/CRMProspectSharepoint.model.js +55 -0
- package/models/CRMProspectSharepoint.model.ts +68 -0
- package/models/_models.d.ts +1 -0
- package/models/_models.js +1 -0
- package/models/_models.ts +1 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
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 mongoose, { Model } from 'mongoose';
|
|
26
|
+
declare enum SharepointSyncStatus {
|
|
27
|
+
pending = "pending",
|
|
28
|
+
synced = "synced",
|
|
29
|
+
failed = "failed"
|
|
30
|
+
}
|
|
31
|
+
export interface IProspectSharepoint {
|
|
32
|
+
isActive: boolean;
|
|
33
|
+
prospectId: mongoose.Types.ObjectId;
|
|
34
|
+
folderId: string;
|
|
35
|
+
folderName: string;
|
|
36
|
+
webUrl: string;
|
|
37
|
+
driveId: string;
|
|
38
|
+
syncStatus: SharepointSyncStatus;
|
|
39
|
+
parentId: string;
|
|
40
|
+
}
|
|
41
|
+
export type TProspectSharepointModel = Model<IProspectSharepoint, object, object>;
|
|
42
|
+
export declare const ProspectSharepoint: TProspectSharepointModel;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ProspectSharepoint = void 0;
|
|
7
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
+
const _models_1 = require("./_models");
|
|
9
|
+
var SharepointSyncStatus;
|
|
10
|
+
(function (SharepointSyncStatus) {
|
|
11
|
+
SharepointSyncStatus["pending"] = "pending";
|
|
12
|
+
SharepointSyncStatus["synced"] = "synced";
|
|
13
|
+
SharepointSyncStatus["failed"] = "failed";
|
|
14
|
+
})(SharepointSyncStatus || (SharepointSyncStatus = {}));
|
|
15
|
+
const ProspectSharepointSchema = new mongoose_1.default.Schema({
|
|
16
|
+
isActive: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: true,
|
|
19
|
+
},
|
|
20
|
+
prospectId: {
|
|
21
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
22
|
+
ref: _models_1.MODEL_NAMES.CRMProspects,
|
|
23
|
+
required: true,
|
|
24
|
+
index: true,
|
|
25
|
+
},
|
|
26
|
+
folderId: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
folderName: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
webUrl: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
driveId: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
syncStatus: {
|
|
43
|
+
type: String,
|
|
44
|
+
enum: Object.values(SharepointSyncStatus),
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
parentId: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
}, {
|
|
52
|
+
timestamps: { createdAt: true, updatedAt: false },
|
|
53
|
+
versionKey: false,
|
|
54
|
+
});
|
|
55
|
+
exports.ProspectSharepoint = mongoose_1.default.model(_models_1.MODEL_NAMES.prospectSharepoint, ProspectSharepointSchema);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import mongoose, { Model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
import { MODEL_NAMES } from './_models';
|
|
4
|
+
|
|
5
|
+
enum SharepointSyncStatus {
|
|
6
|
+
pending = 'pending',
|
|
7
|
+
synced = 'synced',
|
|
8
|
+
failed = 'failed',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface IProspectSharepoint {
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
prospectId: mongoose.Types.ObjectId;
|
|
14
|
+
folderId: string;
|
|
15
|
+
folderName: string;
|
|
16
|
+
webUrl: string;
|
|
17
|
+
driveId: string;
|
|
18
|
+
syncStatus: SharepointSyncStatus;
|
|
19
|
+
parentId: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type TProspectSharepointModel = Model<IProspectSharepoint, object, object>;
|
|
23
|
+
|
|
24
|
+
const ProspectSharepointSchema = new mongoose.Schema<IProspectSharepoint, TProspectSharepointModel>(
|
|
25
|
+
{
|
|
26
|
+
isActive: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: true,
|
|
29
|
+
},
|
|
30
|
+
prospectId: {
|
|
31
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
32
|
+
ref: MODEL_NAMES.CRMProspects,
|
|
33
|
+
required: true,
|
|
34
|
+
index: true,
|
|
35
|
+
},
|
|
36
|
+
folderId: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
folderName: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
webUrl: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true,
|
|
47
|
+
},
|
|
48
|
+
driveId: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
syncStatus: {
|
|
53
|
+
type: String,
|
|
54
|
+
enum: Object.values(SharepointSyncStatus),
|
|
55
|
+
required: true,
|
|
56
|
+
},
|
|
57
|
+
parentId: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: true,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
timestamps: { createdAt: true, updatedAt: false },
|
|
64
|
+
versionKey: false,
|
|
65
|
+
},
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
export const ProspectSharepoint = mongoose.model<IProspectSharepoint, TProspectSharepointModel>(MODEL_NAMES.prospectSharepoint, ProspectSharepointSchema);
|
package/models/_models.d.ts
CHANGED
package/models/_models.js
CHANGED
|
@@ -45,6 +45,7 @@ exports.MODEL_NAMES = {
|
|
|
45
45
|
CRMProspectSources: 'crm_prospect_sources',
|
|
46
46
|
CRMProspectExternalUpdates: 'crm_prospect_external_updates',
|
|
47
47
|
CRMProspectInternalUpdates: 'crm_prospect_internal_updates',
|
|
48
|
+
prospectSharepoint: 'crm_prospect_sharepoint',
|
|
48
49
|
customerAPGroups: 'customerAPGroups',
|
|
49
50
|
customerGroups: 'customerGroups',
|
|
50
51
|
deletedRecords: 'deleted_records',
|
package/models/_models.ts
CHANGED
|
@@ -42,6 +42,7 @@ export const MODEL_NAMES = {
|
|
|
42
42
|
CRMProspectSources: 'crm_prospect_sources',
|
|
43
43
|
CRMProspectExternalUpdates: 'crm_prospect_external_updates',
|
|
44
44
|
CRMProspectInternalUpdates: 'crm_prospect_internal_updates',
|
|
45
|
+
prospectSharepoint: 'crm_prospect_sharepoint',
|
|
45
46
|
customerAPGroups: 'customerAPGroups',
|
|
46
47
|
customerGroups: 'customerGroups',
|
|
47
48
|
deletedRecords: 'deleted_records',
|