hcloud-sdk 20.1.0 → 21.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 +28 -2
- package/lib/Base.d.ts +3 -0
- package/lib/Hcloud.d.ts +3 -0
- package/lib/Hcloud.js +7 -0
- package/lib/helper/ValidationHelper.js +1 -1
- package/lib/interfaces/cosmo/asset/index.d.ts +12 -3
- package/lib/interfaces/cosmo/asset/index.js +1 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +24 -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 +76 -20
- package/lib/interfaces/mailer/index.js +244 -49
- package/lib/interfaces/nats/index.d.ts +4 -0
- package/lib/interfaces/nats/index.js +5 -0
- package/lib/interfaces/panel/index.d.ts +13 -0
- package/lib/interfaces/panel/index.js +2 -0
- package/lib/service/cosmo/asset/index.d.ts +43 -1
- package/lib/service/cosmo/asset/index.js +48 -0
- 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/lib/service/panel/index.d.ts +11 -0
- package/lib/service/panel/index.js +33 -0
- package/package.json +2 -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,26 @@ 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
|
|
105
|
+
class CosmoNewShareMailjetMailDTO extends MailDTO {
|
|
103
106
|
constructor(recipients, shareLink) {
|
|
104
|
-
super(recipients,
|
|
107
|
+
super(recipients, MailTemplate.COSMO_NEW_SHARE, {
|
|
105
108
|
HCLOUD_SHARE_LINK: shareLink,
|
|
106
109
|
});
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
exports.CosmoNewShareMailjetMailDTO = CosmoNewShareMailjetMailDTO;
|
|
110
|
-
class CosmoUserAddedToSpaceMailjetMailDTO extends
|
|
113
|
+
class CosmoUserAddedToSpaceMailjetMailDTO extends MailDTO {
|
|
111
114
|
constructor(recipients, actorName, recipientName, spaceName, link) {
|
|
112
|
-
super(recipients,
|
|
115
|
+
super(recipients, MailTemplate.COSMO_USER_ADDED_TO_SPACE, {
|
|
113
116
|
ACTOR_NAME: actorName,
|
|
114
117
|
RECIPIENT_NAME: recipientName,
|
|
115
118
|
SPACE_NAME: spaceName,
|
|
@@ -118,9 +121,9 @@ class CosmoUserAddedToSpaceMailjetMailDTO extends MailjetMailDTO {
|
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
exports.CosmoUserAddedToSpaceMailjetMailDTO = CosmoUserAddedToSpaceMailjetMailDTO;
|
|
121
|
-
class CosmoUserRemovedFromSpaceMailjetMailDTO extends
|
|
124
|
+
class CosmoUserRemovedFromSpaceMailjetMailDTO extends MailDTO {
|
|
122
125
|
constructor(recipients, actorName, recipientName, spaceName) {
|
|
123
|
-
super(recipients,
|
|
126
|
+
super(recipients, MailTemplate.COSMO_USER_REMOVED_FROM_SPACE, {
|
|
124
127
|
ACTOR_NAME: actorName,
|
|
125
128
|
RECIPIENT_NAME: recipientName,
|
|
126
129
|
SPACE_NAME: spaceName,
|
|
@@ -128,9 +131,9 @@ class CosmoUserRemovedFromSpaceMailjetMailDTO extends MailjetMailDTO {
|
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
133
|
exports.CosmoUserRemovedFromSpaceMailjetMailDTO = CosmoUserRemovedFromSpaceMailjetMailDTO;
|
|
131
|
-
class CosmoCommentOrAnnotationAddedMailjetMailDTO extends
|
|
134
|
+
class CosmoCommentOrAnnotationAddedMailjetMailDTO extends MailDTO {
|
|
132
135
|
constructor(recipients, assetName, recipientName, actorName, commentSnippet, spaceName, link) {
|
|
133
|
-
super(recipients,
|
|
136
|
+
super(recipients, MailTemplate.COSMO_COMMENT_ADDED, {
|
|
134
137
|
ASSET_NAME: assetName,
|
|
135
138
|
RECIPIENT_NAME: recipientName,
|
|
136
139
|
ACTOR_NAME: actorName,
|
|
@@ -141,9 +144,22 @@ class CosmoCommentOrAnnotationAddedMailjetMailDTO extends MailjetMailDTO {
|
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
exports.CosmoCommentOrAnnotationAddedMailjetMailDTO = CosmoCommentOrAnnotationAddedMailjetMailDTO;
|
|
144
|
-
class
|
|
147
|
+
class CosmoCommentMentionMailjetMailDTO extends MailDTO {
|
|
145
148
|
constructor(recipients, assetName, recipientName, actorName, commentSnippet, spaceName, link) {
|
|
146
|
-
super(recipients,
|
|
149
|
+
super(recipients, MailTemplate.COSMO_COMMENT_MENTION, {
|
|
150
|
+
ASSET_NAME: assetName,
|
|
151
|
+
RECIPIENT_NAME: recipientName,
|
|
152
|
+
ACTOR_NAME: actorName,
|
|
153
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
154
|
+
SPACE_NAME: spaceName,
|
|
155
|
+
LINK: link,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.CosmoCommentMentionMailjetMailDTO = CosmoCommentMentionMailjetMailDTO;
|
|
160
|
+
class CosmoRepliedToCommentMailjetMailDTO extends MailDTO {
|
|
161
|
+
constructor(recipients, assetName, recipientName, actorName, commentSnippet, spaceName, link) {
|
|
162
|
+
super(recipients, MailTemplate.COSMO_REPLIED_TO_COMMENT, {
|
|
147
163
|
ASSET_NAME: assetName,
|
|
148
164
|
RECIPIENT_NAME: recipientName,
|
|
149
165
|
ACTOR_NAME: actorName,
|
|
@@ -154,9 +170,9 @@ class CosmoRepliedToCommentMailjetMailDTO extends MailjetMailDTO {
|
|
|
154
170
|
}
|
|
155
171
|
}
|
|
156
172
|
exports.CosmoRepliedToCommentMailjetMailDTO = CosmoRepliedToCommentMailjetMailDTO;
|
|
157
|
-
class CosmoAssetStatusChangedMailjetMailDTO extends
|
|
173
|
+
class CosmoAssetStatusChangedMailjetMailDTO extends MailDTO {
|
|
158
174
|
constructor(recipients, assetName, recipientName, actorName, newStatus, spaceName, link) {
|
|
159
|
-
super(recipients,
|
|
175
|
+
super(recipients, MailTemplate.COSMO_ASSET_STATUS_CHANGED, {
|
|
160
176
|
ASSET_NAME: assetName,
|
|
161
177
|
RECIPIENT_NAME: recipientName,
|
|
162
178
|
ACTOR_NAME: actorName,
|
|
@@ -167,9 +183,9 @@ class CosmoAssetStatusChangedMailjetMailDTO extends MailjetMailDTO {
|
|
|
167
183
|
}
|
|
168
184
|
}
|
|
169
185
|
exports.CosmoAssetStatusChangedMailjetMailDTO = CosmoAssetStatusChangedMailjetMailDTO;
|
|
170
|
-
class CosmoSharePasswordChangedMailjetMailDTO extends
|
|
186
|
+
class CosmoSharePasswordChangedMailjetMailDTO extends MailDTO {
|
|
171
187
|
constructor(recipients, recipientName, shareName, shareLink) {
|
|
172
|
-
super(recipients,
|
|
188
|
+
super(recipients, MailTemplate.COSMO_SHARE_PASSWORD_CHANGED, {
|
|
173
189
|
RECIPIENT_NAME: recipientName,
|
|
174
190
|
SHARE_NAME: shareName,
|
|
175
191
|
HCLOUD_SHARE_LINK: shareLink,
|
|
@@ -177,3 +193,182 @@ class CosmoSharePasswordChangedMailjetMailDTO extends MailjetMailDTO {
|
|
|
177
193
|
}
|
|
178
194
|
}
|
|
179
195
|
exports.CosmoSharePasswordChangedMailjetMailDTO = CosmoSharePasswordChangedMailjetMailDTO;
|
|
196
|
+
// Resend templates
|
|
197
|
+
class IdpNewRegistrationResendMailDTO extends MailDTO {
|
|
198
|
+
constructor(recipients, name, email, company, link) {
|
|
199
|
+
super(recipients, MailTemplate.IDP_NEW_REGISTRATION, {
|
|
200
|
+
NAME: name,
|
|
201
|
+
EMAIL: email,
|
|
202
|
+
COMPANY: company,
|
|
203
|
+
LINK: link,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
exports.IdpNewRegistrationResendMailDTO = IdpNewRegistrationResendMailDTO;
|
|
208
|
+
class IdpNewRegistrationResendMailToCustomerDTO extends MailDTO {
|
|
209
|
+
constructor(recipients, username) {
|
|
210
|
+
super(recipients, MailTemplate.IDP_NEW_REGISTRATION_CUSTOMER, {
|
|
211
|
+
USERNAME: username,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
exports.IdpNewRegistrationResendMailToCustomerDTO = IdpNewRegistrationResendMailToCustomerDTO;
|
|
216
|
+
class IdpNewClosedRegistrationResendMailDTO extends MailDTO {
|
|
217
|
+
constructor(recipients, name, email) {
|
|
218
|
+
super(recipients, MailTemplate.IDP_NEW_CLOSED_REGISTRATION, {
|
|
219
|
+
NAME: name,
|
|
220
|
+
EMAIL: email,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
exports.IdpNewClosedRegistrationResendMailDTO = IdpNewClosedRegistrationResendMailDTO;
|
|
225
|
+
class IdpResetPasswordResendMailDTO extends MailDTO {
|
|
226
|
+
constructor(recipients, email, resetPasswordLink) {
|
|
227
|
+
super(recipients, MailTemplate.IDP_RESET_PASSWORD, {
|
|
228
|
+
EMAIL: email,
|
|
229
|
+
LINK: resetPasswordLink,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
exports.IdpResetPasswordResendMailDTO = IdpResetPasswordResendMailDTO;
|
|
234
|
+
class IdpInviteToOrganizationResendMailDto extends MailDTO {
|
|
235
|
+
constructor(recipients, name, email, inviteFromPerson, inviteToOrganization, link) {
|
|
236
|
+
super(recipients, MailTemplate.IDP_INVITE_TO_ORGANIZATION, {
|
|
237
|
+
NAME: name,
|
|
238
|
+
EMAIL: email,
|
|
239
|
+
HCLOUD_INVITE_FROM: inviteFromPerson,
|
|
240
|
+
HCLOUD_INVITE_ORGANIZATION: inviteToOrganization,
|
|
241
|
+
LINK: link,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
exports.IdpInviteToOrganizationResendMailDto = IdpInviteToOrganizationResendMailDto;
|
|
246
|
+
class IdpRegisterAndInviteToOrganizationResendMailDto extends MailDTO {
|
|
247
|
+
constructor(recipients, email, inviteFromPerson, inviteToOrganization, link) {
|
|
248
|
+
super(recipients, MailTemplate.IDP_REGISTRATION_AND_INVITATION, {
|
|
249
|
+
EMAIL: email,
|
|
250
|
+
INVITE_FROM: inviteFromPerson,
|
|
251
|
+
INVITE_ORGANIZATION: inviteToOrganization,
|
|
252
|
+
LINK: link,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
exports.IdpRegisterAndInviteToOrganizationResendMailDto = IdpRegisterAndInviteToOrganizationResendMailDto;
|
|
257
|
+
class IdpUserLeftOrganizationResendMailDTO extends MailDTO {
|
|
258
|
+
constructor(recipients, name, email, organizationName) {
|
|
259
|
+
super(recipients, MailTemplate.IDP_USER_LEFT_ORGANIZATION, {
|
|
260
|
+
NAME: name,
|
|
261
|
+
EMAIL: email,
|
|
262
|
+
HCLOUD_ORGANIZATION_NAME: organizationName,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
exports.IdpUserLeftOrganizationResendMailDTO = IdpUserLeftOrganizationResendMailDTO;
|
|
267
|
+
class IdpAccountApprovedResendMailDTO extends MailDTO {
|
|
268
|
+
constructor(recipients, username, signInLink) {
|
|
269
|
+
super(recipients, MailTemplate.IDP_ACCOUNT_APPROVED, {
|
|
270
|
+
USERNAME: username,
|
|
271
|
+
HCLOUD_SIGN_IN_LINK: signInLink,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
exports.IdpAccountApprovedResendMailDTO = IdpAccountApprovedResendMailDTO;
|
|
276
|
+
class CosmoNewShareResendMailDTO extends MailDTO {
|
|
277
|
+
constructor(recipients, recipientEmail, shareLink) {
|
|
278
|
+
super(recipients, MailTemplate.COSMO_NEW_SHARE, {
|
|
279
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
280
|
+
LINK: shareLink,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
exports.CosmoNewShareResendMailDTO = CosmoNewShareResendMailDTO;
|
|
285
|
+
class CosmoUserAddedToSpaceResendMailDTO extends MailDTO {
|
|
286
|
+
constructor(recipients, actorName, recipientName, recipientEmail, spaceName, link) {
|
|
287
|
+
super(recipients, MailTemplate.COSMO_USER_ADDED_TO_SPACE, {
|
|
288
|
+
ACTOR_NAME: actorName,
|
|
289
|
+
RECIPIENT_NAME: recipientName,
|
|
290
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
291
|
+
SPACE_NAME: spaceName,
|
|
292
|
+
LINK: link,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
exports.CosmoUserAddedToSpaceResendMailDTO = CosmoUserAddedToSpaceResendMailDTO;
|
|
297
|
+
class CosmoUserRemovedFromSpaceResendMailDTO extends MailDTO {
|
|
298
|
+
constructor(recipients, actorName, recipientName, recipientEmail, spaceName) {
|
|
299
|
+
super(recipients, MailTemplate.COSMO_USER_REMOVED_FROM_SPACE, {
|
|
300
|
+
ACTOR_NAME: actorName,
|
|
301
|
+
RECIPIENT_NAME: recipientName,
|
|
302
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
303
|
+
SPACE_NAME: spaceName,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
exports.CosmoUserRemovedFromSpaceResendMailDTO = CosmoUserRemovedFromSpaceResendMailDTO;
|
|
308
|
+
class CosmoCommentOrAnnotationAddedResendMailDTO extends MailDTO {
|
|
309
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, commentSnippet, spaceName, link) {
|
|
310
|
+
super(recipients, MailTemplate.COSMO_COMMENT_ADDED, {
|
|
311
|
+
ASSET_NAME: assetName,
|
|
312
|
+
RECIPIENT_NAME: recipientName,
|
|
313
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
314
|
+
ACTOR_NAME: actorName,
|
|
315
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
316
|
+
SPACE_NAME: spaceName,
|
|
317
|
+
LINK: link,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
exports.CosmoCommentOrAnnotationAddedResendMailDTO = CosmoCommentOrAnnotationAddedResendMailDTO;
|
|
322
|
+
class CosmoCommentMentionResendMailDTO extends MailDTO {
|
|
323
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, commentSnippet, spaceName, link) {
|
|
324
|
+
super(recipients, MailTemplate.COSMO_COMMENT_MENTION, {
|
|
325
|
+
ASSET_NAME: assetName,
|
|
326
|
+
RECIPIENT_NAME: recipientName,
|
|
327
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
328
|
+
ACTOR_NAME: actorName,
|
|
329
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
330
|
+
SPACE_NAME: spaceName,
|
|
331
|
+
LINK: link,
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
exports.CosmoCommentMentionResendMailDTO = CosmoCommentMentionResendMailDTO;
|
|
336
|
+
class CosmoRepliedToCommentResendMailDTO extends MailDTO {
|
|
337
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, commentSnippet, spaceName, link) {
|
|
338
|
+
super(recipients, MailTemplate.COSMO_REPLIED_TO_COMMENT, {
|
|
339
|
+
ASSET_NAME: assetName,
|
|
340
|
+
RECIPIENT_NAME: recipientName,
|
|
341
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
342
|
+
ACTOR_NAME: actorName,
|
|
343
|
+
COMMENT_SNIPPET: commentSnippet,
|
|
344
|
+
SPACE_NAME: spaceName,
|
|
345
|
+
LINK: link,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
exports.CosmoRepliedToCommentResendMailDTO = CosmoRepliedToCommentResendMailDTO;
|
|
350
|
+
class CosmoAssetStatusChangedResendMailDTO extends MailDTO {
|
|
351
|
+
constructor(recipients, assetName, recipientName, recipientEmail, actorName, newStatus, spaceName, link) {
|
|
352
|
+
super(recipients, MailTemplate.COSMO_ASSET_STATUS_CHANGED, {
|
|
353
|
+
ASSET_NAME: assetName,
|
|
354
|
+
RECIPIENT_NAME: recipientName,
|
|
355
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
356
|
+
ACTOR_NAME: actorName,
|
|
357
|
+
NEW_STATUS: newStatus,
|
|
358
|
+
SPACE_NAME: spaceName,
|
|
359
|
+
LINK: link,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
exports.CosmoAssetStatusChangedResendMailDTO = CosmoAssetStatusChangedResendMailDTO;
|
|
364
|
+
class CosmoSharePasswordChangedResendMailDTO extends MailDTO {
|
|
365
|
+
constructor(recipients, recipientName, recipientEmail, shareName, shareLink) {
|
|
366
|
+
super(recipients, MailTemplate.COSMO_SHARE_PASSWORD_CHANGED, {
|
|
367
|
+
RECIPIENT_NAME: recipientName,
|
|
368
|
+
RECIPIENT_EMAIL: recipientEmail,
|
|
369
|
+
SHARE_NAME: shareName,
|
|
370
|
+
LINK: shareLink,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
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
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PanelVersions {
|
|
2
|
+
latestDev: string;
|
|
3
|
+
latest: string;
|
|
4
|
+
versions: Record<string, PanelVersion[]>;
|
|
5
|
+
}
|
|
6
|
+
export interface PanelVersion {
|
|
7
|
+
path: string;
|
|
8
|
+
published_date: number;
|
|
9
|
+
version: string;
|
|
10
|
+
arch: string;
|
|
11
|
+
os: string;
|
|
12
|
+
dev: boolean;
|
|
13
|
+
}
|
|
@@ -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, 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
|
*
|
|
@@ -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
|
*
|
|
@@ -12,6 +12,7 @@ import { CosmoPermissions } from "./permissions";
|
|
|
12
12
|
import { CosmoProduction } from "./production";
|
|
13
13
|
import { CosmoShare } from "./share";
|
|
14
14
|
import { CosmoSpace } from "./space";
|
|
15
|
+
import { CosmoStack } from "./stack";
|
|
15
16
|
import { CosmoStats } from "./stats";
|
|
16
17
|
import { CosmoTag } from "./tag";
|
|
17
18
|
export default class CosmoService extends Base {
|
|
@@ -39,6 +40,8 @@ export default class CosmoService extends Base {
|
|
|
39
40
|
private _cosmoEvent?;
|
|
40
41
|
get cosmoTag(): CosmoTag;
|
|
41
42
|
private _cosmoTag?;
|
|
43
|
+
get cosmoStack(): CosmoStack;
|
|
44
|
+
private _cosmoStack?;
|
|
42
45
|
get cosmoPermissions(): CosmoPermissions;
|
|
43
46
|
private _cosmoPermissions?;
|
|
44
47
|
get cosmoStats(): CosmoStats;
|
|
@@ -25,6 +25,7 @@ const permissions_1 = require("./permissions");
|
|
|
25
25
|
const production_1 = require("./production");
|
|
26
26
|
const share_1 = require("./share");
|
|
27
27
|
const space_2 = require("./space");
|
|
28
|
+
const stack_1 = require("./stack");
|
|
28
29
|
const stats_1 = require("./stats");
|
|
29
30
|
const tag_1 = require("./tag");
|
|
30
31
|
class CosmoService extends Base_1.default {
|
|
@@ -100,6 +101,12 @@ class CosmoService extends Base_1.default {
|
|
|
100
101
|
}
|
|
101
102
|
return this._cosmoTag;
|
|
102
103
|
}
|
|
104
|
+
get cosmoStack() {
|
|
105
|
+
if (this._cosmoStack === undefined) {
|
|
106
|
+
this._cosmoStack = new stack_1.CosmoStack(this.options, this.axios);
|
|
107
|
+
}
|
|
108
|
+
return this._cosmoStack;
|
|
109
|
+
}
|
|
103
110
|
get cosmoPermissions() {
|
|
104
111
|
if (this._cosmoPermissions === undefined) {
|
|
105
112
|
this._cosmoPermissions = new permissions_1.CosmoPermissions(this.options, this.axios);
|