@rytass/cms-base-nestjs-graphql-module 0.0.2 → 0.0.4
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/cms-base-graphql.module.js +0 -6
- package/dto/article-backstage-collection.dto.d.ts +5 -0
- package/dto/article-backstage-collection.dto.js +27 -0
- package/dto/article-backstage.dto.d.ts +2 -0
- package/dto/article-backstage.dto.js +18 -7
- package/dto/article-collection.dto.d.ts +2 -2
- package/dto/article-collection.dto.js +7 -3
- package/dto/article.dto.d.ts +3 -0
- package/dto/article.dto.js +17 -7
- package/dto/articles.args.js +59 -0
- package/dto/base-article.dto.js +10 -7
- package/dto/base-category.dto.d.ts +2 -0
- package/dto/base-category.dto.js +16 -5
- package/dto/categories.args.js +43 -0
- package/dto/category.dto.d.ts +1 -0
- package/dto/category.dto.js +24 -0
- package/dto/collection.dto.js +9 -3
- package/dto/create-article.args.js +89 -0
- package/dto/create-category.args.js +61 -0
- package/dto/update-article.args.js +24 -0
- package/index.cjs.js +674 -220
- package/mutations/article.mutations.js +66 -10
- package/mutations/category.mutations.js +28 -4
- package/package.json +3 -3
- package/queries/article.queries.d.ts +7 -3
- package/queries/article.queries.js +61 -7
- package/queries/category.queries.d.ts +6 -3
- package/queries/category.queries.js +66 -8
- package/resolvers/article-backstage.resolver.d.ts +0 -5
- package/resolvers/article-backstage.resolver.js +0 -40
- package/resolvers/article.resolver.d.ts +0 -6
- package/resolvers/article.resolver.js +0 -39
package/index.cjs.js
CHANGED
|
@@ -6,55 +6,178 @@ var graphql = require('@nestjs/graphql');
|
|
|
6
6
|
var memberBaseNestjsModule = require('@rytass/member-base-nestjs-module');
|
|
7
7
|
var graphql$1 = require('graphql');
|
|
8
8
|
|
|
9
|
-
function _ts_decorate$
|
|
9
|
+
function _ts_decorate$i(decorators, target, key, desc) {
|
|
10
10
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
11
11
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12
12
|
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;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
}
|
|
15
|
+
function _ts_metadata$g(k, v) {
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
|
+
}
|
|
15
18
|
class BaseArticleDto {
|
|
16
19
|
id;
|
|
17
20
|
tags;
|
|
18
21
|
createdAt;
|
|
19
22
|
}
|
|
20
|
-
_ts_decorate$
|
|
21
|
-
graphql.Field(()=>graphql.ID)
|
|
23
|
+
_ts_decorate$i([
|
|
24
|
+
graphql.Field(()=>graphql.ID),
|
|
25
|
+
_ts_metadata$g("design:type", String)
|
|
22
26
|
], BaseArticleDto.prototype, "id", void 0);
|
|
23
|
-
_ts_decorate$
|
|
27
|
+
_ts_decorate$i([
|
|
24
28
|
graphql.Field(()=>[
|
|
25
29
|
String
|
|
26
|
-
])
|
|
30
|
+
]),
|
|
31
|
+
_ts_metadata$g("design:type", Array)
|
|
27
32
|
], BaseArticleDto.prototype, "tags", void 0);
|
|
28
|
-
_ts_decorate$
|
|
29
|
-
graphql.Field(()=>Date)
|
|
33
|
+
_ts_decorate$i([
|
|
34
|
+
graphql.Field(()=>Date),
|
|
35
|
+
_ts_metadata$g("design:type", typeof Date === "undefined" ? Object : Date)
|
|
30
36
|
], BaseArticleDto.prototype, "createdAt", void 0);
|
|
31
|
-
BaseArticleDto = _ts_decorate$d([
|
|
32
|
-
graphql.InterfaceType('BaseArticle')
|
|
33
|
-
], BaseArticleDto);
|
|
34
37
|
|
|
35
|
-
function _ts_decorate$
|
|
36
|
-
var c = arguments.length, r = c < 3 ? target : desc
|
|
38
|
+
function _ts_decorate$h(decorators, target, key, desc) {
|
|
39
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
37
40
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
38
41
|
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;
|
|
39
42
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
40
43
|
}
|
|
44
|
+
function _ts_metadata$f(k, v) {
|
|
45
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
46
|
+
}
|
|
41
47
|
class ArticleBackstageDto extends BaseArticleDto {
|
|
48
|
+
version;
|
|
49
|
+
deletedAt;
|
|
42
50
|
}
|
|
43
|
-
|
|
44
|
-
graphql.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
_ts_decorate$h([
|
|
52
|
+
graphql.Field(()=>graphql.Int),
|
|
53
|
+
_ts_metadata$f("design:type", Number)
|
|
54
|
+
], ArticleBackstageDto.prototype, "version", void 0);
|
|
55
|
+
_ts_decorate$h([
|
|
56
|
+
graphql.Field(()=>Date, {
|
|
57
|
+
nullable: true
|
|
58
|
+
}),
|
|
59
|
+
_ts_metadata$f("design:type", Object)
|
|
60
|
+
], ArticleBackstageDto.prototype, "deletedAt", void 0);
|
|
61
|
+
ArticleBackstageDto = _ts_decorate$h([
|
|
62
|
+
graphql.ObjectType('ArticleBackstage')
|
|
49
63
|
], ArticleBackstageDto);
|
|
50
64
|
|
|
51
|
-
function _ts_decorate$
|
|
65
|
+
function _ts_decorate$g(decorators, target, key, desc) {
|
|
66
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
67
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
68
|
+
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;
|
|
69
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
70
|
+
}
|
|
71
|
+
function _ts_metadata$e(k, v) {
|
|
72
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
73
|
+
}
|
|
74
|
+
class CreateArticleArgs {
|
|
75
|
+
categoryIds;
|
|
76
|
+
tags;
|
|
77
|
+
multiLanguageContents;
|
|
78
|
+
releasedAt;
|
|
79
|
+
submitted;
|
|
80
|
+
signatureLevel;
|
|
81
|
+
}
|
|
82
|
+
_ts_decorate$g([
|
|
83
|
+
graphql.Field(()=>[
|
|
84
|
+
graphql.ID
|
|
85
|
+
]),
|
|
86
|
+
_ts_metadata$e("design:type", Array)
|
|
87
|
+
], CreateArticleArgs.prototype, "categoryIds", void 0);
|
|
88
|
+
_ts_decorate$g([
|
|
89
|
+
graphql.Field(()=>[
|
|
90
|
+
String
|
|
91
|
+
]),
|
|
92
|
+
_ts_metadata$e("design:type", Array)
|
|
93
|
+
], CreateArticleArgs.prototype, "tags", void 0);
|
|
94
|
+
_ts_decorate$g([
|
|
95
|
+
graphql.Field(()=>[
|
|
96
|
+
ArticleVersionContentInput
|
|
97
|
+
]),
|
|
98
|
+
_ts_metadata$e("design:type", Array)
|
|
99
|
+
], CreateArticleArgs.prototype, "multiLanguageContents", void 0);
|
|
100
|
+
_ts_decorate$g([
|
|
101
|
+
graphql.Field(()=>Date, {
|
|
102
|
+
nullable: true
|
|
103
|
+
}),
|
|
104
|
+
_ts_metadata$e("design:type", Object)
|
|
105
|
+
], CreateArticleArgs.prototype, "releasedAt", void 0);
|
|
106
|
+
_ts_decorate$g([
|
|
107
|
+
graphql.Field(()=>Boolean, {
|
|
108
|
+
nullable: true
|
|
109
|
+
}),
|
|
110
|
+
_ts_metadata$e("design:type", Object)
|
|
111
|
+
], CreateArticleArgs.prototype, "submitted", void 0);
|
|
112
|
+
_ts_decorate$g([
|
|
113
|
+
graphql.Field(()=>String, {
|
|
114
|
+
nullable: true
|
|
115
|
+
}),
|
|
116
|
+
_ts_metadata$e("design:type", Object)
|
|
117
|
+
], CreateArticleArgs.prototype, "signatureLevel", void 0);
|
|
118
|
+
CreateArticleArgs = _ts_decorate$g([
|
|
119
|
+
graphql.ArgsType()
|
|
120
|
+
], CreateArticleArgs);
|
|
121
|
+
class ArticleVersionContentInput {
|
|
122
|
+
language;
|
|
123
|
+
title;
|
|
124
|
+
description;
|
|
125
|
+
content;
|
|
126
|
+
}
|
|
127
|
+
_ts_decorate$g([
|
|
128
|
+
graphql.Field(()=>String, {
|
|
129
|
+
nullable: true
|
|
130
|
+
}),
|
|
131
|
+
_ts_metadata$e("design:type", Object)
|
|
132
|
+
], ArticleVersionContentInput.prototype, "language", void 0);
|
|
133
|
+
_ts_decorate$g([
|
|
134
|
+
graphql.Field(()=>String),
|
|
135
|
+
_ts_metadata$e("design:type", String)
|
|
136
|
+
], ArticleVersionContentInput.prototype, "title", void 0);
|
|
137
|
+
_ts_decorate$g([
|
|
138
|
+
graphql.Field(()=>String, {
|
|
139
|
+
nullable: true
|
|
140
|
+
}),
|
|
141
|
+
_ts_metadata$e("design:type", Object)
|
|
142
|
+
], ArticleVersionContentInput.prototype, "description", void 0);
|
|
143
|
+
_ts_decorate$g([
|
|
144
|
+
graphql.Field(()=>String),
|
|
145
|
+
_ts_metadata$e("design:type", String)
|
|
146
|
+
], ArticleVersionContentInput.prototype, "content", void 0);
|
|
147
|
+
ArticleVersionContentInput = _ts_decorate$g([
|
|
148
|
+
graphql.InputType()
|
|
149
|
+
], ArticleVersionContentInput);
|
|
150
|
+
|
|
151
|
+
function _ts_decorate$f(decorators, target, key, desc) {
|
|
152
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
153
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
154
|
+
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;
|
|
155
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
156
|
+
}
|
|
157
|
+
function _ts_metadata$d(k, v) {
|
|
158
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
159
|
+
}
|
|
160
|
+
class UpdateArticleArgs extends CreateArticleArgs {
|
|
161
|
+
id;
|
|
162
|
+
}
|
|
163
|
+
_ts_decorate$f([
|
|
164
|
+
graphql.Field(()=>graphql.ID),
|
|
165
|
+
_ts_metadata$d("design:type", String)
|
|
166
|
+
], UpdateArticleArgs.prototype, "id", void 0);
|
|
167
|
+
UpdateArticleArgs = _ts_decorate$f([
|
|
168
|
+
graphql.ArgsType()
|
|
169
|
+
], UpdateArticleArgs);
|
|
170
|
+
|
|
171
|
+
function _ts_decorate$e(decorators, target, key, desc) {
|
|
52
172
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
53
173
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
54
174
|
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;
|
|
55
175
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
56
176
|
}
|
|
57
|
-
function
|
|
177
|
+
function _ts_metadata$c(k, v) {
|
|
178
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
179
|
+
}
|
|
180
|
+
function _ts_param$3(paramIndex, decorator) {
|
|
58
181
|
return function(target, key) {
|
|
59
182
|
decorator(target, key, paramIndex);
|
|
60
183
|
};
|
|
@@ -130,93 +253,213 @@ class ArticleMutations {
|
|
|
130
253
|
return this.articleService.withdraw(id);
|
|
131
254
|
}
|
|
132
255
|
}
|
|
133
|
-
_ts_decorate$
|
|
256
|
+
_ts_decorate$e([
|
|
134
257
|
graphql.Mutation(()=>ArticleBackstageDto),
|
|
135
258
|
memberBaseNestjsModule.IsPublic(),
|
|
136
|
-
_ts_param$
|
|
137
|
-
_ts_param$
|
|
259
|
+
_ts_param$3(0, memberBaseNestjsModule.MemberId()),
|
|
260
|
+
_ts_param$3(1, graphql.Args()),
|
|
261
|
+
_ts_metadata$c("design:type", Function),
|
|
262
|
+
_ts_metadata$c("design:paramtypes", [
|
|
263
|
+
String,
|
|
264
|
+
typeof CreateArticleArgs === "undefined" ? Object : CreateArticleArgs
|
|
265
|
+
]),
|
|
266
|
+
_ts_metadata$c("design:returntype", Promise)
|
|
138
267
|
], ArticleMutations.prototype, "createArticle", null);
|
|
139
|
-
_ts_decorate$
|
|
268
|
+
_ts_decorate$e([
|
|
140
269
|
graphql.Mutation(()=>ArticleBackstageDto),
|
|
141
270
|
memberBaseNestjsModule.IsPublic(),
|
|
142
|
-
_ts_param$
|
|
143
|
-
_ts_param$
|
|
271
|
+
_ts_param$3(0, memberBaseNestjsModule.MemberId()),
|
|
272
|
+
_ts_param$3(1, graphql.Args()),
|
|
273
|
+
_ts_metadata$c("design:type", Function),
|
|
274
|
+
_ts_metadata$c("design:paramtypes", [
|
|
275
|
+
String,
|
|
276
|
+
typeof UpdateArticleArgs === "undefined" ? Object : UpdateArticleArgs
|
|
277
|
+
]),
|
|
278
|
+
_ts_metadata$c("design:returntype", Promise)
|
|
144
279
|
], ArticleMutations.prototype, "updateArticle", null);
|
|
145
|
-
_ts_decorate$
|
|
280
|
+
_ts_decorate$e([
|
|
146
281
|
graphql.Mutation(()=>Boolean),
|
|
147
282
|
memberBaseNestjsModule.IsPublic(),
|
|
148
|
-
_ts_param$
|
|
283
|
+
_ts_param$3(0, graphql.Args('id', {
|
|
149
284
|
type: ()=>graphql.ID
|
|
150
|
-
}))
|
|
285
|
+
})),
|
|
286
|
+
_ts_metadata$c("design:type", Function),
|
|
287
|
+
_ts_metadata$c("design:paramtypes", [
|
|
288
|
+
String
|
|
289
|
+
]),
|
|
290
|
+
_ts_metadata$c("design:returntype", Promise)
|
|
151
291
|
], ArticleMutations.prototype, "deleteArticle", null);
|
|
152
|
-
_ts_decorate$
|
|
292
|
+
_ts_decorate$e([
|
|
153
293
|
graphql.Mutation(()=>ArticleBackstageDto),
|
|
154
294
|
memberBaseNestjsModule.IsPublic(),
|
|
155
|
-
_ts_param$
|
|
156
|
-
_ts_param$
|
|
295
|
+
_ts_param$3(0, memberBaseNestjsModule.MemberId()),
|
|
296
|
+
_ts_param$3(1, graphql.Args('id', {
|
|
157
297
|
type: ()=>graphql.ID
|
|
158
298
|
})),
|
|
159
|
-
_ts_param$
|
|
299
|
+
_ts_param$3(2, graphql.Args('version', {
|
|
160
300
|
type: ()=>graphql.Int
|
|
161
|
-
}))
|
|
301
|
+
})),
|
|
302
|
+
_ts_metadata$c("design:type", Function),
|
|
303
|
+
_ts_metadata$c("design:paramtypes", [
|
|
304
|
+
String,
|
|
305
|
+
String,
|
|
306
|
+
Number
|
|
307
|
+
]),
|
|
308
|
+
_ts_metadata$c("design:returntype", Promise)
|
|
162
309
|
], ArticleMutations.prototype, "submitArticle", null);
|
|
163
|
-
_ts_decorate$
|
|
310
|
+
_ts_decorate$e([
|
|
164
311
|
graphql.Mutation(()=>ArticleBackstageDto),
|
|
165
312
|
memberBaseNestjsModule.IsPublic(),
|
|
166
|
-
_ts_param$
|
|
313
|
+
_ts_param$3(0, graphql.Args('id', {
|
|
167
314
|
type: ()=>graphql.ID
|
|
168
|
-
}))
|
|
315
|
+
})),
|
|
316
|
+
_ts_metadata$c("design:type", Function),
|
|
317
|
+
_ts_metadata$c("design:paramtypes", [
|
|
318
|
+
String
|
|
319
|
+
]),
|
|
320
|
+
_ts_metadata$c("design:returntype", Promise)
|
|
169
321
|
], ArticleMutations.prototype, "approveArticle", null);
|
|
170
|
-
_ts_decorate$
|
|
322
|
+
_ts_decorate$e([
|
|
171
323
|
graphql.Mutation(()=>ArticleBackstageDto),
|
|
172
324
|
memberBaseNestjsModule.IsPublic(),
|
|
173
|
-
_ts_param$
|
|
325
|
+
_ts_param$3(0, graphql.Args('id', {
|
|
174
326
|
type: ()=>graphql.ID
|
|
175
327
|
})),
|
|
176
|
-
_ts_param$
|
|
328
|
+
_ts_param$3(1, graphql.Args('reason', {
|
|
177
329
|
type: ()=>String,
|
|
178
330
|
nullable: true
|
|
179
|
-
}))
|
|
331
|
+
})),
|
|
332
|
+
_ts_metadata$c("design:type", Function),
|
|
333
|
+
_ts_metadata$c("design:paramtypes", [
|
|
334
|
+
String,
|
|
335
|
+
Object
|
|
336
|
+
]),
|
|
337
|
+
_ts_metadata$c("design:returntype", Promise)
|
|
180
338
|
], ArticleMutations.prototype, "rejectArticle", null);
|
|
181
|
-
_ts_decorate$
|
|
339
|
+
_ts_decorate$e([
|
|
182
340
|
graphql.Mutation(()=>ArticleBackstageDto),
|
|
183
341
|
memberBaseNestjsModule.IsPublic(),
|
|
184
|
-
_ts_param$
|
|
185
|
-
_ts_param$
|
|
342
|
+
_ts_param$3(0, memberBaseNestjsModule.MemberId()),
|
|
343
|
+
_ts_param$3(1, graphql.Args('id', {
|
|
186
344
|
type: ()=>graphql.ID
|
|
187
345
|
})),
|
|
188
|
-
_ts_param$
|
|
346
|
+
_ts_param$3(2, graphql.Args('releasedAt', {
|
|
189
347
|
type: ()=>Date
|
|
190
|
-
}))
|
|
348
|
+
})),
|
|
349
|
+
_ts_metadata$c("design:type", Function),
|
|
350
|
+
_ts_metadata$c("design:paramtypes", [
|
|
351
|
+
String,
|
|
352
|
+
String,
|
|
353
|
+
typeof Date === "undefined" ? Object : Date
|
|
354
|
+
]),
|
|
355
|
+
_ts_metadata$c("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
191
356
|
], ArticleMutations.prototype, "releaseArticle", null);
|
|
192
|
-
_ts_decorate$
|
|
357
|
+
_ts_decorate$e([
|
|
193
358
|
graphql.Mutation(()=>ArticleBackstageDto),
|
|
194
359
|
memberBaseNestjsModule.IsPublic(),
|
|
195
|
-
_ts_param$
|
|
360
|
+
_ts_param$3(0, graphql.Args('id', {
|
|
196
361
|
type: ()=>graphql.ID
|
|
197
|
-
}))
|
|
362
|
+
})),
|
|
363
|
+
_ts_metadata$c("design:type", Function),
|
|
364
|
+
_ts_metadata$c("design:paramtypes", [
|
|
365
|
+
String
|
|
366
|
+
]),
|
|
367
|
+
_ts_metadata$c("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
198
368
|
], ArticleMutations.prototype, "withdrawArticle", null);
|
|
199
|
-
ArticleMutations = _ts_decorate$
|
|
200
|
-
graphql.Resolver()
|
|
369
|
+
ArticleMutations = _ts_decorate$e([
|
|
370
|
+
graphql.Resolver(),
|
|
371
|
+
_ts_metadata$c("design:type", Function),
|
|
372
|
+
_ts_metadata$c("design:paramtypes", [
|
|
373
|
+
typeof cmsBaseNestjsModule.ArticleBaseService === "undefined" ? Object : cmsBaseNestjsModule.ArticleBaseService
|
|
374
|
+
])
|
|
201
375
|
], ArticleMutations);
|
|
202
376
|
|
|
203
|
-
function _ts_decorate$
|
|
377
|
+
function _ts_decorate$d(decorators, target, key, desc) {
|
|
204
378
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
205
379
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
206
380
|
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;
|
|
207
381
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
208
382
|
}
|
|
383
|
+
function _ts_metadata$b(k, v) {
|
|
384
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
385
|
+
}
|
|
386
|
+
class CreateCategoryArgs {
|
|
387
|
+
parentIds;
|
|
388
|
+
multiLanguageNames;
|
|
389
|
+
}
|
|
390
|
+
_ts_decorate$d([
|
|
391
|
+
graphql.Field(()=>[
|
|
392
|
+
graphql.ID
|
|
393
|
+
], {
|
|
394
|
+
nullable: true
|
|
395
|
+
}),
|
|
396
|
+
_ts_metadata$b("design:type", Object)
|
|
397
|
+
], CreateCategoryArgs.prototype, "parentIds", void 0);
|
|
398
|
+
_ts_decorate$d([
|
|
399
|
+
graphql.Field(()=>[
|
|
400
|
+
CategoryMultiLanguageNameInput
|
|
401
|
+
]),
|
|
402
|
+
_ts_metadata$b("design:type", Array)
|
|
403
|
+
], CreateCategoryArgs.prototype, "multiLanguageNames", void 0);
|
|
404
|
+
CreateCategoryArgs = _ts_decorate$d([
|
|
405
|
+
graphql.ArgsType()
|
|
406
|
+
], CreateCategoryArgs);
|
|
407
|
+
class CategoryMultiLanguageNameInput {
|
|
408
|
+
language;
|
|
409
|
+
name;
|
|
410
|
+
}
|
|
411
|
+
_ts_decorate$d([
|
|
412
|
+
graphql.Field(()=>String, {
|
|
413
|
+
nullable: true
|
|
414
|
+
}),
|
|
415
|
+
_ts_metadata$b("design:type", Object)
|
|
416
|
+
], CategoryMultiLanguageNameInput.prototype, "language", void 0);
|
|
417
|
+
_ts_decorate$d([
|
|
418
|
+
graphql.Field(()=>String),
|
|
419
|
+
_ts_metadata$b("design:type", String)
|
|
420
|
+
], CategoryMultiLanguageNameInput.prototype, "name", void 0);
|
|
421
|
+
CategoryMultiLanguageNameInput = _ts_decorate$d([
|
|
422
|
+
graphql.InputType()
|
|
423
|
+
], CategoryMultiLanguageNameInput);
|
|
424
|
+
class UpdateCategoryArgs extends CreateCategoryArgs {
|
|
425
|
+
id;
|
|
426
|
+
}
|
|
427
|
+
_ts_decorate$d([
|
|
428
|
+
graphql.Field(()=>graphql.ID),
|
|
429
|
+
_ts_metadata$b("design:type", String)
|
|
430
|
+
], UpdateCategoryArgs.prototype, "id", void 0);
|
|
431
|
+
UpdateCategoryArgs = _ts_decorate$d([
|
|
432
|
+
graphql.ArgsType()
|
|
433
|
+
], UpdateCategoryArgs);
|
|
434
|
+
|
|
435
|
+
function _ts_decorate$c(decorators, target, key, desc) {
|
|
436
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
437
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
438
|
+
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;
|
|
439
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
440
|
+
}
|
|
441
|
+
function _ts_metadata$a(k, v) {
|
|
442
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
443
|
+
}
|
|
209
444
|
class BaseCategoryDto {
|
|
210
445
|
id;
|
|
446
|
+
createdAt;
|
|
447
|
+
updatedAt;
|
|
211
448
|
}
|
|
212
|
-
_ts_decorate$
|
|
213
|
-
graphql.Field(()=>graphql.ID)
|
|
449
|
+
_ts_decorate$c([
|
|
450
|
+
graphql.Field(()=>graphql.ID),
|
|
451
|
+
_ts_metadata$a("design:type", String)
|
|
214
452
|
], BaseCategoryDto.prototype, "id", void 0);
|
|
215
|
-
|
|
216
|
-
graphql.
|
|
217
|
-
|
|
453
|
+
_ts_decorate$c([
|
|
454
|
+
graphql.Field(()=>Date),
|
|
455
|
+
_ts_metadata$a("design:type", typeof Date === "undefined" ? Object : Date)
|
|
456
|
+
], BaseCategoryDto.prototype, "createdAt", void 0);
|
|
457
|
+
_ts_decorate$c([
|
|
458
|
+
graphql.Field(()=>Date),
|
|
459
|
+
_ts_metadata$a("design:type", typeof Date === "undefined" ? Object : Date)
|
|
460
|
+
], BaseCategoryDto.prototype, "updatedAt", void 0);
|
|
218
461
|
|
|
219
|
-
function _ts_decorate$
|
|
462
|
+
function _ts_decorate$b(decorators, target, key, desc) {
|
|
220
463
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
221
464
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
222
465
|
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;
|
|
@@ -224,7 +467,7 @@ function _ts_decorate$9(decorators, target, key, desc) {
|
|
|
224
467
|
}
|
|
225
468
|
class CategoryBackstageDto extends BaseCategoryDto {
|
|
226
469
|
}
|
|
227
|
-
CategoryBackstageDto = _ts_decorate$
|
|
470
|
+
CategoryBackstageDto = _ts_decorate$b([
|
|
228
471
|
graphql.ObjectType('CategoryBackstage', {
|
|
229
472
|
implements: ()=>[
|
|
230
473
|
BaseCategoryDto
|
|
@@ -232,13 +475,16 @@ CategoryBackstageDto = _ts_decorate$9([
|
|
|
232
475
|
})
|
|
233
476
|
], CategoryBackstageDto);
|
|
234
477
|
|
|
235
|
-
function _ts_decorate$
|
|
478
|
+
function _ts_decorate$a(decorators, target, key, desc) {
|
|
236
479
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
237
480
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
238
481
|
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;
|
|
239
482
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
240
483
|
}
|
|
241
|
-
function
|
|
484
|
+
function _ts_metadata$9(k, v) {
|
|
485
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
486
|
+
}
|
|
487
|
+
function _ts_param$2(paramIndex, decorator) {
|
|
242
488
|
return function(target, key) {
|
|
243
489
|
decorator(target, key, paramIndex);
|
|
244
490
|
};
|
|
@@ -271,27 +517,101 @@ class CategoryMutations {
|
|
|
271
517
|
return true;
|
|
272
518
|
}
|
|
273
519
|
}
|
|
274
|
-
_ts_decorate$
|
|
520
|
+
_ts_decorate$a([
|
|
275
521
|
graphql.Mutation(()=>CategoryBackstageDto),
|
|
276
522
|
memberBaseNestjsModule.IsPublic(),
|
|
277
|
-
_ts_param$
|
|
523
|
+
_ts_param$2(0, graphql.Args()),
|
|
524
|
+
_ts_metadata$9("design:type", Function),
|
|
525
|
+
_ts_metadata$9("design:paramtypes", [
|
|
526
|
+
typeof CreateCategoryArgs === "undefined" ? Object : CreateCategoryArgs
|
|
527
|
+
]),
|
|
528
|
+
_ts_metadata$9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
278
529
|
], CategoryMutations.prototype, "createCategory", null);
|
|
279
|
-
_ts_decorate$
|
|
530
|
+
_ts_decorate$a([
|
|
280
531
|
graphql.Mutation(()=>CategoryBackstageDto),
|
|
281
532
|
memberBaseNestjsModule.IsPublic(),
|
|
282
|
-
_ts_param$
|
|
533
|
+
_ts_param$2(0, graphql.Args()),
|
|
534
|
+
_ts_metadata$9("design:type", Function),
|
|
535
|
+
_ts_metadata$9("design:paramtypes", [
|
|
536
|
+
typeof UpdateCategoryArgs === "undefined" ? Object : UpdateCategoryArgs
|
|
537
|
+
]),
|
|
538
|
+
_ts_metadata$9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
283
539
|
], CategoryMutations.prototype, "updateCategory", null);
|
|
284
|
-
_ts_decorate$
|
|
540
|
+
_ts_decorate$a([
|
|
285
541
|
graphql.Mutation(()=>Boolean),
|
|
286
542
|
memberBaseNestjsModule.IsPublic(),
|
|
287
|
-
_ts_param$
|
|
543
|
+
_ts_param$2(0, graphql.Args('id', {
|
|
288
544
|
type: ()=>graphql.ID
|
|
289
|
-
}))
|
|
545
|
+
})),
|
|
546
|
+
_ts_metadata$9("design:type", Function),
|
|
547
|
+
_ts_metadata$9("design:paramtypes", [
|
|
548
|
+
String
|
|
549
|
+
]),
|
|
550
|
+
_ts_metadata$9("design:returntype", Promise)
|
|
290
551
|
], CategoryMutations.prototype, "deleteCategory", null);
|
|
291
|
-
CategoryMutations = _ts_decorate$
|
|
292
|
-
graphql.Resolver()
|
|
552
|
+
CategoryMutations = _ts_decorate$a([
|
|
553
|
+
graphql.Resolver(),
|
|
554
|
+
_ts_metadata$9("design:type", Function),
|
|
555
|
+
_ts_metadata$9("design:paramtypes", [
|
|
556
|
+
typeof cmsBaseNestjsModule.CategoryBaseService === "undefined" ? Object : cmsBaseNestjsModule.CategoryBaseService
|
|
557
|
+
])
|
|
293
558
|
], CategoryMutations);
|
|
294
559
|
|
|
560
|
+
function _ts_decorate$9(decorators, target, key, desc) {
|
|
561
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
562
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
563
|
+
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;
|
|
564
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
565
|
+
}
|
|
566
|
+
function _ts_metadata$8(k, v) {
|
|
567
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
568
|
+
}
|
|
569
|
+
class ArticlesArgs {
|
|
570
|
+
stage;
|
|
571
|
+
categoryIds;
|
|
572
|
+
offset;
|
|
573
|
+
limit;
|
|
574
|
+
searchTerm;
|
|
575
|
+
}
|
|
576
|
+
_ts_decorate$9([
|
|
577
|
+
graphql.Field(()=>cmsBaseNestjsModule.ArticleStage, {
|
|
578
|
+
nullable: true
|
|
579
|
+
}),
|
|
580
|
+
_ts_metadata$8("design:type", Object)
|
|
581
|
+
], ArticlesArgs.prototype, "stage", void 0);
|
|
582
|
+
_ts_decorate$9([
|
|
583
|
+
graphql.Field(()=>[
|
|
584
|
+
String
|
|
585
|
+
], {
|
|
586
|
+
nullable: true
|
|
587
|
+
}),
|
|
588
|
+
_ts_metadata$8("design:type", Object)
|
|
589
|
+
], ArticlesArgs.prototype, "categoryIds", void 0);
|
|
590
|
+
_ts_decorate$9([
|
|
591
|
+
graphql.Field(()=>graphql.Int, {
|
|
592
|
+
nullable: true
|
|
593
|
+
}),
|
|
594
|
+
_ts_metadata$8("design:type", Object)
|
|
595
|
+
], ArticlesArgs.prototype, "offset", void 0);
|
|
596
|
+
_ts_decorate$9([
|
|
597
|
+
graphql.Field(()=>graphql.Int, {
|
|
598
|
+
nullable: true
|
|
599
|
+
}),
|
|
600
|
+
_ts_metadata$8("design:type", Object)
|
|
601
|
+
], ArticlesArgs.prototype, "limit", void 0);
|
|
602
|
+
_ts_decorate$9([
|
|
603
|
+
graphql.Field(()=>String, {
|
|
604
|
+
nullable: true
|
|
605
|
+
}),
|
|
606
|
+
_ts_metadata$8("design:type", Object)
|
|
607
|
+
], ArticlesArgs.prototype, "searchTerm", void 0);
|
|
608
|
+
ArticlesArgs = _ts_decorate$9([
|
|
609
|
+
graphql.ArgsType()
|
|
610
|
+
], ArticlesArgs);
|
|
611
|
+
graphql.registerEnumType(cmsBaseNestjsModule.ArticleStage, {
|
|
612
|
+
name: 'ArticleStage'
|
|
613
|
+
});
|
|
614
|
+
|
|
295
615
|
const Language = common.createParamDecorator(async (data, context)=>{
|
|
296
616
|
const contextType = context.getType();
|
|
297
617
|
let language;
|
|
@@ -314,55 +634,155 @@ const Language = common.createParamDecorator(async (data, context)=>{
|
|
|
314
634
|
return language.split(',')[0].split(';')[0].trim().toLowerCase();
|
|
315
635
|
});
|
|
316
636
|
|
|
317
|
-
function _ts_decorate$
|
|
637
|
+
function _ts_decorate$8(decorators, target, key, desc) {
|
|
318
638
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
319
639
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
320
640
|
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;
|
|
321
641
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
322
642
|
}
|
|
643
|
+
function _ts_metadata$7(k, v) {
|
|
644
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
645
|
+
}
|
|
323
646
|
class Collection {
|
|
324
647
|
total;
|
|
325
648
|
offset;
|
|
326
649
|
limit;
|
|
327
650
|
}
|
|
328
|
-
_ts_decorate$
|
|
329
|
-
graphql.Field(()=>graphql.Int)
|
|
651
|
+
_ts_decorate$8([
|
|
652
|
+
graphql.Field(()=>graphql.Int),
|
|
653
|
+
_ts_metadata$7("design:type", Number)
|
|
330
654
|
], Collection.prototype, "total", void 0);
|
|
331
|
-
_ts_decorate$
|
|
332
|
-
graphql.Field(()=>graphql.Int)
|
|
655
|
+
_ts_decorate$8([
|
|
656
|
+
graphql.Field(()=>graphql.Int),
|
|
657
|
+
_ts_metadata$7("design:type", Number)
|
|
333
658
|
], Collection.prototype, "offset", void 0);
|
|
334
|
-
_ts_decorate$
|
|
335
|
-
graphql.Field(()=>graphql.Int)
|
|
659
|
+
_ts_decorate$8([
|
|
660
|
+
graphql.Field(()=>graphql.Int),
|
|
661
|
+
_ts_metadata$7("design:type", Number)
|
|
336
662
|
], Collection.prototype, "limit", void 0);
|
|
337
|
-
Collection = _ts_decorate$
|
|
663
|
+
Collection = _ts_decorate$8([
|
|
338
664
|
graphql.ObjectType('Collection')
|
|
339
665
|
], Collection);
|
|
340
666
|
|
|
667
|
+
const QuadratsContentScalar = new graphql$1.GraphQLScalarType({
|
|
668
|
+
name: 'QuadratsContent',
|
|
669
|
+
description: 'QuadratsContent custom scalar type (as JSON string)',
|
|
670
|
+
parseValue: (value)=>{
|
|
671
|
+
if (typeof value === 'string') {
|
|
672
|
+
let parsedValue;
|
|
673
|
+
try {
|
|
674
|
+
parsedValue = JSON.parse(value);
|
|
675
|
+
} catch (error) {
|
|
676
|
+
common.Logger.error(`Error parsing QuadratsContent (parseValue): ${error}`);
|
|
677
|
+
throw new common.InternalServerErrorException('Invalid QuadratsElement value');
|
|
678
|
+
}
|
|
679
|
+
if (!Array.isArray(parsedValue)) {
|
|
680
|
+
throw new common.BadRequestException('Expected a JSON string for QuadratsContent');
|
|
681
|
+
}
|
|
682
|
+
return parsedValue;
|
|
683
|
+
}
|
|
684
|
+
throw new common.BadRequestException('Expected a JSON string for QuadratsContent');
|
|
685
|
+
},
|
|
686
|
+
serialize: (value)=>{
|
|
687
|
+
try {
|
|
688
|
+
return JSON.stringify(value);
|
|
689
|
+
} catch (error) {
|
|
690
|
+
common.Logger.error(`Error serializing QuadratsContent: ${error}`);
|
|
691
|
+
throw new common.InternalServerErrorException('Error serializing QuadratsElement');
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
parseLiteral: (ast)=>{
|
|
695
|
+
try {
|
|
696
|
+
if (ast.kind === graphql$1.Kind.STRING) {
|
|
697
|
+
return JSON.parse(ast.value);
|
|
698
|
+
}
|
|
699
|
+
} catch (error) {
|
|
700
|
+
common.Logger.error(`Error parsing QuadratsContent (parseLiteral): ${error}`);
|
|
701
|
+
throw new common.InternalServerErrorException('Invalid QuadratsElement value');
|
|
702
|
+
}
|
|
703
|
+
throw new Error('Expected string literal for QuadratsContent');
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
function _ts_decorate$7(decorators, target, key, desc) {
|
|
708
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
709
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
710
|
+
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;
|
|
711
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
712
|
+
}
|
|
713
|
+
function _ts_metadata$6(k, v) {
|
|
714
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
715
|
+
}
|
|
716
|
+
class ArticleDto extends BaseArticleDto {
|
|
717
|
+
title;
|
|
718
|
+
content;
|
|
719
|
+
}
|
|
720
|
+
_ts_decorate$7([
|
|
721
|
+
graphql.Field(()=>String),
|
|
722
|
+
_ts_metadata$6("design:type", String)
|
|
723
|
+
], ArticleDto.prototype, "title", void 0);
|
|
724
|
+
_ts_decorate$7([
|
|
725
|
+
graphql.Field(()=>QuadratsContentScalar),
|
|
726
|
+
_ts_metadata$6("design:type", Array)
|
|
727
|
+
], ArticleDto.prototype, "content", void 0);
|
|
728
|
+
ArticleDto = _ts_decorate$7([
|
|
729
|
+
graphql.ObjectType('Article')
|
|
730
|
+
], ArticleDto);
|
|
731
|
+
|
|
341
732
|
function _ts_decorate$6(decorators, target, key, desc) {
|
|
342
733
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
343
734
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
344
735
|
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;
|
|
345
736
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
346
737
|
}
|
|
738
|
+
function _ts_metadata$5(k, v) {
|
|
739
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
740
|
+
}
|
|
347
741
|
class ArticleCollectionDto extends Collection {
|
|
348
742
|
articles;
|
|
349
743
|
}
|
|
350
744
|
_ts_decorate$6([
|
|
351
745
|
graphql.Field(()=>[
|
|
352
|
-
|
|
353
|
-
])
|
|
746
|
+
ArticleDto
|
|
747
|
+
]),
|
|
748
|
+
_ts_metadata$5("design:type", Array)
|
|
354
749
|
], ArticleCollectionDto.prototype, "articles", void 0);
|
|
355
750
|
ArticleCollectionDto = _ts_decorate$6([
|
|
356
751
|
graphql.ObjectType('ArticleCollection')
|
|
357
752
|
], ArticleCollectionDto);
|
|
358
753
|
|
|
359
754
|
function _ts_decorate$5(decorators, target, key, desc) {
|
|
755
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
756
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
757
|
+
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;
|
|
758
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
759
|
+
}
|
|
760
|
+
function _ts_metadata$4(k, v) {
|
|
761
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
762
|
+
}
|
|
763
|
+
class ArticleBackstageCollectionDto extends Collection {
|
|
764
|
+
articles;
|
|
765
|
+
}
|
|
766
|
+
_ts_decorate$5([
|
|
767
|
+
graphql.Field(()=>[
|
|
768
|
+
ArticleBackstageDto
|
|
769
|
+
]),
|
|
770
|
+
_ts_metadata$4("design:type", Array)
|
|
771
|
+
], ArticleBackstageCollectionDto.prototype, "articles", void 0);
|
|
772
|
+
ArticleBackstageCollectionDto = _ts_decorate$5([
|
|
773
|
+
graphql.ObjectType('ArticleBackstageCollection')
|
|
774
|
+
], ArticleBackstageCollectionDto);
|
|
775
|
+
|
|
776
|
+
function _ts_decorate$4(decorators, target, key, desc) {
|
|
360
777
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
361
778
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
362
779
|
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;
|
|
363
780
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
364
781
|
}
|
|
365
|
-
function
|
|
782
|
+
function _ts_metadata$3(k, v) {
|
|
783
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
784
|
+
}
|
|
785
|
+
function _ts_param$1(paramIndex, decorator) {
|
|
366
786
|
return function(target, key) {
|
|
367
787
|
decorator(target, key, paramIndex);
|
|
368
788
|
};
|
|
@@ -377,156 +797,134 @@ class ArticleQueries {
|
|
|
377
797
|
language: language ?? cmsBaseNestjsModule.DEFAULT_LANGUAGE
|
|
378
798
|
});
|
|
379
799
|
}
|
|
380
|
-
async articles(args) {
|
|
800
|
+
async articles(args, language = cmsBaseNestjsModule.DEFAULT_LANGUAGE) {
|
|
801
|
+
return this.articleService.findCollection({
|
|
802
|
+
...args,
|
|
803
|
+
language
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
backstageArticle(id) {
|
|
807
|
+
return this.articleService.findById(id);
|
|
808
|
+
}
|
|
809
|
+
backstageArticles(args) {
|
|
381
810
|
return this.articleService.findCollection(args);
|
|
382
811
|
}
|
|
383
812
|
}
|
|
384
|
-
_ts_decorate$
|
|
385
|
-
graphql.Query(()=>
|
|
813
|
+
_ts_decorate$4([
|
|
814
|
+
graphql.Query(()=>ArticleDto),
|
|
386
815
|
memberBaseNestjsModule.IsPublic(),
|
|
387
|
-
_ts_param$
|
|
816
|
+
_ts_param$1(0, graphql.Args('id', {
|
|
388
817
|
type: ()=>graphql.ID
|
|
389
818
|
})),
|
|
390
|
-
_ts_param$
|
|
819
|
+
_ts_param$1(1, Language()),
|
|
820
|
+
_ts_metadata$3("design:type", Function),
|
|
821
|
+
_ts_metadata$3("design:paramtypes", [
|
|
822
|
+
String,
|
|
823
|
+
String
|
|
824
|
+
]),
|
|
825
|
+
_ts_metadata$3("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
391
826
|
], ArticleQueries.prototype, "article", null);
|
|
392
|
-
_ts_decorate$
|
|
827
|
+
_ts_decorate$4([
|
|
393
828
|
graphql.Query(()=>ArticleCollectionDto),
|
|
394
829
|
memberBaseNestjsModule.IsPublic(),
|
|
395
|
-
_ts_param$
|
|
830
|
+
_ts_param$1(0, graphql.Args()),
|
|
831
|
+
_ts_param$1(1, Language()),
|
|
832
|
+
_ts_metadata$3("design:type", Function),
|
|
833
|
+
_ts_metadata$3("design:paramtypes", [
|
|
834
|
+
typeof ArticlesArgs === "undefined" ? Object : ArticlesArgs,
|
|
835
|
+
String
|
|
836
|
+
]),
|
|
837
|
+
_ts_metadata$3("design:returntype", Promise)
|
|
396
838
|
], ArticleQueries.prototype, "articles", null);
|
|
397
|
-
ArticleQueries = _ts_decorate$5([
|
|
398
|
-
graphql.Resolver()
|
|
399
|
-
], ArticleQueries);
|
|
400
|
-
|
|
401
|
-
function _ts_decorate$4(decorators, target, key, desc) {
|
|
402
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
403
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
404
|
-
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;
|
|
405
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
406
|
-
}
|
|
407
|
-
function _ts_param$2(paramIndex, decorator) {
|
|
408
|
-
return function(target, key) {
|
|
409
|
-
decorator(target, key, paramIndex);
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
class CategoryQueries {
|
|
413
|
-
categoryService;
|
|
414
|
-
constructor(categoryService){
|
|
415
|
-
this.categoryService = categoryService;
|
|
416
|
-
}
|
|
417
|
-
category(id) {
|
|
418
|
-
return this.categoryService.findById(id);
|
|
419
|
-
}
|
|
420
|
-
categories(args) {
|
|
421
|
-
return this.categoryService.findAll(args);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
839
|
_ts_decorate$4([
|
|
425
|
-
graphql.Query(()=>
|
|
840
|
+
graphql.Query(()=>ArticleBackstageDto),
|
|
426
841
|
memberBaseNestjsModule.IsPublic(),
|
|
427
|
-
_ts_param$
|
|
842
|
+
_ts_param$1(0, graphql.Args('id', {
|
|
428
843
|
type: ()=>graphql.ID
|
|
429
|
-
}))
|
|
430
|
-
|
|
844
|
+
})),
|
|
845
|
+
_ts_metadata$3("design:type", Function),
|
|
846
|
+
_ts_metadata$3("design:paramtypes", [
|
|
847
|
+
String
|
|
848
|
+
]),
|
|
849
|
+
_ts_metadata$3("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
850
|
+
], ArticleQueries.prototype, "backstageArticle", null);
|
|
431
851
|
_ts_decorate$4([
|
|
432
|
-
graphql.Query(()=>
|
|
433
|
-
BaseCategoryDto
|
|
434
|
-
]),
|
|
852
|
+
graphql.Query(()=>ArticleBackstageCollectionDto),
|
|
435
853
|
memberBaseNestjsModule.IsPublic(),
|
|
436
|
-
_ts_param$
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
],
|
|
854
|
+
_ts_param$1(0, graphql.Args()),
|
|
855
|
+
_ts_metadata$3("design:type", Function),
|
|
856
|
+
_ts_metadata$3("design:paramtypes", [
|
|
857
|
+
typeof ArticlesArgs === "undefined" ? Object : ArticlesArgs
|
|
858
|
+
]),
|
|
859
|
+
_ts_metadata$3("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
860
|
+
], ArticleQueries.prototype, "backstageArticles", null);
|
|
861
|
+
ArticleQueries = _ts_decorate$4([
|
|
862
|
+
graphql.Resolver(),
|
|
863
|
+
_ts_metadata$3("design:type", Function),
|
|
864
|
+
_ts_metadata$3("design:paramtypes", [
|
|
865
|
+
typeof cmsBaseNestjsModule.ArticleBaseService === "undefined" ? Object : cmsBaseNestjsModule.ArticleBaseService
|
|
866
|
+
])
|
|
867
|
+
], ArticleQueries);
|
|
441
868
|
|
|
442
869
|
function _ts_decorate$3(decorators, target, key, desc) {
|
|
443
|
-
var c = arguments.length, r = c < 3 ? target : desc
|
|
870
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
444
871
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
445
872
|
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;
|
|
446
873
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
447
874
|
}
|
|
448
|
-
|
|
875
|
+
function _ts_metadata$2(k, v) {
|
|
876
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
449
877
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
} catch (error) {
|
|
481
|
-
common.Logger.error(`Error serializing QuadratsContent: ${error}`);
|
|
482
|
-
throw new common.InternalServerErrorException('Error serializing QuadratsElement');
|
|
483
|
-
}
|
|
484
|
-
},
|
|
485
|
-
parseLiteral: (ast)=>{
|
|
486
|
-
try {
|
|
487
|
-
if (ast.kind === graphql$1.Kind.STRING) {
|
|
488
|
-
return JSON.parse(ast.value);
|
|
489
|
-
}
|
|
490
|
-
} catch (error) {
|
|
491
|
-
common.Logger.error(`Error parsing QuadratsContent (parseLiteral): ${error}`);
|
|
492
|
-
throw new common.InternalServerErrorException('Invalid QuadratsElement value');
|
|
493
|
-
}
|
|
494
|
-
throw new Error('Expected string literal for QuadratsContent');
|
|
495
|
-
}
|
|
496
|
-
});
|
|
878
|
+
class CategoriesArgs {
|
|
879
|
+
parentIds;
|
|
880
|
+
ids;
|
|
881
|
+
searchTerm;
|
|
882
|
+
}
|
|
883
|
+
_ts_decorate$3([
|
|
884
|
+
graphql.Field(()=>[
|
|
885
|
+
String
|
|
886
|
+
], {
|
|
887
|
+
nullable: true
|
|
888
|
+
}),
|
|
889
|
+
_ts_metadata$2("design:type", Object)
|
|
890
|
+
], CategoriesArgs.prototype, "parentIds", void 0);
|
|
891
|
+
_ts_decorate$3([
|
|
892
|
+
graphql.Field(()=>[
|
|
893
|
+
String
|
|
894
|
+
], {
|
|
895
|
+
nullable: true
|
|
896
|
+
}),
|
|
897
|
+
_ts_metadata$2("design:type", Object)
|
|
898
|
+
], CategoriesArgs.prototype, "ids", void 0);
|
|
899
|
+
_ts_decorate$3([
|
|
900
|
+
graphql.Field(()=>String, {
|
|
901
|
+
nullable: true
|
|
902
|
+
}),
|
|
903
|
+
_ts_metadata$2("design:type", Object)
|
|
904
|
+
], CategoriesArgs.prototype, "searchTerm", void 0);
|
|
905
|
+
CategoriesArgs = _ts_decorate$3([
|
|
906
|
+
graphql.ArgsType()
|
|
907
|
+
], CategoriesArgs);
|
|
497
908
|
|
|
498
909
|
function _ts_decorate$2(decorators, target, key, desc) {
|
|
499
|
-
var c = arguments.length, r = c < 3 ? target : desc
|
|
910
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
500
911
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
501
912
|
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;
|
|
502
913
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
503
914
|
}
|
|
504
|
-
function
|
|
505
|
-
return
|
|
506
|
-
decorator(target, key, paramIndex);
|
|
507
|
-
};
|
|
915
|
+
function _ts_metadata$1(k, v) {
|
|
916
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
508
917
|
}
|
|
509
|
-
class
|
|
510
|
-
|
|
511
|
-
return article.title;
|
|
512
|
-
}
|
|
513
|
-
content(article) {
|
|
514
|
-
return article.content;
|
|
515
|
-
}
|
|
918
|
+
class CategoryDto extends BaseCategoryDto {
|
|
919
|
+
name;
|
|
516
920
|
}
|
|
517
921
|
_ts_decorate$2([
|
|
518
|
-
graphql.
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
memberBaseNestjsModule.IsPublic(),
|
|
525
|
-
_ts_param$1(0, graphql.Root())
|
|
526
|
-
], ArticleResolver.prototype, "content", null);
|
|
527
|
-
ArticleResolver = _ts_decorate$2([
|
|
528
|
-
graphql.Resolver(()=>ArticleDto)
|
|
529
|
-
], ArticleResolver);
|
|
922
|
+
graphql.Field(()=>String),
|
|
923
|
+
_ts_metadata$1("design:type", String)
|
|
924
|
+
], CategoryDto.prototype, "name", void 0);
|
|
925
|
+
CategoryDto = _ts_decorate$2([
|
|
926
|
+
graphql.ObjectType('Category')
|
|
927
|
+
], CategoryDto);
|
|
530
928
|
|
|
531
929
|
function _ts_decorate$1(decorators, target, key, desc) {
|
|
532
930
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -534,34 +932,94 @@ function _ts_decorate$1(decorators, target, key, desc) {
|
|
|
534
932
|
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;
|
|
535
933
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
536
934
|
}
|
|
935
|
+
function _ts_metadata(k, v) {
|
|
936
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
937
|
+
}
|
|
537
938
|
function _ts_param(paramIndex, decorator) {
|
|
538
939
|
return function(target, key) {
|
|
539
940
|
decorator(target, key, paramIndex);
|
|
540
941
|
};
|
|
541
942
|
}
|
|
542
|
-
class
|
|
543
|
-
|
|
544
|
-
|
|
943
|
+
class CategoryQueries {
|
|
944
|
+
categoryService;
|
|
945
|
+
constructor(categoryService){
|
|
946
|
+
this.categoryService = categoryService;
|
|
947
|
+
}
|
|
948
|
+
category(id, language = cmsBaseNestjsModule.DEFAULT_LANGUAGE) {
|
|
949
|
+
return this.categoryService.findById(id, language);
|
|
545
950
|
}
|
|
546
|
-
|
|
547
|
-
return
|
|
951
|
+
categories(args, language = cmsBaseNestjsModule.DEFAULT_LANGUAGE) {
|
|
952
|
+
return this.categoryService.findAll({
|
|
953
|
+
...args,
|
|
954
|
+
language
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
backstageCategory(id) {
|
|
958
|
+
return this.categoryService.findById(id);
|
|
959
|
+
}
|
|
960
|
+
backstageCategories(args) {
|
|
961
|
+
return this.categoryService.findAll(args);
|
|
548
962
|
}
|
|
549
963
|
}
|
|
550
964
|
_ts_decorate$1([
|
|
551
|
-
graphql.
|
|
965
|
+
graphql.Query(()=>CategoryDto),
|
|
552
966
|
memberBaseNestjsModule.IsPublic(),
|
|
553
|
-
_ts_param(0, graphql.
|
|
554
|
-
|
|
967
|
+
_ts_param(0, graphql.Args('id', {
|
|
968
|
+
type: ()=>graphql.ID
|
|
969
|
+
})),
|
|
970
|
+
_ts_param(1, Language()),
|
|
971
|
+
_ts_metadata("design:type", Function),
|
|
972
|
+
_ts_metadata("design:paramtypes", [
|
|
973
|
+
String,
|
|
974
|
+
String
|
|
975
|
+
]),
|
|
976
|
+
_ts_metadata("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
977
|
+
], CategoryQueries.prototype, "category", null);
|
|
555
978
|
_ts_decorate$1([
|
|
556
|
-
graphql.
|
|
557
|
-
|
|
558
|
-
|
|
979
|
+
graphql.Query(()=>[
|
|
980
|
+
CategoryDto
|
|
981
|
+
]),
|
|
559
982
|
memberBaseNestjsModule.IsPublic(),
|
|
560
|
-
_ts_param(0, graphql.
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
983
|
+
_ts_param(0, graphql.Args()),
|
|
984
|
+
_ts_param(1, Language()),
|
|
985
|
+
_ts_metadata("design:type", Function),
|
|
986
|
+
_ts_metadata("design:paramtypes", [
|
|
987
|
+
typeof CategoriesArgs === "undefined" ? Object : CategoriesArgs,
|
|
988
|
+
String
|
|
989
|
+
]),
|
|
990
|
+
_ts_metadata("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
991
|
+
], CategoryQueries.prototype, "categories", null);
|
|
992
|
+
_ts_decorate$1([
|
|
993
|
+
graphql.Query(()=>CategoryBackstageDto),
|
|
994
|
+
memberBaseNestjsModule.IsPublic(),
|
|
995
|
+
_ts_param(0, graphql.Args('id', {
|
|
996
|
+
type: ()=>graphql.ID
|
|
997
|
+
})),
|
|
998
|
+
_ts_metadata("design:type", Function),
|
|
999
|
+
_ts_metadata("design:paramtypes", [
|
|
1000
|
+
String
|
|
1001
|
+
]),
|
|
1002
|
+
_ts_metadata("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1003
|
+
], CategoryQueries.prototype, "backstageCategory", null);
|
|
1004
|
+
_ts_decorate$1([
|
|
1005
|
+
graphql.Query(()=>[
|
|
1006
|
+
CategoryBackstageDto
|
|
1007
|
+
]),
|
|
1008
|
+
memberBaseNestjsModule.IsPublic(),
|
|
1009
|
+
_ts_param(0, graphql.Args()),
|
|
1010
|
+
_ts_metadata("design:type", Function),
|
|
1011
|
+
_ts_metadata("design:paramtypes", [
|
|
1012
|
+
typeof CategoriesArgs === "undefined" ? Object : CategoriesArgs
|
|
1013
|
+
]),
|
|
1014
|
+
_ts_metadata("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1015
|
+
], CategoryQueries.prototype, "backstageCategories", null);
|
|
1016
|
+
CategoryQueries = _ts_decorate$1([
|
|
1017
|
+
graphql.Resolver(),
|
|
1018
|
+
_ts_metadata("design:type", Function),
|
|
1019
|
+
_ts_metadata("design:paramtypes", [
|
|
1020
|
+
typeof cmsBaseNestjsModule.CategoryBaseService === "undefined" ? Object : cmsBaseNestjsModule.CategoryBaseService
|
|
1021
|
+
])
|
|
1022
|
+
], CategoryQueries);
|
|
565
1023
|
|
|
566
1024
|
function _ts_decorate(decorators, target, key, desc) {
|
|
567
1025
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -583,8 +1041,6 @@ class CMSBaseGraphQLModule {
|
|
|
583
1041
|
providers: [
|
|
584
1042
|
ArticleQueries,
|
|
585
1043
|
ArticleMutations,
|
|
586
|
-
ArticleResolver,
|
|
587
|
-
ArticleBackstageResolver,
|
|
588
1044
|
CategoryQueries,
|
|
589
1045
|
CategoryMutations
|
|
590
1046
|
]
|
|
@@ -602,8 +1058,6 @@ class CMSBaseGraphQLModule {
|
|
|
602
1058
|
providers: [
|
|
603
1059
|
ArticleQueries,
|
|
604
1060
|
ArticleMutations,
|
|
605
|
-
ArticleResolver,
|
|
606
|
-
ArticleBackstageResolver,
|
|
607
1061
|
CategoryQueries,
|
|
608
1062
|
CategoryMutations
|
|
609
1063
|
]
|