@rytass/cms-base-nestjs-graphql-module 0.0.23 → 0.0.25

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.
@@ -2,9 +2,11 @@ import { MULTIPLE_LANGUAGE_MODE, ArticleBaseService, DEFAULT_LANGUAGE } from '@r
2
2
  import { Mutation, Args, ID, Int, Resolver } from '@nestjs/graphql';
3
3
  import { BackstageArticleDto } from '../dto/backstage-article.dto.js';
4
4
  import { CreateArticleArgs } from '../dto/create-article.args.js';
5
- import { IsPublic, MemberId } from '@rytass/member-base-nestjs-module';
5
+ import { AllowActions, MemberId } from '@rytass/member-base-nestjs-module';
6
6
  import { UpdateArticleArgs } from '../dto/update-article.args.js';
7
7
  import { Inject } from '@nestjs/common';
8
+ import { BaseAction } from '../constants/enum/base-action.enum.js';
9
+ import { BaseResource } from '../constants/enum/base-resource.enum.js';
8
10
 
9
11
  function _ts_decorate(decorators, target, key, desc) {
10
12
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -112,7 +114,12 @@ class ArticleMutations {
112
114
  }
113
115
  _ts_decorate([
114
116
  Mutation(()=>BackstageArticleDto),
115
- IsPublic(),
117
+ AllowActions([
118
+ [
119
+ BaseResource.ARTICLE,
120
+ BaseAction.CREATE
121
+ ]
122
+ ]),
116
123
  _ts_param(0, MemberId()),
117
124
  _ts_param(1, Args()),
118
125
  _ts_metadata("design:type", Function),
@@ -124,7 +131,12 @@ _ts_decorate([
124
131
  ], ArticleMutations.prototype, "createArticle", null);
125
132
  _ts_decorate([
126
133
  Mutation(()=>BackstageArticleDto),
127
- IsPublic(),
134
+ AllowActions([
135
+ [
136
+ BaseResource.ARTICLE,
137
+ BaseAction.UPDATE
138
+ ]
139
+ ]),
128
140
  _ts_param(0, MemberId()),
129
141
  _ts_param(1, Args()),
130
142
  _ts_metadata("design:type", Function),
@@ -136,7 +148,12 @@ _ts_decorate([
136
148
  ], ArticleMutations.prototype, "updateArticle", null);
137
149
  _ts_decorate([
138
150
  Mutation(()=>Boolean),
139
- IsPublic(),
151
+ AllowActions([
152
+ [
153
+ BaseResource.ARTICLE,
154
+ BaseAction.DELETE
155
+ ]
156
+ ]),
140
157
  _ts_param(0, Args('id', {
141
158
  type: ()=>ID
142
159
  })),
@@ -148,7 +165,12 @@ _ts_decorate([
148
165
  ], ArticleMutations.prototype, "deleteArticle", null);
149
166
  _ts_decorate([
150
167
  Mutation(()=>Boolean),
151
- IsPublic(),
168
+ AllowActions([
169
+ [
170
+ BaseResource.ARTICLE,
171
+ BaseAction.DELETE_VERSION
172
+ ]
173
+ ]),
152
174
  _ts_param(0, Args('id', {
153
175
  type: ()=>ID
154
176
  })),
@@ -164,7 +186,12 @@ _ts_decorate([
164
186
  ], ArticleMutations.prototype, "deleteArticleVersion", null);
165
187
  _ts_decorate([
166
188
  Mutation(()=>BackstageArticleDto),
167
- IsPublic(),
189
+ AllowActions([
190
+ [
191
+ BaseResource.ARTICLE,
192
+ BaseAction.SUBMIT
193
+ ]
194
+ ]),
168
195
  _ts_param(0, MemberId()),
169
196
  _ts_param(1, Args('id', {
170
197
  type: ()=>ID
@@ -178,7 +205,12 @@ _ts_decorate([
178
205
  ], ArticleMutations.prototype, "submitArticle", null);
179
206
  _ts_decorate([
180
207
  Mutation(()=>BackstageArticleDto),
181
- IsPublic(),
208
+ AllowActions([
209
+ [
210
+ BaseResource.ARTICLE,
211
+ BaseAction.PUT_BACK
212
+ ]
213
+ ]),
182
214
  _ts_param(0, MemberId()),
183
215
  _ts_param(1, Args('id', {
184
216
  type: ()=>ID
@@ -192,7 +224,12 @@ _ts_decorate([
192
224
  ], ArticleMutations.prototype, "putBackArticle", null);
193
225
  _ts_decorate([
194
226
  Mutation(()=>BackstageArticleDto),
195
- IsPublic(),
227
+ AllowActions([
228
+ [
229
+ BaseResource.ARTICLE,
230
+ BaseAction.APPROVE
231
+ ]
232
+ ]),
196
233
  _ts_param(0, Args('id', {
197
234
  type: ()=>ID
198
235
  })),
@@ -209,7 +246,12 @@ _ts_decorate([
209
246
  ], ArticleMutations.prototype, "approveArticle", null);
210
247
  _ts_decorate([
211
248
  Mutation(()=>BackstageArticleDto),
212
- IsPublic(),
249
+ AllowActions([
250
+ [
251
+ BaseResource.ARTICLE,
252
+ BaseAction.REJECT
253
+ ]
254
+ ]),
213
255
  _ts_param(0, Args('id', {
214
256
  type: ()=>ID
215
257
  })),
@@ -226,7 +268,12 @@ _ts_decorate([
226
268
  ], ArticleMutations.prototype, "rejectArticle", null);
227
269
  _ts_decorate([
228
270
  Mutation(()=>BackstageArticleDto),
229
- IsPublic(),
271
+ AllowActions([
272
+ [
273
+ BaseResource.ARTICLE,
274
+ BaseAction.RELEASE
275
+ ]
276
+ ]),
230
277
  _ts_param(0, MemberId()),
231
278
  _ts_param(1, Args('id', {
232
279
  type: ()=>ID
@@ -249,7 +296,12 @@ _ts_decorate([
249
296
  ], ArticleMutations.prototype, "releaseArticle", null);
250
297
  _ts_decorate([
251
298
  Mutation(()=>BackstageArticleDto),
252
- IsPublic(),
299
+ AllowActions([
300
+ [
301
+ BaseResource.ARTICLE,
302
+ BaseAction.WITHDRAW
303
+ ]
304
+ ]),
253
305
  _ts_param(0, Args('id', {
254
306
  type: ()=>ID
255
307
  })),
@@ -3,8 +3,10 @@ import { CreateCategoryArgs } from '../dto/create-category.args';
3
3
  import { BackstageCategoryDto } from '../dto/backstage-category.dto';
4
4
  import { UpdateCategoryArgs } from '../dto/update-category.args';
5
5
  export declare class CategoryMutations {
6
+ private readonly multiLanguage;
6
7
  private readonly categoryService;
7
- constructor(categoryService: CategoryBaseService);
8
+ constructor(multiLanguage: boolean, categoryService: CategoryBaseService);
9
+ private resolveCreateCategoryArgs;
8
10
  createCategory(args: CreateCategoryArgs): Promise<BackstageCategoryDto>;
9
11
  updateCategory(args: UpdateCategoryArgs): Promise<BackstageCategoryDto>;
10
12
  deleteCategory(id: string): Promise<boolean>;
@@ -1,9 +1,12 @@
1
1
  import { Mutation, Args, ID, Resolver } from '@nestjs/graphql';
2
- import { CategoryBaseService } from '@rytass/cms-base-nestjs-module';
2
+ import { MULTIPLE_LANGUAGE_MODE, CategoryBaseService } from '@rytass/cms-base-nestjs-module';
3
3
  import { CreateCategoryArgs } from '../dto/create-category.args.js';
4
- import { IsPublic } from '@rytass/member-base-nestjs-module';
4
+ import { AllowActions } from '@rytass/member-base-nestjs-module';
5
5
  import { BackstageCategoryDto } from '../dto/backstage-category.dto.js';
6
6
  import { UpdateCategoryArgs } from '../dto/update-category.args.js';
7
+ import { Inject } from '@nestjs/common';
8
+ import { BaseAction } from '../constants/enum/base-action.enum.js';
9
+ import { BaseResource } from '../constants/enum/base-resource.enum.js';
7
10
 
8
11
  function _ts_decorate(decorators, target, key, desc) {
9
12
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -20,26 +23,40 @@ function _ts_param(paramIndex, decorator) {
20
23
  };
21
24
  }
22
25
  class CategoryMutations {
26
+ multiLanguage;
23
27
  categoryService;
24
- constructor(categoryService){
28
+ constructor(multiLanguage, categoryService){
29
+ this.multiLanguage = multiLanguage;
25
30
  this.categoryService = categoryService;
26
31
  }
32
+ resolveCreateCategoryArgs(args) {
33
+ const basePayload = {
34
+ parentIds: args.parentIds
35
+ };
36
+ if (!this.multiLanguage) {
37
+ const [content] = args.multiLanguageNames;
38
+ return {
39
+ ...basePayload,
40
+ name: content.name
41
+ };
42
+ }
43
+ const multiLanguageNames = Object.fromEntries(args.multiLanguageNames.map((name)=>[
44
+ name.language,
45
+ name.name
46
+ ]));
47
+ return {
48
+ ...basePayload,
49
+ multiLanguageNames
50
+ };
51
+ }
27
52
  createCategory(args) {
28
53
  return this.categoryService.create({
29
- ...args,
30
- multiLanguageNames: Object.fromEntries(args.multiLanguageNames.map((name)=>[
31
- name.language,
32
- name.name
33
- ]))
54
+ ...this.resolveCreateCategoryArgs(args)
34
55
  });
35
56
  }
36
57
  updateCategory(args) {
37
58
  return this.categoryService.update(args.id, {
38
- ...args,
39
- multiLanguageNames: Object.fromEntries(args.multiLanguageNames.map((name)=>[
40
- name.language,
41
- name.name
42
- ]))
59
+ ...this.resolveCreateCategoryArgs(args)
43
60
  });
44
61
  }
45
62
  async deleteCategory(id) {
@@ -49,7 +66,12 @@ class CategoryMutations {
49
66
  }
50
67
  _ts_decorate([
51
68
  Mutation(()=>BackstageCategoryDto),
52
- IsPublic(),
69
+ AllowActions([
70
+ [
71
+ BaseResource.CATEGORY,
72
+ BaseAction.CREATE
73
+ ]
74
+ ]),
53
75
  _ts_param(0, Args()),
54
76
  _ts_metadata("design:type", Function),
55
77
  _ts_metadata("design:paramtypes", [
@@ -59,7 +81,12 @@ _ts_decorate([
59
81
  ], CategoryMutations.prototype, "createCategory", null);
60
82
  _ts_decorate([
61
83
  Mutation(()=>BackstageCategoryDto),
62
- IsPublic(),
84
+ AllowActions([
85
+ [
86
+ BaseResource.CATEGORY,
87
+ BaseAction.UPDATE
88
+ ]
89
+ ]),
63
90
  _ts_param(0, Args()),
64
91
  _ts_metadata("design:type", Function),
65
92
  _ts_metadata("design:paramtypes", [
@@ -69,7 +96,12 @@ _ts_decorate([
69
96
  ], CategoryMutations.prototype, "updateCategory", null);
70
97
  _ts_decorate([
71
98
  Mutation(()=>Boolean),
72
- IsPublic(),
99
+ AllowActions([
100
+ [
101
+ BaseResource.CATEGORY,
102
+ BaseAction.DELETE
103
+ ]
104
+ ]),
73
105
  _ts_param(0, Args('id', {
74
106
  type: ()=>ID
75
107
  })),
@@ -81,8 +113,10 @@ _ts_decorate([
81
113
  ], CategoryMutations.prototype, "deleteCategory", null);
82
114
  CategoryMutations = _ts_decorate([
83
115
  Resolver(),
116
+ _ts_param(0, Inject(MULTIPLE_LANGUAGE_MODE)),
84
117
  _ts_metadata("design:type", Function),
85
118
  _ts_metadata("design:paramtypes", [
119
+ Boolean,
86
120
  typeof CategoryBaseService === "undefined" ? Object : CategoryBaseService
87
121
  ])
88
122
  ], CategoryMutations);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytass/cms-base-nestjs-graphql-module",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "Rytass Content Management System NestJS Base GraphQL Module",
5
5
  "keywords": [
6
6
  "rytass",
@@ -26,7 +26,7 @@
26
26
  "typeorm": "*"
27
27
  },
28
28
  "dependencies": {
29
- "@rytass/cms-base-nestjs-module": "^0.1.94",
29
+ "@rytass/cms-base-nestjs-module": "^0.1.95",
30
30
  "@rytass/member-base-nestjs-module": "^0.1.65",
31
31
  "dataloader": "^2.2.2",
32
32
  "lru-cache": "^11.0.2"
@@ -1,7 +1,7 @@
1
1
  import { Query, Args, ID, Int, Resolver } from '@nestjs/graphql';
2
2
  import { MULTIPLE_LANGUAGE_MODE, ArticleBaseService, ArticleStage, DEFAULT_LANGUAGE } from '@rytass/cms-base-nestjs-module';
3
3
  import { ArticlesArgs } from '../dto/articles.args.js';
4
- import { IsPublic } from '@rytass/member-base-nestjs-module';
4
+ import { IsPublic, AllowActions } from '@rytass/member-base-nestjs-module';
5
5
  import { Language } from '../decorators/language.decorator.js';
6
6
  import { ArticleCollectionDto } from '../dto/article-collection.dto.js';
7
7
  import { ArticleDto } from '../dto/article.dto.js';
@@ -9,6 +9,8 @@ import { BackstageArticleDto } from '../dto/backstage-article.dto.js';
9
9
  import { BackstageArticleCollectionDto } from '../dto/backstage-article-collection.dto.js';
10
10
  import { Inject } from '@nestjs/common';
11
11
  import { BackstageArticleArgs } from '../dto/backstage-article.args.js';
12
+ import { BaseAction } from '../constants/enum/base-action.enum.js';
13
+ import { BaseResource } from '../constants/enum/base-resource.enum.js';
12
14
 
13
15
  function _ts_decorate(decorators, target, key, desc) {
14
16
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -81,7 +83,12 @@ _ts_decorate([
81
83
  ], ArticleQueries.prototype, "articles", null);
82
84
  _ts_decorate([
83
85
  Query(()=>BackstageArticleDto),
84
- IsPublic(),
86
+ AllowActions([
87
+ [
88
+ BaseResource.ARTICLE,
89
+ BaseAction.READ
90
+ ]
91
+ ]),
85
92
  _ts_param(0, Args('id', {
86
93
  type: ()=>ID
87
94
  })),
@@ -98,7 +105,12 @@ _ts_decorate([
98
105
  ], ArticleQueries.prototype, "backstageArticle", null);
99
106
  _ts_decorate([
100
107
  Query(()=>BackstageArticleCollectionDto),
101
- IsPublic(),
108
+ AllowActions([
109
+ [
110
+ BaseResource.ARTICLE,
111
+ BaseAction.LIST
112
+ ]
113
+ ]),
102
114
  _ts_param(0, Args()),
103
115
  _ts_metadata("design:type", Function),
104
116
  _ts_metadata("design:paramtypes", [
@@ -3,8 +3,9 @@ import { CategoriesArgs } from '../dto/categories.args';
3
3
  import { CategoryDto } from '../dto/category.dto';
4
4
  import { BackstageCategoryDto } from '../dto/backstage-category.dto';
5
5
  export declare class CategoryQueries {
6
+ private readonly multiLanguage;
6
7
  private readonly categoryService;
7
- constructor(categoryService: CategoryBaseService);
8
+ constructor(multiLanguage: boolean, categoryService: CategoryBaseService);
8
9
  category(id: string, language?: string): Promise<CategoryDto>;
9
10
  categories(args: CategoriesArgs, language?: string): Promise<CategoryDto[]>;
10
11
  backstageCategory(id: string): Promise<BackstageCategoryDto>;
@@ -1,10 +1,13 @@
1
1
  import { Query, Args, ID, Resolver } from '@nestjs/graphql';
2
- import { CategoryBaseService, DEFAULT_LANGUAGE } from '@rytass/cms-base-nestjs-module';
2
+ import { MULTIPLE_LANGUAGE_MODE, CategoryBaseService, DEFAULT_LANGUAGE } from '@rytass/cms-base-nestjs-module';
3
3
  import { CategoriesArgs } from '../dto/categories.args.js';
4
- import { IsPublic } from '@rytass/member-base-nestjs-module';
4
+ import { IsPublic, AllowActions } from '@rytass/member-base-nestjs-module';
5
5
  import { CategoryDto } from '../dto/category.dto.js';
6
6
  import { Language } from '../decorators/language.decorator.js';
7
7
  import { BackstageCategoryDto } from '../dto/backstage-category.dto.js';
8
+ import { Inject } from '@nestjs/common';
9
+ import { BaseAction } from '../constants/enum/base-action.enum.js';
10
+ import { BaseResource } from '../constants/enum/base-resource.enum.js';
8
11
 
9
12
  function _ts_decorate(decorators, target, key, desc) {
10
13
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -21,17 +24,22 @@ function _ts_param(paramIndex, decorator) {
21
24
  };
22
25
  }
23
26
  class CategoryQueries {
27
+ multiLanguage;
24
28
  categoryService;
25
- constructor(categoryService){
29
+ constructor(multiLanguage, categoryService){
30
+ this.multiLanguage = multiLanguage;
26
31
  this.categoryService = categoryService;
27
32
  }
28
- category(id, language = DEFAULT_LANGUAGE) {
29
- return this.categoryService.findById(id, language);
33
+ async category(id, language = DEFAULT_LANGUAGE) {
34
+ if (this.multiLanguage) {
35
+ return this.categoryService.findById(id, language);
36
+ }
37
+ return this.categoryService.findById(id);
30
38
  }
31
39
  categories(args, language = DEFAULT_LANGUAGE) {
32
40
  return this.categoryService.findAll({
33
41
  ...args,
34
- language
42
+ language: this.multiLanguage ? language : null
35
43
  });
36
44
  }
37
45
  backstageCategory(id) {
@@ -53,7 +61,7 @@ _ts_decorate([
53
61
  String,
54
62
  String
55
63
  ]),
56
- _ts_metadata("design:returntype", typeof Promise === "undefined" ? Object : Promise)
64
+ _ts_metadata("design:returntype", Promise)
57
65
  ], CategoryQueries.prototype, "category", null);
58
66
  _ts_decorate([
59
67
  Query(()=>[
@@ -71,7 +79,12 @@ _ts_decorate([
71
79
  ], CategoryQueries.prototype, "categories", null);
72
80
  _ts_decorate([
73
81
  Query(()=>BackstageCategoryDto),
74
- IsPublic(),
82
+ AllowActions([
83
+ [
84
+ BaseResource.CATEGORY,
85
+ BaseAction.READ
86
+ ]
87
+ ]),
75
88
  _ts_param(0, Args('id', {
76
89
  type: ()=>ID
77
90
  })),
@@ -85,7 +98,12 @@ _ts_decorate([
85
98
  Query(()=>[
86
99
  BackstageCategoryDto
87
100
  ]),
88
- IsPublic(),
101
+ AllowActions([
102
+ [
103
+ BaseResource.CATEGORY,
104
+ BaseAction.LIST
105
+ ]
106
+ ]),
89
107
  _ts_param(0, Args()),
90
108
  _ts_metadata("design:type", Function),
91
109
  _ts_metadata("design:paramtypes", [
@@ -95,8 +113,10 @@ _ts_decorate([
95
113
  ], CategoryQueries.prototype, "backstageCategories", null);
96
114
  CategoryQueries = _ts_decorate([
97
115
  Resolver(),
116
+ _ts_param(0, Inject(MULTIPLE_LANGUAGE_MODE)),
98
117
  _ts_metadata("design:type", Function),
99
118
  _ts_metadata("design:paramtypes", [
119
+ Boolean,
100
120
  typeof CategoryBaseService === "undefined" ? Object : CategoryBaseService
101
121
  ])
102
122
  ], CategoryQueries);
@@ -1,7 +1,7 @@
1
1
  import { ResolveField, Root, Resolver } from '@nestjs/graphql';
2
2
  import { ArticleSignatureDto } from '../dto/article-signature.dto.js';
3
3
  import { UserDto } from '../dto/user.dto.js';
4
- import { IsPublic } from '@rytass/member-base-nestjs-module';
4
+ import { Authenticated } from '@rytass/member-base-nestjs-module';
5
5
  import { MemberDataLoader } from '../data-loaders/members.dataloader.js';
6
6
  import { ArticleSignatureEntity, DEFAULT_SIGNATURE_LEVEL } from '@rytass/cms-base-nestjs-module';
7
7
  import { ArticleSignatureStepDto } from '../dto/article-signature-step.dto.js';
@@ -39,7 +39,7 @@ _ts_decorate([
39
39
  ResolveField(()=>UserDto, {
40
40
  nullable: true
41
41
  }),
42
- IsPublic(),
42
+ Authenticated(),
43
43
  _ts_param(0, Root()),
44
44
  _ts_metadata("design:type", Function),
45
45
  _ts_metadata("design:paramtypes", [
@@ -49,7 +49,7 @@ _ts_decorate([
49
49
  ], ArticleSignatureResolver.prototype, "signer", null);
50
50
  _ts_decorate([
51
51
  ResolveField(()=>ArticleSignatureStepDto),
52
- IsPublic(),
52
+ Authenticated(),
53
53
  _ts_param(0, Root()),
54
54
  _ts_metadata("design:type", Function),
55
55
  _ts_metadata("design:paramtypes", [
@@ -1,7 +1,7 @@
1
1
  import { ResolveField, ID, Root, Resolver } from '@nestjs/graphql';
2
2
  import { MemberDataLoader } from '../data-loaders/members.dataloader.js';
3
3
  import { UserDto } from '../dto/user.dto.js';
4
- import { IsPublic } from '@rytass/member-base-nestjs-module';
4
+ import { Authenticated } from '@rytass/member-base-nestjs-module';
5
5
  import { ArticleStage, MULTIPLE_LANGUAGE_MODE, ArticleVersionDataLoader, ArticleDataLoader as ArticleDataLoader$1, ArticleSignatureDataLoader, DEFAULT_LANGUAGE } from '@rytass/cms-base-nestjs-module';
6
6
  import { CategoryDto } from '../dto/category.dto.js';
7
7
  import { ArticleDataLoader } from '../data-loaders/article.dataloader.js';
@@ -123,7 +123,7 @@ class BackstageArticleResolver {
123
123
  }
124
124
  _ts_decorate([
125
125
  ResolveField(()=>ID),
126
- IsPublic(),
126
+ Authenticated(),
127
127
  _ts_param(0, Root()),
128
128
  _ts_metadata("design:type", Function),
129
129
  _ts_metadata("design:paramtypes", [
@@ -133,7 +133,7 @@ _ts_decorate([
133
133
  ], BackstageArticleResolver.prototype, "id", null);
134
134
  _ts_decorate([
135
135
  ResolveField(()=>String),
136
- IsPublic(),
136
+ Authenticated(),
137
137
  _ts_param(0, Root()),
138
138
  _ts_metadata("design:type", Function),
139
139
  _ts_metadata("design:paramtypes", [
@@ -145,7 +145,7 @@ _ts_decorate([
145
145
  ResolveField(()=>UserDto, {
146
146
  nullable: true
147
147
  }),
148
- IsPublic(),
148
+ Authenticated(),
149
149
  _ts_param(0, Root()),
150
150
  _ts_metadata("design:type", Function),
151
151
  _ts_metadata("design:paramtypes", [
@@ -157,7 +157,7 @@ _ts_decorate([
157
157
  ResolveField(()=>UserDto, {
158
158
  nullable: true
159
159
  }),
160
- IsPublic(),
160
+ Authenticated(),
161
161
  _ts_param(0, Root()),
162
162
  _ts_metadata("design:type", Function),
163
163
  _ts_metadata("design:paramtypes", [
@@ -169,7 +169,7 @@ _ts_decorate([
169
169
  ResolveField(()=>UserDto, {
170
170
  nullable: true
171
171
  }),
172
- IsPublic(),
172
+ Authenticated(),
173
173
  _ts_param(0, Root()),
174
174
  _ts_metadata("design:type", Function),
175
175
  _ts_metadata("design:paramtypes", [
@@ -181,7 +181,7 @@ _ts_decorate([
181
181
  ResolveField(()=>[
182
182
  CategoryDto
183
183
  ]),
184
- IsPublic(),
184
+ Authenticated(),
185
185
  _ts_param(0, Root()),
186
186
  _ts_param(1, Language()),
187
187
  _ts_metadata("design:type", Function),
@@ -193,7 +193,7 @@ _ts_decorate([
193
193
  ], BackstageArticleResolver.prototype, "categories", null);
194
194
  _ts_decorate([
195
195
  ResolveField(()=>String),
196
- IsPublic(),
196
+ Authenticated(),
197
197
  _ts_param(0, Root()),
198
198
  _ts_metadata("design:type", Function),
199
199
  _ts_metadata("design:paramtypes", [
@@ -205,7 +205,7 @@ _ts_decorate([
205
205
  ResolveField(()=>String, {
206
206
  nullable: true
207
207
  }),
208
- IsPublic(),
208
+ Authenticated(),
209
209
  _ts_param(0, Root()),
210
210
  _ts_metadata("design:type", Function),
211
211
  _ts_metadata("design:paramtypes", [
@@ -215,7 +215,7 @@ _ts_decorate([
215
215
  ], BackstageArticleResolver.prototype, "description", null);
216
216
  _ts_decorate([
217
217
  ResolveField(()=>QuadratsContentScalar),
218
- IsPublic(),
218
+ Authenticated(),
219
219
  _ts_param(0, Root()),
220
220
  _ts_metadata("design:type", Function),
221
221
  _ts_metadata("design:paramtypes", [
@@ -227,7 +227,7 @@ _ts_decorate([
227
227
  ResolveField(()=>[
228
228
  ArticleMultiLanguageContentDto
229
229
  ]),
230
- IsPublic(),
230
+ Authenticated(),
231
231
  _ts_param(0, Root()),
232
232
  _ts_metadata("design:type", Function),
233
233
  _ts_metadata("design:paramtypes", [
@@ -239,7 +239,7 @@ _ts_decorate([
239
239
  ResolveField(()=>[
240
240
  BackstageArticleDto
241
241
  ]),
242
- IsPublic(),
242
+ Authenticated(),
243
243
  _ts_param(0, Root()),
244
244
  _ts_metadata("design:type", Function),
245
245
  _ts_metadata("design:paramtypes", [
@@ -249,7 +249,7 @@ _ts_decorate([
249
249
  ], BackstageArticleResolver.prototype, "versions", null);
250
250
  _ts_decorate([
251
251
  ResolveField(()=>ArticleStage),
252
- IsPublic(),
252
+ Authenticated(),
253
253
  _ts_param(0, Root()),
254
254
  _ts_metadata("design:type", Function),
255
255
  _ts_metadata("design:paramtypes", [
@@ -261,7 +261,7 @@ _ts_decorate([
261
261
  ResolveField(()=>[
262
262
  ArticleSignatureDto
263
263
  ]),
264
- IsPublic(),
264
+ Authenticated(),
265
265
  _ts_param(0, Root()),
266
266
  _ts_metadata("design:type", Function),
267
267
  _ts_metadata("design:paramtypes", [
@@ -271,7 +271,7 @@ _ts_decorate([
271
271
  ], BackstageArticleResolver.prototype, "signatures", null);
272
272
  _ts_decorate([
273
273
  ResolveField(()=>ArticleStageVersionDto),
274
- IsPublic(),
274
+ Authenticated(),
275
275
  _ts_param(0, Root()),
276
276
  _ts_metadata("design:type", Function),
277
277
  _ts_metadata("design:paramtypes", [
@@ -0,0 +1,8 @@
1
+ import { type CategoryBaseDto } from '@rytass/cms-base-nestjs-module';
2
+ import { CategoryMultiLanguageNameDto } from '../dto/category-multi-language-name.dto';
3
+ export declare class BackstageCategoryResolver {
4
+ private readonly multiLanguage;
5
+ constructor(multiLanguage: boolean);
6
+ name(category: CategoryBaseDto): string;
7
+ multiLanguageNames(category: CategoryBaseDto): CategoryMultiLanguageNameDto[];
8
+ }