jamespot-user-api 1.0.176 → 1.0.178
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 +14 -14
- 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/JBbbApi.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/JDatasourceApi.html +1 -1
- package/documentation/classes/JDiapazoneApi.html +1 -1
- package/documentation/classes/JFaqApi.html +1 -1
- package/documentation/classes/JFileApi.html +6 -6
- package/documentation/classes/JFilebankApi.html +1 -1
- package/documentation/classes/JGlobalApi.html +1 -1
- package/documentation/classes/JGroupApi.html +12 -12
- 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/BookmarkType.html +1 -1
- package/documentation/enums/Format.html +1 -1
- package/documentation/enums/GroupModerateStatus.html +1 -1
- package/documentation/enums/StudioApplicationStatus.html +1 -1
- package/documentation/enums/WidgetsName.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/ApiWrapper.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/PagingResults.html +1 -1
- package/documentation/interfaces/RootFolderProps.html +1 -1
- package/documentation/interfaces/SpotProps.html +1 -1
- package/documentation/interfaces/TaxonomyCreate.html +1 -1
- package/documentation/interfaces/WidgetType.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/file/file.d.ts +5 -1
- package/lib/src/apis/file/file.mock.d.ts +1 -0
- package/lib/src/apis/{filebank.d.ts → filebank/filebank.d.ts} +26 -6
- package/lib/src/apis/filebank/filebank.mock.d.ts +4 -0
- package/lib/src/apis/filebank/filebank.test.d.ts +1 -0
- package/lib/src/apis/index.d.ts +1 -1
- package/lib/src/apis/jamespotUserApi.d.ts +1 -1
- package/lib/src/types/file.d.ts +15 -0
- package/package.json +1 -1
- package/phpunitMock/fileBankGetParents-success.json +38 -0
- package/phpunitMock/fileBankGetPath-success.json +85 -0
- package/phpunitMock/fileCopy-success.json +18 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiWrapper, FileCropConfig, UploadConfig, jObjectLittle, jArticleLittle, jFileLittle, UserDownload, FormatList } from '../../types';
|
|
1
|
+
import { ApiWrapper, FileCropConfig, UploadConfig, jObjectLittle, jArticleLittle, jFileLittle, UserDownload, FormatList, FileCopyParams } from '../../types';
|
|
2
2
|
import { JBaseApi } from '../base';
|
|
3
3
|
export declare class JFileApi extends JBaseApi {
|
|
4
4
|
/**
|
|
@@ -101,4 +101,8 @@ export declare class JFileApi extends JBaseApi {
|
|
|
101
101
|
list: UserDownload[];
|
|
102
102
|
}>>;
|
|
103
103
|
generatePreview(id: number): Promise<ApiWrapper<boolean>>;
|
|
104
|
+
copy<T extends jFileLittle = jFileLittle>(params: FileCopyParams, options?: {
|
|
105
|
+
format?: FormatList;
|
|
106
|
+
signal?: AbortSignal;
|
|
107
|
+
}): Promise<ApiWrapper<T>>;
|
|
104
108
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JBaseApi } from '
|
|
2
|
-
import { jObjectLittle } from '
|
|
3
|
-
import { Rights } from '
|
|
4
|
-
import { jArticleList } from '
|
|
5
|
-
import { ApiPagingResults, ApiWrapper } from '
|
|
6
|
-
import { jFileLittle } from '
|
|
1
|
+
import { JBaseApi } from '../base';
|
|
2
|
+
import { jObjectLittle } from '../../types/objectBase';
|
|
3
|
+
import { Rights } from '../../types/common';
|
|
4
|
+
import { jArticleList, jArticleLittle } from '../../types/article';
|
|
5
|
+
import { ApiPagingResults, ApiWrapper, FormatList } from '../../types/utils';
|
|
6
|
+
import { jFileLittle } from '../../types/file';
|
|
7
7
|
export interface RootFolderProps {
|
|
8
8
|
id: number;
|
|
9
9
|
title: string;
|
|
@@ -42,8 +42,28 @@ export type FileBankDocument = jArticleList & {
|
|
|
42
42
|
_attachedFiles: jFileLittle[];
|
|
43
43
|
type: 'document';
|
|
44
44
|
};
|
|
45
|
+
export type FilebankGetPathParams = {
|
|
46
|
+
uri: string;
|
|
47
|
+
mode?: 'full' | 'browse';
|
|
48
|
+
};
|
|
49
|
+
export type FilebankPath<T extends jArticleLittle = jArticleLittle> = {
|
|
50
|
+
[k: string]: T & {
|
|
51
|
+
_nbItems: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export type FilebankGetParentsParams = {
|
|
55
|
+
id: number;
|
|
56
|
+
};
|
|
45
57
|
export declare class JFilebankApi extends JBaseApi {
|
|
46
58
|
getBanks(format?: string): Promise<Array<FileBankProps>>;
|
|
47
59
|
getFolders(parentURI: string): Promise<ApiWrapper<FolderType[]>>;
|
|
48
60
|
getDocuments(uri: string): Promise<ApiPagingResults<FileBankDocument>>;
|
|
61
|
+
getPath<T extends jArticleLittle = jArticleLittle>(params: FilebankGetPathParams, options?: {
|
|
62
|
+
format?: FormatList;
|
|
63
|
+
signal?: AbortSignal;
|
|
64
|
+
}): Promise<ApiWrapper<FilebankPath<T>>>;
|
|
65
|
+
getParents<T extends jArticleLittle = jArticleLittle>(params: FilebankGetParentsParams, options?: {
|
|
66
|
+
format?: FormatList;
|
|
67
|
+
signal?: AbortSignal;
|
|
68
|
+
}): Promise<ApiWrapper<T[]>>;
|
|
49
69
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/src/apis/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export * from './datasource/datasource';
|
|
|
12
12
|
export * from './diapazone/diapazone';
|
|
13
13
|
export * from './file/file';
|
|
14
14
|
export * from './faq/faq';
|
|
15
|
-
export * from './filebank';
|
|
15
|
+
export * from './filebank/filebank';
|
|
16
16
|
export * from './global/global';
|
|
17
17
|
export * from './group/group';
|
|
18
18
|
export * from './jamespotUserApi';
|
|
@@ -9,7 +9,7 @@ import { JDatasourceApi } from './datasource/datasource';
|
|
|
9
9
|
import { JDiapazoneApi } from './diapazone/diapazone';
|
|
10
10
|
import { JDriveApi } from './drive/drive';
|
|
11
11
|
import { JFileApi } from './file/file';
|
|
12
|
-
import { JFilebankApi } from './filebank';
|
|
12
|
+
import { JFilebankApi } from './filebank/filebank';
|
|
13
13
|
import { JGroupApi } from './group/group';
|
|
14
14
|
import { JMediaLibraryApi } from './mediaLibrary/mediaLibrary';
|
|
15
15
|
import { JLandApi } from './jland/jland';
|
package/lib/src/types/file.d.ts
CHANGED
|
@@ -223,3 +223,18 @@ export declare const userDownloadSchema: z.ZodObject<{
|
|
|
223
223
|
Pseudo: string;
|
|
224
224
|
}>;
|
|
225
225
|
export type UserDownload = z.infer<typeof userDownloadSchema>;
|
|
226
|
+
declare const fileCopyParamsSchema: z.ZodObject<{
|
|
227
|
+
id: z.ZodNumber;
|
|
228
|
+
token: z.ZodOptional<z.ZodString>;
|
|
229
|
+
attrName: z.ZodString;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
id: number;
|
|
232
|
+
attrName: string;
|
|
233
|
+
token?: string | undefined;
|
|
234
|
+
}, {
|
|
235
|
+
id: number;
|
|
236
|
+
attrName: string;
|
|
237
|
+
token?: string | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
export type FileCopyParams = z.infer<typeof fileCopyParamsSchema>;
|
|
240
|
+
export {};
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"o": "fileBank",
|
|
3
|
+
"f": "getParents",
|
|
4
|
+
"error": 0,
|
|
5
|
+
"messages": [],
|
|
6
|
+
"result": [
|
|
7
|
+
{
|
|
8
|
+
"id": 236,
|
|
9
|
+
"mainType": "article",
|
|
10
|
+
"type": "folder",
|
|
11
|
+
"uri": "folder/236",
|
|
12
|
+
"dateCreation": "2024-08-13 13:29:19",
|
|
13
|
+
"dateModified": "2024-08-13 13:29:19",
|
|
14
|
+
"title": "folder1_1",
|
|
15
|
+
"_url": "/ng/app/filebank/16/documents/236"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": 235,
|
|
19
|
+
"mainType": "article",
|
|
20
|
+
"type": "folder",
|
|
21
|
+
"uri": "folder/235",
|
|
22
|
+
"dateCreation": "2024-08-13 13:29:19",
|
|
23
|
+
"dateModified": "2024-08-13 13:29:19",
|
|
24
|
+
"title": "folder1",
|
|
25
|
+
"_url": "/ng/app/filebank/16/documents/235"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": 232,
|
|
29
|
+
"mainType": "article",
|
|
30
|
+
"type": "rootFolder",
|
|
31
|
+
"uri": "rootFolder/232",
|
|
32
|
+
"dateCreation": "2024-08-13 13:29:19",
|
|
33
|
+
"dateModified": "2024-08-13 13:29:19",
|
|
34
|
+
"title": "Group FileBankTest",
|
|
35
|
+
"_url": "/ng/app/filebank/16/documents/"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"o": "FileBank",
|
|
3
|
+
"f": "GetPath",
|
|
4
|
+
"error": 0,
|
|
5
|
+
"messages": [],
|
|
6
|
+
"result": {
|
|
7
|
+
"folder/1146": {
|
|
8
|
+
"id": 1146,
|
|
9
|
+
"mainType": "article",
|
|
10
|
+
"type": "folder",
|
|
11
|
+
"uri": "folder/1146",
|
|
12
|
+
"dateCreation": "2024-08-07 17:17:50",
|
|
13
|
+
"dateModified": "2024-08-07 17:17:50",
|
|
14
|
+
"title": "folder2",
|
|
15
|
+
"_url": "/ng/app/filebank/67/documents/1146",
|
|
16
|
+
"_nbItems": 4
|
|
17
|
+
},
|
|
18
|
+
"folder/1147": {
|
|
19
|
+
"id": 1147,
|
|
20
|
+
"mainType": "article",
|
|
21
|
+
"type": "folder",
|
|
22
|
+
"uri": "folder/1147",
|
|
23
|
+
"dateCreation": "2024-08-07 17:17:50",
|
|
24
|
+
"dateModified": "2024-08-07 17:17:50",
|
|
25
|
+
"title": "folder1",
|
|
26
|
+
"_url": "/ng/app/filebank/67/documents/1147",
|
|
27
|
+
"_nbItems": 4
|
|
28
|
+
},
|
|
29
|
+
"folder/1148": {
|
|
30
|
+
"id": 1148,
|
|
31
|
+
"mainType": "article",
|
|
32
|
+
"type": "folder",
|
|
33
|
+
"uri": "folder/1148",
|
|
34
|
+
"dateCreation": "2024-08-07 17:17:50",
|
|
35
|
+
"dateModified": "2024-08-07 17:17:50",
|
|
36
|
+
"title": "folder1_1",
|
|
37
|
+
"_url": "/ng/app/filebank/67/documents/1148",
|
|
38
|
+
"_nbItems": 2
|
|
39
|
+
},
|
|
40
|
+
"folder/1151": {
|
|
41
|
+
"id": 1151,
|
|
42
|
+
"mainType": "article",
|
|
43
|
+
"type": "folder",
|
|
44
|
+
"uri": "folder/1151",
|
|
45
|
+
"dateCreation": "2024-08-07 17:17:50",
|
|
46
|
+
"dateModified": "2024-08-07 17:17:50",
|
|
47
|
+
"title": "folder1_2",
|
|
48
|
+
"_url": "/ng/app/filebank/67/documents/1151",
|
|
49
|
+
"_nbItems": 0
|
|
50
|
+
},
|
|
51
|
+
"folder/1152": {
|
|
52
|
+
"id": 1152,
|
|
53
|
+
"mainType": "article",
|
|
54
|
+
"type": "folder",
|
|
55
|
+
"uri": "folder/1152",
|
|
56
|
+
"dateCreation": "2024-08-07 17:17:50",
|
|
57
|
+
"dateModified": "2024-08-07 17:17:50",
|
|
58
|
+
"title": "folder1_3",
|
|
59
|
+
"_url": "/ng/app/filebank/67/documents/1152",
|
|
60
|
+
"_nbItems": 0
|
|
61
|
+
},
|
|
62
|
+
"folder/1149": {
|
|
63
|
+
"id": 1149,
|
|
64
|
+
"mainType": "article",
|
|
65
|
+
"type": "folder",
|
|
66
|
+
"uri": "folder/1149",
|
|
67
|
+
"dateCreation": "2024-08-07 17:17:50",
|
|
68
|
+
"dateModified": "2024-08-07 17:17:50",
|
|
69
|
+
"title": "folder1_1_1",
|
|
70
|
+
"_url": "/ng/app/filebank/67/documents/1149",
|
|
71
|
+
"_nbItems": 0
|
|
72
|
+
},
|
|
73
|
+
"folder/1150": {
|
|
74
|
+
"id": 1150,
|
|
75
|
+
"mainType": "article",
|
|
76
|
+
"type": "folder",
|
|
77
|
+
"uri": "folder/1150",
|
|
78
|
+
"dateCreation": "2024-08-07 17:17:50",
|
|
79
|
+
"dateModified": "2024-08-07 17:17:50",
|
|
80
|
+
"title": "folder1_1_2",
|
|
81
|
+
"_url": "/ng/app/filebank/67/documents/1150",
|
|
82
|
+
"_nbItems": 0
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"o": "file",
|
|
3
|
+
"f": "copy",
|
|
4
|
+
"error": 0,
|
|
5
|
+
"messages": [],
|
|
6
|
+
"result": {
|
|
7
|
+
"id": 93,
|
|
8
|
+
"mainType": "file",
|
|
9
|
+
"type": "fileTmp",
|
|
10
|
+
"uri": "fileTmp/93",
|
|
11
|
+
"dateCreation": "2024-08-19 11:16:11",
|
|
12
|
+
"dateModified": "2024-08-19 11:16:11",
|
|
13
|
+
"title": "imgTest.jpg",
|
|
14
|
+
"size": 20904,
|
|
15
|
+
"mimetype": "image/jpeg",
|
|
16
|
+
"_url": "javascript:void(0);"
|
|
17
|
+
}
|
|
18
|
+
}
|