jamespot-user-api 1.0.119 → 1.0.120

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.
Files changed (74) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminLicenseApi.html +11 -11
  3. package/documentation/classes/AdminStoreApi.html +1 -1
  4. package/documentation/classes/AdminUtilsApi.html +1 -1
  5. package/documentation/classes/JApplicationApi.html +8 -8
  6. package/documentation/classes/JArticleApi.html +1 -1
  7. package/documentation/classes/JAssetReservation.html +1 -1
  8. package/documentation/classes/JAudienceApi.html +1 -1
  9. package/documentation/classes/JBaseApi.html +1 -1
  10. package/documentation/classes/JBookmarkApi.html +1 -1
  11. package/documentation/classes/JCommunityApi.html +1 -1
  12. package/documentation/classes/JDiapazoneApi.html +1 -1
  13. package/documentation/classes/JFaqApi.html +1 -1
  14. package/documentation/classes/JFileApi.html +5 -5
  15. package/documentation/classes/JFilebankApi.html +1 -1
  16. package/documentation/classes/JGroupApi.html +9 -9
  17. package/documentation/classes/JLandApi.html +1 -1
  18. package/documentation/classes/JMessengerApi.html +1 -1
  19. package/documentation/classes/JSearchApi.html +6 -6
  20. package/documentation/classes/JShareApi.html +1 -1
  21. package/documentation/classes/JTaxonomyApi.html +2 -2
  22. package/documentation/classes/JUserApi.html +4 -4
  23. package/documentation/classes/JWedocApi.html +1 -1
  24. package/documentation/classes/JamespotUserApi.html +1 -1
  25. package/documentation/classes/Network.html +1 -1
  26. package/documentation/classes/TVDisplayApi.html +1 -1
  27. package/documentation/classes/WindowBrowser.html +1 -1
  28. package/documentation/enums/StudioApplicationStatus.html +1 -1
  29. package/documentation/index.html +1 -1
  30. package/documentation/interfaces/AccessRightObject.html +1 -1
  31. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  32. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  33. package/documentation/interfaces/ApiWrapper.html +1 -1
  34. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  35. package/documentation/interfaces/BaseMessage.html +1 -1
  36. package/documentation/interfaces/Category.html +1 -1
  37. package/documentation/interfaces/FileBankProps.html +1 -1
  38. package/documentation/interfaces/FolderProps.html +1 -1
  39. package/documentation/interfaces/ListFilterSpec.html +1 -1
  40. package/documentation/interfaces/OF.html +1 -1
  41. package/documentation/interfaces/ObjectListProps.html +1 -1
  42. package/documentation/interfaces/PagingResults.html +1 -1
  43. package/documentation/interfaces/RootFolderProps.html +1 -1
  44. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  45. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  46. package/documentation/interfaces/SearchConfig.html +1 -1
  47. package/documentation/interfaces/SearchFacetModel.html +1 -1
  48. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  49. package/documentation/interfaces/SearchQuery.html +1 -1
  50. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  51. package/documentation/interfaces/SearchQueryOption.html +1 -1
  52. package/documentation/interfaces/SearchQueryResult.html +1 -1
  53. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  54. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  55. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  56. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  57. package/documentation/interfaces/SpotProps.html +1 -1
  58. package/documentation/interfaces/Taxonomy.html +1 -1
  59. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  60. package/documentation/interfaces/WindowInterface.html +1 -1
  61. package/documentation/modules.html +11 -11
  62. package/lib/jamespot-user-api.js +1 -1
  63. package/lib/jamespot-user-api.js.map +1 -1
  64. package/lib/src/apis/faq/faq.d.ts +6 -1
  65. package/lib/src/apis/faq/faq.mock.d.ts +6 -1
  66. package/lib/src/types/faq.d.ts +24 -3
  67. package/lib/src/types/utils.d.ts +1 -1
  68. package/package.json +1 -1
  69. package/phpunitMock/articleCreate-faq-category.json +3 -4
  70. package/phpunitMock/articleGet-faq-category.json +6 -7
  71. package/phpunitMock/articleUpdate-faq-category.json +3 -4
  72. package/phpunitMock/faqAccess-success.json +9 -0
  73. package/phpunitMock/faqCheckItem-success.json +89 -0
  74. package/phpunitMock/objectListFaqQueryList-faq-success.json +192 -0
@@ -1,10 +1,15 @@
1
1
  import { JBaseApi } from '../base';
