hcloud-sdk 18.0.0 → 19.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 +86 -175
- package/lib/Hcloud.d.ts +18 -3
- package/lib/Hcloud.js +113 -21
- package/lib/helper/ErrorHelper.js +5 -2
- package/lib/helper/ValidationHelper.d.ts +6 -4
- package/lib/helper/ValidationHelper.js +30 -18
- package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
- package/lib/interfaces/agent/logging/index.d.ts +2 -0
- package/lib/interfaces/{fuse → agent/logging}/index.js +2 -3
- package/lib/interfaces/agent/logging/log-collector.d.ts +35 -0
- package/lib/interfaces/agent/logging/log-collector.js +2 -0
- package/lib/interfaces/agent/module/index.d.ts +7 -0
- package/lib/interfaces/agent/module/index.js +2 -0
- package/lib/interfaces/auditor/index.d.ts +0 -1
- package/lib/interfaces/auditor/index.js +0 -1
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/cosmo/asset/index.d.ts +40 -9
- package/lib/interfaces/cosmo/asset/index.js +9 -1
- package/lib/interfaces/cosmo/comment/index.d.ts +4 -1
- package/lib/interfaces/cosmo/event/index.d.ts +34 -5
- package/lib/interfaces/cosmo/event/index.js +16 -2
- package/lib/interfaces/cosmo/share/index.d.ts +89 -7
- package/lib/interfaces/cosmo/share/index.js +21 -0
- package/lib/interfaces/cosmo/space/index.d.ts +6 -0
- package/lib/interfaces/cosmo/stats/index.d.ts +11 -0
- package/lib/interfaces/cosmo/stats/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +2 -1
- package/lib/interfaces/global/Products.d.ts +0 -1
- package/lib/interfaces/global/Products.js +0 -1
- package/lib/interfaces/global/Views.d.ts +0 -1
- package/lib/interfaces/global/Views.js +0 -1
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +1 -0
- package/lib/interfaces/high5/space/job/index.d.ts +64 -19
- package/lib/interfaces/high5/space/job/index.js +9 -6
- package/lib/interfaces/high5/wave/dependentInputs.d.ts +42 -0
- package/lib/interfaces/high5/wave/dependentInputs.js +144 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.d.ts +22 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.js +220 -0
- package/lib/interfaces/idp/index.d.ts +3 -3
- package/lib/interfaces/idp/index.js +3 -3
- package/lib/interfaces/idp/oauth/device.d.ts +18 -0
- package/lib/interfaces/idp/oauth/device.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +17 -4
- package/lib/interfaces/idp/organization/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/index.js +1 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
- package/lib/interfaces/idp/user/Message.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -9
- package/lib/interfaces/idp/user/Scopes.js +0 -12
- package/lib/interfaces/idp/user/index.d.ts +3 -0
- package/lib/interfaces/mailer/index.d.ts +20 -1
- package/lib/interfaces/mailer/index.js +14 -2
- package/lib/interfaces/nats/index.d.ts +30 -32
- package/lib/interfaces/nats/index.js +103 -117
- package/lib/interfaces/shorts/index.d.ts +7 -0
- package/lib/interfaces/shorts/index.js +6 -0
- package/lib/service/agent/bundle/dev/index.js +4 -1
- package/lib/service/agent/bundle/index.js +4 -1
- package/lib/service/agent/context/index.js +4 -1
- package/lib/service/agent/index.d.ts +6 -0
- package/lib/service/agent/index.js +18 -1
- package/lib/service/agent/installer/index.js +4 -1
- package/lib/service/agent/logging/index.d.ts +69 -0
- package/lib/service/agent/logging/index.js +117 -0
- package/lib/service/agent/module/index.d.ts +36 -0
- package/lib/service/agent/module/index.js +65 -0
- package/lib/service/auditor/index.js +4 -1
- package/lib/service/auditor/internal/index.js +4 -1
- package/lib/service/bouncer/features/index.js +4 -1
- package/lib/service/bouncer/index.js +5 -2
- package/lib/service/cosmo/asset/index.d.ts +49 -3
- package/lib/service/cosmo/asset/index.js +111 -5
- package/lib/service/cosmo/comment/index.d.ts +7 -36
- package/lib/service/cosmo/comment/index.js +18 -43
- package/lib/service/cosmo/event/index.js +4 -1
- package/lib/service/cosmo/folder/index.js +4 -1
- package/lib/service/cosmo/index.d.ts +3 -0
- package/lib/service/cosmo/index.js +11 -1
- package/lib/service/cosmo/internal/index.js +4 -1
- package/lib/service/cosmo/internal/space/index.js +4 -1
- package/lib/service/cosmo/location/index.js +4 -1
- package/lib/service/cosmo/namespace/index.d.ts +15 -1
- package/lib/service/cosmo/namespace/index.js +21 -1
- package/lib/service/cosmo/organization/index.js +4 -1
- package/lib/service/cosmo/permissions/index.js +4 -1
- package/lib/service/cosmo/production/index.js +4 -1
- package/lib/service/cosmo/share/index.d.ts +37 -29
- package/lib/service/cosmo/share/index.js +47 -35
- package/lib/service/cosmo/space/index.d.ts +28 -1
- package/lib/service/cosmo/space/index.js +45 -1
- package/lib/service/cosmo/stats/index.d.ts +35 -0
- package/lib/service/cosmo/stats/index.js +58 -0
- package/lib/service/cosmo/tag/index.js +4 -1
- package/lib/service/dali/DaliAvatar.d.ts +0 -6
- package/lib/service/dali/DaliAvatar.js +4 -11
- package/lib/service/dali/avatar/DaliCosmoSpace.js +4 -1
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +2 -1
- package/lib/service/dali/avatar/DaliHigh5Pool.js +5 -2
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +2 -1
- package/lib/service/dali/avatar/DaliHigh5Space.js +5 -2
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +2 -1
- package/lib/service/dali/avatar/DaliOAuthApp.js +5 -2
- package/lib/service/dali/avatar/DaliOrganization.d.ts +2 -1
- package/lib/service/dali/avatar/DaliOrganization.js +5 -2
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +1 -1
- package/lib/service/dali/avatar/DaliServiceAccount.js +6 -3
- package/lib/service/dali/avatar/DaliTeam.d.ts +2 -1
- package/lib/service/dali/avatar/DaliTeam.js +5 -2
- package/lib/service/dali/avatar/DaliUser.d.ts +2 -1
- package/lib/service/dali/avatar/DaliUser.js +5 -2
- package/lib/service/dali/index.js +4 -1
- package/lib/service/high5/execution/index.js +4 -1
- package/lib/service/high5/execution/log/index.js +4 -1
- package/lib/service/high5/execution/status/index.js +4 -1
- package/lib/service/high5/index.js +4 -1
- package/lib/service/high5/internal/index.js +4 -1
- package/lib/service/high5/internal/space/index.js +4 -1
- package/lib/service/high5/internal/space/job/index.js +4 -1
- package/lib/service/high5/internal/space/job/log/index.js +4 -1
- package/lib/service/high5/joinToken/index.js +4 -1
- package/lib/service/high5/space/database/document/array/index.js +4 -1
- package/lib/service/high5/space/database/document/index.js +4 -1
- package/lib/service/high5/space/database/document/number/index.js +4 -1
- package/lib/service/high5/space/database/index.js +4 -1
- package/lib/service/high5/space/event/index.js +4 -1
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +4 -1
- package/lib/service/high5/space/event/stream/design/index.js +6 -3
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +4 -1
- package/lib/service/high5/space/event/stream/index.js +4 -1
- package/lib/service/high5/space/execution/index.js +4 -1
- package/lib/service/high5/space/execution/log/index.js +4 -1
- package/lib/service/high5/space/execution/status/index.js +4 -1
- package/lib/service/high5/space/index.d.ts +10 -0
- package/lib/service/high5/space/index.js +25 -5
- package/lib/service/high5/space/job/index.js +4 -1
- package/lib/service/high5/space/job/log/index.js +4 -1
- package/lib/service/high5/space/node/index.js +4 -1
- package/lib/service/high5/space/pool/index.d.ts +11 -0
- package/lib/service/high5/space/pool/index.js +22 -1
- package/lib/service/high5/space/secret/index.js +4 -1
- package/lib/service/high5/space/stat/index.js +4 -1
- package/lib/service/high5/space/wave/index.js +4 -1
- package/lib/service/high5/space/webhook/index.js +4 -1
- package/lib/service/high5/space/webhook/log/index.js +4 -1
- package/lib/service/high5/stat/index.js +4 -1
- package/lib/service/high5/wave/index.js +4 -1
- package/lib/service/high5/wave/s3/index.js +5 -2
- package/lib/service/idp/guest/index.js +4 -1
- package/lib/service/idp/index.js +4 -1
- package/lib/service/idp/internal/index.js +4 -1
- package/lib/service/idp/oauth/device.d.ts +131 -0
- package/lib/service/idp/oauth/device.js +177 -0
- package/lib/service/idp/oauth/index.d.ts +3 -0
- package/lib/service/idp/oauth/index.js +11 -1
- package/lib/service/idp/organization/index.d.ts +9 -0
- package/lib/service/idp/organization/index.js +22 -3
- package/lib/service/idp/organization/license/index.js +4 -1
- package/lib/service/idp/organization/member/index.js +5 -2
- package/lib/service/idp/organization/member/invitations/index.d.ts +19 -0
- package/lib/service/idp/organization/member/invitations/index.js +23 -1
- package/lib/service/idp/organization/service-accounts/index.d.ts +11 -1
- package/lib/service/idp/organization/service-accounts/index.js +22 -2
- package/lib/service/idp/organization/settings/domain/index.js +4 -1
- package/lib/service/idp/organization/settings/domain/saml/index.js +4 -1
- package/lib/service/idp/organization/settings/index.js +4 -1
- package/lib/service/idp/organization/settings/oauth/index.d.ts +10 -0
- package/lib/service/idp/organization/settings/oauth/index.js +21 -1
- package/lib/service/idp/organization/stat/index.js +4 -1
- package/lib/service/idp/organization/team/index.d.ts +10 -0
- package/lib/service/idp/organization/team/index.js +21 -1
- package/lib/service/idp/registration/index.js +4 -1
- package/lib/service/idp/user/index.d.ts +8 -0
- package/lib/service/idp/user/index.js +20 -3
- package/lib/service/idp/user/license/index.js +4 -1
- package/lib/service/idp/user/message/index.d.ts +1 -0
- package/lib/service/idp/user/message/index.js +4 -1
- package/lib/service/idp/user/password/index.js +4 -1
- package/lib/service/idp/user/settings/connections/index.js +4 -1
- package/lib/service/idp/user/settings/general/index.js +4 -1
- package/lib/service/idp/user/settings/index.js +4 -1
- package/lib/service/idp/user/settings/notifications/index.js +4 -1
- package/lib/service/idp/user/settings/oauthApps/index.js +4 -1
- package/lib/service/idp/user/settings/pats/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +4 -1
- package/lib/service/mailer/index.js +5 -2
- package/lib/service/mailer/internal/index.d.ts +2 -2
- package/lib/service/mailer/internal/index.js +5 -2
- package/lib/service/mothership/index.js +4 -1
- package/lib/service/nats/index.d.ts +7 -0
- package/lib/service/nats/index.js +19 -1
- package/lib/service/shorts/index.js +4 -1
- package/lib/service/shorts/internal/index.d.ts +6 -3
- package/lib/service/shorts/internal/index.js +20 -6
- package/lib/utils/bouncer/features/Provider.js +0 -1
- package/package.json +2 -2
- package/lib/interfaces/fuse/index.d.ts +0 -3
- package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +0 -38
- package/lib/interfaces/fuse/space/cronjob/Cronjob.js +0 -8
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +0 -16
- package/lib/interfaces/fuse/space/index.d.ts +0 -22
- package/lib/interfaces/fuse/space/index.js +0 -11
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -32
- package/lib/service/dali/avatar/DaliFuseSpace.js +0 -59
- package/lib/service/fuse/index.d.ts +0 -20
- package/lib/service/fuse/index.js +0 -48
- package/lib/service/fuse/internal/index.d.ts +0 -10
- package/lib/service/fuse/internal/index.js +0 -32
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +0 -7
- package/lib/service/fuse/internal/space/cronjob/index.js +0 -17
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +0 -17
- package/lib/service/fuse/internal/space/cronjob/log/index.js +0 -34
- package/lib/service/fuse/internal/space/index.d.ts +0 -26
- package/lib/service/fuse/internal/space/index.js +0 -51
- package/lib/service/fuse/space/cronjob/index.d.ts +0 -145
- package/lib/service/fuse/space/cronjob/index.js +0 -201
- package/lib/service/fuse/space/cronjob/log/index.d.ts +0 -35
- package/lib/service/fuse/space/cronjob/log/index.js +0 -58
- package/lib/service/fuse/space/index.d.ts +0 -97
- package/lib/service/fuse/space/index.js +0 -153
- /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/cloudwatch.js} +0 -0
|
@@ -5,6 +5,8 @@ exports.ValidationHelper = ValidationHelper;
|
|
|
5
5
|
var Entity;
|
|
6
6
|
(function (Entity) {
|
|
7
7
|
Entity["USER_NAME"] = "USER_NAME";
|
|
8
|
+
Entity["USER_PASSWORD"] = "USER_PASSWORD";
|
|
9
|
+
Entity["OAUTH_SECRET_NAME"] = "OAUTH_SECRET_NAME";
|
|
8
10
|
Entity["ORGANIZATION_NAME"] = "ORGANIZATION_NAME";
|
|
9
11
|
Entity["USER_ORGANIZATION_NAME"] = "USER_ORGANIZATION_NAME";
|
|
10
12
|
Entity["TEAM_NAME"] = "TEAM_NAME";
|
|
@@ -43,15 +45,15 @@ var Entity;
|
|
|
43
45
|
Entity["JOB"] = "JOB";
|
|
44
46
|
Entity["JOB_ID"] = "JOB_ID";
|
|
45
47
|
Entity["JOB_LOG_ID"] = "JOB_LOG_ID";
|
|
46
|
-
Entity["FUSE_JOB"] = "FUSE_JOB";
|
|
47
|
-
Entity["CRONJOB_ID"] = "CRONJOB_ID";
|
|
48
|
-
Entity["CRONJOB_LOG_ID"] = "CRONJOB_LOG_ID";
|
|
49
48
|
Entity["NAMESPACE_NAME"] = "NAMESPACE_NAME";
|
|
50
49
|
Entity["MESSAGE_ID"] = "MESSAGE_ID";
|
|
51
50
|
Entity["ARRAY_INDEX"] = "ARRAY_INDEX";
|
|
52
51
|
Entity["URL_SLUG"] = "URL_SLUG";
|
|
52
|
+
Entity["LONG_URL_SLUG"] = "LONG_URL_SLUG";
|
|
53
53
|
Entity["TAG_NAME"] = "TAG_NAME";
|
|
54
54
|
Entity["TAG_COLOR"] = "TAG_COLOR";
|
|
55
|
+
Entity["MODULE_NAME"] = "MODULE_NAME";
|
|
56
|
+
Entity["LOG_COLLECTOR_NAME"] = "LOG_COLLECTOR_NAME";
|
|
55
57
|
})(Entity || (exports.Entity = Entity = {}));
|
|
56
58
|
class EntityDetails {
|
|
57
59
|
constructor(name) {
|
|
@@ -117,6 +119,16 @@ const entityCollection = {
|
|
|
117
119
|
minLength: 3,
|
|
118
120
|
maxLength: 255,
|
|
119
121
|
},
|
|
122
|
+
[Entity.USER_PASSWORD]: {
|
|
123
|
+
pattern: /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,255}$/i,
|
|
124
|
+
minLength: 8,
|
|
125
|
+
maxLength: 255,
|
|
126
|
+
},
|
|
127
|
+
[Entity.OAUTH_SECRET_NAME]: {
|
|
128
|
+
pattern: /^[\w\-.]{1,255}$/i,
|
|
129
|
+
minLength: 1,
|
|
130
|
+
maxLength: 255,
|
|
131
|
+
},
|
|
120
132
|
[Entity.ORGANIZATION_NAME]: {
|
|
121
133
|
// Case-insensitive. No spaces or other special characters allowed. Cannot start with a dash, end with a dash, or contain double dashes
|
|
122
134
|
pattern: /^(?!-)(?!.*--)[a-zA-Z0-9-.]{3,64}(?<!-)$/i,
|
|
@@ -311,21 +323,6 @@ const entityCollection = {
|
|
|
311
323
|
minLength: 24,
|
|
312
324
|
maxLength: 24,
|
|
313
325
|
},
|
|
314
|
-
[Entity.FUSE_JOB]: {
|
|
315
|
-
pattern: /^.{1,64}$/i,
|
|
316
|
-
minLength: 1,
|
|
317
|
-
maxLength: 64,
|
|
318
|
-
},
|
|
319
|
-
[Entity.CRONJOB_ID]: {
|
|
320
|
-
pattern: /^[a-fA-F0-9]{24}$/i,
|
|
321
|
-
minLength: 24,
|
|
322
|
-
maxLength: 24,
|
|
323
|
-
},
|
|
324
|
-
[Entity.CRONJOB_LOG_ID]: {
|
|
325
|
-
pattern: /^[a-fA-F0-9]{24}$/i,
|
|
326
|
-
minLength: 24,
|
|
327
|
-
maxLength: 24,
|
|
328
|
-
},
|
|
329
326
|
[Entity.NAMESPACE_NAME]: {
|
|
330
327
|
// Case-insensitive. No spaces or other special characters allowed. Cannot start with a dash, end with a dash, or contain double dashes
|
|
331
328
|
pattern: /^(?!-)(?!.*--)[a-zA-Z0-9-.]{3,64}(?<!-)$/i,
|
|
@@ -347,6 +344,11 @@ const entityCollection = {
|
|
|
347
344
|
minLength: 6,
|
|
348
345
|
maxLength: 6,
|
|
349
346
|
},
|
|
347
|
+
[Entity.LONG_URL_SLUG]: {
|
|
348
|
+
pattern: /^[A-NP-Za-km-z1-9]{34}$/i,
|
|
349
|
+
minLength: 34,
|
|
350
|
+
maxLength: 34,
|
|
351
|
+
},
|
|
350
352
|
[Entity.TAG_NAME]: {
|
|
351
353
|
pattern: /^[a-zA-Z0-9 ]{1,20}$/i,
|
|
352
354
|
minLength: 1,
|
|
@@ -357,4 +359,14 @@ const entityCollection = {
|
|
|
357
359
|
minLength: 7,
|
|
358
360
|
maxLength: 7,
|
|
359
361
|
},
|
|
362
|
+
[Entity.MODULE_NAME]: {
|
|
363
|
+
pattern: /^[\w-.]{3,64}$/i,
|
|
364
|
+
minLength: 3,
|
|
365
|
+
maxLength: 64,
|
|
366
|
+
},
|
|
367
|
+
[Entity.LOG_COLLECTOR_NAME]: {
|
|
368
|
+
pattern: /^[\w-.]{1,64}$/i,
|
|
369
|
+
minLength: 1,
|
|
370
|
+
maxLength: 64,
|
|
371
|
+
},
|
|
360
372
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface AddCloudWatchDto {
|
|
2
|
+
logGroupName?: string;
|
|
3
|
+
logStreamName?: string;
|
|
4
|
+
awsRegion?: string;
|
|
5
|
+
retentionInDays?: number;
|
|
6
|
+
uploadRate: number;
|
|
7
|
+
level?: string;
|
|
8
|
+
jsonMessage: boolean;
|
|
9
|
+
awsOptions?: {
|
|
10
|
+
region?: string;
|
|
11
|
+
credentials?: {
|
|
12
|
+
accessKeyId: string;
|
|
13
|
+
secretAccessKey: string;
|
|
14
|
+
sessionToken?: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface CloudWatchDto {
|
|
19
|
+
name: string;
|
|
20
|
+
logGroupName?: string;
|
|
21
|
+
logStreamName?: string;
|
|
22
|
+
level: string;
|
|
23
|
+
}
|
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./space/cronjob/CronjobLog"), exports);
|
|
17
|
+
__exportStar(require("./cloudwatch"), exports);
|
|
18
|
+
__exportStar(require("./log-collector"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface AddLogCollectorDto {
|
|
2
|
+
name: string;
|
|
3
|
+
host: string;
|
|
4
|
+
port?: number;
|
|
5
|
+
path: string;
|
|
6
|
+
ssl: boolean;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
auth?: {
|
|
9
|
+
username: string;
|
|
10
|
+
password: string;
|
|
11
|
+
};
|
|
12
|
+
headers?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
batch?: boolean;
|
|
16
|
+
batchInterval?: number;
|
|
17
|
+
batchCount?: number;
|
|
18
|
+
level?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface LogCollectorDto {
|
|
21
|
+
name: string;
|
|
22
|
+
url: string;
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
auth?: {
|
|
25
|
+
username: string;
|
|
26
|
+
password: string;
|
|
27
|
+
};
|
|
28
|
+
headers?: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
};
|
|
31
|
+
batch?: boolean;
|
|
32
|
+
batchInterval?: number;
|
|
33
|
+
batchCount?: number;
|
|
34
|
+
level?: string;
|
|
35
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReducedSpace } from "../../global";
|
|
2
2
|
import { SearchFilterComparatorString, SearchFilterType } from "../../global/SearchFilters";
|
|
3
|
+
import { ReducedTeam } from "../../idp";
|
|
3
4
|
import { ReducedOrganization } from "../../idp/organization";
|
|
4
5
|
import { ReducedUser } from "../../idp/user";
|
|
5
6
|
import { CosmoSpace } from "../space";
|
|
@@ -16,14 +17,16 @@ export interface BaseAsset {
|
|
|
16
17
|
permissions?: string[];
|
|
17
18
|
breadcrumb?: (Asset | CosmoSpace)[];
|
|
18
19
|
}
|
|
19
|
-
export type Asset =
|
|
20
|
+
export type Asset = BaseAsset & ({
|
|
20
21
|
type: ItemType.MEDIA_ASSET;
|
|
21
22
|
extension: string;
|
|
22
23
|
assetType: AssetType;
|
|
23
24
|
path: string;
|
|
24
25
|
status: UploadStatus;
|
|
26
|
+
progress: number;
|
|
25
27
|
tag?: Tag;
|
|
26
28
|
previewUrl?: string;
|
|
29
|
+
tilePreviewVttUrl?: string;
|
|
27
30
|
duration?: number;
|
|
28
31
|
frameRate?: number;
|
|
29
32
|
media?: Media[];
|
|
@@ -31,16 +34,17 @@ export type Asset = (BaseAsset & {
|
|
|
31
34
|
namespaces?: Record<string, {
|
|
32
35
|
status: string;
|
|
33
36
|
tag?: Tag;
|
|
37
|
+
metadata?: NamespaceMetadata;
|
|
34
38
|
}>;
|
|
35
|
-
}
|
|
36
|
-
export type Production =
|
|
39
|
+
} | Production | Folder | AssetReference);
|
|
40
|
+
export type Production = {
|
|
37
41
|
type: ItemType.PRODUCTION;
|
|
38
42
|
};
|
|
39
|
-
export type Folder =
|
|
43
|
+
export type Folder = {
|
|
40
44
|
type: ItemType.FOLDER;
|
|
41
45
|
children?: Asset[];
|
|
42
46
|
};
|
|
43
|
-
export type AssetReference =
|
|
47
|
+
export type AssetReference = {
|
|
44
48
|
type: ItemType.REFERENCE;
|
|
45
49
|
reference: {
|
|
46
50
|
status: string;
|
|
@@ -70,7 +74,8 @@ export declare enum UploadStatus {
|
|
|
70
74
|
UPLOADED = "UPLOADED",
|
|
71
75
|
PROCESSING = "PROCESSING",
|
|
72
76
|
FINISHED = "FINISHED",
|
|
73
|
-
FAILED = "FAILED"
|
|
77
|
+
FAILED = "FAILED",
|
|
78
|
+
POST_PROCESSING = "POST_PROCESSING"
|
|
74
79
|
}
|
|
75
80
|
export type NamespaceRushStatus = "approved" | "rejected" | "none";
|
|
76
81
|
export interface Upload {
|
|
@@ -89,6 +94,11 @@ export declare enum AssetPermission {
|
|
|
89
94
|
type BaseMedia = {
|
|
90
95
|
url?: string;
|
|
91
96
|
};
|
|
97
|
+
export type Mentionable = (ReducedUser & {
|
|
98
|
+
type: "user";
|
|
99
|
+
}) | (ReducedTeam & {
|
|
100
|
+
type: "team";
|
|
101
|
+
});
|
|
92
102
|
export type Media = (BaseMedia & {
|
|
93
103
|
type: MediaType.VIDEO;
|
|
94
104
|
name: "original" | string;
|
|
@@ -101,6 +111,9 @@ export type Media = (BaseMedia & {
|
|
|
101
111
|
}) | (BaseMedia & {
|
|
102
112
|
type: MediaType.IMAGE;
|
|
103
113
|
name: string;
|
|
114
|
+
}) | (BaseMedia & {
|
|
115
|
+
type: MediaType.VTT;
|
|
116
|
+
name: string;
|
|
104
117
|
}) | (BaseMedia & {
|
|
105
118
|
type: MediaType.UNKNOWN;
|
|
106
119
|
name: string;
|
|
@@ -109,7 +122,8 @@ export declare enum MediaType {
|
|
|
109
122
|
VIDEO = "VIDEO",
|
|
110
123
|
AUDIO = "AUDIO",
|
|
111
124
|
IMAGE = "IMAGE",
|
|
112
|
-
UNKNOWN = "UNKNOWN"
|
|
125
|
+
UNKNOWN = "UNKNOWN",
|
|
126
|
+
VTT = "VTT"
|
|
113
127
|
}
|
|
114
128
|
export declare enum MetadataType {
|
|
115
129
|
VIDEO = "VIDEO",
|
|
@@ -127,8 +141,8 @@ export interface VideoMetadata {
|
|
|
127
141
|
height: number;
|
|
128
142
|
fieldOrder: string;
|
|
129
143
|
duration: number;
|
|
130
|
-
tcIn:
|
|
131
|
-
tcOut:
|
|
144
|
+
tcIn: number;
|
|
145
|
+
tcOut: number;
|
|
132
146
|
noOfFrames: number;
|
|
133
147
|
formatLongName: string;
|
|
134
148
|
}
|
|
@@ -182,4 +196,21 @@ export declare enum AssetSearchContext {
|
|
|
182
196
|
TRASH = "TRASH",
|
|
183
197
|
SHARE = "SHARE"
|
|
184
198
|
}
|
|
199
|
+
export declare enum SubscriptionFilter {
|
|
200
|
+
STATUS = "status",
|
|
201
|
+
TAGS = "tags",
|
|
202
|
+
COMMENTS = "comments"
|
|
203
|
+
}
|
|
204
|
+
export type NamespaceMetadata = Record<string, string | number | boolean | (string | number | boolean)[]>;
|
|
205
|
+
export type VTTThumbnail = {
|
|
206
|
+
start: number;
|
|
207
|
+
end: number;
|
|
208
|
+
url: string;
|
|
209
|
+
xywh?: {
|
|
210
|
+
x: number;
|
|
211
|
+
y: number;
|
|
212
|
+
w: number;
|
|
213
|
+
h: number;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
185
216
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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;
|
|
3
|
+
exports.SubscriptionFilter = exports.AssetSearchContext = exports.searchParams = exports.supportedFormats = exports.Resolution = exports.MetadataType = exports.MediaType = exports.AssetPermission = exports.UploadStatus = exports.ItemType = exports.AssetType = void 0;
|
|
4
4
|
const SearchFilters_1 = require("../../global/SearchFilters");
|
|
5
5
|
var AssetType;
|
|
6
6
|
(function (AssetType) {
|
|
@@ -31,6 +31,7 @@ var UploadStatus;
|
|
|
31
31
|
UploadStatus["PROCESSING"] = "PROCESSING";
|
|
32
32
|
UploadStatus["FINISHED"] = "FINISHED";
|
|
33
33
|
UploadStatus["FAILED"] = "FAILED";
|
|
34
|
+
UploadStatus["POST_PROCESSING"] = "POST_PROCESSING";
|
|
34
35
|
})(UploadStatus || (exports.UploadStatus = UploadStatus = {}));
|
|
35
36
|
var AssetPermission;
|
|
36
37
|
(function (AssetPermission) {
|
|
@@ -45,6 +46,7 @@ var MediaType;
|
|
|
45
46
|
MediaType["AUDIO"] = "AUDIO";
|
|
46
47
|
MediaType["IMAGE"] = "IMAGE";
|
|
47
48
|
MediaType["UNKNOWN"] = "UNKNOWN";
|
|
49
|
+
MediaType["VTT"] = "VTT";
|
|
48
50
|
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
49
51
|
var MetadataType;
|
|
50
52
|
(function (MetadataType) {
|
|
@@ -80,3 +82,9 @@ var AssetSearchContext;
|
|
|
80
82
|
AssetSearchContext["TRASH"] = "TRASH";
|
|
81
83
|
AssetSearchContext["SHARE"] = "SHARE";
|
|
82
84
|
})(AssetSearchContext || (exports.AssetSearchContext = AssetSearchContext = {}));
|
|
85
|
+
var SubscriptionFilter;
|
|
86
|
+
(function (SubscriptionFilter) {
|
|
87
|
+
SubscriptionFilter["STATUS"] = "status";
|
|
88
|
+
SubscriptionFilter["TAGS"] = "tags";
|
|
89
|
+
SubscriptionFilter["COMMENTS"] = "comments";
|
|
90
|
+
})(SubscriptionFilter || (exports.SubscriptionFilter = SubscriptionFilter = {}));
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { ReducedUser } from "../../idp";
|
|
1
|
+
import { ReducedTeam, ReducedUser } from "../../idp";
|
|
2
2
|
export interface CreateComment {
|
|
3
3
|
refId: string;
|
|
4
4
|
text: string;
|
|
5
5
|
timestamp?: Timestamp;
|
|
6
6
|
annotation?: string;
|
|
7
7
|
mentions?: string[];
|
|
8
|
+
mentionsTeams?: string[];
|
|
8
9
|
}
|
|
9
10
|
export interface EditComment {
|
|
10
11
|
text: string;
|
|
11
12
|
timestamp?: Timestamp;
|
|
12
13
|
annotation?: string;
|
|
13
14
|
mentions?: string[];
|
|
15
|
+
mentionsTeams?: string[];
|
|
14
16
|
}
|
|
15
17
|
export declare enum CommentType {
|
|
16
18
|
COMMENT = "COMMENT",
|
|
@@ -26,6 +28,7 @@ export interface Comment {
|
|
|
26
28
|
commentType: CommentType;
|
|
27
29
|
annotation?: string;
|
|
28
30
|
mentions?: ReducedUser[];
|
|
31
|
+
mentionedTeams?: ReducedTeam[];
|
|
29
32
|
replies?: Reply[];
|
|
30
33
|
}
|
|
31
34
|
export interface Reply extends Omit<Comment, "timestamp" | "replies"> {
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
export declare enum CosmoEventName {
|
|
2
|
-
HCLOUD_COSMO_SPACE_ADD = "hcloud.cosmo.space.add",
|
|
3
2
|
HCLOUD_COSMO_SPACE_RENAME = "hcloud.cosmo.space.rename",
|
|
4
|
-
HCLOUD_COSMO_SPACE_UPDATE = "hcloud.cosmo.space.update",
|
|
5
3
|
HCLOUD_COSMO_SPACE_DELETE = "hcloud.cosmo.space.delete",
|
|
4
|
+
HCLOUD_COSMO_SPACE_MEMBER_ADD = "hcloud.cosmo.space.member.add",
|
|
5
|
+
HCLOUD_COSMO_SPACE_MEMBER_REMOVE = "hcloud.cosmo.space.member.remove",
|
|
6
|
+
HCLOUD_COSMO_SPACE_MEMBER_UPDATE = "hcloud.cosmo.space.member.update",
|
|
6
7
|
HCLOUD_COSMO_SPACE_ASSET_ADD = "hcloud.cosmo.space.asset.add",
|
|
8
|
+
HCLOUD_COSMO_SPACE_ASSET_UPLOAD_STARTED = "hcloud.cosmo.space.asset.upload.started",
|
|
9
|
+
HCLOUD_COSMO_SPACE_ASSET_READY = "hcloud.cosmo.space.asset.ready",
|
|
7
10
|
HCLOUD_COSMO_SPACE_ASSET_UPDATE = "hcloud.cosmo.space.asset.update",
|
|
11
|
+
HCLOUD_COSMO_SPACE_ASSET_RENAME = "hcloud.cosmo.space.asset.rename",
|
|
12
|
+
HCLOUD_COSMO_SPACE_ASSET_UPDATE_TAG = "hcloud.cosmo.space.asset.update.tag",
|
|
13
|
+
HCLOUD_COSMO_SPACE_ASSET_REMOVE_TAG = "hcloud.cosmo.space.asset.remove.tag",
|
|
14
|
+
HCLOUD_COSMO_SPACE_ASSET_UPDATE_STATUS = "hcloud.cosmo.space.asset.update.status",
|
|
15
|
+
HCLOUD_COSMO_SPACE_ASSET_UPDATE_METADATA = "hcloud.cosmo.space.asset.update.metadata",
|
|
16
|
+
HCLOUD_COSMO_SPACE_ASSET_TRASHED = "hcloud.cosmo.space.asset.trashed",
|
|
17
|
+
HCLOUD_COSMO_SPACE_ASSET_RECOVERED = "hcloud.cosmo.space.asset.recovered",
|
|
8
18
|
HCLOUD_COSMO_SPACE_ASSET_MOVE = "hcloud.cosmo.space.asset.move",
|
|
19
|
+
HCLOUD_COSMO_SPACE_ASSET_COPY = "hcloud.cosmo.space.asset.copy",
|
|
9
20
|
HCLOUD_COSMO_SPACE_ASSET_DELETE = "hcloud.cosmo.space.asset.delete",
|
|
10
21
|
HCLOUD_COSMO_SPACE_ASSET_COMMENT_ADD = "hcloud.cosmo.space.asset.comment.add",
|
|
11
22
|
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"
|
|
23
|
+
HCLOUD_COSMO_SPACE_ASSET_COMMENT_DELETE = "hcloud.cosmo.space.asset.comment.delete",
|
|
24
|
+
HCLOUD_COSMO_SPACE_TAG_ADD = "hcloud.cosmo.space.tag.add",
|
|
25
|
+
HCLOUD_COSMO_SPACE_TAG_UPDATE = "hcloud.cosmo.space.tag.update",
|
|
26
|
+
HCLOUD_COSMO_SPACE_TAG_DELETE = "hcloud.cosmo.space.tag.delete"
|
|
13
27
|
}
|
|
14
28
|
export interface CosmoEvents {
|
|
15
29
|
Space: {
|
|
16
30
|
"Space rename": CosmoEventName.HCLOUD_COSMO_SPACE_RENAME;
|
|
17
|
-
"Space update": CosmoEventName.HCLOUD_COSMO_SPACE_UPDATE;
|
|
18
31
|
"Space delete": CosmoEventName.HCLOUD_COSMO_SPACE_DELETE;
|
|
32
|
+
"Space member add": CosmoEventName.HCLOUD_COSMO_SPACE_MEMBER_ADD;
|
|
33
|
+
"Space member remove": CosmoEventName.HCLOUD_COSMO_SPACE_MEMBER_REMOVE;
|
|
34
|
+
"Space member update": CosmoEventName.HCLOUD_COSMO_SPACE_MEMBER_UPDATE;
|
|
19
35
|
};
|
|
20
36
|
Asset: {
|
|
21
37
|
"Asset create": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_ADD;
|
|
22
|
-
"Asset
|
|
38
|
+
"Asset upload started": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_UPLOAD_STARTED;
|
|
39
|
+
"Asset ready": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_READY;
|
|
40
|
+
"Asset rename": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_RENAME;
|
|
41
|
+
"Asset update tag": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_UPDATE_TAG;
|
|
42
|
+
"Asset update status": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_UPDATE_STATUS;
|
|
43
|
+
"Asset trashed": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_TRASHED;
|
|
44
|
+
"Asset recovered": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_RECOVERED;
|
|
23
45
|
"Asset Move": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_MOVE;
|
|
46
|
+
"Asset Copy": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_COPY;
|
|
24
47
|
"Asset Delete": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_DELETE;
|
|
48
|
+
"Asset remove tag": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_REMOVE_TAG;
|
|
25
49
|
};
|
|
26
50
|
Comment: {
|
|
27
51
|
"Comment create": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_COMMENT_ADD;
|
|
28
52
|
"Comment update": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_COMMENT_UPDATE;
|
|
29
53
|
"Comment delete": CosmoEventName.HCLOUD_COSMO_SPACE_ASSET_COMMENT_DELETE;
|
|
30
54
|
};
|
|
55
|
+
Tag: {
|
|
56
|
+
"Tag create": CosmoEventName.HCLOUD_COSMO_SPACE_TAG_ADD;
|
|
57
|
+
"Tag update": CosmoEventName.HCLOUD_COSMO_SPACE_TAG_UPDATE;
|
|
58
|
+
"Tag delete": CosmoEventName.HCLOUD_COSMO_SPACE_TAG_DELETE;
|
|
59
|
+
};
|
|
31
60
|
}
|
|
@@ -3,15 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CosmoEventName = void 0;
|
|
4
4
|
var CosmoEventName;
|
|
5
5
|
(function (CosmoEventName) {
|
|
6
|
-
CosmoEventName["HCLOUD_COSMO_SPACE_ADD"] = "hcloud.cosmo.space.add";
|
|
7
6
|
CosmoEventName["HCLOUD_COSMO_SPACE_RENAME"] = "hcloud.cosmo.space.rename";
|
|
8
|
-
CosmoEventName["HCLOUD_COSMO_SPACE_UPDATE"] = "hcloud.cosmo.space.update";
|
|
9
7
|
CosmoEventName["HCLOUD_COSMO_SPACE_DELETE"] = "hcloud.cosmo.space.delete";
|
|
8
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_MEMBER_ADD"] = "hcloud.cosmo.space.member.add";
|
|
9
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_MEMBER_REMOVE"] = "hcloud.cosmo.space.member.remove";
|
|
10
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_MEMBER_UPDATE"] = "hcloud.cosmo.space.member.update";
|
|
10
11
|
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_ADD"] = "hcloud.cosmo.space.asset.add";
|
|
12
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_UPLOAD_STARTED"] = "hcloud.cosmo.space.asset.upload.started";
|
|
13
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_READY"] = "hcloud.cosmo.space.asset.ready";
|
|
11
14
|
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_UPDATE"] = "hcloud.cosmo.space.asset.update";
|
|
15
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_RENAME"] = "hcloud.cosmo.space.asset.rename";
|
|
16
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_UPDATE_TAG"] = "hcloud.cosmo.space.asset.update.tag";
|
|
17
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_REMOVE_TAG"] = "hcloud.cosmo.space.asset.remove.tag";
|
|
18
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_UPDATE_STATUS"] = "hcloud.cosmo.space.asset.update.status";
|
|
19
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_UPDATE_METADATA"] = "hcloud.cosmo.space.asset.update.metadata";
|
|
20
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_TRASHED"] = "hcloud.cosmo.space.asset.trashed";
|
|
21
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_RECOVERED"] = "hcloud.cosmo.space.asset.recovered";
|
|
12
22
|
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_MOVE"] = "hcloud.cosmo.space.asset.move";
|
|
23
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_COPY"] = "hcloud.cosmo.space.asset.copy";
|
|
13
24
|
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_DELETE"] = "hcloud.cosmo.space.asset.delete";
|
|
14
25
|
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_COMMENT_ADD"] = "hcloud.cosmo.space.asset.comment.add";
|
|
15
26
|
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_COMMENT_UPDATE"] = "hcloud.cosmo.space.asset.comment.update";
|
|
16
27
|
CosmoEventName["HCLOUD_COSMO_SPACE_ASSET_COMMENT_DELETE"] = "hcloud.cosmo.space.asset.comment.delete";
|
|
28
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_TAG_ADD"] = "hcloud.cosmo.space.tag.add";
|
|
29
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_TAG_UPDATE"] = "hcloud.cosmo.space.tag.update";
|
|
30
|
+
CosmoEventName["HCLOUD_COSMO_SPACE_TAG_DELETE"] = "hcloud.cosmo.space.tag.delete";
|
|
17
31
|
})(CosmoEventName || (exports.CosmoEventName = CosmoEventName = {}));
|
|
@@ -1,28 +1,110 @@
|
|
|
1
|
-
import { ReducedUser } from "../../idp";
|
|
1
|
+
import { ReducedUser, ShareReducedUnlinkedUser, User } from "../../idp";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a public link for sharing.
|
|
4
|
+
* @property link - The URL of the public link.
|
|
5
|
+
* @property visitsLimit - (Optional) The maximum number of allowed visits for the link.
|
|
6
|
+
*/
|
|
7
|
+
export interface PublicLink {
|
|
8
|
+
link: string;
|
|
9
|
+
visitsLimit?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Represents a share entity containing shared items and permissions.
|
|
13
|
+
* @property _id - Unique identifier for the share.
|
|
14
|
+
* @property name - Name of the share.
|
|
15
|
+
* @property creator - The user who created the share.
|
|
16
|
+
* @property createDate - Timestamp of when the share was created (in milliseconds since epoch).
|
|
17
|
+
* @property items - Array of item IDs included in the share.
|
|
18
|
+
* @property permissions - (Optional) Array of permission strings for the share.
|
|
19
|
+
* @property permissionGroups - (Optional) Array of asset permission groups applied to the share.
|
|
20
|
+
* @property namespaces - (Optional) Mapping of namespace names to arrays of item IDs.
|
|
21
|
+
* @property namespaceGroups - (Optional) Mapping of namespace names to arrays of namespace permission groups.
|
|
22
|
+
* @property expires - (Optional) Expiration timestamp for the share (in milliseconds since epoch).
|
|
23
|
+
* @property password - (Optional) Password required to access the share.
|
|
24
|
+
* @property publicLink - (Optional) Public link information for the share.
|
|
25
|
+
*/
|
|
2
26
|
export interface Share {
|
|
3
27
|
_id: string;
|
|
4
28
|
name: string;
|
|
5
29
|
creator: ReducedUser;
|
|
6
30
|
createDate: number;
|
|
7
31
|
items: string[];
|
|
8
|
-
permissions
|
|
32
|
+
permissions?: string[];
|
|
33
|
+
permissionGroups?: ShareAssetPermissionGroup[];
|
|
34
|
+
namespaces?: Record<string, string[]>;
|
|
35
|
+
namespaceGroups?: Record<string, ShareNamespacePermissionGroup[]>;
|
|
9
36
|
expires?: number;
|
|
10
37
|
password?: string;
|
|
38
|
+
publicLink?: PublicLink;
|
|
39
|
+
users?: (User | ReducedUser | ShareReducedUnlinkedUser)[];
|
|
40
|
+
waiting: boolean;
|
|
11
41
|
}
|
|
12
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Represents the payload for creating a new share.
|
|
44
|
+
* Omits _id, createDate, and creator from Share.
|
|
45
|
+
* @property password - (Optional) Password for the share.
|
|
46
|
+
* @property expires - (Optional) Expiration timestamp for the share (in milliseconds since epoch).
|
|
47
|
+
* @property namespaces - (Optional) Mapping of namespace names to arrays of item IDs.
|
|
48
|
+
* @property users - (Optional) Array of user emails to share with.
|
|
49
|
+
* @property public - (Optional) Whether the share is public.
|
|
50
|
+
* @property visitsLimit - (Optional) Maximum number of allowed visits for the share (only applicable for public shares).
|
|
51
|
+
*/
|
|
52
|
+
export interface ShareCreate extends Omit<Share, "_id" | "createDate" | "creator" | "permissionGroups" | "users"> {
|
|
13
53
|
password?: string;
|
|
14
54
|
expires?: number;
|
|
15
55
|
namespaces?: Record<string, string[]>;
|
|
56
|
+
assetPermissionGroups?: ShareAssetPermissionGroup[];
|
|
16
57
|
/**
|
|
17
58
|
* Array of emails
|
|
18
59
|
*/
|
|
19
60
|
users?: string[];
|
|
61
|
+
public?: boolean;
|
|
62
|
+
visitsLimit?: number;
|
|
63
|
+
deferred?: boolean;
|
|
20
64
|
}
|
|
21
65
|
export type ShareWithUsers = Share & {
|
|
22
|
-
users: ReducedUser
|
|
66
|
+
users: ((ReducedUser | Pick<ReducedUser, "email">) & {
|
|
67
|
+
linkedToShare: boolean;
|
|
68
|
+
})[];
|
|
23
69
|
};
|
|
24
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Represents a patch (partial update) for a share.
|
|
72
|
+
* @property name - (Optional) New name for the share.
|
|
73
|
+
* @property expires - (Optional) New expiration timestamp.
|
|
74
|
+
* @property password - (Optional) New password for the share.
|
|
75
|
+
* @property items - (Optional) New array of item IDs.
|
|
76
|
+
* @property permissions - (Optional) New array of permission strings.
|
|
77
|
+
* @property assetPermissionGroups - (Optional) New array of asset permission groups.
|
|
78
|
+
* @property namespaces - (Optional) New mapping of namespace names to arrays of item IDs or null.
|
|
79
|
+
* @property namespaceGroups - (Optional) New mapping of namespace names to arrays of namespace permission groups or null.
|
|
80
|
+
* @property public - (Optional) Whether the share is public.
|
|
81
|
+
* @property visitsLimit - (Optional) New maximum number of allowed visits (only applicable for public shares).
|
|
82
|
+
*/
|
|
83
|
+
export type SharePatch = Partial<Pick<ShareCreate, "name" | "expires" | "password" | "users"> & {
|
|
25
84
|
items: string[];
|
|
26
|
-
permissions
|
|
27
|
-
|
|
85
|
+
permissions?: string[];
|
|
86
|
+
assetPermissionGroups?: ShareAssetPermissionGroup[];
|
|
87
|
+
namespaces?: Record<string, string[] | null>;
|
|
88
|
+
namespaceGroups?: Record<string, ShareNamespacePermissionGroup[] | null>;
|
|
89
|
+
public?: boolean;
|
|
90
|
+
visitsLimit?: number;
|
|
91
|
+
users?: string[];
|
|
28
92
|
}>;
|
|
93
|
+
export declare enum ShareAssetPermissionGroup {
|
|
94
|
+
VIEW_ASSETS_ONLY = "VIEW_ASSETS_ONLY",
|
|
95
|
+
BASE = "BASE",
|
|
96
|
+
ENABLE_DOWNLOAD = "ENABLE_DOWNLOAD",
|
|
97
|
+
ENABLE_CONTRIBUTION = "ENABLE_CONTRIBUTION",
|
|
98
|
+
ENABLE_ACTIVITY = "ENABLE_ACTIVITY",
|
|
99
|
+
ENABLE_DELETION = "ENABLE_DELETION"
|
|
100
|
+
}
|
|
101
|
+
export declare enum ShareNamespacePermissionGroup {
|
|
102
|
+
BASE = "BASE",
|
|
103
|
+
ENABLE_COMMENTS = "ENABLE_COMMENTS",
|
|
104
|
+
ENABLE_COMMENT_DELETION = "ENABLE_COMMENT_DELETION",
|
|
105
|
+
ENABLE_APPROVAL = "ENABLE_APPROVAL",
|
|
106
|
+
ENABLE_APPROVAL_OVERWRITE = "ENABLE_APPROVAL_OVERWRITE",
|
|
107
|
+
ENABLE_METADATA_EDITING = "ENABLE_METADATA_EDITING",
|
|
108
|
+
ENABLE_TAGS = "ENABLE_TAGS",
|
|
109
|
+
VIEW_ASSET_METADATA = "VIEW_ASSET_METADATA"
|
|
110
|
+
}
|
|
@@ -1,2 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShareNamespacePermissionGroup = exports.ShareAssetPermissionGroup = void 0;
|
|
4
|
+
var ShareAssetPermissionGroup;
|
|
5
|
+
(function (ShareAssetPermissionGroup) {
|
|
6
|
+
ShareAssetPermissionGroup["VIEW_ASSETS_ONLY"] = "VIEW_ASSETS_ONLY";
|
|
7
|
+
ShareAssetPermissionGroup["BASE"] = "BASE";
|
|
8
|
+
ShareAssetPermissionGroup["ENABLE_DOWNLOAD"] = "ENABLE_DOWNLOAD";
|
|
9
|
+
ShareAssetPermissionGroup["ENABLE_CONTRIBUTION"] = "ENABLE_CONTRIBUTION";
|
|
10
|
+
ShareAssetPermissionGroup["ENABLE_ACTIVITY"] = "ENABLE_ACTIVITY";
|
|
11
|
+
ShareAssetPermissionGroup["ENABLE_DELETION"] = "ENABLE_DELETION";
|
|
12
|
+
})(ShareAssetPermissionGroup || (exports.ShareAssetPermissionGroup = ShareAssetPermissionGroup = {}));
|
|
13
|
+
var ShareNamespacePermissionGroup;
|
|
14
|
+
(function (ShareNamespacePermissionGroup) {
|
|
15
|
+
ShareNamespacePermissionGroup["BASE"] = "BASE";
|
|
16
|
+
ShareNamespacePermissionGroup["ENABLE_COMMENTS"] = "ENABLE_COMMENTS";
|
|
17
|
+
ShareNamespacePermissionGroup["ENABLE_COMMENT_DELETION"] = "ENABLE_COMMENT_DELETION";
|
|
18
|
+
ShareNamespacePermissionGroup["ENABLE_APPROVAL"] = "ENABLE_APPROVAL";
|
|
19
|
+
ShareNamespacePermissionGroup["ENABLE_APPROVAL_OVERWRITE"] = "ENABLE_APPROVAL_OVERWRITE";
|
|
20
|
+
ShareNamespacePermissionGroup["ENABLE_METADATA_EDITING"] = "ENABLE_METADATA_EDITING";
|
|
21
|
+
ShareNamespacePermissionGroup["ENABLE_TAGS"] = "ENABLE_TAGS";
|
|
22
|
+
ShareNamespacePermissionGroup["VIEW_ASSET_METADATA"] = "VIEW_ASSET_METADATA";
|
|
23
|
+
})(ShareNamespacePermissionGroup || (exports.ShareNamespacePermissionGroup = ShareNamespacePermissionGroup = {}));
|
|
@@ -7,6 +7,8 @@ export interface CosmoSpace {
|
|
|
7
7
|
avatarUrl: string;
|
|
8
8
|
creator: ReducedUser;
|
|
9
9
|
type: ItemType.SPACE;
|
|
10
|
+
trashAutoDelete: boolean;
|
|
11
|
+
trashAutoDeleteTTL: number | null;
|
|
10
12
|
high5_spaceName?: string;
|
|
11
13
|
high5_executionTarget?: string;
|
|
12
14
|
permissions?: string[];
|
|
@@ -23,3 +25,7 @@ export type SpaceUser = (ReducedUser | ReducedTeam) & {
|
|
|
23
25
|
}[];
|
|
24
26
|
type: "user" | "team";
|
|
25
27
|
};
|
|
28
|
+
export interface TrashPolicy {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
ttlDays?: number;
|
|
31
|
+
}
|