jamespot-user-api 1.0.103 → 1.0.104
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 +58 -0
- package/documentation/classes/AdminStoreApi.html +1 -1
- package/documentation/classes/AdminUtilsApi.html +3 -0
- 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 +7 -7
- 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 -0
- 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 +6 -5
- package/lib/jamespot-user-api.js +1 -1
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/admin/index.d.ts +3 -0
- package/lib/src/apis/admin/license.d.ts +74 -0
- package/lib/src/apis/{Licenses → admin}/licenses.mock.d.ts +3 -4
- package/lib/src/apis/{adminStore.d.ts → admin/store.d.ts} +2 -3
- package/lib/src/apis/admin/utils.d.ts +8 -0
- package/lib/src/apis/index.d.ts +1 -2
- package/lib/src/apis/jamespotUserApi.d.ts +3 -3
- package/lib/src/apis/jland/jland.d.ts +2 -3
- package/lib/src/apis/user/user.d.ts +0 -1
- package/lib/src/types/adminLicence.d.ts +43 -0
- package/lib/src/types/adminUtils.d.ts +18 -0
- package/lib/src/types/index.d.ts +2 -0
- package/lib/src/types/model.d.ts +3 -1
- package/lib/src/types/user.d.ts +4 -0
- package/lib/src/types/utils.d.ts +2 -1
- package/lib/src/util/Test.d.ts +2 -1
- package/package.json +1 -1
- package/phpunitMock/objectListJamespotUserQueryList-rawList.json +25 -14
- package/documentation/classes/JLicenseApi.html +0 -18
- package/lib/src/apis/Licenses/licenses.d.ts +0 -44
- /package/lib/src/apis/{Licenses → admin}/licences.test.d.ts +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ApiWrapper } from '
|
|
2
|
-
import { JBaseApi } from '
|
|
3
|
-
import { StoreItem, StoreFinalize } from '../types/adminStore';
|
|
1
|
+
import { ApiWrapper, StoreItem, StoreFinalize } from '../../types';
|
|
2
|
+
import { JBaseApi } from '../base';
|
|
4
3
|
export declare class AdminStoreApi extends JBaseApi {
|
|
5
4
|
getItem(uri: string): Promise<ApiWrapper<StoreItem>>;
|
|
6
5
|
checkoutBilling(uri: string): Promise<ApiWrapper<boolean>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AdminApps } from '../../types';
|
|
2
|
+
import { JBaseApi } from '../base';
|
|
3
|
+
export declare class AdminUtilsApi extends JBaseApi {
|
|
4
|
+
/**
|
|
5
|
+
* Request the admin applications and sub applications for the admin panel
|
|
6
|
+
*/
|
|
7
|
+
getApps(): Promise<import("../../types").ApiWrapper<AdminApps, import("../../types").BaseMessages>>;
|
|
8
|
+
}
|
package/lib/src/apis/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './admin';
|
|
2
2
|
export * from './application';
|
|
3
3
|
export * from './article/article';
|
|
4
4
|
export * from './assetReservation';
|
|
@@ -12,7 +12,6 @@ export * from './filebank';
|
|
|
12
12
|
export * from './group';
|
|
13
13
|
export * from './jamespotUserApi';
|
|
14
14
|
export * from './jland/jland';
|
|
15
|
-
export * from './Licenses/licenses';
|
|
16
15
|
export * from './messenger';
|
|
17
16
|
export * from './search/search';
|
|
18
17
|
export * from './share';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdminStoreApi } from './
|
|
1
|
+
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';
|
|
@@ -19,7 +19,6 @@ import { JDiapazoneApi } from './diapazone';
|
|
|
19
19
|
import { JWedocApi } from './wedoc';
|
|
20
20
|
import { Network } from '../util/network';
|
|
21
21
|
import { JShareApi } from './share';
|
|
22
|
-
import { JLicenseApi } from './Licenses/licenses';
|
|
23
22
|
/**
|
|
24
23
|
* In browser usage, 'window' should be the window object.
|
|
25
24
|
* In server side usage, 'window' object given must implement the fetch method, used by the Apis.
|
|
@@ -31,7 +30,9 @@ export declare class JamespotUserApi {
|
|
|
31
30
|
version: string;
|
|
32
31
|
network: Network;
|
|
33
32
|
admin: {
|
|
33
|
+
license: AdminLicenseApi;
|
|
34
34
|
store: AdminStoreApi;
|
|
35
|
+
utils: AdminUtilsApi;
|
|
35
36
|
};
|
|
36
37
|
application: JApplicationApi;
|
|
37
38
|
article: JArticleApi;
|
|
@@ -45,7 +46,6 @@ export declare class JamespotUserApi {
|
|
|
45
46
|
filebank: JFilebankApi;
|
|
46
47
|
group: JGroupApi;
|
|
47
48
|
jland: JLandApi;
|
|
48
|
-
license: JLicenseApi;
|
|
49
49
|
mediaLibrary: JMediaLibraryApi;
|
|
50
50
|
messenger: JMessengerApi;
|
|
51
51
|
search: JSearchApi;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { JBaseApi } from '../base';
|
|
2
|
-
import { ApiWrapper, jArticleList, MaybeWithToken, PagingResults } from '../../types';
|
|
2
|
+
import { ApiWrapper, jArticleList, License, MaybeWithToken, PagingResults } from '../../types';
|
|
3
3
|
import { ArticleCreation } from '../article/article';
|
|
4
|
-
import { JLicense } from '../Licenses/licenses';
|
|
5
4
|
export declare type JLandLog = {
|
|
6
5
|
idLog: number;
|
|
7
6
|
slug: string;
|
|
@@ -23,7 +22,7 @@ export declare type JLandMap = jArticleList & {
|
|
|
23
22
|
waMapUrl?: string;
|
|
24
23
|
limit?: number;
|
|
25
24
|
_extend: {
|
|
26
|
-
licenses: Array<
|
|
25
|
+
licenses: Array<License>;
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
28
|
export declare type JLandMapCreation = ArticleCreation & {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ObjectListProps } from '../apis';
|
|
2
|
+
import { jUserList } from './user';
|
|
3
|
+
export declare type AdminLicenseUserStats = {
|
|
4
|
+
countActiveUsersWithoutLicense: number;
|
|
5
|
+
countLicensesAssigned: number;
|
|
6
|
+
countLicensesNotAssigned: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type ObjectWithoutLicenseFilter = {
|
|
9
|
+
name: string;
|
|
10
|
+
operator: string;
|
|
11
|
+
value: number;
|
|
12
|
+
};
|
|
13
|
+
export declare type AdminLicensesNotAssigned = {
|
|
14
|
+
[key: string]: number;
|
|
15
|
+
};
|
|
16
|
+
export declare type AdminLicensesAssigned = {
|
|
17
|
+
id: number;
|
|
18
|
+
kind: string;
|
|
19
|
+
dateCreation: string;
|
|
20
|
+
idFeature: number;
|
|
21
|
+
uri: string;
|
|
22
|
+
contentId: number;
|
|
23
|
+
contentType: string;
|
|
24
|
+
status: number;
|
|
25
|
+
};
|
|
26
|
+
export declare type License = {
|
|
27
|
+
id: number;
|
|
28
|
+
kind: string;
|
|
29
|
+
dateCreation: string;
|
|
30
|
+
idFeature: number;
|
|
31
|
+
uri: string;
|
|
32
|
+
contentId: number;
|
|
33
|
+
contentType: string;
|
|
34
|
+
status: number;
|
|
35
|
+
};
|
|
36
|
+
export declare type JAdminLicenseUserList = jUserList & {
|
|
37
|
+
_extend: {
|
|
38
|
+
licenses: Array<License>;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export interface AdminLicenseUser extends ObjectListProps {
|
|
42
|
+
data: JAdminLicenseUserList[];
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare type AdminAppTab = {
|
|
2
|
+
sref?: string;
|
|
3
|
+
href?: string;
|
|
4
|
+
idDiv: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type AdminApp = {
|
|
9
|
+
name: string;
|
|
10
|
+
label: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
color: [string, string, string];
|
|
13
|
+
state?: string;
|
|
14
|
+
access: boolean;
|
|
15
|
+
url?: string;
|
|
16
|
+
tabs?: AdminAppTab[];
|
|
17
|
+
};
|
|
18
|
+
export declare type AdminApps = AdminApp[];
|
package/lib/src/types/index.d.ts
CHANGED
package/lib/src/types/model.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare type WidgetDatePicker = {
|
|
|
27
27
|
type: 'datePicker';
|
|
28
28
|
};
|
|
29
29
|
export declare type WidgetDatePickerValue = string | null;
|
|
30
|
+
export declare type WidgetActiveValue = number;
|
|
30
31
|
export declare type WidgetMultiattribute = {
|
|
31
32
|
type: 'multiattribute';
|
|
32
33
|
};
|
|
@@ -71,6 +72,7 @@ export declare type WidgetTaxonomy = {
|
|
|
71
72
|
type: 'taxonomy';
|
|
72
73
|
params: {
|
|
73
74
|
idTaxonomy: string;
|
|
75
|
+
type?: string;
|
|
74
76
|
};
|
|
75
77
|
};
|
|
76
78
|
export declare type WidgetOrientedlinks = {
|
|
@@ -90,7 +92,7 @@ export declare type WidgetUri = {
|
|
|
90
92
|
};
|
|
91
93
|
};
|
|
92
94
|
export declare type Widget = WidgetText | WidgetTextarea | WidgetNumber | WidgetDate | WidgetDatetime | WidgetDatePicker | WidgetSelect | WidgetEmail | WidgetUrl | WidgetRefUser | WidgetRadio | WidgetCheckbox | WidgetOrientedlinks | WidgetTaxonomy | WidgetUri | WidgetTransient | WidgetMultiattribute | WidgetFile;
|
|
93
|
-
export declare type WidgetsValue = WidgetDatePickerValue | WidgetDatetimeValue | WidgetDateValue | WidgetEmailValue | WidgetNumberValue | WidgetTextareaValue | WidgetTextValue | WidgetUrlValue;
|
|
95
|
+
export declare type WidgetsValue = WidgetActiveValue | WidgetDatePickerValue | WidgetDatetimeValue | WidgetDateValue | WidgetEmailValue | WidgetNumberValue | WidgetTextareaValue | WidgetTextValue | WidgetUrlValue;
|
|
94
96
|
export declare type FieldConfiguration<T extends string = string> = {
|
|
95
97
|
label: string;
|
|
96
98
|
description?: string;
|
package/lib/src/types/user.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { WidgetsValue } from './model';
|
|
2
2
|
import { jObjectLittle } from './utils';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use jUserList instead
|
|
5
|
+
*/
|
|
3
6
|
export declare type UserModel = jObjectLittle & {
|
|
4
7
|
firstname: string;
|
|
5
8
|
lastname: string;
|
|
9
|
+
active: number;
|
|
6
10
|
mail?: string;
|
|
7
11
|
};
|
|
8
12
|
export declare type UserMapModel = {
|
package/lib/src/types/utils.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export declare type jObjectLittle = Readable<jObjectBase & {
|
|
|
73
73
|
}>;
|
|
74
74
|
export declare type jObjectList = jObjectLittle & {
|
|
75
75
|
description?: string;
|
|
76
|
+
active: number;
|
|
76
77
|
_user: jUserLittle;
|
|
77
78
|
_right: Rights;
|
|
78
79
|
};
|
|
@@ -110,7 +111,7 @@ export declare type Order = {
|
|
|
110
111
|
sort: 'ASC' | 'DESC';
|
|
111
112
|
};
|
|
112
113
|
export declare type Orders = Array<Order>;
|
|
113
|
-
export declare type FilterValue = boolean | string | string[] | {
|
|
114
|
+
export declare type FilterValue = boolean | string | number | string[] | {
|
|
114
115
|
srcId: number | string;
|
|
115
116
|
srcType: string;
|
|
116
117
|
} | {
|
package/lib/src/util/Test.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JamespotUserApi } from '../apis';
|
|
2
|
-
import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete } from '../types';
|
|
2
|
+
import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete, jObjectList } from '../types';
|
|
3
3
|
import { Network } from './network';
|
|
4
4
|
export declare const network: Network;
|
|
5
5
|
export declare const jApi: JamespotUserApi;
|
|
@@ -25,4 +25,5 @@ export declare const validateObjectIsFormatLittle: <T extends {
|
|
|
25
25
|
title: string;
|
|
26
26
|
_url: string;
|
|
27
27
|
}>(object: T) => boolean;
|
|
28
|
+
export declare const validateObjectIsFormatList: <T extends jObjectList = jObjectList>(object: T) => boolean;
|
|
28
29
|
export declare const validateObjectIsFormatAutocomplete: <T extends jObjectAutocomplete = jObjectAutocomplete>(object: T) => boolean;
|
package/package.json
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"firstname": "Admin",
|
|
22
22
|
"lastname": "Jenkins",
|
|
23
23
|
"company": "",
|
|
24
|
-
"mail": "admin.jenkins@jamespot.com"
|
|
24
|
+
"mail": "admin.jenkins@jamespot.com",
|
|
25
|
+
"active": 1
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
28
|
"id": 2,
|
|
@@ -36,7 +37,8 @@
|
|
|
36
37
|
"firstname": "Browser",
|
|
37
38
|
"lastname": "Stack",
|
|
38
39
|
"company": "",
|
|
39
|
-
"mail": "browserstack@jamespot.com"
|
|
40
|
+
"mail": "browserstack@jamespot.com",
|
|
41
|
+
"active": 1
|
|
40
42
|
},
|
|
41
43
|
{
|
|
42
44
|
"id": 4,
|
|
@@ -44,14 +46,15 @@
|
|
|
44
46
|
"type": "user",
|
|
45
47
|
"uri": "user/4",
|
|
46
48
|
"dateCreation": "2019-07-09 15:48:26",
|
|
47
|
-
"dateModified": "
|
|
49
|
+
"dateModified": "2019-07-09 15:51:24",
|
|
48
50
|
"title": "Admin1",
|
|
49
51
|
"_url": "/user/4",
|
|
50
52
|
"level": 9,
|
|
51
53
|
"firstname": "Un",
|
|
52
54
|
"lastname": "Admin",
|
|
53
|
-
"company": "
|
|
54
|
-
"mail": "admin1@jamespot.com"
|
|
55
|
+
"company": "",
|
|
56
|
+
"mail": "admin1@jamespot.com",
|
|
57
|
+
"active": 1
|
|
55
58
|
},
|
|
56
59
|
{
|
|
57
60
|
"id": 5,
|
|
@@ -59,14 +62,15 @@
|
|
|
59
62
|
"type": "user",
|
|
60
63
|
"uri": "user/5",
|
|
61
64
|
"dateCreation": "2019-07-09 15:48:45",
|
|
62
|
-
"dateModified": "
|
|
65
|
+
"dateModified": "2019-07-09 15:51:16",
|
|
63
66
|
"title": "Admin2",
|
|
64
67
|
"_url": "/user/5",
|
|
65
68
|
"level": 9,
|
|
66
69
|
"firstname": "Deux",
|
|
67
70
|
"lastname": "Admin",
|
|
68
71
|
"company": "",
|
|
69
|
-
"mail": "admin2@jamespot.com"
|
|
72
|
+
"mail": "admin2@jamespot.com",
|
|
73
|
+
"active": 1
|
|
70
74
|
},
|
|
71
75
|
{
|
|
72
76
|
"id": 6,
|
|
@@ -81,7 +85,8 @@
|
|
|
81
85
|
"firstname": "Un",
|
|
82
86
|
"lastname": "User",
|
|
83
87
|
"company": "",
|
|
84
|
-
"mail": "user1@jamespot.com"
|
|
88
|
+
"mail": "user1@jamespot.com",
|
|
89
|
+
"active": 1
|
|
85
90
|
},
|
|
86
91
|
{
|
|
87
92
|
"id": 7,
|
|
@@ -96,7 +101,8 @@
|
|
|
96
101
|
"firstname": "Deux",
|
|
97
102
|
"lastname": "User",
|
|
98
103
|
"company": "",
|
|
99
|
-
"mail": "user2@jamespot.com"
|
|
104
|
+
"mail": "user2@jamespot.com",
|
|
105
|
+
"active": 1
|
|
100
106
|
},
|
|
101
107
|
{
|
|
102
108
|
"id": 8,
|
|
@@ -111,7 +117,8 @@
|
|
|
111
117
|
"firstname": "Un",
|
|
112
118
|
"lastname": "Limited",
|
|
113
119
|
"company": "",
|
|
114
|
-
"mail": "limited1@jamespot.com"
|
|
120
|
+
"mail": "limited1@jamespot.com",
|
|
121
|
+
"active": 1
|
|
115
122
|
},
|
|
116
123
|
{
|
|
117
124
|
"id": 9,
|
|
@@ -126,7 +133,8 @@
|
|
|
126
133
|
"firstname": "Deux",
|
|
127
134
|
"lastname": "Limited",
|
|
128
135
|
"company": "",
|
|
129
|
-
"mail": "limited2@jamespot.com"
|
|
136
|
+
"mail": "limited2@jamespot.com",
|
|
137
|
+
"active": 1
|
|
130
138
|
},
|
|
131
139
|
{
|
|
132
140
|
"id": 10,
|
|
@@ -141,7 +149,8 @@
|
|
|
141
149
|
"firstname": "Un",
|
|
142
150
|
"lastname": "InactiveAdmin",
|
|
143
151
|
"company": "",
|
|
144
|
-
"mail": "inactiveAdmin1@jamespot.com"
|
|
152
|
+
"mail": "inactiveAdmin1@jamespot.com",
|
|
153
|
+
"active": 0
|
|
145
154
|
},
|
|
146
155
|
{
|
|
147
156
|
"id": 11,
|
|
@@ -156,7 +165,8 @@
|
|
|
156
165
|
"firstname": "InactiveUser",
|
|
157
166
|
"lastname": "Un",
|
|
158
167
|
"company": "",
|
|
159
|
-
"mail": "inactiveUser1@jamespot.com"
|
|
168
|
+
"mail": "inactiveUser1@jamespot.com",
|
|
169
|
+
"active": 0
|
|
160
170
|
},
|
|
161
171
|
{
|
|
162
172
|
"id": 12,
|
|
@@ -171,7 +181,8 @@
|
|
|
171
181
|
"firstname": "InactiveLimited",
|
|
172
182
|
"lastname": "Un",
|
|
173
183
|
"company": "",
|
|
174
|
-
"mail": "inactiveLimited1@jamespot.com"
|
|
184
|
+
"mail": "inactiveLimited1@jamespot.com",
|
|
185
|
+
"active": 0
|
|
175
186
|
}
|
|
176
187
|
],
|
|
177
188
|
"facets": null
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>JLicenseApi | jamespot-user-api</title><meta name="description" content="Documentation for jamespot-user-api"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">jamespot-user-api</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">jamespot-user-api</a></li><li><a href="JLicenseApi.html">JLicenseApi</a></li></ul><h1>Class JLicenseApi</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="JBaseApi.html" class="tsd-signature-type" data-tsd-kind="Class">JBaseApi</a><ul class="tsd-hierarchy"><li><span class="target">JLicenseApi</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section tsd-is-inherited"><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><a href="JLicenseApi.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="JLicenseApi.html#network" class="tsd-kind-icon">network</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#assignLicense" class="tsd-kind-icon">assign<wbr/>License</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#countLicenseNotAssigned" class="tsd-kind-icon">count<wbr/>License<wbr/>Not<wbr/>Assigned</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#getLicensesAssigned" class="tsd-kind-icon">get<wbr/>Licenses<wbr/>Assigned</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#unassignLicense" class="tsd-kind-icon">unassign<wbr/>License</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited"><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">new JLicense<wbr/>Api<span class="tsd-signature-symbol">(</span>network<span class="tsd-signature-symbol">: </span><a href="Network.html" class="tsd-signature-type" data-tsd-kind="Class">Network</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="JLicenseApi.html" class="tsd-signature-type" data-tsd-kind="Class">JLicenseApi</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="JBaseApi.html">JBaseApi</a>.<a href="JBaseApi.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/Jamespot/jamespot-user-api/blob/db307f8/src/apis/base.ts#L6">apis/base.ts:6</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>network: <a href="Network.html" class="tsd-signature-type" data-tsd-kind="Class">Network</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="JLicenseApi.html" class="tsd-signature-type" data-tsd-kind="Class">JLicenseApi</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="network" class="tsd-anchor"></a><h3 class="tsd-anchor-link">network<a href="#network" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">network<span class="tsd-signature-symbol">:</span> <a href="Network.html" class="tsd-signature-type" data-tsd-kind="Class">Network</a></div><aside class="tsd-sources"><p>Inherited from <a href="JBaseApi.html">JBaseApi</a>.<a href="JBaseApi.html#network">network</a></p><ul><li>Defined in <a href="https://github.com/Jamespot/jamespot-user-api/blob/db307f8/src/apis/base.ts#L4">apis/base.ts:4</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="assignLicense" class="tsd-anchor"></a><h3 class="tsd-anchor-link">assign<wbr/>License<a href="#assignLicense" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">assign<wbr/>License<span class="tsd-signature-symbol">(</span>uri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Jamespot/jamespot-user-api/blob/db307f8/src/apis/Licenses/licenses.ts#L55">apis/Licenses/licenses.ts:55</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
-
<p>Assigns a license to the content with the provided uri (if any is available)</p>
|
|
3
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>uri: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
4
|
-
<p>URI of the object to which a license must be assigned</p>
|
|
5
|
-
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="countLicenseNotAssigned" class="tsd-anchor"></a><h3 class="tsd-anchor-link">count<wbr/>License<wbr/>Not<wbr/>Assigned<a href="#countLicenseNotAssigned" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">count<wbr/>License<wbr/>Not<wbr/>Assigned<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><a href="../modules.html#JLicenseAvailable" class="tsd-signature-type" data-tsd-kind="Type alias">JLicenseAvailable</a><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Jamespot/jamespot-user-api/blob/db307f8/src/apis/Licenses/licenses.ts#L42">apis/Licenses/licenses.ts:42</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
6
|
-
<p>Retrieves the number of licenses of a given type available. License type is
|
|
7
|
-
different from the content type to which it can be assigned to.</p>
|
|
8
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>type: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><a href="../modules.html#JLicenseAvailable" class="tsd-signature-type" data-tsd-kind="Type alias">JLicenseAvailable</a><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><div><p>A paromise resolving to an object containing the kind of license as keys and number of available ones as values</p>
|
|
9
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getLicensesAssigned" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Licenses<wbr/>Assigned<a href="#getLicensesAssigned" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Licenses<wbr/>Assigned<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><a href="../modules.html#JLicense" class="tsd-signature-type" data-tsd-kind="Type alias">JLicense</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Jamespot/jamespot-user-api/blob/db307f8/src/apis/Licenses/licenses.ts#L27">apis/Licenses/licenses.ts:27</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
10
|
-
<p>Retireve the list of liceses assigned to content of a given type</p>
|
|
11
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>type: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
12
|
-
<p>type of content for which we want to retrieve the licenses</p>
|
|
13
|
-
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><a href="../modules.html#JLicense" class="tsd-signature-type" data-tsd-kind="Type alias">JLicense</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><div><p>The list of liceses assigned to content of the provided type</p>
|
|
14
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="unassignLicense" class="tsd-anchor"></a><h3 class="tsd-anchor-link">unassign<wbr/>License<a href="#unassignLicense" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">unassign<wbr/>License<span class="tsd-signature-symbol">(</span>uri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Jamespot/jamespot-user-api/blob/db307f8/src/apis/Licenses/licenses.ts#L68">apis/Licenses/licenses.ts:68</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
15
|
-
<p>Unassigns the licese linked to the content with the provided uri</p>
|
|
16
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>uri: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
17
|
-
<p>URI of the object to which a license must be unassigned</p>
|
|
18
|
-
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/ApiWrapper.html" class="tsd-signature-type" data-tsd-kind="Interface">ApiWrapper</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#BaseMessages" class="tsd-signature-type" data-tsd-kind="Type alias">BaseMessages</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><div></div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="JLicenseApi.html" class="tsd-kind-icon">JLicense<wbr/>Api</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><a href="JLicenseApi.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="JLicenseApi.html#network" class="tsd-kind-icon">network</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#assignLicense" class="tsd-kind-icon">assign<wbr/>License</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#countLicenseNotAssigned" class="tsd-kind-icon">count<wbr/>License<wbr/>Not<wbr/>Assigned</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#getLicensesAssigned" class="tsd-kind-icon">get<wbr/>Licenses<wbr/>Assigned</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="JLicenseApi.html#unassignLicense" class="tsd-kind-icon">unassign<wbr/>License</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { JBaseApi } from '../base';
|
|
2
|
-
import { ApiWrapper } from '../../types';
|
|
3
|
-
export declare type JLicense = {
|
|
4
|
-
id: number;
|
|
5
|
-
kind: string;
|
|
6
|
-
dateCreation: string;
|
|
7
|
-
idFeature: number;
|
|
8
|
-
uri: string;
|
|
9
|
-
contentId: number;
|
|
10
|
-
contentType: string;
|
|
11
|
-
status: number;
|
|
12
|
-
};
|
|
13
|
-
export declare type JLicenseAvailable = {
|
|
14
|
-
[key: string]: number;
|
|
15
|
-
};
|
|
16
|
-
export declare class JLicenseApi extends JBaseApi {
|
|
17
|
-
/**
|
|
18
|
-
* Retireve the list of liceses assigned to content of a given type
|
|
19
|
-
*
|
|
20
|
-
* @param type type of content for which we want to retrieve the licenses
|
|
21
|
-
* @returns The list of liceses assigned to content of the provided type
|
|
22
|
-
*/
|
|
23
|
-
getLicensesAssigned(type: string): Promise<ApiWrapper<Array<JLicense>>>;
|
|
24
|
-
/**
|
|
25
|
-
* Retrieves the number of licenses of a given type available. License type is
|
|
26
|
-
* different from the content type to which it can be assigned to.
|
|
27
|
-
*
|
|
28
|
-
* @param kind The kind of license for which we want to know the availability
|
|
29
|
-
* @returns A paromise resolving to an object containing the kind of license as keys and number of available ones as values
|
|
30
|
-
*/
|
|
31
|
-
countLicenseNotAssigned(type: string): Promise<ApiWrapper<JLicenseAvailable>>;
|
|
32
|
-
/**
|
|
33
|
-
* Assigns a license to the content with the provided uri (if any is available)
|
|
34
|
-
* @param uri URI of the object to which a license must be assigned
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
|
-
assignLicense(uri: string): Promise<ApiWrapper<boolean>>;
|
|
38
|
-
/**
|
|
39
|
-
* Unassigns the licese linked to the content with the provided uri
|
|
40
|
-
* @param uri URI of the object to which a license must be unassigned
|
|
41
|
-
* @returns
|
|
42
|
-
*/
|
|
43
|
-
unassignLicense(uri: string): Promise<ApiWrapper<boolean>>;
|
|
44
|
-
}
|
|
File without changes
|