@rytass/cms-base-nestjs-graphql-module 0.0.2 → 0.0.3

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.
@@ -8,13 +8,17 @@ function _ts_decorate(decorators, target, key, desc) {
8
8
  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;
9
9
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10
10
  }
11
+ function _ts_metadata(k, v) {
12
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
13
+ }
11
14
  class ArticleCollectionDto extends Collection {
12
15
  articles;
13
16
  }
14
17
  _ts_decorate([
15
18
  Field(()=>[
16
19
  BaseArticleDto
17
- ])
20
+ ]),
21
+ _ts_metadata("design:type", Array)
18
22
  ], ArticleCollectionDto.prototype, "articles", void 0);
19
23
  ArticleCollectionDto = _ts_decorate([
20
24
  ObjectType('ArticleCollection')
@@ -0,0 +1,59 @@
1
+ import { Field, Int, ArgsType, registerEnumType } from '@nestjs/graphql';
2
+ import { ArticleStage } from '@rytass/cms-base-nestjs-module';
3
+
4
+ function _ts_decorate(decorators, target, key, desc) {
5
+ var c = arguments.length, r = c < 3 ? target : desc, d;
6
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7
+ 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;
8
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
9
+ }
10
+ function _ts_metadata(k, v) {
11
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
12
+ }
13
+ class ArticlesArgs {
14
+ stage;
15
+ categoryIds;
16
+ offset;
17
+ limit;
18
+ searchTerm;
19
+ }
20
+ _ts_decorate([
21
+ Field(()=>ArticleStage, {
22
+ nullable: true
23
+ }),
24
+ _ts_metadata("design:type", Object)
25
+ ], ArticlesArgs.prototype, "stage", void 0);
26
+ _ts_decorate([
27
+ Field(()=>[
28
+ String
29
+ ], {
30
+ nullable: true
31
+ }),
32
+ _ts_metadata("design:type", Object)
33
+ ], ArticlesArgs.prototype, "categoryIds", void 0);
34
+ _ts_decorate([
35
+ Field(()=>Int, {
36
+ nullable: true
37
+ }),
38
+ _ts_metadata("design:type", Object)
39
+ ], ArticlesArgs.prototype, "offset", void 0);
40
+ _ts_decorate([
41
+ Field(()=>Int, {
42
+ nullable: true
43
+ }),
44
+ _ts_metadata("design:type", Object)
45
+ ], ArticlesArgs.prototype, "limit", void 0);
46
+ _ts_decorate([
47
+ Field(()=>String, {
48
+ nullable: true
49
+ }),
50
+ _ts_metadata("design:type", Object)
51
+ ], ArticlesArgs.prototype, "searchTerm", void 0);
52
+ ArticlesArgs = _ts_decorate([
53
+ ArgsType()
54
+ ], ArticlesArgs);
55
+ registerEnumType(ArticleStage, {
56
+ name: 'ArticleStage'
57
+ });
58
+
59
+ export { ArticlesArgs };
@@ -6,21 +6,27 @@ function _ts_decorate(decorators, target, key, desc) {
6
6
  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;
7
7
  return c > 3 && r && Object.defineProperty(target, key, r), r;
8
8
  }
9
+ function _ts_metadata(k, v) {
10
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ }
9
12
  class BaseArticleDto {
10
13
  id;
11
14
  tags;
12
15
  createdAt;
13
16
  }
14
17
  _ts_decorate([
15
- Field(()=>ID)
18
+ Field(()=>ID),
19
+ _ts_metadata("design:type", String)
16
20
  ], BaseArticleDto.prototype, "id", void 0);
17
21
  _ts_decorate([
18
22
  Field(()=>[
19
23
  String
20
- ])
24
+ ]),
25
+ _ts_metadata("design:type", Array)
21
26
  ], BaseArticleDto.prototype, "tags", void 0);
22
27
  _ts_decorate([
23
- Field(()=>Date)
28
+ Field(()=>Date),
29
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
24
30
  ], BaseArticleDto.prototype, "createdAt", void 0);
