jamespot-user-api 1.0.106 → 1.0.108
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/README-internal.md +14 -14
- 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 +12 -8
- 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 +4 -4
- package/documentation/classes/JWedocApi.html +1 -1
- package/documentation/classes/JamespotUserApi.html +1 -1
- package/documentation/classes/Network.html +1 -1
- 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 +19 -6
- package/lib/jamespot-user-api.js +1 -1
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/{assetReservation.d.ts → assetReservation/assetReservation.d.ts} +3 -4
- package/lib/src/apis/assetReservation/assetReservation.mock.d.ts +6 -0
- package/lib/src/apis/base.d.ts +1 -1
- package/lib/src/apis/community.d.ts +39 -2
- package/lib/src/apis/diapazone/diapazone.d.ts +6 -0
- package/lib/src/apis/diapazone/diapazone.mock.d.ts +3 -0
- package/lib/src/apis/diapazone/diapazone.test.d.ts +1 -0
- package/lib/src/apis/{group.d.ts → group/group.d.ts} +23 -13
- package/lib/src/apis/group/group.mock.d.ts +4 -0
- package/lib/src/apis/group/group.test.d.ts +1 -0
- package/lib/src/apis/group/group.types.d.ts +123 -0
- package/lib/src/apis/group/index.d.ts +2 -0
- package/lib/src/apis/index.d.ts +2 -2
- package/lib/src/apis/jamespotUserApi.d.ts +3 -3
- package/lib/src/apis/share/share.d.ts +1 -0
- package/lib/src/apis/wedoc/wedoc.d.ts +1 -1
- package/lib/src/apis/wedoc/wedoc.mock.d.ts +1 -0
- package/lib/src/index.d.ts +1 -3
- package/lib/src/types/assetReservation.d.ts +2 -2
- package/lib/src/types/autocomplete.d.ts +12 -0
- package/lib/src/types/diapazone.d.ts +12 -0
- package/lib/src/types/index.d.ts +1 -1
- package/lib/src/types/realtime.d.ts +37 -11
- package/lib/src/types/user.d.ts +1 -1
- package/lib/src/types/utils.d.ts +6 -1
- package/lib/src/types/wedoc.d.ts +2 -0
- package/lib/src/util/Test.d.ts +10 -1
- package/lib/src/util/index.d.ts +4 -0
- package/lib/src/util/object.d.ts +12 -0
- package/lib/src/util/object.test.d.ts +1 -0
- package/package.json +1 -1
- package/phpunitMock/articleCreate-animatedMeeting.json +41 -0
- package/phpunitMock/assetReservationBookByDate-default.json +76 -0
- package/phpunitMock/assetReservationCancelReservation-default.json +75 -0
- package/phpunitMock/assetReservationCreateReservation-default.json +75 -0
- package/phpunitMock/diapazoneCreateDiapazone.json +18 -0
- package/phpunitMock/objectListAssetReservationList-default.json +428 -0
- package/phpunitMock/objectListDiapazoneQueryList-default-raw-list.json +77 -0
- package/phpunitMock/onlyOfficeGetFile-get-file.json +2 -1
- package/phpunitMock/onlyOfficeGetFiles-get-files.json +2 -1
- package/phpunitMock/onlyOfficeGetObjectAccessHash-default.json +7 -0
- package/phpunitMock/spotGet-default.json +25 -0
- package/phpunitMock/spotGetProperties-default.json +78 -0
- package/pnpm-lock.yaml +12425 -0
- package/lib/src/apis/assetReservation.mock.d.ts +0 -3
- package/lib/src/apis/diapazone.d.ts +0 -24
- package/lib/src/types/group.d.ts +0 -58
- /package/lib/src/apis/{assetReservation.test.d.ts → assetReservation/assetReservation.test.d.ts} +0 -0
|
@@ -1,7 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiReturn, CommunityAutocomplete, Format } from '../types';
|
|
2
2
|
import { JBaseApi } from './base';
|
|
3
3
|
export declare class JCommunityApi extends JBaseApi {
|
|
4
|
-
|
|
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>>;
|
|
41
|
+
sendRequest(message: string, idUserTo: number): Promise<import("../types").ApiWrapper<boolean, {
|
|
5
42
|
code: number;
|
|
6
43
|
msg: string;
|
|
7
44
|
}>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JBaseApi } from '../base';
|
|
2
|
+
import { ApiWrapper, BaseMessages, Filters, Orders, PagingResults, jDiapazoneList } from '../../types';
|
|
3
|
+
export declare class JDiapazoneApi extends JBaseApi {
|
|
4
|
+
create<T>(type: string, token: string, title: string, dateStart: string, publishTo: Array<string>): Promise<ApiWrapper<Array<T>, BaseMessages>>;
|
|
5
|
+
getList(query?: string, filters?: Filters, orders?: Orders, page?: number, format?: string): Promise<ApiWrapper<PagingResults<jDiapazoneList>>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ApiWrapper, BaseMessages, jArticleView, jDiapazoneList, PagingResults } from '../../types';
|
|
2
|
+
export declare const diapazoneCreateDiapazone: ApiWrapper<Array<jArticleView>, BaseMessages>;
|
|
3
|
+
export declare const diapazoneQueryList: ApiWrapper<PagingResults<jDiapazoneList>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { JBaseApi } from '
|
|
1
|
+
import { Category, CreateGroup, GroupList, GroupProperties, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup } from './group.types';
|
|
2
|
+
import { JBaseApi } from '../base';
|
|
3
|
+
import { ApiReturn, Format, PagingResults } from '../../types';
|
|
3
4
|
export declare class JGroupApi extends JBaseApi {
|
|
4
5
|
/**
|
|
5
6
|
* Create a group from scratch
|
|
@@ -7,7 +8,7 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
7
8
|
* @param format return format
|
|
8
9
|
* @returns
|
|
9
10
|
*/
|
|
10
|
-
create<T extends Format = undefined>(group: CreateGroup, format?: T): Promise<import("
|
|
11
|
+
create<T extends Format = undefined>(group: CreateGroup, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, {
|
|
11
12
|
id: number;
|
|
12
13
|
mainType: string;
|
|
13
14
|
type: string;
|
|
@@ -25,14 +26,14 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
25
26
|
dateModified?: string;
|
|
26
27
|
title: string;
|
|
27
28
|
_url: string;
|
|
28
|
-
}>, import("
|
|
29
|
+
}>, import("../../types").BaseMessages>>;
|
|
29
30
|
/**
|
|
30
31
|
* Update a group
|
|
31
32
|
* @param group group to update. The uri is mandatory and identify the group to update
|
|
32
33
|
* @param format return format
|
|
33
34
|
* @returns
|
|
34
35
|
*/
|
|
35
|
-
update<T extends Format = undefined>(group: UpdateGroup, format?: T): Promise<import("
|
|
36
|
+
update<T extends Format = undefined>(group: UpdateGroup, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, {
|
|
36
37
|
id: number;
|
|
37
38
|
mainType: string;
|
|
38
39
|
type: string;
|
|
@@ -41,14 +42,14 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
41
42
|
dateModified?: string;
|
|
42
43
|
title: string;
|
|
43
44
|
_url: string;
|
|
44
|
-
}, GroupList, GroupView, string>, import("
|
|
45
|
+
}, GroupList, GroupView, string>, import("../../types").BaseMessages>>;
|
|
45
46
|
/**
|
|
46
47
|
* Get a spot
|
|
47
48
|
* @param idSpot
|
|
48
49
|
* @param format
|
|
49
50
|
* @returns
|
|
50
51
|
*/
|
|
51
|
-
getSpot<T extends Format = undefined>(idSpot: number | string, format?: T): Promise<import("
|
|
52
|
+
getSpot<T extends Format = undefined>(idSpot: number | string, format?: T): Promise<import("../../types").ApiWrapper<ApiReturn<T, {
|
|
52
53
|
id: number;
|
|
53
54
|
mainType: string;
|
|
54
55
|
type: string;
|
|
@@ -57,22 +58,22 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
57
58
|
dateModified?: string;
|
|
58
59
|
title: string;
|
|
59
60
|
_url: string;
|
|
60
|
-
}, GroupList, GroupView, string>, import("
|
|
61
|
+
}, GroupList, GroupView, string>, import("../../types").BaseMessages>>;
|
|
61
62
|
/**
|
|
62
63
|
* Get the properties of a group that are not within the model
|
|
63
64
|
* @param idSpot
|
|
64
65
|
* @returns
|
|
65
66
|
*/
|
|
66
|
-
getProperties(idSpot: number | string): Promise<import("
|
|
67
|
+
getProperties(idSpot: number | string): Promise<import("../../types").ApiWrapper<GroupProperties, import("../../types").BaseMessages>>;
|
|
67
68
|
/**
|
|
68
69
|
* Get the available applications that can be added to a group
|
|
69
70
|
*/
|
|
70
|
-
getApplications(): Promise<import("
|
|
71
|
+
getApplications(): Promise<import("../../types").ApiWrapper<Record<string, GroupWidget>, import("../../types").BaseMessages>>;
|
|
71
72
|
/**
|
|
72
73
|
* Get the available group categories
|
|
73
74
|
* @returns
|
|
74
75
|
*/
|
|
75
|
-
getCategories(): Promise<import("
|
|
76
|
+
getCategories(): Promise<import("../../types").ApiWrapper<Category[], import("../../types").BaseMessages>>;
|
|
76
77
|
/**
|
|
77
78
|
* Get the members of a group
|
|
78
79
|
* @param idSpot spot id
|
|
@@ -81,7 +82,7 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
81
82
|
* @param page page number
|
|
82
83
|
* @return array of User
|
|
83
84
|
*/
|
|
84
|
-
getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("
|
|
85
|
+
getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../../types").ApiWrapper<PagingResults<{
|
|
85
86
|
id: number;
|
|
86
87
|
mainType: string;
|
|
87
88
|
type: string;
|
|
@@ -90,5 +91,14 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
90
91
|
dateModified?: string;
|
|
91
92
|
title: string;
|
|
92
93
|
_url: string;
|
|
93
|
-
}>, import("
|
|
94
|
+
}>, import("../../types").BaseMessages>>;
|
|
95
|
+
/**
|
|
96
|
+
* Reset the notifications configuration for all users of the group
|
|
97
|
+
* @param config configuration
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
resetNotifications(config: ResetNotificationConfiguration): Promise<import("../../types").ApiWrapper<{
|
|
101
|
+
members: number;
|
|
102
|
+
msg: string;
|
|
103
|
+
}, import("../../types").BaseMessages>>;
|
|
94
104
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jObjectLittle } from '../../types/utils';
|
|
2
|
+
export declare type CreateGroup = {
|
|
3
|
+
type: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
privacy: string | number;
|
|
7
|
+
edito: string | null;
|
|
8
|
+
language: string;
|
|
9
|
+
category: string;
|
|
10
|
+
idCommunity?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type SpotBannerImage = {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
size: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type UpdateGroup = CreateGroup & Partial<GroupProperties> & {
|
|
18
|
+
uri: string;
|
|
19
|
+
image?: string | null;
|
|
20
|
+
spotBanner?: [] | Record<string, SpotBannerImage>;
|
|
21
|
+
token?: string;
|
|
22
|
+
uriCommunity?: string;
|
|
23
|
+
custom_widgets?: Record<string, GroupCustomWidget> | [];
|
|
24
|
+
};
|
|
25
|
+
export declare type GroupProperties = {
|
|
26
|
+
edit_access: '' | 'author';
|
|
27
|
+
commentLevel: '-1' | '1' | '2' | '3';
|
|
28
|
+
user_level_signup: '' | '1' | '2' | '3';
|
|
29
|
+
nounsubscribe: '' | '1';
|
|
30
|
+
useTeaser: '' | '1' | '2';
|
|
31
|
+
displayType: string;
|
|
32
|
+
spot_right_user: string;
|
|
33
|
+
rss_feed: Array<RssType> | '';
|
|
34
|
+
spotDefaultPublishType: string;
|
|
35
|
+
mail_frequency: string;
|
|
36
|
+
mail_comment: '1' | '';
|
|
37
|
+
mail_spotit: '1' | '';
|
|
38
|
+
mail_subscriber: '1' | '';
|
|
39
|
+
lock_mail: '1' | '';
|
|
40
|
+
activity: '1' | '0';
|
|
41
|
+
publishFolder: '1' | '0';
|
|
42
|
+
notifyFolder: '1' | '0';
|
|
43
|
+
widgets: Array<string>;
|
|
44
|
+
rss_access: '1' | '0';
|
|
45
|
+
rss_key: string;
|
|
46
|
+
_options: GroupPropertiesOptions;
|
|
47
|
+
_errors: [];
|
|
48
|
+
lastRssExecution?: Record<string, string>;
|
|
49
|
+
};
|
|
50
|
+
export declare type GroupPropertiesOptions = {
|
|
51
|
+
edit_access: Array<ValueLabel & {
|
|
52
|
+
description: string;
|
|
53
|
+
}>;
|
|
54
|
+
commentLevel: Array<ValueLabel & {
|
|
55
|
+
selected?: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
displayType: Array<ValueLabel>;
|
|
58
|
+
user_level_signup: Array<ValueLabel & {
|
|
59
|
+
selected?: boolean;
|
|
60
|
+
}>;
|
|
61
|
+
spot_right_user: Array<ValueLabel & {
|
|
62
|
+
selected?: boolean;
|
|
63
|
+
}>;
|
|
64
|
+
useTeaser: Array<ValueLabel>;
|
|
65
|
+
spotDefaultPublishType: Array<string>;
|
|
66
|
+
mail_frequency: Array<ValueLabel>;
|
|
67
|
+
widgets: Array<GroupWidget>;
|
|
68
|
+
custom_widgets: Record<string, GroupCustomWidget> | [];
|
|
69
|
+
isArchive: number;
|
|
70
|
+
};
|
|
71
|
+
export declare type RssType = {
|
|
72
|
+
url: string;
|
|
73
|
+
idUser: number;
|
|
74
|
+
send: boolean | undefined;
|
|
75
|
+
error?: string;
|
|
76
|
+
};
|
|
77
|
+
export declare type ValueLabel = {
|
|
78
|
+
value: string | number;
|
|
79
|
+
label: string;
|
|
80
|
+
};
|
|
81
|
+
export declare type GroupWidget = {
|
|
82
|
+
id: string;
|
|
83
|
+
title: string;
|
|
84
|
+
};
|
|
85
|
+
export declare type GroupCustomWidget = {
|
|
86
|
+
idSpot: string;
|
|
87
|
+
idOrder: string;
|
|
88
|
+
idWidget: string;
|
|
89
|
+
type: string;
|
|
90
|
+
title: string;
|
|
91
|
+
url: string;
|
|
92
|
+
visible: string;
|
|
93
|
+
};
|
|
94
|
+
export interface Category {
|
|
95
|
+
id: string;
|
|
96
|
+
idorder: number;
|
|
97
|
+
label: string;
|
|
98
|
+
}
|
|
99
|
+
export declare type GroupLittle = jObjectLittle & {
|
|
100
|
+
dateCreation: string;
|
|
101
|
+
dateModified: string;
|
|
102
|
+
};
|
|
103
|
+
export declare type GroupList = GroupLittle & {
|
|
104
|
+
description: string;
|
|
105
|
+
privacy: string | number;
|
|
106
|
+
edito: string | null;
|
|
107
|
+
language: string;
|
|
108
|
+
category: string;
|
|
109
|
+
idCategory: number;
|
|
110
|
+
};
|
|
111
|
+
export declare type GroupView = GroupList & {
|
|
112
|
+
image?: string | null;
|
|
113
|
+
spotBanner?: [] | Record<string, SpotBannerImage>;
|
|
114
|
+
idCommunity?: string;
|
|
115
|
+
useTeaser?: string;
|
|
116
|
+
};
|
|
117
|
+
export declare type ResetNotificationConfiguration = {
|
|
118
|
+
idSpot: string | number;
|
|
119
|
+
mailFrequency: string | number;
|
|
120
|
+
mailSpotit: boolean;
|
|
121
|
+
mailComment: boolean;
|
|
122
|
+
mailSubscriber: boolean;
|
|
123
|
+
};
|
package/lib/src/apis/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export * from './admin';
|
|
2
2
|
export * from './application';
|
|
3
3
|
export * from './article/article';
|
|
4
|
-
export * from './assetReservation';
|
|
4
|
+
export * from './assetReservation/assetReservation';
|
|
5
5
|
export * from './audience/audience';
|
|
6
6
|
export * from './base';
|
|
7
7
|
export * from './bookmark/bookmark';
|
|
8
8
|
export * from './community';
|
|
9
|
-
export * from './diapazone';
|
|
9
|
+
export * from './diapazone/diapazone';
|
|
10
10
|
export * from './file';
|
|
11
11
|
export * from './filebank';
|
|
12
12
|
export * from './group';
|
|
@@ -2,13 +2,14 @@ import { AdminLicenseApi, AdminUtilsApi, AdminStoreApi } from './admin';
|
|
|
2
2
|
import { JApplicationApi } from './application';
|
|
3
3
|
import { JArticleApi } from './article/article';
|
|
4
4
|
import { JAseiApi } from './asei';
|
|
5
|
-
import { JAssetReservation } from './assetReservation';
|
|
5
|
+
import { JAssetReservation } from './assetReservation/assetReservation';
|
|
6
6
|
import { JAudienceApi } from './audience/audience';
|
|
7
7
|
import { JCommunityApi } from './community';
|
|
8
|
+
import { JDiapazoneApi } from './diapazone/diapazone';
|
|
8
9
|
import { JDriveApi } from './drive/drive';
|
|
9
10
|
import { JFileApi } from './file';
|
|
10
11
|
import { JFilebankApi } from './filebank';
|
|
11
|
-
import { JGroupApi } from './group';
|
|
12
|
+
import { JGroupApi } from './group/group';
|
|
12
13
|
import { JMediaLibraryApi } from './mediaLibrary/mediaLibrary';
|
|
13
14
|
import { JLandApi } from './jland/jland';
|
|
14
15
|
import { JMessengerApi } from './messenger';
|
|
@@ -16,7 +17,6 @@ import { JSearchApi } from './search/search';
|
|
|
16
17
|
import { JBookmarkApi } from './bookmark/bookmark';
|
|
17
18
|
import { JTaxonomyApi } from './taxonomy';
|
|
18
19
|
import { JUserApi } from './user/user';
|
|
19
|
-
import { JDiapazoneApi } from './diapazone';
|
|
20
20
|
import { JWedocApi } from './wedoc/wedoc';
|
|
21
21
|
import { Network } from '../util/network';
|
|
22
22
|
import { JShareApi } from './share/share';
|
|
@@ -11,4 +11,5 @@ export declare class JShareApi extends JBaseApi {
|
|
|
11
11
|
write: string[];
|
|
12
12
|
}, message: string, generalAccessRule: ShareGeneralAccessRules): Promise<ApiWrapper<boolean>>;
|
|
13
13
|
getObjectAccess(uri: string): Promise<ApiWrapper<ShareAccessProps>>;
|
|
14
|
+
getObjectAccessHash(uri: string): Promise<ApiWrapper<string>>;
|
|
14
15
|
}
|
|
@@ -8,7 +8,7 @@ export declare class JWedocApi extends JBaseApi {
|
|
|
8
8
|
idFile: number;
|
|
9
9
|
article: jArticleLittle;
|
|
10
10
|
}>>;
|
|
11
|
-
deleteFile(idFile: number): Promise<ApiWrapper<boolean>>;
|
|
11
|
+
deleteFile(idFile: number, withParent?: boolean): Promise<ApiWrapper<boolean>>;
|
|
12
12
|
createFile(title: string, type: string, publishTo: string[]): Promise<ApiWrapper<{
|
|
13
13
|
idFile: number;
|
|
14
14
|
article: jArticleLittle;
|
|
@@ -11,4 +11,5 @@ export declare const wedocDuplicateFile: ApiWrapper<{
|
|
|
11
11
|
export declare const wedocUpdateFile: ApiWrapper<boolean>;
|
|
12
12
|
export declare const wedocDeleteFile: ApiWrapper<boolean>;
|
|
13
13
|
export declare const wedocGetFile: ApiWrapper<WedocFileType>;
|
|
14
|
+
export declare const wedocGetObjectAccessHash: ApiWrapper<string>;
|
|
14
15
|
export declare const wedocGetFiles: ApiWrapper<PagingResults<WedocFileType>>;
|
package/lib/src/index.d.ts
CHANGED
|
@@ -11,8 +11,6 @@ export { JamespotUserApiInstance };
|
|
|
11
11
|
export default JamespotUserApiInstance;
|
|
12
12
|
export * from './apis';
|
|
13
13
|
export * from './types';
|
|
14
|
-
export * from './util/
|
|
15
|
-
export * from './util/file';
|
|
16
|
-
export * from './util/ensure';
|
|
14
|
+
export * from './util/';
|
|
17
15
|
export * from './window';
|
|
18
16
|
export declare const api: typeof JamespotUserApi;
|
|
@@ -11,8 +11,8 @@ export declare type AssetReservationConfiguration = {
|
|
|
11
11
|
lastBookingSchedule: string;
|
|
12
12
|
};
|
|
13
13
|
export declare type BookableAssetList = jArticleList & {
|
|
14
|
-
_isColorDark: boolean;
|
|
15
|
-
assetPlannerBackgroundColor: string;
|
|
14
|
+
_isColorDark: boolean | null;
|
|
15
|
+
assetPlannerBackgroundColor: string | null;
|
|
16
16
|
};
|
|
17
17
|
export declare type BookableAssetView = BookableAssetList & {
|
|
18
18
|
assetBanner: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jObjectLittle } from './utils';
|
|
1
2
|
export interface BaseAutocomplete {
|
|
2
3
|
id: string;
|
|
3
4
|
uri: string;
|
|
@@ -22,3 +23,14 @@ export declare type jSpotAutocomplete = jObjectAutocomplete & {
|
|
|
22
23
|
};
|
|
23
24
|
export declare type AudienceAutocomplete = jObjectAutocomplete | jUserAutocomplete | jSpotAutocomplete;
|
|
24
25
|
export declare type CommunityAutocomplete = jObjectAutocomplete;
|
|
26
|
+
export declare type Community = jObjectLittle & {
|
|
27
|
+
isTechnical: number;
|
|
28
|
+
status: number;
|
|
29
|
+
image: string;
|
|
30
|
+
isMember: boolean;
|
|
31
|
+
stats: {
|
|
32
|
+
moderators: number;
|
|
33
|
+
members: string;
|
|
34
|
+
};
|
|
35
|
+
_members: Array<jObjectLittle>;
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Audience, jObjectList } from './utils';
|
|
2
|
+
export declare type jDiapazoneList = jObjectList & {
|
|
3
|
+
dateStart: string;
|
|
4
|
+
animatedMeetingContent: Record<string, unknown>;
|
|
5
|
+
_extend: {
|
|
6
|
+
status: string;
|
|
7
|
+
statusValue: 1 | 2 | 3;
|
|
8
|
+
date: string;
|
|
9
|
+
};
|
|
10
|
+
_audience: Audience[];
|
|
11
|
+
_audienceLeft: number;
|
|
12
|
+
};
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export * from './asei';
|
|
|
5
5
|
export * from './assetReservation';
|
|
6
6
|
export * from './autocomplete';
|
|
7
7
|
export * from './bookmark';
|
|
8
|
+
export * from './diapazone';
|
|
8
9
|
export * from './drive';
|
|
9
10
|
export * from './file';
|
|
10
|
-
export * from './group';
|
|
11
11
|
export * from './mediaLibrary';
|
|
12
12
|
export * from './model';
|
|
13
13
|
export * from './search';
|
|
@@ -1,25 +1,51 @@
|
|
|
1
|
-
import { jObjectBase } from './utils';
|
|
1
|
+
import { AllKeys, Readable, jObjectBase } from './utils';
|
|
2
2
|
declare type BookmarksFunctions = 'update' | 'add' | 'delete';
|
|
3
3
|
declare type CustomActionFunctions = 'update' | 'add' | 'remove';
|
|
4
|
+
declare type WSFunctions = 'presence' | 'connection' | 'disconnect';
|
|
4
5
|
export declare type Namespaces = {
|
|
5
6
|
BOOKMARKS: BookmarksFunctions;
|
|
6
7
|
'CUSTOM-ACTION': CustomActionFunctions;
|
|
8
|
+
ws: WSFunctions;
|
|
7
9
|
};
|
|
8
|
-
export declare type
|
|
10
|
+
export declare type AllMessages = {
|
|
11
|
+
BOOKMARKS: {
|
|
12
|
+
update: RTMessageObject<'BOOKMARKS', 'update'>;
|
|
13
|
+
add: RTMessageObject<'BOOKMARKS', 'add'>;
|
|
14
|
+
delete: RTMessageObject<'BOOKMARKS', 'delete'>;
|
|
15
|
+
};
|
|
16
|
+
'CUSTOM-ACTION': {
|
|
17
|
+
update: RTMessageObject<'CUSTOM-ACTION', 'update'>;
|
|
18
|
+
add: RTMessageObject<'CUSTOM-ACTION', 'add'>;
|
|
19
|
+
remove: RTMessageObject<'CUSTOM-ACTION', 'remove'>;
|
|
20
|
+
};
|
|
21
|
+
ws: {
|
|
22
|
+
presence: RTMessageWsPresence;
|
|
23
|
+
connection: RTMessage<'ws', 'connection'>;
|
|
24
|
+
disconnect: RTMessage<'ws', 'disconnect'>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
declare type NamespacesMessages<T extends keyof AllMessages> = Readable<AllMessages[T] & Record<Exclude<AllKeys<AllMessages[keyof AllMessages]>, keyof AllMessages[T]>, never>>;
|
|
28
|
+
declare type AllMessagesInternal = {
|
|
29
|
+
[K in keyof AllMessages]: NamespacesMessages<K>;
|
|
30
|
+
};
|
|
31
|
+
export declare type RTMessageHandler<T extends keyof AllMessages, F extends keyof AllMessages[T]> = {
|
|
9
32
|
namespace: T;
|
|
10
|
-
function:
|
|
11
|
-
handler: (message:
|
|
33
|
+
function: F;
|
|
34
|
+
handler: (message: AllMessagesInternal[T][F]) => void;
|
|
12
35
|
};
|
|
13
36
|
export declare type AnyRTHandlerFunction = {
|
|
14
|
-
[K in keyof Namespaces]: RTMessageHandler<K>['handler'];
|
|
37
|
+
[K in keyof Namespaces]: RTMessageHandler<K, keyof AllMessages[K]>['handler'];
|
|
15
38
|
}[keyof Namespaces];
|
|
16
|
-
export declare type RTMessage<T extends keyof Namespaces
|
|
39
|
+
export declare type RTMessage<T extends keyof Namespaces, F extends Namespaces[T]> = {
|
|
17
40
|
namespace: T;
|
|
18
|
-
function:
|
|
41
|
+
function: F;
|
|
42
|
+
};
|
|
43
|
+
export declare type RTMessageObject<T extends keyof Namespaces, F extends Namespaces[T], O extends jObjectBase = jObjectBase> = RTMessage<T, F> & {
|
|
19
44
|
object: O;
|
|
20
45
|
};
|
|
21
|
-
export declare type
|
|
22
|
-
[
|
|
23
|
-
}
|
|
24
|
-
export declare type
|
|
46
|
+
export declare type RTMessageWsPresence = RTMessage<'ws', 'presence'> & {
|
|
47
|
+
idUsers: number[];
|
|
48
|
+
};
|
|
49
|
+
export declare 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'>;
|
|
50
|
+
export declare type RTReceivedMessage<T extends keyof Namespaces, F extends Namespaces[T]> = ['message', RTMessage<T, F>];
|
|
25
51
|
export {};
|
package/lib/src/types/user.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const UserLevel: {
|
|
|
21
21
|
readonly GUEST: 0;
|
|
22
22
|
};
|
|
23
23
|
export declare type jUserLittle = jObjectLittle & {
|
|
24
|
-
level: typeof UserLevel[keyof typeof UserLevel];
|
|
24
|
+
level: (typeof UserLevel)[keyof typeof UserLevel];
|
|
25
25
|
dateCreation: string;
|
|
26
26
|
dateModified: string;
|
|
27
27
|
};
|
package/lib/src/types/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jSpotLittle } from './spot';
|
|
1
2
|
import { jUserLittle } from './user';
|
|
2
3
|
/**
|
|
3
4
|
* Ease usage in IDE by decomposing complex types
|
|
@@ -9,7 +10,7 @@ import { jUserLittle } from './user';
|
|
|
9
10
|
export declare type Readable<T> = T extends infer U ? {
|
|
10
11
|
[K in keyof U]: U[K];
|
|
11
12
|
} : never;
|
|
12
|
-
declare type AllKeys<T> = T extends unknown ? keyof T : never;
|
|
13
|
+
export declare type AllKeys<T> = T extends unknown ? keyof T : never;
|
|
13
14
|
declare type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Readable<T & Partial<Record<Exclude<K, keyof T>, never>>> : never;
|
|
14
15
|
/**
|
|
15
16
|
* Builds an exclusive union type from a union type
|
|
@@ -105,6 +106,7 @@ export declare type Order = {
|
|
|
105
106
|
name: string;
|
|
106
107
|
sort: 'ASC' | 'DESC';
|
|
107
108
|
};
|
|
109
|
+
export declare type Audience = jUserLittle | jSpotLittle;
|
|
108
110
|
export declare type Orders = Array<Order>;
|
|
109
111
|
export declare type FilterValue = boolean | string | number | string[] | {
|
|
110
112
|
srcId: number | string;
|
|
@@ -121,6 +123,9 @@ export declare type Filter = {
|
|
|
121
123
|
value: FilterValue;
|
|
122
124
|
operator?: '<' | '>' | '<=' | '>=' | '!=' | '<>' | 'like' | 'between' | 'is' | 'is not' | 'in' | 'link' | 'match' | 'equal';
|
|
123
125
|
method?: '<' | '>' | '<=' | '>=' | '!=' | '<>' | '+' | '-' | 'like' | 'between' | 'is' | 'is not' | 'in' | 'link' | 'match' | 'equal';
|
|
126
|
+
or?: boolean;
|
|
127
|
+
isNull?: boolean;
|
|
128
|
+
isNotNull?: boolean;
|
|
124
129
|
};
|
|
125
130
|
export declare type Filters = Array<Filter>;
|
|
126
131
|
export declare type MaybeWithToken<T> = T & {
|
package/lib/src/types/wedoc.d.ts
CHANGED
|
@@ -12,9 +12,11 @@ export declare type WedocFileType = jObjectBase & {
|
|
|
12
12
|
mimetype: string;
|
|
13
13
|
_extend: {
|
|
14
14
|
generalAccessRule: string;
|
|
15
|
+
generalAccessHash: string | undefined;
|
|
15
16
|
dateModified: string;
|
|
16
17
|
dateCreation: string;
|
|
17
18
|
fileInfo: WedocFileInfo;
|
|
19
|
+
parentFiles: number[];
|
|
18
20
|
};
|
|
19
21
|
_audience: WedocFileAudienceType[];
|
|
20
22
|
_right: Rights;
|
package/lib/src/util/Test.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JamespotUserApi } from '../apis';
|
|
2
|
-
import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete, jObjectList, jUserList } from '../types';
|
|
2
|
+
import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete, jObjectList, jUserList, Rights } from '../types';
|
|
3
3
|
import { FetchResponseType, WindowBrowser } from '../window';
|
|
4
4
|
import { Network } from './network';
|
|
5
5
|
export declare const windowBrowser: WindowBrowser;
|
|
@@ -33,3 +33,12 @@ export declare const validateUserIsFormatList: <T extends jUserList = jUserList>
|
|
|
33
33
|
export declare const validateObjectIsFormatAutocomplete: <T extends jObjectAutocomplete = jObjectAutocomplete>(object: T) => void;
|
|
34
34
|
export declare const expectToHaveProperties: <T>(props: string[], payload: T[]) => void;
|
|
35
35
|
export declare const expectToBeArray: <T>(arr: T[]) => void;
|
|
36
|
+
export declare const validateRights: (object: Rights) => void;
|
|
37
|
+
export declare const jDynamicProperties: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Valorise toutes les propriétés Jamespot dynamiques avec leur typeof, sur toute la profondeur de l'objet.
|
|
40
|
+
* @param obj objet à modifier
|
|
41
|
+
* @param extraProperties propriétés supplémentaires à remplacer
|
|
42
|
+
*/
|
|
43
|
+
export declare function replaceJDynamicProperties(obj: any, ...extraProperties: string[]): any;
|
|
44
|
+
export declare const validatePhpUnitSnapshot: (phpUnitSnapshot: object, mock: object, ...extraPropertiesToReplace: string[]) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function deepEqual(a: any, b: any, ignoreAttributes?: Array<string>): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Remplace la valeur de propriétés par leur typeof, sur toute la profondeur de l'objet.
|
|
4
|
+
* Valorisation avec le typeof pour conserver la vérification du type dans le cas d'une comparaison d'objets.
|
|
5
|
+
* Avantages :
|
|
6
|
+
* - gère l'ensemble de la profondeur de l'objet
|
|
7
|
+
* - peut être intégré à un test toMatchObject qui permet une meilleure
|
|
8
|
+
* lisibilité des erreurs potentielles ({@see validatePhpUnitSnapshot})
|
|
9
|
+
* @param obj objet à modifier
|
|
10
|
+
* @param replacedProperties propriétés à remplacer
|
|
11
|
+
*/
|
|
12
|
+
export declare function replacePropertiesWithTypes(obj: any, replacedProperties: string[]): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"o": "article",
|
|
3
|
+
"f": "create",
|
|
4
|
+
"error": 0,
|
|
5
|
+
"messages": [{ "code": 200, "msg": "Enregistrement r\u00e9ussi" }],
|
|
6
|
+
"result": [
|
|
7
|
+
{
|
|
8
|
+
"id": 18,
|
|
9
|
+
"mainType": "article",
|
|
10
|
+
"type": "mpArticle",
|
|
11
|
+
"uri": "mpArticle/18",
|
|
12
|
+
"dateCreation": "2023-06-23 14:15:22",
|
|
13
|
+
"dateModified": "2023-06-23 14:15:22",
|
|
14
|
+
"title": "animatedMeeting snapshot",
|
|
15
|
+
"_url": "/article/18",
|
|
16
|
+
"_right": {
|
|
17
|
+
"create": true,
|
|
18
|
+
"read": true,
|
|
19
|
+
"publish": false,
|
|
20
|
+
"administrate": true,
|
|
21
|
+
"update": true,
|
|
22
|
+
"delete": true,
|
|
23
|
+
"comment": true,
|
|
24
|
+
"member": true
|
|
25
|
+
},
|
|
26
|
+
"description": "<div class='content-html'></div>",
|
|
27
|
+
"_user": {
|
|
28
|
+
"id": 1,
|
|
29
|
+
"mainType": "user",
|
|
30
|
+
"type": "user",
|
|
31
|
+
"uri": "user/1",
|
|
32
|
+
"dateCreation": "2019-03-26 16:29:33",
|
|
33
|
+
"dateModified": "2019-07-19 09:39:23",
|
|
34
|
+
"title": "AdminJenkins",
|
|
35
|
+
"_url": "/user/1",
|
|
36
|
+
"level": 9
|
|
37
|
+
},
|
|
38
|
+
"processContext": null
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|