jamespot-user-api 1.0.97 → 1.0.99

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 (146) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminStoreApi.html +1 -1
  3. package/documentation/classes/JApplicationApi.html +11 -11
  4. package/documentation/classes/JArticleApi.html +1 -1
  5. package/documentation/classes/JAssetReservation.html +1 -1
  6. package/documentation/classes/JAudienceApi.html +2 -2
  7. package/documentation/classes/JBaseApi.html +1 -1
  8. package/documentation/classes/JBookmarkApi.html +1 -1
  9. package/documentation/classes/JCommunityApi.html +1 -1
  10. package/documentation/classes/JConceptApi.html +2 -2
  11. package/documentation/classes/JDiapazoneApi.html +1 -1
  12. package/documentation/classes/JFileApi.html +25 -7
  13. package/documentation/classes/JFilebankApi.html +1 -1
  14. package/documentation/classes/JGroupApi.html +20 -2
  15. package/documentation/classes/JLandApi.html +1 -1
  16. package/documentation/classes/JLicenseApi.html +4 -4
  17. package/documentation/classes/JMessengerApi.html +1 -1
  18. package/documentation/classes/JSearchApi.html +7 -7
  19. package/documentation/classes/JShareApi.html +1 -1
  20. package/documentation/classes/JUserApi.html +4 -4
  21. package/documentation/classes/JWedocApi.html +1 -1
  22. package/documentation/classes/JamespotUserApi.html +1 -1
  23. package/documentation/classes/Network.html +1 -1
  24. package/documentation/classes/WindowBrowser.html +1 -1
  25. package/documentation/enums/StudioApplicationStatus.html +1 -1
  26. package/documentation/index.html +1 -1
  27. package/documentation/interfaces/AccessRightObject.html +1 -0
  28. package/documentation/interfaces/ApiError.html +1 -1
  29. package/documentation/interfaces/ApiWrapper.html +1 -1
  30. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  31. package/documentation/interfaces/BaseMessage.html +1 -1
  32. package/documentation/interfaces/Category.html +1 -1
  33. package/documentation/interfaces/FileBankProps.html +1 -1
  34. package/documentation/interfaces/FolderProps.html +1 -1
  35. package/documentation/interfaces/ListFilterSpec.html +1 -1
  36. package/documentation/interfaces/OF.html +1 -1
  37. package/documentation/interfaces/ObjectListProps.html +1 -1
  38. package/documentation/interfaces/PagingResults.html +1 -1
  39. package/documentation/interfaces/RootFolderProps.html +1 -1
  40. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  41. package/documentation/interfaces/SearchCategoryValue.html +1 -0
  42. package/documentation/interfaces/SearchConfig.html +1 -1
  43. package/documentation/interfaces/SearchFacetModel.html +1 -1
  44. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  45. package/documentation/interfaces/SearchQuery.html +1 -1
  46. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  47. package/documentation/interfaces/SearchQueryOption.html +1 -1
  48. package/documentation/interfaces/SearchQueryResult.html +1 -1
  49. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  50. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  51. package/documentation/interfaces/SearchResultPropsApp.html +1 -0
  52. package/documentation/interfaces/SearchResultPropsObject.html +1 -0
  53. package/documentation/interfaces/SpotProps.html +1 -1
  54. package/documentation/interfaces/Taxonomy.html +1 -1
  55. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  56. package/documentation/interfaces/WindowInterface.html +1 -1
  57. package/documentation/modules.html +3 -1
  58. package/{jest.fetch.base-config.ts → jest.config.ts} +6 -1
  59. package/jest.config.vm.ts +11 -0
  60. package/lib/jamespot-user-api.js +1 -1
  61. package/lib/jamespot-user-api.js.map +1 -1
  62. package/lib/{jest.mock.config.d.ts → jest.config.d.ts} +4 -1
  63. package/lib/{jest.fetch.base-config.d.ts → jest.config.vm.d.ts} +6 -2
  64. package/lib/src/apis/Licenses/licences.test.d.ts +1 -0
  65. package/lib/src/apis/{licenses.d.ts → Licenses/licenses.d.ts} +2 -2
  66. package/lib/src/apis/Licenses/licenses.mock.d.ts +8 -0
  67. package/lib/src/apis/{application.d.ts → application/application.d.ts} +6 -36
  68. package/lib/src/apis/application/application.test.d.ts +1 -0
  69. package/lib/src/apis/application/index.d.ts +2 -0
  70. package/lib/src/apis/application/listApplicationDefault.mock.d.ts +3 -0
  71. package/lib/src/apis/application/types.d.ts +89 -0
  72. package/lib/src/apis/{article.d.ts → article/article.d.ts} +8 -6
  73. package/lib/src/apis/article/article.mock.d.ts +7 -0
  74. package/lib/src/apis/article/article.test.d.ts +1 -0
  75. package/lib/src/apis/assetReservation.mock.d.ts +3 -0
  76. package/lib/src/apis/assetReservation.test.d.ts +1 -0
  77. package/lib/src/apis/{audience.d.ts → audience/audience.d.ts} +2 -2
  78. package/lib/src/apis/audience/audience.mock.d.ts +2 -0
  79. package/lib/src/apis/audience/audience.test.d.ts +1 -0
  80. package/lib/src/apis/bookmark.d.ts +4 -4
  81. package/lib/src/apis/file.d.ts +59 -4
  82. package/lib/src/apis/group.d.ts +38 -5
  83. package/lib/src/apis/index.d.ts +5 -5
  84. package/lib/src/apis/jamespotUserApi.d.ts +5 -5
  85. package/lib/src/apis/{jland.d.ts → jland/jland.d.ts} +6 -4
  86. package/lib/src/apis/jland/jland.mock.d.ts +5 -0
  87. package/lib/src/apis/jland/jland.test.d.ts +1 -0
  88. package/lib/src/apis/{search.d.ts → search/search.d.ts} +4 -4
  89. package/lib/src/apis/search/search.mock.d.ts +13 -0
  90. package/lib/src/apis/search/search.test.d.ts +1 -0
  91. package/lib/src/apis/user.d.ts +2 -2
  92. package/lib/src/index.d.ts +1 -0
  93. package/lib/src/types/asei.d.ts +3 -3
  94. package/lib/src/types/autocomplete.d.ts +12 -5
  95. package/lib/src/types/bookmark.d.ts +39 -10
  96. package/lib/src/types/file.d.ts +20 -2
  97. package/lib/src/types/group.d.ts +41 -5
  98. package/lib/src/types/index.d.ts +1 -1
  99. package/lib/src/types/model.d.ts +7 -0
  100. package/lib/src/types/realtime.d.ts +25 -0
  101. package/lib/src/types/search.d.ts +43 -16
  102. package/lib/src/types/user.d.ts +6 -15
  103. package/lib/src/types/utils.d.ts +35 -14
  104. package/lib/src/util/Test.d.ts +9 -0
  105. package/lib/src/util/ensure.d.ts +15 -0
  106. package/lib/src/util/network.d.ts +1 -1
  107. package/lib/src/util/network.mock.d.ts +3 -0
  108. package/lib/src/window/index.d.ts +0 -1
  109. package/package.json +3 -5
  110. package/phpunitMock/articleCount-mpArticle.json +1 -0
  111. package/phpunitMock/articleCreate-mpArticle-little.json +18 -0
  112. package/phpunitMock/articleDelete-mpArticle.json +7 -0
  113. package/phpunitMock/articleGet-mpArticle-list.json +39 -0
  114. package/phpunitMock/articleUpdate-mpArticleView.json +39 -0
  115. package/phpunitMock/assetReservationConfiguration-default.json +14 -0
  116. package/phpunitMock/assetReservationConfiguration-updated.json +14 -0
  117. package/phpunitMock/autocompleteAudience-u.json +64 -0
  118. package/phpunitMock/jLandAdminLogs-empty.json +1 -0
  119. package/phpunitMock/jLandAdminLogs-full.json +98 -0
  120. package/phpunitMock/jLandAdminStats-empty.json +1 -0
  121. package/phpunitMock/licenseManagerAssignLicense-default.json +7 -0
  122. package/phpunitMock/licenseManagerAssignLicense-isAssignLicense.json +1 -0
  123. package/phpunitMock/licenseManagerCountLicensesNotAssigned-count.json +15 -0
  124. package/phpunitMock/licenseManagerGetLicensesAssigned-default.json +48 -0
  125. package/phpunitMock/licenseManagerUnassignLicense-default.json +7 -0
  126. package/phpunitMock/licenseManagerUnassignLicense-isUnassign.json +1 -0
  127. package/phpunitMock/objectListJamespotArticleList-mpArticle-little.json +115 -0
  128. package/phpunitMock/searchGetAdminConfig-default.json +22 -0
  129. package/phpunitMock/searchGetConfig-default.json +249 -0
  130. package/phpunitMock/searchGetLastQueries-default.json +7 -0
  131. package/phpunitMock/searchProposition-gro.json +60 -0
  132. package/phpunitMock/searchQuery-admin.json +53 -0
  133. package/phpunitMock/searchSetAdminConfig-test.json +1 -0
  134. package/phpunitMock/studioList-testUserApiList.json +114 -0
  135. package/documentation/classes/WindowMock.html +0 -10
  136. package/documentation/interfaces/CreateGroup.html +0 -1
  137. package/documentation/interfaces/Result.html +0 -1
  138. package/documentation/interfaces/SearchResultProps.html +0 -1
  139. package/jest.fetch.config.ts +0 -7
  140. package/jest.fetch.jenkinsdev.config.ts +0 -7
  141. package/jest.mock.config.ts +0 -8
  142. package/lib/jest.fetch.config.d.ts +0 -12
  143. package/lib/jest.fetch.jenkinsdev.config.d.ts +0 -12
  144. package/lib/src/types/application.d.ts +0 -15
  145. package/lib/src/window/WindowJestFetch.d.ts +0 -6
  146. package/lib/src/window/WindowMock.d.ts +0 -16
