jamespot-user-api 1.0.177 → 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.
Files changed (67) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminLicenseApi.html +14 -14
  3. package/documentation/classes/AdminStoreApi.html +1 -1
  4. package/documentation/classes/AdminUtilsApi.html +1 -1
  5. package/documentation/classes/JApplicationApi.html +8 -8
  6. package/documentation/classes/JArticleApi.html +1 -1
  7. package/documentation/classes/JAssetReservation.html +1 -1
  8. package/documentation/classes/JAudienceApi.html +1 -1
  9. package/documentation/classes/JBaseApi.html +1 -1
  10. package/documentation/classes/JBbbApi.html +1 -1
  11. package/documentation/classes/JBookmarkApi.html +1 -1
  12. package/documentation/classes/JBusinessNetworkingApi.html +1 -1
  13. package/documentation/classes/JCommunityApi.html +1 -1
  14. package/documentation/classes/JDatasourceApi.html +1 -1
  15. package/documentation/classes/JDiapazoneApi.html +1 -1
  16. package/documentation/classes/JFaqApi.html +1 -1
  17. package/documentation/classes/JFileApi.html +6 -6
  18. package/documentation/classes/JFilebankApi.html +1 -1
  19. package/documentation/classes/JGlobalApi.html +1 -1
  20. package/documentation/classes/JGroupApi.html +12 -12
  21. package/documentation/classes/JIAApi.html +1 -1
  22. package/documentation/classes/JLandApi.html +1 -1
  23. package/documentation/classes/JMessengerApi.html +1 -1
  24. package/documentation/classes/JObjectApi.html +1 -1
  25. package/documentation/classes/JSearchApi.html +6 -6
  26. package/documentation/classes/JShareApi.html +1 -1
  27. package/documentation/classes/JSocialActionApi.html +1 -1
  28. package/documentation/classes/JTaxonomyApi.html +2 -2
  29. package/documentation/classes/JUserApi.html +7 -7
  30. package/documentation/classes/JWedocApi.html +1 -1
  31. package/documentation/classes/JWidgetApi.html +1 -1
  32. package/documentation/classes/JamespotUserApi.html +1 -1
  33. package/documentation/classes/Network.html +1 -1
  34. package/documentation/classes/TVDisplayApi.html +1 -1
  35. package/documentation/classes/WindowBrowser.html +1 -1
  36. package/documentation/enums/BookmarkType.html +1 -1
  37. package/documentation/enums/Format.html +1 -1
  38. package/documentation/enums/GroupModerateStatus.html +1 -1
  39. package/documentation/enums/StudioApplicationStatus.html +1 -1
  40. package/documentation/enums/WidgetsName.html +1 -1
  41. package/documentation/index.html +1 -1
  42. package/documentation/interfaces/AccessRightObject.html +1 -1
  43. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  44. package/documentation/interfaces/ApiWrapper.html +1 -1
  45. package/documentation/interfaces/BaseMessage.html +1 -1
  46. package/documentation/interfaces/Category.html +1 -1
  47. package/documentation/interfaces/FileBankProps.html +1 -1
  48. package/documentation/interfaces/FolderProps.html +1 -1
  49. package/documentation/interfaces/ListFilterSpec.html +1 -1
  50. package/documentation/interfaces/OF.html +1 -1
  51. package/documentation/interfaces/PagingResults.html +1 -1
  52. package/documentation/interfaces/RootFolderProps.html +1 -1
  53. package/documentation/interfaces/SpotProps.html +1 -1
  54. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  55. package/documentation/interfaces/WidgetType.html +1 -1
  56. package/documentation/interfaces/WindowInterface.html +1 -1
  57. package/documentation/modules.html +11 -11
  58. package/lib/jamespot-user-api.js +1 -1
  59. package/lib/jamespot-user-api.js.map +1 -1
  60. package/lib/src/apis/file/file.d.ts +5 -1
  61. package/lib/src/apis/file/file.mock.d.ts +1 -0
  62. package/lib/src/apis/filebank/filebank.d.ts +7 -0
  63. package/lib/src/apis/filebank/filebank.mock.d.ts +2 -1
  64. package/lib/src/types/file.d.ts +15 -0
  65. package/package.json +1 -1
  66. package/phpunitMock/fileBankGetParents-success.json +38 -0
  67. 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
  }
@@ -11,3 +11,4 @@ export declare const fileGetDownload: ApiWrapper<{
11
11
  count: number;
12
12
  list: UserDownload[];
13
13
  }>;
14
+ export declare const fileCopy: ApiWrapper<jFileLittle>;
@@ -51,6 +51,9 @@ export type FilebankPath<T extends jArticleLittle = jArticleLittle> = {
51
51
  _nbItems: number;
52
52
  };
53
53
  };
54
+ export type FilebankGetParentsParams = {
55
+ id: number;
56
+ };
54
57
  export declare class JFilebankApi extends JBaseApi {
55
58
  getBanks(format?: string): Promise<Array<FileBankProps>>;
56
59
  getFolders(parentURI: string): Promise<ApiWrapper<FolderType[]>>;
@@ -59,4 +62,8 @@ export declare class JFilebankApi extends JBaseApi {
59
62
  format?: FormatList;
60
63
  signal?: AbortSignal;
61
64
  }): Promise<ApiWrapper<FilebankPath<T>>>;
65
+ getParents<T extends jArticleLittle = jArticleLittle>(params: FilebankGetParentsParams, options?: {
66
+ format?: FormatList;
67
+ signal?: AbortSignal;
68
+ }): Promise<ApiWrapper<T[]>>;
62
69
  }
@@ -1,3 +1,4 @@
1
1
  import { FilebankPath } from './filebank';
2
- import { ApiWrapper } from '../../types';
2
+ import { ApiWrapper, jArticleLittle } from '../../types';
3
3
  export declare const filebankGetPath: ApiWrapper<FilebankPath>;
4
+ export declare const filebankGetParents: ApiWrapper<jArticleLittle[]>;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.177",
3
+ "version": "1.0.178",
4
4
  "main": "lib/jamespot-user-api.js",
5
5
  "types": "lib/src/index.d.ts",
6
6
  "directories": {
@@ -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,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
+ }