@abyss-project/storage 1.0.2 → 1.0.3
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/dist/api/application-file-thumbnail.admin.api.d.ts +9 -9
- package/dist/api/application-file-thumbnail.admin.api.js +36 -36
- package/dist/api/application-file-thumbnail.api.d.ts +15 -15
- package/dist/api/application-file-thumbnail.api.js +64 -64
- package/dist/api/application-file.admin.api.d.ts +22 -22
- package/dist/api/application-file.admin.api.js +88 -88
- package/dist/api/application-file.api.d.ts +41 -40
- package/dist/api/application-file.api.js +177 -177
- package/dist/api/application-store.admin.api.d.ts +6 -0
- package/dist/api/application-store.admin.api.js +24 -0
- package/dist/api/application-store.api.d.ts +6 -0
- package/dist/api/application-store.api.js +24 -0
- package/dist/api/application-store.public.api.d.ts +3 -0
- package/dist/api/application-store.public.api.js +12 -0
- package/dist/api/application-webhook-history.admin.api.d.ts +3 -3
- package/dist/api/application-webhook-history.admin.api.js +12 -12
- package/dist/api/application-webhook-history.api.d.ts +3 -3
- package/dist/api/application-webhook-history.api.js +12 -12
- package/dist/api/application-webhook.admin.api.d.ts +7 -7
- package/dist/api/application-webhook.admin.api.js +28 -28
- package/dist/api/application-webhook.api.d.ts +7 -7
- package/dist/api/application-webhook.api.js +28 -28
- package/dist/api/application.admin.api.d.ts +6 -6
- package/dist/api/application.admin.api.js +24 -24
- package/dist/api/application.api.d.ts +3 -3
- package/dist/api/application.api.js +12 -12
- package/dist/api/collection.api.d.ts +3 -3
- package/dist/api/collection.api.js +12 -12
- package/dist/api/generics/download.request.d.ts +2 -2
- package/dist/api/generics/download.request.js +10 -10
- package/dist/api/generics/index.d.ts +2 -2
- package/dist/api/generics/index.js +18 -18
- package/dist/api/generics/upload.request.d.ts +3 -3
- package/dist/api/generics/upload.request.js +10 -10
- package/dist/api/index.d.ts +18 -15
- package/dist/api/index.js +34 -31
- package/dist/api/monitor.api.d.ts +2 -2
- package/dist/api/monitor.api.js +8 -8
- package/dist/api/storage.admin.api.d.ts +4 -4
- package/dist/api/storage.admin.api.js +16 -16
- package/dist/api/stream-media.admin.api.d.ts +7 -7
- package/dist/api/stream-media.admin.api.js +35 -35
- package/dist/api/stream-media.api.d.ts +4 -4
- package/dist/api/stream-media.api.js +18 -18
- package/dist/index.d.ts +21 -21
- package/dist/index.js +91 -91
- package/dist/types/enum/algorithm.enum.d.ts +3 -3
- package/dist/types/enum/algorithm.enum.js +7 -7
- package/dist/types/enum/api-error.enum.d.ts +31 -31
- package/dist/types/enum/api-error.enum.js +36 -36
- package/dist/types/enum/checksum-algorithm.enum.d.ts +5 -5
- package/dist/types/enum/checksum-algorithm.enum.js +9 -9
- package/dist/types/enum/index.d.ts +9 -9
- package/dist/types/enum/index.js +25 -25
- package/dist/types/enum/mime-type-thumbnail.enum.d.ts +15 -15
- package/dist/types/enum/mime-type-thumbnail.enum.js +20 -20
- package/dist/types/enum/picture-collection-source.enum.d.ts +3 -3
- package/dist/types/enum/picture-collection-source.enum.js +7 -7
- package/dist/types/enum/picture-collection-type.enum.d.ts +3 -3
- package/dist/types/enum/picture-collection-type.enum.js +7 -7
- package/dist/types/enum/pre-sign-url-type.enum.d.ts +5 -5
- package/dist/types/enum/pre-sign-url-type.enum.js +9 -9
- package/dist/types/enum/stream-media-type.enum.d.ts +4 -4
- package/dist/types/enum/stream-media-type.enum.js +8 -8
- package/dist/types/enum/webhook-type.enum.d.ts +5 -5
- package/dist/types/enum/webhook-type.enum.js +9 -9
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +19 -19
- package/dist/types/interface/api/index.d.ts +38 -32
- package/dist/types/interface/api/index.js +54 -48
- package/dist/types/interface/api/requests/application-file-thumbnail.admin.request.d.ts +37 -37
- package/dist/types/interface/api/requests/application-file-thumbnail.admin.request.js +2 -2
- package/dist/types/interface/api/requests/application-file-thumbnail.request.d.ts +56 -56
- package/dist/types/interface/api/requests/application-file-thumbnail.request.js +2 -2
- package/dist/types/interface/api/requests/application-file.admin.request.d.ts +144 -144
- package/dist/types/interface/api/requests/application-file.admin.request.js +2 -2
- package/dist/types/interface/api/requests/application-file.request.d.ts +228 -228
- package/dist/types/interface/api/requests/application-file.request.js +2 -2
- package/dist/types/interface/api/requests/application-store.admin.request.d.ts +34 -0
- package/dist/types/interface/api/requests/{abyss.admin.request.js → application-store.admin.request.js} +2 -2
- package/dist/types/interface/api/requests/application-store.public.request.d.ts +8 -0
- package/dist/types/interface/api/requests/{logger.admin.request.js → application-store.public.request.js} +2 -2
- package/dist/types/interface/api/requests/application-store.request.d.ts +39 -0
- package/dist/types/interface/api/requests/{picture-collection.request.js → application-store.request.js} +2 -2
- package/dist/types/interface/api/requests/application-webhook-history.admin.request.d.ts +14 -14
- package/dist/types/interface/api/requests/application-webhook-history.admin.request.js +2 -2
- package/dist/types/interface/api/requests/application-webhook-history.request.d.ts +17 -17
- package/dist/types/interface/api/requests/application-webhook-history.request.js +2 -2
- package/dist/types/interface/api/requests/application-webhook.admin.request.d.ts +33 -33
- package/dist/types/interface/api/requests/application-webhook.admin.request.js +2 -2
- package/dist/types/interface/api/requests/application-webhook.request.d.ts +43 -43
- package/dist/types/interface/api/requests/application-webhook.request.js +2 -2
- package/dist/types/interface/api/requests/application.admin.request.d.ts +16 -16
- package/dist/types/interface/api/requests/application.admin.request.js +2 -2
- package/dist/types/interface/api/requests/application.request.d.ts +7 -7
- package/dist/types/interface/api/requests/application.request.js +2 -2
- package/dist/types/interface/api/requests/collection.request.d.ts +10 -10
- package/dist/types/interface/api/requests/collection.request.js +2 -2
- package/dist/types/interface/api/requests/storage.admin.request.d.ts +3 -3
- package/dist/types/interface/api/requests/storage.admin.request.js +2 -2
- package/dist/types/interface/api/requests/stream-media.admin.request.d.ts +28 -28
- package/dist/types/interface/api/requests/stream-media.admin.request.js +2 -2
- package/dist/types/interface/api/requests/stream-media.request.d.ts +12 -12
- package/dist/types/interface/api/requests/stream-media.request.js +2 -2
- package/dist/types/interface/api/responses/application-file-thumbnail.admin.response.d.ts +30 -30
- package/dist/types/interface/api/responses/application-file-thumbnail.admin.response.js +2 -2
- package/dist/types/interface/api/responses/application-file-thumbnail.response.d.ts +36 -35
- package/dist/types/interface/api/responses/application-file-thumbnail.response.js +2 -2
- package/dist/types/interface/api/responses/application-file.admin.response.d.ts +80 -80
- package/dist/types/interface/api/responses/application-file.admin.response.js +2 -2
- package/dist/types/interface/api/responses/application-file.response.d.ts +96 -95
- package/dist/types/interface/api/responses/application-file.response.js +2 -2
- package/dist/types/interface/api/responses/application-store.admin.response.d.ts +17 -0
- package/dist/types/interface/api/{requests/user-application-file-thumbnail.admin.request.js → responses/application-store.admin.response.js} +2 -2
- package/dist/types/interface/api/responses/application-store.public.response.d.ts +21 -0
- package/dist/types/interface/api/responses/application-store.public.response.js +2 -0
- package/dist/types/interface/api/responses/application-store.response.d.ts +17 -0
- package/dist/types/interface/api/responses/application-store.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook-history.admin.response.d.ts +7 -7
- package/dist/types/interface/api/responses/application-webhook-history.admin.response.js +2 -2
- package/dist/types/interface/api/responses/application-webhook-history.response.d.ts +7 -7
- package/dist/types/interface/api/responses/application-webhook-history.response.js +2 -2
- package/dist/types/interface/api/responses/application-webhook.admin.response.d.ts +21 -21
- package/dist/types/interface/api/responses/application-webhook.admin.response.js +2 -2
- package/dist/types/interface/api/responses/application-webhook.response.d.ts +21 -21
- package/dist/types/interface/api/responses/application-webhook.response.js +2 -2
- package/dist/types/interface/api/responses/application.admin.response.d.ts +33 -33
- package/dist/types/interface/api/responses/application.admin.response.js +2 -2
- package/dist/types/interface/api/responses/application.response.d.ts +14 -14
- package/dist/types/interface/api/responses/application.response.js +2 -2
- package/dist/types/interface/api/responses/collection.response.d.ts +43 -43
- package/dist/types/interface/api/responses/collection.response.js +2 -2
- package/dist/types/interface/api/responses/monitor.response.d.ts +7 -7
- package/dist/types/interface/api/responses/monitor.response.js +2 -2
- package/dist/types/interface/api/responses/stream-media.admin.response.d.ts +20 -20
- package/dist/types/interface/api/responses/stream-media.admin.response.js +2 -2
- package/dist/types/interface/api/responses/stream-media.response.d.ts +10 -9
- package/dist/types/interface/api/responses/stream-media.response.js +2 -2
- package/dist/types/interface/api/type-message/api-error.d.ts +8 -8
- package/dist/types/interface/api/type-message/api-error.js +2 -2
- package/dist/types/interface/api/type-message/base-order.d.ts +4 -4
- package/dist/types/interface/api/type-message/base-order.js +2 -2
- package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -10
- package/dist/types/interface/api/type-message/base-paginate.js +2 -2
- package/dist/types/interface/api/type-message/response.d.ts +5 -5
- package/dist/types/interface/api/type-message/response.js +2 -2
- package/dist/types/interface/constants/application-store.constant.d.ts +1 -0
- package/dist/types/interface/constants/application-store.constant.js +4 -0
- package/dist/types/interface/constants/index.d.ts +1 -0
- package/dist/types/interface/constants/index.js +17 -0
- package/dist/types/interface/dto/archive.d.ts +34 -34
- package/dist/types/interface/dto/archive.js +2 -2
- package/dist/types/interface/dto/index.d.ts +3 -3
- package/dist/types/interface/dto/index.js +19 -19
- package/dist/types/interface/dto/metadata.d.ts +13 -13
- package/dist/types/interface/dto/metadata.js +2 -2
- package/dist/types/interface/dto/webhooks.d.ts +29 -29
- package/dist/types/interface/dto/webhooks.js +2 -2
- package/dist/types/interface/index.d.ts +11 -9
- package/dist/types/interface/index.js +27 -25
- package/dist/types/interface/models/application-file-thumbnail.model.d.ts +15 -15
- package/dist/types/interface/models/application-file-thumbnail.model.js +2 -2
- package/dist/types/interface/models/application-file.model.d.ts +28 -28
- package/dist/types/interface/models/application-file.model.js +2 -2
- package/dist/types/interface/models/application-store-entry.model.d.ts +14 -0
- package/dist/types/interface/models/application-store-entry.model.js +2 -0
- package/dist/types/interface/models/application-webhook-history.model.d.ts +16 -16
- package/dist/types/interface/models/application-webhook-history.model.js +2 -2
- package/dist/types/interface/models/application-webhook.model.d.ts +17 -17
- package/dist/types/interface/models/application-webhook.model.js +2 -2
- package/dist/types/interface/models/application.model.d.ts +14 -12
- package/dist/types/interface/models/application.model.js +2 -2
- package/dist/types/interface/models/pre-sign-url.model.d.ts +11 -11
- package/dist/types/interface/models/pre-sign-url.model.js +2 -2
- package/dist/types/interface/models/stream-media.model.d.ts +9 -9
- package/dist/types/interface/models/stream-media.model.js +2 -2
- package/dist/types/models/index.d.ts +1 -1
- package/dist/types/models/index.js +17 -17
- package/dist/types/models/transfer.model.d.ts +36 -36
- package/dist/types/models/transfer.model.js +73 -73
- package/dist/utils/error.utils.d.ts +15 -15
- package/dist/utils/error.utils.js +24 -24
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +17 -17
- package/package.json +5 -5
- package/dist/api/abyss.admin.api.d.ts +0 -2
- package/dist/api/abyss.admin.api.js +0 -8
- package/dist/api/logger.admin.api.d.ts +0 -3
- package/dist/api/logger.admin.api.js +0 -14
- package/dist/api/picture-collection.api.d.ts +0 -2
- package/dist/api/picture-collection.api.js +0 -10
- package/dist/api/user-application-file-thumbnail.admin.api.d.ts +0 -9
- package/dist/api/user-application-file-thumbnail.admin.api.js +0 -36
- package/dist/api/user-application-file-thumbnail.api.d.ts +0 -10
- package/dist/api/user-application-file-thumbnail.api.js +0 -46
- package/dist/api/user-application-file.admin.api.d.ts +0 -15
- package/dist/api/user-application-file.admin.api.js +0 -62
- package/dist/api/user-application-file.api.d.ts +0 -31
- package/dist/api/user-application-file.api.js +0 -134
- package/dist/api/user-application-webhook-history.admin.api.d.ts +0 -3
- package/dist/api/user-application-webhook-history.admin.api.js +0 -12
- package/dist/api/user-application-webhook-history.api.d.ts +0 -3
- package/dist/api/user-application-webhook-history.api.js +0 -12
- package/dist/api/user-application-webhook.admin.api.d.ts +0 -7
- package/dist/api/user-application-webhook.admin.api.js +0 -28
- package/dist/api/user-application-webhook.api.d.ts +0 -7
- package/dist/api/user-application-webhook.api.js +0 -28
- package/dist/api/user-application.admin.api.d.ts +0 -7
- package/dist/api/user-application.admin.api.js +0 -28
- package/dist/api/user-application.api.d.ts +0 -5
- package/dist/api/user-application.api.js +0 -20
- package/dist/api/user-file-thumbnail.admin.api.d.ts +0 -9
- package/dist/api/user-file-thumbnail.admin.api.js +0 -36
- package/dist/api/user-file-thumbnail.api.d.ts +0 -10
- package/dist/api/user-file-thumbnail.api.js +0 -46
- package/dist/api/user-file.admin.api.d.ts +0 -15
- package/dist/api/user-file.admin.api.js +0 -62
- package/dist/api/user-file.api.d.ts +0 -29
- package/dist/api/user-file.api.js +0 -137
- package/dist/api/user-webhook-history.admin.api.d.ts +0 -3
- package/dist/api/user-webhook-history.admin.api.js +0 -12
- package/dist/api/user-webhook-history.api.d.ts +0 -3
- package/dist/api/user-webhook-history.api.js +0 -12
- package/dist/api/user-webhook.admin.api.d.ts +0 -7
- package/dist/api/user-webhook.admin.api.js +0 -28
- package/dist/api/user-webhook.api.d.ts +0 -7
- package/dist/api/user-webhook.api.js +0 -28
- package/dist/api/user.admin.api.d.ts +0 -5
- package/dist/api/user.admin.api.js +0 -23
- package/dist/api/user.api.d.ts +0 -4
- package/dist/api/user.api.js +0 -17
- package/dist/types/enum/log-type.enum.d.ts +0 -6
- package/dist/types/enum/log-type.enum.js +0 -10
- package/dist/types/interface/api/requests/abyss.admin.request.d.ts +0 -4
- package/dist/types/interface/api/requests/logger.admin.request.d.ts +0 -10
- package/dist/types/interface/api/requests/picture-collection.request.d.ts +0 -3
- package/dist/types/interface/api/requests/user-application-file-thumbnail.admin.request.d.ts +0 -35
- package/dist/types/interface/api/requests/user-application-file-thumbnail.request.d.ts +0 -50
- package/dist/types/interface/api/requests/user-application-file-thumbnail.request.js +0 -2
- package/dist/types/interface/api/requests/user-application-file.admin.request.d.ts +0 -90
- package/dist/types/interface/api/requests/user-application-file.admin.request.js +0 -2
- package/dist/types/interface/api/requests/user-application-file.request.d.ts +0 -141
- package/dist/types/interface/api/requests/user-application-file.request.js +0 -2
- package/dist/types/interface/api/requests/user-application-webhook-history.admin.request.d.ts +0 -14
- package/dist/types/interface/api/requests/user-application-webhook-history.admin.request.js +0 -2
- package/dist/types/interface/api/requests/user-application-webhook-history.request.d.ts +0 -17
- package/dist/types/interface/api/requests/user-application-webhook-history.request.js +0 -2
- package/dist/types/interface/api/requests/user-application-webhook.admin.request.d.ts +0 -33
- package/dist/types/interface/api/requests/user-application-webhook.admin.request.js +0 -2
- package/dist/types/interface/api/requests/user-application-webhook.request.d.ts +0 -43
- package/dist/types/interface/api/requests/user-application-webhook.request.js +0 -2
- package/dist/types/interface/api/requests/user-application.admin.request.d.ts +0 -18
- package/dist/types/interface/api/requests/user-application.admin.request.js +0 -2
- package/dist/types/interface/api/requests/user-application.request.d.ts +0 -12
- package/dist/types/interface/api/requests/user-application.request.js +0 -2
- package/dist/types/interface/api/requests/user.admin.request.d.ts +0 -21
- package/dist/types/interface/api/requests/user.admin.request.js +0 -2
- package/dist/types/interface/api/requests/user.request.d.ts +0 -3
- package/dist/types/interface/api/requests/user.request.js +0 -2
- package/dist/types/interface/api/responses/abyss.admin.response.d.ts +0 -6
- package/dist/types/interface/api/responses/abyss.admin.response.js +0 -2
- package/dist/types/interface/api/responses/logger.admin.response.d.ts +0 -7
- package/dist/types/interface/api/responses/logger.admin.response.js +0 -2
- package/dist/types/interface/api/responses/picture-collection.response.d.ts +0 -17
- package/dist/types/interface/api/responses/picture-collection.response.js +0 -2
- package/dist/types/interface/api/responses/storage.admin.response.d.ts +0 -5
- package/dist/types/interface/api/responses/storage.admin.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-file-thumbnail.admin.response.d.ts +0 -30
- package/dist/types/interface/api/responses/user-application-file-thumbnail.admin.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-file-thumbnail.response.d.ts +0 -33
- package/dist/types/interface/api/responses/user-application-file-thumbnail.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-file.admin.response.d.ts +0 -57
- package/dist/types/interface/api/responses/user-application-file.admin.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-file.response.d.ts +0 -70
- package/dist/types/interface/api/responses/user-application-file.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-webhook-history.admin.response.d.ts +0 -7
- package/dist/types/interface/api/responses/user-application-webhook-history.admin.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-webhook-history.response.d.ts +0 -7
- package/dist/types/interface/api/responses/user-application-webhook-history.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-webhook.admin.response.d.ts +0 -21
- package/dist/types/interface/api/responses/user-application-webhook.admin.response.js +0 -2
- package/dist/types/interface/api/responses/user-application-webhook.response.d.ts +0 -21
- package/dist/types/interface/api/responses/user-application-webhook.response.js +0 -2
- package/dist/types/interface/api/responses/user-application.admin.response.d.ts +0 -25
- package/dist/types/interface/api/responses/user-application.admin.response.js +0 -2
- package/dist/types/interface/api/responses/user-application.response.d.ts +0 -19
- package/dist/types/interface/api/responses/user-application.response.js +0 -2
- package/dist/types/interface/api/responses/user.admin.response.d.ts +0 -15
- package/dist/types/interface/api/responses/user.admin.response.js +0 -2
- package/dist/types/interface/api/responses/user.response.d.ts +0 -13
- package/dist/types/interface/api/responses/user.response.js +0 -2
- package/dist/types/interface/models/log-console.model.d.ts +0 -17
- package/dist/types/interface/models/log-console.model.js +0 -2
- package/dist/types/interface/models/log-endpoint.model.d.ts +0 -22
- package/dist/types/interface/models/log-endpoint.model.js +0 -2
- package/dist/types/interface/models/picture-collection.model.d.ts +0 -17
- package/dist/types/interface/models/picture-collection.model.js +0 -2
- package/dist/types/interface/models/user-application-file-thumbnail.model.d.ts +0 -14
- package/dist/types/interface/models/user-application-file-thumbnail.model.js +0 -2
- package/dist/types/interface/models/user-application-file.model.d.ts +0 -20
- package/dist/types/interface/models/user-application-file.model.js +0 -2
- package/dist/types/interface/models/user-application-webhook-history.model.d.ts +0 -16
- package/dist/types/interface/models/user-application-webhook-history.model.js +0 -2
- package/dist/types/interface/models/user-application-webhook.model.d.ts +0 -17
- package/dist/types/interface/models/user-application-webhook.model.js +0 -2
- package/dist/types/interface/models/user-application.model.d.ts +0 -15
- package/dist/types/interface/models/user-application.model.js +0 -2
- package/dist/types/interface/models/user.model.d.ts +0 -8
- package/dist/types/interface/models/user.model.js +0 -2
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export * from './models/application.model';
|
|
2
|
-
export * from './models/application-webhook.model';
|
|
3
|
-
export * from './models/application-webhook-history.model';
|
|
4
|
-
export * from './models/application-file.model';
|
|
5
|
-
export * from './models/pre-sign-url.model';
|
|
6
|
-
export * from './models/application-file-thumbnail.model';
|
|
7
|
-
export * from './models/stream-media.model';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
1
|
+
export * from './models/application.model';
|
|
2
|
+
export * from './models/application-webhook.model';
|
|
3
|
+
export * from './models/application-webhook-history.model';
|
|
4
|
+
export * from './models/application-file.model';
|
|
5
|
+
export * from './models/pre-sign-url.model';
|
|
6
|
+
export * from './models/application-file-thumbnail.model';
|
|
7
|
+
export * from './models/stream-media.model';
|
|
8
|
+
export * from './models/application-store-entry.model';
|
|
9
|
+
export * from './api';
|
|
10
|
+
export * from './dto';
|
|
11
|
+
export * from './constants';
|
|
@@ -1,25 +1,27 @@
|
|
|
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("./models/application.model"), exports);
|
|
18
|
-
__exportStar(require("./models/application-webhook.model"), exports);
|
|
19
|
-
__exportStar(require("./models/application-webhook-history.model"), exports);
|
|
20
|
-
__exportStar(require("./models/application-file.model"), exports);
|
|
21
|
-
__exportStar(require("./models/pre-sign-url.model"), exports);
|
|
22
|
-
__exportStar(require("./models/application-file-thumbnail.model"), exports);
|
|
23
|
-
__exportStar(require("./models/stream-media.model"), exports);
|
|
24
|
-
__exportStar(require("./
|
|
25
|
-
__exportStar(require("./
|
|
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("./models/application.model"), exports);
|
|
18
|
+
__exportStar(require("./models/application-webhook.model"), exports);
|
|
19
|
+
__exportStar(require("./models/application-webhook-history.model"), exports);
|
|
20
|
+
__exportStar(require("./models/application-file.model"), exports);
|
|
21
|
+
__exportStar(require("./models/pre-sign-url.model"), exports);
|
|
22
|
+
__exportStar(require("./models/application-file-thumbnail.model"), exports);
|
|
23
|
+
__exportStar(require("./models/stream-media.model"), exports);
|
|
24
|
+
__exportStar(require("./models/application-store-entry.model"), exports);
|
|
25
|
+
__exportStar(require("./api"), exports);
|
|
26
|
+
__exportStar(require("./dto"), exports);
|
|
27
|
+
__exportStar(require("./constants"), exports);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IApplicationFile } from './application-file.model';
|
|
2
|
-
export interface IApplicationFileThumbnail {
|
|
3
|
-
id?: string;
|
|
4
|
-
name: string;
|
|
5
|
-
sizeOctet: number;
|
|
6
|
-
publicAccessId: string;
|
|
7
|
-
customPublicAccessId: string | null;
|
|
8
|
-
resolutionX: number;
|
|
9
|
-
resolutionY: number;
|
|
10
|
-
mimeType: string;
|
|
11
|
-
applicationFileId: string;
|
|
12
|
-
updatedAt?: Date;
|
|
13
|
-
createdAt?: Date;
|
|
14
|
-
applicationFile?: IApplicationFile;
|
|
15
|
-
}
|
|
1
|
+
import { IApplicationFile } from './application-file.model';
|
|
2
|
+
export interface IApplicationFileThumbnail {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
sizeOctet: number;
|
|
6
|
+
publicAccessId: string;
|
|
7
|
+
customPublicAccessId: string | null;
|
|
8
|
+
resolutionX: number;
|
|
9
|
+
resolutionY: number;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
applicationFileId: string;
|
|
12
|
+
updatedAt?: Date;
|
|
13
|
+
createdAt?: Date;
|
|
14
|
+
applicationFile?: IApplicationFile;
|
|
15
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { IApplicationFileThumbnail } from './application-file-thumbnail.model';
|
|
2
|
-
import { Algorithm, ChecksumAlgorithm } from '../../enum';
|
|
3
|
-
import { IApplication } from './application.model';
|
|
4
|
-
import { ApplicationFileMetadata } from '../dto';
|
|
5
|
-
import * as mindee from 'mindee';
|
|
6
|
-
export interface IApplicationFile {
|
|
7
|
-
id?: string;
|
|
8
|
-
name: string;
|
|
9
|
-
publicAccessId: string | null;
|
|
10
|
-
customPublicAccessId: string | null;
|
|
11
|
-
publicAccessPassword: string | null;
|
|
12
|
-
sizeOctet: number;
|
|
13
|
-
algorithm: Algorithm | null;
|
|
14
|
-
checksum: string;
|
|
15
|
-
checksumAlgorithm: ChecksumAlgorithm;
|
|
16
|
-
mimeType: string | null;
|
|
17
|
-
metadata: ApplicationFileMetadata | null;
|
|
18
|
-
ocrMetadata: {
|
|
19
|
-
receipt?: mindee.PredictResponse<mindee.product.ReceiptV5> | null;
|
|
20
|
-
} | null;
|
|
21
|
-
tag: string[];
|
|
22
|
-
bucket: string | null;
|
|
23
|
-
applicationId: string;
|
|
24
|
-
updatedAt?: Date;
|
|
25
|
-
createdAt?: Date;
|
|
26
|
-
application?: IApplication;
|
|
27
|
-
applicationFileThumbnail?: IApplicationFileThumbnail[];
|
|
28
|
-
}
|
|
1
|
+
import { IApplicationFileThumbnail } from './application-file-thumbnail.model';
|
|
2
|
+
import { Algorithm, ChecksumAlgorithm } from '../../enum';
|
|
3
|
+
import { IApplication } from './application.model';
|
|
4
|
+
import { ApplicationFileMetadata } from '../dto';
|
|
5
|
+
import * as mindee from 'mindee';
|
|
6
|
+
export interface IApplicationFile {
|
|
7
|
+
id?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
publicAccessId: string | null;
|
|
10
|
+
customPublicAccessId: string | null;
|
|
11
|
+
publicAccessPassword: string | null;
|
|
12
|
+
sizeOctet: number;
|
|
13
|
+
algorithm: Algorithm | null;
|
|
14
|
+
checksum: string;
|
|
15
|
+
checksumAlgorithm: ChecksumAlgorithm;
|
|
16
|
+
mimeType: string | null;
|
|
17
|
+
metadata: ApplicationFileMetadata | null;
|
|
18
|
+
ocrMetadata: {
|
|
19
|
+
receipt?: mindee.PredictResponse<mindee.product.ReceiptV5> | null;
|
|
20
|
+
} | null;
|
|
21
|
+
tag: string[];
|
|
22
|
+
bucket: string | null;
|
|
23
|
+
applicationId: string;
|
|
24
|
+
updatedAt?: Date;
|
|
25
|
+
createdAt?: Date;
|
|
26
|
+
application?: IApplication;
|
|
27
|
+
applicationFileThumbnail?: IApplicationFileThumbnail[];
|
|
28
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IApplication } from './application.model';
|
|
2
|
+
export interface IApplicationStoreEntry {
|
|
3
|
+
id?: string;
|
|
4
|
+
applicationId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
expireAt: Date | null;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
slug: string;
|
|
10
|
+
countAccess: number;
|
|
11
|
+
updatedAt?: Date;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
application?: IApplication;
|
|
14
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { WebhookType } from '../../enum';
|
|
2
|
-
import { IApplicationWebhook } from './application-webhook.model';
|
|
3
|
-
export interface IApplicationWebhookHistory {
|
|
4
|
-
id?: string;
|
|
5
|
-
applicationWebhookId: string;
|
|
6
|
-
body: Record<string, unknown>;
|
|
7
|
-
response: string | null;
|
|
8
|
-
responseCode: number | null;
|
|
9
|
-
webhookId: string;
|
|
10
|
-
groupId: string;
|
|
11
|
-
type: WebhookType;
|
|
12
|
-
sendAt: Date;
|
|
13
|
-
updatedAt?: Date;
|
|
14
|
-
createdAt?: Date;
|
|
15
|
-
applicationWebhook?: IApplicationWebhook;
|
|
16
|
-
}
|
|
1
|
+
import { WebhookType } from '../../enum';
|
|
2
|
+
import { IApplicationWebhook } from './application-webhook.model';
|
|
3
|
+
export interface IApplicationWebhookHistory {
|
|
4
|
+
id?: string;
|
|
5
|
+
applicationWebhookId: string;
|
|
6
|
+
body: Record<string, unknown>;
|
|
7
|
+
response: string | null;
|
|
8
|
+
responseCode: number | null;
|
|
9
|
+
webhookId: string;
|
|
10
|
+
groupId: string;
|
|
11
|
+
type: WebhookType;
|
|
12
|
+
sendAt: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
createdAt?: Date;
|
|
15
|
+
applicationWebhook?: IApplicationWebhook;
|
|
16
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { WebhookType } from '../../enum';
|
|
2
|
-
import { IApplicationWebhookHistory } from './application-webhook-history.model';
|
|
3
|
-
import { IApplication } from './application.model';
|
|
4
|
-
export interface IApplicationWebhook {
|
|
5
|
-
id?: string;
|
|
6
|
-
webhookSecret: string;
|
|
7
|
-
webhookUrl: string;
|
|
8
|
-
isEnabled: boolean;
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
scopes: WebhookType[];
|
|
12
|
-
applicationId: string;
|
|
13
|
-
updatedAt?: Date;
|
|
14
|
-
createdAt?: Date;
|
|
15
|
-
application?: IApplication;
|
|
16
|
-
applicationWebhookHistory?: IApplicationWebhookHistory[];
|
|
17
|
-
}
|
|
1
|
+
import { WebhookType } from '../../enum';
|
|
2
|
+
import { IApplicationWebhookHistory } from './application-webhook-history.model';
|
|
3
|
+
import { IApplication } from './application.model';
|
|
4
|
+
export interface IApplicationWebhook {
|
|
5
|
+
id?: string;
|
|
6
|
+
webhookSecret: string;
|
|
7
|
+
webhookUrl: string;
|
|
8
|
+
isEnabled: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
scopes: WebhookType[];
|
|
12
|
+
applicationId: string;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
createdAt?: Date;
|
|
15
|
+
application?: IApplication;
|
|
16
|
+
applicationWebhookHistory?: IApplicationWebhookHistory[];
|
|
17
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { IApplicationStoreEntry } from './application-store-entry.model';
|
|
2
|
+
import { IPreSignUrl } from './pre-sign-url.model';
|
|
3
|
+
import { IApplicationFile } from './application-file.model';
|
|
4
|
+
import { IApplicationWebhook } from './application-webhook.model';
|
|
5
|
+
export interface IApplication {
|
|
6
|
+
id?: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
applicationWebhook?: IApplicationWebhook[];
|
|
11
|
+
applicationFile?: IApplicationFile[];
|
|
12
|
+
preSignUrl?: IPreSignUrl[];
|
|
13
|
+
applicationStoreEntry?: IApplicationStoreEntry[];
|
|
14
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IApplication } from './application.model';
|
|
2
|
-
export interface IPreSignUrl {
|
|
3
|
-
id?: string;
|
|
4
|
-
token: string;
|
|
5
|
-
applicationId: string;
|
|
6
|
-
generatedAt: Date;
|
|
7
|
-
usedAt: Date | null;
|
|
8
|
-
updatedAt?: Date;
|
|
9
|
-
createdAt?: Date;
|
|
10
|
-
application?: IApplication;
|
|
11
|
-
}
|
|
1
|
+
import { IApplication } from './application.model';
|
|
2
|
+
export interface IPreSignUrl {
|
|
3
|
+
id?: string;
|
|
4
|
+
token: string;
|
|
5
|
+
applicationId: string;
|
|
6
|
+
generatedAt: Date;
|
|
7
|
+
usedAt: Date | null;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
application?: IApplication;
|
|
11
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { StreamMediaType } from '../../enum';
|
|
2
|
-
export interface IStreamMedia {
|
|
3
|
-
id?: string;
|
|
4
|
-
name: string;
|
|
5
|
-
type: StreamMediaType;
|
|
6
|
-
isTranscoded: boolean;
|
|
7
|
-
updatedAt?: Date;
|
|
8
|
-
createdAt?: Date;
|
|
9
|
-
}
|
|
1
|
+
import { StreamMediaType } from '../../enum';
|
|
2
|
+
export interface IStreamMedia {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: StreamMediaType;
|
|
6
|
+
isTranscoded: boolean;
|
|
7
|
+
updatedAt?: Date;
|
|
8
|
+
createdAt?: Date;
|
|
9
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './transfer.model';
|
|
1
|
+
export * from './transfer.model';
|
|
@@ -1,17 +1,17 @@
|
|
|
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("./transfer.model"), exports);
|
|
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("./transfer.model"), exports);
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { CancelTokenSource } from 'axios';
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
|
-
export declare enum TransferType {
|
|
4
|
-
UPLOAD = "UPLOAD",
|
|
5
|
-
DOWNLOAD = "DOWNLOAD"
|
|
6
|
-
}
|
|
7
|
-
export declare enum TransferState {
|
|
8
|
-
STARTING = "STARTING",
|
|
9
|
-
PROCESSING = "PROCESSING",
|
|
10
|
-
CANCELED = "CANCELED",
|
|
11
|
-
COMPLETED = "COMPLETED"
|
|
12
|
-
}
|
|
13
|
-
export declare class Transfer {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
type: TransferType;
|
|
17
|
-
cancelTokenSource: CancelTokenSource;
|
|
18
|
-
size: number;
|
|
19
|
-
sizeProcessed: number;
|
|
20
|
-
progress: number;
|
|
21
|
-
startedAt: dayjs.Dayjs;
|
|
22
|
-
endedAt?: dayjs.Dayjs;
|
|
23
|
-
state: TransferState;
|
|
24
|
-
action: () => void;
|
|
25
|
-
progressEventStack: ProgressEvent[];
|
|
26
|
-
speedStack: number[];
|
|
27
|
-
constructor(data: {
|
|
28
|
-
name: string;
|
|
29
|
-
type: TransferType;
|
|
30
|
-
cancelTokenSource?: CancelTokenSource;
|
|
31
|
-
});
|
|
32
|
-
onProgress(event: ProgressEvent): void;
|
|
33
|
-
cancel(): void;
|
|
34
|
-
completeEmptyDownload(): void;
|
|
35
|
-
setAction(action: () => void): void;
|
|
36
|
-
}
|
|
1
|
+
import { CancelTokenSource } from 'axios';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
export declare enum TransferType {
|
|
4
|
+
UPLOAD = "UPLOAD",
|
|
5
|
+
DOWNLOAD = "DOWNLOAD"
|
|
6
|
+
}
|
|
7
|
+
export declare enum TransferState {
|
|
8
|
+
STARTING = "STARTING",
|
|
9
|
+
PROCESSING = "PROCESSING",
|
|
10
|
+
CANCELED = "CANCELED",
|
|
11
|
+
COMPLETED = "COMPLETED"
|
|
12
|
+
}
|
|
13
|
+
export declare class Transfer {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type: TransferType;
|
|
17
|
+
cancelTokenSource: CancelTokenSource;
|
|
18
|
+
size: number;
|
|
19
|
+
sizeProcessed: number;
|
|
20
|
+
progress: number;
|
|
21
|
+
startedAt: dayjs.Dayjs;
|
|
22
|
+
endedAt?: dayjs.Dayjs;
|
|
23
|
+
state: TransferState;
|
|
24
|
+
action: () => void;
|
|
25
|
+
progressEventStack: ProgressEvent[];
|
|
26
|
+
speedStack: number[];
|
|
27
|
+
constructor(data: {
|
|
28
|
+
name: string;
|
|
29
|
+
type: TransferType;
|
|
30
|
+
cancelTokenSource?: CancelTokenSource;
|
|
31
|
+
});
|
|
32
|
+
onProgress(event: ProgressEvent): void;
|
|
33
|
+
cancel(): void;
|
|
34
|
+
completeEmptyDownload(): void;
|
|
35
|
+
setAction(action: () => void): void;
|
|
36
|
+
}
|
|
@@ -1,73 +1,73 @@
|
|
|
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.Transfer = exports.TransferState = exports.TransferType = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const dayjs_1 = __importDefault(require("dayjs"));
|
|
9
|
-
const uuid_1 = require("uuid");
|
|
10
|
-
var TransferType;
|
|
11
|
-
(function (TransferType) {
|
|
12
|
-
TransferType["UPLOAD"] = "UPLOAD";
|
|
13
|
-
TransferType["DOWNLOAD"] = "DOWNLOAD";
|
|
14
|
-
})(TransferType
|
|
15
|
-
var TransferState;
|
|
16
|
-
(function (TransferState) {
|
|
17
|
-
TransferState["STARTING"] = "STARTING";
|
|
18
|
-
TransferState["PROCESSING"] = "PROCESSING";
|
|
19
|
-
TransferState["CANCELED"] = "CANCELED";
|
|
20
|
-
TransferState["COMPLETED"] = "COMPLETED";
|
|
21
|
-
})(TransferState
|
|
22
|
-
class Transfer {
|
|
23
|
-
constructor(data) {
|
|
24
|
-
this.id = (0, uuid_1.v4)();
|
|
25
|
-
this.name = data.name;
|
|
26
|
-
this.type = data.type;
|
|
27
|
-
this.cancelTokenSource = data.cancelTokenSource || axios_1.default.CancelToken.source();
|
|
28
|
-
this.size = 0;
|
|
29
|
-
this.sizeProcessed = 0;
|
|
30
|
-
this.progress = 0;
|
|
31
|
-
this.startedAt = (0, dayjs_1.default)();
|
|
32
|
-
this.state = TransferState.STARTING;
|
|
33
|
-
this.action = () => {
|
|
34
|
-
};
|
|
35
|
-
this.progressEventStack = [];
|
|
36
|
-
this.speedStack = [];
|
|
37
|
-
}
|
|
38
|
-
onProgress(event) {
|
|
39
|
-
var _a;
|
|
40
|
-
if (this.state === TransferState.STARTING) {
|
|
41
|
-
this.size = event.total;
|
|
42
|
-
this.state = TransferState.PROCESSING;
|
|
43
|
-
}
|
|
44
|
-
this.sizeProcessed = event.loaded;
|
|
45
|
-
this.progress = (this.sizeProcessed / this.size) * 100;
|
|
46
|
-
this.progressEventStack.push(event);
|
|
47
|
-
const oldEvent = this.progressEventStack
|
|
48
|
-
.reverse()
|
|
49
|
-
.find((elem) => event.timeStamp - elem.timeStamp > 1000);
|
|
50
|
-
this.speedStack.push(event.loaded - ((_a = oldEvent === null || oldEvent === void 0 ? void 0 : oldEvent.loaded) !== null && _a !== void 0 ? _a : 0));
|
|
51
|
-
if (this.size === this.sizeProcessed) {
|
|
52
|
-
this.endedAt = (0, dayjs_1.default)();
|
|
53
|
-
this.state = TransferState.COMPLETED;
|
|
54
|
-
}
|
|
55
|
-
this.action();
|
|
56
|
-
}
|
|
57
|
-
cancel() {
|
|
58
|
-
this.cancelTokenSource.cancel();
|
|
59
|
-
this.state = TransferState.CANCELED;
|
|
60
|
-
this.endedAt = (0, dayjs_1.default)();
|
|
61
|
-
this.action();
|
|
62
|
-
}
|
|
63
|
-
completeEmptyDownload() {
|
|
64
|
-
this.state = TransferState.COMPLETED;
|
|
65
|
-
this.progress = 100;
|
|
66
|
-
this.endedAt = (0, dayjs_1.default)();
|
|
67
|
-
this.action();
|
|
68
|
-
}
|
|
69
|
-
setAction(action) {
|
|
70
|
-
this.action = action;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.Transfer = Transfer;
|
|
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.Transfer = exports.TransferState = exports.TransferType = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
|
+
var TransferType;
|
|
11
|
+
(function (TransferType) {
|
|
12
|
+
TransferType["UPLOAD"] = "UPLOAD";
|
|
13
|
+
TransferType["DOWNLOAD"] = "DOWNLOAD";
|
|
14
|
+
})(TransferType || (exports.TransferType = TransferType = {}));
|
|
15
|
+
var TransferState;
|
|
16
|
+
(function (TransferState) {
|
|
17
|
+
TransferState["STARTING"] = "STARTING";
|
|
18
|
+
TransferState["PROCESSING"] = "PROCESSING";
|
|
19
|
+
TransferState["CANCELED"] = "CANCELED";
|
|
20
|
+
TransferState["COMPLETED"] = "COMPLETED";
|
|
21
|
+
})(TransferState || (exports.TransferState = TransferState = {}));
|
|
22
|
+
class Transfer {
|
|
23
|
+
constructor(data) {
|
|
24
|
+
this.id = (0, uuid_1.v4)();
|
|
25
|
+
this.name = data.name;
|
|
26
|
+
this.type = data.type;
|
|
27
|
+
this.cancelTokenSource = data.cancelTokenSource || axios_1.default.CancelToken.source();
|
|
28
|
+
this.size = 0;
|
|
29
|
+
this.sizeProcessed = 0;
|
|
30
|
+
this.progress = 0;
|
|
31
|
+
this.startedAt = (0, dayjs_1.default)();
|
|
32
|
+
this.state = TransferState.STARTING;
|
|
33
|
+
this.action = () => {
|
|
34
|
+
};
|
|
35
|
+
this.progressEventStack = [];
|
|
36
|
+
this.speedStack = [];
|
|
37
|
+
}
|
|
38
|
+
onProgress(event) {
|
|
39
|
+
var _a;
|
|
40
|
+
if (this.state === TransferState.STARTING) {
|
|
41
|
+
this.size = event.total;
|
|
42
|
+
this.state = TransferState.PROCESSING;
|
|
43
|
+
}
|
|
44
|
+
this.sizeProcessed = event.loaded;
|
|
45
|
+
this.progress = (this.sizeProcessed / this.size) * 100;
|
|
46
|
+
this.progressEventStack.push(event);
|
|
47
|
+
const oldEvent = this.progressEventStack
|
|
48
|
+
.reverse()
|
|
49
|
+
.find((elem) => event.timeStamp - elem.timeStamp > 1000);
|
|
50
|
+
this.speedStack.push(event.loaded - ((_a = oldEvent === null || oldEvent === void 0 ? void 0 : oldEvent.loaded) !== null && _a !== void 0 ? _a : 0));
|
|
51
|
+
if (this.size === this.sizeProcessed) {
|
|
52
|
+
this.endedAt = (0, dayjs_1.default)();
|
|
53
|
+
this.state = TransferState.COMPLETED;
|
|
54
|
+
}
|
|
55
|
+
this.action();
|
|
56
|
+
}
|
|
57
|
+
cancel() {
|
|
58
|
+
this.cancelTokenSource.cancel();
|
|
59
|
+
this.state = TransferState.CANCELED;
|
|
60
|
+
this.endedAt = (0, dayjs_1.default)();
|
|
61
|
+
this.action();
|
|
62
|
+
}
|
|
63
|
+
completeEmptyDownload() {
|
|
64
|
+
this.state = TransferState.COMPLETED;
|
|
65
|
+
this.progress = 100;
|
|
66
|
+
this.endedAt = (0, dayjs_1.default)();
|
|
67
|
+
this.action();
|
|
68
|
+
}
|
|
69
|
+
setAction(action) {
|
|
70
|
+
this.action = action;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.Transfer = Transfer;
|