hcloud-sdk 17.0.0 → 18.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/changelog.md +176 -76
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +6 -3
- package/lib/Hcloud.js +16 -5
- package/lib/helper/ValidationHelper.d.ts +10 -2
- package/lib/helper/ValidationHelper.js +55 -7
- package/lib/interfaces/auditor/index.d.ts +13 -2
- package/lib/interfaces/auditor/index.js +9 -1
- package/lib/interfaces/cosmo/asset/index.d.ts +185 -0
- package/lib/interfaces/cosmo/asset/index.js +82 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +38 -0
- package/lib/interfaces/cosmo/comment/index.js +8 -0
- package/lib/interfaces/cosmo/event/index.d.ts +31 -0
- package/lib/interfaces/cosmo/event/index.js +17 -0
- package/lib/interfaces/cosmo/location/index.d.ts +4 -0
- package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
- package/lib/interfaces/cosmo/namespace/index.js +9 -0
- package/lib/interfaces/cosmo/permissions.d.ts +96 -0
- package/lib/interfaces/cosmo/permissions.js +58 -0
- package/lib/interfaces/cosmo/share/index.d.ts +28 -0
- package/lib/interfaces/cosmo/share/index.js +2 -0
- package/lib/interfaces/cosmo/space/index.d.ts +25 -0
- package/lib/interfaces/cosmo/space/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +12 -0
- package/lib/interfaces/cosmo/tag/tag.js +2 -0
- package/lib/interfaces/global/Products.d.ts +2 -2
- package/lib/interfaces/global/Products.js +1 -1
- package/lib/interfaces/high5/index.d.ts +7 -7
- package/lib/interfaces/high5/index.js +7 -7
- package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
- package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
- package/lib/interfaces/high5/space/database/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +9 -2
- package/lib/interfaces/high5/space/execution/index.d.ts +2 -1
- package/lib/interfaces/high5/space/job/JobLog.d.ts +16 -0
- package/lib/interfaces/high5/space/job/JobLog.js +2 -0
- package/lib/interfaces/high5/space/job/index.d.ts +38 -0
- package/lib/interfaces/high5/space/job/index.js +8 -0
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +4 -3
- package/lib/interfaces/idp/organization/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/index.js +1 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
- package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/stats.d.ts +7 -0
- package/lib/interfaces/idp/organization/stats.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
- package/lib/interfaces/idp/user/Message.d.ts +21 -0
- package/lib/interfaces/idp/user/Message.js +14 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -7
- package/lib/interfaces/idp/user/Scopes.js +0 -9
- package/lib/interfaces/idp/user/index.d.ts +2 -1
- package/lib/interfaces/mailer/index.d.ts +30 -1
- package/lib/interfaces/mailer/index.js +87 -1
- package/lib/interfaces/mothership/index.d.ts +3 -1
- package/lib/interfaces/mothership/index.js +15 -0
- package/lib/interfaces/mothership/stats.d.ts +4 -0
- package/lib/interfaces/mothership/stats.js +2 -0
- package/lib/interfaces/nats/index.d.ts +54 -24
- package/lib/interfaces/nats/index.js +87 -58
- package/lib/interfaces/shorts/index.d.ts +10 -0
- package/lib/interfaces/shorts/index.js +2 -0
- package/lib/service/agent/bundle/dev/index.d.ts +16 -6
- package/lib/service/agent/bundle/dev/index.js +12 -10
- package/lib/service/agent/bundle/index.d.ts +10 -4
- package/lib/service/agent/bundle/index.js +6 -6
- package/lib/service/agent/context/index.d.ts +22 -8
- package/lib/service/agent/context/index.js +15 -14
- package/lib/service/auditor/index.d.ts +8 -4
- package/lib/service/auditor/index.js +5 -5
- package/lib/service/auditor/internal/index.d.ts +27 -3
- package/lib/service/auditor/internal/index.js +34 -5
- package/lib/service/bouncer/features/index.d.ts +4 -2
- package/lib/service/bouncer/features/index.js +2 -2
- package/lib/service/cosmo/asset/index.d.ts +219 -0
- package/lib/service/cosmo/asset/index.js +314 -0
- package/lib/service/cosmo/comment/index.d.ts +122 -0
- package/lib/service/cosmo/comment/index.js +161 -0
- package/lib/service/cosmo/event/index.d.ts +23 -0
- package/lib/service/cosmo/event/index.js +40 -0
- package/lib/service/cosmo/folder/index.d.ts +27 -0
- package/lib/service/cosmo/folder/index.js +47 -0
- package/lib/service/cosmo/index.d.ts +49 -0
- package/lib/service/cosmo/index.js +119 -0
- package/lib/service/cosmo/internal/index.d.ts +7 -0
- package/lib/service/cosmo/internal/index.js +17 -0
- package/lib/service/cosmo/internal/space/index.d.ts +15 -0
- package/lib/service/cosmo/internal/space/index.js +34 -0
- package/lib/service/cosmo/location/index.d.ts +40 -0
- package/lib/service/cosmo/location/index.js +63 -0
- package/lib/service/cosmo/namespace/index.d.ts +42 -0
- package/lib/service/cosmo/namespace/index.js +65 -0
- package/lib/service/cosmo/organization/index.d.ts +47 -0
- package/lib/service/cosmo/organization/index.js +64 -0
- package/lib/service/cosmo/permissions/index.d.ts +131 -0
- package/lib/service/cosmo/permissions/index.js +181 -0
- package/lib/service/cosmo/production/index.d.ts +26 -0
- package/lib/service/cosmo/production/index.js +45 -0
- package/lib/service/cosmo/share/index.d.ts +161 -0
- package/lib/service/cosmo/share/index.js +215 -0
- package/lib/service/cosmo/space/index.d.ts +104 -0
- package/lib/service/cosmo/space/index.js +146 -0
- package/lib/service/cosmo/tag/index.d.ts +67 -0
- package/lib/service/cosmo/tag/index.js +93 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliCosmoSpace.js +8 -7
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliFuseSpace.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Pool.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Space.js +7 -6
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOAuthApp.js +7 -6
- package/lib/service/dali/avatar/DaliOrganization.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOrganization.js +7 -6
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
- package/lib/service/dali/avatar/DaliServiceAccount.js +7 -6
- package/lib/service/dali/avatar/DaliTeam.d.ts +10 -4
- package/lib/service/dali/avatar/DaliTeam.js +7 -6
- package/lib/service/dali/avatar/DaliUser.d.ts +10 -4
- package/lib/service/dali/avatar/DaliUser.js +7 -6
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +2 -5
- package/lib/service/fuse/index.d.ts +4 -2
- package/lib/service/fuse/index.js +2 -2
- package/lib/service/fuse/internal/index.d.ts +4 -2
- package/lib/service/fuse/internal/index.js +3 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +4 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.js +2 -2
- package/lib/service/fuse/internal/space/index.d.ts +7 -3
- package/lib/service/fuse/internal/space/index.js +6 -4
- package/lib/service/fuse/space/cronjob/index.d.ts +35 -13
- package/lib/service/fuse/space/cronjob/index.js +48 -50
- package/lib/service/fuse/space/cronjob/log/index.d.ts +8 -4
- package/lib/service/fuse/space/cronjob/log/index.js +5 -5
- package/lib/service/fuse/space/index.d.ts +27 -11
- package/lib/service/fuse/space/index.js +19 -18
- package/lib/service/high5/execution/index.d.ts +4 -2
- package/lib/service/high5/execution/index.js +3 -2
- package/lib/service/high5/execution/status/index.d.ts +5 -3
- package/lib/service/high5/execution/status/index.js +3 -3
- package/lib/service/high5/index.d.ts +7 -2
- package/lib/service/high5/index.js +9 -2
- package/lib/service/high5/internal/index.d.ts +4 -2
- package/lib/service/high5/internal/index.js +3 -2
- package/lib/service/high5/internal/space/index.d.ts +10 -3
- package/lib/service/high5/internal/space/index.js +13 -4
- package/lib/service/high5/internal/space/job/index.d.ts +7 -0
- package/lib/service/high5/internal/space/job/index.js +17 -0
- package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
- package/lib/service/high5/internal/space/job/log/index.js +34 -0
- package/lib/service/high5/joinToken/index.d.ts +14 -6
- package/lib/service/high5/joinToken/index.js +10 -9
- package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
- package/lib/service/high5/space/database/document/array/index.js +102 -0
- package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
- package/lib/service/{friday → high5}/space/database/document/index.js +31 -16
- package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
- package/lib/service/high5/space/database/document/number/index.js +77 -0
- package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
- package/lib/service/{friday → high5}/space/database/index.js +18 -17
- package/lib/service/high5/space/event/index.d.ts +17 -7
- package/lib/service/high5/space/event/index.js +12 -11
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -2
- package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
- package/lib/service/high5/space/event/stream/design/index.js +7 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +12 -10
- package/lib/service/high5/space/event/stream/index.d.ts +32 -12
- package/lib/service/high5/space/event/stream/index.js +22 -21
- package/lib/service/high5/space/execution/index.d.ts +19 -7
- package/lib/service/high5/space/execution/index.js +17 -12
- package/lib/service/high5/space/execution/log/index.d.ts +8 -4
- package/lib/service/high5/space/execution/log/index.js +5 -5
- package/lib/service/high5/space/execution/status/index.d.ts +7 -3
- package/lib/service/high5/space/execution/status/index.js +4 -4
- package/lib/service/high5/space/index.d.ts +43 -14
- package/lib/service/high5/space/index.js +45 -23
- package/lib/service/high5/space/job/index.d.ts +145 -0
- package/lib/service/high5/space/job/index.js +201 -0
- package/lib/service/high5/space/job/log/index.d.ts +35 -0
- package/lib/service/high5/space/job/log/index.js +58 -0
- package/lib/service/high5/space/node/index.d.ts +20 -8
- package/lib/service/high5/space/node/index.js +14 -13
- package/lib/service/high5/space/pool/index.d.ts +27 -11
- package/lib/service/high5/space/pool/index.js +19 -18
- package/lib/service/high5/space/secret/index.d.ts +17 -7
- package/lib/service/high5/space/secret/index.js +12 -11
- package/lib/service/high5/space/stat/index.d.ts +12 -0
- package/lib/service/high5/space/stat/index.js +31 -0
- package/lib/service/high5/space/wave/index.d.ts +16 -6
- package/lib/service/high5/space/wave/index.js +11 -10
- package/lib/service/high5/space/webhook/index.d.ts +32 -12
- package/lib/service/high5/space/webhook/index.js +25 -21
- package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
- package/lib/service/high5/space/webhook/log/index.js +2 -2
- package/lib/service/high5/stat/index.d.ts +11 -0
- package/lib/service/high5/stat/index.js +30 -0
- package/lib/service/high5/wave/s3/index.d.ts +31 -8
- package/lib/service/high5/wave/s3/index.js +42 -21
- package/lib/service/idp/guest/index.d.ts +42 -0
- package/lib/service/idp/guest/index.js +66 -0
- package/lib/service/idp/index.d.ts +25 -7
- package/lib/service/idp/index.js +23 -12
- package/lib/service/idp/internal/index.d.ts +5 -3
- package/lib/service/idp/internal/index.js +5 -3
- package/lib/service/idp/oauth/index.d.ts +16 -6
- package/lib/service/idp/oauth/index.js +15 -15
- package/lib/service/idp/organization/index.d.ts +19 -5
- package/lib/service/idp/organization/index.js +19 -8
- package/lib/service/idp/organization/license/index.d.ts +7 -3
- package/lib/service/idp/organization/license/index.js +4 -4
- package/lib/service/idp/organization/member/index.d.ts +20 -8
- package/lib/service/idp/organization/member/index.js +15 -13
- package/lib/service/idp/organization/member/invitations/index.d.ts +23 -9
- package/lib/service/idp/organization/member/invitations/index.js +72 -59
- package/lib/service/idp/organization/service-accounts/index.d.ts +20 -8
- package/lib/service/idp/organization/service-accounts/index.js +13 -12
- package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
- package/lib/service/idp/organization/settings/domain/index.js +9 -8
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
- package/lib/service/idp/organization/settings/domain/saml/index.js +19 -18
- package/lib/service/idp/organization/settings/oauth/index.d.ts +23 -9
- package/lib/service/idp/organization/settings/oauth/index.js +16 -15
- package/lib/service/idp/organization/stat/index.d.ts +11 -0
- package/lib/service/idp/organization/stat/index.js +30 -0
- package/lib/service/idp/organization/team/index.d.ts +22 -10
- package/lib/service/idp/organization/team/index.js +14 -13
- package/lib/service/idp/registration/index.d.ts +10 -4
- package/lib/service/idp/registration/index.js +15 -9
- package/lib/service/idp/user/index.d.ts +33 -11
- package/lib/service/idp/user/index.js +29 -16
- package/lib/service/idp/user/license/index.d.ts +7 -3
- package/lib/service/idp/user/license/index.js +4 -4
- package/lib/service/idp/user/message/index.d.ts +61 -0
- package/lib/service/idp/user/message/index.js +92 -0
- package/lib/service/idp/user/password/index.d.ts +4 -2
- package/lib/service/idp/user/password/index.js +2 -2
- package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
- package/lib/service/idp/user/settings/connections/index.js +2 -2
- package/lib/service/idp/user/settings/general/index.d.ts +10 -4
- package/lib/service/idp/user/settings/general/index.js +6 -6
- package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
- package/lib/service/idp/user/settings/notifications/index.js +4 -4
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
- package/lib/service/idp/user/settings/oauthApps/index.js +6 -5
- package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
- package/lib/service/idp/user/settings/pats/index.js +17 -15
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +13 -10
- package/lib/service/mailer/index.d.ts +4 -2
- package/lib/service/mailer/index.js +2 -2
- package/lib/service/mailer/internal/index.d.ts +13 -5
- package/lib/service/mailer/internal/index.js +8 -8
- package/lib/service/mothership/index.d.ts +35 -13
- package/lib/service/mothership/index.js +32 -17
- package/lib/service/nats/index.js +58 -43
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/{friday → shorts}/index.js +13 -10
- package/lib/service/shorts/internal/index.d.ts +72 -0
- package/lib/service/shorts/internal/index.js +104 -0
- package/package.json +1 -1
- package/lib/interfaces/friday/index.d.ts +0 -3
- package/lib/interfaces/friday/index.js +0 -19
- package/lib/interfaces/friday/space/index.d.ts +0 -21
- package/lib/interfaces/friday/space/index.js +0 -11
- package/lib/service/friday/index.d.ts +0 -13
- package/lib/service/friday/space/index.d.ts +0 -81
- package/lib/service/friday/space/index.js +0 -150
- /package/lib/interfaces/{friday/space/database → cosmo/location}/index.js +0 -0
- /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
|
@@ -17,7 +17,8 @@ var Origin;
|
|
|
17
17
|
Origin["Fuse"] = "fuse";
|
|
18
18
|
Origin["Mothership"] = "mothership";
|
|
19
19
|
Origin["Dali"] = "dali";
|
|
20
|
-
Origin["
|
|
20
|
+
Origin["Shorts"] = "shorts";
|
|
21
|
+
Origin["Cosmo"] = "cosmo";
|
|
21
22
|
})(Origin || (exports.Origin = Origin = {}));
|
|
22
23
|
var Event;
|
|
23
24
|
(function (Event) {
|
|
@@ -32,6 +33,7 @@ var Event;
|
|
|
32
33
|
Event["Stream"] = "stream";
|
|
33
34
|
Event["Mail"] = "mail";
|
|
34
35
|
Event["Webhook"] = "webhook";
|
|
36
|
+
Event["Job"] = "job";
|
|
35
37
|
Event["Cronjob"] = "cronjob";
|
|
36
38
|
Event["Secret"] = "secret";
|
|
37
39
|
Event["Agent"] = "agent";
|
|
@@ -39,6 +41,12 @@ var Event;
|
|
|
39
41
|
Event["ServiceAccount"] = "serviceAccount";
|
|
40
42
|
Event["Database"] = "database";
|
|
41
43
|
Event["Document"] = "document";
|
|
44
|
+
Event["Asset"] = "asset";
|
|
45
|
+
Event["Share"] = "share";
|
|
46
|
+
Event["Role"] = "role";
|
|
47
|
+
Event["Group"] = "group";
|
|
48
|
+
Event["Tag"] = "tag";
|
|
49
|
+
Event["Reference"] = "reference";
|
|
42
50
|
})(Event || (exports.Event = Event = {}));
|
|
43
51
|
var Type;
|
|
44
52
|
(function (Type) {
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { ReducedSpace } from "../../global";
|
|
2
|
+
import { SearchFilterComparatorString, SearchFilterType } from "../../global/SearchFilters";
|
|
3
|
+
import { ReducedOrganization } from "../../idp/organization";
|
|
4
|
+
import { ReducedUser } from "../../idp/user";
|
|
5
|
+
import { CosmoSpace } from "../space";
|
|
6
|
+
import { Tag } from "../tag/tag";
|
|
7
|
+
export interface BaseAsset {
|
|
8
|
+
_id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: ItemType;
|
|
11
|
+
createDate: number;
|
|
12
|
+
modifyDate: number;
|
|
13
|
+
creator: ReducedUser;
|
|
14
|
+
organization: ReducedOrganization;
|
|
15
|
+
space: ReducedSpace;
|
|
16
|
+
permissions?: string[];
|
|
17
|
+
breadcrumb?: (Asset | CosmoSpace)[];
|
|
18
|
+
}
|
|
19
|
+
export type Asset = (BaseAsset & {
|
|
20
|
+
type: ItemType.MEDIA_ASSET;
|
|
21
|
+
extension: string;
|
|
22
|
+
assetType: AssetType;
|
|
23
|
+
path: string;
|
|
24
|
+
status: UploadStatus;
|
|
25
|
+
tag?: Tag;
|
|
26
|
+
previewUrl?: string;
|
|
27
|
+
duration?: number;
|
|
28
|
+
frameRate?: number;
|
|
29
|
+
media?: Media[];
|
|
30
|
+
thumbnailUrl?: string;
|
|
31
|
+
namespaces?: Record<string, {
|
|
32
|
+
status: string;
|
|
33
|
+
tag?: Tag;
|
|
34
|
+
}>;
|
|
35
|
+
}) | Production | Folder | AssetReference;
|
|
36
|
+
export type Production = BaseAsset & {
|
|
37
|
+
type: ItemType.PRODUCTION;
|
|
38
|
+
};
|
|
39
|
+
export type Folder = BaseAsset & {
|
|
40
|
+
type: ItemType.FOLDER;
|
|
41
|
+
children?: Asset[];
|
|
42
|
+
};
|
|
43
|
+
export type AssetReference = BaseAsset & {
|
|
44
|
+
type: ItemType.REFERENCE;
|
|
45
|
+
reference: {
|
|
46
|
+
status: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare enum AssetType {
|
|
50
|
+
VIDEO = "VIDEO",
|
|
51
|
+
IMAGE = "IMAGE",
|
|
52
|
+
DOCUMENT = "DOCUMENT",
|
|
53
|
+
UNKNOWN = "UNKNOWN",
|
|
54
|
+
FOLDER = "FOLDER"
|
|
55
|
+
}
|
|
56
|
+
export declare enum ItemType {
|
|
57
|
+
ASSET = "ASSET",
|
|
58
|
+
MEDIA_ASSET = "MEDIA_ASSET",
|
|
59
|
+
REFERENCE = "REFERENCE",
|
|
60
|
+
SPACE = "SPACE",
|
|
61
|
+
PRODUCTION = "PRODUCTION",
|
|
62
|
+
PROJECT = "PROJECT",
|
|
63
|
+
FOLDER = "FOLDER",
|
|
64
|
+
COMMENT = "COMMENT",
|
|
65
|
+
TAG = "TAG"
|
|
66
|
+
}
|
|
67
|
+
export declare enum UploadStatus {
|
|
68
|
+
WAITING = "WAITING",
|
|
69
|
+
UPLOADING = "UPLOADING",
|
|
70
|
+
UPLOADED = "UPLOADED",
|
|
71
|
+
PROCESSING = "PROCESSING",
|
|
72
|
+
FINISHED = "FINISHED",
|
|
73
|
+
FAILED = "FAILED"
|
|
74
|
+
}
|
|
75
|
+
export type NamespaceRushStatus = "approved" | "rejected" | "none";
|
|
76
|
+
export interface Upload {
|
|
77
|
+
url: string;
|
|
78
|
+
token: string;
|
|
79
|
+
expiration: number;
|
|
80
|
+
libraryId?: string;
|
|
81
|
+
videoId?: string;
|
|
82
|
+
}
|
|
83
|
+
export declare enum AssetPermission {
|
|
84
|
+
CONTRIBUTE = "CONTRIBUTE",
|
|
85
|
+
DOWNLOAD = "DOWNLOAD",
|
|
86
|
+
DELETE = "DELETE",
|
|
87
|
+
READ_DETAILS = "READ_DETAILS"
|
|
88
|
+
}
|
|
89
|
+
type BaseMedia = {
|
|
90
|
+
url?: string;
|
|
91
|
+
};
|
|
92
|
+
export type Media = (BaseMedia & {
|
|
93
|
+
type: MediaType.VIDEO;
|
|
94
|
+
name: "original" | string;
|
|
95
|
+
fileSize: number;
|
|
96
|
+
metadata: (VideoMetadata | AudioMetadata)[];
|
|
97
|
+
}) | (BaseMedia & {
|
|
98
|
+
type: MediaType.AUDIO;
|
|
99
|
+
name: string;
|
|
100
|
+
metadata: AudioMetadata[];
|
|
101
|
+
}) | (BaseMedia & {
|
|
102
|
+
type: MediaType.IMAGE;
|
|
103
|
+
name: string;
|
|
104
|
+
}) | (BaseMedia & {
|
|
105
|
+
type: MediaType.UNKNOWN;
|
|
106
|
+
name: string;
|
|
107
|
+
});
|
|
108
|
+
export declare enum MediaType {
|
|
109
|
+
VIDEO = "VIDEO",
|
|
110
|
+
AUDIO = "AUDIO",
|
|
111
|
+
IMAGE = "IMAGE",
|
|
112
|
+
UNKNOWN = "UNKNOWN"
|
|
113
|
+
}
|
|
114
|
+
export declare enum MetadataType {
|
|
115
|
+
VIDEO = "VIDEO",
|
|
116
|
+
AUDIO = "AUDIO",
|
|
117
|
+
UNKNOWN = "UNKNOWN"
|
|
118
|
+
}
|
|
119
|
+
export interface VideoMetadata {
|
|
120
|
+
type: MetadataType.VIDEO;
|
|
121
|
+
codec: string;
|
|
122
|
+
frameRate: number;
|
|
123
|
+
pixelFormat: string;
|
|
124
|
+
aspectRatio: string;
|
|
125
|
+
colorSpace: string;
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
fieldOrder: string;
|
|
129
|
+
duration: number;
|
|
130
|
+
tcIn: string;
|
|
131
|
+
tcOut: string;
|
|
132
|
+
noOfFrames: number;
|
|
133
|
+
formatLongName: string;
|
|
134
|
+
}
|
|
135
|
+
export interface AudioMetadata {
|
|
136
|
+
type: MetadataType.AUDIO;
|
|
137
|
+
codec: string;
|
|
138
|
+
channels: number;
|
|
139
|
+
channelLayout: string;
|
|
140
|
+
bitRate: number;
|
|
141
|
+
sampleRate: number;
|
|
142
|
+
}
|
|
143
|
+
export interface CreateAsset {
|
|
144
|
+
name: string;
|
|
145
|
+
parentId?: string;
|
|
146
|
+
tags?: string[];
|
|
147
|
+
categories?: string[];
|
|
148
|
+
}
|
|
149
|
+
export interface PatchAsset {
|
|
150
|
+
tags?: string[];
|
|
151
|
+
categories?: string[];
|
|
152
|
+
}
|
|
153
|
+
export declare enum Resolution {
|
|
154
|
+
ORIGINAL = "original",
|
|
155
|
+
R1080 = "1080",
|
|
156
|
+
R720 = "720",
|
|
157
|
+
R480 = "480"
|
|
158
|
+
}
|
|
159
|
+
export declare const supportedFormats: string[];
|
|
160
|
+
export declare const searchParams: {
|
|
161
|
+
readonly type: {
|
|
162
|
+
readonly type: readonly [SearchFilterType.STRING, SearchFilterType.SELECT, SearchFilterType.TYPEAHEAD];
|
|
163
|
+
readonly comparators: readonly [SearchFilterComparatorString.IS, SearchFilterComparatorString.IS_NOT];
|
|
164
|
+
};
|
|
165
|
+
readonly _id: {
|
|
166
|
+
readonly type: readonly [SearchFilterType.STRING];
|
|
167
|
+
readonly comparators: readonly [SearchFilterComparatorString.IS, SearchFilterComparatorString.IS_NOT];
|
|
168
|
+
};
|
|
169
|
+
readonly name: {
|
|
170
|
+
readonly type: readonly [SearchFilterType.STRING, SearchFilterType.SELECT, SearchFilterType.TYPEAHEAD];
|
|
171
|
+
readonly comparators: readonly [SearchFilterComparatorString.IS, SearchFilterComparatorString.IS_NOT, SearchFilterComparatorString.CONTAINS];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
export interface AssetFilter {
|
|
175
|
+
key: keyof typeof searchParams;
|
|
176
|
+
type: (typeof searchParams)[this["key"]]["type"][number];
|
|
177
|
+
value: string;
|
|
178
|
+
comparator: (typeof searchParams)[this["key"]]["comparators"][number];
|
|
179
|
+
}
|
|
180
|
+
export declare enum AssetSearchContext {
|
|
181
|
+
ORGANIZATION = "ORGANIZATION",
|
|
182
|
+
TRASH = "TRASH",
|
|
183
|
+
SHARE = "SHARE"
|
|
184
|
+
}
|
|
185
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssetSearchContext = exports.searchParams = exports.supportedFormats = exports.Resolution = exports.MetadataType = exports.MediaType = exports.AssetPermission = exports.UploadStatus = exports.ItemType = exports.AssetType = void 0;
|
|
4
|
+
const SearchFilters_1 = require("../../global/SearchFilters");
|
|
5
|
+
var AssetType;
|
|
6
|
+
(function (AssetType) {
|
|
7
|
+
AssetType["VIDEO"] = "VIDEO";
|
|
8
|
+
AssetType["IMAGE"] = "IMAGE";
|
|
9
|
+
AssetType["DOCUMENT"] = "DOCUMENT";
|
|
10
|
+
AssetType["UNKNOWN"] = "UNKNOWN";
|
|
11
|
+
AssetType["FOLDER"] = "FOLDER";
|
|
12
|
+
})(AssetType || (exports.AssetType = AssetType = {}));
|
|
13
|
+
// These must correlate with the Neo4j labels!
|
|
14
|
+
var ItemType;
|
|
15
|
+
(function (ItemType) {
|
|
16
|
+
ItemType["ASSET"] = "ASSET";
|
|
17
|
+
ItemType["MEDIA_ASSET"] = "MEDIA_ASSET";
|
|
18
|
+
ItemType["REFERENCE"] = "REFERENCE";
|
|
19
|
+
ItemType["SPACE"] = "SPACE";
|
|
20
|
+
ItemType["PRODUCTION"] = "PRODUCTION";
|
|
21
|
+
ItemType["PROJECT"] = "PROJECT";
|
|
22
|
+
ItemType["FOLDER"] = "FOLDER";
|
|
23
|
+
ItemType["COMMENT"] = "COMMENT";
|
|
24
|
+
ItemType["TAG"] = "TAG";
|
|
25
|
+
})(ItemType || (exports.ItemType = ItemType = {}));
|
|
26
|
+
var UploadStatus;
|
|
27
|
+
(function (UploadStatus) {
|
|
28
|
+
UploadStatus["WAITING"] = "WAITING";
|
|
29
|
+
UploadStatus["UPLOADING"] = "UPLOADING";
|
|
30
|
+
UploadStatus["UPLOADED"] = "UPLOADED";
|
|
31
|
+
UploadStatus["PROCESSING"] = "PROCESSING";
|
|
32
|
+
UploadStatus["FINISHED"] = "FINISHED";
|
|
33
|
+
UploadStatus["FAILED"] = "FAILED";
|
|
34
|
+
})(UploadStatus || (exports.UploadStatus = UploadStatus = {}));
|
|
35
|
+
var AssetPermission;
|
|
36
|
+
(function (AssetPermission) {
|
|
37
|
+
AssetPermission["CONTRIBUTE"] = "CONTRIBUTE";
|
|
38
|
+
AssetPermission["DOWNLOAD"] = "DOWNLOAD";
|
|
39
|
+
AssetPermission["DELETE"] = "DELETE";
|
|
40
|
+
AssetPermission["READ_DETAILS"] = "READ_DETAILS";
|
|
41
|
+
})(AssetPermission || (exports.AssetPermission = AssetPermission = {}));
|
|
42
|
+
var MediaType;
|
|
43
|
+
(function (MediaType) {
|
|
44
|
+
MediaType["VIDEO"] = "VIDEO";
|
|
45
|
+
MediaType["AUDIO"] = "AUDIO";
|
|
46
|
+
MediaType["IMAGE"] = "IMAGE";
|
|
47
|
+
MediaType["UNKNOWN"] = "UNKNOWN";
|
|
48
|
+
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
49
|
+
var MetadataType;
|
|
50
|
+
(function (MetadataType) {
|
|
51
|
+
MetadataType["VIDEO"] = "VIDEO";
|
|
52
|
+
MetadataType["AUDIO"] = "AUDIO";
|
|
53
|
+
MetadataType["UNKNOWN"] = "UNKNOWN";
|
|
54
|
+
})(MetadataType || (exports.MetadataType = MetadataType = {}));
|
|
55
|
+
var Resolution;
|
|
56
|
+
(function (Resolution) {
|
|
57
|
+
Resolution["ORIGINAL"] = "original";
|
|
58
|
+
Resolution["R1080"] = "1080";
|
|
59
|
+
Resolution["R720"] = "720";
|
|
60
|
+
Resolution["R480"] = "480";
|
|
61
|
+
})(Resolution || (exports.Resolution = Resolution = {}));
|
|
62
|
+
exports.supportedFormats = [".mp4", ".mov", ".mkv", ".mxf"];
|
|
63
|
+
exports.searchParams = {
|
|
64
|
+
type: {
|
|
65
|
+
type: [SearchFilters_1.SearchFilterType.STRING, SearchFilters_1.SearchFilterType.SELECT, SearchFilters_1.SearchFilterType.TYPEAHEAD],
|
|
66
|
+
comparators: [SearchFilters_1.SearchFilterComparatorString.IS, SearchFilters_1.SearchFilterComparatorString.IS_NOT],
|
|
67
|
+
},
|
|
68
|
+
_id: {
|
|
69
|
+
type: [SearchFilters_1.SearchFilterType.STRING],
|
|
70
|
+
comparators: [SearchFilters_1.SearchFilterComparatorString.IS, SearchFilters_1.SearchFilterComparatorString.IS_NOT],
|
|
71
|
+
},
|
|
72
|
+
name: {
|
|
73
|
+
type: [SearchFilters_1.SearchFilterType.STRING, SearchFilters_1.SearchFilterType.SELECT, SearchFilters_1.SearchFilterType.TYPEAHEAD],
|
|
74
|
+
comparators: [SearchFilters_1.SearchFilterComparatorString.IS, SearchFilters_1.SearchFilterComparatorString.IS_NOT, SearchFilters_1.SearchFilterComparatorString.CONTAINS],
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
var AssetSearchContext;
|
|
78
|
+
(function (AssetSearchContext) {
|
|
79
|
+
AssetSearchContext["ORGANIZATION"] = "ORGANIZATION";
|
|
80
|
+
AssetSearchContext["TRASH"] = "TRASH";
|
|
81
|
+
AssetSearchContext["SHARE"] = "SHARE";
|
|
82
|
+
})(AssetSearchContext || (exports.AssetSearchContext = AssetSearchContext = {}));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReducedUser } from "../../idp";
|
|
2
|
+
export interface CreateComment {
|
|
3
|
+
refId: string;
|
|
4
|
+
text: string;
|
|
5
|
+
timestamp?: Timestamp;
|
|
6
|
+
annotation?: string;
|
|
7
|
+
mentions?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface EditComment {
|
|
10
|
+
text: string;
|
|
11
|
+
timestamp?: Timestamp;
|
|
12
|
+
annotation?: string;
|
|
13
|
+
mentions?: string[];
|
|
14
|
+
}
|
|
15
|
+
export declare enum CommentType {
|
|
16
|
+
COMMENT = "COMMENT",
|
|
17
|
+
REPLY = "REPLY"
|
|
18
|
+
}
|
|
19
|
+
export interface Comment {
|
|
20
|
+
_id: string;
|
|
21
|
+
text: string;
|
|
22
|
+
createDate: number;
|
|
23
|
+
timestamp?: Timestamp;
|
|
24
|
+
creator: ReducedUser;
|
|
25
|
+
assetId: string;
|
|
26
|
+
commentType: CommentType;
|
|
27
|
+
annotation?: string;
|
|
28
|
+
mentions?: ReducedUser[];
|
|
29
|
+
replies?: Reply[];
|
|
30
|
+
}
|
|
31
|
+
export interface Reply extends Omit<Comment, "timestamp" | "replies"> {
|
|
32
|
+
commentRef: string;
|
|
33
|
+
}
|
|
34
|
+
export interface Timestamp {
|
|
35
|
+
in: number;
|
|
36
|
+
out: number;
|
|
37
|
+
color: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommentType = void 0;
|
|
4
|
+
var CommentType;
|
|
5
|
+
(function (CommentType) {
|
|
6
|
+
CommentType["COMMENT"] = "COMMENT";
|
|
7
|
+
CommentType["REPLY"] = "REPLY";
|
|
8
|
+
})(CommentType || (exports.CommentType = CommentType = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare enum CosmoEventName {
|
|
2
|
+
HCLOUD_COSMO_SPACE_ADD = "hcloud.cosmo.space.add",
|
|
3
|
+
HCLOUD_COSMO_SPACE_RENAME = "hcloud.cosmo.space.rename",
|
|
4
|
+
HCLOUD_COSMO_SPACE_UPDATE = "hcloud.cosmo.space.update",
|
|
5
|
+
HCLOUD_COSMO_SPACE_DELETE = "hcloud.cosmo.space.delete",
|
|
6
|
+
HCLOUD_COSMO_SPACE_ASSET_ADD = "hcloud.cosmo.space.asset.add",
|
|
7
|
+
HCLOUD_COSMO_SPACE_ASSET_UPDATE = "hcloud.cosmo.space.asset.update",
|
|
8
|
+
HCLOUD_COSMO_SPACE_ASSET_MOVE = "hcloud.cosmo.space.asset.move",
|
|
9
|
+
HCLOUD_COSMO_SPACE_ASSET_DELETE = "hcloud.cosmo.space.asset.delete",
|
|
10
|
+
HCLOUD_COSMO_SPACE_ASSET_COMMENT_ADD = "hcloud.cosmo.space.asset.comment.add",
|
|
11
|
+
HCLOUD_COSMO_SPACE_ASSET_COMMENT_UPDATE = "hcloud.cosmo.space.asset.comment.update",
|
|
12
|
+
HCLOUD_COSMO_SPACE_ASSET_COMMENT_DELETE = "hcloud.cosmo.space.asset.comment.delete"
|
|
13
|
+
}
|
|
14
|
+
export interface CosmoEvents {
|
|
15
|
+
Space: {
|
|
16
|
+
"Space rename": CosmoEventName.HCLOUD_COSMO_SPACE_RENAME;
|
|
17
|
+
"Space update": CosmoEventName.HCLOUD_COSMO_SPACE_UPDATE;
|
|
18
|
+
"Space delete": CosmoEventName.HCLOUD_COSMO_SPACE_DELETE;
|
|
19
|
+
};
|
|
20
|
+
Asset: {
|
|
21
|
+
"Asset create": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_ADD;
|
|
22
|
+
"Asset update": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_UPDATE;
|
|
23
|
+
"Asset Move": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_MOVE;
|
|
24
|
+
"Asset Delete": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_DELETE;
|
|
25
|
+
};
|
|
26
|
+
Comment: {
|
|
27
|
+
"Comment create": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_COMMENT_ADD;
|
|
28
|
+
"Comment update": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_COMMENT_UPDATE;
|
|
29
|
+
"Comment delete": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_COMMENT_DELETE;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CosmoEventName = void 0;
|
|
4
|
+
var CosmoEventName;
|
|
5
|
+
(function (CosmoEventName) {
|
|
6
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ADD"] = "hcloud.cosmo.space.add";
|
|
7
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_RENAME"] = "hcloud.cosmo.space.rename";
|
|
8
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_UPDATE"] = "hcloud.cosmo.space.update";
|
|
9
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_DELETE"] = "hcloud.cosmo.space.delete";
|
|
10
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_ADD"] = "hcloud.cosmo.space.asset.add";
|
|
11
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_UPDATE"] = "hcloud.cosmo.space.asset.update";
|
|
12
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_MOVE"] = "hcloud.cosmo.space.asset.move";
|
|
13
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_DELETE"] = "hcloud.cosmo.space.asset.delete";
|
|
14
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_COMMENT_ADD"] = "hcloud.cosmo.space.asset.comment.add";
|
|
15
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_COMMENT_UPDATE"] = "hcloud.cosmo.space.asset.comment.update";
|
|
16
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_COMMENT_DELETE"] = "hcloud.cosmo.space.asset.comment.delete";
|
|
17
|
+
})(CosmoEventName || (exports.CosmoEventName = CosmoEventName = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NamespacePermission = void 0;
|
|
4
|
+
var NamespacePermission;
|
|
5
|
+
(function (NamespacePermission) {
|
|
6
|
+
NamespacePermission["READ_COMMENTS"] = "READ_COMMENTS";
|
|
7
|
+
NamespacePermission["WRITE_COMMENTS"] = "WRITE_COMMENTS";
|
|
8
|
+
NamespacePermission["READ_STATUS"] = "READ_STATUS";
|
|
9
|
+
})(NamespacePermission || (exports.NamespacePermission = NamespacePermission = {}));
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ReducedUser } from "../idp";
|
|
2
|
+
import { BaseAsset } from "./asset";
|
|
3
|
+
export declare enum Permissions {
|
|
4
|
+
VIEW_SPACE = "VIEW_SPACE",
|
|
5
|
+
VIEW_MEMBERS = "VIEW_MEMBERS",
|
|
6
|
+
UPDATE_MEMBERS = "UPDATE_MEMBERS",
|
|
7
|
+
VIEW_TRASHBIN = "VIEW_TRASHBIN",
|
|
8
|
+
RECOVER_TRASHBIN = "RECOVER_TRASHBIN",
|
|
9
|
+
EMPTY_TRASHBIN = "EMPTY_TRASHBIN",
|
|
10
|
+
VIEW_ROLES = "VIEW_ROLES",
|
|
11
|
+
CREATE_ROLES = "CREATE_ROLES",
|
|
12
|
+
EDIT_ROLES = "EDIT_ROLES",
|
|
13
|
+
DELETE_ROLES = "DELETE_ROLES",
|
|
14
|
+
ASSIGN_USER_ROLES = "ASSIGN_USER_ROLES",
|
|
15
|
+
UPDATE_SPACE_AVATAR = "UPDATE_SPACE_AVATAR",
|
|
16
|
+
UPDATE_SPACE_NAME = "UPDATE_SPACE_NAME",
|
|
17
|
+
DELETE_SPACE = "DELETE_SPACE",
|
|
18
|
+
CONNECT_HIGH5_SPACE = "CONNECT_HIGH5_SPACE",
|
|
19
|
+
VIEW_ASSETS = "VIEW_ASSETS",
|
|
20
|
+
VIEW_ASSET_DETAILS = "VIEW_ASSET_DETAILS",
|
|
21
|
+
VIEW_ASSET_ACTIVITY = "VIEW_ASSET_ACTIVITY",
|
|
22
|
+
DOWNLOAD_ASSETS = "DOWNLOAD_ASSETS",
|
|
23
|
+
CREATE_ASSETS = "CREATE_ASSETS",
|
|
24
|
+
UPDATE_ASSETS = "UPDATE_ASSETS",
|
|
25
|
+
DELETE_ASSETS = "DELETE_ASSETS",
|
|
26
|
+
COPY_ASSETS = "COPY_ASSETS",
|
|
27
|
+
MOVE_ASSETS = "MOVE_ASSETS",
|
|
28
|
+
RENAME_ASSETS = "RENAME_ASSETS",
|
|
29
|
+
SHARE_ASSETS = "SHARE_ASSETS",
|
|
30
|
+
VIEW_NAMESPACES = "VIEW_NAMESPACES",
|
|
31
|
+
EDIT_NAMESPACES = "EDIT_NAMESPACES",
|
|
32
|
+
CREATE_NAMESPACES = "CREATE_NAMESPACES",
|
|
33
|
+
DELETE_NAMESPACES = "DELETE_NAMESPACES",
|
|
34
|
+
VIEW_ASSET_TAGS = "VIEW_ASSET_TAGS",
|
|
35
|
+
WRITE_ASSET_TAGS = "WRITE_ASSET_TAGS",
|
|
36
|
+
VIEW_ASSET_STATUS = "VIEW_ASSET_STATUS",
|
|
37
|
+
WRITE_ASSET_STATUS = "WRITE_ASSET_STATUS",
|
|
38
|
+
VIEW_ASSET_COMMENTS = "VIEW_ASSET_COMMENTS",
|
|
39
|
+
CREATE_ASSET_COMMENTS = "CREATE_ASSET_COMMENTS",
|
|
40
|
+
EDIT_ASSET_COMMENTS = "EDIT_ASSET_COMMENTS",
|
|
41
|
+
DELETE_ASSET_COMMENTS = "DELETE_ASSET_COMMENTS",
|
|
42
|
+
VIEW_MENTIONS = "VIEW_MENTIONS",
|
|
43
|
+
VIEW_SHARES = "VIEW_SHARES",
|
|
44
|
+
EDIT_SHARES = "EDIT_SHARES",
|
|
45
|
+
DELETE_SHARES = "DELETE_SHARES",
|
|
46
|
+
ADD_USERS_TO_SHARES = "ADD_USERS_TO_SHARES",
|
|
47
|
+
REMOVE_USERS_FROM_SHARES = "REMOVE_USERS_FROM_SHARES"
|
|
48
|
+
}
|
|
49
|
+
export type Permission = {
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
category: PermissionCategory;
|
|
53
|
+
};
|
|
54
|
+
export declare enum PermissionCategory {
|
|
55
|
+
ASSET = "asset",
|
|
56
|
+
NAMESPACE = "namespace",
|
|
57
|
+
SPACE = "space",
|
|
58
|
+
SHARE = "share",
|
|
59
|
+
USER = "user"
|
|
60
|
+
}
|
|
61
|
+
export type AssetPermission = Omit<Permission, "category"> & {
|
|
62
|
+
category: PermissionCategory.ASSET;
|
|
63
|
+
};
|
|
64
|
+
export type NamespacePermission = Omit<Permission, "category"> & {
|
|
65
|
+
category: PermissionCategory.NAMESPACE;
|
|
66
|
+
};
|
|
67
|
+
export type SpacePermission = Omit<Permission, "category"> & {
|
|
68
|
+
category: PermissionCategory.SPACE;
|
|
69
|
+
};
|
|
70
|
+
export type SharePermission = Omit<Permission, "category"> & {
|
|
71
|
+
category: PermissionCategory.SHARE;
|
|
72
|
+
};
|
|
73
|
+
export type UserPermission = Omit<Permission, "category"> & {
|
|
74
|
+
category: PermissionCategory.USER;
|
|
75
|
+
};
|
|
76
|
+
export type PermissionDiscovery = {
|
|
77
|
+
[PermissionCategory.ASSET]: AssetPermission;
|
|
78
|
+
[PermissionCategory.NAMESPACE]: NamespacePermission;
|
|
79
|
+
[PermissionCategory.SPACE]: SpacePermission;
|
|
80
|
+
[PermissionCategory.SHARE]: SharePermission;
|
|
81
|
+
[PermissionCategory.USER]: UserPermission;
|
|
82
|
+
};
|
|
83
|
+
export type Role = {
|
|
84
|
+
_id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
createDate: number;
|
|
87
|
+
modifyDate: number;
|
|
88
|
+
creator: ReducedUser;
|
|
89
|
+
};
|
|
90
|
+
export type DetailedRole = Role & {
|
|
91
|
+
users: ReducedUser[];
|
|
92
|
+
permissions: Record<string, {
|
|
93
|
+
entity: Pick<BaseAsset, "_id" | "type" | "name">;
|
|
94
|
+
permissions: string[];
|
|
95
|
+
}>;
|
|
96
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermissionCategory = exports.Permissions = void 0;
|
|
4
|
+
var Permissions;
|
|
5
|
+
(function (Permissions) {
|
|
6
|
+
Permissions["VIEW_SPACE"] = "VIEW_SPACE";
|
|
7
|
+
Permissions["VIEW_MEMBERS"] = "VIEW_MEMBERS";
|
|
8
|
+
Permissions["UPDATE_MEMBERS"] = "UPDATE_MEMBERS";
|
|
9
|
+
Permissions["VIEW_TRASHBIN"] = "VIEW_TRASHBIN";
|
|
10
|
+
Permissions["RECOVER_TRASHBIN"] = "RECOVER_TRASHBIN";
|
|
11
|
+
Permissions["EMPTY_TRASHBIN"] = "EMPTY_TRASHBIN";
|
|
12
|
+
Permissions["VIEW_ROLES"] = "VIEW_ROLES";
|
|
13
|
+
Permissions["CREATE_ROLES"] = "CREATE_ROLES";
|
|
14
|
+
Permissions["EDIT_ROLES"] = "EDIT_ROLES";
|
|
15
|
+
Permissions["DELETE_ROLES"] = "DELETE_ROLES";
|
|
16
|
+
Permissions["ASSIGN_USER_ROLES"] = "ASSIGN_USER_ROLES";
|
|
17
|
+
Permissions["UPDATE_SPACE_AVATAR"] = "UPDATE_SPACE_AVATAR";
|
|
18
|
+
Permissions["UPDATE_SPACE_NAME"] = "UPDATE_SPACE_NAME";
|
|
19
|
+
Permissions["DELETE_SPACE"] = "DELETE_SPACE";
|
|
20
|
+
Permissions["CONNECT_HIGH5_SPACE"] = "CONNECT_HIGH5_SPACE";
|
|
21
|
+
Permissions["VIEW_ASSETS"] = "VIEW_ASSETS";
|
|
22
|
+
Permissions["VIEW_ASSET_DETAILS"] = "VIEW_ASSET_DETAILS";
|
|
23
|
+
Permissions["VIEW_ASSET_ACTIVITY"] = "VIEW_ASSET_ACTIVITY";
|
|
24
|
+
Permissions["DOWNLOAD_ASSETS"] = "DOWNLOAD_ASSETS";
|
|
25
|
+
Permissions["CREATE_ASSETS"] = "CREATE_ASSETS";
|
|
26
|
+
Permissions["UPDATE_ASSETS"] = "UPDATE_ASSETS";
|
|
27
|
+
Permissions["DELETE_ASSETS"] = "DELETE_ASSETS";
|
|
28
|
+
Permissions["COPY_ASSETS"] = "COPY_ASSETS";
|
|
29
|
+
Permissions["MOVE_ASSETS"] = "MOVE_ASSETS";
|
|
30
|
+
Permissions["RENAME_ASSETS"] = "RENAME_ASSETS";
|
|
31
|
+
Permissions["SHARE_ASSETS"] = "SHARE_ASSETS";
|
|
32
|
+
Permissions["VIEW_NAMESPACES"] = "VIEW_NAMESPACES";
|
|
33
|
+
Permissions["EDIT_NAMESPACES"] = "EDIT_NAMESPACES";
|
|
34
|
+
Permissions["CREATE_NAMESPACES"] = "CREATE_NAMESPACES";
|
|
35
|
+
Permissions["DELETE_NAMESPACES"] = "DELETE_NAMESPACES";
|
|
36
|
+
Permissions["VIEW_ASSET_TAGS"] = "VIEW_ASSET_TAGS";
|
|
37
|
+
Permissions["WRITE_ASSET_TAGS"] = "WRITE_ASSET_TAGS";
|
|
38
|
+
Permissions["VIEW_ASSET_STATUS"] = "VIEW_ASSET_STATUS";
|
|
39
|
+
Permissions["WRITE_ASSET_STATUS"] = "WRITE_ASSET_STATUS";
|
|
40
|
+
Permissions["VIEW_ASSET_COMMENTS"] = "VIEW_ASSET_COMMENTS";
|
|
41
|
+
Permissions["CREATE_ASSET_COMMENTS"] = "CREATE_ASSET_COMMENTS";
|
|
42
|
+
Permissions["EDIT_ASSET_COMMENTS"] = "EDIT_ASSET_COMMENTS";
|
|
43
|
+
Permissions["DELETE_ASSET_COMMENTS"] = "DELETE_ASSET_COMMENTS";
|
|
44
|
+
Permissions["VIEW_MENTIONS"] = "VIEW_MENTIONS";
|
|
45
|
+
Permissions["VIEW_SHARES"] = "VIEW_SHARES";
|
|
46
|
+
Permissions["EDIT_SHARES"] = "EDIT_SHARES";
|
|
47
|
+
Permissions["DELETE_SHARES"] = "DELETE_SHARES";
|
|
48
|
+
Permissions["ADD_USERS_TO_SHARES"] = "ADD_USERS_TO_SHARES";
|
|
49
|
+
Permissions["REMOVE_USERS_FROM_SHARES"] = "REMOVE_USERS_FROM_SHARES";
|
|
50
|
+
})(Permissions || (exports.Permissions = Permissions = {}));
|
|
51
|
+
var PermissionCategory;
|
|
52
|
+
(function (PermissionCategory) {
|
|
53
|
+
PermissionCategory["ASSET"] = "asset";
|
|
54
|
+
PermissionCategory["NAMESPACE"] = "namespace";
|
|
55
|
+
PermissionCategory["SPACE"] = "space";
|
|
56
|
+
PermissionCategory["SHARE"] = "share";
|
|
57
|
+
PermissionCategory["USER"] = "user";
|
|
58
|
+
})(PermissionCategory || (exports.PermissionCategory = PermissionCategory = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReducedUser } from "../../idp";
|
|
2
|
+
export interface Share {
|
|
3
|
+
_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
creator: ReducedUser;
|
|
6
|
+
createDate: number;
|
|
7
|
+
items: string[];
|
|
8
|
+
permissions: string[];
|
|
9
|
+
expires?: number;
|
|
10
|
+
password?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ShareCreate extends Omit<Share, "_id" | "createDate" | "creator"> {
|
|
13
|
+
password?: string;
|
|
14
|
+
expires?: number;
|
|
15
|
+
namespaces?: Record<string, string[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Array of emails
|
|
18
|
+
*/
|
|
19
|
+
users?: string[];
|
|
20
|
+
}
|
|
21
|
+
export type ShareWithUsers = Share & {
|
|
22
|
+
users: ReducedUser[];
|
|
23
|
+
};
|
|
24
|
+
export type SharePatch = Partial<Pick<ShareCreate, "name" | "expires" | "password"> & {
|
|
25
|
+
items: string[];
|
|
26
|
+
permissions: string[];
|
|
27
|
+
namespaces: Record<string, string[] | null>;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReducedTeam, ReducedUser } from "../../idp";
|
|
2
|
+
import { ItemType } from "../asset";
|
|
3
|
+
export interface CosmoSpace {
|
|
4
|
+
_id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
createDate: number;
|
|
7
|
+
avatarUrl: string;
|
|
8
|
+
creator: ReducedUser;
|
|
9
|
+
type: ItemType.SPACE;
|
|
10
|
+
high5_spaceName?: string;
|
|
11
|
+
high5_executionTarget?: string;
|
|
12
|
+
permissions?: string[];
|
|
13
|
+
storageUsed: number;
|
|
14
|
+
}
|
|
15
|
+
export interface High5SpaceInfo {
|
|
16
|
+
high5_spaceName: string;
|
|
17
|
+
executionTarget: string;
|
|
18
|
+
}
|
|
19
|
+
export type SpaceUser = (ReducedUser | ReducedTeam) & {
|
|
20
|
+
roles: {
|
|
21
|
+
name: string;
|
|
22
|
+
_id: string;
|
|
23
|
+
}[];
|
|
24
|
+
type: "user" | "team";
|
|
25
|
+
};
|