jamespot-user-api 1.0.113 → 1.0.114

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 (65) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminLicenseApi.html +11 -11
  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/JBookmarkApi.html +1 -1
  11. package/documentation/classes/JCommunityApi.html +1 -1
  12. package/documentation/classes/JDiapazoneApi.html +1 -1
  13. package/documentation/classes/JFileApi.html +6 -6
  14. package/documentation/classes/JFilebankApi.html +1 -1
  15. package/documentation/classes/JGroupApi.html +9 -9
  16. package/documentation/classes/JLandApi.html +1 -1
  17. package/documentation/classes/JMessengerApi.html +1 -1
  18. package/documentation/classes/JSearchApi.html +6 -6
  19. package/documentation/classes/JShareApi.html +1 -1
  20. package/documentation/classes/JTaxonomyApi.html +2 -2
  21. package/documentation/classes/JUserApi.html +4 -4
  22. package/documentation/classes/JWedocApi.html +1 -1
  23. package/documentation/classes/JamespotUserApi.html +1 -1
  24. package/documentation/classes/Network.html +1 -1
  25. package/documentation/classes/TVDisplayApi.html +1 -1
  26. package/documentation/classes/WindowBrowser.html +1 -1
  27. package/documentation/enums/StudioApplicationStatus.html +1 -1
  28. package/documentation/index.html +1 -1
  29. package/documentation/interfaces/AccessRightObject.html +1 -1
  30. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  31. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  32. package/documentation/interfaces/ApiWrapper.html +1 -1
  33. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  34. package/documentation/interfaces/BaseMessage.html +1 -1
  35. package/documentation/interfaces/Category.html +1 -1
  36. package/documentation/interfaces/FileBankProps.html +1 -1
  37. package/documentation/interfaces/FolderProps.html +1 -1
  38. package/documentation/interfaces/ListFilterSpec.html +1 -1
  39. package/documentation/interfaces/OF.html +1 -1
  40. package/documentation/interfaces/ObjectListProps.html +1 -1
  41. package/documentation/interfaces/PagingResults.html +1 -1
  42. package/documentation/interfaces/RootFolderProps.html +1 -1
  43. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  44. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  45. package/documentation/interfaces/SearchConfig.html +1 -1
  46. package/documentation/interfaces/SearchFacetModel.html +1 -1
  47. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  48. package/documentation/interfaces/SearchQuery.html +1 -1
  49. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  50. package/documentation/interfaces/SearchQueryOption.html +1 -1
  51. package/documentation/interfaces/SearchQueryResult.html +1 -1
  52. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  53. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  54. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  55. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  56. package/documentation/interfaces/SpotProps.html +1 -1
  57. package/documentation/interfaces/Taxonomy.html +1 -1
  58. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  59. package/documentation/interfaces/WindowInterface.html +1 -1
  60. package/documentation/modules.html +9 -9
  61. package/lib/jamespot-user-api.js +1 -1
  62. package/lib/jamespot-user-api.js.map +1 -1
  63. package/lib/src/apis/file.d.ts +11 -6
  64. package/lib/src/types/file.d.ts +11 -0
  65. package/package.json +1 -1
@@ -1,24 +1,25 @@
1
- import { FileCropConfig, FileResponse, UploadConfig } from '../types';
1
+ import { ApiWrapper, FileCropConfig, FileResponse, JFileExtended, UploadConfig } from '../types';
2
2
  import { JBaseApi } from './base';
3
3
  export declare class JFileApi extends JBaseApi {
4
4
  /**
5
5
  * Upload a file to the server. use the same token to link the file to an article
6
6
  * @param config configuration object. One of "file" and "url" is mandatory
7
7
  */
8
- upload(config: UploadConfig): Promise<import("../types").ApiWrapper<FileResponse, import("../types").BaseMessages>>;
8
+ upload(config: UploadConfig): Promise<ApiWrapper<FileResponse, import("../types").BaseMessages>>;
9
9
  /**
10
10
  * Upload a list of files to the server. use the same token to link the file to an article
11
11
  * @param attrName file name (attachment, image, bannerImage, etc.)
12
12
  * @param files files
13
13
  * @param token token
14
14
  */
15
- uploadMany(configArray: Array<UploadConfig>): Promise<import("../types").ApiWrapper<FileResponse, import("../types").BaseMessages>[]>;
15
+ uploadMany(configArray: Array<UploadConfig>): Promise<ApiWrapper<FileResponse, import("../types").BaseMessages>[]>;
16
+ get<T extends JFileExtended>(idFile: number, format?: string): Promise<ApiWrapper<T>>;
16
17
  /**
17
18
  * Crop an image
18
19
  * @param config crop configuration
19
20
  * @returns
20
21
  */
21
- update(idFile: number | string, type: string, config: FileCropConfig): Promise<import("../types").ApiWrapper<FileResponse, import("../types").BaseMessages> | {
22
+ update(idFile: number | string, type: string, config: FileCropConfig): Promise<ApiWrapper<FileResponse, import("../types").BaseMessages> | {
22
23
  result: {
23
24
  crop: {
24
25
  width: any;
@@ -28,6 +29,10 @@ export declare class JFileApi extends JBaseApi {
28
29
  rotation: any;
29
30
  };
30
31
  id: string;
32
+ /**
33
+ * Upload a file to the server. use the same token to link the file to an article
34
+ * @param config configuration object. One of "file" and "url" is mandatory
35
+ */
31
36
  name: string;
32
37
  type: string;
33
38
  token?: string;
@@ -51,14 +56,14 @@ export declare class JFileApi extends JBaseApi {
51
56
  * @param token token
52
57
  * @returns
53
58
  */
54
- deleteFile(idFile: number | string, attrName: string, token: string, signal?: AbortSignal): Promise<import("../types").ApiWrapper<"", import("../types").BaseMessages>>;
59
+ deleteFile(idFile: number | string, attrName: string, token: string, signal?: AbortSignal): Promise<ApiWrapper<"", import("../types").BaseMessages>>;
55
60
  /**
56
61
  * delete the image associated with a content. This action is permanent. There is no two step process with a token
57
62
  * @param id content id
58
63
  * @param type content type
59
64
  * @returns
60
65
  */
61
- deleteImage(id: number | string, type: string): Promise<import("../types").ApiWrapper<{
66
+ deleteImage(id: number | string, type: string): Promise<ApiWrapper<{
62
67
  id: number;
63
68
  }, import("../types").BaseMessages>>;
64
69
  }
@@ -33,3 +33,14 @@ export declare type jFileLittle = Readable<Omit<jObjectLittle, 'dateModified'> &
33
33
  dateCreation: string;
34
34
  dateModified: string | null;
35
35
  }>;
36
+ export declare type jFileRendition = {
37
+ name: string;
38
+ filename: string;
39
+ dateModified: string;
40
+ mimetype: string;
41
+ };
42
+ export declare type JFileExtended = jFileLittle & {
43
+ meta?: string;
44
+ _renditions: string[];
45
+ _renditionsData: Record<string, jFileRendition>;
46
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.113",
3
+ "version": "1.0.114",
4
4
  "scripts": {
5
5
  "build": "npx webpack --env NODE_ENV=production",
6
6
  "build-dev-vm": "npx webpack --env NODE_ENV=development --env NODE_BUILD=VM",