@@ -1,36 +1,6 @@
1
- import { ApiWrapper, BaseMessages, jObjectLittle } from '../types';
2
- import { JBaseApi } from './base';
3
- export declare type StudioApplicationBase = {
4
- idApp: string;
5
- type: string;
6
- name: string;
7
- label: string;
8
- description: string;
9
- checkAccess: boolean;
10
- attrExposed: Array<string>;
11
- status: StudioApplicationStatus;
12
- suspended: boolean;
13
- view: string;
14
- typeModel: unknown;
15
- manifest: StudioManifest;
16
- author: string;
17
- accessRightObjectList: Array<jObjectLittle>;
18
- columns: Array<string>;
19
- value?: string;
20
- };
21
- export declare type StudioManifest = {
22
- dateCreation: string;
23
- author: string;
24
- manifestVersion: number;
25
- version: number;
26
- };
27
- export declare enum StudioApplicationStatus {
28
- local = "local",
29
- installed = "installed",
30
- autosaved = "autosaved",
31
- saved = "saved"
32
- }
33
- export declare type StudioApplication = StudioApplicationBase & {};
1
+ import { ApiWrapper, BaseMessages } from '../../types';
2
+ import { JBaseApi } from '../base';
3
+ import { StudioApplicationBase, StudioApplicationStatusEnumBased } from './types';
34
4
  export declare class JApplicationApi extends JBaseApi {
35
5
  /**
36
6
  * List applications
@@ -41,7 +11,7 @@ export declare class JApplicationApi extends JBaseApi {
41
11
  * Get one application
42
12
  * @returns {@link JApplication} object in full format
43
13
  */
44
- get(idApp: string, status?: StudioApplicationStatus): Promise<ApiWrapper<StudioApplicationBase, string[]>>;
14
+ get(idApp: string, status?: StudioApplicationStatusEnumBased): Promise<ApiWrapper<StudioApplicationBase, string[]>>;
45
15
  /**
46
16
  * Install this application.
47
17
  * If everything is ok, remove previous saved and autosaved versions of this application.
@@ -69,14 +39,14 @@ export declare class JApplicationApi extends JBaseApi {
69
39
  * @param status: must be either 'saved' or 'autosaved'.
70
40
  * @returns {@link JApplication} object in full format
71
41
  */
72
- save(idApp: string, value: string, status: StudioApplicationStatus): Promise<ApiWrapper<StudioApplicationBase, string[]>>;
42
+ save(idApp: string, value: string, status: StudioApplicationStatusEnumBased): Promise<ApiWrapper<StudioApplicationBase, string[]>>;
73
43
  /**
74
44
  * Delete a selected status of the application
75
45
  * @param idApp application id to delete
76
46
  * @param status application status to select
77
47
  * @returns message after delete execution
78
48
  */
79
- delete(idApp: string, status: StudioApplicationStatus): Promise<Array<string>>;
49
+ delete(idApp: string, status: StudioApplicationStatusEnumBased): Promise<Array<string>>;
80
50
  /**
81
51
  * Get cssClass possible values.
82
52
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './application';
@@ -0,0 +1,3 @@
1
+ import { ApiWrapper, BaseMessages } from '../../types';
2
+ import { StudioApplicationBase } from './types';
3
+ export declare const listDefault: ApiWrapper<Array<StudioApplicationBase>, BaseMessages>;
@@ -0,0 +1,89 @@
1
+ import { jObjectLittle, Rights, ValueOf } from '../../types';
2
+ export declare type ApplicationType = {
3
+ name: string;
4
+ label: string;
5
+ icon: string;
6
+ img: string;
7
+ url: string;
8
+ description: string;
9
+ color?: string;
10
+ hasLicense: boolean;
11
+ sref?: string;
12
+ type?: string;
13
+ _extend?: {
14
+ [key: string]: any;
15
+ };
16
+ };
17
+ export declare type StudioAction = {
18
+ action: string;
19
+ nameApp: string;
20
+ };
21
+ export interface AccessRightObject extends jObjectLittle {
22
+ firstname?: string;
23
+ lastname?: string;
24
+ mail?: string;
25
+ privacy?: string;
26
+ category?: string;
27
+ description?: string;
28
+ image?: string | null;
29
+ _values: {
30
+ firstname?: string;
31
+ lastname?: string;
32
+ mail?: string;
33
+ title: string;
34
+ dateCreation: string;
35
+ dateModified: string;
36
+ privacy?: number;
37
+ category?: string;
38
+ };
39
+ _cssColor: string;
40
+ _cssClass: string;
41
+ _right: Rights;
42
+ }
43
+ export declare type StudioApplicationBase = {
44
+ idApp: string;
45
+ type?: string;
46
+ name?: string;
47
+ label?: string;
48
+ description?: string;
49
+ checkAccess?: boolean;
50
+ attrExposed?: Array<string>;
51
+ status: StudioApplicationStatusEnumBased;
52
+ suspended?: boolean;
53
+ view?: string;
54
+ author?: string;
55
+ columns?: Record<string, string>;
56
+ accessRightList?: string[];
57
+ accessRightObjectList?: Array<AccessRightObject>;
58
+ typeModel?: unknown;
59
+ value?: string;
60
+ manifest?: StudioManifest;
61
+ img?: string;
62
+ icon?: string;
63
+ color?: string;
64
+ url?: string;
65
+ types?: string;
66
+ urlTarget?: boolean;
67
+ order?: number;
68
+ dateCreation?: string;
69
+ studioVersion?: number;
70
+ showImport?: boolean;
71
+ showMap?: boolean;
72
+ mail2RSE?: boolean;
73
+ action?: StudioAction;
74
+ display?: string;
75
+ };
76
+ export declare type StudioManifest = {
77
+ dateCreation: string;
78
+ author: string;
79
+ manifestVersion: number;
80
+ version: number;
81
+ };
82
+ export declare enum StudioApplicationStatus {
83
+ local = "local",
84
+ installed = "installed",
85
+ autosaved = "autosaved",
86
+ saved = "saved"
87
+ }
88
+ export declare type StudioApplicationStatusEnumBased = ValueOf<StudioApplicationStatus>;
89
+ export declare type StudioApplication = StudioApplicationBase & {};
@@ -1,5 +1,5 @@
1
- import { JBaseApi } from './base';
2
- import { ApiWrapper, BaseMessages, Filters, jObjectLittle, MaybeWithToken, Orders, PagingResults } from '../types';
1
+ import { JBaseApi } from '../base';
2
+ import { ApiWrapper, BaseMessages, Filters, jArticleLittle, jArticleView, MaybeWithToken, Orders, PagingResults } from '../../types';
3
3
  export declare type ArticleListConfig = {
4
4
  type: string;
5
5
  format?: string;
@@ -29,12 +29,14 @@ export declare type BaseArticle = {
29
29
  title: string;
30
30
  };
31
31
  export declare class JArticleApi extends JBaseApi {
32
- list<T extends jObjectLittle = jObjectLittle>(config: ArticleListConfig): Promise<ApiWrapper<PagingResults<T>>>;
33
- get<T extends jObjectLittle = jObjectLittle>(config: ArticleGetConfig): Promise<ApiWrapper<T>>;
34
- create<T>(article: MaybeWithToken<ArticleCreation>, format?: string): Promise<ApiWrapper<Array<BaseArticle & T>>>;
32
+ list<T extends jArticleLittle = jArticleLittle>(config: ArticleListConfig): Promise<ApiWrapper<PagingResults<T>>>;
33
+ get<T extends jArticleLittle = jArticleLittle>(config: ArticleGetConfig): Promise<ApiWrapper<T & {
34
+ _nbAttachedFiles: number;
35
+ }, BaseMessages>>;
36
+ create<T extends jArticleLittle = jArticleLittle>(article: MaybeWithToken<ArticleCreation>, format?: string): Promise<ApiWrapper<Array<T>, BaseMessages>>;
35
37
  update<T extends {
36
38
  uri: string;
37
- }>(article: T): Promise<ApiWrapper<never, BaseMessages>>;
39
+ }, U extends jArticleView>(article: T): Promise<ApiWrapper<U, BaseMessages>>;
38
40
  delete(id: number): Promise<ApiWrapper<boolean, BaseMessages>>;
39
41
  count(type: string): Promise<ApiWrapper<number>>;
40
42
  }
@@ -0,0 +1,7 @@
1
+ import { ApiWrapper, BaseMessages, PagingResults, jArticleList, jArticleLittle, jArticleView } from '../../types';
2
+ export declare const articleGetMpArticleList: ApiWrapper<jArticleList, BaseMessages>;
3
+ export declare const articleCreateMpArticleLittle: ApiWrapper<Array<jArticleLittle>, BaseMessages>;
4
+ export declare const articleUpdateMpArticleView: ApiWrapper<jArticleView, BaseMessages>;
5
+ export declare const articleCountMpArticle: ApiWrapper<number>;
6
+ export declare const objectListJamespotArticleQueryList: ApiWrapper<PagingResults<jArticleLittle>>;
7
+ export declare const articleDeleteMpArticle: ApiWrapper<boolean, BaseMessages>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ApiWrapper, AssetReservationConfiguration } from '../types';
2
+ export declare const assetReservationConfigurationDefault: ApiWrapper<AssetReservationConfiguration>;
3
+ export declare const assetReservationConfigurationUpdated: ApiWrapper<AssetReservationConfiguration>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
- import { AudienceAutocomplete } from '../types';
2
- import { JBaseApi } from './base';
1
+ import { AudienceAutocomplete } from '../../types';
2
+ import { JBaseApi } from '../base';
3
3
  export declare class JAudienceApi extends JBaseApi {
4
4
  /**
5
5
  * autocomplete
@@ -0,0 +1,2 @@
1
+ import { ApiWrapper, AudienceAutocomplete } from '../../types';
2
+ export declare const audienceAutocompleteU: ApiWrapper<AudienceAutocomplete[]>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { ApiWrapper, BaseMessagesOne, PagingResults } from '../types';
2
2
  import { JBaseApi } from './base';
3
- import { Bookmark } from '../types';
3
+ import { BookmarkTypes } from '../types';
4
4
  export interface ListFilterSpec {
5
5
  query?: string;
6
6
  page?: number;
@@ -11,9 +11,9 @@ export interface ListFilterSpec {
11
11
  }[];
12
12
  }
13
13
  export declare class JBookmarkApi extends JBaseApi {
14
- getList(filterSpecs: ListFilterSpec): Promise<ApiWrapper<PagingResults<Bookmark>, string[]>>;
15
- addLink(targetId: number, targetType: string): Promise<ApiWrapper<Bookmark, string[]>>;
16
- addBookmark(bookmark: Pick<Bookmark, 'bookmarkLabel' | 'bookmarkMeta' | 'bookmarkUrl'>): Promise<ApiWrapper<Bookmark, BaseMessagesOne>>;
14
+ getFormattedList<T extends keyof BookmarkTypes>(filterSpecs: ListFilterSpec, format: T): Promise<ApiWrapper<PagingResults<BookmarkTypes[T]>, string[]>>;
15
+ addFormattedLink<T extends keyof BookmarkTypes>(targetId: number, targetType: string, format: T): Promise<ApiWrapper<BookmarkTypes[T], string[]>>;
16
+ addBookmark(bookmark: Pick<BookmarkTypes[keyof BookmarkTypes], 'bookmarkLabel' | 'bookmarkMeta' | 'bookmarkUrl'>, format?: keyof BookmarkTypes): Promise<ApiWrapper<import("../types").BookmarkRawList<import("../types").jObjectLittle> | import("../types").BookmarkList<import("../types").jObjectLittle>, BaseMessagesOne>>;
17
17
  delete(bookmarkId: number): Promise<ApiWrapper<null, BaseMessagesOne>>;
18
18
  rename(bookmarkID: number, bookmarkLabel: string, bookmarkUrl?: string): Promise<ApiWrapper<null, BaseMessagesOne>>;
19
19
  move(bookmarkID: number, bookmarkReference: number, position: 'before' | 'after'): Promise<ApiWrapper<null, BaseMessagesOne>>;
@@ -1,9 +1,64 @@
1
+ import { FileCropConfig, FileResponse, UploadConfig } from '../types';
1
2
  import { JBaseApi } from './base';
2
3
  export declare class JFileApi extends JBaseApi {
3
4
  /**
4
- * Upload a file to the server. use the same CSRF token to link the file to an article
5
- * @param attrName file type
6
- * @param file file
5
+ * Upload a file to the server. use the same token to link the file to an article
6
+ * @param config configuration object. One of "file" and "url" is mandatory
7
7
  */
8
- upload(attrName: 'attachment' | 'image', file: File): Promise<import("..").FileResponse>;
8
+ upload(config: UploadConfig): Promise<import("../types").ApiWrapper<FileResponse, string[]>>;
9
+ /**
10
+ * Upload a list of files to the server. use the same token to link the file to an article
11
+ * @param attrName file name (attachment, image, bannerImage, etc.)
12
+ * @param files files
13
+ * @param token token
14
+ */
15
+ uploadMany(configArray: Array<UploadConfig>): Promise<import("../types").ApiWrapper<FileResponse, string[]>[]>;
16
+ /**
17
+ * Crop an image
18
+ * @param config crop configuration
19
+ * @returns
20
+ */
21
+ update(idFile: number | string, type: string, config: FileCropConfig): Promise<import("../types").ApiWrapper<FileResponse, string[]> | {
22
+ result: {
23
+ crop: {
24
+ width: any;
25
+ height: any;
26
+ x: any;
27
+ y: any;
28
+ rotation: any;
29
+ };
30
+ id: string;
31
+ name: string;
32
+ type: string;
33
+ token?: string;
34
+ size: string;
35
+ mediaKey: string;
36
+ imagesize: {
37
+ width: number;
38
+ height: number;
39
+ };
40
+ };
41
+ o: string;
42
+ f: string;
43
+ error: number;
44
+ messages: string[];
45
+ errorMsg?: string;
46
+ }>;
47
+ /**
48
+ * delete file. This action is not automatic. You need to update the content associated with the deleted image with the same token
49
+ * @param idFile file id
50
+ * @param attrName attribute name
51
+ * @param token token
52
+ * @returns
53
+ */
54
+ deleteFile(idFile: number | string, attrName: string, token: string): Promise<import("../types").ApiWrapper<"", string[]>>;
55
+ /**
56
+ * delete the image associated with a content. This action is permanent. There is no two step process with a token
57
+ * @param id content id
58
+ * @param type content type
59
+ * @returns
60
+ */
61
+ deleteImage(id: number | string, type: string): Promise<import("../types").ApiWrapper<{
62
+ id: number;
63
+ }, string[]>>;
9
64
  }
