jamespot-user-api 1.0.98 → 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 (141) 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 +5 -5
  13. package/documentation/classes/JFilebankApi.html +1 -1
  14. package/documentation/classes/JGroupApi.html +7 -7
  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.fetch.base-config.d.ts → jest.config.d.ts} +4 -0
  63. package/lib/{jest.fetch.config.d.ts → jest.config.vm.d.ts} +6 -3
  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/index.d.ts +5 -5
  82. package/lib/src/apis/jamespotUserApi.d.ts +5 -5
  83. package/lib/src/apis/{jland.d.ts → jland/jland.d.ts} +6 -4
  84. package/lib/src/apis/jland/jland.mock.d.ts +5 -0
  85. package/lib/src/apis/jland/jland.test.d.ts +1 -0
  86. package/lib/src/apis/{search.d.ts → search/search.d.ts} +4 -4
  87. package/lib/src/apis/search/search.mock.d.ts +13 -0
  88. package/lib/src/apis/search/search.test.d.ts +1 -0
  89. package/lib/src/apis/user.d.ts +2 -2
  90. package/lib/src/index.d.ts +1 -0
  91. package/lib/src/types/asei.d.ts +3 -3
  92. package/lib/src/types/autocomplete.d.ts +12 -5
  93. package/lib/src/types/bookmark.d.ts +39 -10
  94. package/lib/src/types/group.d.ts +5 -1
  95. package/lib/src/types/index.d.ts +1 -1
  96. package/lib/src/types/model.d.ts +7 -0
  97. package/lib/src/types/realtime.d.ts +25 -0
  98. package/lib/src/types/search.d.ts +43 -16
  99. package/lib/src/types/user.d.ts +6 -15
  100. package/lib/src/types/utils.d.ts +33 -14
  101. package/lib/src/util/Test.d.ts +9 -0
  102. package/lib/src/util/ensure.d.ts +15 -0
  103. package/lib/src/util/network.mock.d.ts +3 -0
  104. package/lib/src/window/index.d.ts +0 -1
  105. package/package.json +3 -5
  106. package/phpunitMock/articleCount-mpArticle.json +1 -0
  107. package/phpunitMock/articleCreate-mpArticle-little.json +18 -0
  108. package/phpunitMock/articleDelete-mpArticle.json +7 -0
  109. package/phpunitMock/articleGet-mpArticle-list.json +39 -0
  110. package/phpunitMock/articleUpdate-mpArticleView.json +39 -0
  111. package/phpunitMock/assetReservationConfiguration-default.json +14 -0
  112. package/phpunitMock/assetReservationConfiguration-updated.json +14 -0
  113. package/phpunitMock/autocompleteAudience-u.json +64 -0
  114. package/phpunitMock/jLandAdminLogs-empty.json +1 -0
  115. package/phpunitMock/jLandAdminLogs-full.json +98 -0
  116. package/phpunitMock/jLandAdminStats-empty.json +1 -0
  117. package/phpunitMock/licenseManagerAssignLicense-default.json +7 -0
  118. package/phpunitMock/licenseManagerAssignLicense-isAssignLicense.json +1 -0
  119. package/phpunitMock/licenseManagerCountLicensesNotAssigned-count.json +15 -0
  120. package/phpunitMock/licenseManagerGetLicensesAssigned-default.json +48 -0
  121. package/phpunitMock/licenseManagerUnassignLicense-default.json +7 -0
  122. package/phpunitMock/licenseManagerUnassignLicense-isUnassign.json +1 -0
  123. package/phpunitMock/objectListJamespotArticleList-mpArticle-little.json +115 -0
  124. package/phpunitMock/searchGetAdminConfig-default.json +22 -0
  125. package/phpunitMock/searchGetConfig-default.json +249 -0
  126. package/phpunitMock/searchGetLastQueries-default.json +7 -0
  127. package/phpunitMock/searchProposition-gro.json +60 -0
  128. package/phpunitMock/searchQuery-admin.json +53 -0
  129. package/phpunitMock/searchSetAdminConfig-test.json +1 -0
  130. package/phpunitMock/studioList-testUserApiList.json +114 -0
  131. package/documentation/classes/WindowMock.html +0 -10
  132. package/documentation/interfaces/Result.html +0 -1
  133. package/documentation/interfaces/SearchResultProps.html +0 -1
  134. package/jest.fetch.config.ts +0 -7
  135. package/jest.fetch.jenkinsdev.config.ts +0 -7
  136. package/jest.mock.config.ts +0 -8
  137. package/lib/jest.fetch.jenkinsdev.config.d.ts +0 -12
  138. package/lib/jest.mock.config.d.ts +0 -12
  139. package/lib/src/types/application.d.ts +0 -15
  140. package/lib/src/window/WindowJestFetch.d.ts +0 -6
  141. 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,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
  };
