@hubs101/js-api-skd-client 1.0.10451 → 1.0.10453
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/lib/api/event/index.d.ts +1 -1
- package/lib/api/event/index.js +3 -3
- package/lib/index.js +2 -2
- package/lib/types/base.d.ts +2 -2
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -124,5 +124,5 @@ export declare const _deletePortfolioBlogPage: (basePath: string, token: string,
|
|
|
124
124
|
export declare const _fetchMediaDirectories: (basePath: string, token: string, accountId: string, path: string) => Promise<Directory>;
|
|
125
125
|
export declare const _fetchMediaDirectoryFiles: (basePath: string, token: string, accountId: string, path: string) => Promise<DirectoryFiles>;
|
|
126
126
|
export declare const _fetchMediaFileDetails: (basePath: string, token: string, accountId: string, filepath: string) => Promise<FileDetails>;
|
|
127
|
-
export declare const _uploadImageToFolder: (basePath: string, token: string, accountId: string, folderPath: string, file: any) => Promise<APIResponse>;
|
|
127
|
+
export declare const _uploadImageToFolder: (basePath: string, token: string, accountId: string, folderPath: string, file: any, data: any) => Promise<APIResponse>;
|
|
128
128
|
export declare const _renameFolder: (basePath: string, token: string, accountId: string, path: string, name_old: string, name_new: string) => Promise<APIResponse>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -650,10 +650,10 @@ const _fetchMediaFileDetails = (basePath, token, accountId, filepath) => __await
|
|
|
650
650
|
return (data === null || data === void 0 ? void 0 : data.data) || data;
|
|
651
651
|
});
|
|
652
652
|
exports._fetchMediaFileDetails = _fetchMediaFileDetails;
|
|
653
|
-
const _uploadImageToFolder = (basePath, token, accountId, folderPath, file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
653
|
+
const _uploadImageToFolder = (basePath, token, accountId, folderPath, file, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
654
654
|
const base = (0, base_1.getBasePath)(basePath);
|
|
655
|
-
const {
|
|
656
|
-
return (
|
|
655
|
+
const { response } = yield (0, api_1.postFilesAndDataRequest)(`${base.ACCOUNTS}/media/${accountId}/file?path=${folderPath}`, data, file, token);
|
|
656
|
+
return (response === null || response === void 0 ? void 0 : response.data) || response;
|
|
657
657
|
});
|
|
658
658
|
exports._uploadImageToFolder = _uploadImageToFolder;
|
|
659
659
|
const _renameFolder = (basePath, token, accountId, path, name_old, name_new) => __awaiter(void 0, void 0, void 0, function* () {
|
package/lib/index.js
CHANGED
|
@@ -933,9 +933,9 @@ function EventAPIProvider(props) {
|
|
|
933
933
|
(0, api_1.validateConfig)(config);
|
|
934
934
|
return (0, event_1._fetchMediaFileDetails)(config.baseUrl, config.token, accountId, path);
|
|
935
935
|
}), [config, config.baseUrl, config.token]);
|
|
936
|
-
const uploadImageToFolder = react_1.default.useCallback((accountId, folderPath, file) => __awaiter(this, void 0, void 0, function* () {
|
|
936
|
+
const uploadImageToFolder = react_1.default.useCallback((accountId, folderPath, file, data) => __awaiter(this, void 0, void 0, function* () {
|
|
937
937
|
(0, api_1.validateConfig)(config);
|
|
938
|
-
return (0, event_1._uploadImageToFolder)(config.baseUrl, config.token, accountId, folderPath, file);
|
|
938
|
+
return (0, event_1._uploadImageToFolder)(config.baseUrl, config.token, accountId, folderPath, file, data);
|
|
939
939
|
}), [config, config.baseUrl, config.token]);
|
|
940
940
|
const renameFolder = react_1.default.useCallback((accountId, path, name_old, name_new) => __awaiter(this, void 0, void 0, function* () {
|
|
941
941
|
(0, api_1.validateConfig)(config);
|
package/lib/types/base.d.ts
CHANGED
|
@@ -315,7 +315,7 @@ export type BaseAPIType = {
|
|
|
315
315
|
fetchMediaDirectories: (basePath: string, token: string, accountId: string, path: string) => Promise<Directory>;
|
|
316
316
|
fetchMediaDirectoryFiles: (basePath: string, token: string, accountId: string, path: string) => Promise<DirectoryFiles>;
|
|
317
317
|
fetchMediaFileDetails: (basePath: string, token: string, accountId: string, filepath: string) => Promise<FileDetails>;
|
|
318
|
-
uploadImageToFolder: (basePath: string, token: string, accountId: string, folderPath: string, file: any) => Promise<APIResponse>;
|
|
318
|
+
uploadImageToFolder: (basePath: string, token: string, accountId: string, folderPath: string, file: any, data: any) => Promise<APIResponse>;
|
|
319
319
|
renameFolder: (basePath: string, token: string, accountId: string, path: string, name_old: string, name_new: string) => Promise<APIResponse>;
|
|
320
320
|
};
|
|
321
321
|
export type EventAPIType = {
|
|
@@ -560,7 +560,7 @@ export type EventAPIType = {
|
|
|
560
560
|
fetchMediaDirectories: (accountId: string, path: string) => Promise<Directory>;
|
|
561
561
|
fetchMediaDirectoryFiles: (accountId: string, path: string) => Promise<DirectoryFiles>;
|
|
562
562
|
fetchMediaFileDetails: (accountId: string, filepath: string) => Promise<FileDetails>;
|
|
563
|
-
uploadImageToFolder: (accountId: string, folderPath: string, file: any) => Promise<APIResponse>;
|
|
563
|
+
uploadImageToFolder: (accountId: string, folderPath: string, file: any, data: any) => Promise<APIResponse>;
|
|
564
564
|
renameFolder: (accountId: string, path: string, name_old: string, name_new: string) => Promise<APIResponse>;
|
|
565
565
|
};
|
|
566
566
|
export type BaseAPIConfigType = {
|