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
|
@@ -15,44 +15,52 @@ const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelp
|
|
|
15
15
|
class High5JoinToken extends Base_1.default {
|
|
16
16
|
constructor(options, axios) {
|
|
17
17
|
super(options, axios);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves join tokens of the specified organization (paginated request)
|
|
21
|
+
* @param orgName Name of the Organization
|
|
22
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
23
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
24
|
+
* @returns Object containing an array of join tokens and the total number of results found in the database (independent of limit and page)
|
|
25
|
+
*/
|
|
26
|
+
get(orgName, limit, page) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
28
|
limit = limit || 25;
|
|
27
29
|
page = page || 0;
|
|
28
30
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/join/token?page=${page}&limit=${limit}`));
|
|
29
31
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
30
32
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates a join token for the specified organization
|
|
36
|
+
* @param orgName Name of the Organization
|
|
37
|
+
* @param name Name of the Join Token
|
|
38
|
+
* @returns Created join token
|
|
39
|
+
*/
|
|
40
|
+
create(orgName, name) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
42
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/join/token`), { name });
|
|
39
43
|
return resp.data;
|
|
40
44
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Revokes a join token of the specified organization
|
|
48
|
+
* @param orgName Name of the Organization
|
|
49
|
+
* @param tokenId ID of the Join Token
|
|
50
|
+
*/
|
|
51
|
+
revoke(orgName, tokenId) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
53
|
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/join/token/${tokenId}`));
|
|
48
54
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Exchanges a join token for an agent user
|
|
58
|
+
*
|
|
59
|
+
* @param joinToken Join token
|
|
60
|
+
* @returns An object containing the User object and the PAT that represents the agent user
|
|
61
|
+
*/
|
|
62
|
+
exchange(joinToken) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
64
|
const res = yield this.axios.post(this.getEndpoint(`/v1/join/token`), {}, { headers: { Authorization: joinToken } });
|
|
57
65
|
return { user: res.data, pat: res.headers.authorization };
|
|
58
66
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../../Base";
|
|
1
|
+
import Base from "../../../../Base";
|
|
3
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
4
3
|
import { Event } from "../../../../interfaces/high5/space/event";
|
|
5
4
|
import { High5Stream } from "./stream";
|
|
6
5
|
export declare class High5Event extends Base {
|
|
7
|
-
stream: High5Stream;
|
|
8
|
-
|
|
6
|
+
get stream(): High5Stream;
|
|
7
|
+
private _stream?;
|
|
9
8
|
/**
|
|
10
9
|
* Retrieves all Events of a High5 Space which match the provided search filter(s). Will return all Events of the Space if no filter is provided.
|
|
11
10
|
* @param orgName Name of the Organization
|
|
@@ -16,10 +15,10 @@ export declare class High5Event extends Base {
|
|
|
16
15
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
17
16
|
* @returns Object containing an array of Events and the total number of results found in the database (independent of limit and page)
|
|
18
17
|
*/
|
|
19
|
-
searchEvents
|
|
18
|
+
searchEvents({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
|
|
20
19
|
orgName: string;
|
|
21
20
|
spaceName: string;
|
|
22
|
-
})
|
|
21
|
+
}): Promise<PaginatedResponse<Event>>;
|
|
23
22
|
/**
|
|
24
23
|
* Retrieves an Event by its name.
|
|
25
24
|
* @param orgName Name of the Organization
|
|
@@ -27,7 +26,7 @@ export declare class High5Event extends Base {
|
|
|
27
26
|
* @param eventName Name of the Event
|
|
28
27
|
* @returns The requested Event
|
|
29
28
|
*/
|
|
30
|
-
getEvent
|
|
29
|
+
getEvent(orgName: string, spaceName: string, eventName: string): Promise<Event>;
|
|
31
30
|
/**
|
|
32
31
|
* Creates a new Event in the provided Space.
|
|
33
32
|
* @param orgName Name of the Organization
|
|
@@ -35,7 +34,7 @@ export declare class High5Event extends Base {
|
|
|
35
34
|
* @param name Name of the new Event
|
|
36
35
|
* @returns The created Event
|
|
37
36
|
*/
|
|
38
|
-
createEvent
|
|
37
|
+
createEvent(orgName: string, spaceName: string, name: string): Promise<Event>;
|
|
39
38
|
/**
|
|
40
39
|
* Rename an event
|
|
41
40
|
* @param orgName Name of the Organization
|
|
@@ -44,13 +43,13 @@ export declare class High5Event extends Base {
|
|
|
44
43
|
* @param name New name of the Event
|
|
45
44
|
* @returns Updated Event
|
|
46
45
|
*/
|
|
47
|
-
renameEvent
|
|
46
|
+
renameEvent(orgName: string, spaceName: string, eventName: string, name: string): Promise<Event>;
|
|
48
47
|
/**
|
|
49
48
|
* Deletes an Event by its name.
|
|
50
49
|
* @param orgName Name of the Organization
|
|
51
50
|
* @param spaceName Name of the Space
|
|
52
51
|
* @param eventName Name of the Event
|
|
53
52
|
*/
|
|
54
|
-
deleteEvent
|
|
53
|
+
deleteEvent(orgName: string, spaceName: string, eventName: string): Promise<void>;
|
|
55
54
|
protected getEndpoint(endpoint: string): string;
|
|
56
55
|
}
|
|
@@ -15,19 +15,24 @@ const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseH
|
|
|
15
15
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
16
|
const stream_1 = require("./stream");
|
|
17
17
|
class High5Event extends Base_1.default {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
get stream() {
|
|
19
|
+
if (this._stream === undefined) {
|
|
20
|
+
this._stream = new stream_1.High5Stream(this.options, this.axios);
|
|
21
|
+
}
|
|
22
|
+
return this._stream;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves all Events of a High5 Space which match the provided search filter(s). Will return all Events of the Space if no filter is provided.
|
|
26
|
+
* @param orgName Name of the Organization
|
|
27
|
+
* @param spaceName Name of the Space
|
|
28
|
+
* @param filters (optional) Array of search filters
|
|
29
|
+
* @param sorting (optional) Sorting object
|
|
30
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
31
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
32
|
+
* @returns Object containing an array of Events and the total number of results found in the database (independent of limit and page)
|
|
33
|
+
*/
|
|
34
|
+
searchEvents(_a) {
|
|
35
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
|
|
31
36
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
32
37
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/search?page=${page}&limit=${limit}`), {
|
|
33
38
|
filters: filtersDTO,
|
|
@@ -35,52 +40,59 @@ class High5Event extends Base_1.default {
|
|
|
35
40
|
});
|
|
36
41
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
37
42
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Retrieves an Event by its name.
|
|
46
|
+
* @param orgName Name of the Organization
|
|
47
|
+
* @param spaceName Name of the Space
|
|
48
|
+
* @param eventName Name of the Event
|
|
49
|
+
* @returns The requested Event
|
|
50
|
+
*/
|
|
51
|
+
getEvent(orgName, spaceName, eventName) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
53
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
47
54
|
return resp.data;
|
|
48
55
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates a new Event in the provided Space.
|
|
59
|
+
* @param orgName Name of the Organization
|
|
60
|
+
* @param spaceName Name of the Space
|
|
61
|
+
* @param name Name of the new Event
|
|
62
|
+
* @returns The created Event
|
|
63
|
+
*/
|
|
64
|
+
createEvent(orgName, spaceName, name) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
66
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events`), { name: name });
|
|
58
67
|
return resp.data;
|
|
59
68
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Rename an event
|
|
72
|
+
* @param orgName Name of the Organization
|
|
73
|
+
* @param spaceName Name of the Space
|
|
74
|
+
* @param eventName Name of the Event
|
|
75
|
+
* @param name New name of the Event
|
|
76
|
+
* @returns Updated Event
|
|
77
|
+
*/
|
|
78
|
+
renameEvent(orgName, spaceName, eventName, name) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
80
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/name`), {
|
|
70
81
|
name: name,
|
|
71
82
|
});
|
|
72
83
|
return resp.data;
|
|
73
84
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Deletes an Event by its name.
|
|
88
|
+
* @param orgName Name of the Organization
|
|
89
|
+
* @param spaceName Name of the Space
|
|
90
|
+
* @param eventName Name of the Event
|
|
91
|
+
*/
|
|
92
|
+
deleteEvent(orgName, spaceName, eventName) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
94
|
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
82
95
|
});
|
|
83
|
-
this.stream = new stream_1.High5Stream(this.options, this.axios);
|
|
84
96
|
}
|
|
85
97
|
getEndpoint(endpoint) {
|
|
86
98
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../../../../Base";
|
|
1
|
+
import Base from "../../../../../../Base";
|
|
3
2
|
import { Design } from "../../../../../../interfaces/high5/space/event/stream/design";
|
|
4
3
|
import { DesignContent } from "../../../../../../interfaces/high5/space/event/stream/design/StreamDesign";
|
|
5
4
|
import DesignOperations from "./DesignOperations";
|
|
@@ -8,12 +7,13 @@ export declare class High5Design extends Base {
|
|
|
8
7
|
/**
|
|
9
8
|
* API to manage design snapshots
|
|
10
9
|
*/
|
|
11
|
-
snapshots: High5DesignSnapshots;
|
|
10
|
+
get snapshots(): High5DesignSnapshots;
|
|
11
|
+
private _snapshots?;
|
|
12
12
|
/**
|
|
13
13
|
* API to perform operations on the Stream Design
|
|
14
14
|
*/
|
|
15
|
-
operations: DesignOperations;
|
|
16
|
-
|
|
15
|
+
get operations(): DesignOperations;
|
|
16
|
+
private _operations?;
|
|
17
17
|
/**
|
|
18
18
|
* Retrieves a stream's design.
|
|
19
19
|
* @param orgName Name of the organization
|
|
@@ -22,17 +22,32 @@ export declare class High5Design extends Base {
|
|
|
22
22
|
* @param streamId ID of the stream
|
|
23
23
|
* @returns The requested design
|
|
24
24
|
*/
|
|
25
|
-
getDesign
|
|
25
|
+
getDesign(orgName: string, spaceName: string, eventName: string, streamId: string): Promise<Design>;
|
|
26
26
|
/**
|
|
27
27
|
* Creates/overwrites a new design for the specified stream.
|
|
28
|
+
*
|
|
29
|
+
* To publish the current design for execution use the {@link publishDesign} method
|
|
30
|
+
*
|
|
28
31
|
* @param orgName Name of the organization
|
|
29
32
|
* @param spaceName Name of the space
|
|
30
33
|
* @param eventName Name of the event
|
|
31
34
|
* @param streamId ID of the stream
|
|
32
35
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
33
|
-
* @param build Rendered design as Json payload (schema created by Stream Designer Studio; ready to be executed by wave engine)
|
|
34
36
|
* @returns The created design
|
|
35
37
|
*/
|
|
36
|
-
createDesign
|
|
38
|
+
createDesign(orgName: string, spaceName: string, eventName: string, streamId: string, name: string, content: DesignContent): Promise<Design>;
|
|
39
|
+
/**
|
|
40
|
+
* Publish the current design for a specified stream
|
|
41
|
+
*
|
|
42
|
+
* To set the current design use the {@link createDesign} method
|
|
43
|
+
*
|
|
44
|
+
* @param orgName Name of the organization
|
|
45
|
+
* @param spaceName Name of the space
|
|
46
|
+
* @param eventName Name of the event
|
|
47
|
+
* @param streamId ID of the stream
|
|
48
|
+
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
49
|
+
* @returns The created design
|
|
50
|
+
*/
|
|
51
|
+
publishDesign(orgName: string, spaceName: string, eventName: string, streamId: string): Promise<void>;
|
|
37
52
|
protected getEndpoint(endpoint: string): string;
|
|
38
53
|
}
|
|
@@ -14,40 +14,75 @@ const Base_1 = require("../../../../../../Base");
|
|
|
14
14
|
const DesignOperations_1 = require("./DesignOperations");
|
|
15
15
|
const snapshot_1 = require("./snapshot");
|
|
16
16
|
class High5Design extends Base_1.default {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
/**
|
|
18
|
+
* API to manage design snapshots
|
|
19
|
+
*/
|
|
20
|
+
get snapshots() {
|
|
21
|
+
if (this._snapshots === undefined) {
|
|
22
|
+
this._snapshots = new snapshot_1.default(this.options, this.axios);
|
|
23
|
+
}
|
|
24
|
+
return this._snapshots;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* API to perform operations on the Stream Design
|
|
28
|
+
*/
|
|
29
|
+
get operations() {
|
|
30
|
+
if (this._operations === undefined) {
|
|
31
|
+
this._operations = new DesignOperations_1.default(this.options, this.axios);
|
|
32
|
+
}
|
|
33
|
+
return this._operations;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves a stream's design.
|
|
37
|
+
* @param orgName Name of the organization
|
|
38
|
+
* @param spaceName Name of the space
|
|
39
|
+
* @param eventName Name of the event
|
|
40
|
+
* @param streamId ID of the stream
|
|
41
|
+
* @returns The requested design
|
|
42
|
+
*/
|
|
43
|
+
getDesign(orgName, spaceName, eventName, streamId) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
45
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design`));
|
|
29
46
|
return resp.data;
|
|
30
47
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates/overwrites a new design for the specified stream.
|
|
51
|
+
*
|
|
52
|
+
* To publish the current design for execution use the {@link publishDesign} method
|
|
53
|
+
*
|
|
54
|
+
* @param orgName Name of the organization
|
|
55
|
+
* @param spaceName Name of the space
|
|
56
|
+
* @param eventName Name of the event
|
|
57
|
+
* @param streamId ID of the stream
|
|
58
|
+
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
59
|
+
* @returns The created design
|
|
60
|
+
*/
|
|
61
|
+
createDesign(orgName, spaceName, eventName, streamId, name, content) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
63
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design`), {
|
|
43
64
|
name,
|
|
44
65
|
content,
|
|
45
|
-
build,
|
|
46
66
|
});
|
|
47
67
|
return resp.data;
|
|
48
68
|
});
|
|
49
|
-
|
|
50
|
-
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Publish the current design for a specified stream
|
|
72
|
+
*
|
|
73
|
+
* To set the current design use the {@link createDesign} method
|
|
74
|
+
*
|
|
75
|
+
* @param orgName Name of the organization
|
|
76
|
+
* @param spaceName Name of the space
|
|
77
|
+
* @param eventName Name of the event
|
|
78
|
+
* @param streamId ID of the stream
|
|
79
|
+
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
80
|
+
* @returns The created design
|
|
81
|
+
*/
|
|
82
|
+
publishDesign(orgName, spaceName, eventName, streamId) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/publish`));
|
|
85
|
+
});
|
|
51
86
|
}
|
|
52
87
|
getEndpoint(endpoint) {
|
|
53
88
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
@@ -15,7 +15,7 @@ export default class High5DesignSnapshots extends Base {
|
|
|
15
15
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
16
16
|
* @returns Object containing an array of snapshots of the stream design and the total number of results found in the database (independent of limit and page)
|
|
17
17
|
*/
|
|
18
|
-
search
|
|
18
|
+
search(orgName: string, spaceName: string, eventName: string, streamId: string, content: boolean | undefined, { filters, sorting, limit, page }: SearchParams): Promise<PaginatedResponse<DesignSnapshot>>;
|
|
19
19
|
/**
|
|
20
20
|
* Create a snapshot of stream's design.
|
|
21
21
|
* @param orgName Name of the organization
|
|
@@ -25,7 +25,7 @@ export default class High5DesignSnapshots extends Base {
|
|
|
25
25
|
* @param name Name of the snapshot
|
|
26
26
|
* @returns The snapshot
|
|
27
27
|
*/
|
|
28
|
-
create
|
|
28
|
+
create(orgName: string, spaceName: string, eventName: string, streamId: string, name: string): Promise<DesignSnapshot>;
|
|
29
29
|
/**
|
|
30
30
|
* Update a snapshot's name.
|
|
31
31
|
* @param orgName Name of the organization
|
|
@@ -36,7 +36,7 @@ export default class High5DesignSnapshots extends Base {
|
|
|
36
36
|
* @param name Name of the snapshot
|
|
37
37
|
* @returns The snapshot
|
|
38
38
|
*/
|
|
39
|
-
update
|
|
39
|
+
update(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string, name: string): Promise<DesignSnapshot>;
|
|
40
40
|
/**
|
|
41
41
|
* Delete a stream design's snapshot.
|
|
42
42
|
* @param orgName Name of the organization
|
|
@@ -45,7 +45,7 @@ export default class High5DesignSnapshots extends Base {
|
|
|
45
45
|
* @param streamId ID of the stream
|
|
46
46
|
* @param snapshotId ID of the snapshot
|
|
47
47
|
*/
|
|
48
|
-
delete
|
|
48
|
+
delete(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string): Promise<void>;
|
|
49
49
|
/**
|
|
50
50
|
* Restore a stream's design to a certain snapshot.
|
|
51
51
|
*
|
|
@@ -57,6 +57,6 @@ export default class High5DesignSnapshots extends Base {
|
|
|
57
57
|
* @param streamId ID of the stream
|
|
58
58
|
* @param snapshotId ID of the snapshot
|
|
59
59
|
*/
|
|
60
|
-
restore
|
|
60
|
+
restore(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string): Promise<void>;
|
|
61
61
|
protected getEndpoint(endpoint: string): string;
|
|
62
62
|
}
|
|
@@ -13,22 +13,21 @@ const Base_1 = require("../../../../../../../Base");
|
|
|
13
13
|
const paginatedResponseHelper_1 = require("../../../../../../../helper/paginatedResponseHelper");
|
|
14
14
|
const searchFilter_1 = require("../../../../../../../helper/searchFilter");
|
|
15
15
|
class High5DesignSnapshots extends Base_1.default {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this.search = (orgName_1, spaceName_1, eventName_1, streamId_1, ...args_1) => __awaiter(this, [orgName_1, spaceName_1, eventName_1, streamId_1, ...args_1], void 0, function* (orgName, spaceName, eventName, streamId, content = false, { filters, sorting, limit = 25, page = 0 }) {
|
|
16
|
+
/**
|
|
17
|
+
* Search the snapshots of stream's design.
|
|
18
|
+
* @param orgName Name of the organization
|
|
19
|
+
* @param spaceName Name of the space
|
|
20
|
+
* @param eventName Name of the event
|
|
21
|
+
* @param streamId ID of the stream
|
|
22
|
+
* @param content (optional) Is it necessary to retrieve content for each snapshot (disabled by default)
|
|
23
|
+
* @param filters Search filters to apply
|
|
24
|
+
* @param sorting Sorting criteria for the result
|
|
25
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
26
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
27
|
+
* @returns Object containing an array of snapshots of the stream design and the total number of results found in the database (independent of limit and page)
|
|
28
|
+
*/
|
|
29
|
+
search(orgName_1, spaceName_1, eventName_1, streamId_1) {
|
|
30
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, eventName, streamId, content = false, { filters, sorting, limit = 25, page = 0 }) {
|
|
32
31
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
33
32
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
34
33
|
});
|
|
@@ -40,56 +39,64 @@ class High5DesignSnapshots extends Base_1.default {
|
|
|
40
39
|
});
|
|
41
40
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
42
41
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Create a snapshot of stream's design.
|
|
45
|
+
* @param orgName Name of the organization
|
|
46
|
+
* @param spaceName Name of the space
|
|
47
|
+
* @param eventName Name of the event
|
|
48
|
+
* @param streamId ID of the stream
|
|
49
|
+
* @param name Name of the snapshot
|
|
50
|
+
* @returns The snapshot
|
|
51
|
+
*/
|
|
52
|
+
create(orgName, spaceName, eventName, streamId, name) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
54
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots`), { name });
|
|
54
55
|
return resp.data;
|
|
55
56
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Update a snapshot's name.
|
|
60
|
+
* @param orgName Name of the organization
|
|
61
|
+
* @param spaceName Name of the space
|
|
62
|
+
* @param eventName Name of the event
|
|
63
|
+
* @param streamId ID of the stream
|
|
64
|
+
* @param snapshotId ID of the snapshot
|
|
65
|
+
* @param name Name of the snapshot
|
|
66
|
+
* @returns The snapshot
|
|
67
|
+
*/
|
|
68
|
+
update(orgName, spaceName, eventName, streamId, snapshotId, name) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
70
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}`), { name });
|
|
68
71
|
return resp.data;
|
|
69
72
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Delete a stream design's snapshot.
|
|
76
|
+
* @param orgName Name of the organization
|
|
77
|
+
* @param spaceName Name of the space
|
|
78
|
+
* @param eventName Name of the event
|
|
79
|
+
* @param streamId ID of the stream
|
|
80
|
+
* @param snapshotId ID of the snapshot
|
|
81
|
+
*/
|
|
82
|
+
delete(orgName, spaceName, eventName, streamId, snapshotId) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
84
|
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}`));
|
|
80
85
|
});
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Restore a stream's design to a certain snapshot.
|
|
89
|
+
*
|
|
90
|
+
* **WARNING**: This is a destructive action. It will overwrite the current design for the stream.
|
|
91
|
+
*
|
|
92
|
+
* @param orgName Name of the organization
|
|
93
|
+
* @param spaceName Name of the space
|
|
94
|
+
* @param eventName Name of the event
|
|
95
|
+
* @param streamId ID of the stream
|
|
96
|
+
* @param snapshotId ID of the snapshot
|
|
97
|
+
*/
|
|
98
|
+
restore(orgName, spaceName, eventName, streamId, snapshotId) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
100
|
yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}/restore`));
|
|
94
101
|
});
|
|
95
102
|
}
|