jamespot-user-api 1.0.140 → 1.0.141

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 (106) 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/JBusinessNetworkingApi.html +1 -0
  12. package/documentation/classes/JCommunityApi.html +1 -1
  13. package/documentation/classes/JDiapazoneApi.html +1 -1
  14. package/documentation/classes/JFaqApi.html +1 -1
  15. package/documentation/classes/JFileApi.html +5 -5
  16. package/documentation/classes/JFilebankApi.html +1 -1
  17. package/documentation/classes/JGlobalApi.html +1 -0
  18. package/documentation/classes/JGroupApi.html +9 -9
  19. package/documentation/classes/JLandApi.html +1 -1
  20. package/documentation/classes/JMessengerApi.html +1 -1
  21. package/documentation/classes/JObjectApi.html +1 -1
  22. package/documentation/classes/JSearchApi.html +6 -6
  23. package/documentation/classes/JShareApi.html +1 -1
  24. package/documentation/classes/JSocialActionApi.html +1 -0
  25. package/documentation/classes/JTaxonomyApi.html +2 -2
  26. package/documentation/classes/JUserApi.html +6 -6
  27. package/documentation/classes/JWedocApi.html +1 -1
  28. package/documentation/classes/JamespotUserApi.html +1 -1
  29. package/documentation/classes/Network.html +1 -1
  30. package/documentation/classes/TVDisplayApi.html +1 -1
  31. package/documentation/classes/WindowBrowser.html +1 -1
  32. package/documentation/enums/StudioApplicationStatus.html +1 -1
  33. package/documentation/index.html +1 -1
  34. package/documentation/interfaces/AccessRightObject.html +1 -1
  35. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  36. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  37. package/documentation/interfaces/ApiWrapper.html +1 -1
  38. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  39. package/documentation/interfaces/BaseMessage.html +1 -1
  40. package/documentation/interfaces/Category.html +1 -1
  41. package/documentation/interfaces/FileBankProps.html +1 -1
  42. package/documentation/interfaces/FolderProps.html +1 -1
  43. package/documentation/interfaces/ListFilterSpec.html +1 -1
  44. package/documentation/interfaces/OF.html +1 -1
  45. package/documentation/interfaces/ObjectListProps.html +1 -1
  46. package/documentation/interfaces/PagingResults.html +1 -1
  47. package/documentation/interfaces/RootFolderProps.html +1 -1
  48. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  49. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  50. package/documentation/interfaces/SearchConfig.html +1 -1
  51. package/documentation/interfaces/SearchFacetModel.html +1 -1
  52. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  53. package/documentation/interfaces/SearchQuery.html +1 -1
  54. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  55. package/documentation/interfaces/SearchQueryOption.html +1 -1
  56. package/documentation/interfaces/SearchQueryResult.html +1 -1
  57. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  58. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  59. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  60. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  61. package/documentation/interfaces/SpotProps.html +1 -1
  62. package/documentation/interfaces/Taxonomy.html +1 -1
  63. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  64. package/documentation/interfaces/WindowInterface.html +1 -1
  65. package/documentation/modules.html +11 -11
  66. package/lib/jamespot-user-api.js +1 -1
  67. package/lib/jamespot-user-api.js.map +1 -1
  68. package/lib/src/apis/article/article.d.ts +13 -32
  69. package/lib/src/apis/article/article.mock.d.ts +6 -1
  70. package/lib/src/apis/businessNetworking/businessNetworking.d.ts +5 -0
  71. package/lib/src/apis/businessNetworking/businessNetworking.mock.d.ts +2 -0
  72. package/lib/src/apis/businessNetworking/businessNetworking.test.d.ts +1 -0
  73. package/lib/src/apis/global/global.d.ts +6 -0
  74. package/lib/src/apis/global/global.mock.d.ts +2 -0
  75. package/lib/src/apis/global/global.test.d.ts +1 -0
  76. package/lib/src/apis/index.d.ts +3 -0
  77. package/lib/src/apis/jamespotUserApi.d.ts +8 -2
  78. package/lib/src/apis/jland/jland.d.ts +1 -1
  79. package/lib/src/apis/socialAction/socialAction.d.ts +8 -0
  80. package/lib/src/apis/socialAction/socialAction.mock.d.ts +4 -0
  81. package/lib/src/apis/socialAction/socialAction.test.d.ts +1 -0
  82. package/lib/src/apis/user/user.d.ts +2 -1
  83. package/lib/src/apis/user/user.mock.d.ts +2 -1
  84. package/lib/src/types/article.d.ts +56 -0
  85. package/lib/src/types/comment.d.ts +4 -0
  86. package/lib/src/types/faq.d.ts +3 -1
  87. package/lib/src/types/global.d.ts +19 -0
  88. package/lib/src/types/index.d.ts +2 -0
  89. package/lib/src/types/realtime.d.ts +10 -3
  90. package/lib/src/types/socialAction.d.ts +10 -0
  91. package/lib/src/types/tvDisplay.d.ts +2 -1
  92. package/lib/src/types/user.d.ts +6 -1
  93. package/lib/src/types/utils.d.ts +1 -1
  94. package/package.json +1 -1
  95. package/phpunitMock/activityLogLog-success.json +7 -0
  96. package/phpunitMock/articleAddComment-success.json +57 -0
  97. package/phpunitMock/articleGetComments-success.json +59 -0
  98. package/phpunitMock/articleUpdateComment-success.json +62 -0
  99. package/phpunitMock/businessNetworkingMarkerInfo-success.json +16 -0
  100. package/phpunitMock/commentDelete-success.json +11 -0
  101. package/phpunitMock/customActionAdd-success.json +18 -0
  102. package/phpunitMock/customActionGetUsers-success.json +24 -0
  103. package/phpunitMock/customActionRemove-success.json +7 -0
  104. package/phpunitMock/tvDisplayGetChannel-dynamic.json +214 -209
  105. package/phpunitMock/tvDisplayGetConfigureChannel-dynamic.json +206 -194
  106. package/phpunitMock/userGetFields-success.json +20 -0