2
- import { ApiWrapper, CreateFaqCategory, EditFaqCategory, FaqCategoryView, FaqHookProperties, FaqTaxonomy, jArticleLittle } from '../../types';
2
+ import { ApiWrapper, CreateFaqCategory, EditFaqCategory, ExtendedFaqCategory, FaqAccess, FaqCategoryList, FaqCategoryView, FaqHookProperties, FaqItemList, FaqTaxonomy, jArticleLittle, Orders, PagingResults } from '../../types';
3
3
  export declare class JFaqApi extends JBaseApi {
4
+ getCategoriesList<T extends ExtendedFaqCategory<FaqCategoryList> = ExtendedFaqCategory<FaqCategoryList>>(format?: string, orders?: Orders): Promise<ApiWrapper<PagingResults<T>>>;
4
5
  createCategory<T extends jArticleLittle = FaqCategoryView>(params: Omit<CreateFaqCategory, 'type'>, format?: string): Promise<ApiWrapper<Array<T>>>;
5
6
  updateCategory<T extends jArticleLittle = FaqCategoryView>(params: Omit<EditFaqCategory, 'type'>, format?: string): Promise<ApiWrapper<T>>;
6
7
  getCategory<T extends jArticleLittle = FaqCategoryView>(id: number, format?: string): Promise<ApiWrapper<T>>;
7
8
  deleteCategory(id: number): Promise<ApiWrapper<boolean>>;
9
+ checkItem<T extends FaqItemList>(query: string, page?: number, format?: string): Promise<ApiWrapper<PagingResults<T & {
10
+ _percent: number;
11
+ }>>>;
8
12
  getTaxonomy(): Promise<ApiWrapper<FaqTaxonomy>>;
9
13
  getHookProperties(properties?: Array<keyof FaqHookProperties>): Promise<ApiWrapper<FaqHookProperties>>;
14
+ getAccess(): Promise<ApiWrapper<FaqAccess>>;
10
15
  }
@@ -1,7 +1,12 @@
1
- import { ApiWrapper, FaqCategoryView, FaqHookProperties, FaqTaxonomy } from '../../types';
1
+ import { ApiWrapper, ExtendedFaqCategory, FaqAccess, FaqCategoryList, FaqCategoryView, FaqHookProperties, FaqItemList, FaqTaxonomy, PagingResults } from '../../types';
2
2
  export declare const faqCreateCategory: ApiWrapper<FaqCategoryView[]>;
3
3
  export declare const faqGetCategory: ApiWrapper<FaqCategoryView>;
4
4
  export declare const faqUpdateCategory: ApiWrapper<FaqCategoryView>;
5
5
  export declare const faqDeleteCategory: ApiWrapper<boolean>;
6
6
  export declare const faqGetTaxonomy: ApiWrapper<FaqTaxonomy>;
7
7
  export declare const faqGetHookProperties: ApiWrapper<FaqHookProperties>;
8
+ export declare const faqGetAccess: ApiWrapper<FaqAccess>;
9
+ export declare const faqGetCategoriesList: ApiWrapper<PagingResults<ExtendedFaqCategory<FaqCategoryList>>>;
10
+ export declare const faqCheckItem: ApiWrapper<PagingResults<FaqItemList & {
11
+ _percent: number;
12
+ }>>;
@@ -1,15 +1,31 @@
1
- import { jArticleView, MaybeWithToken } from './utils';
1
+ import { jArticleList, jArticleView, MaybeWithToken } from './utils';
2
2
  import { ArticleCreation, AutoCompleteConcept } from '../apis';
3
3
  import { ImageSize } from './file';
4
4
  import { AudienceAutocomplete } from './autocomplete';
5
5
  export type FaqCategoryView = jArticleView & {
6
6
  faqColor?: string;
7
7
  _audience: AudienceAutocomplete[];
8
- image?: ImageSize | null;
8
+ image?: ImageSize;
9
9
  tags?: AutoCompleteConcept[];
10
10
  type: 'faq';
11
11
  isWeb: boolean;
12
12
  };
