@hed-hog/content 0.0.68 → 0.0.115

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.
@@ -6,17 +6,17 @@ export declare class ContentController {
6
6
  private readonly contentService;
7
7
  constructor(contentService: ContentService);
8
8
  getContentStats(): Promise<{
9
- total: any;
10
- totalPublished: any;
11
- totalDraft: any;
9
+ total: number;
10
+ totalPublished: number;
11
+ totalDraft: number;
12
12
  totalEnabledLanguages: number;
13
13
  }>;
14
14
  getContent(id: number): Promise<{
15
- id: any;
16
- slug: any;
17
- status: any;
18
- created_at: any;
19
- updated_at: any;
15
+ id: number;
16
+ slug: string;
17
+ status: import("@prisma/client").$Enums.content_status_enum;
18
+ created_at: Date;
19
+ updated_at: Date;
20
20
  locales: Record<string, {
21
21
  title: string;
22
22
  body: string;
@@ -31,8 +31,26 @@ export declare class ContentController {
31
31
  next: number;
32
32
  data: any;
33
33
  }>;
34
- deleteContent(locale: string, id: number): Promise<any>;
35
- createContent(localeStr: string, { slug, status, locale }: ContentCreateDTO): Promise<any>;
36
- updateContent(localeStr: string, id: number, { locale, slug, status }: ContentUpdateDTO): Promise<any>;
34
+ deleteContent(locale: string, id: number): Promise<{
35
+ id: number;
36
+ created_at: Date;
37
+ updated_at: Date;
38
+ slug: string;
39
+ status: import("@prisma/client").$Enums.content_status_enum;
40
+ }>;
41
+ createContent(localeStr: string, { slug, status, locale }: ContentCreateDTO): Promise<{
42
+ id: number;
43
+ created_at: Date;
44
+ updated_at: Date;
45
+ slug: string;
46
+ status: import("@prisma/client").$Enums.content_status_enum;
47
+ }>;
48
+ updateContent(localeStr: string, id: number, { locale, slug, status }: ContentUpdateDTO): Promise<{
49
+ id: number;
50
+ created_at: Date;
51
+ updated_at: Date;
52
+ slug: string;
53
+ status: import("@prisma/client").$Enums.content_status_enum;
54
+ }>;
37
55
  }
38
56
  //# sourceMappingURL=content.controller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.controller.d.ts","sourceRoot":"","sources":["../src/content.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAYpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,qBAEa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAI3C,eAAe;;;;;;IAKf,UAAU,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;IAKhD,WAAW,CAAW,MAAM,EAAE,MAAM,EAAgB,gBAAgB,EAAE,aAAa,EAAW,KAAK,EAAE,GAAG;;;;;;;;;IAKxG,aAAa,CAAW,MAAM,EAAE,MAAM,EAA6B,EAAE,EAAE,MAAM;IAK7E,aAAa,CAAW,SAAS,EAAE,MAAM,EAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,gBAAgB;IAS7F,aAAa,CACP,SAAS,EAAE,MAAM,EACA,EAAE,EAAE,MAAM,EAC7B,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB;CAQrD"}
1
+ {"version":3,"file":"content.controller.d.ts","sourceRoot":"","sources":["../src/content.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAYpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,qBAEa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAI3C,eAAe;;;;;;IAKf,UAAU,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;IAKhD,WAAW,CAAW,MAAM,EAAE,MAAM,EAAgB,gBAAgB,EAAE,aAAa,EAAW,KAAK,EAAE,GAAG;;;;;;;;;IAKxG,aAAa,CAAW,MAAM,EAAE,MAAM,EAA6B,EAAE,EAAE,MAAM;;;;;;;IAK7E,aAAa,CAAW,SAAS,EAAE,MAAM,EAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,gBAAgB;;;;;;;IAS7F,aAAa,CACP,SAAS,EAAE,MAAM,EACA,EAAE,EAAE,MAAM,EAC7B,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB;;;;;;;CAQrD"}
@@ -9,17 +9,17 @@ export declare class ContentService {
9
9
  private readonly locale;
10
10
  constructor(prisma: PrismaService, pagination: PaginationService, locale: LocaleService);
11
11
  getContentStats(): Promise<{
12
- total: any;
13
- totalPublished: any;
14
- totalDraft: any;
12
+ total: number;
13
+ totalPublished: number;
14
+ totalDraft: number;
15
15
  totalEnabledLanguages: number;
16
16
  }>;
17
17
  getContent(id: number): Promise<{
18
- id: any;
19
- slug: any;
20
- status: any;
21
- created_at: any;
22
- updated_at: any;
18
+ id: number;
19
+ slug: string;
20
+ status: import("@prisma/client").$Enums.content_status_enum;
21
+ created_at: Date;
22
+ updated_at: Date;
23
23
  locales: Record<string, {
24
24
  title: string;
25
25
  body: string;
@@ -34,8 +34,26 @@ export declare class ContentService {
34
34
  next: number;
35
35
  data: any;
36
36
  }>;
37
- deleteContent(locale: string, id: number): Promise<any>;
38
- createContent(localeStr: string, { locale, slug, status }: ContentCreateDTO): Promise<any>;
39
- updateContent(localeStr: string, id: number, { locale, slug, status }: ContentUpdateDTO): Promise<any>;
37
+ deleteContent(locale: string, id: number): Promise<{
38
+ id: number;
39
+ created_at: Date;
40
+ updated_at: Date;
41
+ slug: string;
42
+ status: import("@prisma/client").$Enums.content_status_enum;
43
+ }>;
44
+ createContent(localeStr: string, { locale, slug, status }: ContentCreateDTO): Promise<{
45
+ id: number;
46
+ created_at: Date;
47
+ updated_at: Date;
48
+ slug: string;
49
+ status: import("@prisma/client").$Enums.content_status_enum;
50
+ }>;
51
+ updateContent(localeStr: string, id: number, { locale, slug, status }: ContentUpdateDTO): Promise<{
52
+ id: number;
53
+ created_at: Date;
54
+ updated_at: Date;
55
+ slug: string;
56
+ status: import("@prisma/client").$Enums.content_status_enum;
57
+ }>;
40
58
  }
41
59
  //# sourceMappingURL=content.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.service.d.ts","sourceRoot":"","sources":["../src/content.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,qBACa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,aAAa;IAGlC,eAAe;;;;;;IAyBf,UAAU,CAAC,EAAE,EAAE,MAAM;;;;;;;mBAekB,MAAM;kBAAQ,MAAM;;;IAsB3D,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG;;;;;;;;;IA4EvE,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAcxC,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB;IA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
8
8
  role:
9
9
  - where:
10
- slug: admin
10
+ slug: admin
11
+ - where:
12
+ slug: admin-access
13
+ - where:
14
+ slug: admin-content
@@ -0,0 +1,7 @@
1
+ - slug: admin-content
2
+ name:
3
+ en: Content Administrator
4
+ pt: Administrador de Conteúdo
5
+ description:
6
+ en: Administrator with full access to content management.
7
+ pt: Administrador com acesso total à gestão de conteúdos.
@@ -4,33 +4,47 @@
4
4
  role:
5
5
  - where:
6
6
  slug: admin
7
+ - where:
8
+ slug: admin-access
7
9
  - url: /content
8
10
  method: POST
9
11
  relations:
10
12
  role:
11
13
  - where:
12
14
  slug: admin
15
+ - where:
16
+ slug: admin-access
13
17
  - url: /content/stats
14
18
  method: GET
15
19
  relations:
16
20
  role:
17
- - where:
18
- slug: admin
21
+ - where:
22
+ slug: admin
23
+ - where:
24
+ slug: admin-access
19
25
  - url: /content/:id
20
26
  method: GET
21
27
  relations:
22
28
  role:
23
29
  - where:
24
30
  slug: admin
31
+ - where:
32
+ slug: admin-access
25
33
  - url: /content/:id
26
34
  method: PATCH
27
35
  relations:
28
- role:
36
+ role:
29
37
  - where:
30
38
  slug: admin
39
+ - where:
40
+ slug: admin-access
31
41
  - url: /content/:id
32
42
  method: DELETE
33
43
  relations:
34
44
  role:
35
- - where:
36
- slug: admin
45
+ - where:
46
+ slug: admin
47
+ - where:
48
+ slug: admin-access
49
+ - where:
50
+ slug: admin-content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/content",
3
- "version": "0.0.68",
3
+ "version": "0.0.115",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -9,10 +9,10 @@
9
9
  "@nestjs/core": "^11",
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
- "@hed-hog/core": "0.0.68",
12
+ "@hed-hog/core": "0.0.115",
13
+ "@hed-hog/api": "0.0.3",
13
14
  "@hed-hog/api-locale": "0.0.10",
14
15
  "@hed-hog/api-prisma": "0.0.4",
15
- "@hed-hog/api": "0.0.3",
16
16
  "@hed-hog/api-pagination": "0.0.4"
17
17
  },
18
18
  "exports": {