hcloud-sdk 14.13.2 → 15.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 +36 -800
- package/lib/Hcloud.d.ts +20 -10
- package/lib/Hcloud.js +60 -10
- package/lib/interfaces/bouncer/features/index.d.ts +3 -6
- package/lib/interfaces/frontend/featureflags/index.d.ts +7 -0
- package/lib/interfaces/frontend/featureflags/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +2 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +11 -0
- package/lib/interfaces/high5/wave/changelog.d.ts +30 -0
- package/lib/interfaces/high5/wave/changelog.js +18 -0
- package/lib/interfaces/high5/wave/index.d.ts +31 -1
- package/lib/interfaces/high5/wave/index.js +10 -1
- package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
- package/lib/interfaces/mothership/index.d.ts +1 -0
- package/lib/interfaces/nats/index.d.ts +8 -21
- package/lib/interfaces/nats/index.js +72 -90
- package/lib/service/agent/bundle/dev/index.d.ts +2 -2
- package/lib/service/agent/bundle/dev/index.js +14 -10
- package/lib/service/agent/context/index.d.ts +7 -9
- package/lib/service/agent/context/index.js +41 -32
- package/lib/service/agent/index.d.ts +9 -7
- package/lib/service/agent/index.js +23 -6
- package/lib/service/auditor/index.d.ts +6 -7
- package/lib/service/auditor/index.js +23 -17
- package/lib/service/auditor/internal/index.d.ts +2 -2
- package/lib/service/auditor/internal/index.js +24 -20
- package/lib/service/bouncer/features/index.d.ts +1 -1
- package/lib/service/bouncer/features/index.js +5 -3
- package/lib/service/bouncer/index.d.ts +3 -10
- package/lib/service/bouncer/index.js +6 -21
- package/lib/service/dali/DaliAvatar.d.ts +13 -9
- package/lib/service/dali/DaliAvatar.js +53 -8
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +4 -6
- package/lib/service/dali/avatar/DaliFuseSpace.js +26 -23
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +4 -6
- package/lib/service/dali/avatar/DaliHigh5Space.js +26 -23
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +4 -6
- package/lib/service/dali/avatar/DaliOAuthApp.js +26 -23
- package/lib/service/dali/avatar/DaliOrganization.d.ts +4 -6
- package/lib/service/dali/avatar/DaliOrganization.js +23 -20
- package/lib/service/dali/avatar/DaliTeam.d.ts +4 -6
- package/lib/service/dali/avatar/DaliTeam.js +26 -23
- package/lib/service/dali/avatar/DaliUser.d.ts +4 -6
- package/lib/service/dali/avatar/DaliUser.js +20 -17
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +14 -7
- package/lib/service/fuse/index.d.ts +8 -7
- package/lib/service/fuse/index.js +23 -9
- package/lib/service/fuse/internal/index.d.ts +3 -4
- package/lib/service/fuse/internal/index.js +5 -3
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +3 -4
- package/lib/service/fuse/internal/space/cronjob/index.js +5 -3
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +2 -4
- package/lib/service/fuse/internal/space/cronjob/log/index.js +11 -12
- package/lib/service/fuse/internal/space/index.d.ts +5 -6
- package/lib/service/fuse/internal/space/index.js +24 -18
- package/lib/service/fuse/space/cronjob/index.d.ts +15 -15
- package/lib/service/fuse/space/cronjob/index.js +133 -105
- package/lib/service/fuse/space/cronjob/log/index.d.ts +3 -3
- package/lib/service/fuse/space/cronjob/log/index.js +24 -23
- package/lib/service/fuse/space/index.d.ts +13 -14
- package/lib/service/fuse/space/index.js +88 -70
- package/lib/service/high5/execution/index.d.ts +5 -5
- package/lib/service/high5/execution/index.js +11 -4
- package/lib/service/high5/execution/log/index.d.ts +2 -2
- package/lib/service/high5/execution/log/index.js +11 -12
- package/lib/service/high5/execution/status/index.d.ts +2 -2
- package/lib/service/high5/execution/status/index.js +11 -12
- package/lib/service/high5/index.d.ts +12 -9
- package/lib/service/high5/index.js +36 -12
- package/lib/service/high5/internal/index.d.ts +3 -4
- package/lib/service/high5/internal/index.js +5 -3
- package/lib/service/high5/internal/space/index.d.ts +2 -2
- package/lib/service/high5/internal/space/index.js +19 -15
- package/lib/service/high5/joinToken/index.d.ts +4 -4
- package/lib/service/high5/joinToken/index.js +36 -28
- package/lib/service/high5/space/event/index.d.ts +9 -10
- package/lib/service/high5/space/event/index.js +58 -46
- package/lib/service/high5/space/event/stream/design/index.d.ts +23 -8
- package/lib/service/high5/space/event/stream/design/index.js +60 -25
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +5 -5
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +65 -58
- package/lib/service/high5/space/event/stream/index.d.ts +14 -15
- package/lib/service/high5/space/event/stream/index.js +125 -103
- package/lib/service/high5/space/execution/index.d.ts +9 -9
- package/lib/service/high5/space/execution/index.js +57 -42
- package/lib/service/high5/space/execution/log/index.d.ts +4 -6
- package/lib/service/high5/space/execution/log/index.js +22 -21
- package/lib/service/high5/space/execution/status/index.d.ts +1 -1
- package/lib/service/high5/space/execution/status/index.js +10 -8
- package/lib/service/high5/space/index.d.ts +25 -21
- package/lib/service/high5/space/index.js +131 -86
- package/lib/service/high5/space/secret/index.d.ts +6 -6
- package/lib/service/high5/space/secret/index.js +59 -49
- package/lib/service/high5/space/wave/index.d.ts +7 -9
- package/lib/service/high5/space/wave/index.js +40 -33
- package/lib/service/high5/space/webhook/index.d.ts +21 -14
- package/lib/service/high5/space/webhook/index.js +106 -73
- package/lib/service/high5/space/webhook/log/index.d.ts +2 -4
- package/lib/service/high5/space/webhook/log/index.js +11 -12
- package/lib/service/high5/wave/s3/index.d.ts +6 -6
- package/lib/service/high5/wave/s3/index.js +50 -38
- package/lib/service/idp/index.d.ts +17 -15
- package/lib/service/idp/index.js +104 -56
- package/lib/service/idp/internal/index.d.ts +2 -4
- package/lib/service/idp/internal/index.js +10 -11
- package/lib/service/idp/oauth/index.d.ts +16 -12
- package/lib/service/idp/oauth/index.js +55 -43
- package/lib/service/idp/organization/index.d.ts +12 -10
- package/lib/service/idp/organization/index.js +63 -28
- package/lib/service/idp/organization/license/index.d.ts +2 -2
- package/lib/service/idp/organization/license/index.js +5 -4
- package/lib/service/idp/organization/member/index.d.ts +10 -11
- package/lib/service/idp/organization/member/index.js +62 -48
- package/lib/service/idp/organization/member/invitations/index.d.ts +3 -3
- package/lib/service/idp/organization/member/invitations/index.js +47 -43
- package/lib/service/idp/organization/settings/domain/index.d.ts +7 -8
- package/lib/service/idp/organization/settings/domain/index.js +42 -29
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +5 -5
- package/lib/service/idp/organization/settings/domain/saml/index.js +58 -48
- package/lib/service/idp/organization/settings/index.d.ts +5 -5
- package/lib/service/idp/organization/settings/index.js +17 -4
- package/lib/service/idp/organization/settings/oauth/index.d.ts +9 -11
- package/lib/service/idp/organization/settings/oauth/index.js +67 -56
- package/lib/service/idp/organization/team/index.d.ts +8 -8
- package/lib/service/idp/organization/team/index.js +64 -55
- package/lib/service/idp/registration/index.d.ts +4 -6
- package/lib/service/idp/registration/index.js +37 -34
- package/lib/service/idp/user/index.d.ts +16 -15
- package/lib/service/idp/user/index.js +86 -51
- package/lib/service/idp/user/license/index.d.ts +2 -2
- package/lib/service/idp/user/license/index.js +5 -4
- package/lib/service/idp/user/password/index.d.ts +1 -1
- package/lib/service/idp/user/password/index.js +10 -11
- package/lib/service/idp/user/settings/connections/index.d.ts +2 -4
- package/lib/service/idp/user/settings/connections/index.js +9 -10
- package/lib/service/idp/user/settings/general/index.d.ts +10 -6
- package/lib/service/idp/user/settings/general/index.js +25 -13
- package/lib/service/idp/user/settings/index.d.ts +13 -9
- package/lib/service/idp/user/settings/index.js +53 -8
- package/lib/service/idp/user/settings/notifications/index.d.ts +3 -5
- package/lib/service/idp/user/settings/notifications/index.js +14 -13
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +3 -5
- package/lib/service/idp/user/settings/oauthApps/index.js +17 -16
- package/lib/service/idp/user/settings/pats/index.d.ts +8 -10
- package/lib/service/idp/user/settings/pats/index.js +55 -44
- package/lib/service/idp/user/settings/twoFactor/index.d.ts +3 -4
- package/lib/service/idp/user/settings/twoFactor/index.js +8 -3
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +6 -8
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +36 -29
- package/lib/service/mailer/index.d.ts +4 -5
- package/lib/service/mailer/index.js +12 -8
- package/lib/service/mailer/internal/index.d.ts +4 -4
- package/lib/service/mailer/internal/index.js +38 -33
- package/lib/service/mothership/index.d.ts +12 -12
- package/lib/service/mothership/index.js +92 -79
- package/lib/service/nats/index.d.ts +1 -3
- package/lib/service/nats/index.js +2 -2
- package/lib/utils/bouncer/features/Provider.d.ts +3 -0
- package/lib/utils/bouncer/features/Provider.js +20 -2
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ export declare class AuditorInternal extends Base {
|
|
|
13
13
|
* Timestamps might differ as much as: this.options.auditor.queue.executionInterval || 500
|
|
14
14
|
* @param logs array (add multiple logs entries at once)
|
|
15
15
|
*/
|
|
16
|
-
queueAuditLogs
|
|
16
|
+
queueAuditLogs(logs: AuditLogCreate[]): Promise<void>;
|
|
17
17
|
private startQueue;
|
|
18
18
|
/**
|
|
19
19
|
* Deletes all audit logs of an organization
|
|
@@ -22,6 +22,6 @@ export declare class AuditorInternal extends Base {
|
|
|
22
22
|
* @param orgId the organizations's ID
|
|
23
23
|
* @returns void
|
|
24
24
|
*/
|
|
25
|
-
deleteAllAuditLogsOfOrganization
|
|
25
|
+
deleteAllAuditLogsOfOrganization(orgId: string): Promise<void>;
|
|
26
26
|
protected getEndpoint(endpoint: string): string;
|
|
27
27
|
}
|
|
@@ -17,31 +17,23 @@ class AuditorInternal extends Base_1.default {
|
|
|
17
17
|
super(...arguments);
|
|
18
18
|
this.queueExecutionInterval = ((_b = (_a = this.options.auditor) === null || _a === void 0 ? void 0 : _a.queue) === null || _b === void 0 ? void 0 : _b.executionInterval) || 500;
|
|
19
19
|
this.logQueue = [];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Adds log entries to a queue that will be processed periodically.
|
|
23
|
+
*
|
|
24
|
+
* No exceptions are thrown in case of an error as this function runs periodically asynchronous.
|
|
25
|
+
*
|
|
26
|
+
* This also comes with the downside of log timesstamps being inaccurate as they are created by the Auditor Server.
|
|
27
|
+
* Timestamps might differ as much as: this.options.auditor.queue.executionInterval || 500
|
|
28
|
+
* @param logs array (add multiple logs entries at once)
|
|
29
|
+
*/
|
|
30
|
+
queueAuditLogs(logs) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
32
|
if (!this.logQueueTimer) {
|
|
31
33
|
this.startQueue();
|
|
32
34
|
}
|
|
33
35
|
this.logQueue = this.logQueue.concat(logs);
|
|
34
36
|
});
|
|
35
|
-
/**
|
|
36
|
-
* Deletes all audit logs of an organization
|
|
37
|
-
*
|
|
38
|
-
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
39
|
-
* @param orgId the organizations's ID
|
|
40
|
-
* @returns void
|
|
41
|
-
*/
|
|
42
|
-
this.deleteAllAuditLogsOfOrganization = (orgId) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgId}/logs`));
|
|
44
|
-
});
|
|
45
37
|
}
|
|
46
38
|
startQueue() {
|
|
47
39
|
if (!this.logQueueTimer) {
|
|
@@ -54,6 +46,18 @@ class AuditorInternal extends Base_1.default {
|
|
|
54
46
|
}, this.queueExecutionInterval);
|
|
55
47
|
}
|
|
56
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Deletes all audit logs of an organization
|
|
51
|
+
*
|
|
52
|
+
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
53
|
+
* @param orgId the organizations's ID
|
|
54
|
+
* @returns void
|
|
55
|
+
*/
|
|
56
|
+
deleteAllAuditLogsOfOrganization(orgId) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgId}/logs`));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
57
61
|
getEndpoint(endpoint) {
|
|
58
62
|
return `${this.options.server}/api/auditor/internal${endpoint}`;
|
|
59
63
|
}
|
|
@@ -3,6 +3,6 @@ import Base, { Options } from "../../../Base";
|
|
|
3
3
|
import { HcloudFeature } from "../../../interfaces/bouncer";
|
|
4
4
|
export default class BouncerFeatures extends Base {
|
|
5
5
|
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
-
getHcloudFeatures
|
|
6
|
+
getHcloudFeatures(): Promise<HcloudFeature[]>;
|
|
7
7
|
protected getEndpoint(endpoint: string): string;
|
|
8
8
|
}
|
|
@@ -13,13 +13,15 @@ const Base_1 = require("../../../Base");
|
|
|
13
13
|
class BouncerFeatures extends Base_1.default {
|
|
14
14
|
constructor(options, axios) {
|
|
15
15
|
super(options, axios);
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
}
|
|
17
|
+
getHcloudFeatures() {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const resp = yield this.axios.get(this.getEndpoint("/default.json"), {});
|
|
18
20
|
return resp.data;
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
getEndpoint(endpoint) {
|
|
22
|
-
return
|
|
24
|
+
return `https://config.s3.helmut.cloud/featureflags${endpoint}`;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
exports.default = BouncerFeatures;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../Base";
|
|
3
|
-
import { Version } from "../../interfaces/global";
|
|
1
|
+
import Base from "../../Base";
|
|
4
2
|
import BouncerFeatures from "./features";
|
|
5
3
|
export default class Bouncer extends Base {
|
|
6
|
-
features: BouncerFeatures;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Requests the endpoint version
|
|
10
|
-
* @returns Version object
|
|
11
|
-
*/
|
|
12
|
-
version: () => Promise<Version>;
|
|
4
|
+
get features(): BouncerFeatures;
|
|
5
|
+
private _features?;
|
|
13
6
|
protected getEndpoint(endpoint: string): string;
|
|
14
7
|
}
|
|
@@ -1,31 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const Base_1 = require("../../Base");
|
|
13
4
|
const features_1 = require("./features");
|
|
14
5
|
class Bouncer extends Base_1.default {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*/
|
|
21
|
-
this.version = () => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
|
|
23
|
-
return resp.data;
|
|
24
|
-
});
|
|
25
|
-
this.features = new features_1.default(options, axios);
|
|
6
|
+
get features() {
|
|
7
|
+
if (this._features === undefined) {
|
|
8
|
+
this._features = new features_1.default(this.options, this.axios);
|
|
9
|
+
}
|
|
10
|
+
return this._features;
|
|
26
11
|
}
|
|
27
12
|
getEndpoint(endpoint) {
|
|
28
|
-
return
|
|
13
|
+
return `https://config.s3.helmut.cloud/featureflags${endpoint}`;
|
|
29
14
|
}
|
|
30
15
|
}
|
|
31
16
|
exports.default = Bouncer;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../Base";
|
|
1
|
+
import Base from "../../Base";
|
|
3
2
|
import { DaliFuse } from "./avatar/DaliFuseSpace";
|
|
4
3
|
import { DaliHigh5 } from "./avatar/DaliHigh5Space";
|
|
5
4
|
import { DaliOAuthApp } from "./avatar/DaliOAuthApp";
|
|
@@ -10,27 +9,32 @@ export declare class DaliAvatar extends Base {
|
|
|
10
9
|
/**
|
|
11
10
|
* Handles everything around user avatars
|
|
12
11
|
*/
|
|
13
|
-
user: DaliUser;
|
|
12
|
+
get user(): DaliUser;
|
|
13
|
+
private _user?;
|
|
14
14
|
/**
|
|
15
15
|
* Handles everything around team avatars
|
|
16
16
|
*/
|
|
17
|
-
team: DaliTeam;
|
|
17
|
+
get team(): DaliTeam;
|
|
18
|
+
private _team?;
|
|
18
19
|
/**
|
|
19
20
|
* Handles everything around organization avatars
|
|
20
21
|
*/
|
|
21
|
-
organization: DaliOrganization;
|
|
22
|
+
get organization(): DaliOrganization;
|
|
23
|
+
private _organization?;
|
|
22
24
|
/**
|
|
23
25
|
* Handles everything around high5 spaces avatars
|
|
24
26
|
*/
|
|
25
|
-
high5Space: DaliHigh5;
|
|
27
|
+
get high5Space(): DaliHigh5;
|
|
28
|
+
private _high5Space?;
|
|
26
29
|
/**
|
|
27
30
|
* Handles everything around fuse spaces avatars
|
|
28
31
|
*/
|
|
29
|
-
fuseSpace: DaliFuse;
|
|
32
|
+
get fuseSpace(): DaliFuse;
|
|
33
|
+
private _fuseSpace?;
|
|
30
34
|
/**
|
|
31
35
|
* Handles everything around OAuth applications avatars
|
|
32
36
|
*/
|
|
33
|
-
oauth: DaliOAuthApp;
|
|
34
|
-
|
|
37
|
+
get oauth(): DaliOAuthApp;
|
|
38
|
+
private _oauth?;
|
|
35
39
|
protected getEndpoint(endpoint: string): string;
|
|
36
40
|
}
|
|
@@ -9,14 +9,59 @@ const DaliOrganization_1 = require("./avatar/DaliOrganization");
|
|
|
9
9
|
const DaliTeam_1 = require("./avatar/DaliTeam");
|
|
10
10
|
const DaliUser_1 = require("./avatar/DaliUser");
|
|
11
11
|
class DaliAvatar extends Base_1.default {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Handles everything around user avatars
|
|
14
|
+
*/
|
|
15
|
+
get user() {
|
|
16
|
+
if (this._user === undefined) {
|
|
17
|
+
this._user = new DaliUser_1.DaliUser(this.options, this.axios);
|
|
18
|
+
}
|
|
19
|
+
return this._user;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Handles everything around team avatars
|
|
23
|
+
*/
|
|
24
|
+
get team() {
|
|
25
|
+
if (this._team === undefined) {
|
|
26
|
+
this._team = new DaliTeam_1.DaliTeam(this.options, this.axios);
|
|
27
|
+
}
|
|
28
|
+
return this._team;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Handles everything around organization avatars
|
|
32
|
+
*/
|
|
33
|
+
get organization() {
|
|
34
|
+
if (this._organization === undefined) {
|
|
35
|
+
this._organization = new DaliOrganization_1.DaliOrganization(this.options, this.axios);
|
|
36
|
+
}
|
|
37
|
+
return this._organization;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Handles everything around high5 spaces avatars
|
|
41
|
+
*/
|
|
42
|
+
get high5Space() {
|
|
43
|
+
if (this._high5Space === undefined) {
|
|
44
|
+
this._high5Space = new DaliHigh5Space_1.DaliHigh5(this.options, this.axios);
|
|
45
|
+
}
|
|
46
|
+
return this._high5Space;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Handles everything around fuse spaces avatars
|
|
50
|
+
*/
|
|
51
|
+
get fuseSpace() {
|
|
52
|
+
if (this._fuseSpace === undefined) {
|
|
53
|
+
this._fuseSpace = new DaliFuseSpace_1.DaliFuse(this.options, this.axios);
|
|
54
|
+
}
|
|
55
|
+
return this._fuseSpace;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Handles everything around OAuth applications avatars
|
|
59
|
+
*/
|
|
60
|
+
get oauth() {
|
|
61
|
+
if (this._oauth === undefined) {
|
|
62
|
+
this._oauth = new DaliOAuthApp_1.DaliOAuthApp(this.options, this.axios);
|
|
63
|
+
}
|
|
64
|
+
return this._oauth;
|
|
20
65
|
}
|
|
21
66
|
getEndpoint(endpoint) {
|
|
22
67
|
return `${this.options.server}/api/dali${endpoint}`;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
1
|
+
import Base from "../../../Base";
|
|
3
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
3
|
export declare class DaliFuse extends Base {
|
|
5
|
-
constructor(options: Options, axios: AxiosInstance);
|
|
6
4
|
/**
|
|
7
5
|
* Creates a default avatar for the specified Fuse space.
|
|
8
6
|
* @param orgName Name of the organization
|
|
9
7
|
* @param spaceName Name of the space
|
|
10
8
|
* @returns Public URL of the created avatar
|
|
11
9
|
*/
|
|
12
|
-
createAvatar
|
|
10
|
+
createAvatar(orgName: string, spaceName: string): Promise<AvatarCreated>;
|
|
13
11
|
/**
|
|
14
12
|
* Deletes the avatar of the Fuse space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
13
|
* @param orgName Name of the organization
|
|
16
14
|
* @param spaceName Name of the space
|
|
17
15
|
*/
|
|
18
|
-
deleteAvatar
|
|
16
|
+
deleteAvatar(orgName: string, spaceName: string): Promise<void>;
|
|
19
17
|
/**
|
|
20
18
|
* Updates the avatar of the specified Fuse space
|
|
21
19
|
* @param orgName Name of the organization
|
|
@@ -23,6 +21,6 @@ export declare class DaliFuse extends Base {
|
|
|
23
21
|
* @param file Image as Javascript File
|
|
24
22
|
* @returns Public URL of the new avatar
|
|
25
23
|
*/
|
|
26
|
-
updateAvatar
|
|
24
|
+
updateAvatar(orgName: string, spaceName: string, file: File): Promise<AvatarCreated>;
|
|
27
25
|
protected getEndpoint(endpoint: string): string;
|
|
28
26
|
}
|
|
@@ -12,34 +12,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.DaliFuse = void 0;
|
|
13
13
|
const Base_1 = require("../../../Base");
|
|
14
14
|
class DaliFuse extends Base_1.default {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.createAvatar = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
/**
|
|
16
|
+
* Creates a default avatar for the specified Fuse space.
|
|
17
|
+
* @param orgName Name of the organization
|
|
18
|
+
* @param spaceName Name of the space
|
|
19
|
+
* @returns Public URL of the created avatar
|
|
20
|
+
*/
|
|
21
|
+
createAvatar(orgName, spaceName) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
23
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`), {});
|
|
25
24
|
return resp.data;
|
|
26
25
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the Fuse space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param spaceName Name of the space
|
|
31
|
+
*/
|
|
32
|
+
deleteAvatar(orgName, spaceName) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
34
|
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`));
|
|
34
35
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Updates the avatar of the specified Fuse space
|
|
39
|
+
* @param orgName Name of the organization
|
|
40
|
+
* @param spaceName Name of the space
|
|
41
|
+
* @param file Image as Javascript File
|
|
42
|
+
* @returns Public URL of the new avatar
|
|
43
|
+
*/
|
|
44
|
+
updateAvatar(orgName, spaceName, file) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
46
|
const data = new FormData();
|
|
44
47
|
data.append("avatar", file);
|
|
45
48
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`), data, {
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
1
|
+
import Base from "../../../Base";
|
|
3
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
3
|
export declare class DaliHigh5 extends Base {
|
|
5
|
-
constructor(options: Options, axios: AxiosInstance);
|
|
6
4
|
/**
|
|
7
5
|
* Creates a default avatar for the specified High5 space.
|
|
8
6
|
* @param orgName Name of the organization
|
|
9
7
|
* @param spaceName Name of the space
|
|
10
8
|
* @returns Public URL of the created avatar
|
|
11
9
|
*/
|
|
12
|
-
createAvatar
|
|
10
|
+
createAvatar(orgName: string, spaceName: string): Promise<AvatarCreated>;
|
|
13
11
|
/**
|
|
14
12
|
* Deletes the avatar of the High5 space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
13
|
* @param orgName Name of the organization
|
|
16
14
|
* @param spaceName Name of the space
|
|
17
15
|
*/
|
|
18
|
-
deleteAvatar
|
|
16
|
+
deleteAvatar(orgName: string, spaceName: string): Promise<void>;
|
|
19
17
|
/**
|
|
20
18
|
* Updates the avatar of the specified High5 space
|
|
21
19
|
* @param orgName Name of the organization
|
|
@@ -23,6 +21,6 @@ export declare class DaliHigh5 extends Base {
|
|
|
23
21
|
* @param file Image as Javascript File
|
|
24
22
|
* @returns Public URL of the new avatar
|
|
25
23
|
*/
|
|
26
|
-
updateAvatar
|
|
24
|
+
updateAvatar(orgName: string, spaceName: string, file: File): Promise<AvatarCreated>;
|
|
27
25
|
protected getEndpoint(endpoint: string): string;
|
|
28
26
|
}
|
|
@@ -12,34 +12,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.DaliHigh5 = void 0;
|
|
13
13
|
const Base_1 = require("../../../Base");
|
|
14
14
|
class DaliHigh5 extends Base_1.default {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.createAvatar = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
/**
|
|
16
|
+
* Creates a default avatar for the specified High5 space.
|
|
17
|
+
* @param orgName Name of the organization
|
|
18
|
+
* @param spaceName Name of the space
|
|
19
|
+
* @returns Public URL of the created avatar
|
|
20
|
+
*/
|
|
21
|
+
createAvatar(orgName, spaceName) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
23
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}`), {});
|
|
25
24
|
return resp.data;
|
|
26
25
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the High5 space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param spaceName Name of the space
|
|
31
|
+
*/
|
|
32
|
+
deleteAvatar(orgName, spaceName) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
34
|
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}`));
|
|
34
35
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Updates the avatar of the specified High5 space
|
|
39
|
+
* @param orgName Name of the organization
|
|
40
|
+
* @param spaceName Name of the space
|
|
41
|
+
* @param file Image as Javascript File
|
|
42
|
+
* @returns Public URL of the new avatar
|
|
43
|
+
*/
|
|
44
|
+
updateAvatar(orgName, spaceName, file) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
46
|
const data = new FormData();
|
|
44
47
|
data.append("avatar", file);
|
|
45
48
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}`), data, {
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
1
|
+
import Base from "../../../Base";
|
|
3
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
3
|
export declare class DaliOAuthApp extends Base {
|
|
5
|
-
constructor(options: Options, axios: AxiosInstance);
|
|
6
4
|
/**
|
|
7
5
|
* Creates a default avatar for the specified OAuth app.
|
|
8
6
|
* @param orgName Name of the organization
|
|
9
7
|
* @param appId ID of the OAuth app
|
|
10
8
|
* @returns Public URL of the created avatar
|
|
11
9
|
*/
|
|
12
|
-
createAvatar
|
|
10
|
+
createAvatar(orgName: string, appId: string): Promise<AvatarCreated>;
|
|
13
11
|
/**
|
|
14
12
|
* Deletes the avatar of the OAuth app from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
13
|
* @param orgName Name of the organization
|
|
16
14
|
* @param appId ID of the OAuth app
|
|
17
15
|
*/
|
|
18
|
-
deleteAvatar
|
|
16
|
+
deleteAvatar(orgName: string, appId: string): Promise<void>;
|
|
19
17
|
/**
|
|
20
18
|
* Updates the avatar of the specified OAuth app.
|
|
21
19
|
* @param orgName Name of the organization
|
|
@@ -23,6 +21,6 @@ export declare class DaliOAuthApp extends Base {
|
|
|
23
21
|
* @param file Image as Javascript File
|
|
24
22
|
* @returns Public URL of the new avatar
|
|
25
23
|
*/
|
|
26
|
-
updateAvatar
|
|
24
|
+
updateAvatar(orgName: string, appId: string, file: File): Promise<AvatarCreated>;
|
|
27
25
|
protected getEndpoint(endpoint: string): string;
|
|
28
26
|
}
|
|
@@ -12,34 +12,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.DaliOAuthApp = void 0;
|
|
13
13
|
const Base_1 = require("../../../Base");
|
|
14
14
|
class DaliOAuthApp extends Base_1.default {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.createAvatar = (orgName, appId) => __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
/**
|
|
16
|
+
* Creates a default avatar for the specified OAuth app.
|
|
17
|
+
* @param orgName Name of the organization
|
|
18
|
+
* @param appId ID of the OAuth app
|
|
19
|
+
* @returns Public URL of the created avatar
|
|
20
|
+
*/
|
|
21
|
+
createAvatar(orgName, appId) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
23
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/applications/oauth/${appId}`), {});
|
|
25
24
|
return resp.data;
|
|
26
25
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the OAuth app from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param appId ID of the OAuth app
|
|
31
|
+
*/
|
|
32
|
+
deleteAvatar(orgName, appId) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
34
|
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/applications/oauth/${appId}`));
|
|
34
35
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Updates the avatar of the specified OAuth app.
|
|
39
|
+
* @param orgName Name of the organization
|
|
40
|
+
* @param appId ID of the OAuth app
|
|
41
|
+
* @param file Image as Javascript File
|
|
42
|
+
* @returns Public URL of the new avatar
|
|
43
|
+
*/
|
|
44
|
+
updateAvatar(orgName, appId, file) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
46
|
const data = new FormData();
|
|
44
47
|
data.append("avatar", file);
|
|
45
48
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/applications/oauth/${appId}`), data, {
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
1
|
+
import Base from "../../../Base";
|
|
3
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
3
|
export declare class DaliOrganization extends Base {
|
|
5
|
-
constructor(options: Options, axios: AxiosInstance);
|
|
6
4
|
/**
|
|
7
5
|
* Creates a default avatar for the specified organization.
|
|
8
6
|
* @param orgName Name of the organization
|
|
9
7
|
* @returns Public URL of the created avatar
|
|
10
8
|
*/
|
|
11
|
-
createAvatar
|
|
9
|
+
createAvatar(orgName: string): Promise<AvatarCreated>;
|
|
12
10
|
/**
|
|
13
11
|
* Deletes the avatar of the organization from cloud storage. If you want to update it, use updateAvatar() instead.
|
|
14
12
|
* @param orgName Name of the organization
|
|
15
13
|
*/
|
|
16
|
-
deleteAvatar
|
|
14
|
+
deleteAvatar(orgName: string): Promise<void>;
|
|
17
15
|
/**
|
|
18
16
|
* Updates the avatar of the specified organization.
|
|
19
17
|
* @param orgName Name of the organization
|
|
20
18
|
* @param file Image as Javascript File
|
|
21
19
|
* @returns Public URL of the new avatar
|
|
22
20
|
*/
|
|
23
|
-
updateAvatar
|
|
21
|
+
updateAvatar(orgName: string, file: File): Promise<AvatarCreated>;
|
|
24
22
|
protected getEndpoint(endpoint: string): string;
|
|
25
23
|
}
|