@spinajs/orm-api 2.0.131 → 2.0.133
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/lib/cjs/config/orm-http.js +1 -1
- package/lib/cjs/controllers/crud/Create.d.ts +16 -0
- package/lib/cjs/controllers/crud/Create.d.ts.map +1 -0
- package/lib/cjs/controllers/crud/Create.js +145 -0
- package/lib/cjs/controllers/crud/Create.js.map +1 -0
- package/lib/cjs/controllers/crud/Crud.d.ts +13 -0
- package/lib/cjs/controllers/crud/Crud.d.ts.map +1 -0
- package/lib/cjs/controllers/crud/Crud.js +22 -0
- package/lib/cjs/controllers/crud/Crud.js.map +1 -0
- package/lib/cjs/controllers/crud/Delete.d.ts +16 -0
- package/lib/cjs/controllers/crud/Delete.d.ts.map +1 -0
- package/lib/cjs/controllers/crud/Delete.js +158 -0
- package/lib/cjs/controllers/crud/Delete.js.map +1 -0
- package/lib/cjs/controllers/crud/Read.d.ts +35 -0
- package/lib/cjs/controllers/crud/Read.d.ts.map +1 -0
- package/lib/cjs/controllers/crud/Read.js +230 -0
- package/lib/cjs/controllers/crud/Read.js.map +1 -0
- package/lib/cjs/controllers/crud/Update.d.ts +13 -0
- package/lib/cjs/controllers/crud/Update.d.ts.map +1 -0
- package/lib/cjs/controllers/crud/Update.js +99 -0
- package/lib/cjs/controllers/crud/Update.js.map +1 -0
- package/lib/mjs/config/orm-http.js +1 -1
- package/lib/mjs/controllers/crud/Create.d.ts +16 -0
- package/lib/mjs/controllers/crud/Create.d.ts.map +1 -0
- package/lib/mjs/controllers/crud/Create.js +139 -0
- package/lib/mjs/controllers/crud/Create.js.map +1 -0
- package/lib/mjs/controllers/crud/Crud.d.ts +13 -0
- package/lib/mjs/controllers/crud/Crud.d.ts.map +1 -0
- package/lib/mjs/controllers/crud/Crud.js +18 -0
- package/lib/mjs/controllers/crud/Crud.js.map +1 -0
- package/lib/mjs/controllers/crud/Delete.d.ts +16 -0
- package/lib/mjs/controllers/crud/Delete.d.ts.map +1 -0
- package/lib/mjs/controllers/crud/Delete.js +155 -0
- package/lib/mjs/controllers/crud/Delete.js.map +1 -0
- package/lib/mjs/controllers/crud/Read.d.ts +35 -0
- package/lib/mjs/controllers/crud/Read.d.ts.map +1 -0
- package/lib/mjs/controllers/crud/Read.js +227 -0
- package/lib/mjs/controllers/crud/Read.js.map +1 -0
- package/lib/mjs/controllers/crud/Update.d.ts +13 -0
- package/lib/mjs/controllers/crud/Update.d.ts.map +1 -0
- package/lib/mjs/controllers/crud/Update.js +96 -0
- package/lib/mjs/controllers/crud/Update.js.map +1 -0
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.mjs.tsbuildinfo +1 -1
- package/package.json +17 -18
- package/lib/cjs/controllers/Collections.d.ts +0 -33
- package/lib/cjs/controllers/Collections.d.ts.map +0 -1
- package/lib/cjs/controllers/Collections.js +0 -417
- package/lib/cjs/controllers/Collections.js.map +0 -1
- package/lib/mjs/controllers/Collections.d.ts +0 -33
- package/lib/mjs/controllers/Collections.d.ts.map +0 -1
- package/lib/mjs/controllers/Collections.js +0 -414
- package/lib/mjs/controllers/Collections.js.map +0 -1
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
-
};
|
|
13
|
-
import { MODEL_DESCTRIPTION_SYMBOL, Orm, OrmException, RelationType, SortOrder } from '@spinajs/orm';
|
|
14
|
-
import { BaseController, Get, BasePath, Ok, Post, Query, Del, Body, Put, PKey, ParameterType, Policy, BodyField, Param } from '@spinajs/http';
|
|
15
|
-
import { Resource, Permission } from '@spinajs/rbac-http';
|
|
16
|
-
import { Autoinject } from '@spinajs/di';
|
|
17
|
-
import { BadRequest, ResourceNotFound } from '@spinajs/exceptions';
|
|
18
|
-
import { ModelType } from '../route-args/ModelType.js';
|
|
19
|
-
import { FindModelType } from '../policies/FindModelType.js';
|
|
20
|
-
import { QueryArgs } from '../dto/QueryArgs.js';
|
|
21
|
-
import { QueryFilter } from '../dto/QueryFilter.js';
|
|
22
|
-
import { AutoinjectService } from '@spinajs/configuration';
|
|
23
|
-
import { Log, Logger } from '@spinajs/log';
|
|
24
|
-
import { QueryIncludes } from '../dto/QueryIncludes.js';
|
|
25
|
-
import { CollectionApiTransformer } from './../interfaces.js';
|
|
26
|
-
let Collections = class Collections extends BaseController {
|
|
27
|
-
// --------------------- DELETE functions --------------------- //
|
|
28
|
-
async batchDelete(model, ids) {
|
|
29
|
-
const tModel = this.getModelDescriptor(model);
|
|
30
|
-
const result = await model.destroy().whereIn(tModel.PrimaryKey, ids);
|
|
31
|
-
this.Log.trace(`Deleted ${result.RowsAffected} records from ${tModel.Name}`);
|
|
32
|
-
return new Ok({
|
|
33
|
-
[tModel.PrimaryKey]: ids,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
async del(model, id) {
|
|
37
|
-
const descriptor = this.getModelDescriptor(model);
|
|
38
|
-
const result = await model.destroy(id);
|
|
39
|
-
this.Log.trace(`Deleted ${result.RowsAffected} records from ${descriptor.Name} with id ${id}`);
|
|
40
|
-
return new Ok({
|
|
41
|
-
[descriptor.PrimaryKey]: [id],
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
async deleteRelationBatch(model, id, relation, relationIds) {
|
|
45
|
-
const descriptor = this.getRelationDescriptor(model, relation);
|
|
46
|
-
if (descriptor.Type === RelationType.One) {
|
|
47
|
-
throw new BadRequest('Cannot delete batch from one to one relation');
|
|
48
|
-
}
|
|
49
|
-
const exists = await model.exists(id);
|
|
50
|
-
if (!exists) {
|
|
51
|
-
throw new ResourceNotFound(`Record with id ${id} not found`, {
|
|
52
|
-
Resource: model.name,
|
|
53
|
-
Id: id,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
const result = await descriptor.TargetModel.destroy(relationIds).where(descriptor.ForeignKey, id);
|
|
57
|
-
this.Log.trace(`Deleted ${result.RowsAffected} records from ${descriptor.Name} with id ${id}`);
|
|
58
|
-
return new Ok(relationIds);
|
|
59
|
-
}
|
|
60
|
-
async deleteRelation(model, id, relation, relationId) {
|
|
61
|
-
const descriptor = this.getRelationDescriptor(model, relation);
|
|
62
|
-
const tModel = this.getModelDescriptor(descriptor.TargetModel);
|
|
63
|
-
const exists = await model.exists(id);
|
|
64
|
-
if (!exists) {
|
|
65
|
-
throw new ResourceNotFound(`Record with id ${id} not found`, {
|
|
66
|
-
Resource: model.name,
|
|
67
|
-
Id: id,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
const result = await descriptor.TargetModel.destroy(relationId).when(descriptor.Type !== RelationType.One, function () {
|
|
71
|
-
this.where({ [descriptor.ForeignKey]: id });
|
|
72
|
-
});
|
|
73
|
-
this.Log.trace(`Deleted related ${result.RowsAffected} records from ${tModel.Name} with id ${id}`);
|
|
74
|
-
return new Ok({
|
|
75
|
-
[tModel.PrimaryKey]: relationId,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
async deleteRelationAll(model, id, relation) {
|
|
79
|
-
const descriptor = this.getRelationDescriptor(model, relation);
|
|
80
|
-
const tModel = this.getModelDescriptor(descriptor.TargetModel);
|
|
81
|
-
const exists = await model.exists(id);
|
|
82
|
-
if (!exists) {
|
|
83
|
-
throw new ResourceNotFound(`Record with id ${id} not found`, {
|
|
84
|
-
Resource: model.name,
|
|
85
|
-
Id: id,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
const result = await descriptor.TargetModel.destroy().when(descriptor.Type !== RelationType.One, function () {
|
|
89
|
-
this.where(descriptor.ForeignKey, id);
|
|
90
|
-
});
|
|
91
|
-
this.Log.trace(`Deleted related ${result.RowsAffected} records from ${tModel.Name} with id ${id}`);
|
|
92
|
-
return new Ok();
|
|
93
|
-
}
|
|
94
|
-
// --------------------- GET functions --------------------- //
|
|
95
|
-
async getAll(model, getParams, filters, includes) {
|
|
96
|
-
const query = model
|
|
97
|
-
.where(filters)
|
|
98
|
-
.select('*')
|
|
99
|
-
.populate(includes)
|
|
100
|
-
.order(getParams.order, getParams.orderDirection ?? SortOrder.ASC)
|
|
101
|
-
.skip(getParams.page * getParams.perPage ?? 0)
|
|
102
|
-
.take(getParams.perPage ?? 10);
|
|
103
|
-
const count = await query.clone().clearColumns().count('*', 'count').takeFirst().asRaw();
|
|
104
|
-
const result = await query;
|
|
105
|
-
return new Ok({
|
|
106
|
-
Data: result.map((x) => x.dehydrateWithRelations()),
|
|
107
|
-
Total: count.count,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
async get(model, id, includes) {
|
|
111
|
-
const descriptor = this.getModelDescriptor(model);
|
|
112
|
-
const result = await model
|
|
113
|
-
.query()
|
|
114
|
-
.select('*')
|
|
115
|
-
.where(descriptor.PrimaryKey, id)
|
|
116
|
-
.populate(includes)
|
|
117
|
-
.firstOrThrow(new ResourceNotFound(`Record with id ${id} not found`, {
|
|
118
|
-
Resource: model.name,
|
|
119
|
-
[descriptor.PrimaryKey]: id,
|
|
120
|
-
}));
|
|
121
|
-
return new Ok(result.dehydrateWithRelations());
|
|
122
|
-
}
|
|
123
|
-
async getRelation(model, id, relation, relationId, includes) {
|
|
124
|
-
const mDescriptor = this.getModelDescriptor(model);
|
|
125
|
-
const rDescriptor = this.getRelationDescriptor(model, relation);
|
|
126
|
-
const rmDescriptor = this.getModelDescriptor(rDescriptor.TargetModel);
|
|
127
|
-
const query = rDescriptor.TargetModel.query();
|
|
128
|
-
const pExists = await model.exists(id);
|
|
129
|
-
if (!pExists) {
|
|
130
|
-
throw new ResourceNotFound(`Record with id ${id} not found`, {
|
|
131
|
-
Resource: model.name,
|
|
132
|
-
[mDescriptor.PrimaryKey]: id,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
const result = await query
|
|
136
|
-
.select('*')
|
|
137
|
-
.populate(includes)
|
|
138
|
-
.where(rmDescriptor.PrimaryKey, relationId)
|
|
139
|
-
.firstOrThrow(new ResourceNotFound(`Record with id ${relationId} not found`, {
|
|
140
|
-
Resource: rDescriptor.TargetModel.name,
|
|
141
|
-
[rmDescriptor.PrimaryKey]: relationId,
|
|
142
|
-
}));
|
|
143
|
-
return new Ok(result.dehydrateWithRelations());
|
|
144
|
-
}
|
|
145
|
-
async getRelations(model, id, relation, params, filters, includes) {
|
|
146
|
-
const mDescriptor = this.getModelDescriptor(model);
|
|
147
|
-
const rDescriptor = this.getRelationDescriptor(model, relation);
|
|
148
|
-
const pExists = await model.exists(id);
|
|
149
|
-
if (!pExists) {
|
|
150
|
-
throw new ResourceNotFound(`Record with id ${id} not found`, {
|
|
151
|
-
Resource: model.name,
|
|
152
|
-
[mDescriptor.PrimaryKey]: id,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
const query = rDescriptor.TargetModel.where(filters)
|
|
156
|
-
.where(rDescriptor.ForeignKey, id)
|
|
157
|
-
.select('*')
|
|
158
|
-
.populate(includes)
|
|
159
|
-
.order(params.order, params.orderDirection ?? SortOrder.ASC)
|
|
160
|
-
.skip(params.page * params.perPage ?? 0)
|
|
161
|
-
.take(params.perPage ?? 10);
|
|
162
|
-
const count = await query.clone().clearColumns().count('*', 'count').takeFirst().asRaw();
|
|
163
|
-
const result = await query;
|
|
164
|
-
return new Ok({
|
|
165
|
-
Data: result.map((x) => x.dehydrateWithRelations()),
|
|
166
|
-
Total: count,
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
// --------------------- POST functions --------------------- //
|
|
170
|
-
async save(model, data) {
|
|
171
|
-
const toInsert = (Array.isArray(data) ? data : [data]).map((x) => new model(x));
|
|
172
|
-
await model.insert(toInsert);
|
|
173
|
-
return new Ok(toInsert.map((x) => x.dehydrate()));
|
|
174
|
-
}
|
|
175
|
-
async insertRelation(model, id, relation, data) {
|
|
176
|
-
const mDescriptor = this.getModelDescriptor(model);
|
|
177
|
-
const rDescriptor = this.getRelationDescriptor(model, relation);
|
|
178
|
-
const m = await model.get(id);
|
|
179
|
-
if (!m) {
|
|
180
|
-
throw new ResourceNotFound(`Record with id ${id} not found`, {
|
|
181
|
-
Resource: model.name,
|
|
182
|
-
[mDescriptor.PrimaryKey]: id,
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
const toInsert = (Array.isArray(data) ? data : [data]).map((x) => new rDescriptor.TargetModel(x));
|
|
186
|
-
toInsert.forEach((x) => {
|
|
187
|
-
m.attach(x);
|
|
188
|
-
});
|
|
189
|
-
await rDescriptor.TargetModel.insert(toInsert);
|
|
190
|
-
return new Ok(toInsert.map((x) => x.dehydrate()));
|
|
191
|
-
}
|
|
192
|
-
// --------------------- PUT functions --------------------- //
|
|
193
|
-
async update(model, id, data) {
|
|
194
|
-
const descriptor = this.getModelDescriptor(model);
|
|
195
|
-
const entity = await model.where(descriptor.PrimaryKey, id).firstOrThrow(new ResourceNotFound(`Record with id ${id} not found`, {
|
|
196
|
-
Resource: model.name,
|
|
197
|
-
[descriptor.PrimaryKey]: id,
|
|
198
|
-
}));
|
|
199
|
-
entity.hydrate(data);
|
|
200
|
-
await entity.update();
|
|
201
|
-
this.Log.trace('Updated entity with id ${id}');
|
|
202
|
-
return new Ok(entity.toJSON());
|
|
203
|
-
}
|
|
204
|
-
async updateRelation(model, id, relation, relationId, data) {
|
|
205
|
-
const mDescriptor = this.getModelDescriptor(model);
|
|
206
|
-
const rDescriptor = this.getRelationDescriptor(model, relation);
|
|
207
|
-
const rmDescriptor = this.getModelDescriptor(rDescriptor.TargetModel);
|
|
208
|
-
const query = rDescriptor.TargetModel.query();
|
|
209
|
-
const pExists = await model.exists(id);
|
|
210
|
-
if (!pExists) {
|
|
211
|
-
throw new ResourceNotFound(`Record with id ${id} not found`, {
|
|
212
|
-
Resource: model.name,
|
|
213
|
-
[mDescriptor.PrimaryKey]: id,
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
const result = await query.where(rmDescriptor.PrimaryKey, relationId).firstOrThrow(new ResourceNotFound(`Record with id ${relationId} not found`, {
|
|
217
|
-
Resource: rDescriptor.TargetModel.name,
|
|
218
|
-
[rmDescriptor.PrimaryKey]: relationId,
|
|
219
|
-
}));
|
|
220
|
-
this.Log.trace(`Updating relation ${relation} with id ${relationId} for model ${model.name} with id ${id}`);
|
|
221
|
-
result.hydrate(data);
|
|
222
|
-
await result.update();
|
|
223
|
-
return new Ok(result.toJSON());
|
|
224
|
-
}
|
|
225
|
-
// --------------------- HELPERS functions --------------------- //
|
|
226
|
-
getModelDescriptor(model) {
|
|
227
|
-
const descriptor = model[MODEL_DESCTRIPTION_SYMBOL];
|
|
228
|
-
if (!descriptor) {
|
|
229
|
-
throw new OrmException(`Model ${model.name} has no descriptor`);
|
|
230
|
-
}
|
|
231
|
-
return descriptor;
|
|
232
|
-
}
|
|
233
|
-
getRelationDescriptor(model, relation) {
|
|
234
|
-
const descriptor = this.getModelDescriptor(model);
|
|
235
|
-
let rDescriptor = null;
|
|
236
|
-
for (const [key, value] of descriptor.Relations) {
|
|
237
|
-
if (key.toLowerCase() === relation.toLowerCase().trim()) {
|
|
238
|
-
rDescriptor = value;
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
if (!rDescriptor) {
|
|
243
|
-
throw new OrmException(`Model ${model.name} has no relation ${relation}`);
|
|
244
|
-
}
|
|
245
|
-
return rDescriptor;
|
|
246
|
-
}
|
|
247
|
-
prepareQuery(model, relation, id, callback) {
|
|
248
|
-
const descriptor = this.getModelDescriptor(model);
|
|
249
|
-
const rDescriptor = this.getRelationDescriptor(model, relation);
|
|
250
|
-
const tDescriptor = this.getModelDescriptor(rDescriptor.TargetModel);
|
|
251
|
-
const sQuery = model.query().where(descriptor.PrimaryKey, id).populate(relation, callback);
|
|
252
|
-
return {
|
|
253
|
-
relation: rDescriptor,
|
|
254
|
-
relationModel: tDescriptor,
|
|
255
|
-
query: sQuery,
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
__decorate([
|
|
260
|
-
Logger('orm-http:api'),
|
|
261
|
-
__metadata("design:type", Log)
|
|
262
|
-
], Collections.prototype, "Log", void 0);
|
|
263
|
-
__decorate([
|
|
264
|
-
AutoinjectService('api.endpoint.transformer'),
|
|
265
|
-
__metadata("design:type", CollectionApiTransformer)
|
|
266
|
-
], Collections.prototype, "DataTransformer", void 0);
|
|
267
|
-
__decorate([
|
|
268
|
-
Autoinject(),
|
|
269
|
-
__metadata("design:type", Orm)
|
|
270
|
-
], Collections.prototype, "Orm", void 0);
|
|
271
|
-
__decorate([
|
|
272
|
-
Post(':model/__batchDelete'),
|
|
273
|
-
__param(0, ModelType()),
|
|
274
|
-
__param(1, Body()),
|
|
275
|
-
__metadata("design:type", Function),
|
|
276
|
-
__metadata("design:paramtypes", [Object, Array]),
|
|
277
|
-
__metadata("design:returntype", Promise)
|
|
278
|
-
], Collections.prototype, "batchDelete", null);
|
|
279
|
-
__decorate([
|
|
280
|
-
Del(':model/:id'),
|
|
281
|
-
Permission('deleteAny'),
|
|
282
|
-
__param(0, ModelType()),
|
|
283
|
-
__param(1, Param()),
|
|
284
|
-
__metadata("design:type", Function),
|
|
285
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
286
|
-
__metadata("design:returntype", Promise)
|
|
287
|
-
], Collections.prototype, "del", null);
|
|
288
|
-
__decorate([
|
|
289
|
-
Post(':model/:id/:relation/__batchDelete'),
|
|
290
|
-
Permission('deleteAny'),
|
|
291
|
-
__param(0, ModelType()),
|
|
292
|
-
__param(1, Param()),
|
|
293
|
-
__param(2, Param()),
|
|
294
|
-
__param(3, Body()),
|
|
295
|
-
__metadata("design:type", Function),
|
|
296
|
-
__metadata("design:paramtypes", [Object, Object, String, Array]),
|
|
297
|
-
__metadata("design:returntype", Promise)
|
|
298
|
-
], Collections.prototype, "deleteRelationBatch", null);
|
|
299
|
-
__decorate([
|
|
300
|
-
Del(':model/:id/:relation/:relationId'),
|
|
301
|
-
Permission('deleteAny'),
|
|
302
|
-
__param(0, ModelType()),
|
|
303
|
-
__param(1, Param()),
|
|
304
|
-
__param(2, Param()),
|
|
305
|
-
__param(3, Param()),
|
|
306
|
-
__metadata("design:type", Function),
|
|
307
|
-
__metadata("design:paramtypes", [Object, Object, String, Number]),
|
|
308
|
-
__metadata("design:returntype", Promise)
|
|
309
|
-
], Collections.prototype, "deleteRelation", null);
|
|
310
|
-
__decorate([
|
|
311
|
-
Del(':model/:id/:relation'),
|
|
312
|
-
Permission('deleteAny'),
|
|
313
|
-
__param(0, ModelType()),
|
|
314
|
-
__param(1, PKey(ParameterType.FromQuery)),
|
|
315
|
-
__param(2, Query()),
|
|
316
|
-
__metadata("design:type", Function),
|
|
317
|
-
__metadata("design:paramtypes", [Object, Object, String]),
|
|
318
|
-
__metadata("design:returntype", Promise)
|
|
319
|
-
], Collections.prototype, "deleteRelationAll", null);
|
|
320
|
-
__decorate([
|
|
321
|
-
Get(':model'),
|
|
322
|
-
Permission('readAny'),
|
|
323
|
-
__param(0, ModelType()),
|
|
324
|
-
__param(1, Query()),
|
|
325
|
-
__param(2, Query()),
|
|
326
|
-
__param(3, Query()),
|
|
327
|
-
__metadata("design:type", Function),
|
|
328
|
-
__metadata("design:paramtypes", [Object, QueryArgs, QueryFilter, QueryIncludes]),
|
|
329
|
-
__metadata("design:returntype", Promise)
|
|
330
|
-
], Collections.prototype, "getAll", null);
|
|
331
|
-
__decorate([
|
|
332
|
-
Get(':model/:id'),
|
|
333
|
-
Permission('readAny'),
|
|
334
|
-
__param(0, ModelType()),
|
|
335
|
-
__param(1, Param()),
|
|
336
|
-
__param(2, Query()),
|
|
337
|
-
__metadata("design:type", Function),
|
|
338
|
-
__metadata("design:paramtypes", [Object, Number, QueryIncludes]),
|
|
339
|
-
__metadata("design:returntype", Promise)
|
|
340
|
-
], Collections.prototype, "get", null);
|
|
341
|
-
__decorate([
|
|
342
|
-
Get(':model/:id/:relation/:relationId'),
|
|
343
|
-
Permission('readAny'),
|
|
344
|
-
__param(0, ModelType()),
|
|
345
|
-
__param(1, Param()),
|
|
346
|
-
__param(2, Param()),
|
|
347
|
-
__param(3, Param()),
|
|
348
|
-
__param(4, Query()),
|
|
349
|
-
__metadata("design:type", Function),
|
|
350
|
-
__metadata("design:paramtypes", [Object, Object, String, Object, QueryIncludes]),
|
|
351
|
-
__metadata("design:returntype", Promise)
|
|
352
|
-
], Collections.prototype, "getRelation", null);
|
|
353
|
-
__decorate([
|
|
354
|
-
Get(':model/:id/:relation'),
|
|
355
|
-
Permission('readAny'),
|
|
356
|
-
__param(0, ModelType()),
|
|
357
|
-
__param(1, Param()),
|
|
358
|
-
__param(2, Param()),
|
|
359
|
-
__param(3, Query()),
|
|
360
|
-
__param(4, Query()),
|
|
361
|
-
__param(5, Query()),
|
|
362
|
-
__metadata("design:type", Function),
|
|
363
|
-
__metadata("design:paramtypes", [Object, Object, String, QueryArgs, QueryFilter, QueryIncludes]),
|
|
364
|
-
__metadata("design:returntype", Promise)
|
|
365
|
-
], Collections.prototype, "getRelations", null);
|
|
366
|
-
__decorate([
|
|
367
|
-
Post(':model'),
|
|
368
|
-
Permission('createAny'),
|
|
369
|
-
__param(0, ModelType()),
|
|
370
|
-
__param(1, BodyField()),
|
|
371
|
-
__metadata("design:type", Function),
|
|
372
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
373
|
-
__metadata("design:returntype", Promise)
|
|
374
|
-
], Collections.prototype, "save", null);
|
|
375
|
-
__decorate([
|
|
376
|
-
Post(':model/:id/:relation'),
|
|
377
|
-
Permission('createAny'),
|
|
378
|
-
__param(0, ModelType()),
|
|
379
|
-
__param(1, Param()),
|
|
380
|
-
__param(2, Param()),
|
|
381
|
-
__param(3, BodyField()),
|
|
382
|
-
__metadata("design:type", Function),
|
|
383
|
-
__metadata("design:paramtypes", [Object, Object, String, Object]),
|
|
384
|
-
__metadata("design:returntype", Promise)
|
|
385
|
-
], Collections.prototype, "insertRelation", null);
|
|
386
|
-
__decorate([
|
|
387
|
-
Put(':model/:id'),
|
|
388
|
-
Permission('updateAny'),
|
|
389
|
-
__param(0, ModelType()),
|
|
390
|
-
__param(1, Param()),
|
|
391
|
-
__param(2, BodyField()),
|
|
392
|
-
__metadata("design:type", Function),
|
|
393
|
-
__metadata("design:paramtypes", [Object, Number, Object]),
|
|
394
|
-
__metadata("design:returntype", Promise)
|
|
395
|
-
], Collections.prototype, "update", null);
|
|
396
|
-
__decorate([
|
|
397
|
-
Put(':model/:id/:relation/:relationId'),
|
|
398
|
-
Permission('updateAny'),
|
|
399
|
-
__param(0, ModelType()),
|
|
400
|
-
__param(1, Param()),
|
|
401
|
-
__param(2, Param()),
|
|
402
|
-
__param(3, Param()),
|
|
403
|
-
__param(4, BodyField()),
|
|
404
|
-
__metadata("design:type", Function),
|
|
405
|
-
__metadata("design:paramtypes", [Object, Number, String, Object, Object]),
|
|
406
|
-
__metadata("design:returntype", Promise)
|
|
407
|
-
], Collections.prototype, "updateRelation", null);
|
|
408
|
-
Collections = __decorate([
|
|
409
|
-
BasePath('collection'),
|
|
410
|
-
Resource('repository'),
|
|
411
|
-
Policy(FindModelType)
|
|
412
|
-
], Collections);
|
|
413
|
-
export { Collections };
|
|
414
|
-
//# sourceMappingURL=Collections.js.map
|
|
@@ -1 +0,0 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