jamespot-user-api 1.0.115 → 1.0.116
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/main.js +2 -2
- package/documentation/assets/search.js +1 -1
- package/documentation/assets/style.css +3 -2
- 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/JFaqApi.html +1 -1
- package/documentation/classes/JFileApi.html +5 -5
- package/documentation/classes/JFilebankApi.html +1 -1
- package/documentation/classes/JGroupApi.html +11 -11
- 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 +2 -2
- package/documentation/classes/Network.html +2 -2
- package/documentation/classes/TVDisplayApi.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 +2 -2
- package/documentation/interfaces/SearchQueryOption.html +2 -2
- package/documentation/interfaces/SearchQueryResult.html +1 -1
- package/documentation/interfaces/SearchQuerySortModel.html +2 -2
- 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 +9 -9
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/application/types.d.ts +6 -6
- package/lib/src/apis/article/article.d.ts +5 -5
- package/lib/src/apis/filebank.d.ts +3 -3
- package/lib/src/apis/jland/jland.d.ts +6 -6
- package/lib/src/apis/taxonomy/types.d.ts +4 -4
- package/lib/src/apis/user/user.d.ts +3 -3
- package/lib/src/types/adminLicence.d.ts +6 -6
- package/lib/src/types/adminStore.d.ts +2 -2
- package/lib/src/types/adminUtils.d.ts +3 -3
- package/lib/src/types/asei.d.ts +5 -5
- package/lib/src/types/assetReservation.d.ts +4 -4
- package/lib/src/types/autocomplete.d.ts +6 -6
- package/lib/src/types/bookmark.d.ts +5 -5
- package/lib/src/types/comment.d.ts +2 -2
- package/lib/src/types/diapazone.d.ts +1 -1
- package/lib/src/types/drive.d.ts +5 -5
- package/lib/src/types/faq.d.ts +5 -5
- package/lib/src/types/file.d.ts +8 -8
- package/lib/src/types/group.d.ts +13 -13
- package/lib/src/types/mediaLibrary.d.ts +3 -3
- package/lib/src/types/model.d.ts +32 -32
- package/lib/src/types/realtime.d.ts +14 -14
- package/lib/src/types/search.d.ts +4 -4
- package/lib/src/types/share.d.ts +5 -5
- package/lib/src/types/tvDisplay.d.ts +18 -18
- package/lib/src/types/uri.d.ts +1 -1
- package/lib/src/types/user.d.ts +5 -5
- package/lib/src/types/utils.d.ts +29 -29
- package/lib/src/types/wedoc.d.ts +2 -2
- package/lib/src/types/widgets.d.ts +39 -39
- package/lib/src/util/ensure.d.ts +2 -2
- package/lib/src/util/images.d.ts +6 -6
- package/lib/src/util/network.d.ts +3 -3
- package/lib/src/window/Window.d.ts +2 -2
- package/package.json +72 -73
- package/pnpm-lock.yaml +0 -12425
package/lib/src/types/model.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type WidgetText = {
|
|
2
2
|
type: 'text';
|
|
3
3
|
};
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type WidgetTextValue = string;
|
|
5
|
+
export type WidgetTextarea = {
|
|
6
6
|
type: 'textarea';
|
|
7
7
|
params?: {
|
|
8
8
|
class: 'mceEditor';
|
|
9
9
|
mention: '1';
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type WidgetTextareaValue = string | null;
|
|
13
|
+
export type WidgetNumber = {
|
|
14
14
|
type: 'number';
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type WidgetNumberValue = number;
|
|
17
|
+
export type WidgetDate = {
|
|
18
18
|
type: 'date';
|
|
19
19
|
format: string;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type WidgetDateValue = string | null;
|
|
22
|
+
export type WidgetDatetime = {
|
|
23
23
|
type: 'datetime';
|
|
24
24
|
};
|
|
25
|
-
export
|
|
26
|
-
export
|
|
25
|
+
export type WidgetDatetimeValue = string | null;
|
|
26
|
+
export type WidgetDatePicker = {
|
|
27
27
|
type: 'datePicker';
|
|
28
28
|
};
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
29
|
+
export type WidgetDatePickerValue = string | null;
|
|
30
|
+
export type WidgetActiveValue = number;
|
|
31
|
+
export type WidgetMultiattribute = {
|
|
32
32
|
type: 'multiattribute';
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type WidgetFile = {
|
|
35
35
|
type: 'file';
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type WidgetSelect<U extends string = string> = {
|
|
38
38
|
type: 'select';
|
|
39
39
|
options: Record<U, string>;
|
|
40
40
|
params?: {
|
|
@@ -43,39 +43,39 @@ export declare type WidgetSelect<U extends string = string> = {
|
|
|
43
43
|
explain?: 1;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type WidgetEmail = {
|
|
47
47
|
type: 'email';
|
|
48
48
|
};
|
|
49
|
-
export
|
|
50
|
-
export
|
|
49
|
+
export type WidgetEmailValue = string;
|
|
50
|
+
export type WidgetUrl = {
|
|
51
51
|
type: 'url';
|
|
52
52
|
params: {
|
|
53
53
|
target?: '_blank';
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
-
export
|
|
57
|
-
export
|
|
56
|
+
export type WidgetUrlValue = string;
|
|
57
|
+
export type WidgetRefUser = {
|
|
58
58
|
type: 'refUser';
|
|
59
59
|
};
|
|
60
|
-
export
|
|
60
|
+
export type WidgetTransient = {
|
|
61
61
|
type: 'transient';
|
|
62
62
|
};
|
|
63
|
-
export
|
|
63
|
+
export type WidgetRadio = {
|
|
64
64
|
type: 'radio';
|
|
65
65
|
options: Record<string, string>;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type WidgetCheckbox = {
|
|
68
68
|
type: 'checkbox';
|
|
69
69
|
options: Record<string, string>;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type WidgetTaxonomy = {
|
|
72
72
|
type: 'taxonomy';
|
|
73
73
|
params: {
|
|
74
74
|
idTaxonomy: string;
|
|
75
75
|
type?: string;
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
-
export
|
|
78
|
+
export type WidgetOrientedlinks = {
|
|
79
79
|
type: 'orientedlinks';
|
|
80
80
|
params: {
|
|
81
81
|
'jcomplete-multiple': '0' | '1';
|
|
@@ -83,7 +83,7 @@ export declare type WidgetOrientedlinks = {
|
|
|
83
83
|
supportedTypes: Array<string>;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
|
-
export
|
|
86
|
+
export type WidgetUri = {
|
|
87
87
|
type: 'uri';
|
|
88
88
|
params: {
|
|
89
89
|
class: string;
|
|
@@ -91,17 +91,17 @@ export declare type WidgetUri = {
|
|
|
91
91
|
type: string;
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
|
-
export
|
|
95
|
-
export
|
|
96
|
-
export
|
|
94
|
+
export type Widget = WidgetText | WidgetTextarea | WidgetNumber | WidgetDate | WidgetDatetime | WidgetDatePicker | WidgetSelect | WidgetEmail | WidgetUrl | WidgetRefUser | WidgetRadio | WidgetCheckbox | WidgetOrientedlinks | WidgetTaxonomy | WidgetUri | WidgetTransient | WidgetMultiattribute | WidgetFile;
|
|
95
|
+
export type WidgetsValue = WidgetActiveValue | WidgetDatePickerValue | WidgetDatetimeValue | WidgetDateValue | WidgetEmailValue | WidgetNumberValue | WidgetTextareaValue | WidgetTextValue | WidgetUrlValue;
|
|
96
|
+
export type FieldConfiguration<T extends string = string> = {
|
|
97
97
|
label: string;
|
|
98
98
|
description?: string;
|
|
99
99
|
widget: Widget;
|
|
100
100
|
name: T;
|
|
101
101
|
mandatory: boolean;
|
|
102
102
|
};
|
|
103
|
-
export
|
|
104
|
-
export
|
|
103
|
+
export type Configuration<T extends string> = FieldConfiguration<T>;
|
|
104
|
+
export type Model<T extends string = string> = {
|
|
105
105
|
type: string;
|
|
106
106
|
mainType: string;
|
|
107
107
|
label: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AllKeys, Readable, jObjectBase } from './utils';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
2
|
+
type BookmarksFunctions = 'update' | 'add' | 'delete';
|
|
3
|
+
type CustomActionFunctions = 'update' | 'add' | 'remove';
|
|
4
|
+
type WSFunctions = 'presence' | 'connection' | 'disconnect';
|
|
5
|
+
export type Namespaces = {
|
|
6
6
|
BOOKMARKS: BookmarksFunctions;
|
|
7
7
|
'CUSTOM-ACTION': CustomActionFunctions;
|
|
8
8
|
ws: WSFunctions;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type AllMessages = {
|
|
11
11
|
BOOKMARKS: {
|
|
12
12
|
update: RTMessageObject<'BOOKMARKS', 'update'>;
|
|
13
13
|
add: RTMessageObject<'BOOKMARKS', 'add'>;
|
|
@@ -24,28 +24,28 @@ export declare type AllMessages = {
|
|
|
24
24
|
disconnect: RTMessage<'ws', 'disconnect'>;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
type NamespacesMessages<T extends keyof AllMessages> = Readable<AllMessages[T] & Record<Exclude<AllKeys<AllMessages[keyof AllMessages]>, keyof AllMessages[T]>, never>>;
|
|
28
|
+
type AllMessagesInternal = {
|
|
29
29
|
[K in keyof AllMessages]: NamespacesMessages<K>;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type RTMessageHandler<T extends keyof AllMessages, F extends keyof AllMessages[T]> = {
|
|
32
32
|
namespace: T;
|
|
33
33
|
function: F;
|
|
34
34
|
handler: (message: AllMessagesInternal[T][F]) => void;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type AnyRTHandlerFunction = {
|
|
37
37
|
[K in keyof Namespaces]: RTMessageHandler<K, keyof AllMessages[K]>['handler'];
|
|
38
38
|
}[keyof Namespaces];
|
|
39
|
-
export
|
|
39
|
+
export type RTMessage<T extends keyof Namespaces, F extends Namespaces[T]> = {
|
|
40
40
|
namespace: T;
|
|
41
41
|
function: F;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type RTMessageObject<T extends keyof Namespaces, F extends Namespaces[T], O extends jObjectBase = jObjectBase> = RTMessage<T, F> & {
|
|
44
44
|
object: O;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type RTMessageWsPresence = RTMessage<'ws', 'presence'> & {
|
|
47
47
|
idUsers: number[];
|
|
48
48
|
};
|
|
49
|
-
export
|
|
50
|
-
export
|
|
49
|
+
export type AnyRTMessage = RTMessageObject<'BOOKMARKS', 'update'> | RTMessageObject<'BOOKMARKS', 'add'> | RTMessageObject<'BOOKMARKS', 'delete'> | RTMessageObject<'CUSTOM-ACTION', 'update'> | RTMessageObject<'CUSTOM-ACTION', 'add'> | RTMessageObject<'CUSTOM-ACTION', 'remove'> | RTMessageWsPresence | RTMessage<'ws', 'connection'> | RTMessage<'ws', 'disconnect'>;
|
|
50
|
+
export type RTReceivedMessage<T extends keyof Namespaces, F extends Namespaces[T]> = ['message', RTMessage<T, F>];
|
|
51
51
|
export {};
|
|
@@ -27,7 +27,7 @@ export interface SearchFacetValueModel {
|
|
|
27
27
|
values: SearchFacetValues[];
|
|
28
28
|
title: string;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type SearchFacetValues = {
|
|
31
31
|
count: number;
|
|
32
32
|
value: string;
|
|
33
33
|
title: string;
|
|
@@ -77,7 +77,7 @@ export interface SearchResultCatProps {
|
|
|
77
77
|
showAll?: boolean;
|
|
78
78
|
results: SearchResultProps[];
|
|
79
79
|
}
|
|
80
|
-
export
|
|
80
|
+
export type SearchResultProps = SearchResultPropsApp | SearchResultPropsObject;
|
|
81
81
|
export interface SearchResultPropsApp {
|
|
82
82
|
name: string;
|
|
83
83
|
title: string;
|
|
@@ -120,7 +120,7 @@ export interface SearchQueryResult<T extends jObjectLittle = jObjectLittle> {
|
|
|
120
120
|
facets: SearchFacetValueModel[];
|
|
121
121
|
categories: SearchCategoryValue[];
|
|
122
122
|
}
|
|
123
|
-
export
|
|
123
|
+
export type SearchLastQuery = {
|
|
124
124
|
keywords: string;
|
|
125
125
|
};
|
|
126
|
-
export
|
|
126
|
+
export type SearchAdminConfig = any;
|
package/lib/src/types/share.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jUserLittle } from './user';
|
|
2
2
|
import { Rights } from './utils';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ShareGeneralAccessRules = 'link' | 'invitation';
|
|
4
|
+
export type ShareOptionObject = {
|
|
5
5
|
id: number;
|
|
6
6
|
title: string;
|
|
7
7
|
uri: string;
|
|
8
8
|
idUser: number;
|
|
9
9
|
_right: Rights;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type ShareAccessObject = {
|
|
12
12
|
id: number;
|
|
13
13
|
type: string;
|
|
14
14
|
uri: string;
|
|
@@ -19,8 +19,8 @@ export declare type ShareAccessObject = {
|
|
|
19
19
|
_audience: ShareAudienceItem[];
|
|
20
20
|
_right: Rights;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export type ShareAudienceItem = jUserLittle;
|
|
23
|
+
export type ShareAccessProps = {
|
|
24
24
|
audience: ShareAudienceItem[];
|
|
25
25
|
read: string[];
|
|
26
26
|
write: string[];
|
|
@@ -2,8 +2,8 @@ import { ArticleCreation, GroupLittle } from '../apis';
|
|
|
2
2
|
import { jCommentList } from './comment';
|
|
3
3
|
import { jFileLittle } from './file';
|
|
4
4
|
import { Readable, jArticleList, jArticleLittle, jObjectList } from './utils';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type TvChannelType = 'DYNAMIC' | 'SLIDESHOW';
|
|
6
|
+
export type TVChannelCustom<T extends TvChannelType> = jObjectList & {
|
|
7
7
|
tvChannelType: T;
|
|
8
8
|
tvChannelBackgroundColor: string | null;
|
|
9
9
|
tvChannelNumImages: number;
|
|
@@ -20,52 +20,52 @@ export declare type TVChannelCustom<T extends TvChannelType> = jObjectList & {
|
|
|
20
20
|
}>;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type TVChannelCustomListDynamic = TVChannelCustom<'DYNAMIC'> & {
|
|
24
24
|
tvChannelNumImages: 0;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
26
|
+
export type TVChannelCustomListSlideshow = TVChannelCustom<'SLIDESHOW'>;
|
|
27
|
+
export type TVChannelLittle = Readable<jArticleLittle>;
|
|
28
|
+
export type TVChannelDynamicList = Readable<jArticleList & TVChannelCustomListDynamic>;
|
|
29
|
+
export type TVChannelSlideshowList = Readable<jArticleList & TVChannelCustomListSlideshow>;
|
|
30
|
+
export type TVChannelCustomList = Readable<(jArticleList & TVChannelCustomListDynamic) | TVChannelCustomListSlideshow>;
|
|
31
|
+
export type TVChannelList = TVChannelDynamicList | TVChannelSlideshowList;
|
|
32
|
+
export type TVChannelCreation = Readable<ArticleCreation & (Partial<TVChannelCustomListDynamic> | Partial<TVChannelCustomListSlideshow>) & {
|
|
33
33
|
tvChannelType: 'DYNAMIC' | 'SLIDESHOW';
|
|
34
34
|
}>;
|
|
35
|
-
export
|
|
35
|
+
export type TVChannelCreatePayload = {
|
|
36
36
|
tvChannelGroupTarget?: Array<string>;
|
|
37
37
|
tvChannelNumImages?: never;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type TVChannelDynamicComment = Readable<jCommentList & {
|
|
40
40
|
_extend: {
|
|
41
41
|
userImageSecureUrl: string;
|
|
42
42
|
descriptionSecure: string;
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
45
|
-
export
|
|
45
|
+
export type TVChannelDynamicArticle = Readable<jArticleList & {
|
|
46
46
|
_extend?: {
|
|
47
47
|
imageSecureUrl?: string;
|
|
48
48
|
descriptionSecure: string;
|
|
49
49
|
comments: TVChannelDynamicComment[];
|
|
50
50
|
};
|
|
51
51
|
}>;
|
|
52
|
-
export
|
|
52
|
+
export type TVGetChannelSlideshowFile = jFileLittle & {
|
|
53
53
|
_extend: {
|
|
54
54
|
imageSecureUrl?: string;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
export
|
|
57
|
+
export type TVGetChannelResponse = {
|
|
58
58
|
interval: number;
|
|
59
59
|
channel: TVGetConfigureChannelResponse;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
62
|
-
export
|
|
61
|
+
export type TVGetConfigureChannelResponse = TVGetConfigureDynamicChannelResponse | TVGetConfigureSlideshowChannelResponse;
|
|
62
|
+
export type TVGetConfigureDynamicChannelResponse = TVChannelDynamicList & {
|
|
63
63
|
_extend: {
|
|
64
64
|
imageSecureUrl?: string;
|
|
65
65
|
articles?: TVChannelDynamicArticle[];
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
export
|
|
68
|
+
export type TVGetConfigureSlideshowChannelResponse = TVChannelSlideshowList & {
|
|
69
69
|
_extend: {
|
|
70
70
|
attachments?: TVGetChannelSlideshowFile[];
|
|
71
71
|
};
|
package/lib/src/types/uri.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type with one of (tuple type - id) and (uri) required. If both are passed, only the uri will be used
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type UriOrTypeId = Partial<TypeId> & Partial<Uri>;
|
|
5
5
|
/**
|
|
6
6
|
* Interface representing the parameters used to make a content/record uri
|
|
7
7
|
* @member type - type of the image (ex: user, fileArticle, spot, diffgroup, etc.)
|
package/lib/src/types/user.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { jObjectLittle } from './utils';
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated Use jUserList instead
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type UserModel = jObjectLittle & {
|
|
7
7
|
dateCreation: string;
|
|
8
8
|
dateModified: string;
|
|
9
9
|
firstname: string;
|
|
@@ -11,7 +11,7 @@ export declare type UserModel = jObjectLittle & {
|
|
|
11
11
|
active: number;
|
|
12
12
|
mail?: string;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type UserMapModel = {
|
|
15
15
|
idInType: number;
|
|
16
16
|
lat: number;
|
|
17
17
|
lng: number;
|
|
@@ -22,13 +22,13 @@ export declare const UserLevel: {
|
|
|
22
22
|
readonly EXTERNAL: 3;
|
|
23
23
|
readonly GUEST: 0;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type jUserLittle = jObjectLittle & {
|
|
26
26
|
level: (typeof UserLevel)[keyof typeof UserLevel];
|
|
27
27
|
dateCreation: string;
|
|
28
28
|
dateModified: string;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type jUserList = jUserLittle & {
|
|
31
31
|
active: number;
|
|
32
32
|
[key: string]: WidgetsValue;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type jUserView = jUserList & {};
|
package/lib/src/types/utils.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ import { jUserLittle } from './user';
|
|
|
7
7
|
* B: A & {b: int}
|
|
8
8
|
* Readable<B> => {a: string, b:int}
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type Readable<T> = T extends infer U ? {
|
|
11
11
|
[K in keyof U]: U[K];
|
|
12
12
|
} : never;
|
|
13
|
-
export
|
|
14
|
-
|
|
13
|
+
export type AllKeys<T> = T extends unknown ? keyof T : never;
|
|
14
|
+
type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Readable<T & Partial<Record<Exclude<K, keyof T>, never>>> : never;
|
|
15
15
|
/**
|
|
16
16
|
* Builds an exclusive union type from a union type
|
|
17
17
|
* C = ExclusifyUnion<A|B>
|
|
@@ -20,13 +20,13 @@ declare type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Rea
|
|
|
20
20
|
* tutu: C = {a: "tata", b: 123} KO => Types of property 'a' are incompatible. Type 'string' is not assignable to type 'undefined'.
|
|
21
21
|
* This is the kind of error shown when you add too many properties with this definition.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type ExclusifyUnion<T> = _ExclusifyUnion<T, AllKeys<T>>;
|
|
24
24
|
export interface BaseMessage {
|
|
25
25
|
msg: string;
|
|
26
26
|
code: number;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
export
|
|
28
|
+
export type BaseMessages = BaseMessage[];
|
|
29
|
+
export type BaseMessagesOne = [BaseMessage];
|
|
30
30
|
export interface ApiDefaultWrapper<U = BaseMessages> {
|
|
31
31
|
o: string;
|
|
32
32
|
f: string;
|
|
@@ -45,8 +45,8 @@ export interface PagingResults<T> {
|
|
|
45
45
|
limit: number;
|
|
46
46
|
page: number;
|
|
47
47
|
}
|
|
48
|
-
export
|
|
49
|
-
export
|
|
48
|
+
export type ApiPagingResults<T, U = BaseMessages> = ApiWrapper<PagingResults<T>, U>;
|
|
49
|
+
export type Rights = {
|
|
50
50
|
create: boolean;
|
|
51
51
|
read: boolean;
|
|
52
52
|
publish: boolean;
|
|
@@ -56,7 +56,7 @@ export declare type Rights = {
|
|
|
56
56
|
comment: boolean;
|
|
57
57
|
member: boolean;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type jObjectBase = {
|
|
60
60
|
id: number;
|
|
61
61
|
mainType: string;
|
|
62
62
|
type: string;
|
|
@@ -64,11 +64,11 @@ export declare type jObjectBase = {
|
|
|
64
64
|
dateCreation?: string;
|
|
65
65
|
dateModified?: string;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type jObjectLittle = jObjectBase & {
|
|
68
68
|
title: string;
|
|
69
69
|
_url: string;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type jObjectList = jObjectLittle & {
|
|
72
72
|
description?: string | null;
|
|
73
73
|
_user: jUserLittle;
|
|
74
74
|
_right: Rights;
|
|
@@ -76,39 +76,39 @@ export declare type jObjectList = jObjectLittle & {
|
|
|
76
76
|
/**
|
|
77
77
|
* @deprecated Use jObjectLittle instead
|
|
78
78
|
*/
|
|
79
|
-
export
|
|
79
|
+
export type Little = jObjectLittle;
|
|
80
80
|
/**
|
|
81
81
|
* @deprecated Use jObjectList instead
|
|
82
82
|
*/
|
|
83
|
-
export
|
|
84
|
-
export
|
|
83
|
+
export type List = jObjectList;
|
|
84
|
+
export type jLinkLittle = jObjectBase & {
|
|
85
85
|
srcId: number;
|
|
86
86
|
srcType: string;
|
|
87
87
|
targetId: number;
|
|
88
88
|
targetType: string | null;
|
|
89
89
|
};
|
|
90
|
-
export
|
|
90
|
+
export type jLinkList<T extends jObjectBase = jObjectLittle | jUserLittle> = jLinkLittle & {
|
|
91
91
|
value: string | null;
|
|
92
92
|
_src?: T;
|
|
93
93
|
_target?: T | undefined;
|
|
94
94
|
};
|
|
95
|
-
export
|
|
95
|
+
export type jArticleLittle = jObjectLittle & {
|
|
96
96
|
dateCreation: string;
|
|
97
97
|
dateModified: string;
|
|
98
98
|
};
|
|
99
|
-
export
|
|
99
|
+
export type jArticleList = jArticleLittle & {
|
|
100
100
|
description?: string | null;
|
|
101
101
|
_user: jUserLittle;
|
|
102
102
|
_right: Rights;
|
|
103
103
|
};
|
|
104
|
-
export
|
|
105
|
-
export
|
|
104
|
+
export type jArticleView = jArticleList & {};
|
|
105
|
+
export type Order = {
|
|
106
106
|
name: string;
|
|
107
107
|
sort: 'ASC' | 'DESC';
|
|
108
108
|
};
|
|
109
|
-
export
|
|
110
|
-
export
|
|
111
|
-
export
|
|
109
|
+
export type Audience = jUserLittle | GroupLittle;
|
|
110
|
+
export type Orders = Array<Order>;
|
|
111
|
+
export type FilterValue = boolean | string | number | string[] | {
|
|
112
112
|
srcId: number | string;
|
|
113
113
|
srcType: string;
|
|
114
114
|
} | {
|
|
@@ -118,7 +118,7 @@ export declare type FilterValue = boolean | string | number | string[] | {
|
|
|
118
118
|
start: string;
|
|
119
119
|
end: string;
|
|
120
120
|
};
|
|
121
|
-
export
|
|
121
|
+
export type Filter = {
|
|
122
122
|
name: string;
|
|
123
123
|
value: FilterValue;
|
|
124
124
|
operator?: '<' | '>' | '<=' | '>=' | '!=' | '<>' | 'like' | 'between' | 'is' | 'is not' | 'in' | 'link' | 'match' | 'equal';
|
|
@@ -127,14 +127,14 @@ export declare type Filter = {
|
|
|
127
127
|
isNull?: boolean;
|
|
128
128
|
isNotNull?: boolean;
|
|
129
129
|
};
|
|
130
|
-
export
|
|
131
|
-
export
|
|
130
|
+
export type Filters = Array<Filter>;
|
|
131
|
+
export type MaybeWithToken<T> = T & {
|
|
132
132
|
token?: string | undefined;
|
|
133
133
|
};
|
|
134
|
-
export
|
|
134
|
+
export type MaybeWithParent<T extends jObjectBase = jObjectBase> = {
|
|
135
135
|
_parent?: T;
|
|
136
136
|
};
|
|
137
|
-
export
|
|
138
|
-
export
|
|
139
|
-
export
|
|
137
|
+
export type Format = 'raw-little' | 'raw-list' | 'raw-view' | undefined;
|
|
138
|
+
export type ApiReturn<T extends Format, Little, List = Little, View = List, Default = {}> = T extends 'raw-little' ? Little : T extends 'raw-list' ? List : T extends 'raw-view' ? View : Default;
|
|
139
|
+
export type ValueOf<T> = T[keyof T];
|
|
140
140
|
export {};
|
package/lib/src/types/wedoc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jUserLittle } from './user';
|
|
2
2
|
import { Filters, jObjectBase, jObjectLittle, Orders, Rights } from './utils';
|
|
3
|
-
export
|
|
3
|
+
export type WedocFileInfo = {
|
|
4
4
|
color: string;
|
|
5
5
|
description: string;
|
|
6
6
|
extension: string;
|
|
@@ -22,7 +22,7 @@ export declare type WedocFileType = jObjectBase & {
|
|
|
22
22
|
_right: Rights;
|
|
23
23
|
_user: jUserLittle;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type WedocFileAudienceType = jObjectLittle;
|
|
26
26
|
export declare type WedocTemplate = {
|
|
27
27
|
color: string;
|
|
28
28
|
description: string;
|