jamespot-user-api 1.0.120 → 1.0.122

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 (73) 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 +9 -6
  65. package/lib/src/apis/faq/faq.mock.d.ts +14 -5
  66. package/lib/src/apis/filebank.d.ts +7 -7
  67. package/lib/src/types/faq.d.ts +25 -8
  68. package/lib/src/types/group.d.ts +2 -0
  69. package/lib/src/types/utils.d.ts +5 -1
  70. package/package.json +1 -1
  71. package/phpunitMock/faqAddTheme-success.json +48 -0
  72. package/phpunitMock/faqDeleteTheme-success.json +48 -0
  73. package/phpunitMock/faqSetTheme-success.json +11 -0
@@ -1,15 +1,18 @@
1
1
  import { JBaseApi } from '../base';
2
- import { ApiWrapper, CreateFaqCategory, EditFaqCategory, ExtendedFaqCategory, FaqAccess, FaqCategoryList, FaqCategoryView, FaqHookProperties, FaqItemList, FaqTaxonomy, jArticleLittle, Orders, PagingResults } from '../../types';
2
+ import { ApiWrapper, CreateFaqCategory, CreateFaqTheme, EditFaqCategory, ExtendedFaqCategory, FaqAccess, FaqList, FaqView, FaqHookProperties, FaqItemList, FaqTaxonomy, jArticleLittle, Orders, PagingResults, DeleteFaqTheme, EditFaqTheme, ApiDefaultWrapper, Format } 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>>>;
5
- createCategory<T extends jArticleLittle = FaqCategoryView>(params: Omit<CreateFaqCategory, 'type'>, format?: string): Promise<ApiWrapper<Array<T>>>;
6
- updateCategory<T extends jArticleLittle = FaqCategoryView>(params: Omit<EditFaqCategory, 'type'>, format?: string): Promise<ApiWrapper<T>>;
7
- getCategory<T extends jArticleLittle = FaqCategoryView>(id: number, format?: string): Promise<ApiWrapper<T>>;
4
+ getCategoriesList<T extends ExtendedFaqCategory<FaqList> = ExtendedFaqCategory<FaqList>>(format?: Format, orders?: Orders): Promise<ApiWrapper<PagingResults<T>>>;
5
+ createCategory<T extends jArticleLittle = FaqView>(params: Omit<CreateFaqCategory, 'type'>, format?: Format): Promise<ApiWrapper<Array<T>>>;
6
+ updateCategory<T extends jArticleLittle = FaqView>(params: Omit<EditFaqCategory, 'type'>, format?: Format): Promise<ApiWrapper<T>>;
7
+ getCategory<T extends jArticleLittle = FaqView>(id: number, format?: Format): Promise<ApiWrapper<T>>;
8
8
  deleteCategory(id: number): Promise<ApiWrapper<boolean>>;
9
- checkItem<T extends FaqItemList>(query: string, page?: number, format?: string): Promise<ApiWrapper<PagingResults<T & {
9
+ checkItem<T extends FaqItemList>(query: string, page?: number, format?: Format): Promise<ApiWrapper<PagingResults<T & {
10
10
  _percent: number;
11
11
  }>>>;
12
12
  getTaxonomy(): Promise<ApiWrapper<FaqTaxonomy>>;
13
13
  getHookProperties(properties?: Array<keyof FaqHookProperties>): Promise<ApiWrapper<FaqHookProperties>>;
14
14
  getAccess(): Promise<ApiWrapper<FaqAccess>>;
15
+ createTheme<T extends jArticleLittle = FaqView>(params: CreateFaqTheme, format?: Format): Promise<ApiWrapper<T>>;
16
+ deleteTheme<T extends jArticleLittle = FaqView>(params: DeleteFaqTheme, format?: Format): Promise<ApiWrapper<T>>;
17
+ editTheme(params: EditFaqTheme, format?: Format): Promise<ApiDefaultWrapper>;
15
18
  }
@@ -1,12 +1,21 @@
1
- import { ApiWrapper, ExtendedFaqCategory, FaqAccess, FaqCategoryList, FaqCategoryView, FaqHookProperties, FaqItemList, FaqTaxonomy, PagingResults } from '../../types';
2
- export declare const faqCreateCategory: ApiWrapper<FaqCategoryView[]>;
3
- export declare const faqGetCategory: ApiWrapper<FaqCategoryView>;
4
- export declare const faqUpdateCategory: ApiWrapper<FaqCategoryView>;
1
+ import { ApiWrapper, ExtendedFaqCategory, FaqAccess, FaqList, FaqView, FaqHookProperties, FaqItemList, FaqTaxonomy, PagingResults, ApiDefaultWrapper } from '../../types';
2
+ export declare const faqCreateCategory: ApiWrapper<(FaqView & {
3
+ processContext: null;
4
+ })[]>;
5
+ export declare const faqGetCategory: ApiWrapper<FaqView>;
6
+ export declare const faqUpdateCategory: ApiWrapper<FaqView>;
5
7
  export declare const faqDeleteCategory: ApiWrapper<boolean>;
