@hed-hog/faq 0.0.68 → 0.0.103

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.
@@ -5,7 +5,7 @@ export declare class FAQController {
5
5
  constructor(faqService: FAQService);
6
6
  list(paginationParams: any, locale: string): Promise<{
7
7
  data: any[];
8
- total: any;
8
+ total: number;
9
9
  page: number;
10
10
  pageSize: any;
11
11
  prev: number;
@@ -13,11 +13,74 @@ export declare class FAQController {
13
13
  lastPage: number;
14
14
  }>;
15
15
  getFAQStats(): Promise<{
16
- total: any;
16
+ total: number;
17
+ }>;
18
+ getById(id: number, locale: string): Promise<{
19
+ locale: Record<string, {
20
+ question: string;
21
+ answer: string;
22
+ }>;
23
+ faq_locale: ({
24
+ locale: {
25
+ code: string;
26
+ };
27
+ } & {
28
+ id: number;
29
+ created_at: Date;
30
+ updated_at: Date;
31
+ locale_id: number;
32
+ faq_id: number;
33
+ question: string;
34
+ answer: string;
35
+ })[];
36
+ id: number;
37
+ created_at: Date;
38
+ updated_at: Date;
39
+ }>;
40
+ create(body: FAQDTO): Promise<{
41
+ locale: Record<string, {
42
+ question: string;
43
+ answer: string;
44
+ }>;
45
+ faq_locale: ({
46
+ locale: {
47
+ code: string;
48
+ };
49
+ } & {
50
+ id: number;
51
+ created_at: Date;
52
+ updated_at: Date;
53
+ locale_id: number;
54
+ faq_id: number;
55
+ question: string;
56
+ answer: string;
57
+ })[];
58
+ id: number;
59
+ created_at: Date;
60
+ updated_at: Date;
61
+ }>;
62
+ update(id: number, body: Partial<FAQDTO>): Promise<{
63
+ locale: Record<string, {
64
+ question: string;
65
+ answer: string;
66
+ }>;
67
+ faq_locale: ({
68
+ locale: {
69
+ code: string;
70
+ };
71
+ } & {
72
+ id: number;
73
+ created_at: Date;
74
+ updated_at: Date;
75
+ locale_id: number;
76
+ faq_id: number;
77
+ question: string;
78
+ answer: string;
79
+ })[];
80
+ id: number;
81
+ created_at: Date;
82
+ updated_at: Date;
17
83
  }>;
18
- getById(id: number, locale: string): Promise<any>;
19
- create(body: FAQDTO): Promise<any>;
20
- update(id: number, body: Partial<FAQDTO>): Promise<any>;
21
84
  delete(id: number, locale: string): Promise<{
22
85
  deleted: boolean;
23
86
  message: any;
@@ -1 +1 @@
1
- {"version":3,"file":"faq.controller.d.ts","sourceRoot":"","sources":["../src/faq.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,qBAEa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAG7C,IAAI,CACM,gBAAgB,KAAA,EACpB,MAAM,EAAE,MAAM;;;;;;;;;IAMpB,WAAW;;;IAKX,OAAO,CACgB,EAAE,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM;IAYpB,MAAM,CACF,IAAI,EAAE,MAAM;IAMhB,MAAM,CACiB,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;IAMzB,MAAM,CACiB,EAAE,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM;;;;CAI3B"}
1
+ {"version":3,"file":"faq.controller.d.ts","sourceRoot":"","sources":["../src/faq.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,qBAEa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAG7C,IAAI,CACM,gBAAgB,KAAA,EACpB,MAAM,EAAE,MAAM;;;;;;;;;IAMpB,WAAW;;;IAKX,OAAO,CACgB,EAAE,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;IAYpB,MAAM,CACF,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;IAMhB,MAAM,CACiB,EAAE,EAAE,MAAM,EAC7B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;IAMzB,MAAM,CACiB,EAAE,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM;;;;CAI3B"}
@@ -7,7 +7,7 @@ export declare class FAQService {
7
7
  constructor(prisma: PrismaService, localeService: LocaleService);
8
8
  list(paginationParams: any, locale: string): Promise<{
9
9
  data: any[];
10
- total: any;
10
+ total: number;
11
11
  page: number;
12
12
  pageSize: any;
13
13
  prev: number;
@@ -15,11 +15,74 @@ export declare class FAQService {
15
15
  lastPage: number;
16
16
  }>;
17
17
  getStats(): Promise<{
18
- total: any;
18
+ total: number;
19
+ }>;
20
+ create(body: FAQDTO): Promise<{
21
+ locale: Record<string, {
22
+ question: string;
23
+ answer: string;
24
+ }>;
25
+ faq_locale: ({
26
+ locale: {
27
+ code: string;
28
+ };
29
+ } & {
30
+ id: number;
31
+ created_at: Date;
32
+ updated_at: Date;
33
+ locale_id: number;
34
+ faq_id: number;
35
+ question: string;
36
+ answer: string;
37
+ })[];
38
+ id: number;
39
+ created_at: Date;
40
+ updated_at: Date;
41
+ }>;
42
+ getById(id: number): Promise<{
43
+ locale: Record<string, {
44
+ question: string;
45
+ answer: string;
46
+ }>;
47
+ faq_locale: ({
48
+ locale: {
49
+ code: string;
50
+ };
51
+ } & {
52
+ id: number;
53
+ created_at: Date;
54
+ updated_at: Date;
55
+ locale_id: number;
56
+ faq_id: number;
57
+ question: string;
58
+ answer: string;
59
+ })[];
60
+ id: number;
61
+ created_at: Date;
62
+ updated_at: Date;
63
+ }>;
64
+ update(id: number, body: Partial<FAQDTO>): Promise<{
65
+ locale: Record<string, {
66
+ question: string;
67
+ answer: string;
68
+ }>;
69
+ faq_locale: ({
70
+ locale: {
71
+ code: string;
72
+ };
73
+ } & {
74
+ id: number;
75
+ created_at: Date;
76
+ updated_at: Date;
77
+ locale_id: number;
78
+ faq_id: number;
79
+ question: string;
80
+ answer: string;
81
+ })[];
82
+ id: number;
83
+ created_at: Date;
84
+ updated_at: Date;
19
85
  }>;
20
- create(body: FAQDTO): Promise<any>;
21
- getById(id: number): Promise<any>;
22
- update(id: number, body: Partial<FAQDTO>): Promise<any>;
23
86
  delete(id: number, locale?: string): Promise<{
24
87
  deleted: boolean;
25
88
  message: any;
@@ -1 +1 @@
1
- {"version":3,"file":"faq.service.d.ts","sourceRoot":"","sources":["../src/faq.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,qBACa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,MAAM,EAAE,aAAa,EAErB,aAAa,EAAE,aAAa;IAGzC,IAAI,CAAC,gBAAgB,KAAA,EAAE,MAAM,EAAE,MAAM;;;;;;;;;IAsGrC,QAAQ;;;IAOR,MAAM,CAAC,IAAI,EAAE,MAAM;IA2BnB,OAAO,CAAC,EAAE,EAAE,MAAM;IAiClB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;IAwCxC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,GAAE,MAAa;;;;CAqB/C"}
1
+ {"version":3,"file":"faq.service.d.ts","sourceRoot":"","sources":["../src/faq.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,qBACa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,MAAM,EAAE,aAAa,EAErB,aAAa,EAAE,aAAa;IAGzC,IAAI,CAAC,gBAAgB,KAAA,EAAE,MAAM,EAAE,MAAM;;;;;;;;;IAsGrC,QAAQ;;;IAOR,MAAM,CAAC,IAAI,EAAE,MAAM;;sBAoDa,MAAM;oBAAU,MAAM;;;;;;;;;;;;;;;;;;;IAzBtD,OAAO,CAAC,EAAE,EAAE,MAAM;;sBAyBc,MAAM;oBAAU,MAAM;;;;;;;;;;;;;;;;;;;IAQtD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;;sBARR,MAAM;oBAAU,MAAM;;;;;;;;;;;;;;;;;;;IAgDtD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,GAAE,MAAa;;;;CAqB/C"}
@@ -7,4 +7,6 @@
7
7
  relations:
8
8
  role:
9
9
  - where:
10
- slug: admin
10
+ slug: admin
11
+ - where:
12
+ slug: admin-access
@@ -4,33 +4,45 @@
4
4
  role:
5
5
  - where:
6
6
  slug: admin
7
+ - where:
8
+ slug: admin-access
7
9
  - url: /faq
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: /faq/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: /faq/: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: /faq/: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: /faq
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/faq",
3
- "version": "0.0.68",
3
+ "version": "0.0.103",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -10,10 +10,10 @@
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
12
  "@hed-hog/api-locale": "0.0.10",
13
- "@hed-hog/core": "0.0.68",
14
- "@hed-hog/api": "0.0.3",
13
+ "@hed-hog/core": "0.0.103",
15
14
  "@hed-hog/api-prisma": "0.0.4",
16
- "@hed-hog/api-pagination": "0.0.4"
15
+ "@hed-hog/api-pagination": "0.0.4",
16
+ "@hed-hog/api": "0.0.3"
17
17
  },
18
18
  "exports": {
19
19
  ".": {