25
31
  BaseArticleDto = _ts_decorate([
26
32
  InterfaceType('BaseArticle')
@@ -6,11 +6,15 @@ function _ts_decorate(decorators, target, key, desc) {
6
6
  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;
7
7
  return c > 3 && r && Object.defineProperty(target, key, r), r;
8
8
  }
9
+ function _ts_metadata(k, v) {
10
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ }
9
12
  class BaseCategoryDto {
10
13
  id;
11
14
  }
12
15
  _ts_decorate([
13
- Field(()=>ID)
16
+ Field(()=>ID),
17
+ _ts_metadata("design:type", String)
14
18
  ], BaseCategoryDto.prototype, "id", void 0);
15
19
  BaseCategoryDto = _ts_decorate([
16
20
  InterfaceType('BaseCategory')
@@ -0,0 +1,43 @@
1
+ import { Field, ArgsType } from '@nestjs/graphql';
2
+
3
+ function _ts_decorate(decorators, target, key, desc) {
4
+ var c = arguments.length, r = c < 3 ? target : desc, d;
5
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6
+ 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;
7
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8
+ }
9
+ function _ts_metadata(k, v) {
10
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ }
12
+ class CategoriesArgs {
13
+ parentIds;
14
+ ids;
15
+ searchTerm;
16
+ }
17
+ _ts_decorate([
18
+ Field(()=>[
19
+ String
20
+ ], {
21
+ nullable: true
22
+ }),
23
+ _ts_metadata("design:type", Object)
24
+ ], CategoriesArgs.prototype, "parentIds", void 0);
25
+ _ts_decorate([
26
+ Field(()=>[
27
+ String
28
+ ], {
29
+ nullable: true
30
+ }),
31
+ _ts_metadata("design:type", Object)
32
+ ], CategoriesArgs.prototype, "ids", void 0);
33
+ _ts_decorate([
34
+ Field(()=>String, {
35
+ nullable: true
36
+ }),
37
+ _ts_metadata("design:type", Object)
38
+ ], CategoriesArgs.prototype, "searchTerm", void 0);
39
+ CategoriesArgs = _ts_decorate([
40
+ ArgsType()
41
+ ], CategoriesArgs);
42
+
43
+ export { CategoriesArgs };
@@ -6,19 +6,25 @@ function _ts_decorate(decorators, target, key, desc) {
6
6
  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;
7
7
  return c > 3 && r && Object.defineProperty(target, key, r), r;
8
8
  }
9
+ function _ts_metadata(k, v) {
10
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ }
9
12
  class Collection {
10
13
  total;
11
14
  offset;
12
15
  limit;
13
16
  }
14
17
  _ts_decorate([
15
- Field(()=>Int)
18
+ Field(()=>Int),
19
+ _ts_metadata("design:type", Number)
16
20
  ], Collection.prototype, "total", void 0);
17
21
  _ts_decorate([
18
- Field(()=>Int)
22
+ Field(()=>Int),
23
+ _ts_metadata("design:type", Number)
19
24
  ], Collection.prototype, "offset", void 0);
20
25
  _ts_decorate([
21
- Field(()=>Int)
26
+ Field(()=>Int),
27
+ _ts_metadata("design:type", Number)
22
28
  ], Collection.prototype, "limit", void 0);
23
29
  Collection = _ts_decorate([
24
30
  ObjectType('Collection')
@@ -0,0 +1,89 @@
1
+ import { Field, ID, ArgsType, InputType } from '@nestjs/graphql';
2
+
3
+ function _ts_decorate(decorators, target, key, desc) {
4
+ var c = arguments.length, r = c < 3 ? target : desc, d;
5
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6
+ 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;
7
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8
+ }
9
+ function _ts_metadata(k, v) {
10
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ }
12
+ class CreateArticleArgs {
13
+ categoryIds;
14
+ tags;
15
+ multiLanguageContents;
16
+ releasedAt;
17
+ submitted;
18
+ signatureLevel;
19
+ }
20
+ _ts_decorate([
21
+ Field(()=>[
22
+ ID
23
+ ]),
24
+ _ts_metadata("design:type", Array)
25
+ ], CreateArticleArgs.prototype, "categoryIds", void 0);
26
+ _ts_decorate([
27
+ Field(()=>[
28
+ String
29
+ ]),
30
+ _ts_metadata("design:type", Array)
31
+ ], CreateArticleArgs.prototype, "tags", void 0);
32
+ _ts_decorate([
33
+ Field(()=>[
34
+ ArticleVersionContentInput
35
+ ]),
36
+ _ts_metadata("design:type", Array)
37
+ ], CreateArticleArgs.prototype, "multiLanguageContents", void 0);
38
+ _ts_decorate([
39
+ Field(()=>Date, {
40
+ nullable: true
41
+ }),
42
+ _ts_metadata("design:type", Object)
43
+ ], CreateArticleArgs.prototype, "releasedAt", void 0);
44
+ _ts_decorate([
45
+ Field(()=>Boolean, {
46
+ nullable: true
47
+ }),
48
+ _ts_metadata("design:type", Object)
49
+ ], CreateArticleArgs.prototype, "submitted", void 0);
50
+ _ts_decorate([
51
+ Field(()=>String, {
52
+ nullable: true
53
+ }),
54
+ _ts_metadata("design:type", Object)
55
+ ], CreateArticleArgs.prototype, "signatureLevel", void 0);
56
+ CreateArticleArgs = _ts_decorate([
57
+ ArgsType()
58
+ ], CreateArticleArgs);
59
+ class ArticleVersionContentInput {
60
+ language;
61
+ title;
62
+ description;
63
+ content;
64
+ }
65
+ _ts_decorate([
66
+ Field(()=>String, {
67
+ nullable: true
68
+ }),
69
+ _ts_metadata("design:type", Object)
70
+ ], ArticleVersionContentInput.prototype, "language", void 0);
71
+ _ts_decorate([
72
+ Field(()=>String),
73
+ _ts_metadata("design:type", String)
74
+ ], ArticleVersionContentInput.prototype, "title", void 0);
75
+ _ts_decorate([
76
+ Field(()=>String, {
77
+ nullable: true
78
+ }),
79
+ _ts_metadata("design:type", Object)
80
+ ], ArticleVersionContentInput.prototype, "description", void 0);
81
+ _ts_decorate([
82
+ Field(()=>String),
83
+ _ts_metadata("design:type", String)
84
+ ], ArticleVersionContentInput.prototype, "content", void 0);
85
+ ArticleVersionContentInput = _ts_decorate([
86
+ InputType()
87
+ ], ArticleVersionContentInput);
88
+
89
+ export { ArticleVersionContentInput, CreateArticleArgs };
@@ -0,0 +1,61 @@
1
+ import { Field, ID, ArgsType, InputType } from '@nestjs/graphql';
2
+
3
+ function _ts_decorate(decorators, target, key, desc) {
4
+ var c = arguments.length, r = c < 3 ? target : desc, d;
5
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6
+ 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;
7
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8
+ }
9
+ function _ts_metadata(k, v) {
10
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ }
12
+ class CreateCategoryArgs {
13
+ parentIds;
14
+ multiLanguageNames;
15
+ }
16
+ _ts_decorate([
17
+ Field(()=>[
18
+ ID
19
+ ], {
20
+ nullable: true
21
+ }),
22
+ _ts_metadata("design:type", Object)
23
+ ], CreateCategoryArgs.prototype, "parentIds", void 0);
24
+ _ts_decorate([
25
+ Field(()=>[
26
+ CategoryMultiLanguageNameInput
27
+ ]),
28
+ _ts_metadata("design:type", Array)
29
+ ], CreateCategoryArgs.prototype, "multiLanguageNames", void 0);
30
+ CreateCategoryArgs = _ts_decorate([
31
+ ArgsType()
32
+ ], CreateCategoryArgs);
33
+ class CategoryMultiLanguageNameInput {
34
+ language;
35
+ name;
36
+ }
37
+ _ts_decorate([
38
+ Field(()=>String, {
39
+ nullable: true
40
+ }),
41
+ _ts_metadata("design:type", Object)
42
+ ], CategoryMultiLanguageNameInput.prototype, "language", void 0);
43
+ _ts_decorate([
44
+ Field(()=>String),
45
+ _ts_metadata("design:type", String)
46
+ ], CategoryMultiLanguageNameInput.prototype, "name", void 0);
47
+ CategoryMultiLanguageNameInput = _ts_decorate([
48
+ InputType()
49
+ ], CategoryMultiLanguageNameInput);
50
+ class UpdateCategoryArgs extends CreateCategoryArgs {
51
+ id;
52
+ }
53
+ _ts_decorate([
54
+ Field(()=>ID),
55
+ _ts_metadata("design:type", String)
56
+ ], UpdateCategoryArgs.prototype, "id", void 0);
57
+ UpdateCategoryArgs = _ts_decorate([
58
+ ArgsType()
59
+ ], UpdateCategoryArgs);
60
+
61
+ export { CategoryMultiLanguageNameInput, CreateCategoryArgs, UpdateCategoryArgs };
@@ -0,0 +1,24 @@
1
+ import { Field, ID, ArgsType } from '@nestjs/graphql';
2
+ import { CreateArticleArgs } from './create-article.args.js';
3
+
4
+ function _ts_decorate(decorators, target, key, desc) {
5
+ var c = arguments.length, r = c < 3 ? target : desc, d;
6
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7
+ 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;
8
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
9
+ }
10
+ function _ts_metadata(k, v) {
11
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
12
+ }
13
+ class UpdateArticleArgs extends CreateArticleArgs {
14
+ id;
15
+ }
16
+ _ts_decorate([
17
+ Field(()=>ID),
18
+ _ts_metadata("design:type", String)
19
+ ], UpdateArticleArgs.prototype, "id", void 0);
20
+ UpdateArticleArgs = _ts_decorate([
21
+ ArgsType()
22
+ ], UpdateArticleArgs);
23
+
24
+ export { UpdateArticleArgs };