jamespot-user-api 1.0.110 → 1.0.112

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 (104) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminLicenseApi.html +11 -11
  3. package/documentation/classes/AdminStoreApi.html +1 -1
  4. package/documentation/classes/AdminUtilsApi.html +1 -1
  5. package/documentation/classes/JApplicationApi.html +8 -8
  6. package/documentation/classes/JArticleApi.html +1 -1
  7. package/documentation/classes/JAssetReservation.html +1 -1
  8. package/documentation/classes/JAudienceApi.html +1 -1
  9. package/documentation/classes/JBaseApi.html +1 -1
  10. package/documentation/classes/JBookmarkApi.html +1 -1
  11. package/documentation/classes/JCommunityApi.html +1 -1
  12. package/documentation/classes/JDiapazoneApi.html +1 -1
  13. package/documentation/classes/JFileApi.html +5 -5
  14. package/documentation/classes/JFilebankApi.html +1 -1
  15. package/documentation/classes/JGroupApi.html +14 -10
  16. package/documentation/classes/JLandApi.html +1 -1
  17. package/documentation/classes/JMessengerApi.html +1 -1
  18. package/documentation/classes/JSearchApi.html +6 -6
  19. package/documentation/classes/JShareApi.html +1 -1
  20. package/documentation/classes/JTaxonomyApi.html +2 -2
  21. package/documentation/classes/JUserApi.html +5 -5
  22. package/documentation/classes/JWedocApi.html +1 -1
  23. package/documentation/classes/JamespotUserApi.html +1 -1
  24. package/documentation/classes/Network.html +1 -1
  25. package/documentation/classes/TVDisplayApi.html +1 -0
  26. package/documentation/classes/WindowBrowser.html +1 -1
  27. package/documentation/enums/StudioApplicationStatus.html +1 -1
  28. package/documentation/index.html +1 -1
  29. package/documentation/interfaces/AccessRightObject.html +1 -1
  30. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  31. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  32. package/documentation/interfaces/ApiWrapper.html +1 -1
  33. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  34. package/documentation/interfaces/BaseMessage.html +1 -1
  35. package/documentation/interfaces/Category.html +1 -1
  36. package/documentation/interfaces/FileBankProps.html +1 -1
  37. package/documentation/interfaces/FolderProps.html +1 -1
  38. package/documentation/interfaces/ListFilterSpec.html +1 -1
  39. package/documentation/interfaces/OF.html +1 -1
  40. package/documentation/interfaces/ObjectListProps.html +1 -1
  41. package/documentation/interfaces/PagingResults.html +1 -1
  42. package/documentation/interfaces/RootFolderProps.html +1 -1
  43. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  44. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  45. package/documentation/interfaces/SearchConfig.html +1 -1
  46. package/documentation/interfaces/SearchFacetModel.html +1 -1
  47. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  48. package/documentation/interfaces/SearchQuery.html +1 -1
  49. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  50. package/documentation/interfaces/SearchQueryOption.html +1 -1
  51. package/documentation/interfaces/SearchQueryResult.html +1 -1
  52. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  53. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  54. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  55. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  56. package/documentation/interfaces/SpotProps.html +1 -1
  57. package/documentation/interfaces/Taxonomy.html +1 -1
  58. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  59. package/documentation/interfaces/WindowInterface.html +1 -1
  60. package/documentation/modules.html +23 -7
  61. package/lib/jamespot-user-api.js +1 -1
  62. package/lib/jamespot-user-api.js.map +1 -1
  63. package/lib/src/apis/article/article.d.ts +2 -2
  64. package/lib/src/apis/bookmark/bookmark.d.ts +1 -19
  65. package/lib/src/apis/community.d.ts +2 -38
  66. package/lib/src/apis/file.d.ts +1 -1
  67. package/lib/src/apis/filebank.d.ts +15 -3
  68. package/lib/src/apis/group/group.d.ts +11 -51
  69. package/lib/src/apis/group/group.mock.d.ts +3 -2
  70. package/lib/src/apis/group/index.d.ts +1 -1
  71. package/lib/src/apis/index.d.ts +1 -0
  72. package/lib/src/apis/jamespotUserApi.d.ts +2 -0
  73. package/lib/src/apis/tvDisplay/tvDisplay.d.ts +12 -0
  74. package/lib/src/apis/tvDisplay/tvDisplay.mock.d.ts +7 -0
  75. package/lib/src/apis/tvDisplay/tvDisplay.test.d.ts +1 -0
  76. package/lib/src/apis/user/user.d.ts +4 -2
  77. package/lib/src/types/comment.d.ts +11 -0
  78. package/lib/src/types/file.d.ts +5 -0
  79. package/lib/src/{apis/group/group.types.d.ts → types/group.d.ts} +4 -5
  80. package/lib/src/types/model.d.ts +1 -1
  81. package/lib/src/types/tvDisplay.d.ts +61 -21
  82. package/lib/src/types/uri.d.ts +19 -0
  83. package/lib/src/types/user.d.ts +2 -0
  84. package/lib/src/types/utils.d.ts +6 -6
  85. package/lib/src/util/Test.d.ts +4 -20
  86. package/lib/src/util/ensure.d.ts +7 -1
  87. package/lib/src/util/images.d.ts +68 -0
  88. package/lib/src/util/images.test.d.ts +1 -0
  89. package/lib/src/util/index.d.ts +4 -0
  90. package/lib/src/util/network.d.ts +1 -1
  91. package/lib/src/util/string.d.ts +3 -0
  92. package/lib/src/util/taxonomy.d.ts +2 -0
  93. package/lib/src/util/taxonomy.test.d.ts +1 -0
  94. package/lib/src/util/uri.d.ts +2 -0
  95. package/lib/src/util/uri.test.d.ts +1 -0
  96. package/package.json +1 -1
  97. package/phpunitMock/autocompleteSpot-a.json +50 -0
  98. package/phpunitMock/spotGet-default.json +5 -6
  99. package/phpunitMock/spotGetProperties-default.json +1 -1
  100. package/phpunitMock/tvDisplayGetChannel-dynamic.json +166 -0
  101. package/phpunitMock/tvDisplayGetChannel-slideshow.json +86 -0
  102. package/phpunitMock/tvDisplayGetConfigureChannel-dynamic.json +163 -0
  103. package/phpunitMock/tvDisplayGetConfigureChannel-slideshow.json +83 -0
  104. package/lib/src/types/spot.d.ts +0 -5
