hcloud-sdk 0.0.16 → 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/README.md +1 -0
- package/changelog.md +45 -0
- package/index.d.ts +3 -2
- package/index.js +5 -2
- package/lib/Base.d.ts +26 -0
- package/lib/Base.js +12 -0
- package/lib/Hcloud.d.ts +90 -0
- package/lib/Hcloud.js +184 -0
- package/lib/helper/ErrorHelper.d.ts +7 -0
- package/lib/helper/ErrorHelper.js +19 -0
- package/lib/helper/paginatedResponseHelper.d.ts +3 -0
- package/lib/helper/paginatedResponseHelper.js +9 -0
- package/lib/helper/searchFilter.d.ts +9 -0
- package/lib/helper/searchFilter.js +12 -0
- package/lib/interfaces/agent/bundle/dev/index.d.ts +3 -0
- package/lib/interfaces/agent/context/index.d.ts +19 -0
- package/lib/interfaces/agent/index.d.ts +21 -0
- package/lib/interfaces/agent/index.js +2 -0
- package/lib/interfaces/{Auditor.d.ts → auditor/index.d.ts} +31 -5
- package/lib/interfaces/{Auditor.js → auditor/index.js} +15 -5
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/axios/index.js +8 -0
- package/lib/interfaces/bouncer/features/index.d.ts +7 -0
- package/lib/interfaces/bouncer/features/index.js +2 -0
- package/lib/interfaces/bouncer/index.d.ts +6 -0
- package/lib/interfaces/bouncer/index.js +17 -0
- package/lib/interfaces/dali/index.d.ts +3 -0
- package/lib/interfaces/dali/index.js +2 -0
- package/lib/interfaces/frontend/config/index.d.ts +33 -0
- package/lib/interfaces/frontend/config/index.js +10 -0
- package/lib/interfaces/frontend/featureflags/index.d.ts +7 -0
- package/lib/interfaces/frontend/featureflags/index.js +2 -0
- package/lib/interfaces/fuse/index.d.ts +3 -0
- package/lib/interfaces/fuse/index.js +19 -0
- package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +38 -0
- package/lib/interfaces/fuse/space/cronjob/Cronjob.js +8 -0
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +16 -0
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.js +2 -0
- package/lib/interfaces/fuse/space/index.d.ts +21 -0
- package/lib/interfaces/fuse/space/index.js +11 -0
- package/lib/interfaces/global/HCloudError.d.ts +8 -0
- package/lib/interfaces/global/HCloudError.js +13 -0
- package/lib/interfaces/global/Header.d.ts +4 -0
- package/lib/interfaces/global/Header.js +2 -0
- package/lib/interfaces/global/HttpMethod.d.ts +7 -0
- package/lib/interfaces/global/HttpMethod.js +11 -0
- package/lib/interfaces/global/PaginatedResponse.d.ts +4 -0
- package/lib/interfaces/global/PaginatedResponse.js +2 -0
- package/lib/interfaces/global/Products.d.ts +11 -0
- package/lib/interfaces/global/Products.js +15 -0
- package/lib/interfaces/global/SearchFilters.d.ts +86 -0
- package/lib/interfaces/global/SearchFilters.js +49 -0
- package/lib/interfaces/global/Space.d.ts +20 -0
- package/lib/interfaces/global/Space.js +8 -0
- package/lib/interfaces/global/Version.d.ts +3 -0
- package/lib/interfaces/global/Version.js +2 -0
- package/lib/interfaces/global/Views.d.ts +8 -0
- package/lib/interfaces/global/Views.js +12 -0
- package/lib/interfaces/global/index.d.ts +9 -0
- package/lib/interfaces/global/index.js +25 -0
- package/lib/interfaces/high5/index.d.ts +16 -0
- package/lib/interfaces/high5/index.js +32 -0
- package/lib/interfaces/high5/joinToken/index.d.ts +10 -0
- package/lib/interfaces/high5/joinToken/index.js +2 -0
- package/lib/interfaces/high5/space/event/index.d.ts +15 -0
- package/lib/interfaces/high5/space/event/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/DesignOperation.d.ts +68 -0
- package/lib/interfaces/high5/space/event/stream/design/DesignOperation.js +20 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +92 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.js +20 -0
- package/lib/interfaces/high5/space/event/stream/design/index.d.ts +22 -0
- package/lib/interfaces/high5/space/event/stream/design/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/snapshot/index.d.ts +30 -0
- package/lib/interfaces/high5/space/event/stream/design/snapshot/index.js +8 -0
- package/lib/interfaces/high5/space/event/stream/index.d.ts +77 -0
- package/lib/interfaces/high5/space/event/stream/index.js +13 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +62 -0
- package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +148 -0
- package/lib/interfaces/high5/space/execution/index.js +21 -0
- package/lib/interfaces/high5/space/index.d.ts +23 -0
- package/lib/interfaces/high5/space/index.js +12 -0
- package/lib/interfaces/high5/space/secret/index.d.ts +12 -0
- package/lib/interfaces/high5/space/secret/index.js +2 -0
- package/lib/interfaces/high5/space/webhook/index.d.ts +75 -0
- package/lib/interfaces/high5/space/webhook/index.js +9 -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 +201 -0
- package/lib/interfaces/high5/wave/index.js +61 -0
- package/lib/interfaces/idp/index.d.ts +26 -0
- package/lib/interfaces/idp/index.js +38 -0
- package/lib/interfaces/idp/oauth/index.d.ts +19 -0
- package/lib/interfaces/idp/oauth/index.js +8 -0
- package/lib/interfaces/idp/organization/index.d.ts +32 -0
- package/lib/interfaces/idp/organization/index.js +25 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +84 -0
- package/lib/interfaces/idp/organization/license/index.js +15 -0
- package/lib/interfaces/idp/organization/member/index.d.ts +15 -0
- package/lib/interfaces/idp/organization/member/index.js +2 -0
- package/lib/interfaces/idp/organization/member/invitations/index.d.ts +26 -0
- package/lib/interfaces/idp/organization/member/invitations/index.js +18 -0
- package/lib/interfaces/idp/organization/settings/domain/index.d.ts +19 -0
- package/lib/interfaces/idp/organization/settings/domain/index.js +8 -0
- package/lib/interfaces/idp/organization/settings/domain/saml/index.d.ts +10 -0
- package/lib/interfaces/idp/organization/settings/domain/saml/index.js +2 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +37 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +24 -0
- package/lib/interfaces/idp/organization/team/index.js +9 -0
- package/lib/interfaces/idp/user/ConnectionSettings.d.ts +6 -0
- package/lib/interfaces/idp/user/ConnectionSettings.js +2 -0
- package/lib/interfaces/idp/user/GeneralSettings.d.ts +45 -0
- package/lib/interfaces/idp/user/GeneralSettings.js +38 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +8 -0
- package/lib/interfaces/idp/user/NotificationSettings.js +2 -0
- package/lib/interfaces/idp/user/Pat.d.ts +19 -0
- package/lib/interfaces/idp/user/Pat.js +2 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +40 -0
- package/lib/interfaces/idp/user/Scopes.js +50 -0
- package/lib/interfaces/idp/user/SuccessfulAuth.d.ts +5 -0
- package/lib/interfaces/idp/user/SuccessfulAuth.js +2 -0
- package/lib/interfaces/idp/user/Totp.d.ts +20 -0
- package/lib/interfaces/idp/user/Totp.js +2 -0
- package/lib/interfaces/idp/user/index.d.ts +23 -0
- package/lib/interfaces/idp/user/index.js +2 -0
- package/lib/interfaces/mailer/index.d.ts +66 -0
- package/lib/interfaces/mailer/index.js +81 -0
- package/lib/interfaces/mothership/index.d.ts +28 -0
- package/lib/interfaces/mothership/index.js +8 -0
- package/lib/interfaces/nats/index.d.ts +239 -0
- package/lib/interfaces/nats/index.js +316 -0
- package/lib/service/agent/bundle/dev/index.d.ts +17 -0
- package/lib/service/agent/bundle/dev/index.js +44 -0
- package/lib/service/agent/bundle/index.d.ts +11 -0
- package/lib/service/agent/bundle/index.js +55 -0
- package/lib/service/agent/context/index.d.ts +35 -0
- package/lib/service/agent/context/index.js +90 -0
- package/lib/service/agent/index.d.ts +16 -0
- package/lib/service/agent/index.js +37 -0
- package/lib/service/agent/installer/index.d.ts +15 -0
- package/lib/service/agent/installer/index.js +97 -0
- package/lib/service/auditor/index.d.ts +25 -0
- package/lib/service/auditor/index.js +55 -0
- package/lib/service/auditor/internal/index.d.ts +27 -0
- package/lib/service/auditor/internal/index.js +65 -0
- package/lib/service/bouncer/features/index.d.ts +8 -0
- package/lib/service/bouncer/features/index.js +27 -0
- package/lib/service/bouncer/index.d.ts +7 -0
- package/lib/service/bouncer/index.js +16 -0
- package/lib/service/dali/DaliAvatar.d.ts +40 -0
- package/lib/service/dali/DaliAvatar.js +70 -0
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +26 -0
- package/lib/service/dali/avatar/DaliFuseSpace.js +58 -0
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +26 -0
- package/lib/service/dali/avatar/DaliHigh5Space.js +58 -0
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +26 -0
- package/lib/service/dali/avatar/DaliOAuthApp.js +58 -0
- package/lib/service/dali/avatar/DaliOrganization.d.ts +23 -0
- package/lib/service/dali/avatar/DaliOrganization.js +55 -0
- package/lib/service/dali/avatar/DaliTeam.d.ts +26 -0
- package/lib/service/dali/avatar/DaliTeam.js +58 -0
- package/lib/service/dali/avatar/DaliUser.d.ts +20 -0
- package/lib/service/dali/avatar/DaliUser.js +52 -0
- package/lib/service/dali/index.d.ts +15 -0
- package/lib/service/dali/index.js +37 -0
- package/lib/service/fuse/index.d.ts +18 -0
- package/lib/service/fuse/index.js +48 -0
- package/lib/service/fuse/internal/index.d.ts +8 -0
- package/lib/service/fuse/internal/index.js +31 -0
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +7 -0
- package/lib/service/fuse/internal/space/cronjob/index.js +17 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +15 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.js +34 -0
- package/lib/service/fuse/internal/space/index.d.ts +22 -0
- package/lib/service/fuse/internal/space/index.js +49 -0
- package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
- package/lib/service/fuse/space/cronjob/index.js +203 -0
- package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
- package/lib/service/fuse/space/cronjob/log/index.js +58 -0
- package/lib/service/fuse/space/index.d.ts +81 -0
- package/lib/service/fuse/space/index.js +152 -0
- package/lib/service/high5/execution/index.d.ts +10 -0
- package/lib/service/high5/execution/index.js +24 -0
- package/lib/service/high5/execution/log/index.d.ts +19 -0
- package/lib/service/high5/execution/log/index.js +40 -0
- package/lib/service/high5/execution/status/index.d.ts +18 -0
- package/lib/service/high5/execution/status/index.js +40 -0
- package/lib/service/high5/index.d.ts +25 -0
- package/lib/service/high5/index.js +63 -0
- package/lib/service/high5/internal/index.d.ts +8 -0
- package/lib/service/high5/internal/index.js +31 -0
- package/lib/service/high5/internal/space/index.d.ts +21 -0
- package/lib/service/high5/internal/space/index.js +45 -0
- package/lib/service/high5/joinToken/index.d.ts +40 -0
- package/lib/service/high5/joinToken/index.js +72 -0
- package/lib/service/high5/space/event/index.d.ts +55 -0
- package/lib/service/high5/space/event/index.js +101 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +31 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +117 -0
- package/lib/service/high5/space/event/stream/design/index.d.ts +53 -0
- package/lib/service/high5/space/event/stream/design/index.js +91 -0
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +62 -0
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +107 -0
- package/lib/service/high5/space/event/stream/index.d.ts +113 -0
- package/lib/service/high5/space/event/stream/index.js +186 -0
- package/lib/service/high5/space/execution/index.d.ts +48 -0
- package/lib/service/high5/space/execution/index.js +89 -0
- package/lib/service/high5/space/execution/log/index.d.ts +29 -0
- package/lib/service/high5/space/execution/log/index.js +58 -0
- package/lib/service/high5/space/execution/status/index.d.ts +16 -0
- package/lib/service/high5/space/execution/status/index.js +36 -0
- package/lib/service/high5/space/index.d.ts +111 -0
- package/lib/service/high5/space/index.js +205 -0
- package/lib/service/high5/space/node/index.d.ts +58 -0
- package/lib/service/high5/space/node/index.js +116 -0
- package/lib/service/high5/space/secret/index.d.ts +60 -0
- package/lib/service/high5/space/secret/index.js +102 -0
- package/lib/service/high5/space/wave/index.d.ts +36 -0
- package/lib/service/high5/space/wave/index.js +73 -0
- package/lib/service/high5/space/webhook/index.d.ts +90 -0
- package/lib/service/high5/space/webhook/index.js +165 -0
- package/lib/service/high5/space/webhook/log/index.d.ts +16 -0
- package/lib/service/high5/space/webhook/log/index.js +37 -0
- package/lib/service/high5/wave/index.d.ts +8 -0
- package/lib/service/high5/wave/index.js +15 -0
- package/lib/service/high5/wave/s3/index.d.ts +48 -0
- package/lib/service/high5/wave/s3/index.js +100 -0
- package/lib/service/idp/index.d.ts +84 -0
- package/lib/service/idp/index.js +185 -0
- package/lib/service/idp/internal/index.d.ts +17 -0
- package/lib/service/idp/internal/index.js +33 -0
- package/lib/service/idp/oauth/index.d.ts +49 -0
- package/lib/service/idp/oauth/index.js +117 -0
- package/lib/service/idp/organization/index.d.ts +56 -0
- package/lib/service/idp/organization/index.js +114 -0
- package/lib/service/idp/organization/license/index.d.ts +7 -0
- package/lib/service/idp/organization/license/index.js +31 -0
- package/lib/service/idp/organization/member/index.d.ts +57 -0
- package/lib/service/idp/organization/member/index.js +110 -0
- package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
- package/lib/service/idp/organization/member/invitations/index.js +122 -0
- package/lib/service/idp/organization/settings/domain/index.d.ts +37 -0
- package/lib/service/idp/organization/settings/domain/index.js +76 -0
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
- package/lib/service/idp/organization/settings/domain/saml/index.js +98 -0
- package/lib/service/idp/organization/settings/index.d.ts +16 -0
- package/lib/service/idp/organization/settings/index.js +29 -0
- package/lib/service/idp/organization/settings/oauth/index.d.ts +62 -0
- package/lib/service/idp/organization/settings/oauth/index.js +117 -0
- package/lib/service/idp/organization/team/index.d.ts +72 -0
- package/lib/service/idp/organization/team/index.js +124 -0
- package/lib/service/idp/registration/index.d.ts +37 -0
- package/lib/service/idp/registration/index.js +87 -0
- package/lib/service/idp/user/index.d.ts +83 -0
- package/lib/service/idp/user/index.js +160 -0
- package/lib/service/idp/user/license/index.d.ts +7 -0
- package/lib/service/idp/user/license/index.js +31 -0
- package/lib/service/idp/user/password/index.d.ts +19 -0
- package/lib/service/idp/user/password/index.js +51 -0
- package/lib/service/idp/user/settings/connections/index.d.ts +13 -0
- package/lib/service/idp/user/settings/connections/index.js +32 -0
- package/lib/service/idp/user/settings/general/index.d.ts +22 -0
- package/lib/service/idp/user/settings/general/index.js +51 -0
- package/lib/service/idp/user/settings/index.d.ts +40 -0
- package/lib/service/idp/user/settings/index.js +70 -0
- package/lib/service/idp/user/settings/notifications/index.d.ts +16 -0
- package/lib/service/idp/user/settings/notifications/index.js +40 -0
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +20 -0
- package/lib/service/idp/user/settings/oauthApps/index.js +55 -0
- package/lib/service/idp/user/settings/pats/index.d.ts +48 -0
- package/lib/service/idp/user/settings/pats/index.js +104 -0
- package/lib/service/idp/user/settings/twoFactor/index.d.ts +10 -0
- package/lib/service/idp/user/settings/twoFactor/index.js +20 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +32 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +72 -0
- package/lib/service/mailer/index.d.ts +13 -0
- package/lib/service/{Mailer.js → mailer/index.js} +17 -16
- package/lib/service/mailer/internal/index.d.ts +36 -0
- package/lib/service/mailer/internal/index.js +69 -0
- package/lib/service/mothership/index.d.ts +97 -0
- package/lib/service/mothership/index.js +149 -0
- package/lib/service/nats/index.d.ts +49 -0
- package/lib/service/nats/index.js +138 -0
- package/lib/utils/Types.d.ts +1 -0
- package/lib/utils/Types.js +2 -0
- package/lib/utils/bouncer/features/Provider.d.ts +19 -0
- package/lib/utils/bouncer/features/Provider.js +101 -0
- package/package.json +37 -29
- package/lib/base.d.ts +0 -12
- package/lib/base.js +0 -8
- package/lib/hcloud.d.ts +0 -13
- package/lib/hcloud.js +0 -29
- package/lib/interfaces/Global.d.ts +0 -8
- package/lib/interfaces/IDP.d.ts +0 -9
- package/lib/interfaces/Mail.d.ts +0 -29
- package/lib/interfaces/Mail.js +0 -8
- package/lib/service/Auditor.d.ts +0 -22
- package/lib/service/Auditor.js +0 -61
- package/lib/service/AuditorInternal.d.ts +0 -28
- package/lib/service/AuditorInternal.js +0 -65
- package/lib/service/High5.d.ts +0 -4
- package/lib/service/High5.js +0 -9
- package/lib/service/IDP.d.ts +0 -39
- package/lib/service/IDP.js +0 -84
- package/lib/service/Mailer.d.ts +0 -13
- package/lib/service/MailerInternal.d.ts +0 -32
- package/lib/service/MailerInternal.js +0 -64
- /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
- /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const Base_1 = require("../../../../../../../Base");
|
|
13
|
+
const paginatedResponseHelper_1 = require("../../../../../../../helper/paginatedResponseHelper");
|
|
14
|
+
const searchFilter_1 = require("../../../../../../../helper/searchFilter");
|
|
15
|
+
class High5DesignSnapshots extends Base_1.default {
|
|
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 }) {
|
|
31
|
+
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
32
|
+
return new searchFilter_1.SearchFilterDTO(f);
|
|
33
|
+
});
|
|
34
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/search`), {
|
|
35
|
+
filters: filtersDTO,
|
|
36
|
+
sorting,
|
|
37
|
+
}, {
|
|
38
|
+
params: { content, limit, page },
|
|
39
|
+
});
|
|
40
|
+
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
41
|
+
});
|
|
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* () {
|
|
54
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots`), { name });
|
|
55
|
+
return resp.data;
|
|
56
|
+
});
|
|
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* () {
|
|
70
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}`), { name });
|
|
71
|
+
return resp.data;
|
|
72
|
+
});
|
|
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* () {
|
|
84
|
+
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}`));
|
|
85
|
+
});
|
|
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* () {
|
|
100
|
+
yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}/restore`));
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
getEndpoint(endpoint) {
|
|
104
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.default = High5DesignSnapshots;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import Base from "../../../../../Base";
|
|
2
|
+
import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
|
|
3
|
+
import { SingleStreamPatchOrder, Stream, StreamPatchActive, StreamPatchOrder } from "../../../../../interfaces/high5/space/event/stream";
|
|
4
|
+
import { High5Design } from "./design";
|
|
5
|
+
export declare class High5Stream extends Base {
|
|
6
|
+
get design(): High5Design;
|
|
7
|
+
private _design?;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves all Streams of an Event which match the provided search filter(s). Will return all Streams if no filter is provided.
|
|
10
|
+
* @param orgName Name of the organization
|
|
11
|
+
* @param spaceName Name of the space
|
|
12
|
+
* @param eventName Name of the event
|
|
13
|
+
* @param filters (optional) Array of search filters
|
|
14
|
+
* @param sorting (optional) Sorting object
|
|
15
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
16
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
17
|
+
* @returns Object containing an array of streams as well as the total number of results found in the database (independent of limit and page)
|
|
18
|
+
*/
|
|
19
|
+
searchStreams({ orgName, spaceName, eventName, filters, sorting, limit, page, }: SearchParams & {
|
|
20
|
+
orgName: string;
|
|
21
|
+
spaceName: string;
|
|
22
|
+
eventName: string;
|
|
23
|
+
}): Promise<PaginatedResponse<Stream>>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves a Stream by its ID.
|
|
26
|
+
* @param orgName Name of the organization
|
|
27
|
+
* @param spaceName Name of the space
|
|
28
|
+
* @param eventName Name of the event
|
|
29
|
+
* @param streamId ID of the stream
|
|
30
|
+
* @returns The requested stream
|
|
31
|
+
*/
|
|
32
|
+
getStream(orgName: string, spaceName: string, eventName: string, streamId: string): Promise<Stream>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new Stream for the specified Event.
|
|
35
|
+
* @param orgName Name of the organization
|
|
36
|
+
* @param spaceName Name of the space
|
|
37
|
+
* @param eventName Name of the event
|
|
38
|
+
* @param name Name for the new stream
|
|
39
|
+
* @returns The created stream
|
|
40
|
+
*/
|
|
41
|
+
createStream(orgName: string, spaceName: string, eventName: string, name: string): Promise<Stream>;
|
|
42
|
+
/**
|
|
43
|
+
* Duplicate a Stream for the specified Event.
|
|
44
|
+
* @param orgName Name of the organization
|
|
45
|
+
* @param spaceName Name of the space
|
|
46
|
+
* @param eventName Name of the event
|
|
47
|
+
* @param name Name for the new stream
|
|
48
|
+
* @param sourceStreamId ID for the stream to duplicate
|
|
49
|
+
* @returns The created stream
|
|
50
|
+
*/
|
|
51
|
+
duplicateStream(orgName: string, spaceName: string, eventName: string, name: string, sourceStreamId: string): Promise<Stream>;
|
|
52
|
+
/**
|
|
53
|
+
* Patches the order of Streams for an Event.
|
|
54
|
+
* @param orgName Name of the organization
|
|
55
|
+
* @param spaceName Name of the space
|
|
56
|
+
* @param eventName Name of the event
|
|
57
|
+
* @param StreamPatchOrder List of all event streams with their new order
|
|
58
|
+
* @returns Array of updated Streams
|
|
59
|
+
*/
|
|
60
|
+
patchStreamOrderMulti(orgName: string, spaceName: string, eventName: string, streamList: StreamPatchOrder[]): Promise<Stream[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Activate or deactivate a stream
|
|
63
|
+
* @param orgName Name of the organization
|
|
64
|
+
* @param spaceName Name of the space
|
|
65
|
+
* @param eventName Name of the event
|
|
66
|
+
* @param streamId ID of the stream
|
|
67
|
+
* @param StreamPatchActive Object defining if stream should be active or inactive
|
|
68
|
+
* @returns Details of the updated stream
|
|
69
|
+
*/
|
|
70
|
+
patchStreamState(orgName: string, spaceName: string, eventName: string, streamId: string, streamPatchActive: StreamPatchActive): Promise<Stream>;
|
|
71
|
+
/**
|
|
72
|
+
* Moves a Stream up or down in the existing Streams order.
|
|
73
|
+
* @param orgName Name of the organization
|
|
74
|
+
* @param spaceName Name of the space
|
|
75
|
+
* @param eventName Name of the event
|
|
76
|
+
* @param streamId ID of the stream
|
|
77
|
+
* @param SingleStreamPatchOrder Object defining if stream should move up or down
|
|
78
|
+
* @returns Array of updated Streams
|
|
79
|
+
*/
|
|
80
|
+
patchStreamOrder(orgName: string, spaceName: string, eventName: string, streamId: string, singleStreamPatchOrder: SingleStreamPatchOrder): Promise<Stream[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Rename a stream
|
|
83
|
+
* @param orgName Name of the organization
|
|
84
|
+
* @param spaceName Name of the space
|
|
85
|
+
* @param eventName Name of the event
|
|
86
|
+
* @param streamId ID of the stream
|
|
87
|
+
* @param name New name of the stream
|
|
88
|
+
* @returns Updated stream
|
|
89
|
+
*/
|
|
90
|
+
renameStream(orgName: string, spaceName: string, eventName: string, streamId: string, name: string): Promise<Stream>;
|
|
91
|
+
/**
|
|
92
|
+
* Moves a Stream to another event.
|
|
93
|
+
*
|
|
94
|
+
* @param orgName Name of the organization
|
|
95
|
+
* @param spaceName Name of the space
|
|
96
|
+
* @param eventName Name of the event
|
|
97
|
+
* @param streamId ID of the stream
|
|
98
|
+
* @param newEventName Name of the new event
|
|
99
|
+
* @param [name] (optional) New name for stream. Is the new event already has a stream with the same name as this one, this parameter is mandatory.
|
|
100
|
+
* @param [order] (optional) Order the stream should have in the new event
|
|
101
|
+
* @returns Updated Stream
|
|
102
|
+
*/
|
|
103
|
+
moveStream(orgName: string, spaceName: string, eventName: string, streamId: string, newEventName: string, name?: string, order?: number): Promise<Stream>;
|
|
104
|
+
/**
|
|
105
|
+
* Deletes a Stream by its ID.
|
|
106
|
+
* @param orgName Name of the organization
|
|
107
|
+
* @param spaceName Name of the space
|
|
108
|
+
* @param eventName Name of the event
|
|
109
|
+
* @param streamId ID of the stream
|
|
110
|
+
*/
|
|
111
|
+
deleteStream(orgName: string, spaceName: string, eventName: string, streamId: string): Promise<void>;
|
|
112
|
+
protected getEndpoint(endpoint: string): string;
|
|
113
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.High5Stream = void 0;
|
|
13
|
+
const Base_1 = require("../../../../../Base");
|
|
14
|
+
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
|
+
const searchFilter_1 = require("../../../../../helper/searchFilter");
|
|
16
|
+
const design_1 = require("./design");
|
|
17
|
+
class High5Stream extends Base_1.default {
|
|
18
|
+
get design() {
|
|
19
|
+
if (this._design === undefined) {
|
|
20
|
+
this._design = new design_1.High5Design(this.options, this.axios);
|
|
21
|
+
}
|
|
22
|
+
return this._design;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves all Streams of an Event which match the provided search filter(s). Will return all Streams if no filter is provided.
|
|
26
|
+
* @param orgName Name of the organization
|
|
27
|
+
* @param spaceName Name of the space
|
|
28
|
+
* @param eventName Name of the event
|
|
29
|
+
* @param filters (optional) Array of search filters
|
|
30
|
+
* @param sorting (optional) Sorting object
|
|
31
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
32
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
33
|
+
* @returns Object containing an array of streams as well as the total number of results found in the database (independent of limit and page)
|
|
34
|
+
*/
|
|
35
|
+
searchStreams(_a) {
|
|
36
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, eventName, filters, sorting, limit = 25, page = 0, }) {
|
|
37
|
+
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
38
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/search?page=${page}&limit=${limit}`), {
|
|
39
|
+
filters: filtersDTO,
|
|
40
|
+
sorting: sorting,
|
|
41
|
+
});
|
|
42
|
+
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves a Stream by its ID.
|
|
47
|
+
* @param orgName Name of the organization
|
|
48
|
+
* @param spaceName Name of the space
|
|
49
|
+
* @param eventName Name of the event
|
|
50
|
+
* @param streamId ID of the stream
|
|
51
|
+
* @returns The requested stream
|
|
52
|
+
*/
|
|
53
|
+
getStream(orgName, spaceName, eventName, streamId) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}`));
|
|
56
|
+
return resp.data;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Creates a new Stream for the specified Event.
|
|
61
|
+
* @param orgName Name of the organization
|
|
62
|
+
* @param spaceName Name of the space
|
|
63
|
+
* @param eventName Name of the event
|
|
64
|
+
* @param name Name for the new stream
|
|
65
|
+
* @returns The created stream
|
|
66
|
+
*/
|
|
67
|
+
createStream(orgName, spaceName, eventName, name) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams`), {
|
|
70
|
+
name: name,
|
|
71
|
+
});
|
|
72
|
+
return resp.data;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Duplicate a Stream for the specified Event.
|
|
77
|
+
* @param orgName Name of the organization
|
|
78
|
+
* @param spaceName Name of the space
|
|
79
|
+
* @param eventName Name of the event
|
|
80
|
+
* @param name Name for the new stream
|
|
81
|
+
* @param sourceStreamId ID for the stream to duplicate
|
|
82
|
+
* @returns The created stream
|
|
83
|
+
*/
|
|
84
|
+
duplicateStream(orgName, spaceName, eventName, name, sourceStreamId) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams`), {
|
|
87
|
+
name: name,
|
|
88
|
+
streamId: sourceStreamId,
|
|
89
|
+
});
|
|
90
|
+
return resp.data;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Patches the order of Streams for an Event.
|
|
95
|
+
* @param orgName Name of the organization
|
|
96
|
+
* @param spaceName Name of the space
|
|
97
|
+
* @param eventName Name of the event
|
|
98
|
+
* @param StreamPatchOrder List of all event streams with their new order
|
|
99
|
+
* @returns Array of updated Streams
|
|
100
|
+
*/
|
|
101
|
+
patchStreamOrderMulti(orgName, spaceName, eventName, streamList) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/order`), streamList);
|
|
104
|
+
return resp.data;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Activate or deactivate a stream
|
|
109
|
+
* @param orgName Name of the organization
|
|
110
|
+
* @param spaceName Name of the space
|
|
111
|
+
* @param eventName Name of the event
|
|
112
|
+
* @param streamId ID of the stream
|
|
113
|
+
* @param StreamPatchActive Object defining if stream should be active or inactive
|
|
114
|
+
* @returns Details of the updated stream
|
|
115
|
+
*/
|
|
116
|
+
patchStreamState(orgName, spaceName, eventName, streamId, streamPatchActive) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/active`), streamPatchActive);
|
|
119
|
+
return resp.data;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Moves a Stream up or down in the existing Streams order.
|
|
124
|
+
* @param orgName Name of the organization
|
|
125
|
+
* @param spaceName Name of the space
|
|
126
|
+
* @param eventName Name of the event
|
|
127
|
+
* @param streamId ID of the stream
|
|
128
|
+
* @param SingleStreamPatchOrder Object defining if stream should move up or down
|
|
129
|
+
* @returns Array of updated Streams
|
|
130
|
+
*/
|
|
131
|
+
patchStreamOrder(orgName, spaceName, eventName, streamId, singleStreamPatchOrder) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/order`), singleStreamPatchOrder);
|
|
134
|
+
return resp.data;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Rename a stream
|
|
139
|
+
* @param orgName Name of the organization
|
|
140
|
+
* @param spaceName Name of the space
|
|
141
|
+
* @param eventName Name of the event
|
|
142
|
+
* @param streamId ID of the stream
|
|
143
|
+
* @param name New name of the stream
|
|
144
|
+
* @returns Updated stream
|
|
145
|
+
*/
|
|
146
|
+
renameStream(orgName, spaceName, eventName, streamId, name) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/name`), { name });
|
|
149
|
+
return resp.data;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Moves a Stream to another event.
|
|
154
|
+
*
|
|
155
|
+
* @param orgName Name of the organization
|
|
156
|
+
* @param spaceName Name of the space
|
|
157
|
+
* @param eventName Name of the event
|
|
158
|
+
* @param streamId ID of the stream
|
|
159
|
+
* @param newEventName Name of the new event
|
|
160
|
+
* @param [name] (optional) New name for stream. Is the new event already has a stream with the same name as this one, this parameter is mandatory.
|
|
161
|
+
* @param [order] (optional) Order the stream should have in the new event
|
|
162
|
+
* @returns Updated Stream
|
|
163
|
+
*/
|
|
164
|
+
moveStream(orgName, spaceName, eventName, streamId, newEventName, name, order) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/event`), { eventName: newEventName, name, order });
|
|
167
|
+
return resp.data;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Deletes a Stream by its ID.
|
|
172
|
+
* @param orgName Name of the organization
|
|
173
|
+
* @param spaceName Name of the space
|
|
174
|
+
* @param eventName Name of the event
|
|
175
|
+
* @param streamId ID of the stream
|
|
176
|
+
*/
|
|
177
|
+
deleteStream(orgName, spaceName, eventName, streamId) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}`));
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
getEndpoint(endpoint) {
|
|
183
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
exports.High5Stream = High5Stream;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import Base from "../../../../Base";
|
|
2
|
+
import { High5ExecutionPackage, High5ExecutionPatch, High5ExecutionRequest, High5ExecutionResponse } from "../../../../interfaces/high5/space/execution";
|
|
3
|
+
import { High5SpaceExecutionLogs } from "./log/index";
|
|
4
|
+
import { High5SpaceExecutionStates } from "./status/index";
|
|
5
|
+
export declare class High5SpaceExecute extends Base {
|
|
6
|
+
get high5ExecutionLogs(): High5SpaceExecutionLogs;
|
|
7
|
+
private _high5ExecutionLogs?;
|
|
8
|
+
get high5ExecutionStates(): High5SpaceExecutionStates;
|
|
9
|
+
private _high5ExecutionStates?;
|
|
10
|
+
/**
|
|
11
|
+
* executeStream executes a single stream by its ID and an execution request
|
|
12
|
+
* @param orgName the organizations's name
|
|
13
|
+
* @param spaceName the spaces's name
|
|
14
|
+
* @param streamId to identify the stream
|
|
15
|
+
* @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
|
|
16
|
+
* @returns the stream result
|
|
17
|
+
*/
|
|
18
|
+
executeHigh5Stream(orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest, design?: boolean): Promise<High5ExecutionResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Executes all streams within an event.
|
|
21
|
+
* @param orgName Name of the Organization
|
|
22
|
+
* @param spaceName Name of the Space
|
|
23
|
+
* @param eventName Name of the Event
|
|
24
|
+
* @param eventExecutionRequest Event execution request containing payload, target and a boolean specifying if it should be a dry run
|
|
25
|
+
* @returns Array of stream results
|
|
26
|
+
*/
|
|
27
|
+
executeHigh5Event(orgName: string, spaceName: string, eventName: string, high5EventExecutionRequest: High5ExecutionRequest): Promise<High5ExecutionResponse[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Requests the StreamExecutionPackage for the provided Stream, which will hold all informations required to execute the Stream.
|
|
30
|
+
* @param orgName Name of the Organization
|
|
31
|
+
* @param spaceName Name of the Space
|
|
32
|
+
* @param streamId ID of the Stream
|
|
33
|
+
* @param secret Secret of the Stream execution object
|
|
34
|
+
* @returns StreamExecutionPackage
|
|
35
|
+
*/
|
|
36
|
+
getStreamExecutionPackage(orgName: string, spaceName: string, streamId: string, secret: string): Promise<High5ExecutionPackage>;
|
|
37
|
+
/**
|
|
38
|
+
* Publishes the stream status and logs to high5
|
|
39
|
+
* @param orgName the organizations's name
|
|
40
|
+
* @param spaceName the spaces's name
|
|
41
|
+
* @param streamId the id of the stream
|
|
42
|
+
* @param secret the secret of the stream execution object
|
|
43
|
+
* @param streamResult the result of the stream
|
|
44
|
+
* @returns StreamLog
|
|
45
|
+
*/
|
|
46
|
+
high5ExecutionStatusAndLogResponse(orgName: string, spaceName: string, secret: string, high5ExecutionResponse: High5ExecutionPatch): Promise<void>;
|
|
47
|
+
protected getEndpoint(endpoint: string): string;
|
|
48
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.High5SpaceExecute = void 0;
|
|
13
|
+
const Base_1 = require("../../../../Base");
|
|
14
|
+
const index_1 = require("./log/index");
|
|
15
|
+
const index_2 = require("./status/index");
|
|
16
|
+
class High5SpaceExecute extends Base_1.default {
|
|
17
|
+
get high5ExecutionLogs() {
|
|
18
|
+
if (this._high5ExecutionLogs === undefined) {
|
|
19
|
+
this._high5ExecutionLogs = new index_1.High5SpaceExecutionLogs(this.options, this.axios);
|
|
20
|
+
}
|
|
21
|
+
return this._high5ExecutionLogs;
|
|
22
|
+
}
|
|
23
|
+
get high5ExecutionStates() {
|
|
24
|
+
if (this._high5ExecutionStates === undefined) {
|
|
25
|
+
this._high5ExecutionStates = new index_2.High5SpaceExecutionStates(this.options, this.axios);
|
|
26
|
+
}
|
|
27
|
+
return this._high5ExecutionStates;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* executeStream executes a single stream by its ID and an execution request
|
|
31
|
+
* @param orgName the organizations's name
|
|
32
|
+
* @param spaceName the spaces's name
|
|
33
|
+
* @param streamId to identify the stream
|
|
34
|
+
* @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
|
|
35
|
+
* @returns the stream result
|
|
36
|
+
*/
|
|
37
|
+
executeHigh5Stream(orgName_1, spaceName_1, streamId_1, high5ExecutionRequest_1) {
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamId, high5ExecutionRequest, design = false) {
|
|
39
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}${design ? "&design=true" : ""}`), high5ExecutionRequest);
|
|
40
|
+
return resp.data;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Executes all streams within an event.
|
|
45
|
+
* @param orgName Name of the Organization
|
|
46
|
+
* @param spaceName Name of the Space
|
|
47
|
+
* @param eventName Name of the Event
|
|
48
|
+
* @param eventExecutionRequest Event execution request containing payload, target and a boolean specifying if it should be a dry run
|
|
49
|
+
* @returns Array of stream results
|
|
50
|
+
*/
|
|
51
|
+
executeHigh5Event(orgName, spaceName, eventName, high5EventExecutionRequest) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/event/name/${eventName}`), high5EventExecutionRequest);
|
|
54
|
+
return resp.data;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Requests the StreamExecutionPackage for the provided Stream, which will hold all informations required to execute the Stream.
|
|
59
|
+
* @param orgName Name of the Organization
|
|
60
|
+
* @param spaceName Name of the Space
|
|
61
|
+
* @param streamId ID of the Stream
|
|
62
|
+
* @param secret Secret of the Stream execution object
|
|
63
|
+
* @returns StreamExecutionPackage
|
|
64
|
+
*/
|
|
65
|
+
getStreamExecutionPackage(orgName, spaceName, streamId, secret) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}/package/${secret}`));
|
|
68
|
+
return resp.data;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Publishes the stream status and logs to high5
|
|
73
|
+
* @param orgName the organizations's name
|
|
74
|
+
* @param spaceName the spaces's name
|
|
75
|
+
* @param streamId the id of the stream
|
|
76
|
+
* @param secret the secret of the stream execution object
|
|
77
|
+
* @param streamResult the result of the stream
|
|
78
|
+
* @returns StreamLog
|
|
79
|
+
*/
|
|
80
|
+
high5ExecutionStatusAndLogResponse(orgName, spaceName, secret, high5ExecutionResponse) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/${secret}`), high5ExecutionResponse);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
getEndpoint(endpoint) {
|
|
86
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.High5SpaceExecute = High5SpaceExecute;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Base from "../../../../../Base";
|
|
2
|
+
import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
|
|
3
|
+
import { High5ExecutionLog } from "../../../../../interfaces/high5/space/execution";
|
|
4
|
+
export declare class High5SpaceExecutionLogs extends Base {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves all stream execution logs for a given execution inside a space.
|
|
7
|
+
* @param orgName Name of the Organization
|
|
8
|
+
* @param spaceName Name of the Space
|
|
9
|
+
* @param filters (optional) Array of search filters
|
|
10
|
+
* @param sorting (optional) Sorting object
|
|
11
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
12
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
13
|
+
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
14
|
+
*/
|
|
15
|
+
searchExecutionLogs({ orgName, spaceName, payload, filters, sorting, limit, page, }: SearchParams & {
|
|
16
|
+
orgName: string;
|
|
17
|
+
spaceName: string;
|
|
18
|
+
payload?: boolean;
|
|
19
|
+
}): Promise<PaginatedResponse<High5ExecutionLog>>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves the execution log of a stream.
|
|
22
|
+
* @param orgName Name of the Organization
|
|
23
|
+
* @param spaceName Name of the Space
|
|
24
|
+
* @param streamLogId ID of the stream log
|
|
25
|
+
* @returns Stream execution log
|
|
26
|
+
*/
|
|
27
|
+
getStreamExecutionLog(orgName: string, spaceName: string, streamLogId: string, payload?: boolean): Promise<High5ExecutionLog>;
|
|
28
|
+
protected getEndpoint(endpoint: string): string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.High5SpaceExecutionLogs = void 0;
|
|
13
|
+
const Base_1 = require("../../../../../Base");
|
|
14
|
+
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
|
+
const searchFilter_1 = require("../../../../../helper/searchFilter");
|
|
16
|
+
class High5SpaceExecutionLogs extends Base_1.default {
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves all stream execution logs for a given execution inside a space.
|
|
19
|
+
* @param orgName Name of the Organization
|
|
20
|
+
* @param spaceName Name of the Space
|
|
21
|
+
* @param filters (optional) Array of search filters
|
|
22
|
+
* @param sorting (optional) Sorting object
|
|
23
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
24
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
25
|
+
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
26
|
+
*/
|
|
27
|
+
searchExecutionLogs(_a) {
|
|
28
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, payload = false, filters, sorting, limit = 25, page = 0, }) {
|
|
29
|
+
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
30
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/logs/search?page=${page}&limit=${limit}&payload=${payload}`), {
|
|
31
|
+
filters: filtersDTO,
|
|
32
|
+
sorting: sorting,
|
|
33
|
+
});
|
|
34
|
+
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the execution log of a stream.
|
|
39
|
+
* @param orgName Name of the Organization
|
|
40
|
+
* @param spaceName Name of the Space
|
|
41
|
+
* @param streamLogId ID of the stream log
|
|
42
|
+
* @returns Stream execution log
|
|
43
|
+
*/
|
|
44
|
+
getStreamExecutionLog(orgName_1, spaceName_1, streamLogId_1) {
|
|
45
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamLogId, payload = false) {
|
|
46
|
+
const resp = yield this.axios
|
|
47
|
+
.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/logs/${streamLogId}?payload=${payload}`))
|
|
48
|
+
.catch((err) => {
|
|
49
|
+
throw err;
|
|
50
|
+
});
|
|
51
|
+
return resp.data;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
getEndpoint(endpoint) {
|
|
55
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.High5SpaceExecutionLogs = High5SpaceExecutionLogs;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../../../Base";
|
|
3
|
+
import { PaginatedResponse } from "../../../../../interfaces/global";
|
|
4
|
+
import { High5ExecutionStatus } from "../../../../../interfaces/high5/space/execution";
|
|
5
|
+
export declare class High5SpaceExecutionStates extends Base {
|
|
6
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves all stream execution logs for a given stream.
|
|
9
|
+
* @param orgName Name of the Organization
|
|
10
|
+
* @param spaceName Name of the Space
|
|
11
|
+
* @param streamStatusId ID of the stream status
|
|
12
|
+
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
13
|
+
*/
|
|
14
|
+
getStreamExecutionStatus(orgName: string, spaceName: string, streamStatusId: string, limit?: number, page?: number): Promise<PaginatedResponse<High5ExecutionStatus>>;
|
|
15
|
+
protected getEndpoint(endpoint: string): string;
|
|
16
|
+
}
|