@abyss-project/storage 1.0.0
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/.eslintrc.js +34 -0
- package/README.md +2 -0
- package/dist/api/abyss.admin.api.d.ts +2 -0
- package/dist/api/abyss.admin.api.js +8 -0
- package/dist/api/application-file-thumbnail.admin.api.d.ts +9 -0
- package/dist/api/application-file-thumbnail.admin.api.js +36 -0
- package/dist/api/application-file-thumbnail.api.d.ts +15 -0
- package/dist/api/application-file-thumbnail.api.js +64 -0
- package/dist/api/application-file.admin.api.d.ts +22 -0
- package/dist/api/application-file.admin.api.js +88 -0
- package/dist/api/application-file.api.d.ts +40 -0
- package/dist/api/application-file.api.js +177 -0
- package/dist/api/application-webhook-history.admin.api.d.ts +3 -0
- package/dist/api/application-webhook-history.admin.api.js +12 -0
- package/dist/api/application-webhook-history.api.d.ts +3 -0
- package/dist/api/application-webhook-history.api.js +12 -0
- package/dist/api/application-webhook.admin.api.d.ts +7 -0
- package/dist/api/application-webhook.admin.api.js +28 -0
- package/dist/api/application-webhook.api.d.ts +7 -0
- package/dist/api/application-webhook.api.js +28 -0
- package/dist/api/application.admin.api.d.ts +6 -0
- package/dist/api/application.admin.api.js +24 -0
- package/dist/api/application.api.d.ts +3 -0
- package/dist/api/application.api.js +12 -0
- package/dist/api/collection.api.d.ts +3 -0
- package/dist/api/collection.api.js +12 -0
- package/dist/api/generics/download.request.d.ts +2 -0
- package/dist/api/generics/download.request.js +10 -0
- package/dist/api/generics/index.d.ts +2 -0
- package/dist/api/generics/index.js +18 -0
- package/dist/api/generics/upload.request.d.ts +3 -0
- package/dist/api/generics/upload.request.js +10 -0
- package/dist/api/index.d.ts +15 -0
- package/dist/api/index.js +31 -0
- package/dist/api/logger.admin.api.d.ts +3 -0
- package/dist/api/logger.admin.api.js +14 -0
- package/dist/api/monitor.api.d.ts +2 -0
- package/dist/api/monitor.api.js +8 -0
- package/dist/api/picture-collection.api.d.ts +2 -0
- package/dist/api/picture-collection.api.js +10 -0
- package/dist/api/storage.admin.api.d.ts +4 -0
- package/dist/api/storage.admin.api.js +16 -0
- package/dist/api/stream-media.admin.api.d.ts +7 -0
- package/dist/api/stream-media.admin.api.js +35 -0
- package/dist/api/stream-media.api.d.ts +4 -0
- package/dist/api/stream-media.api.js +18 -0
- package/dist/api/user-application-file-thumbnail.admin.api.d.ts +9 -0
- package/dist/api/user-application-file-thumbnail.admin.api.js +36 -0
- package/dist/api/user-application-file-thumbnail.api.d.ts +10 -0
- package/dist/api/user-application-file-thumbnail.api.js +46 -0
- package/dist/api/user-application-file.admin.api.d.ts +15 -0
- package/dist/api/user-application-file.admin.api.js +62 -0
- package/dist/api/user-application-file.api.d.ts +31 -0
- package/dist/api/user-application-file.api.js +134 -0
- package/dist/api/user-application-webhook-history.admin.api.d.ts +3 -0
- package/dist/api/user-application-webhook-history.admin.api.js +12 -0
- package/dist/api/user-application-webhook-history.api.d.ts +3 -0
- package/dist/api/user-application-webhook-history.api.js +12 -0
- package/dist/api/user-application-webhook.admin.api.d.ts +7 -0
- package/dist/api/user-application-webhook.admin.api.js +28 -0
- package/dist/api/user-application-webhook.api.d.ts +7 -0
- package/dist/api/user-application-webhook.api.js +28 -0
- package/dist/api/user-application.admin.api.d.ts +7 -0
- package/dist/api/user-application.admin.api.js +28 -0
- package/dist/api/user-application.api.d.ts +5 -0
- package/dist/api/user-application.api.js +20 -0
- package/dist/api/user-file-thumbnail.admin.api.d.ts +9 -0
- package/dist/api/user-file-thumbnail.admin.api.js +36 -0
- package/dist/api/user-file-thumbnail.api.d.ts +10 -0
- package/dist/api/user-file-thumbnail.api.js +46 -0
- package/dist/api/user-file.admin.api.d.ts +15 -0
- package/dist/api/user-file.admin.api.js +62 -0
- package/dist/api/user-file.api.d.ts +29 -0
- package/dist/api/user-file.api.js +137 -0
- package/dist/api/user-webhook-history.admin.api.d.ts +3 -0
- package/dist/api/user-webhook-history.admin.api.js +12 -0
- package/dist/api/user-webhook-history.api.d.ts +3 -0
- package/dist/api/user-webhook-history.api.js +12 -0
- package/dist/api/user-webhook.admin.api.d.ts +7 -0
- package/dist/api/user-webhook.admin.api.js +28 -0
- package/dist/api/user-webhook.api.d.ts +7 -0
- package/dist/api/user-webhook.api.js +28 -0
- package/dist/api/user.admin.api.d.ts +5 -0
- package/dist/api/user.admin.api.js +23 -0
- package/dist/api/user.api.d.ts +4 -0
- package/dist/api/user.api.js +17 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +89 -0
- package/dist/types/enum/algorithm.enum.d.ts +3 -0
- package/dist/types/enum/algorithm.enum.js +7 -0
- package/dist/types/enum/api-error.enum.d.ts +31 -0
- package/dist/types/enum/api-error.enum.js +36 -0
- package/dist/types/enum/checksum-algorithm.enum.d.ts +5 -0
- package/dist/types/enum/checksum-algorithm.enum.js +9 -0
- package/dist/types/enum/index.d.ts +9 -0
- package/dist/types/enum/index.js +25 -0
- package/dist/types/enum/log-type.enum.d.ts +6 -0
- package/dist/types/enum/log-type.enum.js +10 -0
- package/dist/types/enum/mime-type-thumbnail.enum.d.ts +15 -0
- package/dist/types/enum/mime-type-thumbnail.enum.js +20 -0
- package/dist/types/enum/picture-collection-source.enum.d.ts +3 -0
- package/dist/types/enum/picture-collection-source.enum.js +7 -0
- package/dist/types/enum/picture-collection-type.enum.d.ts +3 -0
- package/dist/types/enum/picture-collection-type.enum.js +7 -0
- package/dist/types/enum/pre-sign-url-type.enum.d.ts +5 -0
- package/dist/types/enum/pre-sign-url-type.enum.js +9 -0
- package/dist/types/enum/stream-media-type.enum.d.ts +4 -0
- package/dist/types/enum/stream-media-type.enum.js +8 -0
- package/dist/types/enum/webhook-type.enum.d.ts +5 -0
- package/dist/types/enum/webhook-type.enum.js +9 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +19 -0
- package/dist/types/interface/api/index.d.ts +32 -0
- package/dist/types/interface/api/index.js +48 -0
- package/dist/types/interface/api/requests/abyss.admin.request.d.ts +4 -0
- package/dist/types/interface/api/requests/abyss.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-file-thumbnail.admin.request.d.ts +37 -0
- package/dist/types/interface/api/requests/application-file-thumbnail.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-file-thumbnail.request.d.ts +56 -0
- package/dist/types/interface/api/requests/application-file-thumbnail.request.js +2 -0
- package/dist/types/interface/api/requests/application-file.admin.request.d.ts +144 -0
- package/dist/types/interface/api/requests/application-file.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-file.request.d.ts +228 -0
- package/dist/types/interface/api/requests/application-file.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook-history.admin.request.d.ts +14 -0
- package/dist/types/interface/api/requests/application-webhook-history.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook-history.request.d.ts +17 -0
- package/dist/types/interface/api/requests/application-webhook-history.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook.admin.request.d.ts +33 -0
- package/dist/types/interface/api/requests/application-webhook.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook.request.d.ts +43 -0
- package/dist/types/interface/api/requests/application-webhook.request.js +2 -0
- package/dist/types/interface/api/requests/application.admin.request.d.ts +16 -0
- package/dist/types/interface/api/requests/application.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application.request.d.ts +7 -0
- package/dist/types/interface/api/requests/application.request.js +2 -0
- package/dist/types/interface/api/requests/collection.request.d.ts +10 -0
- package/dist/types/interface/api/requests/collection.request.js +2 -0
- package/dist/types/interface/api/requests/logger.admin.request.d.ts +10 -0
- package/dist/types/interface/api/requests/logger.admin.request.js +2 -0
- package/dist/types/interface/api/requests/picture-collection.request.d.ts +3 -0
- package/dist/types/interface/api/requests/picture-collection.request.js +2 -0
- package/dist/types/interface/api/requests/storage.admin.request.d.ts +3 -0
- package/dist/types/interface/api/requests/storage.admin.request.js +2 -0
- package/dist/types/interface/api/requests/stream-media.admin.request.d.ts +28 -0
- package/dist/types/interface/api/requests/stream-media.admin.request.js +2 -0
- package/dist/types/interface/api/requests/stream-media.request.d.ts +12 -0
- package/dist/types/interface/api/requests/stream-media.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-file-thumbnail.admin.request.d.ts +35 -0
- package/dist/types/interface/api/requests/user-application-file-thumbnail.admin.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-file-thumbnail.request.d.ts +50 -0
- package/dist/types/interface/api/requests/user-application-file-thumbnail.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-file.admin.request.d.ts +90 -0
- package/dist/types/interface/api/requests/user-application-file.admin.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-file.request.d.ts +141 -0
- package/dist/types/interface/api/requests/user-application-file.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-webhook-history.admin.request.d.ts +14 -0
- package/dist/types/interface/api/requests/user-application-webhook-history.admin.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-webhook-history.request.d.ts +17 -0
- package/dist/types/interface/api/requests/user-application-webhook-history.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-webhook.admin.request.d.ts +33 -0
- package/dist/types/interface/api/requests/user-application-webhook.admin.request.js +2 -0
- package/dist/types/interface/api/requests/user-application-webhook.request.d.ts +43 -0
- package/dist/types/interface/api/requests/user-application-webhook.request.js +2 -0
- package/dist/types/interface/api/requests/user-application.admin.request.d.ts +18 -0
- package/dist/types/interface/api/requests/user-application.admin.request.js +2 -0
- package/dist/types/interface/api/requests/user-application.request.d.ts +12 -0
- package/dist/types/interface/api/requests/user-application.request.js +2 -0
- package/dist/types/interface/api/requests/user.admin.request.d.ts +21 -0
- package/dist/types/interface/api/requests/user.admin.request.js +2 -0
- package/dist/types/interface/api/requests/user.request.d.ts +3 -0
- package/dist/types/interface/api/requests/user.request.js +2 -0
- package/dist/types/interface/api/responses/abyss.admin.response.d.ts +6 -0
- package/dist/types/interface/api/responses/abyss.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-file-thumbnail.admin.response.d.ts +30 -0
- package/dist/types/interface/api/responses/application-file-thumbnail.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-file-thumbnail.response.d.ts +35 -0
- package/dist/types/interface/api/responses/application-file-thumbnail.response.js +2 -0
- package/dist/types/interface/api/responses/application-file.admin.response.d.ts +80 -0
- package/dist/types/interface/api/responses/application-file.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-file.response.d.ts +95 -0
- package/dist/types/interface/api/responses/application-file.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook-history.admin.response.d.ts +7 -0
- package/dist/types/interface/api/responses/application-webhook-history.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook-history.response.d.ts +7 -0
- package/dist/types/interface/api/responses/application-webhook-history.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook.admin.response.d.ts +21 -0
- package/dist/types/interface/api/responses/application-webhook.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook.response.d.ts +21 -0
- package/dist/types/interface/api/responses/application-webhook.response.js +2 -0
- package/dist/types/interface/api/responses/application.admin.response.d.ts +33 -0
- package/dist/types/interface/api/responses/application.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application.response.d.ts +14 -0
- package/dist/types/interface/api/responses/application.response.js +2 -0
- package/dist/types/interface/api/responses/collection.response.d.ts +43 -0
- package/dist/types/interface/api/responses/collection.response.js +2 -0
- package/dist/types/interface/api/responses/logger.admin.response.d.ts +7 -0
- package/dist/types/interface/api/responses/logger.admin.response.js +2 -0
- package/dist/types/interface/api/responses/monitor.response.d.ts +7 -0
- package/dist/types/interface/api/responses/monitor.response.js +2 -0
- package/dist/types/interface/api/responses/picture-collection.response.d.ts +17 -0
- package/dist/types/interface/api/responses/picture-collection.response.js +2 -0
- package/dist/types/interface/api/responses/storage.admin.response.d.ts +5 -0
- package/dist/types/interface/api/responses/storage.admin.response.js +2 -0
- package/dist/types/interface/api/responses/stream-media.admin.response.d.ts +20 -0
- package/dist/types/interface/api/responses/stream-media.admin.response.js +2 -0
- package/dist/types/interface/api/responses/stream-media.response.d.ts +9 -0
- package/dist/types/interface/api/responses/stream-media.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-file-thumbnail.admin.response.d.ts +30 -0
- package/dist/types/interface/api/responses/user-application-file-thumbnail.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-file-thumbnail.response.d.ts +33 -0
- package/dist/types/interface/api/responses/user-application-file-thumbnail.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-file.admin.response.d.ts +57 -0
- package/dist/types/interface/api/responses/user-application-file.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-file.response.d.ts +70 -0
- package/dist/types/interface/api/responses/user-application-file.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-webhook-history.admin.response.d.ts +7 -0
- package/dist/types/interface/api/responses/user-application-webhook-history.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-webhook-history.response.d.ts +7 -0
- package/dist/types/interface/api/responses/user-application-webhook-history.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-webhook.admin.response.d.ts +21 -0
- package/dist/types/interface/api/responses/user-application-webhook.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user-application-webhook.response.d.ts +21 -0
- package/dist/types/interface/api/responses/user-application-webhook.response.js +2 -0
- package/dist/types/interface/api/responses/user-application.admin.response.d.ts +25 -0
- package/dist/types/interface/api/responses/user-application.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user-application.response.d.ts +19 -0
- package/dist/types/interface/api/responses/user-application.response.js +2 -0
- package/dist/types/interface/api/responses/user.admin.response.d.ts +15 -0
- package/dist/types/interface/api/responses/user.admin.response.js +2 -0
- package/dist/types/interface/api/responses/user.response.d.ts +13 -0
- package/dist/types/interface/api/responses/user.response.js +2 -0
- package/dist/types/interface/api/type-message/api-error.d.ts +8 -0
- package/dist/types/interface/api/type-message/api-error.js +2 -0
- package/dist/types/interface/api/type-message/base-order.d.ts +4 -0
- package/dist/types/interface/api/type-message/base-order.js +2 -0
- package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -0
- package/dist/types/interface/api/type-message/base-paginate.js +2 -0
- package/dist/types/interface/api/type-message/response.d.ts +5 -0
- package/dist/types/interface/api/type-message/response.js +2 -0
- package/dist/types/interface/dto/archive.d.ts +34 -0
- package/dist/types/interface/dto/archive.js +2 -0
- package/dist/types/interface/dto/index.d.ts +3 -0
- package/dist/types/interface/dto/index.js +19 -0
- package/dist/types/interface/dto/metadata.d.ts +13 -0
- package/dist/types/interface/dto/metadata.js +2 -0
- package/dist/types/interface/dto/webhooks.d.ts +29 -0
- package/dist/types/interface/dto/webhooks.js +2 -0
- package/dist/types/interface/index.d.ts +9 -0
- package/dist/types/interface/index.js +25 -0
- package/dist/types/interface/models/application-file-thumbnail.model.d.ts +15 -0
- package/dist/types/interface/models/application-file-thumbnail.model.js +2 -0
- package/dist/types/interface/models/application-file.model.d.ts +28 -0
- package/dist/types/interface/models/application-file.model.js +2 -0
- package/dist/types/interface/models/application-webhook-history.model.d.ts +16 -0
- package/dist/types/interface/models/application-webhook-history.model.js +2 -0
- package/dist/types/interface/models/application-webhook.model.d.ts +17 -0
- package/dist/types/interface/models/application-webhook.model.js +2 -0
- package/dist/types/interface/models/application.model.d.ts +12 -0
- package/dist/types/interface/models/application.model.js +2 -0
- package/dist/types/interface/models/log-console.model.d.ts +17 -0
- package/dist/types/interface/models/log-console.model.js +2 -0
- package/dist/types/interface/models/log-endpoint.model.d.ts +22 -0
- package/dist/types/interface/models/log-endpoint.model.js +2 -0
- package/dist/types/interface/models/picture-collection.model.d.ts +17 -0
- package/dist/types/interface/models/picture-collection.model.js +2 -0
- package/dist/types/interface/models/pre-sign-url.model.d.ts +11 -0
- package/dist/types/interface/models/pre-sign-url.model.js +2 -0
- package/dist/types/interface/models/stream-media.model.d.ts +9 -0
- package/dist/types/interface/models/stream-media.model.js +2 -0
- package/dist/types/interface/models/user-application-file-thumbnail.model.d.ts +14 -0
- package/dist/types/interface/models/user-application-file-thumbnail.model.js +2 -0
- package/dist/types/interface/models/user-application-file.model.d.ts +20 -0
- package/dist/types/interface/models/user-application-file.model.js +2 -0
- package/dist/types/interface/models/user-application-webhook-history.model.d.ts +16 -0
- package/dist/types/interface/models/user-application-webhook-history.model.js +2 -0
- package/dist/types/interface/models/user-application-webhook.model.d.ts +17 -0
- package/dist/types/interface/models/user-application-webhook.model.js +2 -0
- package/dist/types/interface/models/user-application.model.d.ts +15 -0
- package/dist/types/interface/models/user-application.model.js +2 -0
- package/dist/types/interface/models/user.model.d.ts +8 -0
- package/dist/types/interface/models/user.model.js +2 -0
- package/dist/types/models/index.d.ts +1 -0
- package/dist/types/models/index.js +17 -0
- package/dist/types/models/transfer.model.d.ts +36 -0
- package/dist/types/models/transfer.model.js +73 -0
- package/dist/utils/error.utils.d.ts +15 -0
- package/dist/utils/error.utils.js +24 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +17 -0
- package/package.json +50 -0
- package/tsconfig.json +105 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.downloadWithPublicAccessUserApplicationFile = exports.downloadUserApplicationFile = exports.writeUserApplicationFile = exports.uploadUserApplicationFile = exports.getPreSignedUrlUserApplicationFile = exports.decryptUserApplicationFile = exports.encryptUserApplicationFile = exports.unsetPublicAccessUserApplicationFile = exports.resetPublicAccessUserApplicationFile = exports.updateUserApplicationFile = exports.duplicateMultipleUserApplicationFile = exports.duplicateUserApplicationFile = exports.compressArchiveUserApplicationFile = exports.extractArchiveUserApplicationFile = exports.deleteMultipleUserApplicationFile = exports.deleteUserApplicationFile = exports.getUserApplicationFile = exports.paginateUserApplicationFile = exports.PUBLIC_ACCESS_PASSWORD_HEADER_NAME = void 0;
|
|
7
|
+
const __1 = require("..");
|
|
8
|
+
const generics_1 = require("./generics");
|
|
9
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
10
|
+
const abyss_core_1 = require("abyss_core");
|
|
11
|
+
exports.PUBLIC_ACCESS_PASSWORD_HEADER_NAME = 'user-file-public-access-password';
|
|
12
|
+
const paginateUserApplicationFile = async (query) => {
|
|
13
|
+
return (await __1.AbyssStorageCore.axios.get(`user/user-file/paginate`, { params: query })).data;
|
|
14
|
+
};
|
|
15
|
+
exports.paginateUserApplicationFile = paginateUserApplicationFile;
|
|
16
|
+
const getUserApplicationFile = async (params) => {
|
|
17
|
+
return (await __1.AbyssStorageCore.axios.get(`user/user-file/${params.userApplicationFileId}`)).data;
|
|
18
|
+
};
|
|
19
|
+
exports.getUserApplicationFile = getUserApplicationFile;
|
|
20
|
+
const deleteUserApplicationFile = async (params) => {
|
|
21
|
+
return (await __1.AbyssStorageCore.axios.delete(`user/user-file/${params.userApplicationFileId}`)).data;
|
|
22
|
+
};
|
|
23
|
+
exports.deleteUserApplicationFile = deleteUserApplicationFile;
|
|
24
|
+
const deleteMultipleUserApplicationFile = async (body) => {
|
|
25
|
+
return (await __1.AbyssStorageCore.axios.delete(`user/user-file`, { data: body })).data;
|
|
26
|
+
};
|
|
27
|
+
exports.deleteMultipleUserApplicationFile = deleteMultipleUserApplicationFile;
|
|
28
|
+
const extractArchiveUserApplicationFile = async (params, query) => {
|
|
29
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/${params.userApplicationFileId}/extract`, { params: query })).data;
|
|
30
|
+
};
|
|
31
|
+
exports.extractArchiveUserApplicationFile = extractArchiveUserApplicationFile;
|
|
32
|
+
const compressArchiveUserApplicationFile = async (body, query) => {
|
|
33
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/compress`, {
|
|
34
|
+
params: query,
|
|
35
|
+
body,
|
|
36
|
+
})).data;
|
|
37
|
+
};
|
|
38
|
+
exports.compressArchiveUserApplicationFile = compressArchiveUserApplicationFile;
|
|
39
|
+
const duplicateUserApplicationFile = async (params, body) => {
|
|
40
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/${params.userApplicationFileId}/duplicate`, body)).data;
|
|
41
|
+
};
|
|
42
|
+
exports.duplicateUserApplicationFile = duplicateUserApplicationFile;
|
|
43
|
+
const duplicateMultipleUserApplicationFile = async (body) => {
|
|
44
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/duplicate-multiple`, body)).data;
|
|
45
|
+
};
|
|
46
|
+
exports.duplicateMultipleUserApplicationFile = duplicateMultipleUserApplicationFile;
|
|
47
|
+
const updateUserApplicationFile = async (params, body) => {
|
|
48
|
+
return (await __1.AbyssStorageCore.axios.put(`user/user-file/${params.userApplicationFileId}`, body)).data;
|
|
49
|
+
};
|
|
50
|
+
exports.updateUserApplicationFile = updateUserApplicationFile;
|
|
51
|
+
const resetPublicAccessUserApplicationFile = async (params) => {
|
|
52
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/${params.userApplicationFileId}/reset-public-access`)).data;
|
|
53
|
+
};
|
|
54
|
+
exports.resetPublicAccessUserApplicationFile = resetPublicAccessUserApplicationFile;
|
|
55
|
+
const unsetPublicAccessUserApplicationFile = async (params) => {
|
|
56
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/${params.userApplicationFileId}/unset-public-access`)).data;
|
|
57
|
+
};
|
|
58
|
+
exports.unsetPublicAccessUserApplicationFile = unsetPublicAccessUserApplicationFile;
|
|
59
|
+
const encryptUserApplicationFile = async (params, body) => {
|
|
60
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/${params.userApplicationFileId}/encrypt`, body)).data;
|
|
61
|
+
};
|
|
62
|
+
exports.encryptUserApplicationFile = encryptUserApplicationFile;
|
|
63
|
+
const decryptUserApplicationFile = async (params, body) => {
|
|
64
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/${params.userApplicationFileId}/decrypt`, body)).data;
|
|
65
|
+
};
|
|
66
|
+
exports.decryptUserApplicationFile = decryptUserApplicationFile;
|
|
67
|
+
const getPreSignedUrlUserApplicationFile = async (body) => {
|
|
68
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-file/pre-signed-url`, body)).data;
|
|
69
|
+
};
|
|
70
|
+
exports.getPreSignedUrlUserApplicationFile = getPreSignedUrlUserApplicationFile;
|
|
71
|
+
const uploadUserApplicationFile = async (params, query, file, options) => {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
const form = new form_data_1.default();
|
|
74
|
+
form.append('file', file);
|
|
75
|
+
const result = (await (0, generics_1.upload)(`user/user-file/upload/${params.token}`, form, {
|
|
76
|
+
params: query,
|
|
77
|
+
timeout: 0,
|
|
78
|
+
cancelToken: (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.cancelTokenSource.token,
|
|
79
|
+
onUploadProgress: (event) => { var _a; return (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.onProgress(event); },
|
|
80
|
+
}, __1.AbyssStorageCore.axios)).data;
|
|
81
|
+
if ((options === null || options === void 0 ? void 0 : options.transfer) && ((_b = options.transfer) === null || _b === void 0 ? void 0 : _b.state) === abyss_core_1.TransferState.STARTING) {
|
|
82
|
+
options.transfer.completeEmptyDownload();
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
};
|
|
86
|
+
exports.uploadUserApplicationFile = uploadUserApplicationFile;
|
|
87
|
+
const writeUserApplicationFile = async (params, query, file, options) => {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
const form = new form_data_1.default();
|
|
90
|
+
form.append('file', file);
|
|
91
|
+
const result = (await (0, generics_1.upload)(`user/user-file/write/${params.token}`, form, {
|
|
92
|
+
params: query,
|
|
93
|
+
timeout: 0,
|
|
94
|
+
cancelToken: (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.cancelTokenSource.token,
|
|
95
|
+
onUploadProgress: (event) => { var _a; return (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.onProgress(event); },
|
|
96
|
+
}, __1.AbyssStorageCore.axios)).data;
|
|
97
|
+
if ((options === null || options === void 0 ? void 0 : options.transfer) && ((_b = options.transfer) === null || _b === void 0 ? void 0 : _b.state) === abyss_core_1.TransferState.STARTING) {
|
|
98
|
+
options.transfer.completeEmptyDownload();
|
|
99
|
+
}
|
|
100
|
+
return result;
|
|
101
|
+
};
|
|
102
|
+
exports.writeUserApplicationFile = writeUserApplicationFile;
|
|
103
|
+
const downloadUserApplicationFile = async (params, options) => {
|
|
104
|
+
var _a, _b, _c;
|
|
105
|
+
const response = await (0, generics_1.download)(`user/user-file/download/${params.token}`, {
|
|
106
|
+
timeout: 0,
|
|
107
|
+
cancelToken: (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.cancelTokenSource.token,
|
|
108
|
+
onDownloadProgress: (event) => { var _a; return (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.onProgress(event); },
|
|
109
|
+
}, __1.AbyssStorageCore.axios);
|
|
110
|
+
if ((options === null || options === void 0 ? void 0 : options.transfer) && ((_b = options.transfer) === null || _b === void 0 ? void 0 : _b.state) === abyss_core_1.TransferState.STARTING) {
|
|
111
|
+
options.transfer.completeEmptyDownload();
|
|
112
|
+
}
|
|
113
|
+
if ((_c = response.headers['content-type']) === null || _c === void 0 ? void 0 : _c.includes('application/json')) {
|
|
114
|
+
response.data = JSON.parse(Buffer.from(response.data).toString('utf8'));
|
|
115
|
+
}
|
|
116
|
+
return response.data;
|
|
117
|
+
};
|
|
118
|
+
exports.downloadUserApplicationFile = downloadUserApplicationFile;
|
|
119
|
+
const downloadWithPublicAccessUserApplicationFile = async (params, password, options) => {
|
|
120
|
+
var _a, _b, _c;
|
|
121
|
+
const response = await (0, generics_1.download)(`user/user-file/download/public-access/${params.publicAccessId}`, {
|
|
122
|
+
timeout: 0,
|
|
123
|
+
cancelToken: (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.cancelTokenSource.token,
|
|
124
|
+
onDownloadProgress: (event) => { var _a; return (_a = options === null || options === void 0 ? void 0 : options.transfer) === null || _a === void 0 ? void 0 : _a.onProgress(event); },
|
|
125
|
+
headers: {
|
|
126
|
+
...(password ? { [exports.PUBLIC_ACCESS_PASSWORD_HEADER_NAME]: password } : {}),
|
|
127
|
+
},
|
|
128
|
+
}, __1.AbyssStorageCore.axios);
|
|
129
|
+
if ((options === null || options === void 0 ? void 0 : options.transfer) && ((_b = options.transfer) === null || _b === void 0 ? void 0 : _b.state) === abyss_core_1.TransferState.STARTING) {
|
|
130
|
+
options.transfer.completeEmptyDownload();
|
|
131
|
+
}
|
|
132
|
+
if ((_c = response.headers['content-type']) === null || _c === void 0 ? void 0 : _c.includes('application/json')) {
|
|
133
|
+
response.data = JSON.parse(Buffer.from(response.data).toString('utf8'));
|
|
134
|
+
}
|
|
135
|
+
return response.data;
|
|
136
|
+
};
|
|
137
|
+
exports.downloadWithPublicAccessUserApplicationFile = downloadWithPublicAccessUserApplicationFile;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IGetUserApplicationWebhookHistoryAdminParams, IGetUserApplicationWebhookHistoryAdminResponse, IPaginateUserApplicationWebhookHistoryAdminQuery, IPaginateUserApplicationWebhookHistoryAdminResponse } from '../types';
|
|
2
|
+
export declare const getUserApplicationWebhookHistoryAdmin: (params: IGetUserApplicationWebhookHistoryAdminParams) => Promise<IGetUserApplicationWebhookHistoryAdminResponse>;
|
|
3
|
+
export declare const paginateUserApplicationWebhookHistoryAdmin: (query: IPaginateUserApplicationWebhookHistoryAdminQuery) => Promise<IPaginateUserApplicationWebhookHistoryAdminResponse>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateUserApplicationWebhookHistoryAdmin = exports.getUserApplicationWebhookHistoryAdmin = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getUserApplicationWebhookHistoryAdmin = async (params) => {
|
|
6
|
+
return (await __1.AbyssStorageCore.axios.get(`user-application-webhook-history/admin/${params.userApplicationWebhookHistoryId}`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getUserApplicationWebhookHistoryAdmin = getUserApplicationWebhookHistoryAdmin;
|
|
9
|
+
const paginateUserApplicationWebhookHistoryAdmin = async (query) => {
|
|
10
|
+
return (await __1.AbyssStorageCore.axios.get(`user-application-webhook-history/admin/paginate`, { params: query })).data;
|
|
11
|
+
};
|
|
12
|
+
exports.paginateUserApplicationWebhookHistoryAdmin = paginateUserApplicationWebhookHistoryAdmin;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IGetUserApplicationWebhookHistoryParams, IGetUserApplicationWebhookHistoryResponse, IPaginateUserApplicationWebhookHistoryQuery, IPaginateUserApplicationWebhookHistoryResponse } from '../types';
|
|
2
|
+
export declare const getUserApplicationWebhookHistory: (params: IGetUserApplicationWebhookHistoryParams) => Promise<IGetUserApplicationWebhookHistoryResponse>;
|
|
3
|
+
export declare const paginateUserApplicationWebhookHistory: (query: IPaginateUserApplicationWebhookHistoryQuery) => Promise<IPaginateUserApplicationWebhookHistoryResponse>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateUserApplicationWebhookHistory = exports.getUserApplicationWebhookHistory = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getUserApplicationWebhookHistory = async (params) => {
|
|
6
|
+
return (await __1.AbyssStorageCore.axios.get(`user-application-webhook-history/${params.userApplicationWebhookHistoryId}`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getUserApplicationWebhookHistory = getUserApplicationWebhookHistory;
|
|
9
|
+
const paginateUserApplicationWebhookHistory = async (query) => {
|
|
10
|
+
return (await __1.AbyssStorageCore.axios.get(`user-application-webhook-history/paginate`, { params: query })).data;
|
|
11
|
+
};
|
|
12
|
+
exports.paginateUserApplicationWebhookHistory = paginateUserApplicationWebhookHistory;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ICreateUserApplicationWebhookAdminBody, ICreateUserApplicationWebhookAdminParams, ICreateUserApplicationWebhookAdminResponse, IDeleteUserApplicationWebhookAdminParams, IGetUserApplicationWebhookAdminParams, IGetUserApplicationWebhookAdminResponse, IPaginateUserApplicationWebhookAdminQuery, IPaginateUserApplicationWebhookAdminResponse, IResetSecretUserApplicationWebhookAdminParams, IResetSecretUserApplicationWebhookAdminResponse, IUpdateUserApplicationWebhookAdminBody, IUpdateUserApplicationWebhookAdminParams, IUpdateUserApplicationWebhookAdminResponse } from '..';
|
|
2
|
+
export declare const getUserApplicationWebhookAdmin: (params: IGetUserApplicationWebhookAdminParams) => Promise<IGetUserApplicationWebhookAdminResponse>;
|
|
3
|
+
export declare const deleteUserApplicationWebhookAdmin: (params: IDeleteUserApplicationWebhookAdminParams) => Promise<IGetUserApplicationWebhookAdminResponse>;
|
|
4
|
+
export declare const updateUserApplicationWebhookAdmin: (params: IUpdateUserApplicationWebhookAdminParams, body: IUpdateUserApplicationWebhookAdminBody) => Promise<IUpdateUserApplicationWebhookAdminResponse>;
|
|
5
|
+
export declare const resetResetSecretUserApplicationWebhookAdmin: (params: IResetSecretUserApplicationWebhookAdminParams) => Promise<IResetSecretUserApplicationWebhookAdminResponse>;
|
|
6
|
+
export declare const createUserApplicationWebhookAdmin: (params: ICreateUserApplicationWebhookAdminParams, body: ICreateUserApplicationWebhookAdminBody) => Promise<ICreateUserApplicationWebhookAdminResponse>;
|
|
7
|
+
export declare const paginateUserApplicationWebhookAdmin: (query: IPaginateUserApplicationWebhookAdminQuery) => Promise<IPaginateUserApplicationWebhookAdminResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateUserApplicationWebhookAdmin = exports.createUserApplicationWebhookAdmin = exports.resetResetSecretUserApplicationWebhookAdmin = exports.updateUserApplicationWebhookAdmin = exports.deleteUserApplicationWebhookAdmin = exports.getUserApplicationWebhookAdmin = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getUserApplicationWebhookAdmin = async (params) => {
|
|
6
|
+
return (await __1.AbyssStorageCore.axios.get(`admin/user/user-application/webhook/${params.userApplicationWebhookId}`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getUserApplicationWebhookAdmin = getUserApplicationWebhookAdmin;
|
|
9
|
+
const deleteUserApplicationWebhookAdmin = async (params) => {
|
|
10
|
+
return (await __1.AbyssStorageCore.axios.delete(`admin/user/user-application/webhook/${params.userApplicationWebhookId}`)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.deleteUserApplicationWebhookAdmin = deleteUserApplicationWebhookAdmin;
|
|
13
|
+
const updateUserApplicationWebhookAdmin = async (params, body) => {
|
|
14
|
+
return (await __1.AbyssStorageCore.axios.put(`admin/user/user-application/webhook/${params.userApplicationWebhookId}`, body)).data;
|
|
15
|
+
};
|
|
16
|
+
exports.updateUserApplicationWebhookAdmin = updateUserApplicationWebhookAdmin;
|
|
17
|
+
const resetResetSecretUserApplicationWebhookAdmin = async (params) => {
|
|
18
|
+
return (await __1.AbyssStorageCore.axios.post(`admin/user/user-application/webhook/${params.userApplicationWebhookId}/reset-secret`)).data;
|
|
19
|
+
};
|
|
20
|
+
exports.resetResetSecretUserApplicationWebhookAdmin = resetResetSecretUserApplicationWebhookAdmin;
|
|
21
|
+
const createUserApplicationWebhookAdmin = async (params, body) => {
|
|
22
|
+
return (await __1.AbyssStorageCore.axios.post(`admin/user/user-application/webhook`, body)).data;
|
|
23
|
+
};
|
|
24
|
+
exports.createUserApplicationWebhookAdmin = createUserApplicationWebhookAdmin;
|
|
25
|
+
const paginateUserApplicationWebhookAdmin = async (query) => {
|
|
26
|
+
return (await __1.AbyssStorageCore.axios.get(`admin/user/application/webhook/paginate`, { params: query })).data;
|
|
27
|
+
};
|
|
28
|
+
exports.paginateUserApplicationWebhookAdmin = paginateUserApplicationWebhookAdmin;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ICreateUserApplicationWebhookBody, ICreateUserApplicationWebhookResponse, IDeleteUserApplicationWebhookParams, IGetUserApplicationWebhookParams, IGetUserApplicationWebhookResponse, IPaginateUserApplicationWebhookQuery, IPaginateUserApplicationWebhookResponse, IResetSecretUserApplicationWebhookParams, IResetSecretUserApplicationWebhookResponse, IUpdateUserApplicationWebhookBody, IUpdateUserApplicationWebhookParams, IUpdateUserApplicationWebhookResponse } from '..';
|
|
2
|
+
export declare const getUserApplicationWebhook: (params: IGetUserApplicationWebhookParams) => Promise<IGetUserApplicationWebhookResponse>;
|
|
3
|
+
export declare const deleteUserApplicationWebhook: (params: IDeleteUserApplicationWebhookParams) => Promise<IGetUserApplicationWebhookResponse>;
|
|
4
|
+
export declare const updateUserApplicationWebhook: (params: IUpdateUserApplicationWebhookParams, body: IUpdateUserApplicationWebhookBody) => Promise<IUpdateUserApplicationWebhookResponse>;
|
|
5
|
+
export declare const resetResetSecretUserApplicationWebhook: (params: IResetSecretUserApplicationWebhookParams) => Promise<IResetSecretUserApplicationWebhookResponse>;
|
|
6
|
+
export declare const createUserApplicationWebhook: (body: ICreateUserApplicationWebhookBody) => Promise<ICreateUserApplicationWebhookResponse>;
|
|
7
|
+
export declare const paginateUserApplicationWebhook: (query: IPaginateUserApplicationWebhookQuery) => Promise<IPaginateUserApplicationWebhookResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateUserApplicationWebhook = exports.createUserApplicationWebhook = exports.resetResetSecretUserApplicationWebhook = exports.updateUserApplicationWebhook = exports.deleteUserApplicationWebhook = exports.getUserApplicationWebhook = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getUserApplicationWebhook = async (params) => {
|
|
6
|
+
return (await __1.AbyssStorageCore.axios.get(`user/user-webhook/${params.userApplicationWebhookId}`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getUserApplicationWebhook = getUserApplicationWebhook;
|
|
9
|
+
const deleteUserApplicationWebhook = async (params) => {
|
|
10
|
+
return (await __1.AbyssStorageCore.axios.delete(`user/user-webhook/${params.userApplicationWebhookId}`)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.deleteUserApplicationWebhook = deleteUserApplicationWebhook;
|
|
13
|
+
const updateUserApplicationWebhook = async (params, body) => {
|
|
14
|
+
return (await __1.AbyssStorageCore.axios.put(`user/user-webhook/${params.userApplicationWebhookId}`, body)).data;
|
|
15
|
+
};
|
|
16
|
+
exports.updateUserApplicationWebhook = updateUserApplicationWebhook;
|
|
17
|
+
const resetResetSecretUserApplicationWebhook = async (params) => {
|
|
18
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-webhook/${params.userApplicationWebhookId}/reset-secret`)).data;
|
|
19
|
+
};
|
|
20
|
+
exports.resetResetSecretUserApplicationWebhook = resetResetSecretUserApplicationWebhook;
|
|
21
|
+
const createUserApplicationWebhook = async (body) => {
|
|
22
|
+
return (await __1.AbyssStorageCore.axios.post(`user/user-webhook`, body)).data;
|
|
23
|
+
};
|
|
24
|
+
exports.createUserApplicationWebhook = createUserApplicationWebhook;
|
|
25
|
+
const paginateUserApplicationWebhook = async (query) => {
|
|
26
|
+
return (await __1.AbyssStorageCore.axios.get(`user/user-webhook/paginate`, { params: query })).data;
|
|
27
|
+
};
|
|
28
|
+
exports.paginateUserApplicationWebhook = paginateUserApplicationWebhook;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IGetUserAdminParams, IGetUserAdminResponse, IUpdateUserAdminParams, IUpdateUserAdminResponse, IUpdateUserAdminBody, IPaginateUserAdminResponse, IPaginateUserAdminQuery, IResetApiKeyUserAdminResponse, IResetApiKeyUserAdminParams } from '..';
|
|
2
|
+
export declare const getUserAdmin: (params: IGetUserAdminParams) => Promise<IGetUserAdminResponse>;
|
|
3
|
+
export declare const resetApiKeyUserAdmin: (params: IResetApiKeyUserAdminParams) => Promise<IResetApiKeyUserAdminResponse>;
|
|
4
|
+
export declare const paginateUserAdmin: (query: IPaginateUserAdminQuery) => Promise<IPaginateUserAdminResponse>;
|
|
5
|
+
export declare const updateUserAdmin: (params: IUpdateUserAdminParams, body: IUpdateUserAdminBody) => Promise<IUpdateUserAdminResponse>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateUserAdmin = exports.paginateUserAdmin = exports.resetApiKeyUserAdmin = exports.getUserAdmin = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getUserAdmin = async (params) => {
|
|
6
|
+
return (await __1.AbyssStorageCore.axios.get(`user/admin/${params.userId}`))
|
|
7
|
+
.data;
|
|
8
|
+
};
|
|
9
|
+
exports.getUserAdmin = getUserAdmin;
|
|
10
|
+
const resetApiKeyUserAdmin = async (params) => {
|
|
11
|
+
return (await __1.AbyssStorageCore.axios.post(`user/admin/${params.userId}`)).data;
|
|
12
|
+
};
|
|
13
|
+
exports.resetApiKeyUserAdmin = resetApiKeyUserAdmin;
|
|
14
|
+
const paginateUserAdmin = async (query) => {
|
|
15
|
+
return (await __1.AbyssStorageCore.axios.get(`user/admin/paginate`, {
|
|
16
|
+
params: query,
|
|
17
|
+
})).data;
|
|
18
|
+
};
|
|
19
|
+
exports.paginateUserAdmin = paginateUserAdmin;
|
|
20
|
+
const updateUserAdmin = async (params, body) => {
|
|
21
|
+
return (await __1.AbyssStorageCore.axios.put(`user/admin/${params.userId}`, body)).data;
|
|
22
|
+
};
|
|
23
|
+
exports.updateUserAdmin = updateUserAdmin;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IMeUserResponse, IUpdateUserBody, IUpdateUserResponse, IResetApiKeyUserResponse } from '..';
|
|
2
|
+
export declare const meUser: () => Promise<IMeUserResponse>;
|
|
3
|
+
export declare const updateUser: (body: IUpdateUserBody) => Promise<IUpdateUserResponse>;
|
|
4
|
+
export declare const resetApiKeyUser: () => Promise<IResetApiKeyUserResponse>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resetApiKeyUser = exports.updateUser = exports.meUser = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const meUser = async () => {
|
|
6
|
+
return (await __1.AbyssStorageCore.axios.get(`user/me`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.meUser = meUser;
|
|
9
|
+
const updateUser = async (body) => {
|
|
10
|
+
return (await __1.AbyssStorageCore.axios.put(`user/me`, body)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.updateUser = updateUser;
|
|
13
|
+
const resetApiKeyUser = async () => {
|
|
14
|
+
return (await __1.AbyssStorageCore.axios.post(`user/me/reset-api-key`))
|
|
15
|
+
.data;
|
|
16
|
+
};
|
|
17
|
+
exports.resetApiKeyUser = resetApiKeyUser;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IAxiosRetryConfig } from 'axios-retry';
|
|
2
|
+
export * from './api';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './utils';
|
|
5
|
+
export declare const API_KEY_APPLICATION_HEADER = "abyss-storage-api-key-application";
|
|
6
|
+
export declare const ADMIN_TOKEN_HEADER = "abyss-admin-token";
|
|
7
|
+
export declare const HEADER_WEBHOOK_SIGNATURE_NAME = "abyss-storage-webhook-signature";
|
|
8
|
+
export declare const WEBHOOK_SIGNATURE_ALGORITHM = "sha256";
|
|
9
|
+
type CoreConfig = {
|
|
10
|
+
token?: string;
|
|
11
|
+
applicationApiKey?: string;
|
|
12
|
+
adminToken?: string;
|
|
13
|
+
baseURL?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare class AbyssStorageCore {
|
|
16
|
+
private static config;
|
|
17
|
+
static axios: import("axios").AxiosInstance;
|
|
18
|
+
static setConfig(config: CoreConfig): void;
|
|
19
|
+
static getConfig(): CoreConfig;
|
|
20
|
+
static enableAxiosRetry(axiosRetryConfig?: IAxiosRetryConfig): void;
|
|
21
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.AbyssStorageCore = exports.WEBHOOK_SIGNATURE_ALGORITHM = exports.HEADER_WEBHOOK_SIGNATURE_NAME = exports.ADMIN_TOKEN_HEADER = exports.API_KEY_APPLICATION_HEADER = void 0;
|
|
33
|
+
const axios_1 = __importDefault(require("axios"));
|
|
34
|
+
const axios_retry_1 = __importStar(require("axios-retry"));
|
|
35
|
+
__exportStar(require("./api"), exports);
|
|
36
|
+
__exportStar(require("./types"), exports);
|
|
37
|
+
__exportStar(require("./utils"), exports);
|
|
38
|
+
const MONITOR_DEFAULT_BASE_URL = 'https://storage-api.abyss-project.fr/api/';
|
|
39
|
+
exports.API_KEY_APPLICATION_HEADER = 'abyss-storage-api-key-application';
|
|
40
|
+
exports.ADMIN_TOKEN_HEADER = 'abyss-admin-token';
|
|
41
|
+
exports.HEADER_WEBHOOK_SIGNATURE_NAME = 'abyss-storage-webhook-signature';
|
|
42
|
+
exports.WEBHOOK_SIGNATURE_ALGORITHM = 'sha256';
|
|
43
|
+
const NUMBER_RETRY_API = 10;
|
|
44
|
+
const BASE_DELAY_BETWEEN_RETRY = 5000;
|
|
45
|
+
const RETRY_CODES = [
|
|
46
|
+
502,
|
|
47
|
+
503,
|
|
48
|
+
];
|
|
49
|
+
class AbyssStorageCore {
|
|
50
|
+
static setConfig(config) {
|
|
51
|
+
AbyssStorageCore.config = { ...AbyssStorageCore.config, ...config };
|
|
52
|
+
if (config.baseURL) {
|
|
53
|
+
AbyssStorageCore.axios.defaults.baseURL = config.baseURL;
|
|
54
|
+
}
|
|
55
|
+
if (config.token) {
|
|
56
|
+
AbyssStorageCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
|
|
57
|
+
}
|
|
58
|
+
if (config.adminToken) {
|
|
59
|
+
AbyssStorageCore.axios.defaults.headers.common[exports.ADMIN_TOKEN_HEADER] = `${config.adminToken}`;
|
|
60
|
+
}
|
|
61
|
+
if (config.applicationApiKey) {
|
|
62
|
+
AbyssStorageCore.axios.defaults.headers.common[exports.API_KEY_APPLICATION_HEADER] = `${config.applicationApiKey}`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
static getConfig() {
|
|
66
|
+
return AbyssStorageCore.config;
|
|
67
|
+
}
|
|
68
|
+
static enableAxiosRetry(axiosRetryConfig) {
|
|
69
|
+
(0, axios_retry_1.default)(AbyssStorageCore.axios, {
|
|
70
|
+
retries: NUMBER_RETRY_API,
|
|
71
|
+
retryDelay: (retryCount) => retryCount * BASE_DELAY_BETWEEN_RETRY,
|
|
72
|
+
retryCondition: (error) => {
|
|
73
|
+
var _a;
|
|
74
|
+
return (0, axios_retry_1.isNetworkOrIdempotentRequestError)(error) ||
|
|
75
|
+
RETRY_CODES.includes(((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) || 502);
|
|
76
|
+
},
|
|
77
|
+
...axiosRetryConfig,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.AbyssStorageCore = AbyssStorageCore;
|
|
82
|
+
AbyssStorageCore.config = {
|
|
83
|
+
token: '',
|
|
84
|
+
applicationApiKey: '',
|
|
85
|
+
applicationId: '',
|
|
86
|
+
adminToken: '',
|
|
87
|
+
baseURL: MONITOR_DEFAULT_BASE_URL,
|
|
88
|
+
};
|
|
89
|
+
AbyssStorageCore.axios = axios_1.default.create({ baseURL: `` });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare enum ErrorType {
|
|
2
|
+
apiError = "api_error",
|
|
3
|
+
authError = "authentication_error",
|
|
4
|
+
resourceError = "resource_error"
|
|
5
|
+
}
|
|
6
|
+
export declare enum Code {
|
|
7
|
+
tokenFailure = "token_authentication_failure",
|
|
8
|
+
authenticationFailure = "authentication_credentials_failure",
|
|
9
|
+
accessNotAllowed = "access_not_allowed",
|
|
10
|
+
notFound = "not_found",
|
|
11
|
+
validationError = "resource_validation_error",
|
|
12
|
+
constraintError = "resource_constraint_error",
|
|
13
|
+
internalServerError = "internal_server_error",
|
|
14
|
+
serviceUnavailable = "service_unavailable",
|
|
15
|
+
invalidData = "invalid_data",
|
|
16
|
+
notImplemented = "not_implemented",
|
|
17
|
+
invalidUser = "invalid_user",
|
|
18
|
+
invalidLogConsole = "invalid_log_console",
|
|
19
|
+
invalidLogEndpoint = "invalid_log_endpoint",
|
|
20
|
+
expiredPreSignUrl = "expired_pre_sign_url",
|
|
21
|
+
alreadyUsedPreSignUrl = "already_used_pre_sign_url",
|
|
22
|
+
invalidPreSignUrlType = "invalid_pre_sign_url_type",
|
|
23
|
+
invalidPreSignUrlUser = "invalid_pre_sign_url_user",
|
|
24
|
+
invalidPreSignUrlContent = "invalid_pre_sign_url_content",
|
|
25
|
+
notEnoughUserSpace = "not_enough_user_space",
|
|
26
|
+
fileBiggerThanLimit = "file_bigger_than_limit",
|
|
27
|
+
maxThumbnailPerFileReached = "max_thumbnail_per_file_reached",
|
|
28
|
+
publicAccessPasswordInvalid = "public_access_password_invalid",
|
|
29
|
+
maxPreSignUrlPerHourReached = "max_pre_sign_url_per_hour_reached",
|
|
30
|
+
collectionSearchFailed = "collection_search_failed"
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Code = exports.ErrorType = void 0;
|
|
4
|
+
var ErrorType;
|
|
5
|
+
(function (ErrorType) {
|
|
6
|
+
ErrorType["apiError"] = "api_error";
|
|
7
|
+
ErrorType["authError"] = "authentication_error";
|
|
8
|
+
ErrorType["resourceError"] = "resource_error";
|
|
9
|
+
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
|
10
|
+
var Code;
|
|
11
|
+
(function (Code) {
|
|
12
|
+
Code["tokenFailure"] = "token_authentication_failure";
|
|
13
|
+
Code["authenticationFailure"] = "authentication_credentials_failure";
|
|
14
|
+
Code["accessNotAllowed"] = "access_not_allowed";
|
|
15
|
+
Code["notFound"] = "not_found";
|
|
16
|
+
Code["validationError"] = "resource_validation_error";
|
|
17
|
+
Code["constraintError"] = "resource_constraint_error";
|
|
18
|
+
Code["internalServerError"] = "internal_server_error";
|
|
19
|
+
Code["serviceUnavailable"] = "service_unavailable";
|
|
20
|
+
Code["invalidData"] = "invalid_data";
|
|
21
|
+
Code["notImplemented"] = "not_implemented";
|
|
22
|
+
Code["invalidUser"] = "invalid_user";
|
|
23
|
+
Code["invalidLogConsole"] = "invalid_log_console";
|
|
24
|
+
Code["invalidLogEndpoint"] = "invalid_log_endpoint";
|
|
25
|
+
Code["expiredPreSignUrl"] = "expired_pre_sign_url";
|
|
26
|
+
Code["alreadyUsedPreSignUrl"] = "already_used_pre_sign_url";
|
|
27
|
+
Code["invalidPreSignUrlType"] = "invalid_pre_sign_url_type";
|
|
28
|
+
Code["invalidPreSignUrlUser"] = "invalid_pre_sign_url_user";
|
|
29
|
+
Code["invalidPreSignUrlContent"] = "invalid_pre_sign_url_content";
|
|
30
|
+
Code["notEnoughUserSpace"] = "not_enough_user_space";
|
|
31
|
+
Code["fileBiggerThanLimit"] = "file_bigger_than_limit";
|
|
32
|
+
Code["maxThumbnailPerFileReached"] = "max_thumbnail_per_file_reached";
|
|
33
|
+
Code["publicAccessPasswordInvalid"] = "public_access_password_invalid";
|
|
34
|
+
Code["maxPreSignUrlPerHourReached"] = "max_pre_sign_url_per_hour_reached";
|
|
35
|
+
Code["collectionSearchFailed"] = "collection_search_failed";
|
|
36
|
+
})(Code = exports.Code || (exports.Code = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecksumAlgorithm = void 0;
|
|
4
|
+
var ChecksumAlgorithm;
|
|
5
|
+
(function (ChecksumAlgorithm) {
|
|
6
|
+
ChecksumAlgorithm["MD5"] = "MD5";
|
|
7
|
+
ChecksumAlgorithm["SHA1"] = "SHA1";
|
|
8
|
+
ChecksumAlgorithm["SHA3_512"] = "SHA3-512";
|
|
9
|
+
})(ChecksumAlgorithm = exports.ChecksumAlgorithm || (exports.ChecksumAlgorithm = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './api-error.enum';
|
|
2
|
+
export * from './pre-sign-url-type.enum';
|
|
3
|
+
export * from './webhook-type.enum';
|
|
4
|
+
export * from './mime-type-thumbnail.enum';
|
|
5
|
+
export * from './stream-media-type.enum';
|
|
6
|
+
export * from './checksum-algorithm.enum';
|
|
7
|
+
export * from './algorithm.enum';
|
|
8
|
+
export * from './picture-collection-type.enum';
|
|
9
|
+
export * from './picture-collection-source.enum';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./api-error.enum"), exports);
|
|
18
|
+
__exportStar(require("./pre-sign-url-type.enum"), exports);
|
|
19
|
+
__exportStar(require("./webhook-type.enum"), exports);
|
|
20
|
+
__exportStar(require("./mime-type-thumbnail.enum"), exports);
|
|
21
|
+
__exportStar(require("./stream-media-type.enum"), exports);
|
|
22
|
+
__exportStar(require("./checksum-algorithm.enum"), exports);
|
|
23
|
+
__exportStar(require("./algorithm.enum"), exports);
|
|
24
|
+
__exportStar(require("./picture-collection-type.enum"), exports);
|
|
25
|
+
__exportStar(require("./picture-collection-source.enum"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogType = void 0;
|
|
4
|
+
var LogType;
|
|
5
|
+
(function (LogType) {
|
|
6
|
+
LogType[LogType["API"] = 1] = "API";
|
|
7
|
+
LogType[LogType["SYSTEM_STARTUP"] = 4] = "SYSTEM_STARTUP";
|
|
8
|
+
LogType[LogType["STORAGE_SERVICE"] = 10] = "STORAGE_SERVICE";
|
|
9
|
+
LogType[LogType["OTHER"] = 100] = "OTHER";
|
|
10
|
+
})(LogType = exports.LogType || (exports.LogType = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum MimeTypeThumbnail {
|
|
2
|
+
JPEG = "image/jpeg",
|
|
3
|
+
PNG = "image/png",
|
|
4
|
+
TIFF = "image/tiff",
|
|
5
|
+
GIF = "image/gif",
|
|
6
|
+
WEBP = "image/webp",
|
|
7
|
+
AVIF = "image/avif"
|
|
8
|
+
}
|
|
9
|
+
export declare enum MimeTypeVideoThumbnail {
|
|
10
|
+
MP4 = "video/mp4",
|
|
11
|
+
AVI = "video/x-msvideo",
|
|
12
|
+
MPEG = "video/mpeg",
|
|
13
|
+
OGV = "video/ogg",
|
|
14
|
+
WEBM = "video/webm"
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MimeTypeVideoThumbnail = exports.MimeTypeThumbnail = void 0;
|
|
4
|
+
var MimeTypeThumbnail;
|
|
5
|
+
(function (MimeTypeThumbnail) {
|
|
6
|
+
MimeTypeThumbnail["JPEG"] = "image/jpeg";
|
|
7
|
+
MimeTypeThumbnail["PNG"] = "image/png";
|
|
8
|
+
MimeTypeThumbnail["TIFF"] = "image/tiff";
|
|
9
|
+
MimeTypeThumbnail["GIF"] = "image/gif";
|
|
10
|
+
MimeTypeThumbnail["WEBP"] = "image/webp";
|
|
11
|
+
MimeTypeThumbnail["AVIF"] = "image/avif";
|
|
12
|
+
})(MimeTypeThumbnail = exports.MimeTypeThumbnail || (exports.MimeTypeThumbnail = {}));
|
|
13
|
+
var MimeTypeVideoThumbnail;
|
|
14
|
+
(function (MimeTypeVideoThumbnail) {
|
|
15
|
+
MimeTypeVideoThumbnail["MP4"] = "video/mp4";
|
|
16
|
+
MimeTypeVideoThumbnail["AVI"] = "video/x-msvideo";
|
|
17
|
+
MimeTypeVideoThumbnail["MPEG"] = "video/mpeg";
|
|
18
|
+
MimeTypeVideoThumbnail["OGV"] = "video/ogg";
|
|
19
|
+
MimeTypeVideoThumbnail["WEBM"] = "video/webm";
|
|
20
|
+
})(MimeTypeVideoThumbnail = exports.MimeTypeVideoThumbnail || (exports.MimeTypeVideoThumbnail = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PictureCollectionSource = void 0;
|
|
4
|
+
var PictureCollectionSource;
|
|
5
|
+
(function (PictureCollectionSource) {
|
|
6
|
+
PictureCollectionSource["FREEPIK"] = "FREEPIK";
|
|
7
|
+
})(PictureCollectionSource = exports.PictureCollectionSource || (exports.PictureCollectionSource = {}));
|