gemcap-be-common 1.4.220 → 1.4.222

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.
@@ -0,0 +1,54 @@
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 from 'mongoose';
26
+ export interface IBankIntegration {
27
+ provider: string;
28
+ accessToken: string;
29
+ refreshToken: string;
30
+ expiresAt: Date;
31
+ scopes: string;
32
+ connectedAt: Date;
33
+ lastSyncAt: Date;
34
+ }
35
+ export interface IBankIntegrationDoc extends IBankIntegration, mongoose.Document {
36
+ _id: mongoose.Types.ObjectId;
37
+ createdAt: Date;
38
+ updatedAt: Date;
39
+ }
40
+ export interface IBankIntegrationLean extends IBankIntegration {
41
+ _id: mongoose.Types.ObjectId;
42
+ createdAt: Date;
43
+ updatedAt: Date;
44
+ }
45
+ export interface IBankIntegrationPlain extends IBankIntegration {
46
+ _id: string;
47
+ createdAt: Date;
48
+ updatedAt: Date;
49
+ }
50
+ export type TBankIntegrationModel = mongoose.Model<IBankIntegration>;
51
+ export declare const BankIntegrationSchema: mongoose.Schema<IBankIntegration, TBankIntegrationModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IBankIntegration, mongoose.Document<unknown, {}, mongoose.FlatRecord<IBankIntegration>> & mongoose.FlatRecord<IBankIntegration> & {
52
+ _id: mongoose.Types.ObjectId;
53
+ }>;
54
+ export declare const BankIntegration: TBankIntegrationModel;
@@ -0,0 +1,32 @@
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.BankIntegration = exports.BankIntegrationSchema = void 0;
7
+ const mongoose_1 = __importDefault(require("mongoose"));
8
+ const _models_1 = require("./_models");
9
+ exports.BankIntegrationSchema = new mongoose_1.default.Schema({
10
+ provider: {
11
+ type: String,
12
+ },
13
+ accessToken: {
14
+ type: String,
15
+ },
16
+ refreshToken: {
17
+ type: String,
18
+ },
19
+ expiresAt: {
20
+ type: Date,
21
+ },
22
+ scopes: {
23
+ type: String,
24
+ },
25
+ connectedAt: {
26
+ type: Date,
27
+ },
28
+ lastSyncAt: {
29
+ type: Date,
30
+ },
31
+ }, { timestamps: true });
32
+ exports.BankIntegration = mongoose_1.default.model(_models_1.MODEL_NAMES.bankIntegrations, exports.BankIntegrationSchema);
@@ -0,0 +1,62 @@
1
+ import mongoose from 'mongoose';
2
+
3
+ import { MODEL_NAMES } from './_models';
4
+
5
+ export interface IBankIntegration {
6
+ provider: string;
7
+ accessToken: string;
8
+ refreshToken: string;
9
+ expiresAt: Date;
10
+ scopes: string;
11
+ connectedAt: Date;
12
+ lastSyncAt: Date;
13
+ }
14
+
15
+ export interface IBankIntegrationDoc extends IBankIntegration, mongoose.Document {
16
+ _id: mongoose.Types.ObjectId;
17
+ createdAt: Date;
18
+ updatedAt: Date;
19
+ }
20
+
21
+ export interface IBankIntegrationLean extends IBankIntegration {
22
+ _id: mongoose.Types.ObjectId;
23
+ createdAt: Date;
24
+ updatedAt: Date;
25
+ }
26
+
27
+ export interface IBankIntegrationPlain extends IBankIntegration {
28
+ _id: string;
29
+ createdAt: Date;
30
+ updatedAt: Date;
31
+ }
32
+
33
+ export type TBankIntegrationModel = mongoose.Model<IBankIntegration>;
34
+
35
+ export const BankIntegrationSchema = new mongoose.Schema<IBankIntegration, TBankIntegrationModel>(
36
+ {
37
+ provider: {
38
+ type: String,
39
+ },
40
+ accessToken: {
41
+ type: String,
42
+ },
43
+ refreshToken: {
44
+ type: String,
45
+ },
46
+ expiresAt: {
47
+ type: Date,
48
+ },
49
+ scopes: {
50
+ type: String,
51
+ },
52
+ connectedAt: {
53
+ type: Date,
54
+ },
55
+ lastSyncAt: {
56
+ type: Date,
57
+ },
58
+ },
59
+ { timestamps: true },
60
+ );
61
+
62
+ export const BankIntegration = mongoose.model<IBankIntegration, TBankIntegrationModel>(MODEL_NAMES.bankIntegrations, BankIntegrationSchema);
@@ -69,11 +69,8 @@ export interface IBorrowerNoteLean extends IBorrowerNote {
69
69
  createdAt: Date;
70
70
  updatedAt: Date;
71
71
  }
