jamespot-user-api 1.0.101 → 1.0.103
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/AdminStoreApi.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 +9 -9
- package/documentation/classes/JLandApi.html +1 -1
- package/documentation/classes/JLicenseApi.html +4 -4
- 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/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/ApiDefaultWrapper.html +1 -1
- package/documentation/interfaces/ApiError.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 +16 -3
- package/lib/jamespot-user-api.js +1 -1
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/bookmark.d.ts +19 -1
- package/lib/src/apis/group.d.ts +50 -5
- package/lib/src/index.d.ts +1 -0
- package/lib/src/types/index.d.ts +1 -0
- package/lib/src/types/spot.d.ts +5 -0
- package/lib/src/types/tvDisplay.d.ts +32 -0
- package/lib/src/types/utils.d.ts +24 -2
- package/lib/src/types/widgets.d.ts +90 -31
- package/lib/src/util/Test.d.ts +20 -2
- package/lib/src/util/file.d.ts +7 -0
- package/lib/src/util/file.test.d.ts +1 -0
- package/package.json +1 -1
package/lib/src/apis/group.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiReturn, Category, CreateGroup, Format, GroupList, GroupProperties, GroupView, GroupWidget,
|
|
1
|
+
import { ApiReturn, Category, CreateGroup, Format, GroupList, GroupProperties, GroupView, GroupWidget, PagingResults, UpdateGroup } from '../types';
|
|
2
2
|
import { JBaseApi } from './base';
|
|
3
3
|
export declare class JGroupApi extends JBaseApi {
|
|
4
4
|
/**
|
|
@@ -7,21 +7,57 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
7
7
|
* @param format return format
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
|
-
create<T extends Format = undefined>(group: CreateGroup, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T,
|
|
10
|
+
create<T extends Format = undefined>(group: CreateGroup, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, {
|
|
11
|
+
id: number;
|
|
12
|
+
mainType: string;
|
|
13
|
+
type: string;
|
|
14
|
+
uri: string;
|
|
15
|
+
dateCreation?: string;
|
|
16
|
+
dateModified?: string;
|
|
17
|
+
title: string;
|
|
18
|
+
_url: string;
|
|
19
|
+
}, GroupList, GroupView, {
|
|
20
|
+
id: number;
|
|
21
|
+
mainType: string;
|
|
22
|
+
type: string;
|
|
23
|
+
uri: string;
|
|
24
|
+
dateCreation?: string;
|
|
25
|
+
dateModified?: string;
|
|
26
|
+
title: string;
|
|
27
|
+
_url: string;
|
|
28
|
+
}>, import("../types").BaseMessages>>;
|
|
11
29
|
/**
|
|
12
30
|
* Update a group
|
|
13
31
|
* @param group group to update. The uri is mandatory and identify the group to update
|
|
14
32
|
* @param format return format
|
|
15
33
|
* @returns
|
|
16
34
|
*/
|
|
17
|
-
update<T extends Format = undefined>(group: UpdateGroup, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T,
|
|
35
|
+
update<T extends Format = undefined>(group: UpdateGroup, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, {
|
|
36
|
+
id: number;
|
|
37
|
+
mainType: string;
|
|
38
|
+
type: string;
|
|
39
|
+
uri: string;
|
|
40
|
+
dateCreation?: string;
|
|
41
|
+
dateModified?: string;
|
|
42
|
+
title: string;
|
|
43
|
+
_url: string;
|
|
44
|
+
}, GroupList, GroupView, string>, import("../types").BaseMessages>>;
|
|
18
45
|
/**
|
|
19
46
|
* Get a spot
|
|
20
47
|
* @param idSpot
|
|
21
48
|
* @param format
|
|
22
49
|
* @returns
|
|
23
50
|
*/
|
|
24
|
-
getSpot<T extends Format = undefined>(idSpot: number | string, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T,
|
|
51
|
+
getSpot<T extends Format = undefined>(idSpot: number | string, format?: T): Promise<import("../types").ApiWrapper<ApiReturn<T, {
|
|
52
|
+
id: number;
|
|
53
|
+
mainType: string;
|
|
54
|
+
type: string;
|
|
55
|
+
uri: string;
|
|
56
|
+
dateCreation?: string;
|
|
57
|
+
dateModified?: string;
|
|
58
|
+
title: string;
|
|
59
|
+
_url: string;
|
|
60
|
+
}, GroupList, GroupView, string>, import("../types").BaseMessages>>;
|
|
25
61
|
/**
|
|
26
62
|
* Get the properties of a group that are not within the model
|
|
27
63
|
* @param idSpot
|
|
@@ -45,5 +81,14 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
45
81
|
* @param page page number
|
|
46
82
|
* @return array of User
|
|
47
83
|
*/
|
|
48
|
-
getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../types").ApiWrapper<PagingResults<
|
|
84
|
+
getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../types").ApiWrapper<PagingResults<{
|
|
85
|
+
id: number;
|
|
86
|
+
mainType: string;
|
|
87
|
+
type: string;
|
|
88
|
+
uri: string;
|
|
89
|
+
dateCreation?: string;
|
|
90
|
+
dateModified?: string;
|
|
91
|
+
title: string;
|
|
92
|
+
_url: string;
|
|
93
|
+
}>, import("../types").BaseMessages>>;
|
|
49
94
|
}
|
package/lib/src/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export default JamespotUserApiInstance;
|
|
|
12
12
|
export * from './apis';
|
|
13
13
|
export * from './types';
|
|
14
14
|
export * from './util/network';
|
|
15
|
+
export * from './util/file';
|
|
15
16
|
export * from './util/ensure';
|
|
16
17
|
export * from './window';
|
|
17
18
|
export declare const api: typeof JamespotUserApi;
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jSpotLittle } from './spot';
|
|
2
|
+
import { Readable, jArticleList, jArticleLittle } from './utils';
|
|
3
|
+
declare type TVChannelCustomListDynamic = {
|
|
4
|
+
tvChannelType: 'DYNAMIC';
|
|
5
|
+
tvChannelBackgroundColor: string;
|
|
6
|
+
tvChannelGroupTarget?: jSpotLittle;
|
|
7
|
+
tvChannelConfig: {
|
|
8
|
+
contents: Array<{
|
|
9
|
+
uri: string;
|
|
10
|
+
dateEnd: Date;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
tvChannelNumImages: 0;
|
|
14
|
+
};
|
|
15
|
+
declare type TVChannelCustomListSlideshow = {
|
|
16
|
+
tvChannelType: 'SLIDESHOW';
|
|
17
|
+
tvChannelBackgroundColor: string;
|
|
18
|
+
tvChannelNumImages: number;
|
|
19
|
+
tvChannelConfig: {
|
|
20
|
+
contents: Array<{
|
|
21
|
+
uri: string;
|
|
22
|
+
dateEnd: Date;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare type TVChannelLittle = Readable<jArticleLittle>;
|
|
27
|
+
export declare type TVChannelList = Readable<jArticleList & (TVChannelCustomListDynamic | TVChannelCustomListSlideshow)>;
|
|
28
|
+
export declare type TVChannelCreatePayload = {
|
|
29
|
+
tvChannelGroupTarget?: Array<string>;
|
|
30
|
+
tvChannelNumImages?: never;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
package/lib/src/types/utils.d.ts
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { jUserLittle } from './user';
|
|
2
|
+
/**
|
|
3
|
+
* Ease usage in IDE by decomposing complex types
|
|
4
|
+
* Decompose combined types into simple object types
|
|
5
|
+
* A: {a: string}
|
|
6
|
+
* B: A & {b: int}
|
|
7
|
+
* Readable<B> => {a: string, b:int}
|
|
8
|
+
*/
|
|
9
|
+
export declare type Readable<T> = T extends infer U ? {
|
|
10
|
+
[K in keyof U]: U[K];
|
|
11
|
+
} : never;
|
|
12
|
+
declare type AllKeys<T> = T extends unknown ? keyof T : never;
|
|
13
|
+
declare type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Readable<T & Partial<Record<Exclude<K, keyof T>, never>>> : never;
|
|
14
|
+
/**
|
|
15
|
+
* Builds an exclusive union type from a union type
|
|
16
|
+
* C = ExclusifyUnion<A|B>
|
|
17
|
+
* toto:C = {a: "tata"} OK
|
|
18
|
+
* tata:C = {b: 123} OK
|
|
19
|
+
* tutu: C = {a: "tata", b: 123} KO => Types of property 'a' are incompatible. Type 'string' is not assignable to type 'undefined'.
|
|
20
|
+
* This is the kind of error shown when you add too many properties with this definition.
|
|
21
|
+
*/
|
|
22
|
+
export declare type ExclusifyUnion<T> = _ExclusifyUnion<T, AllKeys<T>>;
|
|
2
23
|
export interface BaseMessage {
|
|
3
24
|
msg: string;
|
|
4
25
|
code: number;
|
|
@@ -46,10 +67,10 @@ export declare type jObjectBase = {
|
|
|
46
67
|
dateCreation?: string;
|
|
47
68
|
dateModified?: string;
|
|
48
69
|
};
|
|
49
|
-
export declare type jObjectLittle = jObjectBase & {
|
|
70
|
+
export declare type jObjectLittle = Readable<jObjectBase & {
|
|
50
71
|
title: string;
|
|
51
72
|
_url: string;
|
|
52
|
-
}
|
|
73
|
+
}>;
|
|
53
74
|
export declare type jObjectList = jObjectLittle & {
|
|
54
75
|
description?: string;
|
|
55
76
|
_user: jUserLittle;
|
|
@@ -118,3 +139,4 @@ export declare type MaybeWithParent<T extends jObjectBase = jObjectBase> = {
|
|
|
118
139
|
export declare type Format = 'raw-little' | 'raw-list' | 'raw-view' | undefined;
|
|
119
140
|
export declare 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;
|
|
120
141
|
export declare type ValueOf<T> = T[keyof T];
|
|
142
|
+
export {};
|
|
@@ -1,61 +1,92 @@
|
|
|
1
|
-
|
|
1
|
+
import { AudienceAutocomplete } from './autocomplete';
|
|
2
|
+
import { jArticleLittle } from './utils';
|
|
3
|
+
export declare type WidgetLayer = {
|
|
4
|
+
uniqid: string;
|
|
2
5
|
title: string;
|
|
3
|
-
|
|
6
|
+
locked: boolean;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
widgets: WidgetWrapperProps[];
|
|
4
9
|
position?: WidgetVector;
|
|
5
10
|
};
|
|
6
|
-
export declare type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
isCover?: boolean;
|
|
10
|
-
doSomethingAfterIsMounted?: boolean;
|
|
11
|
+
export declare type WidgetWrapperProps<T = CombinedWidgetType> = {
|
|
12
|
+
title: string;
|
|
13
|
+
widget: WidgetExtendedType & T;
|
|
11
14
|
};
|
|
12
15
|
export declare type WidgetDefaultProps = {
|
|
13
16
|
width?: number | undefined;
|
|
14
17
|
inplace: boolean;
|
|
15
18
|
isComponentVisible?: boolean;
|
|
16
19
|
mode: WidgetDisplayMode;
|
|
17
|
-
isMounted?: () => void;
|
|
18
20
|
onClick?: () => void;
|
|
19
|
-
onChange: (content: CombinedWidgetContent) => void;
|
|
21
|
+
onChange: (content: CombinedWidgetContent, override?: boolean) => void;
|
|
20
22
|
onStateChange?: (state: WidgetStateProps) => void;
|
|
21
23
|
};
|
|
22
|
-
export declare
|
|
23
|
-
export declare type
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export declare type CombinedWidgetType = WidgetTypeKeys[keyof WidgetTypeKeys];
|
|
25
|
+
export declare type WidgetTypeKeys = {
|
|
26
|
+
'widget-article-button': WidgetArticleButtonType;
|
|
27
|
+
'widget-article-gallery': WidgetArticleGalleryType;
|
|
28
|
+
'widget-article-title': WidgetArticleTitleType;
|
|
29
|
+
'widget-article-text': WidgetArticleTextType;
|
|
30
|
+
'widget-article-image': WidgetArticleImageType;
|
|
31
|
+
'widget-article-attachment': WidgetArticleAttachmentType;
|
|
32
|
+
};
|
|
33
|
+
export declare type WidgetContentKeys = {
|
|
34
|
+
'widget-article-button': WidgetArticleButtonContent;
|
|
35
|
+
'widget-article-gallery': WidgetArticleGalleryContent;
|
|
36
|
+
'widget-article-title': WidgetArticleTitleContent;
|
|
37
|
+
'widget-article-text': WidgetArticleTextContent;
|
|
38
|
+
'widget-article-image': WidgetArticleImageContent;
|
|
39
|
+
'widget-article-attachment': WidgetArticleAttachmentContent;
|
|
40
|
+
};
|
|
41
|
+
export declare type WidgetKeys = keyof WidgetTypeKeys;
|
|
42
|
+
export declare type WidgetExtendedType = {
|
|
43
|
+
layers?: string[];
|
|
44
|
+
};
|
|
45
|
+
export declare type WidgetArticleButtonType = {
|
|
29
46
|
name: 'widget-article-button';
|
|
47
|
+
uniqid: string;
|
|
48
|
+
content: WidgetArticleButtonContent;
|
|
30
49
|
};
|
|
31
|
-
export declare type WidgetArticleGalleryType =
|
|
50
|
+
export declare type WidgetArticleGalleryType = {
|
|
32
51
|
name: 'widget-article-gallery';
|
|
52
|
+
uniqid: string;
|
|
53
|
+
content: WidgetArticleGalleryContent;
|
|
33
54
|
};
|
|
34
|
-
export declare type WidgetArticleTitleType =
|
|
55
|
+
export declare type WidgetArticleTitleType = {
|
|
35
56
|
name: 'widget-article-title';
|
|
57
|
+
uniqid: string;
|
|
58
|
+
content: WidgetArticleTitleContent;
|
|
36
59
|
};
|
|
37
|
-
export declare type WidgetArticleTextType =
|
|
60
|
+
export declare type WidgetArticleTextType = {
|
|
38
61
|
name: 'widget-article-text';
|
|
62
|
+
uniqid: string;
|
|
63
|
+
content: WidgetArticleTextContent;
|
|
39
64
|
};
|
|
40
|
-
export declare type WidgetArticleImageType =
|
|
65
|
+
export declare type WidgetArticleImageType = {
|
|
41
66
|
name: 'widget-article-image';
|
|
67
|
+
uniqid: string;
|
|
68
|
+
content: WidgetArticleImageContent;
|
|
42
69
|
};
|
|
43
|
-
export declare type WidgetArticleAttachmentType =
|
|
70
|
+
export declare type WidgetArticleAttachmentType = {
|
|
44
71
|
name: 'widget-article-attachment';
|
|
72
|
+
uniqid: string;
|
|
73
|
+
content: WidgetArticleAttachmentContent;
|
|
45
74
|
};
|
|
46
|
-
export declare type WidgetTypes = WidgetArticleButtonType | WidgetArticleGalleryType | WidgetArticleTitleType | WidgetArticleTextType | WidgetArticleAttachmentType | WidgetArticleImageType;
|
|
47
75
|
export declare type CSSTextAlignType = 'left' | 'right' | 'center' | 'justify';
|
|
48
76
|
export declare type CSSBackgroundPosition = 'top' | 'bottom' | 'center' | 'left' | 'right';
|
|
49
77
|
export declare type CSSBackgroundSize = 'auto' | 'contain' | 'cover';
|
|
50
78
|
export declare type VariantSizeType = 'sm' | 'md' | 'lg';
|
|
51
79
|
export declare type VariantType = 'contained' | 'outlined';
|
|
80
|
+
export declare type OpeningType = 'link' | 'anchor' | 'popup';
|
|
52
81
|
export declare type WidgetArticleGalleryContent = {
|
|
53
82
|
gap?: string;
|
|
54
|
-
|
|
55
|
-
|
|
83
|
+
columnCount?: string;
|
|
84
|
+
files?: WidgetFileType[];
|
|
56
85
|
galleryDisplay?: 'portrait' | 'landscape';
|
|
86
|
+
heightMode?: 'auto' | 'custom';
|
|
87
|
+
heightModeValue?: string;
|
|
57
88
|
};
|
|
58
|
-
export declare type
|
|
89
|
+
export declare type WidgetArticleTitleContent = {
|
|
59
90
|
widgets?: WidgetWrapperProps[];
|
|
60
91
|
text?: string;
|
|
61
92
|
textAlign?: CSSTextAlignType;
|
|
@@ -63,14 +94,25 @@ export declare type WidgetTitleContent = {
|
|
|
63
94
|
color?: string;
|
|
64
95
|
backgroundColor?: string;
|
|
65
96
|
};
|
|
66
|
-
export declare type
|
|
97
|
+
export declare type WidgetArticleTextContent = {
|
|
67
98
|
text?: string;
|
|
68
99
|
color?: string;
|
|
69
100
|
fontSize?: string;
|
|
70
101
|
lineHeight?: string;
|
|
71
102
|
linkColor?: string;
|
|
72
103
|
};
|
|
73
|
-
export declare type
|
|
104
|
+
export declare type OpeningTypeLink = {
|
|
105
|
+
url: string;
|
|
106
|
+
target: string;
|
|
107
|
+
};
|
|
108
|
+
export declare type OpeningTypeAnchor = {
|
|
109
|
+
uniqid: string;
|
|
110
|
+
};
|
|
111
|
+
export declare type OpeningTypePopup = {
|
|
112
|
+
title: string;
|
|
113
|
+
widgets: WidgetWrapperProps[];
|
|
114
|
+
};
|
|
115
|
+
export declare type WidgetArticleButtonContent = {
|
|
74
116
|
text?: string;
|
|
75
117
|
color?: string;
|
|
76
118
|
backgroundColor?: string;
|
|
@@ -78,8 +120,12 @@ export declare type WidgetButtonContent = {
|
|
|
78
120
|
fontSize?: string;
|
|
79
121
|
buttonSize?: VariantSizeType;
|
|
80
122
|
variant?: VariantType;
|
|
123
|
+
openingType?: OpeningType;
|
|
124
|
+
openingTypeLink?: OpeningTypeLink;
|
|
125
|
+
openingTypeAnchor?: OpeningTypeAnchor;
|
|
126
|
+
openingTypePopup?: OpeningTypePopup;
|
|
81
127
|
};
|
|
82
|
-
export declare type
|
|
128
|
+
export declare type WidgetArticleImageContent = {
|
|
83
129
|
file?: WidgetFileType;
|
|
84
130
|
useFilter?: boolean;
|
|
85
131
|
displayAs?: 'image' | 'background';
|
|
@@ -94,18 +140,18 @@ export declare type WidgetArticleAttachmentContent = {
|
|
|
94
140
|
};
|
|
95
141
|
export declare type CombinedWidgetContent = {
|
|
96
142
|
widgets?: WidgetWrapperProps[];
|
|
97
|
-
} & (
|
|
98
|
-
export declare type WidgetContentKeys = keyof CombinedWidgetContent;
|
|
143
|
+
} & (WidgetArticleTextContent | WidgetArticleImageContent | WidgetArticleTitleContent | WidgetArticleButtonContent | WidgetArticleGalleryContent | WidgetArticleAttachmentContent);
|
|
99
144
|
export declare type WidgetStateProps = {
|
|
100
145
|
busy?: boolean | undefined;
|
|
101
146
|
loading?: boolean | undefined;
|
|
102
147
|
initialized?: boolean | undefined;
|
|
103
148
|
mounted?: boolean | undefined;
|
|
149
|
+
hover?: boolean | undefined;
|
|
104
150
|
};
|
|
105
151
|
export declare type WidgetDefinitionProps = {
|
|
106
152
|
label: string;
|
|
107
153
|
description: string;
|
|
108
|
-
name:
|
|
154
|
+
name: WidgetKeys;
|
|
109
155
|
img: string;
|
|
110
156
|
available: boolean;
|
|
111
157
|
panel: {
|
|
@@ -121,6 +167,7 @@ export declare type WidgetVector = {
|
|
|
121
167
|
export declare type WidgetFileType = {
|
|
122
168
|
id: number;
|
|
123
169
|
filename: string;
|
|
170
|
+
name?: string;
|
|
124
171
|
mimetype: string;
|
|
125
172
|
dimension: {
|
|
126
173
|
width: number;
|
|
@@ -138,6 +185,18 @@ export declare type WidgetsRootState = {
|
|
|
138
185
|
export declare type WidgetsState = {
|
|
139
186
|
token?: string | undefined;
|
|
140
187
|
ids: Record<string, WidgetWrapperProps>;
|
|
188
|
+
layers: Record<string, WidgetLayer>;
|
|
141
189
|
states: Record<string, WidgetStateProps>;
|
|
142
190
|
modal: WidgetModalProps | undefined;
|
|
191
|
+
editableMap: Record<string, {
|
|
192
|
+
index: number;
|
|
193
|
+
uniqid: string;
|
|
194
|
+
}>;
|
|
195
|
+
currentEditableIndex: number;
|
|
196
|
+
currentEditableWidgetId: string | undefined;
|
|
197
|
+
};
|
|
198
|
+
export declare type ArticleWidgetType = jArticleLittle & {
|
|
199
|
+
articleWidgets: WidgetWrapperProps[];
|
|
200
|
+
articleWidgetsCover: number | undefined;
|
|
201
|
+
_audience: AudienceAutocomplete[];
|
|
143
202
|
};
|
package/lib/src/util/Test.d.ts
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { JamespotUserApi } from '../apis';
|
|
2
|
-
import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete
|
|
2
|
+
import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete } from '../types';
|
|
3
3
|
import { Network } from './network';
|
|
4
4
|
export declare const network: Network;
|
|
5
5
|
export declare const jApi: JamespotUserApi;
|
|
6
6
|
export declare const validateJArticle: <T extends jArticleLittle>(received: T, expected: T, _format: 'raw-little' | 'raw-list' | 'raw-view') => void;
|
|
7
7
|
export declare const validateApiWrapper: <T extends ApiDefaultWrapper<import("../types").BaseMessages>>(res: T, o: string, f: string, error?: null) => void;
|
|
8
8
|
export declare const validatePagingResults: <T>(res: PagingResults<T>) => void;
|
|
9
|
-
export declare const validateObjectIsFormatLittle: <T extends
|
|
9
|
+
export declare const validateObjectIsFormatLittle: <T extends {
|
|
10
|
+
id: number;
|
|
11
|
+
mainType: string;
|
|
12
|
+
type: string;
|
|
13
|
+
uri: string;
|
|
14
|
+
dateCreation?: string;
|
|
15
|
+
dateModified?: string;
|
|
16
|
+
title: string;
|
|
17
|
+
_url: string;
|
|
18
|
+
} = {
|
|
19
|
+
id: number;
|
|
20
|
+
mainType: string;
|
|
21
|
+
type: string;
|
|
22
|
+
uri: string;
|
|
23
|
+
dateCreation?: string;
|
|
24
|
+
dateModified?: string;
|
|
25
|
+
title: string;
|
|
26
|
+
_url: string;
|
|
27
|
+
}>(object: T) => boolean;
|
|
10
28
|
export declare const validateObjectIsFormatAutocomplete: <T extends jObjectAutocomplete = jObjectAutocomplete>(object: T) => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FileResponse, WidgetFileType } from '../types';
|
|
2
|
+
export declare const allowedFileExtensions: string[];
|
|
3
|
+
export declare const mimetypeMap: Record<string, string>;
|
|
4
|
+
export declare function getExtensionFromName(name: string | undefined): string | undefined;
|
|
5
|
+
export declare function getFileFamily(mime: string): string | undefined;
|
|
6
|
+
export declare function getMimetypeFromExtension(ext: string | undefined): string;
|
|
7
|
+
export declare function apiFileToWidgetFile(fileResponse: FileResponse): WidgetFileType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|