@futdevpro/nts-dynamo 1.5.77 → 1.5.83
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/LICENSE +2 -2
- package/lib/_constants/dynamo-nts-global-settings.d.ts +2 -2
- package/lib/_constants/dynamo-nts-global-settings.js +17 -17
- package/lib/_constants/index.d.ts +1 -1
- package/lib/_constants/index.js +4 -4
- package/lib/_enums/data-model-type.enum.d.ts +12 -12
- package/lib/_enums/data-model-type.enum.js +16 -16
- package/lib/_enums/data-model-type.enum.js.map +1 -1
- package/lib/_enums/dynamo-nts-data-service-function.enum.d.ts +12 -12
- package/lib/_enums/dynamo-nts-data-service-function.enum.js +18 -18
- package/lib/_enums/dynamo-nts-data-service-function.enum.js.map +1 -1
- package/lib/_enums/dynamo-nts-route-security.enum.d.ts +11 -11
- package/lib/_enums/dynamo-nts-route-security.enum.js +15 -15
- package/lib/_enums/dynamo-nts-route-security.enum.js.map +1 -1
- package/lib/_enums/dynamo-nts-socket-security.enum.d.ts +10 -10
- package/lib/_enums/dynamo-nts-socket-security.enum.js +14 -14
- package/lib/_enums/dynamo-nts-socket-security.enum.js.map +1 -1
- package/lib/_enums/http/http-call-type.enum.d.ts +11 -11
- package/lib/_enums/http/http-call-type.enum.js +15 -15
- package/lib/_enums/http/http-call-type.enum.js.map +1 -1
- package/lib/_enums/http/http-response-type.enum.d.ts +6 -6
- package/lib/_enums/http/http-response-type.enum.js +10 -10
- package/lib/_enums/http/http-response-type.enum.js.map +1 -1
- package/lib/_enums/http/socket-event.enum.d.ts +9 -8
- package/lib/_enums/http/socket-event.enum.d.ts.map +1 -1
- package/lib/_enums/http/socket-event.enum.js +13 -12
- package/lib/_enums/http/socket-event.enum.js.map +1 -1
- package/lib/_enums/index.d.ts +8 -8
- package/lib/_enums/index.js +13 -13
- package/lib/_enums/predefined-data-types.enum.d.ts +10 -10
- package/lib/_enums/predefined-data-types.enum.js +14 -14
- package/lib/_enums/predefined-data-types.enum.js.map +1 -1
- package/lib/_interfaces/certification-settings.interface.d.ts +7 -0
- package/lib/_interfaces/certification-settings.interface.d.ts.map +1 -0
- package/lib/_interfaces/certification-settings.interface.js +3 -0
- package/lib/_interfaces/certification-settings.interface.js.map +1 -0
- package/lib/_interfaces/global-service-settings.interface.d.ts +18 -0
- package/lib/_interfaces/global-service-settings.interface.d.ts.map +1 -0
- package/lib/_interfaces/global-service-settings.interface.js +3 -0
- package/lib/_interfaces/global-service-settings.interface.js.map +1 -0
- package/lib/_interfaces/index.d.ts +1 -0
- package/lib/_interfaces/index.d.ts.map +1 -0
- package/lib/_interfaces/index.js +4 -0
- package/lib/_interfaces/index.js.map +1 -0
- package/lib/_interfaces/port-settings.interface.d.ts +5 -0
- package/lib/_interfaces/port-settings.interface.d.ts.map +1 -0
- package/lib/_interfaces/port-settings.interface.js +3 -0
- package/lib/_interfaces/port-settings.interface.js.map +1 -0
- package/lib/_models/dynamo-nts-api-call-params.d.ts +95 -95
- package/lib/_models/dynamo-nts-api-call-params.js +47 -47
- package/lib/_models/dynamo-nts-app-params.d.ts +49 -49
- package/lib/_models/dynamo-nts-app-params.js +17 -17
- package/lib/_models/dynamo-nts-endpoint-params.d.ts +80 -80
- package/lib/_models/dynamo-nts-endpoint-params.js +139 -139
- package/lib/_models/dynamo-nts-global-settings.d.ts +53 -53
- package/lib/_models/dynamo-nts-global-settings.js +2 -2
- package/lib/_models/dynamo-nts-routing-module-settings.d.ts +19 -19
- package/lib/_models/dynamo-nts-routing-module-settings.js +2 -2
- package/lib/_models/dynamo-nts-socket-event-params.d.ts +32 -30
- package/lib/_models/dynamo-nts-socket-event-params.d.ts.map +1 -1
- package/lib/_models/dynamo-nts-socket-event-params.js +80 -79
- package/lib/_models/dynamo-nts-socket-event-params.js.map +1 -1
- package/lib/_models/dynamo-nts-socket-presence.d.ts +21 -0
- package/lib/_models/dynamo-nts-socket-presence.d.ts.map +1 -0
- package/lib/_models/dynamo-nts-socket-presence.js +45 -0
- package/lib/_models/dynamo-nts-socket-presence.js.map +1 -0
- package/lib/_models/dynamo-nts-socket-service-params.d.ts +18 -18
- package/lib/_models/dynamo-nts-socket-service-params.d.ts.map +1 -1
- package/lib/_models/dynamo-nts-socket-service-params.js +26 -26
- package/lib/_models/dynamo-nts-socket-service-params.js.map +1 -1
- package/lib/_models/index.d.ts +7 -8
- package/lib/_models/index.d.ts.map +1 -1
- package/lib/_models/index.js +12 -12
- package/lib/_models/index.js.map +1 -1
- package/lib/_modules/api-service.index.d.ts +5 -5
- package/lib/_modules/api-service.index.js +11 -11
- package/lib/_modules/app-extended.index.d.ts +15 -12
- package/lib/_modules/app-extended.index.d.ts.map +1 -1
- package/lib/_modules/app-extended.index.js +23 -19
- package/lib/_modules/app-extended.index.js.map +1 -1
- package/lib/_modules/app.index.d.ts +13 -10
- package/lib/_modules/app.index.d.ts.map +1 -1
- package/lib/_modules/app.index.js +21 -17
- package/lib/_modules/app.index.js.map +1 -1
- package/lib/_modules/auth.index.d.ts +3 -3
- package/lib/_modules/auth.index.js +8 -8
- package/lib/_modules/constants.index.d.ts +1 -1
- package/lib/_modules/constants.index.js +4 -4
- package/lib/_modules/controller.index.d.ts +4 -4
- package/lib/_modules/controller.index.js +10 -10
- package/lib/_modules/custom-data/custom-data.controller.d.ts +5 -5
- package/lib/_modules/custom-data/custom-data.controller.js +55 -55
- package/lib/_modules/custom-data/custom-data.service.d.ts +5 -5
- package/lib/_modules/custom-data/custom-data.service.js +11 -11
- package/lib/_modules/custom-data/get-custom-data-routing-module.d.ts +3 -3
- package/lib/_modules/custom-data/get-custom-data-routing-module.js +17 -17
- package/lib/_modules/custom-data/index.d.ts +4 -4
- package/lib/_modules/custom-data/index.js +8 -8
- package/lib/_modules/custom-data-module.index.d.ts +1 -1
- package/lib/_modules/custom-data-module.index.js +4 -4
- package/lib/_modules/data-service.index.d.ts +5 -5
- package/lib/_modules/data-service.index.js +10 -10
- package/lib/_modules/email.index.d.ts +3 -3
- package/lib/_modules/email.index.js +8 -8
- package/lib/_modules/enums.index.d.ts +1 -1
- package/lib/_modules/enums.index.js +4 -4
- package/lib/_modules/models.index.d.ts +1 -1
- package/lib/_modules/models.index.js +4 -4
- package/lib/_modules/services.index.d.ts +1 -1
- package/lib/_modules/services.index.js +4 -4
- package/lib/_modules/test/get-test-routing-module.d.ts +3 -3
- package/lib/_modules/test/get-test-routing-module.js +17 -17
- package/lib/_modules/test/index.d.ts +3 -3
- package/lib/_modules/test/index.js +7 -7
- package/lib/_modules/test/test.controller.d.ts +5 -5
- package/lib/_modules/test/test.controller.js +104 -104
- package/lib/_modules/test-module.index.d.ts +1 -1
- package/lib/_modules/test-module.index.js +4 -4
- package/lib/_modules/usage/get-usage-routing-module.d.ts +3 -3
- package/lib/_modules/usage/get-usage-routing-module.js +17 -17
- package/lib/_modules/usage/index.d.ts +4 -4
- package/lib/_modules/usage/index.js +8 -8
- package/lib/_modules/usage/usage-controller.d.ts +6 -6
- package/lib/_modules/usage/usage-controller.js +88 -88
- package/lib/_modules/usage/usage.service.d.ts +16 -16
- package/lib/_modules/usage/usage.service.js +132 -132
- package/lib/_modules/usage-module.index.d.ts +1 -1
- package/lib/_modules/usage-module.index.js +4 -4
- package/lib/_services/dynamo-nts-api.service.d.ts +34 -34
- package/lib/_services/dynamo-nts-api.service.js +188 -188
- package/lib/_services/dynamo-nts-app-extended.d.ts +128 -128
- package/lib/_services/dynamo-nts-app-extended.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-app-extended.js +212 -212
- package/lib/_services/dynamo-nts-app-extended.js.map +1 -1
- package/lib/_services/dynamo-nts-app.d.ts +270 -278
- package/lib/_services/dynamo-nts-app.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-app.js +371 -371
- package/lib/_services/dynamo-nts-app.js.map +1 -1
- package/lib/_services/dynamo-nts-app.spec.d.ts +1 -0
- package/lib/_services/dynamo-nts-app.spec.d.ts.map +1 -0
- package/lib/_services/dynamo-nts-app.spec.js +10 -0
- package/lib/_services/dynamo-nts-app.spec.js.map +1 -0
- package/lib/_services/dynamo-nts-auth.service.d.ts +127 -127
- package/lib/_services/dynamo-nts-auth.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-auth.service.js +53 -53
- package/lib/_services/dynamo-nts-auth.service.js.map +1 -1
- package/lib/_services/dynamo-nts-controller.service.d.ts +105 -105
- package/lib/_services/dynamo-nts-controller.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-controller.service.js +57 -57
- package/lib/_services/dynamo-nts-controller.service.js.map +1 -1
- package/lib/_services/dynamo-nts-data.service.d.ts +230 -230
- package/lib/_services/dynamo-nts-data.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-data.service.js +689 -689
- package/lib/_services/dynamo-nts-data.service.js.map +1 -1
- package/lib/_services/dynamo-nts-db-service-collection.service.d.ts +8 -8
- package/lib/_services/dynamo-nts-db-service-collection.service.js +10 -10
- package/lib/_services/dynamo-nts-db.service.d.ts +386 -312
- package/lib/_services/dynamo-nts-db.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-db.service.js +856 -856
- package/lib/_services/dynamo-nts-db.service.js.map +1 -1
- package/lib/_services/dynamo-nts-email-service-collection.service.d.ts +18 -18
- package/lib/_services/dynamo-nts-email-service-collection.service.js +20 -20
- package/lib/_services/dynamo-nts-email.service.d.ts +56 -56
- package/lib/_services/dynamo-nts-email.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-email.service.js +203 -203
- package/lib/_services/dynamo-nts-email.service.js.map +1 -1
- package/lib/_services/dynamo-nts-global.service.d.ts +71 -84
- package/lib/_services/dynamo-nts-global.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-global.service.js +156 -156
- package/lib/_services/dynamo-nts-global.service.js.map +1 -1
- package/lib/_services/dynamo-nts-routing-module.service.d.ts +76 -76
- package/lib/_services/dynamo-nts-routing-module.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-routing-module.service.js +191 -191
- package/lib/_services/dynamo-nts-routing-module.service.js.map +1 -1
- package/lib/_services/dynamo-nts-shared.service.d.ts +31 -31
- package/lib/_services/dynamo-nts-shared.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-shared.service.js +70 -70
- package/lib/_services/dynamo-nts-shared.service.js.map +1 -1
- package/lib/_services/dynamo-nts-shared.service.spec.d.ts +2 -0
- package/lib/_services/dynamo-nts-shared.service.spec.d.ts.map +1 -0
- package/lib/_services/dynamo-nts-shared.service.spec.js +12 -0
- package/lib/_services/dynamo-nts-shared.service.spec.js.map +1 -0
- package/lib/_services/dynamo-nts-singleton.service.d.ts +8 -8
- package/lib/_services/dynamo-nts-singleton.service.js +18 -18
- package/lib/_services/dynamo-nts-singleton.service.js.map +1 -1
- package/lib/_services/dynamo-nts-socket-service-collection.service.d.ts +9 -9
- package/lib/_services/dynamo-nts-socket-service-collection.service.js +13 -13
- package/lib/_services/dynamo-nts-socket.service.d.ts +57 -45
- package/lib/_services/dynamo-nts-socket.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-socket.service.js +188 -165
- package/lib/_services/dynamo-nts-socket.service.js.map +1 -1
- package/lib/_services/index.d.ts +14 -16
- package/lib/_services/index.d.ts.map +1 -1
- package/lib/_services/index.js +20 -20
- package/lib/_services/index.js.map +1 -1
- package/lib/index.d.ts +6 -6
- package/lib/index.js +14 -14
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package SAVE.json +216 -0
- package/package-NEW with test but not working.json +228 -0
- package/package.json +14 -8
- package/spec/support/jasmine.json +14 -0
- package/src/_enums/http/socket-event.enum.ts +2 -1
- package/src/_interfaces/certification-settings.interface.ts +7 -0
- package/src/_interfaces/global-service-settings.interface.ts +23 -0
- package/src/_interfaces/index.ts +5 -0
- package/src/_interfaces/port-settings.interface.ts +5 -0
- package/src/_models/dynamo-nts-socket-event-params.ts +23 -21
- package/src/_models/{dynamo-nts-socket-dictionary.ts → dynamo-nts-socket-presence.ts} +21 -5
- package/src/_models/dynamo-nts-socket-service-params.ts +1 -0
- package/src/_models/index.ts +2 -2
- package/src/_modules/app-extended.index.ts +7 -2
- package/src/_modules/app.index.ts +5 -0
- package/src/_services/dynamo-nts-app-extended.ts +6 -2
- package/src/_services/dynamo-nts-app.spec.ts +14 -0
- package/src/_services/dynamo-nts-app.ts +8 -14
- package/src/_services/dynamo-nts-auth.service.ts +1 -0
- package/src/_services/dynamo-nts-controller.service.ts +2 -1
- package/src/_services/dynamo-nts-data.service.ts +19 -19
- package/src/_services/dynamo-nts-db.service.ts +195 -115
- package/src/_services/dynamo-nts-email.service.ts +1 -0
- package/src/_services/dynamo-nts-global.service.ts +3 -18
- package/src/_services/dynamo-nts-routing-module.service.ts +1 -0
- package/src/_services/dynamo-nts-shared.service.spec.ts +10 -0
- package/src/_services/dynamo-nts-shared.service.ts +2 -1
- package/src/_services/dynamo-nts-socket.service.ts +80 -41
- package/src/_services/index.ts +2 -2
|
@@ -1,313 +1,387 @@
|
|
|
1
|
-
import * as mongoose from 'mongoose';
|
|
2
|
-
import { Dynamo_Metadata, Dynamo_DataParams } from '@futdevpro/fsm-dynamo';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
*
|
|
100
|
-
* @
|
|
101
|
-
*
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* @returns
|
|
139
|
-
*/
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* @
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* @
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* //
|
|
170
|
-
*
|
|
171
|
-
* //
|
|
172
|
-
*
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* $
|
|
207
|
-
* $
|
|
208
|
-
* //
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* @example
|
|
222
|
-
* //
|
|
223
|
-
* {
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* }
|
|
228
|
-
* //
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* $
|
|
234
|
-
* $
|
|
235
|
-
* //
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* @
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
* @
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
* //
|
|
267
|
-
*
|
|
268
|
-
* //
|
|
269
|
-
*
|
|
270
|
-
* // or
|
|
271
|
-
* {
|
|
272
|
-
* //
|
|
273
|
-
* @example
|
|
274
|
-
* // or
|
|
275
|
-
* {
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* //
|
|
281
|
-
* $
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
*
|
|
310
|
-
*/
|
|
311
|
-
|
|
312
|
-
|
|
1
|
+
import * as mongoose from 'mongoose';
|
|
2
|
+
import { Dynamo_Metadata, Dynamo_DataParams } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
/**
|
|
4
|
+
* @example
|
|
5
|
+
* // by email:
|
|
6
|
+
* { email: email }
|
|
7
|
+
* //
|
|
8
|
+
* @example
|
|
9
|
+
* // or by id that is in list:
|
|
10
|
+
* { userIds: { $in: this.userId } }
|
|
11
|
+
* //
|
|
12
|
+
* @example
|
|
13
|
+
* // or by number or Date that is Greater Than AND Less Than:
|
|
14
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
15
|
+
* // further tools (syntax matches with $gt):
|
|
16
|
+
* $eq: // Matches values that are EQual to a specified value.
|
|
17
|
+
* $gte: // Matches values that are Greater Than OR Equal to a specified value.
|
|
18
|
+
* $lte: // Matches values that are Less Than or Equal to a specified value.
|
|
19
|
+
* $ne: // Matches all values that are Not Equal to a specified value.
|
|
20
|
+
* $nin: // Matches None of the values specified IN an array.
|
|
21
|
+
* //
|
|
22
|
+
* @returns {T} data: T
|
|
23
|
+
*/
|
|
24
|
+
export type DynamoNTS_DBFilter<T> = {
|
|
25
|
+
[K in keyof T]?: T[K] | {
|
|
26
|
+
$in?: any;
|
|
27
|
+
$eq?: T[K];
|
|
28
|
+
$gt?: number | Date;
|
|
29
|
+
$gte?: number | Date;
|
|
30
|
+
$lt?: number | Date;
|
|
31
|
+
$lte?: number | Date;
|
|
32
|
+
$ne?: T[K];
|
|
33
|
+
$nin?: T[K];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @param update this uses the basic Mongoose updateOne
|
|
38
|
+
* @example
|
|
39
|
+
* // increase a specific value (here by 15):
|
|
40
|
+
* { $inc: { popularity: 15 } }
|
|
41
|
+
* //
|
|
42
|
+
* @example
|
|
43
|
+
* // or add element to a list:
|
|
44
|
+
* { $push: { reactions: this.newReaction }
|
|
45
|
+
* // or add multiple elements to a list
|
|
46
|
+
* { $push: { schedule: {$each: [ monday, tuesday, wednesday ] } } }
|
|
47
|
+
* //
|
|
48
|
+
* @example
|
|
49
|
+
* // or all at once
|
|
50
|
+
* {
|
|
51
|
+
* $inc: { popularity: this.newVote.amount },
|
|
52
|
+
* emailVerified: true,
|
|
53
|
+
* $push: { reactions: this.newReaction }
|
|
54
|
+
* }
|
|
55
|
+
* // further tools (syntax matches with $inc):
|
|
56
|
+
* $currentDate: // Sets the value of a field to current date, either as a Date or a Timestamp.
|
|
57
|
+
* $min: // Only updates the field if the specified value is less than the existing field value.
|
|
58
|
+
* $max: // Only updates the field if the specified value is greater than the existing field value.
|
|
59
|
+
* $mul: // Multiplies the value of the field by the specified amount.
|
|
60
|
+
* $rename: // Renames a field.
|
|
61
|
+
* $unset: // Removes the specified field from a document. (set: "" to value)
|
|
62
|
+
* //
|
|
63
|
+
*/
|
|
64
|
+
export type DynamoNTS_DBUpdate<T> = {
|
|
65
|
+
[K in keyof T]?: T[K] | {
|
|
66
|
+
$inc?: number;
|
|
67
|
+
$push?: any | {
|
|
68
|
+
$each?: T[K];
|
|
69
|
+
};
|
|
70
|
+
$min?: number;
|
|
71
|
+
$max?: number;
|
|
72
|
+
$mul?: number;
|
|
73
|
+
$rename?: string;
|
|
74
|
+
$unset?: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
export declare class DynamoNTS_DBService<T extends Dynamo_Metadata> {
|
|
81
|
+
dataParams: Dynamo_DataParams;
|
|
82
|
+
dataModel: mongoose.Model<mongoose.Document<any, any, any>, any, any>;
|
|
83
|
+
private depDataName;
|
|
84
|
+
defaultErrorUserMsg: string;
|
|
85
|
+
/**
|
|
86
|
+
* @param dataName name the model
|
|
87
|
+
* @param typeSample sample data for scheme creation (dont include Dynamo_Metadata!)
|
|
88
|
+
* @param schemaSettings additional settings for specific parameters as unique, required, minlength or maxlength
|
|
89
|
+
* schemaSettings also MUST contain specific types that differs from the listed above (Array, Date)
|
|
90
|
+
*/
|
|
91
|
+
constructor(dataParams: Dynamo_DataParams);
|
|
92
|
+
/**
|
|
93
|
+
* save new data
|
|
94
|
+
* @param data data
|
|
95
|
+
* @returns data
|
|
96
|
+
*/
|
|
97
|
+
createData(data: T, issuer: string): Promise<T>;
|
|
98
|
+
/**
|
|
99
|
+
* Find data by _id and update
|
|
100
|
+
* @param data data
|
|
101
|
+
* @returns data
|
|
102
|
+
*/
|
|
103
|
+
modifyData(data: T, issuer: string): Promise<T>;
|
|
104
|
+
/**
|
|
105
|
+
* returns data by _id,
|
|
106
|
+
* @param id id
|
|
107
|
+
* @returns data
|
|
108
|
+
*/
|
|
109
|
+
getDataById(id: string): Promise<T>;
|
|
110
|
+
/**
|
|
111
|
+
* get data by dependency data id,
|
|
112
|
+
* !!!: throws error if not found (errorCode on not found: NTS-DBS-GD2)
|
|
113
|
+
*
|
|
114
|
+
* @param dependencyId id
|
|
115
|
+
* @returns data
|
|
116
|
+
*/
|
|
117
|
+
getDataByDependencyId(dependencyId: string): Promise<T>;
|
|
118
|
+
/**
|
|
119
|
+
* get data by dependency data id,
|
|
120
|
+
* !!!: throws error if not found (errorCode on not found: NTS-DBS-GLD2)
|
|
121
|
+
*
|
|
122
|
+
* @param dependencyId id
|
|
123
|
+
* @returns dataList
|
|
124
|
+
*/
|
|
125
|
+
getDataListByDependencyId(dependencyId: string): Promise<T[]>;
|
|
126
|
+
/**
|
|
127
|
+
* get multiple data objects by a list of DependencyIDs,
|
|
128
|
+
* !!!: throws error if not found (errorCode on not found: NTS-DBS-GLDS2)
|
|
129
|
+
*
|
|
130
|
+
* @param ids ids
|
|
131
|
+
* @returns dataList
|
|
132
|
+
*/
|
|
133
|
+
getDataListByDependencyIds(ids: string[]): Promise<T[]>;
|
|
134
|
+
/**
|
|
135
|
+
* returns all data from database,
|
|
136
|
+
* !!!: throws error if not found (errorCode on not found: NTS-DBS-GA1)
|
|
137
|
+
*
|
|
138
|
+
* @returns dataList
|
|
139
|
+
*/
|
|
140
|
+
getAll(): Promise<T[]>;
|
|
141
|
+
/**
|
|
142
|
+
* deleted data by id
|
|
143
|
+
* @param id id
|
|
144
|
+
*/
|
|
145
|
+
deleteDataById(id: string): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* deleted data by id
|
|
148
|
+
* @param dependencyId id
|
|
149
|
+
*/
|
|
150
|
+
deleteDataByDependencyId(dependencyId: string): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* returns search result for searchBy object params
|
|
153
|
+
* can use lists or xRange values for searchBy obj properties
|
|
154
|
+
*
|
|
155
|
+
* @param filterBy filter
|
|
156
|
+
* @param narrowByDependencyIds id
|
|
157
|
+
* @returns dataList
|
|
158
|
+
*/
|
|
159
|
+
searchData(filterBy: DynamoNTS_DBFilter<T>, narrowByDependencyIds?: string[]): Promise<T[]>;
|
|
160
|
+
/**
|
|
161
|
+
* Find the data first by any of its parameters,
|
|
162
|
+
* !!!: throws error if not found (errorCode on not found: NTS-DBS-FO1)
|
|
163
|
+
*
|
|
164
|
+
* @param filterBy if you can, use unique parameters for find!
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* // by email:
|
|
168
|
+
* { email: email }
|
|
169
|
+
* //
|
|
170
|
+
* @example
|
|
171
|
+
* // or by id that is in list:
|
|
172
|
+
* { userIds: { $in: this.userId } }
|
|
173
|
+
* //
|
|
174
|
+
* @example
|
|
175
|
+
* // or by number or Date that is Greater Than AND Less Than:
|
|
176
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
177
|
+
* // further tools (syntax matches with $gt):
|
|
178
|
+
* $eq: // Matches values that are EQual to a specified value.
|
|
179
|
+
* $gte: // Matches values that are Greater Than OR Equal to a specified value.
|
|
180
|
+
* $lte: // Matches values that are Less Than or Equal to a specified value.
|
|
181
|
+
* $ne: // Matches all values that are Not Equal to a specified value.
|
|
182
|
+
* $nin: // Matches None of the values specified IN an array.
|
|
183
|
+
* //
|
|
184
|
+
* @returns {T} data: T
|
|
185
|
+
*/
|
|
186
|
+
findOne(filterBy: DynamoNTS_DBFilter<T>): Promise<T>;
|
|
187
|
+
/**
|
|
188
|
+
* #MONGOOSE FUNCTION
|
|
189
|
+
* Find the data first by any of its parameters,
|
|
190
|
+
* !!!: throws error if not found (errorCode on not found: NTS-DBS-F1)
|
|
191
|
+
*
|
|
192
|
+
* @param filterBy if you can, use unique parameters for find!
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* // by email:
|
|
196
|
+
* { email: email }
|
|
197
|
+
* //
|
|
198
|
+
* @example
|
|
199
|
+
* // or by id that is in list:
|
|
200
|
+
* { userIds: { $in: this.userId } }
|
|
201
|
+
* //
|
|
202
|
+
* @example
|
|
203
|
+
* // or by number or Date that is Greater Than AND Less Than:
|
|
204
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
205
|
+
* // further tools (syntax matches with $gt):
|
|
206
|
+
* $eq: // Matches values that are EQual to a specified value.
|
|
207
|
+
* $gte: // Matches values that are Greater Than OR Equal to a specified value.
|
|
208
|
+
* $lte: // Matches values that are Less Than or Equal to a specified value.
|
|
209
|
+
* $ne: // Matches all values that are Not Equal to a specified value.
|
|
210
|
+
* $nin: // Matches None of the values specified IN an array.
|
|
211
|
+
* //
|
|
212
|
+
* @returns {T[]} dataList: T[]
|
|
213
|
+
*/
|
|
214
|
+
find(filterBy: DynamoNTS_DBFilter<T>): Promise<T[]>;
|
|
215
|
+
/**
|
|
216
|
+
* #MONGOOSE FUNCTION
|
|
217
|
+
* Find the data first by any of its parameters
|
|
218
|
+
*
|
|
219
|
+
* @param filterBy if you can, use unique parameters for find!
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* // by email:
|
|
223
|
+
* { email: email }
|
|
224
|
+
* //
|
|
225
|
+
* @example
|
|
226
|
+
* // or by id that is in list:
|
|
227
|
+
* { userIds: { $in: this.userId } }
|
|
228
|
+
* //
|
|
229
|
+
* @example
|
|
230
|
+
* // or by number or Date that is Greater Than AND Less Than:
|
|
231
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
232
|
+
* // further tools (syntax matches with $gt):
|
|
233
|
+
* $eq: // Matches values that are EQual to a specified value.
|
|
234
|
+
* $gte: // Matches values that are Greater Than OR Equal to a specified value.
|
|
235
|
+
* $lte: // Matches values that are Less Than or Equal to a specified value.
|
|
236
|
+
* $ne: // Matches all values that are Not Equal to a specified value.
|
|
237
|
+
* $nin: // Matches None of the values specified IN an array.
|
|
238
|
+
* //
|
|
239
|
+
* @param page page
|
|
240
|
+
* @param pageSize pageSize
|
|
241
|
+
* @param sort
|
|
242
|
+
* @example
|
|
243
|
+
* // by dateTime (this uses the basic sort function):
|
|
244
|
+
* { dateTime: -1 }
|
|
245
|
+
* //
|
|
246
|
+
* @returns {T[]} dataList: T[]
|
|
247
|
+
*/
|
|
248
|
+
findWithPaging(filterBy: DynamoNTS_DBFilter<T>, page: number, pageSize: number, sort?: any): Promise<T[]>;
|
|
249
|
+
/**
|
|
250
|
+
* #MONGOOSE FUNCTION
|
|
251
|
+
* Find data by _id and update
|
|
252
|
+
* !!!: throws error if not found (errorCode on not found: )
|
|
253
|
+
*
|
|
254
|
+
* @param id id
|
|
255
|
+
* @param update update
|
|
256
|
+
* @returns data
|
|
257
|
+
*/
|
|
258
|
+
findByIdAndUpdate(id: string, update: DynamoNTS_DBUpdate<T>, modifier: string): Promise<T>;
|
|
259
|
+
/**
|
|
260
|
+
* #MONGOOSE FUNCTION
|
|
261
|
+
* Find the data first by any of its parameters
|
|
262
|
+
*
|
|
263
|
+
* @param filter This uses the basic Mongoose updateOne.
|
|
264
|
+
* If you can, use unique parameters for find!
|
|
265
|
+
* @example
|
|
266
|
+
* // by email:
|
|
267
|
+
* { email: email }
|
|
268
|
+
* //
|
|
269
|
+
* @example
|
|
270
|
+
* // or by id that is in list:
|
|
271
|
+
* { userIds: { $in: this.userId } }
|
|
272
|
+
* //
|
|
273
|
+
* @example
|
|
274
|
+
* // or by number or Date that is Greater Than AND Less Than:
|
|
275
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
276
|
+
* // further tools (syntax matches with $gt):
|
|
277
|
+
* $eq: // Matches values that are EQual to a specified value.
|
|
278
|
+
* $gte: // Matches values that are Greater Than OR Equal to a specified value.
|
|
279
|
+
* $lte: // Matches values that are Less Than or Equal to a specified value.
|
|
280
|
+
* $ne: // Matches all values that are Not Equal to a specified value.
|
|
281
|
+
* $nin: // Matches None of the values specified IN an array.
|
|
282
|
+
* //
|
|
283
|
+
*
|
|
284
|
+
* @param update this uses the basic Mongoose updateOne
|
|
285
|
+
* @example
|
|
286
|
+
* // increase a specific value (here by 15):
|
|
287
|
+
* { $inc: { popularity: 15 } }
|
|
288
|
+
* //
|
|
289
|
+
* @example
|
|
290
|
+
* // or add element to a list:
|
|
291
|
+
* { $push: { reactions: this.newReaction }
|
|
292
|
+
* // or add multiple elements to a list
|
|
293
|
+
* { $push: { schedule: {$each: [ monday, tuesday, wednesday ] } } }
|
|
294
|
+
* //
|
|
295
|
+
* @example
|
|
296
|
+
* // or all at once
|
|
297
|
+
* {
|
|
298
|
+
* $inc: { popularity: this.newVote.amount },
|
|
299
|
+
* emailVerified: true,
|
|
300
|
+
* $push: { reactions: this.newReaction }
|
|
301
|
+
* }
|
|
302
|
+
* // further tools (syntax matches with $inc):
|
|
303
|
+
* $currentDate: // Sets the value of a field to current date, either as a Date or a Timestamp.
|
|
304
|
+
* $min: // Only updates the field if the specified value is less than the existing field value.
|
|
305
|
+
* $max: // Only updates the field if the specified value is greater than the existing field value.
|
|
306
|
+
* $mul: // Multiplies the value of the field by the specified amount.
|
|
307
|
+
* $rename: // Renames a field.
|
|
308
|
+
* $unset: // Removes the specified field from a document. (set: "" to value)
|
|
309
|
+
* //
|
|
310
|
+
*/
|
|
311
|
+
updateOne(filterBy: DynamoNTS_DBFilter<T>, update: DynamoNTS_DBUpdate<T>, issuer: string): Promise<void>;
|
|
312
|
+
/**
|
|
313
|
+
* #MONGOOSE FUNCTION
|
|
314
|
+
* update one parameter by a specific
|
|
315
|
+
*
|
|
316
|
+
* @param filter This uses the basic Mongoose updateMany.
|
|
317
|
+
* @example
|
|
318
|
+
* // by email:
|
|
319
|
+
* { email: email }
|
|
320
|
+
* //
|
|
321
|
+
* @example
|
|
322
|
+
* // or by id that is in list:
|
|
323
|
+
* { userIds: { $in: this.userId } }
|
|
324
|
+
* //
|
|
325
|
+
* @example
|
|
326
|
+
* // or by number or Date that is Greater Than AND Less Than:
|
|
327
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
328
|
+
* // further tools (syntax matches with $gt):
|
|
329
|
+
* $eq: // Matches values that are EQual to a specified value.
|
|
330
|
+
* $gte: // Matches values that are Greater Than OR Equal to a specified value.
|
|
331
|
+
* $lte: // Matches values that are Less Than or Equal to a specified value.
|
|
332
|
+
* $ne: // Matches all values that are Not Equal to a specified value.
|
|
333
|
+
* $nin: // Matches None of the values specified IN an array.
|
|
334
|
+
* //
|
|
335
|
+
*
|
|
336
|
+
* @param update this uses the basic Mongoose updateOne
|
|
337
|
+
* @example
|
|
338
|
+
* // increase a specific value (here by 15):
|
|
339
|
+
* { $inc: { popularity: 15 } }
|
|
340
|
+
* //
|
|
341
|
+
* @example
|
|
342
|
+
* // or add element to a list:
|
|
343
|
+
* { $push: { reactions: this.newReaction }
|
|
344
|
+
* // or add multiple elements to a list
|
|
345
|
+
* { $push: { schedule: {$each: [ monday, tuesday, wednesday ] } } }
|
|
346
|
+
* //
|
|
347
|
+
* @example
|
|
348
|
+
* // or all at once
|
|
349
|
+
* {
|
|
350
|
+
* $inc: { popularity: this.newVote.amount },
|
|
351
|
+
* emailVerified: true,
|
|
352
|
+
* $push: { reactions: this.newReaction }
|
|
353
|
+
* }
|
|
354
|
+
* // further tools (syntax matches with $inc):
|
|
355
|
+
* $currentDate: // Sets the value of a field to current date, either as a Date or a Timestamp.
|
|
356
|
+
* $min: // Only updates the field if the specified value is less than the existing field value.
|
|
357
|
+
* $max: // Only updates the field if the specified value is greater than the existing field value.
|
|
358
|
+
* $mul: // Multiplies the value of the field by the specified amount.
|
|
359
|
+
* $rename: // Renames a field.
|
|
360
|
+
* $unset: // Removes the specified field from a document. (set: "" to value)
|
|
361
|
+
* //
|
|
362
|
+
*/
|
|
363
|
+
updateMany(filterBy: DynamoNTS_DBFilter<T>, update: DynamoNTS_DBUpdate<T>, issuer: string): Promise<void>;
|
|
364
|
+
/**
|
|
365
|
+
* builds and returns mongoose schema
|
|
366
|
+
* @returns schema
|
|
367
|
+
*/
|
|
368
|
+
private getSchema;
|
|
369
|
+
/**
|
|
370
|
+
* builds mongoose schema building settings object by dynamoDataModelParamsList
|
|
371
|
+
* @param params DynamoBEDataPropertyParams
|
|
372
|
+
* @returns mongoose schema object
|
|
373
|
+
*/
|
|
374
|
+
private buildMongooseSchemaByModelParams;
|
|
375
|
+
private getBEType;
|
|
376
|
+
/**
|
|
377
|
+
* adds dynamo metadata settings to any mongoose schema building settings object
|
|
378
|
+
* @param schema schema to update
|
|
379
|
+
* @returns updated schema
|
|
380
|
+
*/
|
|
381
|
+
private addDynamo_MetadataToSchema;
|
|
382
|
+
/**
|
|
383
|
+
* sets depDataKey
|
|
384
|
+
*/
|
|
385
|
+
private lookForDependencyDataSettings;
|
|
386
|
+
}
|
|
313
387
|
//# sourceMappingURL=dynamo-nts-db.service.d.ts.map
|