@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
|
@@ -4,8 +4,6 @@ import { ArticleMutations } from './mutations/article.mutations.js';
|
|
|
4
4
|
import { CategoryMutations } from './mutations/category.mutations.js';
|
|
5
5
|
import { ArticleQueries } from './queries/article.queries.js';
|
|
6
6
|
import { CategoryQueries } from './queries/category.queries.js';
|
|
7
|
-
import { ArticleResolver } from './resolvers/article.resolver.js';
|
|
8
|
-
import { ArticleBackstageResolver } from './resolvers/article-backstage.resolver.js';
|
|
9
7
|
|
|
10
8
|
function _ts_decorate(decorators, target, key, desc) {
|
|
11
9
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -27,8 +25,6 @@ class CMSBaseGraphQLModule {
|
|
|
27
25
|
providers: [
|
|
28
26
|
ArticleQueries,
|
|
29
27
|
ArticleMutations,
|
|
30
|
-
ArticleResolver,
|
|
31
|
-
ArticleBackstageResolver,
|
|
32
28
|
CategoryQueries,
|
|
33
29
|
CategoryMutations
|
|
34
30
|
]
|
|
@@ -46,8 +42,6 @@ class CMSBaseGraphQLModule {
|
|
|
46
42
|
providers: [
|
|
47
43
|
ArticleQueries,
|
|
48
44
|
ArticleMutations,
|
|
49
|
-
ArticleResolver,
|
|
50
|
-
ArticleBackstageResolver,
|
|
51
45
|
CategoryQueries,
|
|
52
46
|
CategoryMutations
|
|
53
47
|
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
|
+
import { Collection } from './collection.dto.js';
|
|
3
|
+
import { ArticleBackstageDto } from './article-backstage.dto.js';
|
|
4
|
+
|
|
5
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
}
|
|
11
|
+
function _ts_metadata(k, v) {
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
13
|
+
}
|
|
14
|
+
class ArticleBackstageCollectionDto extends Collection {
|
|
15
|
+
articles;
|
|
16
|
+
}
|
|
17
|
+
_ts_decorate([
|
|
18
|
+
Field(()=>[
|
|
19
|
+
ArticleBackstageDto
|
|
20
|
+
]),
|
|
21
|
+
_ts_metadata("design:type", Array)
|
|
22
|
+
], ArticleBackstageCollectionDto.prototype, "articles", void 0);
|
|
23
|
+
ArticleBackstageCollectionDto = _ts_decorate([
|
|
24
|
+
ObjectType('ArticleBackstageCollection')
|
|
25
|
+
], ArticleBackstageCollectionDto);
|
|
26
|
+
|
|
27
|
+
export { ArticleBackstageCollectionDto };
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import { ObjectType } from '@nestjs/graphql';
|
|
1
|
+
import { Field, Int, ObjectType } from '@nestjs/graphql';
|
|
2
2
|
import { BaseArticleDto } from './base-article.dto.js';
|
|
3
3
|
|
|
4
4
|
function _ts_decorate(decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length, r = c < 3 ? target : desc
|
|
5
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
6
6
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
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
8
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
9
|
}
|
|
10
|
+
function _ts_metadata(k, v) {
|
|
11
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
12
|
+
}
|
|
10
13
|
class ArticleBackstageDto extends BaseArticleDto {
|
|
14
|
+
version;
|
|
15
|
+
deletedAt;
|
|
11
16
|
}
|
|
17
|
+
_ts_decorate([
|
|
18
|
+
Field(()=>Int),
|
|
19
|
+
_ts_metadata("design:type", Number)
|
|
20
|
+
], ArticleBackstageDto.prototype, "version", void 0);
|
|
21
|
+
_ts_decorate([
|
|
22
|
+
Field(()=>Date, {
|
|
23
|
+
nullable: true
|
|
24
|
+
}),
|
|
25
|
+
_ts_metadata("design:type", Object)
|
|
26
|
+
], ArticleBackstageDto.prototype, "deletedAt", void 0);
|
|
12
27
|
ArticleBackstageDto = _ts_decorate([
|
|
13
|
-
ObjectType('ArticleBackstage'
|
|
14
|
-
implements: [
|
|
15
|
-
BaseArticleDto
|
|
16
|
-
]
|
|
17
|
-
})
|
|
28
|
+
ObjectType('ArticleBackstage')
|
|
18
29
|
], ArticleBackstageDto);
|
|
19
30
|
|
|
20
31
|
export { ArticleBackstageDto };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseArticleDto } from './base-article.dto';
|
|
2
1
|
import { Collection } from './collection.dto';
|
|
2
|
+
import { ArticleDto } from './article.dto';
|
|
3
3
|
export declare class ArticleCollectionDto extends Collection {
|
|
4
|
-
articles:
|
|
4
|
+
articles: ArticleDto[];
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
|
-
import { BaseArticleDto } from './base-article.dto.js';
|
|
3
2
|
import { Collection } from './collection.dto.js';
|
|
3
|
+
import { ArticleDto } from './article.dto.js';
|
|
4
4
|
|
|
5
5
|
function _ts_decorate(decorators, target, key, desc) {
|
|
6
6
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
@@ -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
|
-
|
|
17
|
-
])
|
|
19
|
+
ArticleDto
|
|
20
|
+
]),
|
|
21
|
+
_ts_metadata("design:type", Array)
|
|
18
22
|
], ArticleCollectionDto.prototype, "articles", void 0);
|
|
19
23
|
ArticleCollectionDto = _ts_decorate([
|
|
20
24
|
ObjectType('ArticleCollection')
|
package/dto/article.dto.d.ts
CHANGED
package/dto/article.dto.js
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import { ObjectType } from '@nestjs/graphql';
|
|
1
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
2
|
import { BaseArticleDto } from './base-article.dto.js';
|
|
3
|
+
import { QuadratsContentScalar } from '../quadrats-element.scalar.js';
|
|
3
4
|
|
|
4
5
|
function _ts_decorate(decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length, r = c < 3 ? target : desc
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
6
7
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
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;
|
|
8
9
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
10
|
}
|
|
11
|
+
function _ts_metadata(k, v) {
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
13
|
+
}
|
|
10
14
|
class ArticleDto extends BaseArticleDto {
|
|
15
|
+
title;
|
|
16
|
+
content;
|
|
11
17
|
}
|
|
18
|
+
_ts_decorate([
|
|
19
|
+
Field(()=>String),
|
|
20
|
+
_ts_metadata("design:type", String)
|
|
21
|
+
], ArticleDto.prototype, "title", void 0);
|
|
22
|
+
_ts_decorate([
|
|
23
|
+
Field(()=>QuadratsContentScalar),
|
|
24
|
+
_ts_metadata("design:type", Array)
|
|
25
|
+
], ArticleDto.prototype, "content", void 0);
|
|
12
26
|
ArticleDto = _ts_decorate([
|
|
13
|
-
ObjectType('Article'
|
|
14
|
-
implements: [
|
|
15
|
-
BaseArticleDto
|
|
16
|
-
]
|
|
17
|
-
})
|
|
27
|
+
ObjectType('Article')
|
|
18
28
|
], ArticleDto);
|
|
19
29
|
|
|
20
30
|
export { ArticleDto };
|
|
@@ -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 };
|
package/dto/base-article.dto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Field, ID
|
|
1
|
+
import { Field, ID } from '@nestjs/graphql';
|
|
2
2
|
|
|
3
3
|
function _ts_decorate(decorators, target, key, desc) {
|
|
4
4
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
@@ -6,24 +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
|
-
BaseArticleDto = _ts_decorate([
|
|
26
|
-
InterfaceType('BaseArticle')
|
|
27
|
-
], BaseArticleDto);
|
|
28
31
|
|
|
29
32
|
export { BaseArticleDto };
|
package/dto/base-category.dto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Field, ID
|
|
1
|
+
import { Field, ID } from '@nestjs/graphql';
|
|
2
2
|
|
|
3
3
|
function _ts_decorate(decorators, target, key, desc) {
|
|
4
4
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
@@ -6,14 +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 BaseCategoryDto {
|
|
10
13
|
id;
|
|
14
|
+
createdAt;
|
|
15
|
+
updatedAt;
|
|
11
16
|
}
|
|
12
17
|
_ts_decorate([
|
|
13
|
-
Field(()=>ID)
|
|
18
|
+
Field(()=>ID),
|
|
19
|
+
_ts_metadata("design:type", String)
|
|
14
20
|
], BaseCategoryDto.prototype, "id", void 0);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
_ts_decorate([
|
|
22
|
+
Field(()=>Date),
|
|
23
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
24
|
+
], BaseCategoryDto.prototype, "createdAt", void 0);
|
|
25
|
+
_ts_decorate([
|
|
26
|
+
Field(()=>Date),
|
|
27
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
28
|
+
], BaseCategoryDto.prototype, "updatedAt", void 0);
|
|
18
29
|
|
|
19
30
|
export { BaseCategoryDto };
|
|
@@ -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 };
|
package/dto/category.dto.d.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
|
+
import { BaseCategoryDto } from './base-category.dto.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 CategoryDto extends BaseCategoryDto {
|
|
14
|
+
name;
|
|
15
|
+
}
|
|
16
|
+
_ts_decorate([
|
|
17
|
+
Field(()=>String),
|
|
18
|
+
_ts_metadata("design:type", String)
|
|
19
|
+
], CategoryDto.prototype, "name", void 0);
|
|
20
|
+
CategoryDto = _ts_decorate([
|
|
21
|
+
ObjectType('Category')
|
|
22
|
+
], CategoryDto);
|
|
23
|
+
|
|
24
|
+
export { CategoryDto };
|
package/dto/collection.dto.js
CHANGED
|
@@ -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 };
|