6
8
  export declare const faqGetTaxonomy: ApiWrapper<FaqTaxonomy>;
7
9
  export declare const faqGetHookProperties: ApiWrapper<FaqHookProperties>;
8
10
  export declare const faqGetAccess: ApiWrapper<FaqAccess>;
9
- export declare const faqGetCategoriesList: ApiWrapper<PagingResults<ExtendedFaqCategory<FaqCategoryList>>>;
11
+ export declare const faqGetCategoriesList: ApiWrapper<PagingResults<ExtendedFaqCategory<FaqList>>>;
10
12
  export declare const faqCheckItem: ApiWrapper<PagingResults<FaqItemList & {
11
13
  _percent: number;
12
14
  }>>;
15
+ export declare const faqCreateTheme: ApiWrapper<FaqView & {
16
+ processContext: null;
17
+ }>;
18
+ export declare const faqDeleteTheme: ApiWrapper<FaqView & {
19
+ processContext: null;
20
+ }>;
21
+ export declare const faqEditTheme: ApiDefaultWrapper;
@@ -1,10 +1,10 @@
1
1
  import { JBaseApi } from './base';
2
- import { ApiPagingResults, ApiWrapper, jObjectBase, jObjectLittle, Rights } from '../types';
2
+ import { ApiPagingResults, ApiWrapper, jArticleList, jFileLittle, jObjectLittle, Rights } from '../types';
3
3
  export interface RootFolderProps {
4
4
  id: number;
5
5
  title: string;
6
6
  uri: string;
7
- type: string;
7
+ type: 'rootFolder';
8
8
  mainType: string;
9
9
  folderColor?: string;
10
10
  }
@@ -31,12 +31,12 @@ export type FolderType = jObjectLittle & {
31
31
  mainType: string;
32
32
  folderColor?: string;
33
33
  parentURI?: string;
34
+ _nbItems: number;
35
+ type: 'folder' | 'rootFolder';
34
36
  };
