jamespot-user-api 1.0.157 → 1.0.159
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/JBusinessNetworkingApi.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/JGlobalApi.html +1 -1
- package/documentation/classes/JGroupApi.html +16 -10
- package/documentation/classes/JIAApi.html +1 -1
- package/documentation/classes/JLandApi.html +1 -1
- package/documentation/classes/JMessengerApi.html +1 -1
- package/documentation/classes/JObjectApi.html +1 -1
- package/documentation/classes/JSearchApi.html +6 -6
- package/documentation/classes/JShareApi.html +1 -1
- package/documentation/classes/JSocialActionApi.html +1 -1
- package/documentation/classes/JTaxonomyApi.html +2 -2
- package/documentation/classes/JUserApi.html +7 -7
- package/documentation/classes/JWedocApi.html +1 -1
- package/documentation/classes/JWidgetApi.html +1 -1
- package/documentation/classes/JamespotUserApi.html +1 -1
- package/documentation/classes/Network.html +1 -1
- package/documentation/classes/TVDisplayApi.html +1 -1
- package/documentation/classes/WindowBrowser.html +1 -1
- package/documentation/enums/GroupModerateStatus.html +1 -0
- 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/TaxonomyCreate.html +1 -1
- package/documentation/interfaces/WindowInterface.html +1 -1
- package/documentation/modules.html +11 -11
- package/lib/jamespot-user-api.js +1 -1
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/group/group.d.ts +28 -10
- package/lib/src/apis/group/group.mock.d.ts +8 -1
- package/lib/src/apis/widget/widget.d.ts +12 -0
- package/lib/src/apis/widget/widget.mock.d.ts +1 -0
- package/lib/src/types/article.d.ts +5 -2
- package/lib/src/types/comment.d.ts +5 -3
- package/lib/src/types/group.d.ts +60 -0
- package/lib/src/types/hook.d.ts +45 -0
- package/lib/src/types/utils.d.ts +4 -0
- package/lib/src/types/widgets.d.ts +43 -2
- package/package.json +1 -1
- package/phpunitMock/spotAddToFavorite-bad.json +7 -0
- package/phpunitMock/spotAddToFavorite-forbidden.json +7 -0
- package/phpunitMock/spotAddToFavorite-success.json +7 -0
- package/phpunitMock/spotGetUserLevelAndRight-default.json +31 -0
- package/phpunitMock/spotRequest-forbidden.json +7 -0
- package/phpunitMock/spotRequest-pending.json +7 -0
- package/phpunitMock/spotRequest-success.json +7 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Category, CreateGroup, GroupList, GroupListConfig, GroupProperties, GroupUserLevel, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup } from '../../types/group';
|
|
1
|
+
import { Category, CreateGroup, GroupList, GroupListConfig, GroupProperties, GroupUserLevel, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup, UserLevelAndRight } from '../../types/group';
|
|
2
2
|
import { JBaseApi } from '../base';
|
|
3
|
-
import { ApiReturn, ApiWrapper,
|
|
3
|
+
import { ApiReturn, ApiWrapper, BaseMessages, Format, jSpotAutocomplete, jUserLittle, PagingResults } from '../../types';
|
|
4
4
|
export declare class JGroupApi extends JBaseApi {
|
|
5
5
|
/**
|
|
6
6
|
* autocomplete return a list of groups
|
|
@@ -31,7 +31,7 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
31
31
|
_url: string;
|
|
32
32
|
dateCreation?: string | undefined;
|
|
33
33
|
dateModified?: string | null | undefined;
|
|
34
|
-
}>,
|
|
34
|
+
}>, BaseMessages>>;
|
|
35
35
|
/**
|
|
36
36
|
* Update a group
|
|
37
37
|
* @param group group to update. The uri is mandatory and identify the group to update
|
|
@@ -47,7 +47,7 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
47
47
|
_url: string;
|
|
48
48
|
dateCreation?: string | undefined;
|
|
49
49
|
dateModified?: string | null | undefined;
|
|
50
|
-
}, GroupList, GroupView, string>,
|
|
50
|
+
}, GroupList, GroupView, string>, BaseMessages>>;
|
|
51
51
|
/**
|
|
52
52
|
* Get a spot
|
|
53
53
|
* @param idSpot
|
|
@@ -63,22 +63,22 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
63
63
|
_url: string;
|
|
64
64
|
dateCreation?: string | undefined;
|
|
65
65
|
dateModified?: string | null | undefined;
|
|
66
|
-
}, GroupList, GroupView, string>,
|
|
66
|
+
}, GroupList, GroupView, string>, BaseMessages>>;
|
|
67
67
|
/**
|
|
68
68
|
* Get the properties of a group that are not within the model
|
|
69
69
|
* @param idSpot
|
|
70
70
|
* @returns
|
|
71
71
|
*/
|
|
72
|
-
getProperties(idSpot: number | string): Promise<ApiWrapper<GroupProperties,
|
|
72
|
+
getProperties(idSpot: number | string): Promise<ApiWrapper<GroupProperties, BaseMessages>>;
|
|
73
73
|
/**
|
|
74
74
|
* Get the available applications that can be added to a group
|
|
75
75
|
*/
|
|
76
|
-
getApplications(): Promise<ApiWrapper<Record<string, GroupWidget>,
|
|
76
|
+
getApplications(): Promise<ApiWrapper<Record<string, GroupWidget>, BaseMessages>>;
|
|
77
77
|
/**
|
|
78
78
|
* Get the available group categories
|
|
79
79
|
* @returns
|
|
80
80
|
*/
|
|
81
|
-
getCategories(): Promise<ApiWrapper<Category[],
|
|
81
|
+
getCategories(): Promise<ApiWrapper<Category[], BaseMessages>>;
|
|
82
82
|
/**
|
|
83
83
|
* Get the members of a group
|
|
84
84
|
* @param idSpot spot id
|
|
@@ -90,7 +90,7 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
90
90
|
getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<ApiWrapper<PagingResults<{
|
|
91
91
|
level: GroupUserLevel;
|
|
92
92
|
user: jUserLittle;
|
|
93
|
-
}>,
|
|
93
|
+
}>, BaseMessages>>;
|
|
94
94
|
list<T extends GroupList = GroupList>(config: GroupListConfig): Promise<ApiWrapper<PagingResults<T>>>;
|
|
95
95
|
/**
|
|
96
96
|
* Reset the notifications configuration for all users of the group
|
|
@@ -100,5 +100,23 @@ export declare class JGroupApi extends JBaseApi {
|
|
|
100
100
|
resetNotifications(config: ResetNotificationConfiguration): Promise<ApiWrapper<{
|
|
101
101
|
members: number;
|
|
102
102
|
msg: string;
|
|
103
|
-
},
|
|
103
|
+
}, BaseMessages>>;
|
|
104
|
+
/**
|
|
105
|
+
* Get a spot
|
|
106
|
+
* @param idSpot
|
|
107
|
+
* @returns
|
|
108
|
+
*/
|
|
109
|
+
getUserLevelAndRight(idSpot: number | string): Promise<ApiWrapper<UserLevelAndRight, BaseMessages>>;
|
|
110
|
+
/**
|
|
111
|
+
* Post a request to join a moderated group
|
|
112
|
+
* @param idSpot
|
|
113
|
+
* @returns
|
|
114
|
+
*/
|
|
115
|
+
groupRequest(idSpot: number | string): Promise<ApiWrapper<boolean, BaseMessages>>;
|
|
116
|
+
/**
|
|
117
|
+
* Join a public group
|
|
118
|
+
* @param idSpot
|
|
119
|
+
* @returns
|
|
120
|
+
*/
|
|
121
|
+
groupAddToFavorite(idSpot: number | string): Promise<ApiWrapper<boolean, BaseMessages>>;
|
|
104
122
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiPagingResults, ApiWrapper, jSpotAutocomplete } from '../../types';
|
|
1
|
+
import { ApiDefaultWrapper, ApiPagingResults, ApiWrapper, jSpotAutocomplete, UserLevelAndRight } from '../../types';
|
|
2
2
|
import { Category, GroupMemberLevel, GroupProperties, GroupView, GroupWidget, jGroupList } from '../../types/group';
|
|
3
3
|
export declare const spot: ApiWrapper<GroupView>;
|
|
4
4
|
export declare const properties: ApiWrapper<GroupProperties>;
|
|
@@ -7,6 +7,13 @@ export declare const groupCreate: ApiWrapper<GroupView>;
|
|
|
7
7
|
export declare const groupUpdate: ApiWrapper<GroupView>;
|
|
8
8
|
export declare const groupGetAvailableWidget: ApiWrapper<Record<string, GroupWidget>>;
|
|
9
9
|
export declare const groupGetCategories: ApiWrapper<Category[]>;
|
|
10
|
+
export declare const groupGetUserLevelAndRight: ApiWrapper<UserLevelAndRight>;
|
|
11
|
+
export declare const groupRequestSuccess: ApiWrapper<boolean>;
|
|
12
|
+
export declare const groupRequestForbidden: ApiDefaultWrapper;
|
|
13
|
+
export declare const groupRequestPending: ApiDefaultWrapper;
|
|
14
|
+
export declare const groupAddToFavoriteSuccess: ApiWrapper<boolean>;
|
|
15
|
+
export declare const groupAddToFavoriteForbidden: ApiDefaultWrapper;
|
|
16
|
+
export declare const groupAddToFavoriteBad: ApiDefaultWrapper;
|
|
10
17
|
export declare const groupObjectListJamespotSpotMembers: ApiPagingResults<GroupMemberLevel>;
|
|
11
18
|
export declare const groupList: ApiPagingResults<jGroupList>;
|
|
12
19
|
export declare const groupResetNotification: ApiWrapper<{
|
|
@@ -2,4 +2,16 @@ import { ApiWrapper, jUserLittle } from '../../types';
|
|
|
2
2
|
import { JBaseApi } from '../base';
|
|
3
3
|
export declare class JWidgetApi extends JBaseApi {
|
|
4
4
|
responseUserList(uri: string, uniqid: string, page: number): Promise<ApiWrapper<jUserLittle[]>>;
|
|
5
|
+
removeWidget({ id, type, uniqid }: {
|
|
6
|
+
id: number;
|
|
7
|
+
type: string;
|
|
8
|
+
uniqid: string;
|
|
9
|
+
}): Promise<ApiWrapper<[]>>;
|
|
10
|
+
checkListRespond({ id, type, idUser, uniqid, index, }: {
|
|
11
|
+
id: number;
|
|
12
|
+
type: string;
|
|
13
|
+
idUser: number;
|
|
14
|
+
uniqid: string;
|
|
15
|
+
index: number;
|
|
16
|
+
}): Promise<ApiWrapper<[]>>;
|
|
5
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Filters, Orders } from './utils';
|
|
2
|
+
import { WidgetWrapperProps } from './widgets';
|
|
2
3
|
export type ArticleListConfig = {
|
|
3
4
|
type?: string;
|
|
4
5
|
format?: string;
|
|
@@ -42,11 +43,13 @@ export type AddCommentParams = {
|
|
|
42
43
|
idArticle: number;
|
|
43
44
|
sendAlert: boolean;
|
|
44
45
|
alertAuthor: boolean;
|
|
46
|
+
widgets?: WidgetWrapperProps[];
|
|
45
47
|
};
|
|
46
48
|
export type UpdateCommentParams = {
|
|
47
|
-
token
|
|
48
|
-
description
|
|
49
|
+
token?: string;
|
|
50
|
+
description?: string;
|
|
49
51
|
idComment: number;
|
|
52
|
+
widgets?: WidgetWrapperProps[];
|
|
50
53
|
};
|
|
51
54
|
export type UserRead = {
|
|
52
55
|
idUser: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Readable } from './utils';
|
|
1
|
+
import { Rights } from './common';
|
|
3
2
|
import { jFileLittle } from './file';
|
|
4
3
|
import { SocialAction } from './global';
|
|
5
4
|
import { jObjectBase } from './object';
|
|
6
|
-
import {
|
|
5
|
+
import { jUserLittle } from './user';
|
|
6
|
+
import { Readable } from './utils';
|
|
7
|
+
import { WidgetWrapperProps } from './widgets';
|
|
7
8
|
export type jCommentLittle = Readable<Omit<jObjectBase, 'dateModified'> & {
|
|
8
9
|
dateCreation: string;
|
|
9
10
|
dateModified: string | null;
|
|
@@ -14,4 +15,5 @@ export type jCommentList = jCommentLittle & {
|
|
|
14
15
|
_right: Rights;
|
|
15
16
|
_attachedFiles?: jFileLittle[];
|
|
16
17
|
_actions?: Record<string, SocialAction>;
|
|
18
|
+
_widgets?: WidgetWrapperProps[];
|
|
17
19
|
};
|
package/lib/src/types/group.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jUserLittle } from './user';
|
|
2
2
|
import { Filters, Orders } from './utils';
|
|
3
3
|
import { jObjectBase, jObjectLittle } from './object';
|
|
4
|
+
import { Rights } from './common';
|
|
5
|
+
import { z } from 'zod';
|
|
4
6
|
export type CreateGroup = {
|
|
5
7
|
type: string;
|
|
6
8
|
title: string;
|
|
@@ -21,6 +23,52 @@ export type GroupMemberLevel = {
|
|
|
21
23
|
level: GroupUserLevel;
|
|
22
24
|
user: jUserLittle;
|
|
23
25
|
};
|
|
26
|
+
export type UserLevelAndRight = {
|
|
27
|
+
userLevelSpot: UserLevelSpot;
|
|
28
|
+
spotMinLevelToInvit: number;
|
|
29
|
+
userRights: Rights;
|
|
30
|
+
accessRequestStatus?: GroupModerateStatus;
|
|
31
|
+
};
|
|
32
|
+
export declare enum GroupModerateStatus {
|
|
33
|
+
SPOT_MODERATE_IGNORE = 0,
|
|
34
|
+
SPOT_MODERATE_ACCEPT = 1,
|
|
35
|
+
SPOT_MODERATE_PENDING = 2
|
|
36
|
+
}
|
|
37
|
+
export declare const userlevelSpotShema: z.ZodObject<{
|
|
38
|
+
RF_Constant_levelName: z.ZodString;
|
|
39
|
+
RF_delete: z.ZodBoolean;
|
|
40
|
+
RF_editing: z.ZodBoolean;
|
|
41
|
+
RF_level: z.ZodNumber;
|
|
42
|
+
RF_levelName: z.ZodString;
|
|
43
|
+
RF_levelName_Trad: z.ZodString;
|
|
44
|
+
RF_parameters: z.ZodBoolean;
|
|
45
|
+
RF_setAdmin: z.ZodBoolean;
|
|
46
|
+
RF_spotit: z.ZodBoolean;
|
|
47
|
+
RF_spotit_own: z.ZodBoolean;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
RF_Constant_levelName: string;
|
|
50
|
+
RF_delete: boolean;
|
|
51
|
+
RF_editing: boolean;
|
|
52
|
+
RF_level: number;
|
|
53
|
+
RF_levelName: string;
|
|
54
|
+
RF_levelName_Trad: string;
|
|
55
|
+
RF_parameters: boolean;
|
|
56
|
+
RF_setAdmin: boolean;
|
|
57
|
+
RF_spotit: boolean;
|
|
58
|
+
RF_spotit_own: boolean;
|
|
59
|
+
}, {
|
|
60
|
+
RF_Constant_levelName: string;
|
|
61
|
+
RF_delete: boolean;
|
|
62
|
+
RF_editing: boolean;
|
|
63
|
+
RF_level: number;
|
|
64
|
+
RF_levelName: string;
|
|
65
|
+
RF_levelName_Trad: string;
|
|
66
|
+
RF_parameters: boolean;
|
|
67
|
+
RF_setAdmin: boolean;
|
|
68
|
+
RF_spotit: boolean;
|
|
69
|
+
RF_spotit_own: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
export type UserLevelSpot = z.infer<typeof userlevelSpotShema>;
|
|
24
72
|
export type UpdateGroup = CreateGroup & Partial<Omit<GroupProperties, 'rss_feed'>> & {
|
|
25
73
|
uri: string;
|
|
26
74
|
image?: string | null;
|
|
@@ -152,3 +200,15 @@ export type GroupListConfig = {
|
|
|
152
200
|
orders?: Orders;
|
|
153
201
|
filters?: Filters | undefined;
|
|
154
202
|
};
|
|
203
|
+
export declare const validateIsFormatUserLevelSpot: (object: object) => object is {
|
|
204
|
+
RF_Constant_levelName: string;
|
|
205
|
+
RF_delete: boolean;
|
|
206
|
+
RF_editing: boolean;
|
|
207
|
+
RF_level: number;
|
|
208
|
+
RF_levelName: string;
|
|
209
|
+
RF_levelName_Trad: string;
|
|
210
|
+
RF_parameters: boolean;
|
|
211
|
+
RF_setAdmin: boolean;
|
|
212
|
+
RF_spotit: boolean;
|
|
213
|
+
RF_spotit_own: boolean;
|
|
214
|
+
};
|
package/lib/src/types/hook.d.ts
CHANGED
|
@@ -65,6 +65,23 @@ declare const spotRssFeedSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
65
65
|
isActive: boolean;
|
|
66
66
|
}>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
67
67
|
export type SpotRssFeed = z.infer<typeof spotRssFeedSchema>;
|
|
68
|
+
declare const widgetHookSchema: z.ZodIntersection<z.ZodObject<{
|
|
69
|
+
isActive: z.ZodBoolean;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
isActive: boolean;
|
|
72
|
+
}, {
|
|
73
|
+
isActive: boolean;
|
|
74
|
+
}>, z.ZodObject<{
|
|
75
|
+
create: z.ZodBoolean;
|
|
76
|
+
autorize: z.ZodArray<z.ZodOptional<z.ZodEnum<["message", "comment", "board", "article"]>>, "many">;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
create: boolean;
|
|
79
|
+
autorize: ("comment" | "message" | "board" | "article" | undefined)[];
|
|
80
|
+
}, {
|
|
81
|
+
create: boolean;
|
|
82
|
+
autorize: ("comment" | "message" | "board" | "article" | undefined)[];
|
|
83
|
+
}>>;
|
|
84
|
+
export type WidgetHook = z.infer<typeof widgetHookSchema>;
|
|
68
85
|
/**
|
|
69
86
|
* HookListType
|
|
70
87
|
*/
|
|
@@ -118,6 +135,22 @@ declare const hookListTypeSchema: z.ZodObject<{
|
|
|
118
135
|
}, {
|
|
119
136
|
isActive: boolean;
|
|
120
137
|
}>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>>;
|
|
138
|
+
WidgetHook: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
139
|
+
isActive: z.ZodBoolean;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
isActive: boolean;
|
|
142
|
+
}, {
|
|
143
|
+
isActive: boolean;
|
|
144
|
+
}>, z.ZodObject<{
|
|
145
|
+
create: z.ZodBoolean;
|
|
146
|
+
autorize: z.ZodArray<z.ZodOptional<z.ZodEnum<["message", "comment", "board", "article"]>>, "many">;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
create: boolean;
|
|
149
|
+
autorize: ("comment" | "message" | "board" | "article" | undefined)[];
|
|
150
|
+
}, {
|
|
151
|
+
create: boolean;
|
|
152
|
+
autorize: ("comment" | "message" | "board" | "article" | undefined)[];
|
|
153
|
+
}>>>;
|
|
121
154
|
}, "strip", z.ZodTypeAny, {
|
|
122
155
|
DriveHook?: ({
|
|
123
156
|
isActive: boolean;
|
|
@@ -138,6 +171,12 @@ declare const hookListTypeSchema: z.ZodObject<{
|
|
|
138
171
|
spotRssFeed?: ({
|
|
139
172
|
isActive: boolean;
|
|
140
173
|
} & {}) | undefined;
|
|
174
|
+
WidgetHook?: ({
|
|
175
|
+
isActive: boolean;
|
|
176
|
+
} & {
|
|
177
|
+
create: boolean;
|
|
178
|
+
autorize: ("comment" | "message" | "board" | "article" | undefined)[];
|
|
179
|
+
}) | undefined;
|
|
141
180
|
}, {
|
|
142
181
|
DriveHook?: ({
|
|
143
182
|
isActive: boolean;
|
|
@@ -158,6 +197,12 @@ declare const hookListTypeSchema: z.ZodObject<{
|
|
|
158
197
|
spotRssFeed?: ({
|
|
159
198
|
isActive: boolean;
|
|
160
199
|
} & {}) | undefined;
|
|
200
|
+
WidgetHook?: ({
|
|
201
|
+
isActive: boolean;
|
|
202
|
+
} & {
|
|
203
|
+
create: boolean;
|
|
204
|
+
autorize: ("comment" | "message" | "board" | "article" | undefined)[];
|
|
205
|
+
}) | undefined;
|
|
161
206
|
}>;
|
|
162
207
|
export type HookListType = z.infer<typeof hookListTypeSchema>;
|
|
163
208
|
export declare const validateIsFormatHookListType: (object: object) => HookListType;
|
package/lib/src/types/utils.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ export type jLinkList<T extends jObjectBase = jObjectLittle | jUserLittle> = jLi
|
|
|
71
71
|
_src?: T;
|
|
72
72
|
_target?: T | undefined;
|
|
73
73
|
};
|
|
74
|
+
export type jHref = {
|
|
75
|
+
href: string;
|
|
76
|
+
target: string;
|
|
77
|
+
};
|
|
74
78
|
export type jArticleLittle = jObjectLittle & {
|
|
75
79
|
dateCreation: string;
|
|
76
80
|
dateModified: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AudienceAutocomplete } from './autocomplete';
|
|
2
2
|
import { jFileLittle } from './file';
|
|
3
|
-
import {
|
|
3
|
+
import { jUserLittle } from './user';
|
|
4
|
+
import { jArticleList, jArticleLittle, jHref } from './utils';
|
|
4
5
|
export type jArticleWidgetLittle = jArticleLittle & {
|
|
5
6
|
articleWidgets: WidgetWrapperProps[];
|
|
6
7
|
articleWidgetDisplayMode: null | undefined | string;
|
|
@@ -36,6 +37,7 @@ export type WidgetTypeKeys = {
|
|
|
36
37
|
'widget-article-attachment': WidgetArticleAttachmentType;
|
|
37
38
|
'widget-api': WidgetApiType;
|
|
38
39
|
'widget-article-slider': WidgetArticleSliderType;
|
|
40
|
+
'widget-check-list': WidgetCheckListType;
|
|
39
41
|
};
|
|
40
42
|
export type WidgetContentKeys = {
|
|
41
43
|
'widget-article-button': WidgetArticleButtonContent;
|
|
@@ -46,6 +48,7 @@ export type WidgetContentKeys = {
|
|
|
46
48
|
'widget-article-attachment': WidgetArticleAttachmentContent;
|
|
47
49
|
'widget-api': WidgetApiContent;
|
|
48
50
|
'widget-article-slider': WidgetArticleSliderContent;
|
|
51
|
+
'widget-check-list': WidgetCheckListContent;
|
|
49
52
|
};
|
|
50
53
|
export type WidgetKeys = keyof WidgetTypeKeys;
|
|
51
54
|
export type WidgetExtendedType = {
|
|
@@ -91,6 +94,18 @@ export type WidgetArticleSliderType = {
|
|
|
91
94
|
uniqid: string;
|
|
92
95
|
content: WidgetArticleSliderContent;
|
|
93
96
|
};
|
|
97
|
+
export type WidgetCheckListType = {
|
|
98
|
+
title: string;
|
|
99
|
+
name: 'widget-check-list';
|
|
100
|
+
uniqid: string;
|
|
101
|
+
content: WidgetCheckListContent;
|
|
102
|
+
};
|
|
103
|
+
export type WidgetCheckListTypeForFront = {
|
|
104
|
+
title: string;
|
|
105
|
+
name: 'widget-check-list';
|
|
106
|
+
uniqid: string;
|
|
107
|
+
content: WidgetCheckListContentForFront;
|
|
108
|
+
};
|
|
94
109
|
export type CSSTextAlignType = 'left' | 'right' | 'center' | 'justify';
|
|
95
110
|
export type CSSBackgroundPosition = 'top' | 'bottom' | 'center' | 'left' | 'right';
|
|
96
111
|
export type CSSBackgroundSize = 'auto' | 'contain' | 'cover';
|
|
@@ -176,9 +191,35 @@ export type WidgetArticleSliderContent = {
|
|
|
176
191
|
useDots?: boolean;
|
|
177
192
|
startAt?: number;
|
|
178
193
|
};
|
|
194
|
+
export type WidgetCheckListContent = {
|
|
195
|
+
arr?: WidgetCheckListContentArr[];
|
|
196
|
+
};
|
|
197
|
+
export type WidgetCheckListContentForFront = {
|
|
198
|
+
arr?: WidgetCheckListContentArrForFront[];
|
|
199
|
+
};
|
|
200
|
+
export type WidgetCheckListContentArr = {
|
|
201
|
+
title: string;
|
|
202
|
+
value?: boolean;
|
|
203
|
+
links?: jHref[];
|
|
204
|
+
id?: number;
|
|
205
|
+
user?: {
|
|
206
|
+
id: number;
|
|
207
|
+
type: 'user';
|
|
208
|
+
mainType: 'user';
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
export type WidgetCheckListContentArrForFront = {
|
|
212
|
+
text: string;
|
|
213
|
+
value?: boolean;
|
|
214
|
+
links?: jHref[];
|
|
215
|
+
uri?: string;
|
|
216
|
+
mimetype?: string;
|
|
217
|
+
id?: number;
|
|
218
|
+
user?: jUserLittle;
|
|
219
|
+
};
|
|
179
220
|
export type CombinedWidgetContent = {
|
|
180
221
|
widgets?: WidgetWrapperProps[];
|
|
181
|
-
} & (WidgetArticleTextContent | WidgetArticleImageContent | WidgetArticleTitleContent | WidgetArticleButtonContent | WidgetArticleGalleryContent | WidgetArticleAttachmentContent | WidgetApiContent | WidgetArticleSliderContent);
|
|
222
|
+
} & (WidgetArticleTextContent | WidgetArticleImageContent | WidgetArticleTitleContent | WidgetArticleButtonContent | WidgetArticleGalleryContent | WidgetArticleAttachmentContent | WidgetApiContent | WidgetArticleSliderContent | WidgetCheckListContent);
|
|
182
223
|
export type WidgetStateProps = {
|
|
183
224
|
busy?: boolean | undefined;
|
|
184
225
|
loading?: boolean | undefined;
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"o": "spot",
|
|
3
|
+
"f": "getUserLevelAndRight",
|
|
4
|
+
"error": 0,
|
|
5
|
+
"messages": [],
|
|
6
|
+
"result": {
|
|
7
|
+
"userLevelSpot": {
|
|
8
|
+
"RF_delete": true,
|
|
9
|
+
"RF_parameters": true,
|
|
10
|
+
"RF_spotit": true,
|
|
11
|
+
"RF_spotit_own": true,
|
|
12
|
+
"RF_editing": true,
|
|
13
|
+
"RF_setAdmin": true,
|
|
14
|
+
"RF_Constant_levelName": "Creator",
|
|
15
|
+
"RF_levelName": "Creator",
|
|
16
|
+
"RF_level": 0,
|
|
17
|
+
"RF_levelName_Trad": "Fondateur"
|
|
18
|
+
},
|
|
19
|
+
"spotMinLevelToInvit": 2,
|
|
20
|
+
"userRights": {
|
|
21
|
+
"create": false,
|
|
22
|
+
"read": true,
|
|
23
|
+
"publish": true,
|
|
24
|
+
"administrate": false,
|
|
25
|
+
"update": true,
|
|
26
|
+
"delete": true,
|
|
27
|
+
"comment": false,
|
|
28
|
+
"member": true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|