@@ -1,5 +1,5 @@
1
1
  import { JBaseApi } from '../base';
2
- import { ApiWrapper, BaseMessages, Filters, jArticleLittle, jArticleView, MaybeWithToken, Orders, PagingResults } from '../../types';
2
+ import { ApiWrapper, BaseMessages, Filters, jArticleList, jArticleLittle, MaybeWithToken, Orders, PagingResults } from '../../types';
3
3
  export declare type ArticleListConfig = {
4
4
  type: string;
5
5
  format?: string;
@@ -37,7 +37,7 @@ export declare class JArticleApi extends JBaseApi {
37
37
  create<T extends jArticleLittle = jArticleLittle>(article: MaybeWithToken<ArticleCreation>, format?: string): Promise<ApiWrapper<Array<T>, BaseMessages>>;
38
38
  update<T extends {
39
39
  uri: string;
40
- }, U extends jArticleView>(article: T): Promise<ApiWrapper<U, BaseMessages>>;
40
+ }, U extends jArticleLittle = jArticleList>(article: T): Promise<ApiWrapper<U, BaseMessages>>;
41
41
  delete(id: number): Promise<ApiWrapper<boolean, BaseMessages>>;
42
42
  count(type: string): Promise<ApiWrapper<number>>;
43
43
  }