72
- export interface IBorrowerNoteWithSubjectLean extends Omit<IBorrowerNote, 'subjectId'> {
73
- _id: mongoose.Types.ObjectId;
72
+ export interface IBorrowerNoteWithSubjectLean extends Omit<IBorrowerNoteLean, 'subjectId'> {
74
73
  subjectId: IBorrowerNoteSubjectLean | null;
75
- createdAt: Date;
76
- updatedAt: Date;
77
74
  }
78
75
  export interface IBorrowerNotePlain extends Omit<IBorrowerNote, 'borrowerId' | 'subjectId'> {
79
76
  _id: string;
@@ -82,12 +79,8 @@ export interface IBorrowerNotePlain extends Omit<IBorrowerNote, 'borrowerId' | '
82
79
  createdAt: string;
83
80
  updatedAt: string;
84
81
  }
85
- export interface IBorrowerNoteWithSubjectPlain extends Omit<IBorrowerNote, 'borrowerId' | 'subjectId'> {
86
- _id: string;
87
- borrowerId: string;
82
+ export interface IBorrowerNoteWithSubjectPlain extends Omit<IBorrowerNotePlain, 'subjectId'> {
88
83
  subjectId: IBorrowerNoteSubjectPlain | null;
89
- createdAt: string;
90
- updatedAt: string;
91
84
  }
92
85
  export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
93
86
  export declare const BorrowerNoteSchema: mongoose.Schema<IBorrowerNoteDoc, mongoose.Model<IBorrowerNoteDoc, any, any, any, mongoose.Document<unknown, any, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
@@ -82,7 +82,7 @@ exports.BorrowerNoteSchema = new mongoose_1.default.Schema({
82
82
  type: {
83
83
  type: String,
84
84
  enum: ['manual', 'email'],
85
- default: 'manual'
85
+ default: 'manual',
86
86
  },
87
87
  emailFrom: { type: String },
88
88
  emailTo: { type: String },
@@ -59,11 +59,8 @@ export interface IBorrowerNoteLean extends IBorrowerNote {
59
59
  updatedAt: Date;
60
60
  }
61
61
 
62
- export interface IBorrowerNoteWithSubjectLean extends Omit<IBorrowerNote, 'subjectId'> {
63
- _id: mongoose.Types.ObjectId;
62
+ export interface IBorrowerNoteWithSubjectLean extends Omit<IBorrowerNoteLean, 'subjectId'> {
64
63
  subjectId: IBorrowerNoteSubjectLean | null;
65
- createdAt: Date;
66
- updatedAt: Date;
67
64
  }
68
65
 
69
66
  export interface IBorrowerNotePlain extends Omit<IBorrowerNote, 'borrowerId' | 'subjectId'> {
@@ -74,12 +71,8 @@ export interface IBorrowerNotePlain extends Omit<IBorrowerNote, 'borrowerId' | '
74
71
  updatedAt: string;
75
72
  }
76
73
 
77
- export interface IBorrowerNoteWithSubjectPlain extends Omit<IBorrowerNote, 'borrowerId' | 'subjectId'> {
78
- _id: string;
79
- borrowerId: string;
74
+ export interface IBorrowerNoteWithSubjectPlain extends Omit<IBorrowerNotePlain, 'subjectId'> {
80
75
  subjectId: IBorrowerNoteSubjectPlain | null;
81
- createdAt: string;
82
- updatedAt: string;
83
76
  }
84
77
 
85
78
  export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
@@ -161,7 +154,7 @@ export const BorrowerNoteSchema = new mongoose.Schema<IBorrowerNoteDoc>({
161
154
  type: {
162
155
  type: String,
163
156
  enum: ['manual', 'email'],
164
- default: 'manual'
157
+ default: 'manual',
165
158
  },
166
159
  emailFrom: { type: String },
167
160
  emailTo: { type: String },
@@ -16,6 +16,7 @@ export declare const MODEL_NAMES: {
16
16
  auditorContact: string;
17
17
  bankAccounts: string;
18
18
  banks: string;
19
+ bankIntegrations: string;
19
20
  BBCDates: string;
20
21
  BBCSheets: string;
21
22
  borrowerLogs: string;
package/models/_models.js CHANGED
@@ -19,6 +19,7 @@ exports.MODEL_NAMES = {
19
19
  auditorContact: 'auditor_contacts',
20
20
  bankAccounts: 'bankAccounts',
21
21
  banks: 'banks',
22
+ bankIntegrations: 'bank-integrations',
22
23
  BBCDates: 'bbcdates',
23
24
  BBCSheets: 'bbcsheets',
24
25
  borrowerLogs: 'borrowerLogs',
package/models/_models.ts CHANGED
@@ -16,6 +16,7 @@ export const MODEL_NAMES = {
16
16
  auditorContact: 'auditor_contacts',
17
17
  bankAccounts: 'bankAccounts',
18
18
  banks: 'banks',
19
+ bankIntegrations: 'bank-integrations',
19
20
  BBCDates: 'bbcdates',
20
21
  BBCSheets: 'bbcsheets',
21
22
  borrowerLogs: 'borrowerLogs',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.220",
3
+ "version": "1.4.222",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {