@steedos/objectql 2.2.52-beta.3 → 2.2.52-beta.34
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.txt +2 -3
- package/lib/actions/field_updates.js +7 -7
- package/lib/actions/field_updates.js.map +1 -1
- package/lib/actions/index.js +3 -3
- package/lib/actions/index.js.map +1 -1
- package/lib/actions/workflow_notifications.js +6 -6
- package/lib/actions/workflow_notifications.js.map +1 -1
- package/lib/actions/workflow_rule.js +9 -9
- package/lib/actions/workflow_rule.js.map +1 -1
- package/lib/broker.d.ts +7 -0
- package/lib/broker.js +41 -0
- package/lib/broker.js.map +1 -0
- package/lib/driver/field-encrytion/index.js +1 -1
- package/lib/driver/field-encrytion/index.js.map +1 -1
- package/lib/driver/index.js +2 -2
- package/lib/driver/index.js.map +1 -1
- package/lib/driver/meteorMongo.js +32 -32
- package/lib/driver/mongo.js +38 -38
- package/lib/driver/mysql.js +1 -1
- package/lib/driver/mysql.js.map +1 -1
- package/lib/driver/oracle.js +3 -3
- package/lib/driver/oracle.js.map +1 -1
- package/lib/driver/postgres.js +1 -1
- package/lib/driver/postgres.js.map +1 -1
- package/lib/driver/sqlite3.js +1 -1
- package/lib/driver/sqlite3.js.map +1 -1
- package/lib/driver/sqlserver.js +3 -3
- package/lib/driver/sqlserver.js.map +1 -1
- package/lib/dynamic-load/actions.js +6 -6
- package/lib/dynamic-load/actions.js.map +1 -1
- package/lib/dynamic-load/approval_process.js +1 -1
- package/lib/dynamic-load/approval_process.js.map +1 -1
- package/lib/dynamic-load/button.js +5 -7
- package/lib/dynamic-load/button.js.map +1 -1
- package/lib/dynamic-load/chart.js +2 -2
- package/lib/dynamic-load/client_script.js +2 -1
- package/lib/dynamic-load/client_script.js.map +1 -1
- package/lib/dynamic-load/field.js +5 -7
- package/lib/dynamic-load/field.js.map +1 -1
- package/lib/dynamic-load/index.js +21 -21
- package/lib/dynamic-load/index.js.map +1 -1
- package/lib/dynamic-load/layout.js +6 -7
- package/lib/dynamic-load/layout.js.map +1 -1
- package/lib/dynamic-load/listview.js +4 -5
- package/lib/dynamic-load/listview.js.map +1 -1
- package/lib/dynamic-load/object_translations.js +7 -7
- package/lib/dynamic-load/object_translations.js.map +1 -1
- package/lib/dynamic-load/package.js +15 -15
- package/lib/dynamic-load/package.js.map +1 -1
- package/lib/dynamic-load/page.js +2 -2
- package/lib/dynamic-load/permission.js +4 -4
- package/lib/dynamic-load/permission.js.map +1 -1
- package/lib/dynamic-load/permissionset.js +20 -20
- package/lib/dynamic-load/permissionset.js.map +1 -1
- package/lib/dynamic-load/preload_data.js +21 -21
- package/lib/dynamic-load/preload_data.js.map +1 -1
- package/lib/dynamic-load/profile.js +23 -23
- package/lib/dynamic-load/profile.js.map +1 -1
- package/lib/dynamic-load/query.js +2 -2
- package/lib/dynamic-load/restrictionRules.js +2 -2
- package/lib/dynamic-load/shareRules.js +2 -2
- package/lib/dynamic-load/tab.js +2 -2
- package/lib/dynamic-load/tabs.js +4 -4
- package/lib/dynamic-load/translations.js +9 -9
- package/lib/dynamic-load/translations.js.map +1 -1
- package/lib/dynamic-load/trigger.js +1 -1
- package/lib/dynamic-load/trigger.js.map +1 -1
- package/lib/dynamic-load/workflow.js +3 -3
- package/lib/dynamic-load/workflow.js.map +1 -1
- package/lib/formula/core.js +87 -54
- package/lib/formula/core.js.map +1 -1
- package/lib/formula/field_formula.js +12 -12
- package/lib/formula/index.js +13 -13
- package/lib/formula/index.js.map +1 -1
- package/lib/formula/recompute.js +13 -13
- package/lib/formula/recompute.js.map +1 -1
- package/lib/formula/type.d.ts +1 -0
- package/lib/formula/type.js.map +1 -1
- package/lib/formula/util.js +4 -3
- package/lib/formula/util.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +22 -19
- package/lib/index.js.map +1 -1
- package/lib/metadata-register/_base.js +12 -12
- package/lib/metadata-register/app.js +8 -8
- package/lib/metadata-register/chart.js +1 -1
- package/lib/metadata-register/chart.js.map +1 -1
- package/lib/metadata-register/index.js +48 -48
- package/lib/metadata-register/layout.js +10 -10
- package/lib/metadata-register/object.js +10 -10
- package/lib/metadata-register/page.js +1 -1
- package/lib/metadata-register/page.js.map +1 -1
- package/lib/metadata-register/permissionFields.js +1 -1
- package/lib/metadata-register/permissionFields.js.map +1 -1
- package/lib/metadata-register/permissionset.js +6 -6
- package/lib/metadata-register/process.js +1 -1
- package/lib/metadata-register/process.js.map +1 -1
- package/lib/metadata-register/processTrigger.js +1 -1
- package/lib/metadata-register/processTrigger.js.map +1 -1
- package/lib/metadata-register/profile.js +6 -6
- package/lib/metadata-register/query.js +1 -1
- package/lib/metadata-register/query.js.map +1 -1
- package/lib/metadata-register/restrictionRules.js +1 -1
- package/lib/metadata-register/restrictionRules.js.map +1 -1
- package/lib/metadata-register/shareRules.js +1 -1
- package/lib/metadata-register/shareRules.js.map +1 -1
- package/lib/metadata-register/tab.js +1 -1
- package/lib/metadata-register/tab.js.map +1 -1
- package/lib/metadata-register/tabs.js +10 -10
- package/lib/services/datasourceServiceFactory.js +2 -2
- package/lib/services/helpers/graphql/index.js +149 -104
- package/lib/services/helpers/graphql/index.js.map +1 -1
- package/lib/services/index.js +4 -4
- package/lib/services/index.js.map +1 -1
- package/lib/services/objectService.js +142 -142
- package/lib/services/objectService.js.map +1 -1
- package/lib/services/objectServiceDispatcher.js +89 -89
- package/lib/services/objectServiceDispatcher.js.map +1 -1
- package/lib/services/objectServiceFactory.js +2 -2
- package/lib/summary/core.js +16 -16
- package/lib/summary/core.js.map +1 -1
- package/lib/summary/field_summary.js +10 -10
- package/lib/summary/index.js +8 -8
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/recompute.js +6 -6
- package/lib/ts-types/index.js +3 -3
- package/lib/ts-types/index.js.map +1 -1
- package/lib/typeorm/driver.js +40 -40
- package/lib/typeorm/index.js +1 -1
- package/lib/typeorm/index.js.map +1 -1
- package/lib/typeorm/util.js +1 -1
- package/lib/typeorm/util.js.map +1 -1
- package/lib/types/app.js +21 -21
- package/lib/types/app.js.map +1 -1
- package/lib/types/config.js +2 -2
- package/lib/types/connection.js +10 -10
- package/lib/types/datasource.js +64 -64
- package/lib/types/datasource.js.map +1 -1
- package/lib/types/field.js +1 -1
- package/lib/types/field.js.map +1 -1
- package/lib/types/field_permission.js +6 -6
- package/lib/types/index.js +10 -10
- package/lib/types/index.js.map +1 -1
- package/lib/types/list_view.js +1 -1
- package/lib/types/list_view.js.map +1 -1
- package/lib/types/object.js +165 -152
- package/lib/types/object.js.map +1 -1
- package/lib/types/object_dynamic_load.js +10 -10
- package/lib/types/object_events.js +2 -2
- package/lib/types/object_layouts.js +4 -4
- package/lib/types/object_permission.js +1 -1
- package/lib/types/object_permission.js.map +1 -1
- package/lib/types/restrictionRule.js +4 -4
- package/lib/types/schema.js +8 -8
- package/lib/types/shareRule.js +4 -4
- package/lib/types/validation_rules.js +3 -3
- package/lib/types/validation_rules.js.map +1 -1
- package/lib/util/convert.js +2 -3
- package/lib/util/convert.js.map +1 -1
- package/lib/util/index.js +18 -16
- package/lib/util/index.js.map +1 -1
- package/package.json +10 -10
|
@@ -18,8 +18,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
18
18
|
var methods = {
|
|
19
19
|
aggregate: {
|
|
20
20
|
handler: function (query, externalPipeline, userSession) {
|
|
21
|
-
return
|
|
22
|
-
return
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
22
|
+
return tslib_1.__generator(this, function (_a) {
|
|
23
23
|
switch (_a.label) {
|
|
24
24
|
case 0: return [4 /*yield*/, this.object.aggregate(query, externalPipeline, userSession)];
|
|
25
25
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -30,8 +30,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
30
30
|
},
|
|
31
31
|
find: {
|
|
32
32
|
handler: function (query, userSession) {
|
|
33
|
-
return
|
|
34
|
-
return
|
|
33
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
34
|
+
return tslib_1.__generator(this, function (_a) {
|
|
35
35
|
switch (_a.label) {
|
|
36
36
|
case 0:
|
|
37
37
|
if (!(this.object.name == 'users')) return [3 /*break*/, 2];
|
|
@@ -46,8 +46,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
46
46
|
},
|
|
47
47
|
findOne: {
|
|
48
48
|
handler: function (id, query, userSession) {
|
|
49
|
-
return
|
|
50
|
-
return
|
|
49
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
50
|
+
return tslib_1.__generator(this, function (_a) {
|
|
51
51
|
switch (_a.label) {
|
|
52
52
|
case 0:
|
|
53
53
|
if (!(this.object.name == 'users')) return [3 /*break*/, 2];
|
|
@@ -62,8 +62,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
62
62
|
},
|
|
63
63
|
insert: {
|
|
64
64
|
handler: function (doc, userSession) {
|
|
65
|
-
return
|
|
66
|
-
return
|
|
65
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
66
|
+
return tslib_1.__generator(this, function (_a) {
|
|
67
67
|
switch (_a.label) {
|
|
68
68
|
case 0: return [4 /*yield*/, this.object.insert(doc, userSession)];
|
|
69
69
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -74,8 +74,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
74
74
|
},
|
|
75
75
|
update: {
|
|
76
76
|
handler: function (id, doc, userSession) {
|
|
77
|
-
return
|
|
78
|
-
return
|
|
77
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
78
|
+
return tslib_1.__generator(this, function (_a) {
|
|
79
79
|
switch (_a.label) {
|
|
80
80
|
case 0: return [4 /*yield*/, this.object.update(id, doc, userSession)];
|
|
81
81
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -86,8 +86,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
86
86
|
},
|
|
87
87
|
updateOne: {
|
|
88
88
|
handler: function (id, doc, userSession) {
|
|
89
|
-
return
|
|
90
|
-
return
|
|
89
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
90
|
+
return tslib_1.__generator(this, function (_a) {
|
|
91
91
|
switch (_a.label) {
|
|
92
92
|
case 0: return [4 /*yield*/, this.object.updateOne(id, doc, userSession)];
|
|
93
93
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -98,8 +98,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
98
98
|
},
|
|
99
99
|
updateMany: {
|
|
100
100
|
handler: function (queryFilters, doc, userSession) {
|
|
101
|
-
return
|
|
102
|
-
return
|
|
101
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
102
|
+
return tslib_1.__generator(this, function (_a) {
|
|
103
103
|
switch (_a.label) {
|
|
104
104
|
case 0: return [4 /*yield*/, this.object.updateMany(queryFilters, doc, userSession)];
|
|
105
105
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -110,8 +110,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
110
110
|
},
|
|
111
111
|
delete: {
|
|
112
112
|
handler: function (id, userSession) {
|
|
113
|
-
return
|
|
114
|
-
return
|
|
113
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
114
|
+
return tslib_1.__generator(this, function (_a) {
|
|
115
115
|
switch (_a.label) {
|
|
116
116
|
case 0: return [4 /*yield*/, this.object.delete(id, userSession)];
|
|
117
117
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -122,8 +122,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
122
122
|
},
|
|
123
123
|
directAggregate: {
|
|
124
124
|
handler: function (query, externalPipeline, userSession) {
|
|
125
|
-
return
|
|
126
|
-
return
|
|
125
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
126
|
+
return tslib_1.__generator(this, function (_a) {
|
|
127
127
|
switch (_a.label) {
|
|
128
128
|
case 0: return [4 /*yield*/, this.object.directAggregate(query, externalPipeline, userSession)];
|
|
129
129
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -134,8 +134,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
134
134
|
},
|
|
135
135
|
directAggregatePrefixalPipeline: {
|
|
136
136
|
handler: function (query, externalPipeline, userSession) {
|
|
137
|
-
return
|
|
138
|
-
return
|
|
137
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
138
|
+
return tslib_1.__generator(this, function (_a) {
|
|
139
139
|
switch (_a.label) {
|
|
140
140
|
case 0: return [4 /*yield*/, this.object.directAggregatePrefixalPipeline(query, externalPipeline, userSession)];
|
|
141
141
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -146,8 +146,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
146
146
|
},
|
|
147
147
|
directFind: {
|
|
148
148
|
handler: function (query, userSession) {
|
|
149
|
-
return
|
|
150
|
-
return
|
|
149
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
150
|
+
return tslib_1.__generator(this, function (_a) {
|
|
151
151
|
switch (_a.label) {
|
|
152
152
|
case 0: return [4 /*yield*/, this.object.directFind(query, userSession)];
|
|
153
153
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -158,8 +158,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
158
158
|
},
|
|
159
159
|
directInsert: {
|
|
160
160
|
handler: function (doc, userSession) {
|
|
161
|
-
return
|
|
162
|
-
return
|
|
161
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
162
|
+
return tslib_1.__generator(this, function (_a) {
|
|
163
163
|
switch (_a.label) {
|
|
164
164
|
case 0: return [4 /*yield*/, this.object.directInsert(doc, userSession)];
|
|
165
165
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -170,8 +170,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
170
170
|
},
|
|
171
171
|
directUpdate: {
|
|
172
172
|
handler: function (id, doc, userSession) {
|
|
173
|
-
return
|
|
174
|
-
return
|
|
173
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
174
|
+
return tslib_1.__generator(this, function (_a) {
|
|
175
175
|
switch (_a.label) {
|
|
176
176
|
case 0: return [4 /*yield*/, this.object.directUpdate(id, doc, userSession)];
|
|
177
177
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -182,8 +182,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
182
182
|
},
|
|
183
183
|
directDelete: {
|
|
184
184
|
handler: function (id, userSession) {
|
|
185
|
-
return
|
|
186
|
-
return
|
|
185
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
186
|
+
return tslib_1.__generator(this, function (_a) {
|
|
187
187
|
switch (_a.label) {
|
|
188
188
|
case 0: return [4 /*yield*/, this.object.directDelete(id, userSession)];
|
|
189
189
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -194,8 +194,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
194
194
|
},
|
|
195
195
|
count: {
|
|
196
196
|
handler: function (query, userSession) {
|
|
197
|
-
return
|
|
198
|
-
return
|
|
197
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
198
|
+
return tslib_1.__generator(this, function (_a) {
|
|
199
199
|
switch (_a.label) {
|
|
200
200
|
case 0: return [4 /*yield*/, this.object.count(query, userSession)];
|
|
201
201
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -236,8 +236,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
236
236
|
},
|
|
237
237
|
_makeNewID: {
|
|
238
238
|
handler: function () {
|
|
239
|
-
return
|
|
240
|
-
return
|
|
239
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
240
|
+
return tslib_1.__generator(this, function (_a) {
|
|
241
241
|
switch (_a.label) {
|
|
242
242
|
case 0: return [4 /*yield*/, this.object._makeNewID()];
|
|
243
243
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -248,8 +248,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
248
248
|
},
|
|
249
249
|
getRecordAbsoluteUrl: {
|
|
250
250
|
handler: function () {
|
|
251
|
-
return
|
|
252
|
-
return
|
|
251
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
252
|
+
return tslib_1.__generator(this, function (_a) {
|
|
253
253
|
return [2 /*return*/, this.object.getRecordAbsoluteUrl()];
|
|
254
254
|
});
|
|
255
255
|
});
|
|
@@ -257,8 +257,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
257
257
|
},
|
|
258
258
|
getGridAbsoluteUrl: {
|
|
259
259
|
handler: function () {
|
|
260
|
-
return
|
|
261
|
-
return
|
|
260
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
261
|
+
return tslib_1.__generator(this, function (_a) {
|
|
262
262
|
return [2 /*return*/, this.object.getGridAbsoluteUrl()];
|
|
263
263
|
});
|
|
264
264
|
});
|
|
@@ -266,8 +266,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
266
266
|
},
|
|
267
267
|
getRecordPermissions: {
|
|
268
268
|
handler: function (record, userSession) {
|
|
269
|
-
return
|
|
270
|
-
return
|
|
269
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
270
|
+
return tslib_1.__generator(this, function (_a) {
|
|
271
271
|
return [2 /*return*/, this.object.getRecordPermissions(record, userSession)];
|
|
272
272
|
});
|
|
273
273
|
});
|
|
@@ -275,8 +275,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
275
275
|
},
|
|
276
276
|
getRecordView: {
|
|
277
277
|
handler: function (userSession, context) {
|
|
278
|
-
return
|
|
279
|
-
return
|
|
278
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
279
|
+
return tslib_1.__generator(this, function (_a) {
|
|
280
280
|
switch (_a.label) {
|
|
281
281
|
case 0: return [4 /*yield*/, this.object.getRecordView(userSession, context)];
|
|
282
282
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -287,8 +287,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
287
287
|
},
|
|
288
288
|
createDefaultRecordView: {
|
|
289
289
|
handler: function (userSession) {
|
|
290
|
-
return
|
|
291
|
-
return
|
|
290
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
291
|
+
return tslib_1.__generator(this, function (_a) {
|
|
292
292
|
switch (_a.label) {
|
|
293
293
|
case 0: return [4 /*yield*/, this.object.createDefaultRecordView(userSession)];
|
|
294
294
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -299,8 +299,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
299
299
|
},
|
|
300
300
|
getDefaultRecordView: {
|
|
301
301
|
handler: function (userSession) {
|
|
302
|
-
return
|
|
303
|
-
return
|
|
302
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
303
|
+
return tslib_1.__generator(this, function (_a) {
|
|
304
304
|
switch (_a.label) {
|
|
305
305
|
case 0: return [4 /*yield*/, this.object.getDefaultRecordView(userSession)];
|
|
306
306
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -311,8 +311,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
311
311
|
},
|
|
312
312
|
getRelateds: {
|
|
313
313
|
handler: function () {
|
|
314
|
-
return
|
|
315
|
-
return
|
|
314
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
315
|
+
return tslib_1.__generator(this, function (_a) {
|
|
316
316
|
switch (_a.label) {
|
|
317
317
|
case 0: return [4 /*yield*/, this.object.getRelateds()];
|
|
318
318
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -323,8 +323,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
323
323
|
},
|
|
324
324
|
refreshIndexes: {
|
|
325
325
|
handler: function () {
|
|
326
|
-
return
|
|
327
|
-
return
|
|
326
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
327
|
+
return tslib_1.__generator(this, function (_a) {
|
|
328
328
|
switch (_a.label) {
|
|
329
329
|
case 0: return [4 /*yield*/, this.object.refreshIndexes()];
|
|
330
330
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -335,8 +335,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
335
335
|
},
|
|
336
336
|
allowRead: {
|
|
337
337
|
handler: function (userSession) {
|
|
338
|
-
return
|
|
339
|
-
return
|
|
338
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
339
|
+
return tslib_1.__generator(this, function (_a) {
|
|
340
340
|
switch (_a.label) {
|
|
341
341
|
case 0: return [4 /*yield*/, this.object.allowRead(userSession)];
|
|
342
342
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -347,8 +347,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
347
347
|
},
|
|
348
348
|
allowInsert: {
|
|
349
349
|
handler: function (userSession) {
|
|
350
|
-
return
|
|
351
|
-
return
|
|
350
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
351
|
+
return tslib_1.__generator(this, function (_a) {
|
|
352
352
|
switch (_a.label) {
|
|
353
353
|
case 0: return [4 /*yield*/, this.object.allowInsert(userSession)];
|
|
354
354
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -359,8 +359,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
359
359
|
},
|
|
360
360
|
allowUpdate: {
|
|
361
361
|
handler: function (userSession) {
|
|
362
|
-
return
|
|
363
|
-
return
|
|
362
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
363
|
+
return tslib_1.__generator(this, function (_a) {
|
|
364
364
|
switch (_a.label) {
|
|
365
365
|
case 0: return [4 /*yield*/, this.object.allowUpdate(userSession)];
|
|
366
366
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -371,8 +371,8 @@ function getObjectServiceMethodsSchema() {
|
|
|
371
371
|
},
|
|
372
372
|
allowDelete: {
|
|
373
373
|
handler: function (userSession) {
|
|
374
|
-
return
|
|
375
|
-
return
|
|
374
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
375
|
+
return tslib_1.__generator(this, function (_a) {
|
|
376
376
|
switch (_a.label) {
|
|
377
377
|
case 0: return [4 /*yield*/, this.object.allowDelete(userSession)];
|
|
378
378
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -395,9 +395,9 @@ function getObjectServiceActionsSchema() {
|
|
|
395
395
|
externalPipeline: { type: "array", items: "object" }
|
|
396
396
|
},
|
|
397
397
|
handler: function (ctx) {
|
|
398
|
-
return
|
|
398
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
399
399
|
var userSession, _a, query, externalPipeline;
|
|
400
|
-
return
|
|
400
|
+
return tslib_1.__generator(this, function (_b) {
|
|
401
401
|
switch (_b.label) {
|
|
402
402
|
case 0:
|
|
403
403
|
userSession = ctx.meta.user;
|
|
@@ -419,9 +419,9 @@ function getObjectServiceActionsSchema() {
|
|
|
419
419
|
sort: { type: 'string', optional: true }
|
|
420
420
|
},
|
|
421
421
|
handler: function (ctx) {
|
|
422
|
-
return
|
|
422
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
423
423
|
var filters, filtersStr, resolveInfo, fieldNames, userSession;
|
|
424
|
-
return
|
|
424
|
+
return tslib_1.__generator(this, function (_a) {
|
|
425
425
|
//TODO filters: 如果filters中没有查询 is_deleted 则自动添加is_deleted != true 条件
|
|
426
426
|
if (this.object.datasource.driver === datasource_1.SteedosDatabaseDriverType.MeteorMongo || this.object.datasource.driver === datasource_1.SteedosDatabaseDriverType.Mongo) {
|
|
427
427
|
filters = ctx.params.filters;
|
|
@@ -464,9 +464,9 @@ function getObjectServiceActionsSchema() {
|
|
|
464
464
|
sort: { type: 'string', optional: true }
|
|
465
465
|
},
|
|
466
466
|
handler: function (ctx) {
|
|
467
|
-
return
|
|
467
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
468
468
|
var filters, filtersStr, userSession;
|
|
469
|
-
return
|
|
469
|
+
return tslib_1.__generator(this, function (_a) {
|
|
470
470
|
//TODO filters: 如果filters中没有查询 is_deleted 则自动添加is_deleted != true 条件
|
|
471
471
|
if (this.object.datasource.driver === datasource_1.SteedosDatabaseDriverType.MeteorMongo || this.object.datasource.driver === datasource_1.SteedosDatabaseDriverType.Mongo) {
|
|
472
472
|
filters = ctx.params.filters;
|
|
@@ -502,9 +502,9 @@ function getObjectServiceActionsSchema() {
|
|
|
502
502
|
sort: { type: 'string', optional: true }
|
|
503
503
|
},
|
|
504
504
|
handler: function (ctx) {
|
|
505
|
-
return
|
|
505
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
506
506
|
var userSession;
|
|
507
|
-
return
|
|
507
|
+
return tslib_1.__generator(this, function (_a) {
|
|
508
508
|
userSession = ctx.meta.user;
|
|
509
509
|
return [2 /*return*/, this.find(ctx.params, userSession)];
|
|
510
510
|
});
|
|
@@ -517,9 +517,9 @@ function getObjectServiceActionsSchema() {
|
|
|
517
517
|
query: { type: "object", optional: true }
|
|
518
518
|
},
|
|
519
519
|
handler: function (ctx) {
|
|
520
|
-
return
|
|
520
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
521
521
|
var userSession, _a, id, query;
|
|
522
|
-
return
|
|
522
|
+
return tslib_1.__generator(this, function (_b) {
|
|
523
523
|
userSession = ctx.meta.user;
|
|
524
524
|
_a = ctx.params, id = _a.id, query = _a.query;
|
|
525
525
|
return [2 /*return*/, this.findOne(id, query, userSession)];
|
|
@@ -532,9 +532,9 @@ function getObjectServiceActionsSchema() {
|
|
|
532
532
|
doc: { type: "object" }
|
|
533
533
|
},
|
|
534
534
|
handler: function (ctx) {
|
|
535
|
-
return
|
|
535
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
536
536
|
var userSession, doc, data, object;
|
|
537
|
-
return
|
|
537
|
+
return tslib_1.__generator(this, function (_a) {
|
|
538
538
|
userSession = ctx.meta.user;
|
|
539
539
|
doc = ctx.params.doc;
|
|
540
540
|
data = '';
|
|
@@ -559,9 +559,9 @@ function getObjectServiceActionsSchema() {
|
|
|
559
559
|
doc: { type: "object" }
|
|
560
560
|
},
|
|
561
561
|
handler: function (ctx) {
|
|
562
|
-
return
|
|
562
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
563
563
|
var userSession, _a, id, doc, data;
|
|
564
|
-
return
|
|
564
|
+
return tslib_1.__generator(this, function (_b) {
|
|
565
565
|
userSession = ctx.meta.user;
|
|
566
566
|
_a = ctx.params, id = _a.id, doc = _a.doc;
|
|
567
567
|
data = '';
|
|
@@ -583,9 +583,9 @@ function getObjectServiceActionsSchema() {
|
|
|
583
583
|
doc: { type: "object" }
|
|
584
584
|
},
|
|
585
585
|
handler: function (ctx) {
|
|
586
|
-
return
|
|
586
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
587
587
|
var userSession, _a, id, doc, data;
|
|
588
|
-
return
|
|
588
|
+
return tslib_1.__generator(this, function (_b) {
|
|
589
589
|
userSession = ctx.meta.user;
|
|
590
590
|
_a = ctx.params, id = _a.id, doc = _a.doc;
|
|
591
591
|
data = '';
|
|
@@ -607,9 +607,9 @@ function getObjectServiceActionsSchema() {
|
|
|
607
607
|
doc: { type: "object" }
|
|
608
608
|
},
|
|
609
609
|
handler: function (ctx) {
|
|
610
|
-
return
|
|
610
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
611
611
|
var userSession, _a, queryFilters, doc, data;
|
|
612
|
-
return
|
|
612
|
+
return tslib_1.__generator(this, function (_b) {
|
|
613
613
|
switch (_b.label) {
|
|
614
614
|
case 0:
|
|
615
615
|
userSession = ctx.meta.user;
|
|
@@ -634,9 +634,9 @@ function getObjectServiceActionsSchema() {
|
|
|
634
634
|
id: { type: "any" }
|
|
635
635
|
},
|
|
636
636
|
handler: function (ctx) {
|
|
637
|
-
return
|
|
637
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
638
638
|
var userSession, id;
|
|
639
|
-
return
|
|
639
|
+
return tslib_1.__generator(this, function (_a) {
|
|
640
640
|
userSession = ctx.meta.user;
|
|
641
641
|
id = ctx.params.id;
|
|
642
642
|
return [2 /*return*/, this.delete(id, userSession)];
|
|
@@ -650,9 +650,9 @@ function getObjectServiceActionsSchema() {
|
|
|
650
650
|
externalPipeline: { type: "array", items: "object" }
|
|
651
651
|
},
|
|
652
652
|
handler: function (ctx) {
|
|
653
|
-
return
|
|
653
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
654
654
|
var userSession, _a, query, externalPipeline;
|
|
655
|
-
return
|
|
655
|
+
return tslib_1.__generator(this, function (_b) {
|
|
656
656
|
userSession = ctx.meta.user;
|
|
657
657
|
_a = ctx.params, query = _a.query, externalPipeline = _a.externalPipeline;
|
|
658
658
|
return [2 /*return*/, this.directAggregate(query, externalPipeline, userSession)];
|
|
@@ -666,9 +666,9 @@ function getObjectServiceActionsSchema() {
|
|
|
666
666
|
prefixalPipeline: { type: "array", items: "object" }
|
|
667
667
|
},
|
|
668
668
|
handler: function (ctx) {
|
|
669
|
-
return
|
|
669
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
670
670
|
var userSession, _a, query, prefixalPipeline;
|
|
671
|
-
return
|
|
671
|
+
return tslib_1.__generator(this, function (_b) {
|
|
672
672
|
userSession = ctx.meta.user;
|
|
673
673
|
_a = ctx.params, query = _a.query, prefixalPipeline = _a.prefixalPipeline;
|
|
674
674
|
return [2 /*return*/, this.directAggregatePrefixalPipeline(query, prefixalPipeline, userSession)];
|
|
@@ -685,9 +685,9 @@ function getObjectServiceActionsSchema() {
|
|
|
685
685
|
sort: { type: 'string', optional: true }
|
|
686
686
|
},
|
|
687
687
|
handler: function (ctx) {
|
|
688
|
-
return
|
|
688
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
689
689
|
var userSession;
|
|
690
|
-
return
|
|
690
|
+
return tslib_1.__generator(this, function (_a) {
|
|
691
691
|
userSession = ctx.meta.user;
|
|
692
692
|
return [2 /*return*/, this.directFind(ctx.params, userSession)];
|
|
693
693
|
});
|
|
@@ -699,9 +699,9 @@ function getObjectServiceActionsSchema() {
|
|
|
699
699
|
doc: { type: "object" }
|
|
700
700
|
},
|
|
701
701
|
handler: function (ctx) {
|
|
702
|
-
return
|
|
702
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
703
703
|
var userSession, doc;
|
|
704
|
-
return
|
|
704
|
+
return tslib_1.__generator(this, function (_a) {
|
|
705
705
|
userSession = ctx.meta.user;
|
|
706
706
|
doc = ctx.params.doc;
|
|
707
707
|
return [2 /*return*/, this.directInsert(doc, userSession)];
|
|
@@ -715,9 +715,9 @@ function getObjectServiceActionsSchema() {
|
|
|
715
715
|
doc: { type: "object" }
|
|
716
716
|
},
|
|
717
717
|
handler: function (ctx) {
|
|
718
|
-
return
|
|
718
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
719
719
|
var userSession, _a, id, doc;
|
|
720
|
-
return
|
|
720
|
+
return tslib_1.__generator(this, function (_b) {
|
|
721
721
|
userSession = ctx.meta.user;
|
|
722
722
|
_a = ctx.params, id = _a.id, doc = _a.doc;
|
|
723
723
|
return [2 /*return*/, this.directUpdate(id, doc, userSession)];
|
|
@@ -730,9 +730,9 @@ function getObjectServiceActionsSchema() {
|
|
|
730
730
|
id: { type: "any" },
|
|
731
731
|
},
|
|
732
732
|
handler: function (ctx) {
|
|
733
|
-
return
|
|
733
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
734
734
|
var userSession, id;
|
|
735
|
-
return
|
|
735
|
+
return tslib_1.__generator(this, function (_a) {
|
|
736
736
|
userSession = ctx.meta.user;
|
|
737
737
|
id = ctx.params.id;
|
|
738
738
|
return [2 /*return*/, this.directDelete(id, userSession)];
|
|
@@ -749,9 +749,9 @@ function getObjectServiceActionsSchema() {
|
|
|
749
749
|
sort: { type: 'string', optional: true }
|
|
750
750
|
},
|
|
751
751
|
handler: function (ctx) {
|
|
752
|
-
return
|
|
752
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
753
753
|
var userSession;
|
|
754
|
-
return
|
|
754
|
+
return tslib_1.__generator(this, function (_a) {
|
|
755
755
|
userSession = ctx.meta.user;
|
|
756
756
|
return [2 /*return*/, this.count(ctx.params, userSession)];
|
|
757
757
|
});
|
|
@@ -763,9 +763,9 @@ function getObjectServiceActionsSchema() {
|
|
|
763
763
|
fieldApiName: { type: "string" },
|
|
764
764
|
},
|
|
765
765
|
handler: function (ctx) {
|
|
766
|
-
return
|
|
766
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
767
767
|
var fieldApiName;
|
|
768
|
-
return
|
|
768
|
+
return tslib_1.__generator(this, function (_a) {
|
|
769
769
|
fieldApiName = ctx.params.fieldApiName;
|
|
770
770
|
return [2 /*return*/, this.getField(fieldApiName)];
|
|
771
771
|
});
|
|
@@ -778,8 +778,8 @@ function getObjectServiceActionsSchema() {
|
|
|
778
778
|
// path: "/fields"
|
|
779
779
|
// },
|
|
780
780
|
handler: function (ctx) {
|
|
781
|
-
return
|
|
782
|
-
return
|
|
781
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
782
|
+
return tslib_1.__generator(this, function (_a) {
|
|
783
783
|
return [2 /*return*/, this.getFields()];
|
|
784
784
|
});
|
|
785
785
|
});
|
|
@@ -787,8 +787,8 @@ function getObjectServiceActionsSchema() {
|
|
|
787
787
|
},
|
|
788
788
|
getNameFieldKey: {
|
|
789
789
|
handler: function (ctx) {
|
|
790
|
-
return
|
|
791
|
-
return
|
|
790
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
791
|
+
return tslib_1.__generator(this, function (_a) {
|
|
792
792
|
return [2 /*return*/, this.getNameFieldKey()];
|
|
793
793
|
});
|
|
794
794
|
});
|
|
@@ -796,8 +796,8 @@ function getObjectServiceActionsSchema() {
|
|
|
796
796
|
},
|
|
797
797
|
toConfig: {
|
|
798
798
|
handler: function (ctx) {
|
|
799
|
-
return
|
|
800
|
-
return
|
|
799
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
800
|
+
return tslib_1.__generator(this, function (_a) {
|
|
801
801
|
return [2 /*return*/, this.toConfig()];
|
|
802
802
|
});
|
|
803
803
|
});
|
|
@@ -809,9 +809,9 @@ function getObjectServiceActionsSchema() {
|
|
|
809
809
|
// path: "/getUserObjectPermission"
|
|
810
810
|
// },
|
|
811
811
|
handler: function (ctx) {
|
|
812
|
-
return
|
|
812
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
813
813
|
var userSession;
|
|
814
|
-
return
|
|
814
|
+
return tslib_1.__generator(this, function (_a) {
|
|
815
815
|
userSession = ctx.meta.user;
|
|
816
816
|
return [2 /*return*/, this.getUserObjectPermission(userSession)];
|
|
817
817
|
});
|
|
@@ -820,8 +820,8 @@ function getObjectServiceActionsSchema() {
|
|
|
820
820
|
},
|
|
821
821
|
isEnableAudit: {
|
|
822
822
|
handler: function () {
|
|
823
|
-
return
|
|
824
|
-
return
|
|
823
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
824
|
+
return tslib_1.__generator(this, function (_a) {
|
|
825
825
|
return [2 /*return*/, this.isEnableAudit()];
|
|
826
826
|
});
|
|
827
827
|
});
|
|
@@ -829,8 +829,8 @@ function getObjectServiceActionsSchema() {
|
|
|
829
829
|
},
|
|
830
830
|
_makeNewID: {
|
|
831
831
|
handler: function () {
|
|
832
|
-
return
|
|
833
|
-
return
|
|
832
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
833
|
+
return tslib_1.__generator(this, function (_a) {
|
|
834
834
|
switch (_a.label) {
|
|
835
835
|
case 0: return [4 /*yield*/, this._makeNewID()];
|
|
836
836
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -841,8 +841,8 @@ function getObjectServiceActionsSchema() {
|
|
|
841
841
|
},
|
|
842
842
|
getRecordAbsoluteUrl: {
|
|
843
843
|
handler: function () {
|
|
844
|
-
return
|
|
845
|
-
return
|
|
844
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
845
|
+
return tslib_1.__generator(this, function (_a) {
|
|
846
846
|
return [2 /*return*/, this.getRecordAbsoluteUrl()];
|
|
847
847
|
});
|
|
848
848
|
});
|
|
@@ -850,8 +850,8 @@ function getObjectServiceActionsSchema() {
|
|
|
850
850
|
},
|
|
851
851
|
getGridAbsoluteUrl: {
|
|
852
852
|
handler: function () {
|
|
853
|
-
return
|
|
854
|
-
return
|
|
853
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
854
|
+
return tslib_1.__generator(this, function (_a) {
|
|
855
855
|
return [2 /*return*/, this.getGridAbsoluteUrl()];
|
|
856
856
|
});
|
|
857
857
|
});
|
|
@@ -863,9 +863,9 @@ function getObjectServiceActionsSchema() {
|
|
|
863
863
|
// path: "/recordPermissions/:recordId"
|
|
864
864
|
// },
|
|
865
865
|
handler: function (ctx) {
|
|
866
|
-
return
|
|
866
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
867
867
|
var userSession, recordId, record;
|
|
868
|
-
return
|
|
868
|
+
return tslib_1.__generator(this, function (_a) {
|
|
869
869
|
switch (_a.label) {
|
|
870
870
|
case 0:
|
|
871
871
|
userSession = ctx.meta.user;
|
|
@@ -881,9 +881,9 @@ function getObjectServiceActionsSchema() {
|
|
|
881
881
|
},
|
|
882
882
|
getRecordPermissions: {
|
|
883
883
|
handler: function (ctx) {
|
|
884
|
-
return
|
|
884
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
885
885
|
var userSession, record;
|
|
886
|
-
return
|
|
886
|
+
return tslib_1.__generator(this, function (_a) {
|
|
887
887
|
userSession = ctx.meta.user;
|
|
888
888
|
record = ctx.params.record;
|
|
889
889
|
return [2 /*return*/, this.getRecordPermissions(record, userSession)];
|
|
@@ -897,9 +897,9 @@ function getObjectServiceActionsSchema() {
|
|
|
897
897
|
// path: "/uiSchema"
|
|
898
898
|
// },
|
|
899
899
|
handler: function (ctx) {
|
|
900
|
-
return
|
|
900
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
901
901
|
var userSession, context;
|
|
902
|
-
return
|
|
902
|
+
return tslib_1.__generator(this, function (_a) {
|
|
903
903
|
switch (_a.label) {
|
|
904
904
|
case 0:
|
|
905
905
|
userSession = ctx.meta.user;
|
|
@@ -917,9 +917,9 @@ function getObjectServiceActionsSchema() {
|
|
|
917
917
|
// path: "/defUiSchema"
|
|
918
918
|
// },
|
|
919
919
|
handler: function (ctx) {
|
|
920
|
-
return
|
|
920
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
921
921
|
var userSession;
|
|
922
|
-
return
|
|
922
|
+
return tslib_1.__generator(this, function (_a) {
|
|
923
923
|
switch (_a.label) {
|
|
924
924
|
case 0:
|
|
925
925
|
userSession = ctx.meta.user;
|
|
@@ -939,9 +939,9 @@ function getObjectServiceActionsSchema() {
|
|
|
939
939
|
// path: "/uiSchemaTemplate"
|
|
940
940
|
// },
|
|
941
941
|
handler: function (ctx) {
|
|
942
|
-
return
|
|
942
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
943
943
|
var userSession;
|
|
944
|
-
return
|
|
944
|
+
return tslib_1.__generator(this, function (_a) {
|
|
945
945
|
switch (_a.label) {
|
|
946
946
|
case 0:
|
|
947
947
|
userSession = ctx.meta.user;
|
|
@@ -961,8 +961,8 @@ function getObjectServiceActionsSchema() {
|
|
|
961
961
|
// path: "/relateds"
|
|
962
962
|
// },
|
|
963
963
|
handler: function (ctx) {
|
|
964
|
-
return
|
|
965
|
-
return
|
|
964
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
965
|
+
return tslib_1.__generator(this, function (_a) {
|
|
966
966
|
switch (_a.label) {
|
|
967
967
|
case 0: return [4 /*yield*/, this.getRelateds()];
|
|
968
968
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -973,8 +973,8 @@ function getObjectServiceActionsSchema() {
|
|
|
973
973
|
},
|
|
974
974
|
refreshIndexes: {
|
|
975
975
|
handler: function (ctx) {
|
|
976
|
-
return
|
|
977
|
-
return
|
|
976
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
977
|
+
return tslib_1.__generator(this, function (_a) {
|
|
978
978
|
switch (_a.label) {
|
|
979
979
|
case 0: return [4 /*yield*/, this.refreshIndexes()];
|
|
980
980
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -985,9 +985,9 @@ function getObjectServiceActionsSchema() {
|
|
|
985
985
|
},
|
|
986
986
|
allowRead: {
|
|
987
987
|
handler: function (ctx) {
|
|
988
|
-
return
|
|
988
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
989
989
|
var userSession;
|
|
990
|
-
return
|
|
990
|
+
return tslib_1.__generator(this, function (_a) {
|
|
991
991
|
switch (_a.label) {
|
|
992
992
|
case 0:
|
|
993
993
|
userSession = ctx.meta.user;
|
|
@@ -1000,9 +1000,9 @@ function getObjectServiceActionsSchema() {
|
|
|
1000
1000
|
},
|
|
1001
1001
|
allowInsert: {
|
|
1002
1002
|
handler: function (ctx) {
|
|
1003
|
-
return
|
|
1003
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1004
1004
|
var userSession;
|
|
1005
|
-
return
|
|
1005
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1006
1006
|
switch (_a.label) {
|
|
1007
1007
|
case 0:
|
|
1008
1008
|
userSession = ctx.meta.user;
|
|
@@ -1015,9 +1015,9 @@ function getObjectServiceActionsSchema() {
|
|
|
1015
1015
|
},
|
|
1016
1016
|
allowUpdate: {
|
|
1017
1017
|
handler: function (ctx) {
|
|
1018
|
-
return
|
|
1018
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1019
1019
|
var userSession;
|
|
1020
|
-
return
|
|
1020
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1021
1021
|
switch (_a.label) {
|
|
1022
1022
|
case 0:
|
|
1023
1023
|
userSession = ctx.meta.user;
|
|
@@ -1030,9 +1030,9 @@ function getObjectServiceActionsSchema() {
|
|
|
1030
1030
|
},
|
|
1031
1031
|
allowDelete: {
|
|
1032
1032
|
handler: function (ctx) {
|
|
1033
|
-
return
|
|
1033
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1034
1034
|
var userSession;
|
|
1035
|
-
return
|
|
1035
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1036
1036
|
switch (_a.label) {
|
|
1037
1037
|
case 0:
|
|
1038
1038
|
userSession = ctx.meta.user;
|
|
@@ -1083,10 +1083,10 @@ module.exports = {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
},
|
|
1085
1085
|
started: function () {
|
|
1086
|
-
return
|
|
1086
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1087
1087
|
var objectConfig, objectApiName, steedosSchema, obj, relationsInfo, detailsInfo, lookupsInfo, relatedInfos, relatedInfos_1, relatedInfos_1_1, info, infos, detailObjectApiName;
|
|
1088
1088
|
var e_1, _a;
|
|
1089
|
-
return
|
|
1089
|
+
return tslib_1.__generator(this, function (_b) {
|
|
1090
1090
|
switch (_b.label) {
|
|
1091
1091
|
case 0:
|
|
1092
1092
|
objectConfig = this.settings.objectConfig || (0, object_dynamic_load_1.getObjectConfig)(this.settings.objectApiName);
|
|
@@ -1100,7 +1100,7 @@ module.exports = {
|
|
|
1100
1100
|
lookupsInfo = relationsInfo.lookup_details || [];
|
|
1101
1101
|
relatedInfos = detailsInfo.concat(lookupsInfo);
|
|
1102
1102
|
try {
|
|
1103
|
-
for (relatedInfos_1 =
|
|
1103
|
+
for (relatedInfos_1 = tslib_1.__values(relatedInfos), relatedInfos_1_1 = relatedInfos_1.next(); !relatedInfos_1_1.done; relatedInfos_1_1 = relatedInfos_1.next()) {
|
|
1104
1104
|
info = relatedInfos_1_1.value;
|
|
1105
1105
|
if (!info.startsWith("__")) {
|
|
1106
1106
|
infos = info.split(".");
|
|
@@ -1124,10 +1124,10 @@ module.exports = {
|
|
|
1124
1124
|
events: {
|
|
1125
1125
|
"metadata.objects.deleted": {
|
|
1126
1126
|
handler: function (ctx) {
|
|
1127
|
-
return
|
|
1127
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1128
1128
|
var objectApiName, _a, onDestroyObjectService, objectConfig, localService, steedosSchema, obj, relationsInfo, detailsInfo, lookupsInfo, relatedInfos, relatedInfos_2, relatedInfos_2_1, info, infos, detailObjectApiName;
|
|
1129
1129
|
var e_2, _b;
|
|
1130
|
-
return
|
|
1130
|
+
return tslib_1.__generator(this, function (_c) {
|
|
1131
1131
|
switch (_c.label) {
|
|
1132
1132
|
case 0:
|
|
1133
1133
|
objectApiName = ctx.params.objectApiName;
|
|
@@ -1159,7 +1159,7 @@ module.exports = {
|
|
|
1159
1159
|
lookupsInfo = relationsInfo.lookup_details || [];
|
|
1160
1160
|
relatedInfos = detailsInfo.concat(lookupsInfo);
|
|
1161
1161
|
try {
|
|
1162
|
-
for (relatedInfos_2 =
|
|
1162
|
+
for (relatedInfos_2 = tslib_1.__values(relatedInfos), relatedInfos_2_1 = relatedInfos_2.next(); !relatedInfos_2_1.done; relatedInfos_2_1 = relatedInfos_2.next()) {
|
|
1163
1163
|
info = relatedInfos_2_1.value;
|
|
1164
1164
|
if (!info.startsWith("__")) {
|
|
1165
1165
|
infos = info.split(".");
|
|
@@ -1213,9 +1213,9 @@ module.exports = {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
schema.events["".concat((0, _1.getObjectServiceName)(objectConfig.name), ".detailsChanged")] = {
|
|
1215
1215
|
handler: function (ctx) {
|
|
1216
|
-
return
|
|
1216
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1217
1217
|
var _a, objectApiName, detailObjectApiName, detailFieldName, detailFieldReferenceToFieldName, resolvers, type, relatedFieldName, relatedType;
|
|
1218
|
-
return
|
|
1218
|
+
return tslib_1.__generator(this, function (_b) {
|
|
1219
1219
|
_a = ctx.params, objectApiName = _a.objectApiName, detailObjectApiName = _a.detailObjectApiName, detailFieldName = _a.detailFieldName, detailFieldReferenceToFieldName = _a.detailFieldReferenceToFieldName;
|
|
1220
1220
|
resolvers = this.settings.graphql.resolvers;
|
|
1221
1221
|
type = this.settings.graphql.type;
|
|
@@ -1233,10 +1233,10 @@ module.exports = {
|
|
|
1233
1233
|
};
|
|
1234
1234
|
schema.events["".concat(objectConfig.datasource, ".").concat((0, _1.getObjectServiceName)(objectConfig.name), ".metadata.objects.inserted")] = {
|
|
1235
1235
|
handler: function (ctx) {
|
|
1236
|
-
return
|
|
1236
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1237
1237
|
var objectConfig, datasource, localObjectConfig, object, localTriggers, gobj;
|
|
1238
1238
|
var _this = this;
|
|
1239
|
-
return
|
|
1239
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1240
1240
|
switch (_a.label) {
|
|
1241
1241
|
case 0:
|
|
1242
1242
|
objectConfig = ctx.params.data;
|
|
@@ -1292,9 +1292,9 @@ module.exports = {
|
|
|
1292
1292
|
};
|
|
1293
1293
|
schema.events["".concat((0, _1.getObjectServiceName)(objectConfig.name), ".refresh")] = {
|
|
1294
1294
|
handler: function (ctx) {
|
|
1295
|
-
return
|
|
1295
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1296
1296
|
var _objectConfig, gobj;
|
|
1297
|
-
return
|
|
1297
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1298
1298
|
_objectConfig = (0, object_dynamic_load_1.getObjectConfig)(objectConfig.name);
|
|
1299
1299
|
if (_objectConfig) {
|
|
1300
1300
|
gobj = (0, graphql_1.generateSettingsGraphql)(_objectConfig);
|