@@ -10,25 +10,7 @@ export interface ListFilterSpec {
10
10
  export declare class JBookmarkApi extends JBaseApi {
11
11
  getFormattedList<T extends keyof BookmarkTypes>(filterSpecs: ListFilterSpec, format: T): Promise<ApiWrapper<PagingResults<BookmarkTypes[T]>, import("../../types").BaseMessages>>;
12
12
  addFormattedLink<T extends keyof BookmarkTypes>(targetId: number, targetType: string, format: T): Promise<ApiWrapper<BookmarkTypes[T], import("../../types").BaseMessages>>;
13
- addBookmark(bookmark: Pick<BookmarkTypes[keyof BookmarkTypes], 'bookmarkLabel' | 'bookmarkMeta' | 'bookmarkUrl'>, format?: keyof BookmarkTypes): Promise<ApiWrapper<import("../../types").BookmarkRawList<{
14
- id: number;
15
- mainType: string;
16
- type: string;
17
- uri: string;
18
- dateCreation?: string;
19
- dateModified?: string;
20
- title: string;
21
- _url: string;
22
- } | import("../../types").jUserLittle> | import("../../types").BookmarkList<{
23
- id: number;
24
- mainType: string;
25
- type: string;
26
- uri: string;
27
- dateCreation?: string;
28
- dateModified?: string;
29
- title: string;
30
- _url: string;
31
- }>, BaseMessagesOne>>;
13
+ addBookmark(bookmark: Pick<BookmarkTypes[keyof BookmarkTypes], 'bookmarkLabel' | 'bookmarkMeta' | 'bookmarkUrl'>, format?: keyof BookmarkTypes): Promise<ApiWrapper<import("../../types").BookmarkRawList<import("../../types").jObjectLittle | import("../../types").jUserLittle> | import("../../types").BookmarkList<import("../../types").jObjectLittle>, BaseMessagesOne>>;
32
14
  delete(bookmarkId: number): Promise<ApiWrapper<null, BaseMessagesOne>>;
33
15
  rename(bookmarkID: number, bookmarkLabel: string, bookmarkUrl?: string): Promise<ApiWrapper<null, BaseMessagesOne>>;
34
16
  move(bookmarkID: number, bookmarkReference: number, position: 'before' | 'after'): Promise<ApiWrapper<null, BaseMessagesOne>>;
@@ -1,43 +1,7 @@
1
- import { ApiReturn, CommunityAutocomplete, Format } from '../types';
1
+ import { ApiReturn, CommunityAutocomplete, Format, jObjectLittle } from '../types';
2
2
  import { JBaseApi } from './base';
3
3
  export declare class JCommunityApi extends JBaseApi {
4
- get<T extends Format = undefined>(idCommunity: string | number, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, {
5
- id: number;
6
- mainType: string;
7
- type: string;
8
- uri: string;
9
- dateCreation?: string;
10
- dateModified?: string;
11
- title: string;
12
- _url: string;
13
- }, {
14
- id: number;
15
- mainType: string;
16
- type: string;
17
- uri: string;
18
- dateCreation?: string;
19
- dateModified?: string;
20
- title: string;
21
- _url: string;
22
- }, {
23
- id: number;
24
- mainType: string;
25
- type: string;
26
- uri: string;
27
- dateCreation?: string;
28
- dateModified?: string;
29
- title: string;
30
- _url: string;
31
- }, {
32
- id: number;
33
- mainType: string;
34
- type: string;
35
- uri: string;
36
- dateCreation?: string;
37
- dateModified?: string;
38
- title: string;
39
- _url: string;
40
- }>, import("../types").BaseMessages>>;
4
+ get<T extends Format = undefined>(idCommunity: string | number, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, jObjectLittle, jObjectLittle, jObjectLittle, jObjectLittle>, import("../types").BaseMessages>>;
41
5
  sendRequest(message: string, idUserTo: number): Promise<import("../types").ApiWrapper<boolean, {
42
6
  code: number;
43
7
  msg: string;
@@ -51,7 +51,7 @@ export declare class JFileApi extends JBaseApi {
51
51
  * @param token token
52
52
  * @returns
53
53
  */
54
- deleteFile(idFile: number | string, attrName: string, token: string): Promise<import("../types").ApiWrapper<"", import("../types").BaseMessages>>;
54
+ deleteFile(idFile: number | string, attrName: string, token: string, signal?: AbortSignal): Promise<import("../types").ApiWrapper<"", import("../types").BaseMessages>>;
55
55
  /**
56
56
  * delete the image associated with a content. This action is permanent. There is no two step process with a token
57
57
  * @param id content id
@@ -1,5 +1,5 @@
1
1
  import { JBaseApi } from './base';
2
- import { jObjectLittle, PagingResults, Rights } from '../types';
2
+ import { ApiPagingResults, ApiWrapper, jObjectBase, jObjectLittle, Rights } from '../types';
3
3
  export interface RootFolderProps {
4
4
  id: number;
5
5
  title: string;
@@ -17,7 +17,7 @@ export interface SpotProps {
17
17
  folderColor?: string;
18
18
  }
19
19
  export interface FileBankProps {
20
- recents: any[];
20
+ recents: jObjectLittle[];
21
21
  rootFolder: RootFolderProps;
22
22
  spot: SpotProps;
23
23
  }
@@ -27,7 +27,19 @@ export interface FolderProps extends jObjectLittle {
27
27
  parentURI?: string;
28
28
  _right: Rights;
29
29
  }
30
+ export declare type FolderType = jObjectLittle & {
31
+ mainType: string;
32
+ folderColor?: string;
33
+ parentURI?: string;
34
+ };
35
+ export declare type jFileBase = jObjectLittle & {
36
+ mimetype: string;
37
+ };
38
+ export declare type FileBankDocument = jObjectBase & {
39
+ _attachedFiles: jFileBase[];
40
+ };
30
41
  export declare class JFilebankApi extends JBaseApi {
31
42
  getBanks(format?: string): Promise<Array<FileBankProps>>;
32
- getFolders(parentURI: string): Promise<PagingResults<FolderProps[]>>;
43
+ getFolders(parentURI: string): Promise<ApiWrapper<FolderType[]>>;
44
+ getDocuments(uri: string): Promise<ApiPagingResults<FileBankDocument>>;
33
45
  }
@@ -1,64 +1,33 @@
1
- import { Category, CreateGroup, GroupList, GroupProperties, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup } from './group.types';
1
+ import { Category, CreateGroup, GroupList, GroupProperties, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup } from '../../types/group';
2
2
  import { JBaseApi } from '../base';
3
- import { ApiReturn, Format, PagingResults } from '../../types';
3
+ import { ApiReturn, Format, PagingResults, jObjectLittle, jSpotAutocomplete } from '../../types';
4
4
  export declare class JGroupApi extends JBaseApi {
5
+ /**
6
+ * autocomplete return a list of groups
7
+ * @param query <string>
8
+ */
9
+ autocomplete(query: string): Promise<jSpotAutocomplete[]>;
5
10
  /**
6
11
  * Create a group from scratch
7
12
  * @param group
8
13
  * @param format return format
9
14
  * @returns
10
15
  */
11
- create<T extends Format = undefined>(group: CreateGroup, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, {
12
- id: number;
13
- mainType: string;
14
- type: string;
15
- uri: string;
16
- dateCreation?: string;
17
- dateModified?: string;
18
- title: string;
19
- _url: string;
20
- }, GroupList, GroupView, {
21
- id: number;
22
- mainType: string;
23
- type: string;
24
- uri: string;
25
- dateCreation?: string;
26
- dateModified?: string;
27
- title: string;
28
- _url: string;
29
- }>, import("../../types").BaseMessages>>;
16
+ create<T extends Format = undefined>(group: CreateGroup, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, jObjectLittle, GroupList, GroupView, jObjectLittle>, import("../../types").BaseMessages>>;
30
17
  /**
31
18
  * Update a group
32
19
  * @param group group to update. The uri is mandatory and identify the group to update
33
20
  * @param format return format
34
21
  * @returns
35
22
  */
36
- update<T extends Format = undefined>(group: UpdateGroup, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, {
37
- id: number;
38
- mainType: string;
39
- type: string;
40
- uri: string;
41
- dateCreation?: string;
42
- dateModified?: string;
43
- title: string;
44
- _url: string;
45
- }, GroupList, GroupView, string>, import("../../types").BaseMessages>>;
23
+ update<T extends Format = undefined>(group: UpdateGroup, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, jObjectLittle, GroupList, GroupView, string>, import("../../types").BaseMessages>>;
46
24
  /**
47
25
  * Get a spot
48
26
  * @param idSpot
49
27
  * @param format
50
28
  * @returns
51
29
  */
52
- getSpot<T extends Format = undefined>(idSpot: number | string, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, {
53
- id: number;
54
- mainType: string;
55
- type: string;
56
- uri: string;
57
- dateCreation?: string;
58
- dateModified?: string;
59
- title: string;
60
- _url: string;
61
- }, GroupList, GroupView, string>, import("../../types").BaseMessages>>;
30
+ getSpot<T extends Format = undefined>(idSpot: number | string, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, jObjectLittle, GroupList, GroupView, string>, import("../../types").BaseMessages>>;
62
31
  /**
63
32
  * Get the properties of a group that are not within the model
64
33
  * @param idSpot
@@ -82,16 +51,7 @@ export declare class JGroupApi extends JBaseApi {
82
51
  * @param page page number
83
52
  * @return array of User
84
53
  */
85
- getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../../types").ApiWrapper<PagingResults<{
86
- id: number;
87
- mainType: string;
88
- type: string;
89
- uri: string;
90
- dateCreation?: string;
91
- dateModified?: string;
92
- title: string;
93
- _url: string;
94
- }>, import("../../types").BaseMessages>>;
54
+ getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../../types").ApiWrapper<PagingResults<jObjectLittle>, import("../../types").BaseMessages>>;
95
55
  /**
96
56
  * Reset the notifications configuration for all users of the group
97
57
  * @param config configuration
@@ -1,4 +1,5 @@
1
- import { ApiWrapper } from '../../types';
2
- import { GroupProperties, GroupView } from './group.types';
1
+ import { ApiWrapper, jSpotAutocomplete } from '../../types';
2
+ import { GroupProperties, GroupView } from '../../types/group';
3
3
  export declare const spot: ApiWrapper<GroupView>;
4
4
  export declare const properties: ApiWrapper<GroupProperties>;
5
+ export declare const groupAutocompleteA: ApiWrapper<jSpotAutocomplete[]>;
@@ -1,2 +1,2 @@
1
1
  export * from './group';
2
- export * from './group.types';
2
+ export * from '../../types/group';
@@ -18,4 +18,5 @@ export * from './search/search';
18
18
  export * from './share/share';
19
19
  export * from './user/user';
20
20
  export * from './taxonomy';
21
+ export * from './tvDisplay/tvDisplay';
21
22
  export * from './wedoc/wedoc';
@@ -19,6 +19,7 @@ import { JTaxonomyApi } from './taxonomy';
19
19
  import { JUserApi } from './user/user';
20
20
  import { JWedocApi } from './wedoc/wedoc';
21
21
  import { Network } from '../util/network';
22
+ import { TVDisplayApi } from './tvDisplay/tvDisplay';
22
23
  import { JShareApi } from './share/share';
23
24
  /**
24
25
  * In browser usage, 'window' should be the window object.
@@ -53,6 +54,7 @@ export declare class JamespotUserApi {
53
54
  search: JSearchApi;
54
55
  share: JShareApi;
55
56
  taxonomy: JTaxonomyApi;
57
+ tvDisplay: TVDisplayApi;
56
58
  user: JUserApi;
57
59
  wedoc: JWedocApi;
58
60
  constructor(network: Network);
@@ -0,0 +1,12 @@
1
+ import { JBaseApi } from '../base';
2
+ import { ApiWrapper, BaseMessages, MaybeWithToken, TVChannelCreation, TVChannelList, TVChannelLittle, TVGetChannelResponse, TVGetConfigureChannelResponse } from '../../types';
3
+ export declare class TVDisplayApi extends JBaseApi {
4
+ createChannel<R extends TVChannelLittle = TVChannelList>(channel: MaybeWithToken<TVChannelCreation>, format?: string): Promise<ApiWrapper<Array<R>, BaseMessages>>;
5
+ getChannel(params: {
6
+ id: number;
7
+ key: string;
8
+ }): Promise<ApiWrapper<TVGetChannelResponse, BaseMessages>>;
9
+ getConfigureChannel(params: {
10
+ id: number;
11
+ }): Promise<ApiWrapper<TVGetConfigureChannelResponse, BaseMessages>>;
12
+ }
@@ -0,0 +1,7 @@
1
+ import { ApiWrapper, TVChannelList, TVGetChannelResponse, TVGetConfigureChannelResponse } from '../../types';
2
+ export declare const tvDisplayGetChannelDynamic: ApiWrapper<TVGetChannelResponse>;
3
+ export declare const tvDisplayGetChannelSlideshow: ApiWrapper<TVGetChannelResponse>;
4
+ export declare const tvDisplayCreateChannelDynamic: ApiWrapper<TVChannelList[]>;
5
+ export declare const tvDisplayCreateChannelSlideshow: ApiWrapper<TVChannelList[]>;
6
+ export declare const tvDisplayGetConfigureChannelDynamic: ApiWrapper<TVGetConfigureChannelResponse>;
7
+ export declare const tvDisplayGetConfigureChannelSlideshow: ApiWrapper<TVGetConfigureChannelResponse>;
@@ -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 } from '../../types';
2
+ import { ApiWrapper, Little, jObjectLittle, UserModel, UserMapModel, jUserAutocomplete, ApiPagingResults, ApiDefaultWrapper, jUserLittle, Readable } from '../../types';
3
3
  export declare type User = Little & {
4
4
  id: string;
5
5
  shortUri: string;
@@ -71,7 +71,9 @@ export declare class JUserApi extends JBaseApi {
71
71
  userMap(payload: ObjectListProps): Promise<ApiPagingResults<UserMapModel>>;
72
72
  userBusinessContactQueryList(query: ObjectListProps): Promise<ApiPagingResults<UserModel>>;
73
73
  userCreateBusinessContact(user: BusinessContact): Promise<ApiWrapper<import("../../types").jArticleLittle[], import("../../types").BaseMessages>>;
74
- userUpdateBusinessContact(user: BusinessContact): Promise<ApiWrapper<import("../../types").jArticleView, import("../../types").BaseMessages>>;
74
+ userUpdateBusinessContact(user: Readable<BusinessContact & {
75
+ uri: string;
76
+ }>): Promise<ApiWrapper<import("../../types").jArticleList, import("../../types").BaseMessages>>;
75
77
  userDeleteBusinessContact(idArticle: number): Promise<ApiWrapper<boolean, import("../../types").BaseMessages>>;
76
78
  userAddContact(idUser: number): Promise<ApiDefaultWrapper>;
77
79
  userRemoveContact(idUser: number): Promise<ApiDefaultWrapper>;
@@ -0,0 +1,11 @@
1
+ import { jUserLittle } from './user';
2
+ import { Readable, Rights, jObjectBase } from './utils';
3
+ export declare type jCommentLittle = Readable<Omit<jObjectBase, 'dateModified'> & {
4
+ dateCreation: string;
5
+ dateModified: string | null;
6
+ description: string | null;
7
+ _user: jUserLittle;
8
+ }>;
9
+ export declare type jCommentList = jCommentLittle & {
10
+ _right: Rights;
11
+ };
@@ -1,3 +1,4 @@
1
+ import { Readable, jObjectLittle } from './utils';
1
2
  export declare type UploadConfig = {
2
3
  attrName: string;
3
4
  token: string;
@@ -28,3 +29,7 @@ export declare type FileCropConfig = {
28
29
  export declare type FileCropReturnType = Omit<FileResponse, 'token'> & {
29
30
  crop: FileCropConfig;
30
31
  };
32
+ export declare type jFileLittle = Readable<Omit<jObjectLittle, 'dateModified'> & {
33
+ dateCreation: string;
34
+ dateModified: string | null;
35
+ }>;
@@ -1,4 +1,4 @@
1
- import { jObjectLittle } from '../../types/utils';
1
+ import { jObjectLittle } from './utils';
2
2
  export declare type CreateGroup = {
3
3
  type: string;
4
4
  title: string;
@@ -26,7 +26,7 @@ export declare type GroupProperties = {
26
26
  edit_access: '' | 'author';
27
27
  commentLevel: '-1' | '1' | '2' | '3';
28
28
  user_level_signup: '' | '1' | '2' | '3';
29
- nounsubscribe: '' | '1';
29
+ nounsubscribe: '0' | '1';
30
30
  useTeaser: '' | '1' | '2';
31
31
  displayType: string;
32
32
  spot_right_user: string;
@@ -99,14 +99,13 @@ export interface Category {
99
99
  export declare type GroupLittle = jObjectLittle & {
100
100
  dateCreation: string;
101
101
  dateModified: string;
102
+ category: string;
103
+ privacy: string | number;
102
104
  };
103
105
  export declare type GroupList = GroupLittle & {
104
106
  description: string;
105
- privacy: string | number;
106
107
  edito: string | null;
107
108
  language: string;
108
- category: string;
109
- idCategory: number;
110
109
  };
111
110
  export declare type GroupView = GroupList & {
112
111
  image?: string | null;
@@ -9,7 +9,7 @@ export declare type WidgetTextarea = {
9
9
  mention: '1';
10
10
  };
11
11
  };
12
- export declare type WidgetTextareaValue = string;
12
+ export declare type WidgetTextareaValue = string | null;
13
13
  export declare type WidgetNumber = {
14
14
  type: 'number';
15
15
  };
@@ -1,32 +1,72 @@
1
- import { jSpotLittle } from './spot';
2
- import { Readable, jArticleList, jArticleLittle } from './utils';
3
- declare type TVChannelCustomListDynamic = {
4
- tvChannelType: 'DYNAMIC';
5
- tvChannelBackgroundColor: string;
6
- tvChannelGroupTarget?: jSpotLittle;
7
- tvChannelConfig: {
8
- contents: Array<{
9
- uri: string;
10
- dateEnd: Date;
11
- }>;
12
- };
13
- tvChannelNumImages: 0;
14
- };
15
- declare type TVChannelCustomListSlideshow = {
16
- tvChannelType: 'SLIDESHOW';
17
- tvChannelBackgroundColor: string;
1
+ import { ArticleCreation, GroupLittle } from '../apis';
2
+ import { jCommentList } from './comment';
3
+ import { jFileLittle } from './file';
4
+ import { Readable, jArticleList, jArticleLittle, jObjectList } from './utils';
5
+ export declare type TvChannelType = 'DYNAMIC' | 'SLIDESHOW';
6
+ export declare type TVChannelCustom<T extends TvChannelType> = jObjectList & {
7
+ tvChannelType: T;
8
+ tvChannelBackgroundColor: string | null;
18
9
  tvChannelNumImages: number;
10
+ tvChannelGroupTarget?: GroupLittle;
19
11
  tvChannelConfig: {
20
- contents: Array<{
12
+ backgroundType?: 'color' | 'image';
13
+ globalShowComment?: boolean;
14
+ key: string;
15
+ contents?: Array<{
21
16
  uri: string;
22
- dateEnd: Date;
17
+ dateEnd?: string;
18
+ showComments?: boolean;
19
+ order?: number;
23
20
  }>;
24
21
  };
25
22
  };
23
+ export declare type TVChannelCustomListDynamic = TVChannelCustom<'DYNAMIC'> & {
24
+ tvChannelNumImages: 0;
25
+ };
26
+ export declare type TVChannelCustomListSlideshow = TVChannelCustom<'SLIDESHOW'>;
26
27
  export declare type TVChannelLittle = Readable<jArticleLittle>;
27
- export declare type TVChannelList = Readable<jArticleList & (TVChannelCustomListDynamic | TVChannelCustomListSlideshow)>;
28
+ export declare type TVChannelDynamicList = Readable<jArticleList & TVChannelCustomListDynamic>;
29
+ export declare type TVChannelSlideshowList = Readable<jArticleList & TVChannelCustomListSlideshow>;
30
+ export declare type TVChannelCustomList = Readable<(jArticleList & TVChannelCustomListDynamic) | TVChannelCustomListSlideshow>;
31
+ export declare type TVChannelList = TVChannelDynamicList | TVChannelSlideshowList;
32
+ export declare type TVChannelCreation = Readable<ArticleCreation & (Partial<TVChannelCustomListDynamic> | Partial<TVChannelCustomListSlideshow>) & {
33
+ tvChannelType: 'DYNAMIC' | 'SLIDESHOW';
34
+ }>;
28
35
  export declare type TVChannelCreatePayload = {
29
36
  tvChannelGroupTarget?: Array<string>;
30
37
  tvChannelNumImages?: never;
31
38
  };
32
- export {};
39
+ export declare type TVChannelDynamicComment = Readable<jCommentList & {
40
+ _extend: {
41
+ userImageSecureUrl: string;
42
+ descriptionSecure: string;
43
+ };
44
+ }>;
45
+ export declare type TVChannelDynamicArticle = Readable<jArticleList & {
46
+ _extend?: {
47
+ imageSecureUrl?: string;
48
+ descriptionSecure: string;
49
+ comments: TVChannelDynamicComment[];
50
+ };
51
+ }>;
52
+ export declare type TVGetChannelSlideshowFile = jFileLittle & {
53
+ _extend: {
54
+ imageSecureUrl?: string;
55
+ };
56
+ };
57
+ export declare type TVGetChannelResponse = {
58
+ interval: number;
59
+ channel: TVGetConfigureChannelResponse;
60
+ };
61
+ export declare type TVGetConfigureChannelResponse = TVGetConfigureDynamicChannelResponse | TVGetConfigureSlideshowChannelResponse;
62
+ export declare type TVGetConfigureDynamicChannelResponse = TVChannelDynamicList & {
63
+ _extend: {
64
+ imageSecureUrl?: string;
65
+ articles?: TVChannelDynamicArticle[];
66
+ };
67
+ };
68
+ export declare type TVGetConfigureSlideshowChannelResponse = TVChannelSlideshowList & {
69
+ _extend: {
70
+ attachments?: TVGetChannelSlideshowFile[];
71
+ };
72
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Type with one of (tuple type - id) and (uri) required. If both are passed, only the uri will be used
3
+ */
4
+ export declare type UriOrTypeId = Partial<TypeId> & Partial<Uri>;
5
+ /**
6
+ * Interface representing the parameters used to make a content/record uri
7
+ * @member type - type of the image (ex: user, fileArticle, spot, diffgroup, etc.)
8
+ * @member recordId - id of the record
9
+ */
10
+ export interface TypeId {
11
+ type: string;
12
+ recordId: string | number;
13
+ }
14
+ /**
15
+ * @member uri - uri of the record
16
+ */
17
+ export interface Uri {
18
+ uri: string;
19
+ }
@@ -4,6 +4,8 @@ import { jObjectLittle } from './utils';
4
4
  * @deprecated Use jUserList instead
5
5
  */
6
6
  export declare type UserModel = jObjectLittle & {
7
+ dateCreation: string;
8
+ dateModified: string;
7
9
  firstname: string;
8
10
  lastname: string;
9
11
  active: number;
@@ -1,4 +1,4 @@
1
- import { jSpotLittle } from './spot';
1
+ import { GroupLittle } from './group';
2
2
  import { jUserLittle } from './user';
3
3
  /**
4
4
  * Ease usage in IDE by decomposing complex types
@@ -64,12 +64,12 @@ export declare type jObjectBase = {
64
64
  dateCreation?: string;
65
65
  dateModified?: string;
66
66
  };
67
- export declare type jObjectLittle = Readable<jObjectBase & {
67
+ export declare type jObjectLittle = jObjectBase & {
68
68
  title: string;
69
69
  _url: string;
70
- }>;
70
+ };
71
71
  export declare type jObjectList = jObjectLittle & {
72
- description?: string;
72
+ description?: string | null;
73
73
  _user: jUserLittle;
74
74
  _right: Rights;
75
75
  };
@@ -97,7 +97,7 @@ export declare type jArticleLittle = jObjectLittle & {
97
97
  dateModified: string;
98
98
  };
99
99
  export declare type jArticleList = jArticleLittle & {
100
- description?: string;
100
+ description?: string | null;
101
101
  _user: jUserLittle;
102
102
  _right: Rights;
103
103
  };
@@ -106,7 +106,7 @@ export declare type Order = {
106
106
  name: string;
107
107
  sort: 'ASC' | 'DESC';
108
108
  };
109
- export declare type Audience = jUserLittle | jSpotLittle;
109
+ export declare type Audience = jUserLittle | GroupLittle;
110
110
  export declare type Orders = Array<Order>;
111
111
  export declare type FilterValue = boolean | string | number | string[] | {
112
112
  srcId: number | string;
@@ -1,5 +1,6 @@
1
1
  import { JamespotUserApi } from '../apis';
2
- import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete, jObjectList, jUserList, Rights } from '../types';
2
+ import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete, jObjectLittle, jObjectList, jUserList, Rights } from '../types';
3
+ import { jCommentList } from '../types/comment';
3
4
  import { FetchResponseType, WindowBrowser } from '../window';
4
5
  import { Network } from './network';
5
6
  export declare const windowBrowser: WindowBrowser;
@@ -9,27 +10,10 @@ export declare const fetchMock: <T>(data: T) => jest.Mock<Promise<FetchResponseT
9
10
  export declare const validateJArticle: <T extends jArticleLittle>(received: T, expected: T) => void;
10
11
  export declare const validateApiWrapper: <T extends ApiDefaultWrapper<import("../types").BaseMessages>>(res: T, o: string, f: string, error?: null) => void;
11
12
  export declare const validatePagingResults: <T>(res: PagingResults<T>) => void;
12
- export declare const validateObjectIsFormatLittle: <T extends {
13
- id: number;
14
- mainType: string;
15
- type: string;
16
- uri: string;
17
- dateCreation?: string;
18
- dateModified?: string;
19
- title: string;
20
- _url: string;
21
- } = {
22
- id: number;
23
- mainType: string;
24
- type: string;
25
- uri: string;
26
- dateCreation?: string;
27
- dateModified?: string;
28
- title: string;
29
- _url: string;
30
- }>(object: T) => void;
13
+ export declare const validateObjectIsFormatLittle: <T extends jObjectLittle = jObjectLittle>(object: T) => void;
31
14
  export declare const validateObjectIsFormatList: <T extends jObjectList = jObjectList>(object: T) => void;
32
15
  export declare const validateUserIsFormatList: <T extends jUserList = jUserList>(object: T) => void;
16
+ export declare const validateCommentIsFormatList: <T extends jCommentList = jCommentList>(object: T) => void;
33
17
  export declare const validateObjectIsFormatAutocomplete: <T extends jObjectAutocomplete = jObjectAutocomplete>(object: T) => void;
34
18
  export declare const expectToHaveProperties: <T>(props: string[], payload: T[]) => void;
35
19
  export declare const expectToBeArray: <T>(arr: T[]) => void;
@@ -1,4 +1,4 @@
1
- import { BookmarkCustom, BookmarkLink, BookmarkRawList, jObjectBase } from '../types';
1
+ import { BookmarkCustom, BookmarkLink, BookmarkRawList, TVChannelDynamicList, TVChannelList, TVChannelSlideshowList, jObjectBase } from '../types';
2
2
  import { AbortApiError, StandardApiError } from './network';
3
3
  declare function ensureIsBookmarkLink(bookmark: BookmarkCustom | BookmarkLink): bookmark is BookmarkLink;
4
4
  declare function ensureIsBookmarkCustom(bookmark: BookmarkCustom | BookmarkLink): bookmark is BookmarkCustom;
@@ -7,10 +7,16 @@ declare type jObjectTypes = {
7
7
  bookmarkLink: BookmarkRawList;
8
8
  };
9
9
  declare function ensureObjectIsType<T extends keyof jObjectTypes>(type: T, object: jObjectBase): object is jObjectTypes[T];
10
+ declare type ChannelsTypes = {
11
+ DYNAMIC: TVChannelDynamicList;
12
+ SLIDESHOW: TVChannelSlideshowList;
13
+ };
14
+ declare function ensureTVChannelIs<Type extends keyof ChannelsTypes>(channel: TVChannelList, type: Type): channel is ChannelsTypes[Type];
10
15
  export declare const jEnsure: {
11
16
  isBookmarkLink: typeof ensureIsBookmarkLink;
12
17
  isBookmarkCustom: typeof ensureIsBookmarkCustom;
13
18
  isBookmarkRawList: typeof ensureIsBookmarkRawList;
19
+ isTVChannelType: typeof ensureTVChannelIs;
14
20
  objectIsType: typeof ensureObjectIsType;
15
21
  isStandardApiError: (err: any) => err is StandardApiError<import("../types").BaseMessages>;
16
22
  isAbortApiError: (err: any) => err is AbortApiError;