@@ -1,34 +1,7 @@
1
1
  import { JBaseApi } from '../base';
2
- import { ApiWrapper, BaseMessages, Filters, jArticleList, jArticleLittle, jFileLittle, MaybeWithToken, Orders, PagingResults } from '../../types';
3
- export type ArticleListConfig = {
4
- type?: string;
5
- format?: string;
6
- query?: string;
7
- limit?: number;
8
- page?: number;
9
- orders?: Orders;
10
- filters?: Filters | undefined;
11
- };
12
- export type ArticleGetConfig = {
13
- uri?: string;
14
- idArticle?: number;
15
- format?: string;
16
- };
17
- export type ArticleCreation = {
18
- title?: string;
19
- description?: string | null;
20
- type?: string;
21
- publishTo?: string;
22
- idSpot?: Array<string>;
23
- };
24
- export type BaseArticle = {
25
- id: number;
26
- type: string;
27
- dateCreation: string;
28
- dateModified: string;
29
- title: string;
30
- uri: string;
31
- };
2
+ import { AddCommentParams, ApiWrapper, BaseMessages, UpdateCommentParams, Format, jArticleList, jArticleLittle, jFileLittle, MaybeWithToken, PagingResults, UserRead } from '../../types';
3
+ import { ArticleCreation, ArticleGetConfig, ArticleListConfig, GetCommentsParams } from '../../types/article';
4
+ import { jCommentLittle } from '../../types/comment';
32
5
  export type DraftSerializedForm = {
33
6
  name: string;
34
7
  value: unknown;
@@ -36,16 +9,24 @@ export type DraftSerializedForm = {
36
9
  export declare class JArticleApi extends JBaseApi {
37
10
  list<T extends jArticleLittle = jArticleLittle>(config: ArticleListConfig): Promise<ApiWrapper<PagingResults<T>>>;
38
11
  get<T extends jArticleLittle = jArticleLittle>(config: ArticleGetConfig): Promise<ApiWrapper<T, BaseMessages>>;
39
- create<R extends jArticleLittle = jArticleLittle, P extends ArticleCreation = ArticleCreation>(article: MaybeWithToken<P>, format?: string): Promise<ApiWrapper<Array<R>, BaseMessages>>;
12
+ create<R extends jArticleLittle = jArticleLittle, P extends ArticleCreation = ArticleCreation>(article: MaybeWithToken<P>, format?: Format): Promise<ApiWrapper<Array<R>, BaseMessages>>;
40
13
  update<T extends {
41
14
  uri: string;
42
15
  }, U extends jArticleLittle = jArticleList>(article: T): Promise<ApiWrapper<U, BaseMessages>>;
43
16
  delete(id: number): Promise<ApiWrapper<boolean, BaseMessages>>;
44
17
  count(type: string): Promise<ApiWrapper<number>>;
45
- getAttachments(id: number, type: string, format?: string): Promise<ApiWrapper<jFileLittle[]>>;
18
+ getAttachments(id: number, type: string, format?: Format): Promise<ApiWrapper<jFileLittle[]>>;
46
19
  permalink(permalinkId: string): Promise<ApiWrapper<jArticleLittle>>;
47
20
  saveAsDraft(form: Record<string, unknown>, contentType: string, idDraft?: string): Promise<ApiWrapper<{
48
21
  idDraft: string;
49
22
  msg: string;
50
23
  }>>;
24
+ getComments<T extends jCommentLittle = jCommentLittle>(params: GetCommentsParams, format?: Format): Promise<ApiWrapper<T[]>>;
25
+ addComment<T extends jCommentLittle = jCommentLittle>(params: AddCommentParams, format?: Format): Promise<ApiWrapper<T>>;
26
+ updateComment<T extends jCommentLittle = jCommentLittle>(params: UpdateCommentParams, format?: Format): Promise<ApiWrapper<T>>;
27
+ deleteComment(idComment: number): Promise<ApiWrapper<void>>;
28
+ getRead(uri: string): Promise<ApiWrapper<{
29
+ count: number;
30
+ list: UserRead[];
31
+ }>>;
51
32
  }
@@ -1,4 +1,5 @@
1
- import { ApiWrapper, BaseMessages, PagingResults, jArticleList, jArticleLittle, jArticleView, jArticleWidgetLittle, jFileLittle } from '../../types';
1
+ import { ApiWrapper, BaseMessages, PagingResults, jArticleList, jArticleLittle, jArticleView, jArticleWidgetLittle, jFileLittle, ApiDefaultWrapper } from '../../types';
2
+ import { jCommentList } from '../../types/comment';
2
3
  export declare const articleGetMpArticleList: ApiWrapper<jArticleList, BaseMessages>;
3
4
  export declare const articleCreateMpArticleLittle: ApiWrapper<Array<jArticleLittle>, BaseMessages>;
4
5
  export declare const articleUpdateMpArticleView: ApiWrapper<jArticleView, BaseMessages>;
@@ -11,3 +12,7 @@ export declare const articleSaveAsDraft: ApiWrapper<{
11
12
  idDraft: string;
12
13
  msg: string;
13
14
  }, BaseMessages>;
15
+ export declare const articleGetComments: ApiWrapper<jCommentList[]>;
16
+ export declare const articleAddComment: ApiWrapper<jCommentList>;
17
+ export declare const articleUpdateComment: ApiWrapper<jCommentList>;
18
+ export declare const articleDeleteComment: ApiDefaultWrapper;
@@ -0,0 +1,5 @@
1
+ import { JBaseApi } from '../base';
2
+ import { ApiWrapper, Format, jObjectLittle } from '../../types';
3
+ export declare class JBusinessNetworkingApi extends JBaseApi {
4
+ getInfos<T extends jObjectLittle = jObjectLittle>(id: number, format?: Format): Promise<ApiWrapper<T>>;
5
+ }
@@ -0,0 +1,2 @@
1
+ import { ApiWrapper, jObjectLittle } from '../../types';
2
+ export declare const businessNetworkingGetInfos: ApiWrapper<jObjectLittle>;
@@ -0,0 +1,6 @@
1
+ import { JBaseApi } from '../base';
2
+ import { ApiWrapper } from '../../types';
3
+ import { ActionVerb } from '../../types/global';
4
+ export declare class JGlobalApi extends JBaseApi {
5
+ countAction(verb: ActionVerb, uri: string): Promise<ApiWrapper<number>>;
6
+ }
@@ -0,0 +1,2 @@
1
+ import { ApiWrapper } from '../../types';
2
+ export declare const mockCountAction: ApiWrapper<number>;
@@ -0,0 +1 @@
1
+ export {};
@@ -5,17 +5,20 @@ export * from './assetReservation/assetReservation';
5
5
  export * from './audience/audience';
6
6
  export * from './base';
7
7
  export * from './bookmark/bookmark';
8
+ export * from './businessNetworking/businessNetworking';
8
9
  export * from './community';
9
10
  export * from './diapazone/diapazone';
10
11
  export * from './file/file';
11
12
  export * from './faq/faq';
12
13
  export * from './filebank';
14
+ export * from './global/global';
13
15
  export * from './group';
14
16
  export * from './jamespotUserApi';
15
17
  export * from './jland/jland';
16
18
  export * from './messenger';
17
19
  export * from './object/object';
18
20
  export * from './share/share';
21
+ export * from './socialAction/socialAction';
19
22
  export * from './search/search';
20
23
  export * from './share/share';
21
24
  export * from './user/user';
@@ -9,7 +9,7 @@ import { JDiapazoneApi } from './diapazone/diapazone';
9
9
  import { JDriveApi } from './drive/drive';
10
10
  import { JFileApi } from './file/file';
11
11
  import { JFilebankApi } from './filebank';
12
- import { JGroupApi } from './group/group';
12
+ import { JGroupApi } from './group';
13
13
  import { JMediaLibraryApi } from './mediaLibrary/mediaLibrary';
14
14
  import { JLandApi } from './jland/jland';
15
15
  import { JMessengerApi } from './messenger';
@@ -18,12 +18,15 @@ import { JBookmarkApi } from './bookmark/bookmark';
18
18
  import { JTaxonomyApi } from './taxonomy';
19
19
  import { JUserApi } from './user/user';
20
20
  import { JWedocApi } from './wedoc/wedoc';
21
- import { Network } from '../util/network';
21
+ import { Network } from '../util';
22
22
  import { TVDisplayApi } from './tvDisplay/tvDisplay';
23
23
  import { JShareApi } from './share/share';
24
24
  import { JFaqApi } from './faq/faq';
25
25
  import { JObjectApi } from './object/object';
26
26
  import { JFileSyncApi } from './fileSync/fileSync';
27
+ import { JGlobalApi } from './global/global';
28
+ import { JSocialActionApi } from './socialAction/socialAction';
29
+ import { JBusinessNetworkingApi } from './businessNetworking/businessNetworking';
27
30
  /**
28
31
  * In browser usage, 'window' should be the window object.
29
32
  * In server side usage, 'window' object given must implement the fetch method, used by the Apis.
@@ -45,6 +48,7 @@ export declare class JamespotUserApi {
45
48
  assetReservation: JAssetReservation;
46
49
  audience: JAudienceApi;
47
50
  bookmark: JBookmarkApi;
51
+ businessNetworking: JBusinessNetworkingApi;
48
52
  community: JCommunityApi;
49
53
  diapazone: JDiapazoneApi;
50
54
  drive: JDriveApi;
@@ -52,6 +56,7 @@ export declare class JamespotUserApi {
52
56
  file: JFileApi;
53
57
  filebank: JFilebankApi;
54
58
  fileSync: JFileSyncApi;
59
+ global: JGlobalApi;
55
60
  group: JGroupApi;
56
61
  jland: JLandApi;
57
62
  mediaLibrary: JMediaLibraryApi;
@@ -59,6 +64,7 @@ export declare class JamespotUserApi {
59
64
  object: JObjectApi;
60
65
  search: JSearchApi;
61
66
  share: JShareApi;
67
+ socialAction: JSocialActionApi;
62
68
  taxonomy: JTaxonomyApi;
63
69
  tvDisplay: TVDisplayApi;
64
70
  user: JUserApi;
@@ -1,6 +1,6 @@
1
1
  import { JBaseApi } from '../base';
2
2
  import { ApiWrapper, jArticleList, License, MaybeWithToken, PagingResults } from '../../types';
3
- import { ArticleCreation } from '../article/article';
3
+ import { ArticleCreation } from '../../types/article';
4
4
  export type JLandLog = {
5
5
  idLog: number;
6
6
  slug: string;
@@ -0,0 +1,8 @@
1
+ import { JBaseApi } from '../base';
2
+ import { AddRemoveActionParams, ApiWrapper, Format, jLinkLittle, jUserList, jUserLittle } from '../../types';
3
+ import { GetActionUsersParams } from '../../types';
4
+ export declare class JSocialActionApi extends JBaseApi {
5
+ getUsers<T extends jUserLittle = jUserList>(params: GetActionUsersParams, format?: Format): Promise<ApiWrapper<T[]>>;
6
+ add<T extends jLinkLittle = jLinkLittle>(params: AddRemoveActionParams, format?: Format): Promise<ApiWrapper<T>>;
7
+ remove(params: AddRemoveActionParams, format?: Format): Promise<ApiWrapper<boolean>>;
8
+ }
@@ -0,0 +1,4 @@
1
+ import { ApiWrapper, jLinkLittle, jUserList } from '../../types';
2
+ export declare const socialActionGetUsers: ApiWrapper<jUserList[]>;
3
+ export declare const socialActionAdd: ApiWrapper<jLinkLittle>;
4
+ export declare const socialActionRemove: ApiWrapper<boolean>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { JBaseApi } from '../base';
2
- import { ApiWrapper, Little, jObjectLittle, UserModel, UserMapModel, jUserAutocomplete, ApiPagingResults, ApiDefaultWrapper, jUserLittle, Readable, jUserValues, UserFieldsConfigurationType } from '../../types';
2
+ import { ApiWrapper, Little, jObjectLittle, UserModel, UserMapModel, jUserAutocomplete, ApiPagingResults, ApiDefaultWrapper, jUserLittle, Readable, jUserValues, UserFieldsConfigurationType, UserFieldsType, UserField } from '../../types';
3
3
  export type User = Little & {
4
4
  id: string;
5
5
  shortUri: string;
@@ -99,4 +99,5 @@ export declare class JUserApi extends JBaseApi {
99
99
  * @param pwd Password to be validated
100
100
  */
101
101
  signIn(mail: string, pwd: string): Promise<ApiWrapper<jUserAutocomplete, import("../../types").BaseMessages>>;
102
+ getFields(idUser: number, fieldsType: UserFieldsType): Promise<ApiWrapper<UserField[], import("../../types").BaseMessages>>;
102
103
  }
@@ -1,4 +1,4 @@
1
- import { ApiDefaultWrapper, ApiPagingResults, ApiWrapper, UserMapModel, jUserAutocomplete, jUserList, jUserView, jUserLittle, UserFieldsConfigurationType, UserModel } from '../../types';
1
+ import { ApiDefaultWrapper, ApiPagingResults, ApiWrapper, UserMapModel, jUserAutocomplete, jUserList, jUserView, jUserLittle, UserFieldsConfigurationType, UserModel, UserField } from '../../types';
2
2
  import { UserDirectoryConfiguration, UserValues } from './user';
3
3
  export declare const userAutocompleteA: ApiWrapper<jUserAutocomplete[]>;
4
4
  export declare const userGetUser1: ApiWrapper<jUserView>;
@@ -12,3 +12,4 @@ export declare const userQueryListRawList: ApiPagingResults<jUserList>;
12
12
  export declare const userMapDefault: ApiPagingResults<UserMapModel>;
13
13
  export declare const userAddContactDefault: ApiDefaultWrapper;
14
14
  export declare const userRemoveContactDefault: ApiDefaultWrapper;
15
+ export declare const userGetFields: ApiWrapper<UserField[]>;
@@ -0,0 +1,56 @@
1
+ import { Filters, Orders } from './utils';
2
+ export type ArticleListConfig = {
3
+ type?: string;
4
+ format?: string;
5
+ query?: string;
6
+ limit?: number;
7
+ page?: number;
8
+ orders?: Orders;
9
+ filters?: Filters | undefined;
10
+ };
11
+ export type ArticleGetConfig = {
12
+ uri?: string;
13
+ idArticle?: number;
14
+ format?: string;
15
+ };
16
+ export type ArticleCreation = {
17
+ title?: string;
18
+ description?: string | null;
19
+ type?: string;
20
+ publishTo?: string;
21
+ idSpot?: Array<string>;
22
+ };
23
+ export type BaseArticle = {
24
+ id: number;
25
+ type: string;
26
+ dateCreation: string;
27
+ dateModified: string;
28
+ title: string;
29
+ uri: string;
30
+ };
31
+ export type GetCommentsParams = {
32
+ attachment?: boolean;
33
+ idArticle: number;
34
+ limits?: {
35
+ max: number;
36
+ start: number;
37
+ };
38
+ };
39
+ export type AddCommentParams = {
40
+ token: string;
41
+ content: string;
42
+ idArticle: number;
43
+ sendAlert: boolean;
44
+ alertAuthor: boolean;
45
+ };
46
+ export type UpdateCommentParams = {
47
+ token: string;
48
+ description: string;
49
+ idComment: number;
50
+ };
51
+ export type UserRead = {
52
+ idUser: string;
53
+ dateRead: string;
54
+ Pseudo: string;
55
+ type: string;
56
+ };
@@ -1,5 +1,7 @@
1
1
  import { jUserLittle } from './user';
2
2
  import { Readable, Rights, jObjectBase } from './utils';
3
+ import { jFileLittle } from './file';
4
+ import { SocialAction } from './global';
3
5
  export type jCommentLittle = Readable<Omit<jObjectBase, 'dateModified'> & {
4
6
  dateCreation: string;
5
7
  dateModified: string | null;
@@ -8,4 +10,6 @@ export type jCommentLittle = Readable<Omit<jObjectBase, 'dateModified'> & {
8
10
  }>;
9
11
  export type jCommentList = jCommentLittle & {
10
12
  _right: Rights;
13
+ _attachedFiles?: jFileLittle[];
14
+ _actions?: Record<string, SocialAction>;
11
15
  };
@@ -1,7 +1,8 @@
1
1
  import { Format, jArticleList, jArticleLittle, MaybeWithToken } from './utils';
2
- import { ArticleCreation, AutoCompleteConcept } from '../apis';
2
+ import { AutoCompleteConcept } from '../apis';
3
3
  import { ImageSize } from './file';
4
4
  import { AudienceAutocomplete } from './autocomplete';
5
+ import { ArticleCreation } from './article';
5
6
  export type FaqView = FaqList & {
6
7
  _audience: AudienceAutocomplete[];
7
8
  tags?: AutoCompleteConcept[];
@@ -61,6 +62,7 @@ export type FaqHookProperties = {
61
62
  type: string;
62
63
  };
63
64
  };
65
+ _displayComment?: '0' | '1' | '';
64
66
  };
65
67
  export type FaqAccess = {
66
68
  createCategory: boolean;
@@ -0,0 +1,19 @@
1
+ export type ActionVerb = 'read';
2
+ export type SocialAction = {
3
+ type: string;
4
+ class: string;
5
+ isActive: boolean;
6
+ label: string;
7
+ cssClass: string;
8
+ cssColor: string;
9
+ struct: {
10
+ action: string;
11
+ do: string;
12
+ type: string;
13
+ targetId: number;
14
+ targetType: string;
15
+ };
16
+ stats: {
17
+ total: number;
18
+ };
19
+ };
@@ -1,6 +1,7 @@
1
1
  export * from './adminLicence';
2
2
  export * from './adminStore';
3
3
  export * from './adminUtils';
4
+ export * from './article';
4
5
  export * from './asei';
5
6
  export * from './assetReservation';
6
7
  export * from './autocomplete';
@@ -14,6 +15,7 @@ export * from './model';
14
15
  export * from './network';
15
16
  export * from './search';
16
17
  export * from './share';
18
+ export * from './socialAction';
17
19
  export * from './tvDisplay';
18
20
  export * from './tinymce';
19
21
  export * from './user';
@@ -1,10 +1,12 @@
1
1
  import { AllKeys, Readable, jObjectBase } from './utils';
2
2
  type BookmarksFunctions = 'update' | 'add' | 'delete';
3
3
  type CustomActionFunctions = 'update' | 'add' | 'remove';
4
+ type JamespotFunctions = 'comment-create' | 'comment-delete' | 'comment-update';
4
5
  type WSFunctions = 'presence' | 'connection' | 'disconnect';
5
6
  export type Namespaces = {
6
7
  BOOKMARKS: BookmarksFunctions;
7
8
  'CUSTOM-ACTION': CustomActionFunctions;
9
+ JAMESPOT: JamespotFunctions;
8
10
  ws: WSFunctions;
9
11
  };
10
12
  export type AllMessages = {
@@ -18,6 +20,11 @@ export type AllMessages = {
18
20
  add: RTMessageObject<'CUSTOM-ACTION', 'add'>;
19
21
  remove: RTMessageObject<'CUSTOM-ACTION', 'remove'>;
20
22
  };
23
+ JAMESPOT: {
24
+ 'comment-create': RTMessageObject<'JAMESPOT', 'comment-create'>;
25
+ 'comment-delete': RTMessageObject<'JAMESPOT', 'comment-delete'>;
26
+ 'comment-update': RTMessageObject<'JAMESPOT', 'comment-update'>;
27
+ };
21
28
  ws: {
22
29
  presence: RTMessageWsPresence;
23
30
  connection: RTMessage<'ws', 'connection'>;
@@ -40,12 +47,12 @@ export type RTMessage<T extends keyof Namespaces, F extends Namespaces[T]> = {
40
47
  namespace: T;
41
48
  function: F;
42
49
  };
43
- export type RTMessageObject<T extends keyof Namespaces, F extends Namespaces[T], O extends jObjectBase = jObjectBase> = RTMessage<T, F> & {
44
- object: O;
50
+ export type RTMessageObject<T extends keyof Namespaces, F extends Namespaces[T], O = {}> = RTMessage<T, F> & {
51
+ object: jObjectBase & Partial<O>;
45
52
  };
46
53
  export type RTMessageWsPresence = RTMessage<'ws', 'presence'> & {
47
54
  idUsers: number[];
48
55
  };
49
- export type AnyRTMessage = RTMessageObject<'BOOKMARKS', 'update'> | RTMessageObject<'BOOKMARKS', 'add'> | RTMessageObject<'BOOKMARKS', 'delete'> | RTMessageObject<'CUSTOM-ACTION', 'update'> | RTMessageObject<'CUSTOM-ACTION', 'add'> | RTMessageObject<'CUSTOM-ACTION', 'remove'> | RTMessageWsPresence | RTMessage<'ws', 'connection'> | RTMessage<'ws', 'disconnect'>;
56
+ export type AnyRTMessage<T = {}> = RTMessageObject<'BOOKMARKS', 'update', T> | RTMessageObject<'BOOKMARKS', 'add', T> | RTMessageObject<'BOOKMARKS', 'delete', T> | RTMessageObject<'CUSTOM-ACTION', 'update', T> | RTMessageObject<'CUSTOM-ACTION', 'add', T> | RTMessageObject<'CUSTOM-ACTION', 'remove', T> | RTMessageObject<'JAMESPOT', 'comment-create', T> | RTMessageObject<'JAMESPOT', 'comment-delete', T> | RTMessageObject<'JAMESPOT', 'comment-update', T> | RTMessageWsPresence | RTMessage<'ws', 'connection'> | RTMessage<'ws', 'disconnect'>;
50
57
  export type RTReceivedMessage<T extends keyof Namespaces, F extends Namespaces[T]> = ['message', RTMessage<T, F>];
51
58
  export {};
@@ -0,0 +1,10 @@
1
+ export type GetActionUsersParams = {
2
+ targetId: number;
3
+ targetType: string;
4
+ type: string;
5
+ };
6
+ export type AddRemoveActionParams = {
7
+ targetId: number;
8
+ targetType: string;
9
+ type: string;
10
+ };
@@ -1,7 +1,8 @@
1
- import { ArticleCreation, GroupLittle } from '../apis';
1
+ import { GroupLittle } from '../apis';
2
2
  import { jCommentList } from './comment';
3
3
  import { jFileLittle } from './file';
4
4
  import { Readable, jArticleList, jArticleLittle, jObjectList } from './utils';
5
+ import { ArticleCreation } from './article';
5
6
  export type TvChannelType = 'DYNAMIC' | 'SLIDESHOW';
6
7
  export type TVChannelCustom<T extends TvChannelType> = jObjectList & {
7
8
  tvChannelType: T;
@@ -26,10 +26,10 @@ export type jUserLittle = jObjectLittle & {
26
26
  level: (typeof UserLevel)[keyof typeof UserLevel];
27
27
  dateCreation: string;
28
28
  dateModified: string;
29
+ [key: string]: WidgetsValue;
29
30
  };
30
31
  export type jUserList = jUserLittle & {
31
32
  active: number;
32
- [key: string]: WidgetsValue;
33
33
  };
34
34
  export type jUserView = jUserList & {};
35
35
  export type jUserValues = Required<UserDefaultFieldsType> & {
@@ -72,3 +72,8 @@ export type UserFieldsConfigurationType = {
72
72
  pseudo: '0' | '1';
73
73
  };
74
74
  };
75
+ export type UserField = {
76
+ name: string;
77
+ value: string | object;
78
+ };
79
+ export type UserFieldsType = 'popover';
@@ -63,7 +63,7 @@ export type jObjectBase = {
63
63
  type: string;
64
64
  uri: string;
65
65
  dateCreation?: string;
66
- dateModified?: string;
66
+ dateModified?: string | null;
67
67
  };
68
68
  export type jObjectLittle = jObjectBase & {
69
69
  title: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.140",
3
+ "version": "1.0.141",
4
4
  "main": "lib/jamespot-user-api.js",
5
5
  "types": "lib/src/index.d.ts",
6
6
  "directories": {
@@ -0,0 +1,7 @@
1
+ {
2
+ "o": "activity",
3
+ "f": "logLog",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": 1
7
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "o": "article",
3
+ "f": "addComment",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": {
7
+ "id": 22,
8
+ "mainType": "comment",
9
+ "type": "comment",
10
+ "uri": "comment/22",
11
+ "dateCreation": "2024-03-04 14:31:49",
12
+ "dateModified": null,
13
+ "description": "<div class='content-html'>Comment for testArticleAddComment</div>",
14
+ "_user": {
15
+ "id": 4,
16
+ "mainType": "user",
17
+ "type": "user",
18
+ "uri": "user/4",
19
+ "dateCreation": "2019-07-09 15:48:26",
20
+ "dateModified": "2024-03-04 14:28:48",
21
+ "title": "Admin1",
22
+ "_url": "/user/4",
23
+ "level": 9
24
+ },
25
+ "_right": {
26
+ "create": true,
27
+ "read": true,
28
+ "publish": true,
29
+ "administrate": true,
30
+ "update": true,
31
+ "delete": true,
32
+ "comment": true,
33
+ "member": true
34
+ },
35
+ "_actions": {
36
+ "sociallike": {
37
+ "type": "custom",
38
+ "class": "fs-thumbs-up",
39
+ "cssClass": "comment",
40
+ "cssColor": "#76b9f2",
41
+ "isActive": false,
42
+ "label": "J'aime",
43
+ "struct": {
44
+ "action": "custom-action",
45
+ "do": "add",
46
+ "type": "sociallike",
47
+ "targetId": 22,
48
+ "targetType": "comment"
49
+ },
50
+ "stats": {
51
+ "total": 0
52
+ }
53
+ }
54
+ },
55
+ "_attachedFiles": []
56
+ }
57
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "o": "article",
3
+ "f": "getComments",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": [
7
+ {
8
+ "id": 23,
9
+ "mainType": "comment",
10
+ "type": "comment",
11
+ "uri": "comment/23",
12
+ "dateCreation": "2024-03-04 14:31:49",
13
+ "dateModified": null,
14
+ "description": "<div class='content-html'>Comment for testArticleGetComments</div>",
15
+ "_user": {
16
+ "id": 4,
17
+ "mainType": "user",
18
+ "type": "user",
19
+ "uri": "user/4",
20
+ "dateCreation": "2019-07-09 15:48:26",
21
+ "dateModified": "2024-03-04 14:28:48",
22
+ "title": "Admin1",
23
+ "_url": "/user/4",
24
+ "level": 9
25
+ },
26
+ "_right": {
27
+ "create": true,
28
+ "read": true,
29
+ "publish": true,
30
+ "administrate": true,
31
+ "update": true,
32
+ "delete": true,
33
+ "comment": true,
34
+ "member": true
35
+ },
36
+ "_actions": {
37
+ "sociallike": {
38
+ "type": "custom",
39
+ "class": "fs-thumbs-up",
40
+ "cssClass": "comment",
41
+ "cssColor": "#76b9f2",
42
+ "isActive": false,
43
+ "label": "J'aime",
44
+ "struct": {
45
+ "action": "custom-action",
46
+ "do": "add",
47
+ "type": "sociallike",
48
+ "targetId": 23,
49
+ "targetType": "comment"
50
+ },
51
+ "stats": {
52
+ "total": 0
53
+ }
54
+ }
55
+ },
56
+ "_attachedFiles": []
57
+ }
58
+ ]
59
+ }