hcloud-sdk 20.4.0 → 21.0.1
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 +3 -3
- package/lib/helper/ValidationHelper.js +1 -1
- package/lib/interfaces/cosmo/asset/index.d.ts +16 -3
- package/lib/interfaces/cosmo/asset/index.js +1 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +19 -2
- package/lib/interfaces/cosmo/comment/index.js +17 -1
- package/lib/interfaces/cosmo/share/index.d.ts +19 -0
- package/lib/interfaces/cosmo/share/index.js +13 -1
- package/lib/interfaces/cosmo/space/index.d.ts +32 -0
- package/lib/interfaces/cosmo/space/index.js +6 -0
- package/lib/interfaces/high5/space/database/document/index.d.ts +14 -6
- package/lib/interfaces/high5/space/database/document/index.js +1 -0
- package/lib/interfaces/high5/space/job/index.d.ts +9 -10
- package/lib/interfaces/high5/space/job/index.js +2 -1
- package/lib/interfaces/idp/organization/index.d.ts +1 -1
- package/lib/interfaces/idp/organization/index.js +1 -1
- package/lib/interfaces/mailer/index.d.ts +77 -21
- package/lib/interfaces/mailer/index.js +247 -50
- package/lib/interfaces/nats/index.d.ts +4 -0
- package/lib/interfaces/nats/index.js +5 -0
- package/lib/service/cosmo/asset/index.d.ts +54 -1
- package/lib/service/cosmo/asset/index.js +62 -0
- package/lib/service/cosmo/comment/index.d.ts +2 -2
- package/lib/service/cosmo/comment/index.js +2 -2
- package/lib/service/cosmo/index.d.ts +3 -0
- package/lib/service/cosmo/index.js +7 -0
- package/lib/service/cosmo/share/index.d.ts +15 -7
- package/lib/service/cosmo/share/index.js +17 -7
- package/lib/service/cosmo/space/index.d.ts +25 -1
- package/lib/service/cosmo/space/index.js +30 -0
- package/lib/service/cosmo/stack/index.d.ts +68 -0
- package/lib/service/cosmo/stack/index.js +102 -0
- package/lib/service/high5/space/database/document/{array → collection}/index.d.ts +25 -1
- package/lib/service/high5/space/database/document/{array → collection}/index.js +33 -3
- package/lib/service/high5/space/database/document/index.d.ts +16 -4
- package/lib/service/high5/space/database/document/index.js +20 -5
- package/lib/service/high5/space/job/index.d.ts +3 -2
- package/lib/service/high5/space/job/index.js +3 -2
- package/lib/service/mailer/internal/index.d.ts +12 -3
- package/lib/service/mailer/internal/index.js +13 -1
- package/package.json +3 -2
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CosmoSharePasswordChangedMailjetMailDTO = exports.CosmoAssetStatusChangedMailjetMailDTO = exports.CosmoRepliedToCommentMailjetMailDTO = exports.CosmoCommentOrAnnotationAddedMailjetMailDTO = exports.CosmoUserRemovedFromSpaceMailjetMailDTO = exports.CosmoUserAddedToSpaceMailjetMailDTO = exports.CosmoNewShareMailjetMailDTO = exports.IdpAccountApprovedMailjetMailDTO = exports.IdpUserLeftOrganizationMailjetMailDTO = exports.IdpRegisterAndInviteToOrganizationMailjetMailDto = exports.IdpInviteToOrganizationMailjetMailDto = exports.IdpResetPasswordMailjetMailDTO = exports.IdpNewRegistrationMailjetMailToCustomerDTO = exports.IdpNewRegistrationMailjetMailDTO = exports.
|
|
3
|
+
exports.CosmoSharePasswordChangedResendMailDTO = exports.CosmoAssetStatusChangedResendMailDTO = exports.CosmoRepliedToCommentResendMailDTO = exports.CosmoCommentMentionResendMailDTO = exports.CosmoCommentOrAnnotationAddedResendMailDTO = exports.CosmoUserRemovedFromSpaceResendMailDTO = exports.CosmoUserAddedToSpaceResendMailDTO = exports.CosmoNewShareResendMailDTO = exports.IdpAccountApprovedResendMailDTO = exports.IdpUserLeftOrganizationResendMailDTO = exports.IdpRegisterAndInviteToOrganizationResendMailDto = exports.IdpInviteToOrganizationResendMailDto = exports.IdpResetPasswordResendMailDTO = exports.IdpNewClosedRegistrationResendMailDTO = exports.IdpNewRegistrationResendMailToCustomerDTO = exports.IdpNewRegistrationResendMailDTO = exports.CosmoSharePasswordChangedMailjetMailDTO = exports.CosmoAssetStatusChangedMailjetMailDTO = exports.CosmoRepliedToCommentMailjetMailDTO = exports.CosmoCommentMentionMailjetMailDTO = exports.CosmoCommentOrAnnotationAddedMailjetMailDTO = exports.CosmoUserRemovedFromSpaceMailjetMailDTO = exports.CosmoUserAddedToSpaceMailjetMailDTO = exports.CosmoNewShareMailjetMailDTO = exports.IdpAccountApprovedMailjetMailDTO = exports.IdpUserLeftOrganizationMailjetMailDTO = exports.IdpRegisterAndInviteToOrganizationMailjetMailDto = exports.IdpInviteToOrganizationMailjetMailDto = exports.IdpResetPasswordMailjetMailDTO = exports.IdpNewRegistrationMailjetMailToCustomerDTO = exports.IdpNewRegistrationMailjetMailDTO = exports.MailDTO = exports.MailTemplate = exports.Template = void 0;
|
|
4
4
|
var Template;
|
|
5
5
|
(function (Template) {
|
|
6
6
|
Template["REGISTER"] = "register";
|
|
7
7
|
Template["RESET_PASSWORD"] = "reset_password";
|
|
8
8
|
Template["INVITE_TO_ORG"] = "invite_to_org";
|
|
9
9
|
})(Template || (exports.Template = Template = {}));
|
|
10
|
-
var
|
|
11
|
-
(function (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
var MailTemplate;
|
|
11
|
+
(function (MailTemplate) {
|
|
12
|
+
MailTemplate["IDP_NEW_REGISTRATION"] = "IDP_NEW_REGISTRATION";
|
|
13
|
+
MailTemplate["IDP_NEW_REGISTRATION_CUSTOMER"] = "IDP_NEW_REGISTRATION_CUSTOMER";
|
|
14
|
+
MailTemplate["IDP_NEW_CLOSED_REGISTRATION"] = "IDP_NEW_CLOSED_REGISTRATION";
|
|
15
|
+
MailTemplate["IDP_INVITE_TO_ORGANIZATION"] = "IDP_INVITE_TO_ORGANIZATION";
|
|
16
|
+
MailTemplate["IDP_RESET_PASSWORD"] = "IDP_RESET_PASSWORD";
|
|
17
|
+
MailTemplate["IDP_REGISTRATION_AND_INVITATION"] = "IDP_REGISTRATION_AND_INVITATION";
|
|
18
|
+
MailTemplate["IDP_USER_LEFT_ORGANIZATION"] = "IDP_USER_LEFT_ORGANIZATION";
|
|
19
|
+
MailTemplate["IDP_ACCOUNT_APPROVED"] = "IDP_ACCOUNT_APPROVED";
|
|
20
|
+
MailTemplate["COSMO_NEW_SHARE"] = "COSMO_NEW_SHARE";
|
|
21
|
+
MailTemplate["COSMO_USER_ADDED_TO_SPACE"] = "COSMO_USER_ADDED_TO_SPACE";
|
|
22
|
+
MailTemplate["COSMO_USER_REMOVED_FROM_SPACE"] = "COSMO_USER_REMOVED_FROM_SPACE";
|
|
23
|
+
MailTemplate["COSMO_COMMENT_ADDED"] = "COSMO_COMMENT_ADDED";
|
|
24
|
+
MailTemplate["COSMO_COMMENT_MENTION"] = "COSMO_COMMENT_MENTION";
|
|
25
|
+
MailTemplate["COSMO_REPLIED_TO_COMMENT"] = "COSMO_REPLIED_TO_COMMENT";
|
|
26
|
+
MailTemplate["COSMO_ASSET_STATUS_CHANGED"] = "COSMO_ASSET_STATUS_CHANGED";
|
|
27
|
+
MailTemplate["COSMO_ASSET_UPLOADED_TO_SHARE"] = "COSMO_ASSET_UPLOADED_TO_SHARE";
|
|
28
|
+
MailTemplate["COSMO_SHARE_PASSWORD_CHANGED"] = "COSMO_SHARE_PASSWORD_CHANGED";
|
|
29
|
+
})(MailTemplate || (exports.MailTemplate = MailTemplate = {}));
|
|
30
|
+
class MailDTO {
|
|
29
31
|
constructor(recipients, template, fields) {
|
|
30
32
|
this.recipients = recipients;
|
|
31
33
|
this.template = template;
|
|
32
34
|
this.fields = fields;
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
|
-
exports.
|
|
36
|
-
|
|
37
|
+
exports.MailDTO = MailDTO;
|
|
38
|
+
// Mailjet templates
|
|
39
|
+
class IdpNewRegistrationMailjetMailDTO extends MailDTO {
|
|
37
40
|
constructor(recipients, verifyLink, hcloudOriginalEmail, name, company) {
|
|
38
|
-
super(recipients,
|
|
41
|
+
super(recipients, MailTemplate.IDP_NEW_REGISTRATION, {
|
|
39
42
|
HCLOUD_VERIFY_LINK: verifyLink,
|
|
40
43
|
HCLOUD_ORIGINAL_EMAIL: hcloudOriginalEmail,
|
|
41
44
|
HCLOUD_NAME: name,
|
|
@@ -44,25 +47,25 @@ class IdpNewRegistrationMailjetMailDTO extends MailjetMailDTO {
|
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
exports.IdpNewRegistrationMailjetMailDTO = IdpNewRegistrationMailjetMailDTO;
|
|
47
|
-
class IdpNewRegistrationMailjetMailToCustomerDTO extends
|
|
50
|
+
class IdpNewRegistrationMailjetMailToCustomerDTO extends MailDTO {
|
|
48
51
|
constructor(recipients, username) {
|
|
49
|
-
super(recipients,
|
|
52
|
+
super(recipients, MailTemplate.IDP_NEW_REGISTRATION_CUSTOMER, {
|
|
50
53
|
USERNAME: username,
|
|
51
54
|
});
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
exports.IdpNewRegistrationMailjetMailToCustomerDTO = IdpNewRegistrationMailjetMailToCustomerDTO;
|
|
55
|
-
class IdpResetPasswordMailjetMailDTO extends
|
|
58
|
+
class IdpResetPasswordMailjetMailDTO extends MailDTO {
|
|
56
59
|
constructor(recipients, resetPasswordLink) {
|
|
57
|
-
super(recipients,
|
|
60
|
+
super(recipients, MailTemplate.IDP_RESET_PASSWORD, {
|
|
58
61
|
HCLOUD_RESET_PASSWORD_LINK: resetPasswordLink,
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
exports.IdpResetPasswordMailjetMailDTO = IdpResetPasswordMailjetMailDTO;
|
|
63
|
-
class IdpInviteToOrganizationMailjetMailDto extends
|
|
66
|
+
class IdpInviteToOrganizationMailjetMailDto extends MailDTO {
|
|
64
67
|
constructor(recipients, approvalLink, inviteFromPerson, inviteToOrganization) {
|
|
65
|
-
super(recipients,
|
|
68
|
+
super(recipients, MailTemplate.IDP_INVITE_TO_ORGANIZATION, {
|
|
66
69
|
HCLOUD_INVITE_FROM: inviteFromPerson,
|
|
67
70
|
HCLOUD_INVITE_ORGANIZATION: inviteToOrganization,
|
|
68
71
|
HCLOUD_APPROVAL_LINK: approvalLink,
|
|
@@ -70,9 +73,9 @@ class IdpInviteToOrganizationMailjetMailDto extends MailjetMailDTO {
|
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
75
|
exports.IdpInviteToOrganizationMailjetMailDto = IdpInviteToOrganizationMailjetMailDto;
|
|
73
|
-
class IdpRegisterAndInviteToOrganizationMailjetMailDto extends
|
|
76
|
+
class IdpRegisterAndInviteToOrganizationMailjetMailDto extends MailDTO {
|
|
74
77
|
constructor(recipients, registerLink, inviteFromPerson, inviteToOrganization) {
|
|
75
|
-
super(recipients,
|
|
78
|
+
super(recipients, MailTemplate.IDP_REGISTRATION_AND_INVITATION, {
|
|
76
79
|
HCLOUD_INVITE_FROM: inviteFromPerson,
|
|
77
80
|
HCLOUD_INVITE_ORGANIZATION: inviteToOrganization,
|
|
78
81
|
HCLOUD_REGISTER_LINK: registerLink,
|
|
@@ -80,9 +83,9 @@ class IdpRegisterAndInviteToOrganizationMailjetMailDto extends MailjetMailDTO {
|
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
exports.IdpRegisterAndInviteToOrganizationMailjetMailDto = IdpRegisterAndInviteToOrganizationMailjetMailDto;
|
|
83
|
-
class IdpUserLeftOrganizationMailjetMailDTO extends
|
|
86
|
+
class IdpUserLeftOrganizationMailjetMailDTO extends MailDTO {
|
|
84
87
|
constructor(recipients, userName, userEmail, organizationName) {
|
|
85
|
-
super(recipients,
|
|
88
|
+
super(recipients, MailTemplate.IDP_USER_LEFT_ORGANIZATION, {
|
|
86
89
|
USER_NAME: userName,
|
|
87
90
|
USER_EMAIL: userEmail,
|
|
88
91
|
ORGANIZATION_NAME: organizationName,
|
|
@@ -90,26 +93,27 @@ class IdpUserLeftOrganizationMailjetMailDTO extends MailjetMailDTO {
|
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
exports.IdpUserLeftOrganizationMailjetMailDTO = IdpUserLeftOrganizationMailjetMailDTO;
|
|
93
|
-
class IdpAccountApprovedMailjetMailDTO extends
|
|
96
|
+
class IdpAccountApprovedMailjetMailDTO extends MailDTO {
|
|
94
97
|
constructor(recipients, username, signInLink) {
|
|
95
|
-
super(recipients,
|
|
98
|
+
super(recipients, MailTemplate.IDP_ACCOUNT_APPROVED, {
|
|
96
99
|
USERNAME: username,
|
|
97
100
|
HCLOUD_SIGN_IN_LINK: signInLink,
|
|
98
101
|
});
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
104
|
exports.IdpAccountApprovedMailjetMailDTO = IdpAccountApprovedMailjetMailDTO;
|
|
102
|
-
class CosmoNewShareMailjetMailDTO extends
|
|
103
|
-
constructor(recipients, shareLink) {
|
|
104
|
-
super(recipients,
|
|
105
|
+
class CosmoNewShareMailjetMailDTO extends MailDTO {
|
|
106
|
+
constructor(recipients, shareLink, shareMessage) {
|
|
107
|
+
super(recipients, MailTemplate.COSMO_NEW_SHARE, {
|
|
105
108
|
HCLOUD_SHARE_LINK: shareLink,
|
|
109
|
+
HCLOUD_SHARE_MESSAGE: shareMessage,
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
exports.CosmoNewShareMailjetMailDTO = CosmoNewShareMailjetMailDTO;
|
|
110
|
-
class CosmoUserAddedToSpaceMailjetMailDTO extends
|
|
114
|
+
class CosmoUserAddedToSpaceMailjetMailDTO extends MailDTO {
|
|
111
115
|
constructor(recipients, actorName, recipientName, spaceName, link) {
|
|
112
|
-
super(recipients,
|
|
116
|
+
super(recipients, MailTemplate.COSMO_USER_ADDED_TO_SPACE, {
|
|
113
117
|
ACTOR_NAME: actorName,
|
|
114
118
|
RECIPIENT_NAME: recipientName,
|
|
115
119
|
SPACE_NAME: spaceName,
|
|
@@ -118,9 +122,9 @@ class CosmoUserAddedToSpaceMailjetMailDTO extends MailjetMailDTO {
|
|
|
118
122
|
}
|
|
119
123
|
}
|
|
120
124
|
exports.CosmoUserAddedToSpaceMailjetMailDTO = CosmoUserAddedToSpaceMailjetMailDTO;
|
|
121
|
-
class CosmoUserRemovedFromSpaceMailjetMailDTO extends
|
|
125
|
+
class CosmoUserRemovedFromSpaceMailjetMailDTO extends MailDTO {
|
|
122
126
|
constructor(recipients, actorName, recipientName, spaceName) {
|
|
123
|
-
super(recipients,
|
|
127
|
+
super(recipients, MailTemplate.COSMO_USER_REMOVED_FROM_SPACE, {
|
|
124
128
|
ACTOR_NAME: actorName,
|
|
125
129
|
RECIPIENT_NAME: recipientName,
|
|
126
130
|
SPACE_NAME: spaceName,
|
|
@@ -128,9 +132,9 @@ class CosmoUserRemovedFromSpaceMailjetMailDTO extends MailjetMailDTO {
|
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
exports.CosmoUserRemovedFromSpaceMailjetMailDTO = CosmoUserRemovedFromSpaceMailjetMailDTO;
|
|
131
|
-
class CosmoCommentOrAnnotationAddedMailjetMailDTO extends
|
|
135
|
+
class CosmoCommentOrAnnotationAddedMailjetMailDTO extends MailDTO {
|
|
132
136
|
constructor(recipients, assetName, recipientName, actorName, commentSnippet, spaceName, link) {
|
|
133
|
-
super(recipients,
|
|
137
|
+
super(recipients, MailTemplate.COSMO_COMMENT_ADDED, {
|
|
134
138
|
ASSET_NAME: assetName,
|
|
135
139
|
RECIPIENT_NAME: recipientName,
|
|
136
140
|
ACTOR_NAME: actorName,
|
|
@@ -141,9 +145,22 @@ class CosmoCommentOrAnnotationAddedMailjetMailDTO extends MailjetMailDTO {
|
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
exports.CosmoCommentOrAnnotationAddedMailjetMailDTO = CosmoCommentOrAnnotationAddedMailjetMailDTO;
|
|
144
|
-
class
|
|
148
|
+
class CosmoCommentMentionMailjetMailDTO extends MailDTO {
|
|
145
149
|
constructor(recipients, assetName, recipientName, actorName, commentSnippet, spaceName, link) {
|
|
146
|
-
super(recipients,
|
|
150
|
+
super(recipients, MailTemplate.COSMO_COMMENT_MENTION, {
|
|
151
|
+
ASSET_NAME: assetName,
|
|
152
|
+
RECIPIENT_NAME: recipientName,
|
|
153
|
+
ACTOR_NAME: actorName,
|
|
154
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
155
|
+
SPACE_NAME: spaceName,
|
|
156
|
+
LINK: link,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.CosmoCommentMentionMailjetMailDTO = CosmoCommentMentionMailjetMailDTO;
|
|
161
|
+
class CosmoRepliedToCommentMailjetMailDTO extends MailDTO {
|
|
162
|
+
constructor(recipients, assetName, recipientName, actorName, commentSnippet, spaceName, link) {
|
|
163
|
+
super(recipients, MailTemplate.COSMO_REPLIED_TO_COMMENT, {
|
|
147
164
|
ASSET_NAME: assetName,
|
|
148
165
|
RECIPIENT_NAME: recipientName,
|
|
149
166
|
ACTOR_NAME: actorName,
|
|
@@ -154,9 +171,9 @@ class CosmoRepliedToCommentMailjetMailDTO extends MailjetMailDTO {
|
|
|
154
171
|
}
|
|
155
172
|
}
|
|
156
173
|
exports.CosmoRepliedToCommentMailjetMailDTO = CosmoRepliedToCommentMailjetMailDTO;
|
|
157
|
-
class CosmoAssetStatusChangedMailjetMailDTO extends
|
|
174
|
+
class CosmoAssetStatusChangedMailjetMailDTO extends MailDTO {
|
|
158
175
|
constructor(recipients, assetName, recipientName, actorName, newStatus, spaceName, link) {
|
|
159
|
-
super(recipients,
|
|
176
|
+
super(recipients, MailTemplate.COSMO_ASSET_STATUS_CHANGED, {
|
|
160
177
|
ASSET_NAME: assetName,
|
|
161
178
|
RECIPIENT_NAME: recipientName,
|
|
162
179
|
ACTOR_NAME: actorName,
|
|
@@ -167,9 +184,9 @@ class CosmoAssetStatusChangedMailjetMailDTO extends MailjetMailDTO {
|
|
|
167
184
|
}
|
|
168
185
|
}
|
|
169
186
|
exports.CosmoAssetStatusChangedMailjetMailDTO = CosmoAssetStatusChangedMailjetMailDTO;
|
|
170
|
-
class CosmoSharePasswordChangedMailjetMailDTO extends
|
|
187
|
+
class CosmoSharePasswordChangedMailjetMailDTO extends MailDTO {
|
|
171
188
|
constructor(recipients, recipientName, shareName, shareLink) {
|
|
172
|
-
super(recipients,
|
|
189
|
+
super(recipients, MailTemplate.COSMO_SHARE_PASSWORD_CHANGED, {
|
|
173
190
|
RECIPIENT_NAME: recipientName,
|
|
174
191
|
SHARE_NAME: shareName,
|
|
175
192
|
HCLOUD_SHARE_LINK: shareLink,
|
|
@@ -177,3 +194,183 @@ class CosmoSharePasswordChangedMailjetMailDTO extends MailjetMailDTO {
|
|
|
177
194
|
}
|
|
178
195
|
}
|
|
179
196
|
exports.CosmoSharePasswordChangedMailjetMailDTO = CosmoSharePasswordChangedMailjetMailDTO;
|
|
197
|
+
// Resend templates
|
|
198
|
+
class IdpNewRegistrationResendMailDTO extends MailDTO {
|
|
199
|
+
constructor(recipients, name, email, company, link) {
|
|
200
|
+
super(recipients, MailTemplate.IDP_NEW_REGISTRATION, {
|
|
201
|
+
NAME: name,
|
|
202
|
+
EMAIL: email,
|
|
203
|
+
COMPANY: company,
|
|
204
|
+
LINK: link,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.IdpNewRegistrationResendMailDTO = IdpNewRegistrationResendMailDTO;
|
|
209
|
+
class IdpNewRegistrationResendMailToCustomerDTO extends MailDTO {
|
|
210
|
+
constructor(recipients, username) {
|
|
211
|
+
super(recipients, MailTemplate.IDP_NEW_REGISTRATION_CUSTOMER, {
|
|
212
|
+
USERNAME: username,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.IdpNewRegistrationResendMailToCustomerDTO = IdpNewRegistrationResendMailToCustomerDTO;
|
|
217
|
+
class IdpNewClosedRegistrationResendMailDTO extends MailDTO {
|
|
218
|
+
constructor(recipients, name, email) {
|
|
219
|
+
super(recipients, MailTemplate.IDP_NEW_CLOSED_REGISTRATION, {
|
|
220
|
+
NAME: name,
|
|
221
|
+
EMAIL: email,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
exports.IdpNewClosedRegistrationResendMailDTO = IdpNewClosedRegistrationResendMailDTO;
|
|
226
|
+
class IdpResetPasswordResendMailDTO extends MailDTO {
|
|
227
|
+
constructor(recipients, email, resetPasswordLink) {
|
|
228
|
+
super(recipients, MailTemplate.IDP_RESET_PASSWORD, {
|
|
229
|
+
EMAIL: email,
|
|
230
|
+
LINK: resetPasswordLink,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
exports.IdpResetPasswordResendMailDTO = IdpResetPasswordResendMailDTO;
|
|
235
|
+
class IdpInviteToOrganizationResendMailDto extends MailDTO {
|
|
236
|
+
constructor(recipients, name, email, inviteFromPerson, inviteToOrganization, link) {
|
|
237
|
+
super(recipients, MailTemplate.IDP_INVITE_TO_ORGANIZATION, {
|
|
238
|
+
NAME: name,
|
|
239
|
+
EMAIL: email,
|
|
240
|
+
HCLOUD_INVITE_FROM: inviteFromPerson,
|
|
241
|
+
HCLOUD_INVITE_ORGANIZATION: inviteToOrganization,
|
|
242
|
+
LINK: link,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
exports.IdpInviteToOrganizationResendMailDto = IdpInviteToOrganizationResendMailDto;
|
|
247
|
+
class IdpRegisterAndInviteToOrganizationResendMailDto extends MailDTO {
|
|
248
|
+
constructor(recipients, email, inviteFromPerson, inviteToOrganization, link) {
|
|
249
|
+
super(recipients, MailTemplate.IDP_REGISTRATION_AND_INVITATION, {
|
|
250
|
+
EMAIL: email,
|
|
251
|
+
INVITE_FROM: inviteFromPerson,
|
|
252
|
+
INVITE_ORGANIZATION: inviteToOrganization,
|
|
253
|
+
LINK: link,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
exports.IdpRegisterAndInviteToOrganizationResendMailDto = IdpRegisterAndInviteToOrganizationResendMailDto;
|
|
258
|
+
class IdpUserLeftOrganizationResendMailDTO extends MailDTO {
|
|
259
|
+
constructor(recipients, name, email, organizationName) {
|
|
260
|
+
super(recipients, MailTemplate.IDP_USER_LEFT_ORGANIZATION, {
|
|
261
|
+
NAME: name,
|
|
262
|
+
EMAIL: email,
|
|
263
|
+
HCLOUD_ORGANIZATION_NAME: organizationName,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
exports.IdpUserLeftOrganizationResendMailDTO = IdpUserLeftOrganizationResendMailDTO;
|
|
268
|
+
class IdpAccountApprovedResendMailDTO extends MailDTO {
|
|
269
|
+
constructor(recipients, username, signInLink) {
|
|
270
|
+
super(recipients, MailTemplate.IDP_ACCOUNT_APPROVED, {
|
|
271
|
+
USERNAME: username,
|
|
272
|
+
HCLOUD_SIGN_IN_LINK: signInLink,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
exports.IdpAccountApprovedResendMailDTO = IdpAccountApprovedResendMailDTO;
|
|
277
|
+
class CosmoNewShareResendMailDTO extends MailDTO {
|
|
278
|
+
constructor(recipients, recipientEmail, shareLink, shareMessage) {
|
|
279
|
+
super(recipients, MailTemplate.COSMO_NEW_SHARE, {
|
|
280
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
281
|
+
LINK: shareLink,
|
|
282
|
+
HCLOUD_SHARE_MESSAGE: shareMessage,
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
exports.CosmoNewShareResendMailDTO = CosmoNewShareResendMailDTO;
|
|
287
|
+
class CosmoUserAddedToSpaceResendMailDTO extends MailDTO {
|
|
288
|
+
constructor(recipients, actorName, recipientName, recipientEmail, spaceName, link) {
|
|
289
|
+
super(recipients, MailTemplate.COSMO_USER_ADDED_TO_SPACE, {
|
|
290
|
+
ACTOR_NAME: actorName,
|
|
291
|
+
RECIPIENT_NAME: recipientName,
|
|
292
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
293
|
+
SPACE_NAME: spaceName,
|
|
294
|
+
LINK: link,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
exports.CosmoUserAddedToSpaceResendMailDTO = CosmoUserAddedToSpaceResendMailDTO;
|
|
299
|
+
class CosmoUserRemovedFromSpaceResendMailDTO extends MailDTO {
|
|
300
|
+
constructor(recipients, actorName, recipientName, recipientEmail, spaceName) {
|
|
301
|
+
super(recipients, MailTemplate.COSMO_USER_REMOVED_FROM_SPACE, {
|
|
302
|
+
ACTOR_NAME: actorName,
|
|
303
|
+
RECIPIENT_NAME: recipientName,
|
|
304
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
305
|
+
SPACE_NAME: spaceName,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
exports.CosmoUserRemovedFromSpaceResendMailDTO = CosmoUserRemovedFromSpaceResendMailDTO;
|
|
310
|
+
class CosmoCommentOrAnnotationAddedResendMailDTO extends MailDTO {
|
|
311
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, commentSnippet, spaceName, link) {
|
|
312
|
+
super(recipients, MailTemplate.COSMO_COMMENT_ADDED, {
|
|
313
|
+
ASSET_NAME: assetName,
|
|
314
|
+
RECIPIENT_NAME: recipientName,
|
|
315
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
316
|
+
ACTOR_NAME: actorName,
|
|
317
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
318
|
+
SPACE_NAME: spaceName,
|
|
319
|
+
LINK: link,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
exports.CosmoCommentOrAnnotationAddedResendMailDTO = CosmoCommentOrAnnotationAddedResendMailDTO;
|
|
324
|
+
class CosmoCommentMentionResendMailDTO extends MailDTO {
|
|
325
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, commentSnippet, spaceName, link) {
|
|
326
|
+
super(recipients, MailTemplate.COSMO_COMMENT_MENTION, {
|
|
327
|
+
ASSET_NAME: assetName,
|
|
328
|
+
RECIPIENT_NAME: recipientName,
|
|
329
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
330
|
+
ACTOR_NAME: actorName,
|
|
331
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
332
|
+
SPACE_NAME: spaceName,
|
|
333
|
+
LINK: link,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
exports.CosmoCommentMentionResendMailDTO = CosmoCommentMentionResendMailDTO;
|
|
338
|
+
class CosmoRepliedToCommentResendMailDTO extends MailDTO {
|
|
339
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, commentSnippet, spaceName, link) {
|
|
340
|
+
super(recipients, MailTemplate.COSMO_REPLIED_TO_COMMENT, {
|
|
341
|
+
ASSET_NAME: assetName,
|
|
342
|
+
RECIPIENT_NAME: recipientName,
|
|
343
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
344
|
+
ACTOR_NAME: actorName,
|
|
345
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
346
|
+
SPACE_NAME: spaceName,
|
|
347
|
+
LINK: link,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
exports.CosmoRepliedToCommentResendMailDTO = CosmoRepliedToCommentResendMailDTO;
|
|
352
|
+
class CosmoAssetStatusChangedResendMailDTO extends MailDTO {
|
|
353
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, newStatus, spaceName, link) {
|
|
354
|
+
super(recipients, MailTemplate.COSMO_ASSET_STATUS_CHANGED, {
|
|
355
|
+
ASSET_NAME: assetName,
|
|
356
|
+
RECIPIENT_NAME: recipientName,
|
|
357
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
358
|
+
ACTOR_NAME: actorName,
|
|
359
|
+
NEW_STATUS: newStatus,
|
|
360
|
+
SPACE_NAME: spaceName,
|
|
361
|
+
LINK: link,
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
exports.CosmoAssetStatusChangedResendMailDTO = CosmoAssetStatusChangedResendMailDTO;
|
|
366
|
+
class CosmoSharePasswordChangedResendMailDTO extends MailDTO {
|
|
367
|
+
constructor(recipients, recipientName, recipientEmail, shareName, shareLink) {
|
|
368
|
+
super(recipients, MailTemplate.COSMO_SHARE_PASSWORD_CHANGED, {
|
|
369
|
+
RECIPIENT_NAME: recipientName,
|
|
370
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
371
|
+
SHARE_NAME: shareName,
|
|
372
|
+
LINK: shareLink,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
exports.CosmoSharePasswordChangedResendMailDTO = CosmoSharePasswordChangedResendMailDTO;
|
|
@@ -53,6 +53,7 @@ declare enum NatsSubject {
|
|
|
53
53
|
COSMO_SPACES = "hcloud.cosmo.organization.${base64orgName}.spaces",
|
|
54
54
|
COSMO_NAMESPACES = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces",
|
|
55
55
|
COSMO_ASSETS = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.assets",
|
|
56
|
+
COSMO_STACKS = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.stacks",
|
|
56
57
|
COSMO_CROSS_SPACES_ASSETS = "hcloud.cosmo.organization.${base64orgName}.spaces.*.assets",
|
|
57
58
|
COSMO_COMMENTS = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.assets.${assetId}.comments",
|
|
58
59
|
COSMO_SHARE = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.share",
|
|
@@ -107,6 +108,7 @@ declare enum NatsObjectType {
|
|
|
107
108
|
AGENT = "AGENT",
|
|
108
109
|
MESSAGE = "MESSAGE",
|
|
109
110
|
ASSET = "ASSET",
|
|
111
|
+
STACK = "STACK",
|
|
110
112
|
COMMENT = "COMMENT",
|
|
111
113
|
TAG = "TAG",
|
|
112
114
|
SHARE = "SHARE",
|
|
@@ -160,6 +162,7 @@ interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, Nat
|
|
|
160
162
|
[NatsSubject.HIGH5_JOB_LOGS]: NatsIdObject;
|
|
161
163
|
[NatsSubject.HIGH5_CAPTURED_REQUEST]: CapturedRequest;
|
|
162
164
|
[NatsSubject.COSMO_ASSETS]: NatsAssetObject[];
|
|
165
|
+
[NatsSubject.COSMO_STACKS]: NatsAssetObject[];
|
|
163
166
|
[NatsSubject.COSMO_SHARE]: NatsIdObject;
|
|
164
167
|
[NatsSubject.COSMO_ROLES]: NatsIdObject;
|
|
165
168
|
[NatsSubject.COSMO_STATUS]: NatsCosmoStatusObject;
|
|
@@ -343,6 +346,7 @@ declare class NatsSubjects {
|
|
|
343
346
|
METADATA: (organizationName: string, spaceName: string, namespaceName: string) => string;
|
|
344
347
|
};
|
|
345
348
|
ASSETS: (organizationName: string, spaceName: string) => string;
|
|
349
|
+
STACKS: (organizationName: string, spaceName: string) => string;
|
|
346
350
|
SHARES: (organizationName: string, spaceName: string) => string;
|
|
347
351
|
ROLES: (organizationName: string, spaceName: string) => string;
|
|
348
352
|
Asset: {
|
|
@@ -56,6 +56,7 @@ var NatsSubject;
|
|
|
56
56
|
NatsSubject["COSMO_SPACES"] = "hcloud.cosmo.organization.${base64orgName}.spaces";
|
|
57
57
|
NatsSubject["COSMO_NAMESPACES"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces";
|
|
58
58
|
NatsSubject["COSMO_ASSETS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.assets";
|
|
59
|
+
NatsSubject["COSMO_STACKS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.stacks";
|
|
59
60
|
NatsSubject["COSMO_CROSS_SPACES_ASSETS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.*.assets";
|
|
60
61
|
NatsSubject["COSMO_COMMENTS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.assets.${assetId}.comments";
|
|
61
62
|
NatsSubject["COSMO_SHARE"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.share";
|
|
@@ -112,6 +113,7 @@ var NatsObjectType;
|
|
|
112
113
|
NatsObjectType["AGENT"] = "AGENT";
|
|
113
114
|
NatsObjectType["MESSAGE"] = "MESSAGE";
|
|
114
115
|
NatsObjectType["ASSET"] = "ASSET";
|
|
116
|
+
NatsObjectType["STACK"] = "STACK";
|
|
115
117
|
NatsObjectType["COMMENT"] = "COMMENT";
|
|
116
118
|
NatsObjectType["TAG"] = "TAG";
|
|
117
119
|
NatsObjectType["SHARE"] = "SHARE";
|
|
@@ -420,6 +422,9 @@ NatsSubjects.Cosmo = (_t = class {
|
|
|
420
422
|
_u.ASSETS = (organizationName, spaceName) => {
|
|
421
423
|
return NatsSubjects.replace(NatsSubject.COSMO_ASSETS, { organizationName, spaceName });
|
|
422
424
|
},
|
|
425
|
+
_u.STACKS = (organizationName, spaceName) => {
|
|
426
|
+
return NatsSubjects.replace(NatsSubject.COSMO_STACKS, { organizationName, spaceName });
|
|
427
|
+
},
|
|
423
428
|
_u.SHARES = (organizationName, spaceName) => {
|
|
424
429
|
return NatsSubjects.replace(NatsSubject.COSMO_SHARE, { organizationName, spaceName });
|
|
425
430
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { AuditLog } from "../../../interfaces/auditor";
|
|
3
|
-
import { Asset, AssetPermission, CreateAsset, Mentionable, PatchAsset, Resolution, SubscriptionFilter, Upload, VTTThumbnail } from "../../../interfaces/cosmo/asset";
|
|
3
|
+
import { Asset, AssetFilter, AssetPermission, AssetSearchContext, AudioWaveformItem, CreateAsset, Mentionable, PatchAsset, Resolution, SubscriptionFilter, Upload, VTTThumbnail } from "../../../interfaces/cosmo/asset";
|
|
4
|
+
import { Sorting } from "../../../interfaces/global";
|
|
4
5
|
/**
|
|
5
6
|
* @class Asset
|
|
6
7
|
* @extends Base
|
|
@@ -12,6 +13,36 @@ import { Asset, AssetPermission, CreateAsset, Mentionable, PatchAsset, Resolutio
|
|
|
12
13
|
*/
|
|
13
14
|
export declare class CosmoAsset extends Base {
|
|
14
15
|
protected getEndpoint(endpoint: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Browse assets
|
|
18
|
+
*
|
|
19
|
+
* @param orgName Name of the Organization
|
|
20
|
+
* @param spaceName Name of the Space
|
|
21
|
+
* @param context Context to search in (e.g., ORGANIZATION, TRASH, SHARE)
|
|
22
|
+
* @param limit Maximum number of Assets to return
|
|
23
|
+
* @param page Page number for pagination
|
|
24
|
+
* @param spaceName Name of Space to restrict search (mandatory if context is not ORGANIZATION)
|
|
25
|
+
* @param namespace Name of Namespace to restrict search
|
|
26
|
+
* @param parentId ID of parent (folder, etc.) to restrict search
|
|
27
|
+
* @param shareId ID of Share to restrict search (mandatory if context is SHARE)
|
|
28
|
+
* @param assetFilter Filter criteria for Assets
|
|
29
|
+
* @param sorting Sorting criteria for the results
|
|
30
|
+
* @returns List of found Assets
|
|
31
|
+
*/
|
|
32
|
+
browse<R extends boolean = false>({ orgName, spaceName, context, limit, page, namespace, parentId, shareId, assetFilter, sorting, }: {
|
|
33
|
+
orgName: string;
|
|
34
|
+
spaceName: string;
|
|
35
|
+
context: AssetSearchContext;
|
|
36
|
+
limit?: number;
|
|
37
|
+
page?: number;
|
|
38
|
+
namespace?: string[] | string;
|
|
39
|
+
parentId?: string;
|
|
40
|
+
shareId?: string;
|
|
41
|
+
assetFilter?: AssetFilter[];
|
|
42
|
+
sorting?: Sorting;
|
|
43
|
+
}, raw?: {
|
|
44
|
+
raw: R;
|
|
45
|
+
}): Promise<MaybeRaw<R, Asset[]>>;
|
|
15
46
|
/**
|
|
16
47
|
* Create a new Asset in Cosmo inside the specified Organization and Space.
|
|
17
48
|
* @remarks
|
|
@@ -154,6 +185,17 @@ export declare class CosmoAsset extends Base {
|
|
|
154
185
|
fetchAssetActivity<R extends boolean = false>(orgName: string, spaceName: string, assetId: string, limit: number, page: number, raw?: {
|
|
155
186
|
raw: R;
|
|
156
187
|
}): Promise<MaybeRaw<R, AuditLog[]>>;
|
|
188
|
+
/**
|
|
189
|
+
* Fetches the assets vtt as plain text
|
|
190
|
+
*
|
|
191
|
+
* @param {string} orgName - The name of the organization that owns the space.
|
|
192
|
+
* @param {string} spaceName - The name of the space containing the asset.
|
|
193
|
+
* @param {string} assetId - The unique identifier of the asset whose VTT file is being fetched.
|
|
194
|
+
* @returns {Promise<string>} The assets VTT file as plain text.
|
|
195
|
+
*/
|
|
196
|
+
fetchAssetVtt<R extends boolean = false>(orgName: string, spaceName: string, assetId: string, raw?: {
|
|
197
|
+
raw: R;
|
|
198
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
157
199
|
/**
|
|
158
200
|
* Fetches an assets VTT file and parses it to return an array of VTTThumbnail objects.
|
|
159
201
|
*
|
|
@@ -239,6 +281,17 @@ export declare class CosmoAsset extends Base {
|
|
|
239
281
|
cloneAsset<R extends boolean = false>(orgName: string, spaceName: string, assetIds: string[], parentId?: string, raw?: {
|
|
240
282
|
raw: R;
|
|
241
283
|
}): Promise<MaybeRaw<R, Asset[]>>;
|
|
284
|
+
/**
|
|
285
|
+
* Get audio waveform of an asset.
|
|
286
|
+
*
|
|
287
|
+
* @param orgName Name of the Organization
|
|
288
|
+
* @param spaceName Name of the Space
|
|
289
|
+
* @param assetId List of Asset IDs to be cloned. If folder IDs are specified, they will be recursively cloned.
|
|
290
|
+
* @returns the waveform array
|
|
291
|
+
*/
|
|
292
|
+
getAssetWaveform<R extends boolean = false>(orgName: string, spaceName: string, assetId: string, raw?: {
|
|
293
|
+
raw: R;
|
|
294
|
+
}): Promise<MaybeRaw<R, AudioWaveformItem>>;
|
|
242
295
|
/**
|
|
243
296
|
* Subscribe to notifications for a specific asset or all assets in a space.
|
|
244
297
|
*
|
|
@@ -28,6 +28,40 @@ class CosmoAsset extends Base_1.default {
|
|
|
28
28
|
getEndpoint(endpoint) {
|
|
29
29
|
return `${this.options.server}/api/cosmo${endpoint}`;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Browse assets
|
|
33
|
+
*
|
|
34
|
+
* @param orgName Name of the Organization
|
|
35
|
+
* @param spaceName Name of the Space
|
|
36
|
+
* @param context Context to search in (e.g., ORGANIZATION, TRASH, SHARE)
|
|
37
|
+
* @param limit Maximum number of Assets to return
|
|
38
|
+
* @param page Page number for pagination
|
|
39
|
+
* @param spaceName Name of Space to restrict search (mandatory if context is not ORGANIZATION)
|
|
40
|
+
* @param namespace Name of Namespace to restrict search
|
|
41
|
+
* @param parentId ID of parent (folder, etc.) to restrict search
|
|
42
|
+
* @param shareId ID of Share to restrict search (mandatory if context is SHARE)
|
|
43
|
+
* @param assetFilter Filter criteria for Assets
|
|
44
|
+
* @param sorting Sorting criteria for the results
|
|
45
|
+
* @returns List of found Assets
|
|
46
|
+
*/
|
|
47
|
+
browse(_a, raw_1) {
|
|
48
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, context, limit, page, namespace, parentId, shareId, assetFilter, sorting, }, raw) {
|
|
49
|
+
limit = limit !== null && limit !== void 0 ? limit : 100;
|
|
50
|
+
page = page !== null && page !== void 0 ? page : 0;
|
|
51
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/assets/browse`), Object.assign({ filters: assetFilter !== null && assetFilter !== void 0 ? assetFilter : [] }, (sorting ? { sorting } : {})), {
|
|
52
|
+
params: {
|
|
53
|
+
context,
|
|
54
|
+
limit,
|
|
55
|
+
page,
|
|
56
|
+
spaceName,
|
|
57
|
+
namespace,
|
|
58
|
+
parentId,
|
|
59
|
+
shareId,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
31
65
|
/**
|
|
32
66
|
* Create a new Asset in Cosmo inside the specified Organization and Space.
|
|
33
67
|
* @remarks
|
|
@@ -227,6 +261,20 @@ class CosmoAsset extends Base_1.default {
|
|
|
227
261
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
228
262
|
});
|
|
229
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Fetches the assets vtt as plain text
|
|
266
|
+
*
|
|
267
|
+
* @param {string} orgName - The name of the organization that owns the space.
|
|
268
|
+
* @param {string} spaceName - The name of the space containing the asset.
|
|
269
|
+
* @param {string} assetId - The unique identifier of the asset whose VTT file is being fetched.
|
|
270
|
+
* @returns {Promise<string>} The assets VTT file as plain text.
|
|
271
|
+
*/
|
|
272
|
+
fetchAssetVtt(orgName, spaceName, assetId, raw) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/assets/${assetId}/vtt`));
|
|
275
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
230
278
|
/**
|
|
231
279
|
* Fetches an assets VTT file and parses it to return an array of VTTThumbnail objects.
|
|
232
280
|
*
|
|
@@ -375,6 +423,20 @@ class CosmoAsset extends Base_1.default {
|
|
|
375
423
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
376
424
|
});
|
|
377
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* Get audio waveform of an asset.
|
|
428
|
+
*
|
|
429
|
+
* @param orgName Name of the Organization
|
|
430
|
+
* @param spaceName Name of the Space
|
|
431
|
+
* @param assetId List of Asset IDs to be cloned. If folder IDs are specified, they will be recursively cloned.
|
|
432
|
+
* @returns the waveform array
|
|
433
|
+
*/
|
|
434
|
+
getAssetWaveform(orgName, spaceName, assetId, raw) {
|
|
435
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
436
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/assets/${assetId}/waveform`));
|
|
437
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
438
|
+
});
|
|
439
|
+
}
|
|
378
440
|
/**
|
|
379
441
|
* Subscribe to notifications for a specific asset or all assets in a space.
|
|
380
442
|
*
|
|
@@ -32,7 +32,7 @@ export declare class CosmoComment extends Base {
|
|
|
32
32
|
* @param orgName Name of the Organization
|
|
33
33
|
* @param spaceName Name of the Space
|
|
34
34
|
* @param namespaceName Name of the Namespace
|
|
35
|
-
* @param limit Maximum number of comments to return,
|
|
35
|
+
* @param limit Maximum number of comments to return, use -1 for no limit
|
|
36
36
|
* @param page Page number for pagination
|
|
37
37
|
* @param annotation Whether to include annotations in the response
|
|
38
38
|
* @param replySample Amount of replies to load
|
|
@@ -70,7 +70,7 @@ export declare class CosmoComment extends Base {
|
|
|
70
70
|
* @param orgName Name of the Organization
|
|
71
71
|
* @param spaceName Name of the Space
|
|
72
72
|
* @param namespaceName Name of the Namespace
|
|
73
|
-
* @param commentId ID of the Comment to
|
|
73
|
+
* @param commentId ID of the Comment to get
|
|
74
74
|
* @param annotation Whether to include annotations in the response
|
|
75
75
|
*
|
|
76
76
|
* @returns The requested Comment
|