13
+ export type FaqCategoryList = jArticleList & {
14
+ faqColor?: string;
15
+ image?: ImageSize;
16
+ };
17
+ export type ExtendedFaqCategory<T extends FaqCategoryList> = T & {
18
+ _extend: {
19
+ itemsCount: number;
20
+ };
21
+ };
22
+ export type FaqItemList = jArticleList & {
23
+ type: 'faqItem';
24
+ hierarchy: {
25
+ category?: string;
26
+ theme?: string;
27
+ };
28
+ };
13
29
  export type CreateFaqCategory = MaybeWithToken<Omit<ArticleCreation, 'idSpot'>> & {
14
30
  image?: ImageSize | null;
15
31
  tags?: string;
@@ -26,5 +42,10 @@ export type FaqTaxonomy = {
26
42
  id: string;
27
43
  };
28
44
  export type FaqHookProperties = {
29
- _web: '0' | '1' | '';
45
+ _web?: '0' | '1' | '';
46
+ appImage?: string;
47
+ appImageText?: string;
48
+ };
49
+ export type FaqAccess = {
50
+ createCategory: boolean;
30
51
  };
@@ -41,7 +41,7 @@ export interface PagingResults<T> {
41
41
  cnt: number;
42
42
  data: Array<T>;
43
43
  facets: null | Array<{}>;
44
- idQuery?: number;
44
+ idQuery?: number | null;
45
45
  limit: number;
46
46
  page: number;
47
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.119",
3
+ "version": "1.0.120",
4
4
  "main": "lib/jamespot-user-api.js",
5
5
  "types": "lib/src/index.d.ts",
6
6
  "directories": {
@@ -14,8 +14,8 @@
14
14
  "mainType": "article",
15
15
  "type": "faq",
16
16
  "uri": "faq/19",
17
- "dateCreation": "2023-08-03 12:00:15",
18
- "dateModified": "2023-08-03 12:00:15",
17
+ "dateCreation": "2023-09-20 11:03:55",
18
+ "dateModified": "2023-09-20 11:03:55",
19
19
  "title": "FAQ test",
20
20
  "_url": "/ng/app/faq/c/19",
21
21
  "_right": {
@@ -40,10 +40,9 @@
40
40
  "_url": "/user/4",
41
41
  "level": 9
42
42
  },
43
- "processContext": null,
44
43
  "faqColor": "#111111",
44
+ "processContext": null,
45
45
  "_audience": [],
46
- "image": null,
47
46
  "tags": [],
48
47
  "isWeb": false
49
48
  }
@@ -4,14 +4,14 @@
4
4
  "error": 0,
5
5
  "messages": [],
6
6
  "result": {
7
- "id": 416,
7
+ "id": 13,
8
8
  "mainType": "article",
9
9
  "type": "faq",
10
- "uri": "faq/416",
11
- "dateCreation": "2023-09-12 14:39:30",
12
- "dateModified": "2023-09-12 14:39:30",
10
+ "uri": "faq/13",
11
+ "dateCreation": "2023-09-20 11:03:38",
12
+ "dateModified": "2023-09-20 11:03:38",
13
13
  "title": "CATEGORY 1",
14
- "_url": "/ng/app/faq/c/416",
14
+ "_url": "/ng/app/faq/c/13",
15
15
  "_right": {
16
16
  "create": true,
17
17
  "read": true,
@@ -29,7 +29,7 @@
29
29
  "type": "user",
30
30
  "uri": "user/4",
31
31
  "dateCreation": "2019-07-09 15:48:26",
32
- "dateModified": "2023-09-12 10:59:13",
32
+ "dateModified": "2019-07-09 15:51:24",
33
33
  "title": "Admin1",
34
34
  "_url": "/user/4",
35
35
  "level": 9
@@ -37,7 +37,6 @@
37
37
  "processContext": null,
38
38
  "faqColor": "",
39
39
  "_audience": [],
40
- "image": null,
41
40
  "tags": [],
42
41
  "isWeb": false
43
42
  }
@@ -13,8 +13,8 @@
13
13
  "mainType": "article",
14
14
  "type": "faq",
15
15
  "uri": "faq/20",
16
- "dateCreation": "2023-08-03 12:00:16",
17
- "dateModified": "2023-08-03 12:00:17",
16
+ "dateCreation": "2023-09-20 11:03:55",
17
+ "dateModified": "2023-09-20 11:03:55",
18
18
  "title": "New title",
19
19
  "_url": "/ng/app/faq/c/20",
20
20
  "_right": {
@@ -39,10 +39,9 @@
39
39
  "_url": "/user/4",
40
40
  "level": 9
41
41
  },
42
- "processContext": null,
43
42
  "faqColor": "#111111",
43
+ "processContext": null,
44
44
  "_audience": [],
45
- "image": null,
46
45
  "tags": [],
47
46
  "isWeb": false
48
47
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "o": "faq",
3
+ "f": "access",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": {
7
+ "createCategory": true
8
+ }
9
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "o": "faq",
3
+ "f": "checkItem",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": {
7
+ "limit": 300,
8
+ "page": 1,
9
+ "cnt": 2,
10
+ "data": [
11
+ {
12
+ "id": 16,
13
+ "mainType": "article",
14
+ "type": "faqItem",
15
+ "uri": "faqItem/16",
16
+ "dateCreation": "2023-09-20 11:03:39",
17
+ "dateModified": "2023-09-20 11:03:39",
18
+ "title": "ORPHAN ENTRY2",
19
+ "_url": "/ng/app/faq/q/16",
20
+ "_right": {
21
+ "create": true,
22
+ "read": true,
23
+ "publish": false,
24
+ "administrate": true,
25
+ "update": true,
26
+ "delete": true,
27
+ "comment": true,
28
+ "member": true
29
+ },
30
+ "description": "<div class='content-html'>ORPHAN ENTRY2</div>",
31
+ "_user": {
32
+ "id": 4,
33
+ "mainType": "user",
34
+ "type": "user",
35
+ "uri": "user/4",
36
+ "dateCreation": "2019-07-09 15:48:26",
37
+ "dateModified": "2019-07-09 15:51:24",
38
+ "title": "Admin1",
39
+ "_url": "/user/4",
40
+ "level": 9
41
+ },
42
+ "_percent": 63.1578947368421,
43
+ "hierarchy": {
44
+ "category": "CATEGORY 2",
45
+ "theme": "FAQ THEME2"
46
+ }
47
+ },
48
+ {
49
+ "id": 18,
50
+ "mainType": "article",
51
+ "type": "faqItem",
52
+ "uri": "faqItem/18",
53
+ "dateCreation": "2023-09-20 11:03:39",
54
+ "dateModified": "2023-09-20 11:03:39",
55
+ "title": "ORPHAN ENTRY3",
56
+ "_url": "/ng/app/faq/q/18",
57
+ "_right": {
58
+ "create": true,
59
+ "read": true,
60
+ "publish": false,
61
+ "administrate": true,
62
+ "update": true,
63
+ "delete": true,
64
+ "comment": true,
65
+ "member": true
66
+ },
67
+ "description": "<div class='content-html'>ORPHAN ENTRY3</div>",
68
+ "_user": {
69
+ "id": 4,
70
+ "mainType": "user",
71
+ "type": "user",
72
+ "uri": "user/4",
73
+ "dateCreation": "2019-07-09 15:48:26",
74
+ "dateModified": "2019-07-09 15:51:24",
75
+ "title": "Admin1",
76
+ "_url": "/user/4",
77
+ "level": 9
78
+ },
79
+ "_percent": 63.1578947368421,
80
+ "hierarchy": {
81
+ "category": "CATEGORY 3",
82
+ "theme": "FAQ THEME3"
83
+ }
84
+ }
85
+ ],
86
+ "facets": [],
87
+ "idQuery": 1695200647
88
+ }
89
+ }
@@ -0,0 +1,192 @@
1
+ {
2
+ "o": "objectList",
3
+ "f": "faqQueryList",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": {
7
+ "limit": 100,
8
+ "page": 1,
9
+ "cnt": 5,
10
+ "data": [
11
+ {
12
+ "id": 13,
13
+ "mainType": "article",
14
+ "type": "faq",
15
+ "uri": "faq/13",
16
+ "dateCreation": "2023-09-27 11:25:39",
17
+ "dateModified": "2023-09-27 11:26:09",
18
+ "title": "CATEGORY 1",
19
+ "_url": "/ng/app/faq/c/13",
20
+ "_right": {
21
+ "create": true,
22
+ "read": true,
23
+ "publish": false,
24
+ "administrate": true,
25
+ "update": true,
26
+ "delete": true,
27
+ "comment": true,
28
+ "member": true
29
+ },
30
+ "description": "<div class='content-html'>description FAQ FOR TEST categorie 1</div>",
31
+ "_user": {
32
+ "id": 4,
33
+ "mainType": "user",
34
+ "type": "user",
35
+ "uri": "user/4",
36
+ "dateCreation": "2019-07-09 15:48:26",
37
+ "dateModified": "2019-07-09 15:51:24",
38
+ "title": "Admin1",
39
+ "_url": "/user/4",
40
+ "level": 9
41
+ },
42
+ "_extend": {
43
+ "itemsCount": 0
44
+ }
45
+ },
46
+ {
47
+ "id": 15,
48
+ "mainType": "article",
49
+ "type": "faq",
50
+ "uri": "faq/15",
51
+ "dateCreation": "2023-09-27 11:25:40",
52
+ "dateModified": "2023-09-27 11:26:02",
53
+ "title": "CATEGORY 2",
54
+ "_url": "/ng/app/faq/c/15",
55
+ "_right": {
56
+ "create": true,
57
+ "read": true,
58
+ "publish": false,
59
+ "administrate": true,
60
+ "update": true,
61
+ "delete": true,
62
+ "comment": true,
63
+ "member": true
64
+ },
65
+ "description": "<div class='content-html'>description FAQ FOR TEST categorie 2</div>",
66
+ "_user": {
67
+ "id": 4,
68
+ "mainType": "user",
69
+ "type": "user",
70
+ "uri": "user/4",
71
+ "dateCreation": "2019-07-09 15:48:26",
72
+ "dateModified": "2019-07-09 15:51:24",
73
+ "title": "Admin1",
74
+ "_url": "/user/4",
75
+ "level": 9
76
+ },
77
+ "_extend": {
78
+ "itemsCount": 1
79
+ }
80
+ },
81
+ {
82
+ "id": 17,
83
+ "mainType": "article",
84
+ "type": "faq",
85
+ "uri": "faq/17",
86
+ "dateCreation": "2023-09-27 11:25:40",
87
+ "dateModified": "2023-09-27 11:25:40",
88
+ "title": "CATEGORY 3",
89
+ "_url": "/ng/app/faq/c/17",
90
+ "_right": {
91
+ "create": true,
92
+ "read": true,
93
+ "publish": false,
94
+ "administrate": true,
95
+ "update": true,
96
+ "delete": true,
97
+ "comment": false,
98
+ "member": true
99
+ },
100
+ "description": "<div class='content-html'>description FAQ FOR TEST categorie 3</div>",
101
+ "_user": {
102
+ "id": 4,
103
+ "mainType": "user",
104
+ "type": "user",
105
+ "uri": "user/4",
106
+ "dateCreation": "2019-07-09 15:48:26",
107
+ "dateModified": "2019-07-09 15:51:24",
108
+ "title": "Admin1",
109
+ "_url": "/user/4",
110
+ "level": 9
111
+ },
112
+ "_extend": {
113
+ "itemsCount": 1
114
+ }
115
+ },
116
+ {
117
+ "id": 19,
118
+ "mainType": "article",
119
+ "type": "faq",
120
+ "uri": "faq/19",
121
+ "dateCreation": "2023-09-27 11:25:56",
122
+ "dateModified": "2023-09-27 11:25:56",
123
+ "title": "FAQ test",
124
+ "_url": "/ng/app/faq/c/19",
125
+ "_right": {
126
+ "create": true,
127
+ "read": true,
128
+ "publish": false,
129
+ "administrate": true,
130
+ "update": true,
131
+ "delete": true,
132
+ "comment": false,
133
+ "member": true
134
+ },
135
+ "description": "<div class='content-html'>FAQ Category description !</div>",
136
+ "_user": {
137
+ "id": 4,
138
+ "mainType": "user",
139
+ "type": "user",
140
+ "uri": "user/4",
141
+ "dateCreation": "2019-07-09 15:48:26",
142
+ "dateModified": "2019-07-09 15:51:24",
143
+ "title": "Admin1",
144
+ "_url": "/user/4",
145
+ "level": 9
146
+ },
147
+ "faqColor": "#111111",
148
+ "_extend": {
149
+ "itemsCount": 0
150
+ }
151
+ },
152
+ {
153
+ "id": 20,
154
+ "mainType": "article",
155
+ "type": "faq",
156
+ "uri": "faq/20",
157
+ "dateCreation": "2023-09-27 11:25:57",
158
+ "dateModified": "2023-09-27 11:25:57",
159
+ "title": "New title",
160
+ "_url": "/ng/app/faq/c/20",
161
+ "_right": {
162
+ "create": true,
163
+ "read": true,
164
+ "publish": false,
165
+ "administrate": true,
166
+ "update": true,
167
+ "delete": true,
168
+ "comment": false,
169
+ "member": true
170
+ },
171
+ "description": "<div class='content-html'>New description</div>",
172
+ "_user": {
173
+ "id": 4,
174
+ "mainType": "user",
175
+ "type": "user",
176
+ "uri": "user/4",
177
+ "dateCreation": "2019-07-09 15:48:26",
178
+ "dateModified": "2019-07-09 15:51:24",
179
+ "title": "Admin1",
180
+ "_url": "/user/4",
181
+ "level": 9
182
+ },
183
+ "faqColor": "#111111",
184
+ "_extend": {
185
+ "itemsCount": 0
186
+ }
187
+ }
188
+ ],
189
+ "facets": null,
190
+ "idQuery": null
191
+ }
192
+ }