jamespot-user-api 1.0.109 → 1.0.111
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.
- package/documentation/assets/search.js +1 -1
- package/documentation/classes/AdminLicenseApi.html +11 -11
- package/documentation/classes/AdminStoreApi.html +1 -1
- package/documentation/classes/AdminUtilsApi.html +1 -1
- package/documentation/classes/JApplicationApi.html +8 -8
- package/documentation/classes/JArticleApi.html +1 -1
- package/documentation/classes/JAssetReservation.html +1 -1
- package/documentation/classes/JAudienceApi.html +1 -1
- package/documentation/classes/JBaseApi.html +1 -1
- package/documentation/classes/JBookmarkApi.html +1 -1
- package/documentation/classes/JCommunityApi.html +1 -1
- package/documentation/classes/JDiapazoneApi.html +1 -1
- package/documentation/classes/JFileApi.html +5 -5
- package/documentation/classes/JFilebankApi.html +1 -1
- package/documentation/classes/JGroupApi.html +14 -10
- package/documentation/classes/JLandApi.html +1 -1
- package/documentation/classes/JMessengerApi.html +1 -1
- package/documentation/classes/JSearchApi.html +6 -6
- package/documentation/classes/JShareApi.html +1 -1
- package/documentation/classes/JTaxonomyApi.html +2 -2
- package/documentation/classes/JUserApi.html +5 -5
- package/documentation/classes/JWedocApi.html +1 -1
- package/documentation/classes/JamespotUserApi.html +1 -1
- package/documentation/classes/Network.html +1 -1
- package/documentation/classes/TVDisplayApi.html +1 -0
- package/documentation/classes/WindowBrowser.html +1 -1
- package/documentation/enums/StudioApplicationStatus.html +1 -1
- package/documentation/index.html +1 -1
- package/documentation/interfaces/AccessRightObject.html +1 -1
- package/documentation/interfaces/AdminLicenseUser.html +1 -1
- package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
- package/documentation/interfaces/ApiWrapper.html +1 -1
- package/documentation/interfaces/BaseAutocomplete.html +1 -1
- package/documentation/interfaces/BaseMessage.html +1 -1
- package/documentation/interfaces/Category.html +1 -1
- package/documentation/interfaces/FileBankProps.html +1 -1
- package/documentation/interfaces/FolderProps.html +1 -1
- package/documentation/interfaces/ListFilterSpec.html +1 -1
- package/documentation/interfaces/OF.html +1 -1
- package/documentation/interfaces/ObjectListProps.html +1 -1
- package/documentation/interfaces/PagingResults.html +1 -1
- package/documentation/interfaces/RootFolderProps.html +1 -1
- package/documentation/interfaces/SearchCategoryModel.html +1 -1
- package/documentation/interfaces/SearchCategoryValue.html +1 -1
- package/documentation/interfaces/SearchConfig.html +1 -1
- package/documentation/interfaces/SearchFacetModel.html +1 -1
- package/documentation/interfaces/SearchFacetValueModel.html +1 -1
- package/documentation/interfaces/SearchQuery.html +1 -1
- package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
- package/documentation/interfaces/SearchQueryOption.html +1 -1
- package/documentation/interfaces/SearchQueryResult.html +1 -1
- package/documentation/interfaces/SearchQuerySortModel.html +1 -1
- package/documentation/interfaces/SearchResultCatProps.html +1 -1
- package/documentation/interfaces/SearchResultPropsApp.html +1 -1
- package/documentation/interfaces/SearchResultPropsObject.html +1 -1
- package/documentation/interfaces/SpotProps.html +1 -1
- package/documentation/interfaces/Taxonomy.html +1 -1
- package/documentation/interfaces/TaxonomyCreate.html +1 -1
- package/documentation/interfaces/WindowInterface.html +1 -1
- package/documentation/modules.html +23 -7
- package/lib/jamespot-user-api.js +1 -1
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/article/article.d.ts +2 -2
- package/lib/src/apis/bookmark/bookmark.d.ts +1 -19
- package/lib/src/apis/community.d.ts +2 -38
- package/lib/src/apis/file.d.ts +1 -1
- package/lib/src/apis/group/group.d.ts +11 -51
- package/lib/src/apis/group/group.mock.d.ts +3 -2
- package/lib/src/apis/group/index.d.ts +1 -1
- package/lib/src/apis/index.d.ts +1 -0
- package/lib/src/apis/jamespotUserApi.d.ts +2 -0
- package/lib/src/apis/tvDisplay/tvDisplay.d.ts +12 -0
- package/lib/src/apis/tvDisplay/tvDisplay.mock.d.ts +7 -0
- package/lib/src/apis/tvDisplay/tvDisplay.test.d.ts +1 -0
- package/lib/src/apis/user/user.d.ts +5 -2
- package/lib/src/apis/user/user.mock.d.ts +1 -0
- package/lib/src/types/comment.d.ts +11 -0
- package/lib/src/types/file.d.ts +5 -0
- package/lib/src/{apis/group/group.types.d.ts → types/group.d.ts} +3 -4
- package/lib/src/types/model.d.ts +1 -1
- package/lib/src/types/tvDisplay.d.ts +61 -21
- package/lib/src/types/uri.d.ts +19 -0
- package/lib/src/types/user.d.ts +2 -0
- package/lib/src/types/utils.d.ts +6 -6
- package/lib/src/util/Test.d.ts +4 -20
- package/lib/src/util/ensure.d.ts +7 -1
- package/lib/src/util/images.d.ts +68 -0
- package/lib/src/util/images.test.d.ts +1 -0
- package/lib/src/util/index.d.ts +4 -0
- package/lib/src/util/network.d.ts +1 -1
- package/lib/src/util/string.d.ts +3 -0
- package/lib/src/util/taxonomy.d.ts +2 -0
- package/lib/src/util/taxonomy.test.d.ts +1 -0
- package/lib/src/util/uri.d.ts +2 -0
- package/lib/src/util/uri.test.d.ts +1 -0
- package/package.json +1 -1
- package/phpunitMock/autocompleteSpot-a.json +50 -0
- package/phpunitMock/objectListJamespotUserList-rawList.json +191 -0
- package/phpunitMock/spotGet-default.json +5 -6
- package/phpunitMock/spotGetProperties-default.json +1 -1
- package/phpunitMock/tvDisplayGetChannel-dynamic.json +166 -0
- package/phpunitMock/tvDisplayGetChannel-slideshow.json +86 -0
- package/phpunitMock/tvDisplayGetConfigureChannel-dynamic.json +163 -0
- package/phpunitMock/tvDisplayGetConfigureChannel-slideshow.json +83 -0
- package/lib/src/types/spot.d.ts +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JBaseApi } from '../base';
|
|
2
|
-
import { ApiWrapper, BaseMessages, Filters,
|
|
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
|
|
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;
|
package/lib/src/apis/file.d.ts
CHANGED
|
@@ -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,64 +1,33 @@
|
|
|
1
|
-
import { Category, CreateGroup, GroupList, GroupProperties, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup } from '
|
|
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 '
|
|
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 '
|
|
2
|
+
export * from '../../types/group';
|
package/lib/src/apis/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -66,11 +66,14 @@ export declare class JUserApi extends JBaseApi {
|
|
|
66
66
|
*/
|
|
67
67
|
get<T extends jObjectLittle = jObjectLittle>(uri: string, format?: string): Promise<ApiWrapper<T>>;
|
|
68
68
|
configuration(): Promise<ApiWrapper<UserDirectoryConfiguration>>;
|
|
69
|
+
userList<T extends jObjectLittle = jUserLittle>(payload: ObjectListProps, signal?: AbortSignal): Promise<ApiPagingResults<T>>;
|
|
69
70
|
userQueryList<T extends jObjectLittle = jUserLittle>(payload: ObjectListProps): Promise<ApiPagingResults<T>>;
|
|
70
71
|
userMap(payload: ObjectListProps): Promise<ApiPagingResults<UserMapModel>>;
|
|
71
72
|
userBusinessContactQueryList(query: ObjectListProps): Promise<ApiPagingResults<UserModel>>;
|
|
72
73
|
userCreateBusinessContact(user: BusinessContact): Promise<ApiWrapper<import("../../types").jArticleLittle[], import("../../types").BaseMessages>>;
|
|
73
|
-
userUpdateBusinessContact(user: BusinessContact
|
|
74
|
+
userUpdateBusinessContact(user: Readable<BusinessContact & {
|
|
75
|
+
uri: string;
|
|
76
|
+
}>): Promise<ApiWrapper<import("../../types").jArticleList, import("../../types").BaseMessages>>;
|
|
74
77
|
userDeleteBusinessContact(idArticle: number): Promise<ApiWrapper<boolean, import("../../types").BaseMessages>>;
|
|
75
78
|
userAddContact(idUser: number): Promise<ApiDefaultWrapper>;
|
|
76
79
|
userRemoveContact(idUser: number): Promise<ApiDefaultWrapper>;
|
|
@@ -3,6 +3,7 @@ import { UserDirectoryConfiguration } from './user';
|
|
|
3
3
|
export declare const userAutocompleteA: ApiWrapper<jUserAutocomplete[]>;
|
|
4
4
|
export declare const userGetUser1: ApiWrapper<jUserView>;
|
|
5
5
|
export declare const userDirectoryConfigurationDefault: ApiWrapper<UserDirectoryConfiguration>;
|
|
6
|
+
export declare const userListRawList: ApiPagingResults<jUserList>;
|
|
6
7
|
export declare const userQueryListRawList: ApiPagingResults<jUserList>;
|
|
7
8
|
export declare const userMapDefault: ApiPagingResults<UserMapModel>;
|
|
8
9
|
export declare const userAddContactDefault: 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
|
+
};
|
package/lib/src/types/file.d.ts
CHANGED
|
@@ -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 '
|
|
1
|
+
import { jObjectLittle } from './utils';
|
|
2
2
|
export declare type CreateGroup = {
|
|
3
3
|
type: string;
|
|
4
4
|
title: 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;
|
package/lib/src/types/model.d.ts
CHANGED
|
@@ -1,32 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
12
|
+
backgroundType?: 'color' | 'image';
|
|
13
|
+
globalShowComment?: boolean;
|
|
14
|
+
key: string;
|
|
15
|
+
contents?: Array<{
|
|
21
16
|
uri: string;
|
|
22
|
-
dateEnd
|
|
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
|
|
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
|
+
}
|
package/lib/src/types/user.d.ts
CHANGED
package/lib/src/types/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 =
|
|
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 |
|
|
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;
|
package/lib/src/util/Test.d.ts
CHANGED
|
@@ -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;
|
package/lib/src/util/ensure.d.ts
CHANGED
|
@@ -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;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see JRCImgProps
|
|
3
|
+
*/
|
|
4
|
+
declare type WidthHeight = {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @see JRCImgProps
|
|
10
|
+
*/
|
|
11
|
+
declare type Size = {
|
|
12
|
+
size?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @see JRCImgProps
|
|
16
|
+
*/
|
|
17
|
+
declare type Format = {
|
|
18
|
+
format?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @see JRCImgProps
|
|
22
|
+
*/
|
|
23
|
+
declare type Timestamp = {
|
|
24
|
+
timestamp?: string | number;
|
|
25
|
+
};
|
|
26
|
+
declare type Args = Timestamp & {
|
|
27
|
+
iconColor?: 'white';
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @see JRCImgProps
|
|
31
|
+
*/
|
|
32
|
+
export declare type ImgUrlProps = {
|
|
33
|
+
url?: string;
|
|
34
|
+
fallbackUrl?: string;
|
|
35
|
+
size?: string;
|
|
36
|
+
width?: number;
|
|
37
|
+
height?: number;
|
|
38
|
+
maxWidth?: string;
|
|
39
|
+
from?: string;
|
|
40
|
+
uri?: string;
|
|
41
|
+
recordId?: string | number;
|
|
42
|
+
type?: string;
|
|
43
|
+
format?: string;
|
|
44
|
+
iconColor?: 'white';
|
|
45
|
+
timestamp?: string | number;
|
|
46
|
+
};
|
|
47
|
+
export declare function getFrom(arg: Pick<ImgUrlProps, 'from'>): string;
|
|
48
|
+
export declare function getTimestamp(arg: Timestamp): string;
|
|
49
|
+
export declare function getArgs(arg: Args): string;
|
|
50
|
+
export declare function getSize(arg: Size & WidthHeight, dpr?: number): string;
|
|
51
|
+
export declare function getFormat(arg: Format): string;
|
|
52
|
+
export declare function getUrl(url: string): URL | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Format an img url
|
|
55
|
+
* If url arg is provided, it is used, in addition with an optional timestamp
|
|
56
|
+
* If not parsable or not passed, one should provide:
|
|
57
|
+
* - optional from
|
|
58
|
+
* - size in either size or width/height argument.
|
|
59
|
+
* If width & height are provided, the downloaded image take car of the screen resolution
|
|
60
|
+
* - uri or type/recordId
|
|
61
|
+
* - optional format, default png
|
|
62
|
+
* - optional timestamp
|
|
63
|
+
* The final url is {from}/{size}/{uri}.{format}?_={timestamp}
|
|
64
|
+
* @param arg
|
|
65
|
+
* @param dpr device pixel ratio
|
|
66
|
+
*/
|
|
67
|
+
export declare function formatImgUrl(arg: ImgUrlProps, dpr?: number): string;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|