@@ -1,9 +1,42 @@
1
- import { ApiWrapper, Category, CreateGroup, GroupWidget, jObjectLittle, PagingResults } from '../types';
1
+ import { ApiReturn, Category, CreateGroup, Format, GroupList, GroupProperties, GroupView, GroupWidget, jObjectLittle, PagingResults, UpdateGroup } from '../types';
2
2
  import { JBaseApi } from './base';
3
3
  export declare class JGroupApi extends JBaseApi {
4
- create({ type, widgets, ...group }: CreateGroup): Promise<ApiWrapper<string>>;
5
- getApplications(): Promise<ApiWrapper<Record<string, GroupWidget>>>;
6
- getCategories(): Promise<ApiWrapper<Category[]>>;
4
+ /**
5
+ * Create a group from scratch
6
+ * @param group
7
+ * @param format return format
8
+ * @returns
9
+ */
10
+ create<T extends Format = undefined>(group: CreateGroup, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, jObjectLittle, GroupList, GroupView, jObjectLittle>, string[]>>;
11
+ /**
12
+ * Update a group
13
+ * @param group group to update. The uri is mandatory and identify the group to update
14
+ * @param format return format
15
+ * @returns
16
+ */
17
+ update<T extends Format = undefined>(group: UpdateGroup, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, jObjectLittle, GroupList, GroupView, string>, string[]>>;
18
+ /**
19
+ * Get a spot
20
+ * @param idSpot
21
+ * @param format
22
+ * @returns
23
+ */
24
+ getSpot<T extends Format = undefined>(idSpot: number | string, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, jObjectLittle, GroupList, GroupView, string>, string[]>>;
25
+ /**
26
+ * Get the properties of a group that are not within the model
27
+ * @param idSpot
28
+ * @returns
29
+ */
30
+ getProperties(idSpot: number | string): Promise<import("../types").ApiWrapper<GroupProperties, string[]>>;
31
+ /**
32
+ * Get the available applications that can be added to a group
33
+ */
34
+ getApplications(): Promise<import("../types").ApiWrapper<Record<string, GroupWidget>, string[]>>;
35
+ /**
36
+ * Get the available group categories
37
+ * @returns
38
+ */
39
+ getCategories(): Promise<import("../types").ApiWrapper<Category[], string[]>>;
7
40
  /**
8
41
  * Get the members of a group
9
42
  * @param idSpot spot id
@@ -12,5 +45,5 @@ export declare class JGroupApi extends JBaseApi {
12
45
  * @param page page number
13
46
  * @return array of User
14
47
  */
15
- getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<ApiWrapper<PagingResults<jObjectLittle>>>;
48
+ getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../types").ApiWrapper<PagingResults<jObjectLittle>, string[]>>;
16
49
  }
@@ -1,8 +1,8 @@
1
1
  export * from './adminStore';
2
2
  export * from './application';
3
- export * from './article';
3
+ export * from './article/article';
4
4
  export * from './assetReservation';
5
- export * from './audience';
5
+ export * from './audience/audience';
6
6
  export * from './base';
7
7
  export * from './bookmark';
8
8
  export * from './community';
@@ -12,10 +12,10 @@ export * from './file';
12
12
  export * from './filebank';
13
13
  export * from './group';
14
14
  export * from './jamespotUserApi';
15
- export * from './jland';
16
- export * from './licenses';
15
+ export * from './jland/jland';
16
+ export * from './Licenses/licenses';
17
17
  export * from './messenger';
18
- export * from './search';
18
+ export * from './search/search';
19
19
  export * from './share';
20
20
  export * from './user';
21
21
  export * from './wedoc';
@@ -1,17 +1,17 @@
1
1
  import { AdminStoreApi } from './adminStore';
2
2
  import { JApplicationApi } from './application';
3
- import { JArticleApi } from './article';
3
+ import { JArticleApi } from './article/article';
4
4
  import { JAseiApi } from './asei';
5
5
  import { JAssetReservation } from './assetReservation';
6
- import { JAudienceApi } from './audience';
6
+ import { JAudienceApi } from './audience/audience';
7
7
  import { JCommunityApi } from './community';
8
8
  import { JConceptApi } from './concept';
9
9
  import { JFileApi } from './file';
10
10
  import { JFilebankApi } from './filebank';
11
11
  import { JGroupApi } from './group';
12
- import { JLandApi } from './jland';
12
+ import { JLandApi } from './jland/jland';
13
13
  import { JMessengerApi } from './messenger';
14
- import { JSearchApi } from './search';
14
+ import { JSearchApi } from './search/search';
15
15
  import { JBookmarkApi } from './bookmark';
16
16
  import { JTaxonomyApi } from './taxonomy';
17
17
  import { JUserApi } from './user';
@@ -19,7 +19,7 @@ import { JDiapazoneApi } from './diapazone';
19
19
  import { JWedocApi } from './wedoc';
20
20
  import { Network } from '../util/network';
21
21
  import { JShareApi } from './share';
22
- import { JLicenseApi } from './licenses';
22
+ import { JLicenseApi } from './Licenses/licenses';
23
23
  /**
24
24
  * In browser usage, 'window' should be the window object.
25
25
  * In server side usage, 'window' object given must implement the fetch method, used by the Apis.
@@ -1,13 +1,15 @@
1
- import { JBaseApi } from './base';
2
- import { ApiWrapper, jArticleList, MaybeWithToken, PagingResults } from '../types';
3
- import { JLicense } from './licenses';
4
- import { ArticleCreation } from './article';
1
+ import { JBaseApi } from '../base';
2
+ import { ApiWrapper, jArticleList, MaybeWithToken, PagingResults } from '../../types';
3
+ import { ArticleCreation } from '../article/article';
4
+ import { JLicense } from '../Licenses/licenses';
5
5
  export declare type JLandLog = {
6
6
  idLog: number;
7
7
  slug: string;
8
8
  dateCreation: string;
9
9
  map: string;
10
10
  mail: string;
11
+ action: string;
12
+ mode: string;
11
13
  };
12
14
  export declare type JLandStat = {
13
15
  mail: string;
@@ -0,0 +1,5 @@
1
+ import { ApiWrapper } from '../../types';
2
+ import { JLandLog, JLandStat } from './jland';
3
+ export declare const jLandAdminLogsEmpty: ApiWrapper<Array<JLandLog>>;
4
+ export declare const jLandAdminLogsFull: ApiWrapper<Array<JLandLog>>;
5
+ export declare const jLandAdminStatsEmpty: ApiWrapper<Array<JLandStat>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
- import { ApiWrapper, SearchConfig, SearchQuery, SearchQueryResult, SearchResultCatProps, SearchLastQuery } from '../types';
2
- import { JBaseApi } from './base';
1
+ import { ApiWrapper, SearchConfig, SearchQuery, SearchQueryResult, SearchResultCatProps, SearchLastQuery, SearchAdminConfig } from '../../types';
2
+ import { JBaseApi } from '../base';
3
3
  export declare class JSearchApi extends JBaseApi {
4
4
  /**
5
5
  * return a completed version of the current config, taking in account platform installed modules
@@ -38,10 +38,10 @@ export declare class JSearchApi extends JBaseApi {
38
38
  /**
39
39
  * return the current platform json search-config object
40
40
  */
41
- getAdminConfig(): Promise<any>;
41
+ getAdminConfig(): Promise<ApiWrapper<SearchAdminConfig>>;
42
42
  /**
43
43
  * set the platform search-config to the given json object
44
44
  * @param config object. json search config
45
45
  */
46
- setAdminConfig(config: any): Promise<any>;
46
+ setAdminConfig(config: any): Promise<ApiWrapper<any>>;
47
47
  }
@@ -0,0 +1,13 @@
1
+ import { ApiWrapper, SearchAdminConfig, SearchConfig, SearchLastQuery, SearchQueryResult, SearchResultCatProps, jUserList } from '../../types';
2
+ export declare const searchGetAdminConfigDefault: ApiWrapper<SearchAdminConfig>;
3
+ export declare const searchGetConfigDefault: ApiWrapper<SearchConfig>;
4
+ export declare const searchPropositionGro: ApiWrapper<SearchResultCatProps[]>;
5
+ export declare const searchQueryAdmin: ApiWrapper<SearchQueryResult<jUserList>>;
6
+ export declare const searchSetAdminConfigTest: {
7
+ o: string;
8
+ f: string;
9
+ error: number;
10
+ messages: never[];
11
+ result: never[];
12
+ };
13
+ export declare const searchGetLastQueriesDefault: ApiWrapper<SearchLastQuery[]>;
@@ -0,0 +1 @@
1
+ export {};
@@ -69,8 +69,8 @@ export declare class JUserApi extends JBaseApi {
69
69
  userQueryList(payload: ObjectListProps): Promise<ApiWrapper<ListWrapper<UserModel>>>;
70
70
  userMap(payload: ObjectListProps): Promise<ApiWrapper<ListWrapper<UserMapModel>>>;
71
71
  userBusinessContactQueryList(query: ObjectListProps): Promise<ApiWrapper<ListWrapper<UserModel>>>;
72
- userCreateBusinessContact(user: BusinessContact): Promise<ApiWrapper<import("./article").BaseArticle[], string[]>>;
73
- userUpdateBusinessContact(user: BusinessContact): Promise<ApiWrapper<never, import("../types").BaseMessages>>;
72
+ userCreateBusinessContact(user: BusinessContact): Promise<ApiWrapper<import("../types").jArticleLittle[], import("../types").BaseMessages>>;
73
+ userUpdateBusinessContact(user: BusinessContact): Promise<ApiWrapper<import("../types").jArticleView, import("../types").BaseMessages>>;
74
74
  userDeleteBusinessContact(idArticle: number): Promise<ApiWrapper<boolean, import("../types").BaseMessages>>;
75
75
  userAddContact(idUser: number): Promise<ApiWrapper<unknown>>;
76
76
  userRemoveContact(idUser: number): Promise<ApiWrapper<unknown>>;
@@ -12,5 +12,6 @@ export default JamespotUserApiInstance;
12
12
  export * from './apis';
13
13
  export * from './types';
14
14
  export * from './util/network';
15
+ export * from './util/ensure';
15
16
  export * from './window';
16
17
  export declare const api: typeof JamespotUserApi;
@@ -1,7 +1,7 @@
1
1
  import { jUserLittle } from './user';
2
- import { jObjectLittle, Rights } from './utils';
2
+ import { jArticleLittle, jObjectLittle, Rights } from './utils';
3
3
  export declare type AseiTicketStatus = 'created' | 'validated' | 'handled';
4
- export declare type AseiTicket = jObjectLittle & {
4
+ export declare type AseiTicket = jArticleLittle & {
5
5
  _right: Rights;
6
6
  _user: jUserLittle;
7
7
  aseiClearanceTicketValidator: jObjectLittle[];
@@ -52,7 +52,7 @@ export declare type AseiTicket = jObjectLittle & {
52
52
  aseiClearanceTicketPosition: string;
53
53
  aseiClearanceTicketStatus: AseiTicketStatus;
54
54
  };
55
- export declare type AseiInstitution = jObjectLittle & {
55
+ export declare type AseiInstitution = jArticleLittle & {
56
56
  _right: Rights;
57
57
  _user: jUserLittle;
58
58
  aseiInstitutionValidator: jObjectLittle[];
@@ -1,8 +1,7 @@
1
1
  export interface BaseAutocomplete {
2
- value: string;
2
+ id: string;
3
3
  uri: string;
4
4
  shortUri: string;
5
- title: string;
6
5
  name: string;
7
6
  mainType: string;
8
7
  type: string;
@@ -10,7 +9,15 @@ export interface BaseAutocomplete {
10
9
  cssClass: string;
11
10
  cssColor: string;
12
11
  class: string;
13
- Pseudo: string;
14
12
  }
15
- export declare type AudienceAutocomplete = BaseAutocomplete;
16
- export declare type CommunityAutocomplete = BaseAutocomplete;
13
+ export declare type jObjectAutocomplete = BaseAutocomplete & {
14
+ title: string;
15
+ };
16
+ export declare type jUserAutocomplete = jObjectAutocomplete & {
17
+ Pseudo: string;
18
+ };
19
+ export declare type jSpotAutocomplete = jObjectAutocomplete & {
20
+ idspot: string;
21
+ };
22
+ export declare type AudienceAutocomplete = jObjectAutocomplete | jUserAutocomplete | jSpotAutocomplete;
23
+ export declare type CommunityAutocomplete = jObjectAutocomplete;
@@ -1,14 +1,43 @@
1
- export declare type Bookmark = {
2
- id: number;
3
- type: string;
4
- targetId?: number;
5
- targetType?: string;
6
- bookmarkUrl?: string;
1
+ import { jLinkList, jObjectBase, jObjectLittle } from './utils';
2
+ export declare type BookmarkRawList<T extends jObjectBase = jObjectLittle> = jLinkList<T> & {
3
+ bookmarkUrl?: string | null;
7
4
  bookmarkOrder?: number;
8
5
  bookmarkLabel?: string;
9
- bookmarkMeta?: string;
10
- _cssClass: string;
6
+ bookmarkMeta?: string | null;
7
+ url?: string | null;
8
+ type: 'bookmarkLink';
9
+ };
10
+ export declare type BookmarkList<T extends jObjectBase = jObjectLittle> = {
11
+ id: number;
12
+ mainType: string;
13
+ type: string;
14
+ uri: string;
15
+ _values?: {
16
+ dateCreation: string;
17
+ dateModified: string;
18
+ };
19
+ srcId: number;
20
+ srcType: string;
21
+ targetId: number;
22
+ targetType: string | null;
23
+ value: string | null;
11
24
  _cssColor: string;
12
- _values?: Record<string, string>;
13
- url?: string;
25
+ _cssClass: string;
26
+ _src?: T;
27
+ _target?: T;
28
+ bookmarkUrl?: string | null;
29
+ bookmarkOrder?: string;
30
+ bookmarkLabel?: string;
31
+ bookmarkMeta?: string | null;
32
+ url?: string | null;
33
+ };
34
+ export declare type BookmarkLink = {
35
+ targetId: number;
36
+ targetType: string;
37
+ format?: keyof BookmarkTypes;
38
+ };
39
+ export declare type BookmarkCustom = Pick<BookmarkTypes[keyof BookmarkTypes], 'bookmarkLabel' | 'bookmarkMeta' | 'bookmarkUrl'>;
40
+ export declare type BookmarkTypes = {
41
+ 'raw-list': BookmarkRawList;
42
+ list: BookmarkList;
14
43
  };