@@ -40,7 +40,11 @@ export interface Category {
40
40
  idorder: number;
41
41
  label: string;
42
42
  }
43
- export declare type GroupList = jObjectLittle & {
43
+ export declare type GroupLittle = jObjectLittle & {
44
+ dateCreation: string;
45
+ dateModified: string;
46
+ };
47
+ export declare type GroupList = GroupLittle & {
44
48
  description: string;
45
49
  privacy: string;
46
50
  edito: string;
@@ -1,5 +1,4 @@
1
1
  export * from './adminStore';
2
- export * from './application';
3
2
  export * from './asei';
4
3
  export * from './assetReservation';
5
4
  export * from './autocomplete';
@@ -14,3 +13,4 @@ export * from './user';
14
13
  export * from './utils';
15
14
  export * from './wedoc';
16
15
  export * from './widgets';
16
+ export * from './realtime';
@@ -1,6 +1,7 @@
1
1
  export declare type WidgetText = {
2
2
  type: 'text';
3
3
  };
4
+ export declare type WidgetTextValue = string;
4
5
  export declare type WidgetTextarea = {
5
6
  type: 'textarea';
6
7
  params?: {
@@ -8,13 +9,16 @@ export declare type WidgetTextarea = {
8
9
  mention: '1';
9
10
  };
10
11
  };
12
+ export declare type WidgetTextareaValue = string;
11
13
  export declare type WidgetNumber = {
12
14
  type: 'number';
13
15
  };
16
+ export declare type WidgetNumberValue = number;
14
17
  export declare type WidgetDate = {
15
18
  type: 'date';
16
19
  format: string;
17
20
  };
21
+ export declare type WidgetDateValue = string;
18
22
  export declare type WidgetDatetime = {
19
23
  type: 'datetime';
20
24
  };
@@ -39,12 +43,14 @@ export declare type WidgetSelect<U extends string = string> = {
39
43
  export declare type WidgetEmail = {
40
44
  type: 'email';
41
45
  };
46
+ export declare type WidgetEmailValue = string;
42
47
  export declare type WidgetUrl = {
43
48
  type: 'url';
44
49
  params: {
45
50
  target?: '_blank';
46
51
  };
47
52
  };
53
+ export declare type WidgetUrlValue = string;
48
54
  export declare type WidgetRefUser = {
49
55
  type: 'refUser';
50
56
  };
@@ -82,6 +88,7 @@ export declare type WidgetUri = {
82
88
  };
83
89
  };
84
90
  export declare type Widget = WidgetText | WidgetTextarea | WidgetNumber | WidgetDate | WidgetDatetime | WidgetDatePicker | WidgetSelect | WidgetEmail | WidgetUrl | WidgetRefUser | WidgetRadio | WidgetCheckbox | WidgetOrientedlinks | WidgetTaxonomy | WidgetUri | WidgetTransient | WidgetMultiattribute | WidgetFile;
91
+ export declare type WidgetsValue = WidgetTextValue | WidgetTextareaValue | WidgetNumberValue | WidgetDateValue | WidgetEmailValue | WidgetUrlValue;
85
92
  export declare type FieldConfiguration<T extends string = string> = {
86
93
  label: string;
87
94
  description?: string;
@@ -0,0 +1,25 @@
1
+ import { jObjectBase } from './utils';
2
+ declare type BookmarksFunctions = 'update' | 'add' | 'delete';
3
+ declare type CustomActionFunctions = 'update' | 'add' | 'remove';
4
+ export declare type Namespaces = {
5
+ BOOKMARKS: BookmarksFunctions;
6
+ 'CUSTOM-ACTION': CustomActionFunctions;
7
+ };
8
+ export declare type RTMessageHandler<T extends keyof Namespaces = 'CUSTOM-ACTION'> = {
9
+ namespace: T;
10
+ function: Namespaces[T];
11
+ handler: (message: RTMessage<T>) => any;
12
+ };
13
+ export declare type AnyRTHandlerFunction = {
14
+ [K in keyof Namespaces]: RTMessageHandler<K>['handler'];
15
+ }[keyof Namespaces];
16
+ export declare type RTMessage<T extends keyof Namespaces = 'CUSTOM-ACTION', O extends jObjectBase = jObjectBase> = {
17
+ namespace: T;
18
+ function: Namespaces[T];
19
+ object: O;
20
+ };
21
+ export declare type AnyRTMessage = {
22
+ [K in keyof Namespaces]: RTMessage<K>;
23
+ }[keyof Namespaces];
24
+ export declare type RTReceivedMessage<T extends keyof Namespaces> = ['message', RTMessage<T>];
25
+ export {};