35
- export type jFileBase = jObjectLittle & {
36
- mimetype: string;
37
- };
38
- export type FileBankDocument = jObjectBase & {
39
- _attachedFiles: jFileBase[];
37
+ export type FileBankDocument = jArticleList & {
38
+ _attachedFiles: jFileLittle[];
39
+ type: 'document';
40
40
  };
41
41
  export declare class JFilebankApi extends JBaseApi {
42
42
  getBanks(format?: string): Promise<Array<FileBankProps>>;
@@ -1,20 +1,18 @@
1
- import { jArticleList, jArticleView, MaybeWithToken } from './utils';
1
+ import { Format, jArticleList, MaybeWithToken } from './utils';
2
2
  import { ArticleCreation, AutoCompleteConcept } from '../apis';
3
3
  import { ImageSize } from './file';
4
4
  import { AudienceAutocomplete } from './autocomplete';
5
- export type FaqCategoryView = jArticleView & {
6
- faqColor?: string;
5
+ export type FaqView = FaqList & {
7
6
  _audience: AudienceAutocomplete[];
8
- image?: ImageSize;
9
7
  tags?: AutoCompleteConcept[];
10
8
  type: 'faq';
11
9
  isWeb: boolean;
12
10
  };
13
- export type FaqCategoryList = jArticleList & {
11
+ export type FaqList = jArticleList & {
14
12
  faqColor?: string;
15
13
  image?: ImageSize;
16
14
  };
17
- export type ExtendedFaqCategory<T extends FaqCategoryList> = T & {
15
+ export type ExtendedFaqCategory<T extends FaqList> = T & {
18
16
  _extend: {
19
17
  itemsCount: number;
20
18
  };
@@ -35,7 +33,7 @@ export type CreateFaqCategory = MaybeWithToken<Omit<ArticleCreation, 'idSpot'>>
35
33
  };
36
34
  export type EditFaqCategory = CreateFaqCategory & {
37
35
  uri: string;
38
- format?: string;
36
+ format?: Format;
39
37
  };
40
38
  export type FaqTaxonomy = {
41
39
  title: string;
@@ -43,9 +41,28 @@ export type FaqTaxonomy = {
43
41
  };
44
42
  export type FaqHookProperties = {
45
43
  _web?: '0' | '1' | '';
46
- appImage?: string;
47
44
  appImageText?: string;
45
+ appImage?: string | {
46
+ image: {
47
+ id: string;
48
+ type: string;
49
+ };
50
+ };
48
51
  };
49
52
  export type FaqAccess = {
50
53
  createCategory: boolean;
51
54
  };
55
+ export type CreateFaqTheme = {
56
+ idCategory: number;
57
+ title: string;
58
+ };
59
+ export type DeleteFaqTheme = {
60
+ idCategory: number;
61
+ indexTheme: number;
62
+ deleteEntries?: boolean;
63
+ };
64
+ export type EditFaqTheme = {
65
+ idCategory: number;
66
+ indexTheme: number;
67
+ title: string;
68
+ };
@@ -44,6 +44,7 @@ export type GroupProperties = {
44
44
  widgets: Array<string>;
45
45
  rss_access: '1' | '0';
46
46
  rss_key: string;
47
+ fileSyncVersioningType: 'overwrite' | 'author-change';
47
48
  _options: GroupPropertiesOptions;
48
49
  _errors: [];
49
50
  lastRssExecution?: Record<string, string>;
@@ -68,6 +69,7 @@ export type GroupPropertiesOptions = {
68
69
  widgets: Array<GroupWidget>;
69
70
  custom_widgets: Record<string, GroupCustomWidget> | [];
70
71
  isArchive: number;
72
+ fileSyncVersioningType: Array<ValueLabel>;
71
73
  };
72
74
  export type RssType = {
73
75
  url: string;
@@ -134,7 +134,11 @@ export type MaybeWithToken<T> = T & {
134
134
  export type MaybeWithParent<T extends jObjectBase = jObjectBase> = {
135
135
  _parent?: T;
136
136
  };
137
- export type Format = 'raw-little' | 'raw-list' | 'raw-view' | undefined;
137
+ /**
138
+ * @deprecated
139
+ */
140
+ type Format_DEPRECATED = 'user-api';
141
+ export type Format = 'raw-little' | 'raw-list' | 'raw-view' | Format_DEPRECATED | undefined;
138
142
  export type ApiReturn<T extends Format, Little, List = Little, View = List, Default = {}> = T extends 'raw-little' ? Little : T extends 'raw-list' ? List : T extends 'raw-view' ? View : Default;
139
143
  export type ValueOf<T> = T[keyof T];
140
144
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.120",
3
+ "version": "1.0.122",
4
4
  "main": "lib/jamespot-user-api.js",
5
5
  "types": "lib/src/index.d.ts",
6
6
  "directories": {
@@ -0,0 +1,48 @@
1
+ {
2
+ "o": "faq",
3
+ "f": "addTheme",
4
+ "error": 0,
5
+ "messages": [
6
+ {
7
+ "code": 200,
8
+ "msg": "Enregistrement r\u00e9ussi"
9
+ }
10
+ ],
11
+ "result": {
12
+ "id": 85,
13
+ "mainType": "article",
14
+ "type": "faq",
15
+ "uri": "faq/85",
16
+ "dateCreation": "2023-10-04 13:59:38",
17
+ "dateModified": "2023-10-04 14:00:05",
18
+ "title": "CATEGORY 1",
19
+ "_url": "/ng/app/faq/c/85",
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
+ "processContext": null,
43
+ "faqColor": "",
44
+ "_audience": [],
45
+ "tags": [],
46
+ "isWeb": false
47
+ }
48
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "o": "faq",
3
+ "f": "deleteTheme",
4
+ "error": 0,
5
+ "messages": [
6
+ {
7
+ "code": 200,
8
+ "msg": "Enregistrement r\u00e9ussi"
9
+ }
10
+ ],
11
+ "result": {
12
+ "id": 85,
13
+ "mainType": "article",
14
+ "type": "faq",
15
+ "uri": "faq/85",
16
+ "dateCreation": "2023-10-04 13:59:38",
17
+ "dateModified": "2023-10-04 14:00:05",
18
+ "title": "CATEGORY 1",
19
+ "_url": "/ng/app/faq/c/85",
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
+ "processContext": null,
43
+ "faqColor": "",
44
+ "_audience": [],
45
+ "tags": [],
46
+ "isWeb": false
47
+ }
48
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "o": "faq",
3
+ "f": "setTheme",
4
+ "error": 0,
5
+ "messages": [
6
+ {
7
+ "code": 200,
8
+ "msg": "Enregistrement r\u00e9ussi"
9
+ }
10
+ ]
11
+ }