hcloud-sdk 17.0.0 → 18.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 +176 -76
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +6 -3
- package/lib/Hcloud.js +16 -5
- package/lib/helper/ValidationHelper.d.ts +10 -2
- package/lib/helper/ValidationHelper.js +55 -7
- package/lib/interfaces/auditor/index.d.ts +13 -2
- package/lib/interfaces/auditor/index.js +9 -1
- package/lib/interfaces/cosmo/asset/index.d.ts +185 -0
- package/lib/interfaces/cosmo/asset/index.js +82 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +38 -0
- package/lib/interfaces/cosmo/comment/index.js +8 -0
- package/lib/interfaces/cosmo/event/index.d.ts +31 -0
- package/lib/interfaces/cosmo/event/index.js +17 -0
- package/lib/interfaces/cosmo/location/index.d.ts +4 -0
- package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
- package/lib/interfaces/cosmo/namespace/index.js +9 -0
- package/lib/interfaces/cosmo/permissions.d.ts +96 -0
- package/lib/interfaces/cosmo/permissions.js +58 -0
- package/lib/interfaces/cosmo/share/index.d.ts +28 -0
- package/lib/interfaces/cosmo/share/index.js +2 -0
- package/lib/interfaces/cosmo/space/index.d.ts +25 -0
- package/lib/interfaces/cosmo/space/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +12 -0
- package/lib/interfaces/cosmo/tag/tag.js +2 -0
- package/lib/interfaces/global/Products.d.ts +2 -2
- package/lib/interfaces/global/Products.js +1 -1
- package/lib/interfaces/high5/index.d.ts +7 -7
- package/lib/interfaces/high5/index.js +7 -7
- package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
- package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
- package/lib/interfaces/high5/space/database/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +9 -2
- package/lib/interfaces/high5/space/execution/index.d.ts +2 -1
- package/lib/interfaces/high5/space/job/JobLog.d.ts +16 -0
- package/lib/interfaces/high5/space/job/JobLog.js +2 -0
- package/lib/interfaces/high5/space/job/index.d.ts +38 -0
- package/lib/interfaces/high5/space/job/index.js +8 -0
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +4 -3
- package/lib/interfaces/idp/organization/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/index.js +1 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
- package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/stats.d.ts +7 -0
- package/lib/interfaces/idp/organization/stats.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
- package/lib/interfaces/idp/user/Message.d.ts +21 -0
- package/lib/interfaces/idp/user/Message.js +14 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -7
- package/lib/interfaces/idp/user/Scopes.js +0 -9
- package/lib/interfaces/idp/user/index.d.ts +2 -1
- package/lib/interfaces/mailer/index.d.ts +30 -1
- package/lib/interfaces/mailer/index.js +87 -1
- package/lib/interfaces/mothership/index.d.ts +3 -1
- package/lib/interfaces/mothership/index.js +15 -0
- package/lib/interfaces/mothership/stats.d.ts +4 -0
- package/lib/interfaces/mothership/stats.js +2 -0
- package/lib/interfaces/nats/index.d.ts +54 -24
- package/lib/interfaces/nats/index.js +87 -58
- package/lib/interfaces/shorts/index.d.ts +10 -0
- package/lib/interfaces/shorts/index.js +2 -0
- package/lib/service/agent/bundle/dev/index.d.ts +16 -6
- package/lib/service/agent/bundle/dev/index.js +12 -10
- package/lib/service/agent/bundle/index.d.ts +10 -4
- package/lib/service/agent/bundle/index.js +6 -6
- package/lib/service/agent/context/index.d.ts +22 -8
- package/lib/service/agent/context/index.js +15 -14
- package/lib/service/auditor/index.d.ts +8 -4
- package/lib/service/auditor/index.js +5 -5
- package/lib/service/auditor/internal/index.d.ts +27 -3
- package/lib/service/auditor/internal/index.js +34 -5
- package/lib/service/bouncer/features/index.d.ts +4 -2
- package/lib/service/bouncer/features/index.js +2 -2
- package/lib/service/cosmo/asset/index.d.ts +219 -0
- package/lib/service/cosmo/asset/index.js +314 -0
- package/lib/service/cosmo/comment/index.d.ts +122 -0
- package/lib/service/cosmo/comment/index.js +161 -0
- package/lib/service/cosmo/event/index.d.ts +23 -0
- package/lib/service/cosmo/event/index.js +40 -0
- package/lib/service/cosmo/folder/index.d.ts +27 -0
- package/lib/service/cosmo/folder/index.js +47 -0
- package/lib/service/cosmo/index.d.ts +49 -0
- package/lib/service/cosmo/index.js +119 -0
- package/lib/service/cosmo/internal/index.d.ts +7 -0
- package/lib/service/cosmo/internal/index.js +17 -0
- package/lib/service/cosmo/internal/space/index.d.ts +15 -0
- package/lib/service/cosmo/internal/space/index.js +34 -0
- package/lib/service/cosmo/location/index.d.ts +40 -0
- package/lib/service/cosmo/location/index.js +63 -0
- package/lib/service/cosmo/namespace/index.d.ts +42 -0
- package/lib/service/cosmo/namespace/index.js +65 -0
- package/lib/service/cosmo/organization/index.d.ts +47 -0
- package/lib/service/cosmo/organization/index.js +64 -0
- package/lib/service/cosmo/permissions/index.d.ts +131 -0
- package/lib/service/cosmo/permissions/index.js +181 -0
- package/lib/service/cosmo/production/index.d.ts +26 -0
- package/lib/service/cosmo/production/index.js +45 -0
- package/lib/service/cosmo/share/index.d.ts +161 -0
- package/lib/service/cosmo/share/index.js +215 -0
- package/lib/service/cosmo/space/index.d.ts +104 -0
- package/lib/service/cosmo/space/index.js +146 -0
- package/lib/service/cosmo/tag/index.d.ts +67 -0
- package/lib/service/cosmo/tag/index.js +93 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliCosmoSpace.js +8 -7
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliFuseSpace.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Pool.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Space.js +7 -6
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOAuthApp.js +7 -6
- package/lib/service/dali/avatar/DaliOrganization.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOrganization.js +7 -6
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
- package/lib/service/dali/avatar/DaliServiceAccount.js +7 -6
- package/lib/service/dali/avatar/DaliTeam.d.ts +10 -4
- package/lib/service/dali/avatar/DaliTeam.js +7 -6
- package/lib/service/dali/avatar/DaliUser.d.ts +10 -4
- package/lib/service/dali/avatar/DaliUser.js +7 -6
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +2 -5
- package/lib/service/fuse/index.d.ts +4 -2
- package/lib/service/fuse/index.js +2 -2
- package/lib/service/fuse/internal/index.d.ts +4 -2
- package/lib/service/fuse/internal/index.js +3 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +4 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.js +2 -2
- package/lib/service/fuse/internal/space/index.d.ts +7 -3
- package/lib/service/fuse/internal/space/index.js +6 -4
- package/lib/service/fuse/space/cronjob/index.d.ts +35 -13
- package/lib/service/fuse/space/cronjob/index.js +48 -50
- package/lib/service/fuse/space/cronjob/log/index.d.ts +8 -4
- package/lib/service/fuse/space/cronjob/log/index.js +5 -5
- package/lib/service/fuse/space/index.d.ts +27 -11
- package/lib/service/fuse/space/index.js +19 -18
- package/lib/service/high5/execution/index.d.ts +4 -2
- package/lib/service/high5/execution/index.js +3 -2
- package/lib/service/high5/execution/status/index.d.ts +5 -3
- package/lib/service/high5/execution/status/index.js +3 -3
- package/lib/service/high5/index.d.ts +7 -2
- package/lib/service/high5/index.js +9 -2
- package/lib/service/high5/internal/index.d.ts +4 -2
- package/lib/service/high5/internal/index.js +3 -2
- package/lib/service/high5/internal/space/index.d.ts +10 -3
- package/lib/service/high5/internal/space/index.js +13 -4
- package/lib/service/high5/internal/space/job/index.d.ts +7 -0
- package/lib/service/high5/internal/space/job/index.js +17 -0
- package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
- package/lib/service/high5/internal/space/job/log/index.js +34 -0
- package/lib/service/high5/joinToken/index.d.ts +14 -6
- package/lib/service/high5/joinToken/index.js +10 -9
- package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
- package/lib/service/high5/space/database/document/array/index.js +102 -0
- package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
- package/lib/service/{friday → high5}/space/database/document/index.js +31 -16
- package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
- package/lib/service/high5/space/database/document/number/index.js +77 -0
- package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
- package/lib/service/{friday → high5}/space/database/index.js +18 -17
- package/lib/service/high5/space/event/index.d.ts +17 -7
- package/lib/service/high5/space/event/index.js +12 -11
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -2
- package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
- package/lib/service/high5/space/event/stream/design/index.js +7 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +12 -10
- package/lib/service/high5/space/event/stream/index.d.ts +32 -12
- package/lib/service/high5/space/event/stream/index.js +22 -21
- package/lib/service/high5/space/execution/index.d.ts +19 -7
- package/lib/service/high5/space/execution/index.js +17 -12
- package/lib/service/high5/space/execution/log/index.d.ts +8 -4
- package/lib/service/high5/space/execution/log/index.js +5 -5
- package/lib/service/high5/space/execution/status/index.d.ts +7 -3
- package/lib/service/high5/space/execution/status/index.js +4 -4
- package/lib/service/high5/space/index.d.ts +43 -14
- package/lib/service/high5/space/index.js +45 -23
- package/lib/service/high5/space/job/index.d.ts +145 -0
- package/lib/service/high5/space/job/index.js +201 -0
- package/lib/service/high5/space/job/log/index.d.ts +35 -0
- package/lib/service/high5/space/job/log/index.js +58 -0
- package/lib/service/high5/space/node/index.d.ts +20 -8
- package/lib/service/high5/space/node/index.js +14 -13
- package/lib/service/high5/space/pool/index.d.ts +27 -11
- package/lib/service/high5/space/pool/index.js +19 -18
- package/lib/service/high5/space/secret/index.d.ts +17 -7
- package/lib/service/high5/space/secret/index.js +12 -11
- package/lib/service/high5/space/stat/index.d.ts +12 -0
- package/lib/service/high5/space/stat/index.js +31 -0
- package/lib/service/high5/space/wave/index.d.ts +16 -6
- package/lib/service/high5/space/wave/index.js +11 -10
- package/lib/service/high5/space/webhook/index.d.ts +32 -12
- package/lib/service/high5/space/webhook/index.js +25 -21
- package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
- package/lib/service/high5/space/webhook/log/index.js +2 -2
- package/lib/service/high5/stat/index.d.ts +11 -0
- package/lib/service/high5/stat/index.js +30 -0
- package/lib/service/high5/wave/s3/index.d.ts +31 -8
- package/lib/service/high5/wave/s3/index.js +42 -21
- package/lib/service/idp/guest/index.d.ts +42 -0
- package/lib/service/idp/guest/index.js +66 -0
- package/lib/service/idp/index.d.ts +25 -7
- package/lib/service/idp/index.js +23 -12
- package/lib/service/idp/internal/index.d.ts +5 -3
- package/lib/service/idp/internal/index.js +5 -3
- package/lib/service/idp/oauth/index.d.ts +16 -6
- package/lib/service/idp/oauth/index.js +15 -15
- package/lib/service/idp/organization/index.d.ts +19 -5
- package/lib/service/idp/organization/index.js +19 -8
- package/lib/service/idp/organization/license/index.d.ts +7 -3
- package/lib/service/idp/organization/license/index.js +4 -4
- package/lib/service/idp/organization/member/index.d.ts +20 -8
- package/lib/service/idp/organization/member/index.js +15 -13
- package/lib/service/idp/organization/member/invitations/index.d.ts +23 -9
- package/lib/service/idp/organization/member/invitations/index.js +72 -59
- package/lib/service/idp/organization/service-accounts/index.d.ts +20 -8
- package/lib/service/idp/organization/service-accounts/index.js +13 -12
- package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
- package/lib/service/idp/organization/settings/domain/index.js +9 -8
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
- package/lib/service/idp/organization/settings/domain/saml/index.js +19 -18
- package/lib/service/idp/organization/settings/oauth/index.d.ts +23 -9
- package/lib/service/idp/organization/settings/oauth/index.js +16 -15
- package/lib/service/idp/organization/stat/index.d.ts +11 -0
- package/lib/service/idp/organization/stat/index.js +30 -0
- package/lib/service/idp/organization/team/index.d.ts +22 -10
- package/lib/service/idp/organization/team/index.js +14 -13
- package/lib/service/idp/registration/index.d.ts +10 -4
- package/lib/service/idp/registration/index.js +15 -9
- package/lib/service/idp/user/index.d.ts +33 -11
- package/lib/service/idp/user/index.js +29 -16
- package/lib/service/idp/user/license/index.d.ts +7 -3
- package/lib/service/idp/user/license/index.js +4 -4
- package/lib/service/idp/user/message/index.d.ts +61 -0
- package/lib/service/idp/user/message/index.js +92 -0
- package/lib/service/idp/user/password/index.d.ts +4 -2
- package/lib/service/idp/user/password/index.js +2 -2
- package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
- package/lib/service/idp/user/settings/connections/index.js +2 -2
- package/lib/service/idp/user/settings/general/index.d.ts +10 -4
- package/lib/service/idp/user/settings/general/index.js +6 -6
- package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
- package/lib/service/idp/user/settings/notifications/index.js +4 -4
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
- package/lib/service/idp/user/settings/oauthApps/index.js +6 -5
- package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
- package/lib/service/idp/user/settings/pats/index.js +17 -15
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +13 -10
- package/lib/service/mailer/index.d.ts +4 -2
- package/lib/service/mailer/index.js +2 -2
- package/lib/service/mailer/internal/index.d.ts +13 -5
- package/lib/service/mailer/internal/index.js +8 -8
- package/lib/service/mothership/index.d.ts +35 -13
- package/lib/service/mothership/index.js +32 -17
- package/lib/service/nats/index.js +58 -43
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/{friday → shorts}/index.js +13 -10
- package/lib/service/shorts/internal/index.d.ts +72 -0
- package/lib/service/shorts/internal/index.js +104 -0
- package/package.json +1 -1
- package/lib/interfaces/friday/index.d.ts +0 -3
- package/lib/interfaces/friday/index.js +0 -19
- package/lib/interfaces/friday/space/index.d.ts +0 -21
- package/lib/interfaces/friday/space/index.js +0 -11
- package/lib/service/friday/index.d.ts +0 -13
- package/lib/service/friday/space/index.d.ts +0 -81
- package/lib/service/friday/space/index.js +0 -150
- /package/lib/interfaces/{friday/space/database → cosmo/location}/index.js +0 -0
- /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
|
@@ -9,20 +9,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.High5Database = void 0;
|
|
13
13
|
const Base_1 = require("../../../../Base");
|
|
14
14
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
15
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
16
|
const document_1 = require("./document");
|
|
17
|
-
class
|
|
17
|
+
class High5Database extends Base_1.default {
|
|
18
18
|
get document() {
|
|
19
19
|
if (this._document === undefined) {
|
|
20
|
-
this._document = new document_1.
|
|
20
|
+
this._document = new document_1.High5Document(this.options, this.axios);
|
|
21
21
|
}
|
|
22
22
|
return this._document;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Retrieves all Databases of a
|
|
25
|
+
* Retrieves all Databases of a High5 Space which match the provided search filter(s). Will return all Databases of the Space if no filter is provided.
|
|
26
26
|
* @param orgName Name of the Organization
|
|
27
27
|
* @param spaceName Name of the Space
|
|
28
28
|
* @param filters (optional) Array of search filters
|
|
@@ -31,14 +31,14 @@ class FridayDatabase extends Base_1.default {
|
|
|
31
31
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
32
32
|
* @returns Object containing an array of Databases and the total number of results found in the database (independent of limit and page)
|
|
33
33
|
*/
|
|
34
|
-
searchDatabases(_a) {
|
|
35
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0,
|
|
34
|
+
searchDatabases(_a, raw_1) {
|
|
35
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
36
36
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
37
37
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/search?page=${page}&limit=${limit}`), {
|
|
38
38
|
filters: filtersDTO,
|
|
39
39
|
sorting: sorting,
|
|
40
40
|
});
|
|
41
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
41
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -48,10 +48,10 @@ class FridayDatabase extends Base_1.default {
|
|
|
48
48
|
* @param dbName Name of the Database
|
|
49
49
|
* @returns The requested Database
|
|
50
50
|
*/
|
|
51
|
-
getDatabase(orgName, spaceName, dbName) {
|
|
51
|
+
getDatabase(orgName, spaceName, dbName, raw) {
|
|
52
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
53
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}`));
|
|
54
|
-
return resp.data;
|
|
54
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
@@ -61,10 +61,10 @@ class FridayDatabase extends Base_1.default {
|
|
|
61
61
|
* @param name Name of the new Database
|
|
62
62
|
* @returns The created Database
|
|
63
63
|
*/
|
|
64
|
-
createDatabase(orgName, spaceName, name) {
|
|
64
|
+
createDatabase(orgName, spaceName, name, raw) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases`), { name });
|
|
67
|
-
return resp.data;
|
|
67
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -75,12 +75,12 @@ class FridayDatabase extends Base_1.default {
|
|
|
75
75
|
* @param name New name of the Database
|
|
76
76
|
* @returns Updated Database
|
|
77
77
|
*/
|
|
78
|
-
renameDatabase(orgName, spaceName, dbName, name) {
|
|
78
|
+
renameDatabase(orgName, spaceName, dbName, name, raw) {
|
|
79
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
80
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/name`), {
|
|
81
81
|
name: name,
|
|
82
82
|
});
|
|
83
|
-
return resp.data;
|
|
83
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -89,13 +89,14 @@ class FridayDatabase extends Base_1.default {
|
|
|
89
89
|
* @param spaceName Name of the Space
|
|
90
90
|
* @param dbName Name of the Database
|
|
91
91
|
*/
|
|
92
|
-
deleteDatabase(orgName, spaceName, dbName) {
|
|
92
|
+
deleteDatabase(orgName, spaceName, dbName, raw) {
|
|
93
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}`));
|
|
94
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}`));
|
|
95
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
getEndpoint(endpoint) {
|
|
98
|
-
return `${this.options.server}/api/
|
|
99
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
exports.
|
|
102
|
+
exports.High5Database = High5Database;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
3
3
|
import { Event } from "../../../../interfaces/high5/space/event";
|
|
4
4
|
import { High5Stream } from "./stream";
|
|
@@ -15,10 +15,12 @@ export declare class High5Event 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 Events and the total number of results found in the database (independent of limit and page)
|
|
17
17
|
*/
|
|
18
|
-
searchEvents({ orgName, spaceName, filters, sorting, limit, page
|
|
18
|
+
searchEvents<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
|
|
19
19
|
orgName: string;
|
|
20
20
|
spaceName: string;
|
|
21
|
-
}
|
|
21
|
+
}, raw?: {
|
|
22
|
+
raw: R;
|
|
23
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Event>>>;
|
|
22
24
|
/**
|
|
23
25
|
* Retrieves an Event by its name.
|
|
24
26
|
* @param orgName Name of the Organization
|
|
@@ -26,7 +28,9 @@ export declare class High5Event extends Base {
|
|
|
26
28
|
* @param eventName Name of the Event
|
|
27
29
|
* @returns The requested Event
|
|
28
30
|
*/
|
|
29
|
-
getEvent(orgName: string, spaceName: string, eventName: string
|
|
31
|
+
getEvent<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, Event>>;
|
|
30
34
|
/**
|
|
31
35
|
* Creates a new Event in the provided Space.
|
|
32
36
|
* @param orgName Name of the Organization
|
|
@@ -34,7 +38,9 @@ export declare class High5Event extends Base {
|
|
|
34
38
|
* @param name Name of the new Event
|
|
35
39
|
* @returns The created Event
|
|
36
40
|
*/
|
|
37
|
-
createEvent(orgName: string, spaceName: string, name: string
|
|
41
|
+
createEvent<R extends boolean = false>(orgName: string, spaceName: string, name: string, raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, Event>>;
|
|
38
44
|
/**
|
|
39
45
|
* Rename an event
|
|
40
46
|
* @param orgName Name of the Organization
|
|
@@ -43,13 +49,17 @@ export declare class High5Event extends Base {
|
|
|
43
49
|
* @param name New name of the Event
|
|
44
50
|
* @returns Updated Event
|
|
45
51
|
*/
|
|
46
|
-
renameEvent(orgName: string, spaceName: string, eventName: string, name: string
|
|
52
|
+
renameEvent<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, name: string, raw?: {
|
|
53
|
+
raw: R;
|
|
54
|
+
}): Promise<MaybeRaw<R, Event>>;
|
|
47
55
|
/**
|
|
48
56
|
* Deletes an Event by its name.
|
|
49
57
|
* @param orgName Name of the Organization
|
|
50
58
|
* @param spaceName Name of the Space
|
|
51
59
|
* @param eventName Name of the Event
|
|
52
60
|
*/
|
|
53
|
-
deleteEvent(orgName: string, spaceName: string, eventName: string
|
|
61
|
+
deleteEvent<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, raw?: {
|
|
62
|
+
raw: R;
|
|
63
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
54
64
|
protected getEndpoint(endpoint: string): string;
|
|
55
65
|
}
|
|
@@ -31,14 +31,14 @@ class High5Event extends Base_1.default {
|
|
|
31
31
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
32
32
|
* @returns Object containing an array of Events and the total number of results found in the database (independent of limit and page)
|
|
33
33
|
*/
|
|
34
|
-
searchEvents(_a) {
|
|
35
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0,
|
|
34
|
+
searchEvents(_a, raw_1) {
|
|
35
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
36
36
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
37
37
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/search?page=${page}&limit=${limit}`), {
|
|
38
38
|
filters: filtersDTO,
|
|
39
39
|
sorting: sorting,
|
|
40
40
|
});
|
|
41
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
41
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -48,10 +48,10 @@ class High5Event extends Base_1.default {
|
|
|
48
48
|
* @param eventName Name of the Event
|
|
49
49
|
* @returns The requested Event
|
|
50
50
|
*/
|
|
51
|
-
getEvent(orgName, spaceName, eventName) {
|
|
51
|
+
getEvent(orgName, spaceName, eventName, raw) {
|
|
52
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
53
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
54
|
-
return resp.data;
|
|
54
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
@@ -61,10 +61,10 @@ class High5Event extends Base_1.default {
|
|
|
61
61
|
* @param name Name of the new Event
|
|
62
62
|
* @returns The created Event
|
|
63
63
|
*/
|
|
64
|
-
createEvent(orgName, spaceName, name) {
|
|
64
|
+
createEvent(orgName, spaceName, name, raw) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events`), { name: name });
|
|
67
|
-
return resp.data;
|
|
67
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -75,12 +75,12 @@ class High5Event extends Base_1.default {
|
|
|
75
75
|
* @param name New name of the Event
|
|
76
76
|
* @returns Updated Event
|
|
77
77
|
*/
|
|
78
|
-
renameEvent(orgName, spaceName, eventName, name) {
|
|
78
|
+
renameEvent(orgName, spaceName, eventName, name, raw) {
|
|
79
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
80
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/name`), {
|
|
81
81
|
name: name,
|
|
82
82
|
});
|
|
83
|
-
return resp.data;
|
|
83
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -89,9 +89,10 @@ class High5Event extends Base_1.default {
|
|
|
89
89
|
* @param spaceName Name of the Space
|
|
90
90
|
* @param eventName Name of the Event
|
|
91
91
|
*/
|
|
92
|
-
deleteEvent(orgName, spaceName, eventName) {
|
|
92
|
+
deleteEvent(orgName, spaceName, eventName, raw) {
|
|
93
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
94
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
95
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
getEndpoint(endpoint) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import Base from "../../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
2
|
import { Design } from "../../../../../../interfaces/high5";
|
|
3
3
|
import { AddNode, DesignOperation, EditNode, LinkNodes, MoveNode } from "../../../../../../interfaces/high5/space/event/stream/design/DesignOperation";
|
|
4
4
|
import { DesignerNode } from "../../../../../../interfaces/high5/space/event/stream/design/StreamDesign";
|
|
5
5
|
export default class DesignOperations extends Base {
|
|
6
|
-
send(orgName: string, spaceName: string, eventName: string, streamId: string, designHash: string, operations: DesignOperation[]
|
|
6
|
+
send<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, designHash: string, operations: DesignOperation[], raw?: {
|
|
7
|
+
raw: R;
|
|
8
|
+
}): Promise<MaybeRaw<R, Design>>;
|
|
7
9
|
queue(): OperationQueue;
|
|
8
10
|
addNode(details: DesignerNode): OperationQueue;
|
|
9
11
|
deleteNode(uuid: string): OperationQueue;
|
|
@@ -13,10 +13,10 @@ exports.OperationQueue = void 0;
|
|
|
13
13
|
const Base_1 = require("../../../../../../Base");
|
|
14
14
|
const DesignOperation_1 = require("../../../../../../interfaces/high5/space/event/stream/design/DesignOperation");
|
|
15
15
|
class DesignOperations extends Base_1.default {
|
|
16
|
-
send(orgName, spaceName, eventName, streamId, designHash, operations) {
|
|
16
|
+
send(orgName, spaceName, eventName, streamId, designHash, operations, raw) {
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/operations`), { hash: designHash, operations });
|
|
19
|
-
return resp.data;
|
|
19
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
queue() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
2
|
import { Design } from "../../../../../../interfaces/high5/space/event/stream/design";
|
|
3
3
|
import { DesignContent } from "../../../../../../interfaces/high5/space/event/stream/design/StreamDesign";
|
|
4
4
|
import DesignOperations from "./DesignOperations";
|
|
@@ -22,7 +22,9 @@ export declare class High5Design extends Base {
|
|
|
22
22
|
* @param streamId ID of the stream
|
|
23
23
|
* @returns The requested design
|
|
24
24
|
*/
|
|
25
|
-
getDesign(orgName: string, spaceName: string, eventName: string, streamId: string
|
|
25
|
+
getDesign<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, raw?: {
|
|
26
|
+
raw: R;
|
|
27
|
+
}): Promise<MaybeRaw<R, Design>>;
|
|
26
28
|
/**
|
|
27
29
|
* Creates/overwrites a new design for the specified stream.
|
|
28
30
|
*
|
|
@@ -35,7 +37,9 @@ export declare class High5Design extends Base {
|
|
|
35
37
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
36
38
|
* @returns The created design
|
|
37
39
|
*/
|
|
38
|
-
createDesign(orgName: string, spaceName: string, eventName: string, streamId: string, name: string, content: DesignContent
|
|
40
|
+
createDesign<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, name: string, content: DesignContent, raw?: {
|
|
41
|
+
raw: R;
|
|
42
|
+
}): Promise<MaybeRaw<R, Design>>;
|
|
39
43
|
/**
|
|
40
44
|
* Publish the current design for a specified stream
|
|
41
45
|
*
|
|
@@ -48,6 +52,8 @@ export declare class High5Design extends Base {
|
|
|
48
52
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
49
53
|
* @returns The created design
|
|
50
54
|
*/
|
|
51
|
-
publishDesign(orgName: string, spaceName: string, eventName: string, streamId: string
|
|
55
|
+
publishDesign<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, raw?: {
|
|
56
|
+
raw: R;
|
|
57
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
52
58
|
protected getEndpoint(endpoint: string): string;
|
|
53
59
|
}
|
|
@@ -40,10 +40,10 @@ class High5Design extends Base_1.default {
|
|
|
40
40
|
* @param streamId ID of the stream
|
|
41
41
|
* @returns The requested design
|
|
42
42
|
*/
|
|
43
|
-
getDesign(orgName, spaceName, eventName, streamId) {
|
|
43
|
+
getDesign(orgName, spaceName, eventName, streamId, raw) {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design`));
|
|
46
|
-
return resp.data;
|
|
46
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
@@ -58,13 +58,13 @@ class High5Design extends Base_1.default {
|
|
|
58
58
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
59
59
|
* @returns The created design
|
|
60
60
|
*/
|
|
61
|
-
createDesign(orgName, spaceName, eventName, streamId, name, content) {
|
|
61
|
+
createDesign(orgName, spaceName, eventName, streamId, name, content, raw) {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
63
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design`), {
|
|
64
64
|
name,
|
|
65
65
|
content,
|
|
66
66
|
});
|
|
67
|
-
return resp.data;
|
|
67
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -79,9 +79,10 @@ class High5Design extends Base_1.default {
|
|
|
79
79
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
80
80
|
* @returns The created design
|
|
81
81
|
*/
|
|
82
|
-
publishDesign(orgName, spaceName, eventName, streamId) {
|
|
82
|
+
publishDesign(orgName, spaceName, eventName, streamId, raw) {
|
|
83
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`));
|
|
84
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/publish`));
|
|
85
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchParams } from "../../../../../../../interfaces/global";
|
|
3
3
|
import DesignSnapshot from "../../../../../../../interfaces/high5/space/event/stream/design/snapshot";
|
|
4
4
|
export default class High5DesignSnapshots extends Base {
|
|
@@ -15,7 +15,9 @@ 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(orgName: string, spaceName: string, eventName: string, streamId: string, content: boolean | undefined, { filters, sorting, limit, page }: SearchParams
|
|
18
|
+
search<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, content: boolean | undefined, { filters, sorting, limit, page }: SearchParams, raw?: {
|
|
19
|
+
raw: R;
|
|
20
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<DesignSnapshot>>>;
|
|
19
21
|
/**
|
|
20
22
|
* Create a snapshot of stream's design.
|
|
21
23
|
* @param orgName Name of the organization
|
|
@@ -25,7 +27,9 @@ export default class High5DesignSnapshots extends Base {
|
|
|
25
27
|
* @param name Name of the snapshot
|
|
26
28
|
* @returns The snapshot
|
|
27
29
|
*/
|
|
28
|
-
create(orgName: string, spaceName: string, eventName: string, streamId: string, name: string
|
|
30
|
+
create<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, name: string, raw?: {
|
|
31
|
+
raw: R;
|
|
32
|
+
}): Promise<MaybeRaw<R, DesignSnapshot>>;
|
|
29
33
|
/**
|
|
30
34
|
* Update a snapshot's name.
|
|
31
35
|
* @param orgName Name of the organization
|
|
@@ -36,7 +40,9 @@ export default class High5DesignSnapshots extends Base {
|
|
|
36
40
|
* @param name Name of the snapshot
|
|
37
41
|
* @returns The snapshot
|
|
38
42
|
*/
|
|
39
|
-
update(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string, name: string
|
|
43
|
+
update<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string, name: string, raw?: {
|
|
44
|
+
raw: R;
|
|
45
|
+
}): Promise<MaybeRaw<R, DesignSnapshot>>;
|
|
40
46
|
/**
|
|
41
47
|
* Delete a stream design's snapshot.
|
|
42
48
|
* @param orgName Name of the organization
|
|
@@ -45,7 +51,9 @@ export default class High5DesignSnapshots extends Base {
|
|
|
45
51
|
* @param streamId ID of the stream
|
|
46
52
|
* @param snapshotId ID of the snapshot
|
|
47
53
|
*/
|
|
48
|
-
delete(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string
|
|
54
|
+
delete<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string, raw?: {
|
|
55
|
+
raw: R;
|
|
56
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
49
57
|
/**
|
|
50
58
|
* Restore a stream's design to a certain snapshot.
|
|
51
59
|
*
|
|
@@ -57,6 +65,8 @@ export default class High5DesignSnapshots extends Base {
|
|
|
57
65
|
* @param streamId ID of the stream
|
|
58
66
|
* @param snapshotId ID of the snapshot
|
|
59
67
|
*/
|
|
60
|
-
restore(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string
|
|
68
|
+
restore<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, snapshotId: string, raw?: {
|
|
69
|
+
raw: R;
|
|
70
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
61
71
|
protected getEndpoint(endpoint: string): string;
|
|
62
72
|
}
|
|
@@ -27,7 +27,7 @@ class High5DesignSnapshots extends Base_1.default {
|
|
|
27
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
28
|
*/
|
|
29
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 }) {
|
|
30
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, eventName, streamId, content = false, { filters, sorting, limit = 25, page = 0 }, raw) {
|
|
31
31
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
32
32
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
33
33
|
});
|
|
@@ -37,7 +37,7 @@ class High5DesignSnapshots extends Base_1.default {
|
|
|
37
37
|
}, {
|
|
38
38
|
params: { content, limit, page },
|
|
39
39
|
});
|
|
40
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
40
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -49,10 +49,10 @@ class High5DesignSnapshots extends Base_1.default {
|
|
|
49
49
|
* @param name Name of the snapshot
|
|
50
50
|
* @returns The snapshot
|
|
51
51
|
*/
|
|
52
|
-
create(orgName, spaceName, eventName, streamId, name) {
|
|
52
|
+
create(orgName, spaceName, eventName, streamId, name, raw) {
|
|
53
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
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;
|
|
55
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -65,10 +65,10 @@ class High5DesignSnapshots extends Base_1.default {
|
|
|
65
65
|
* @param name Name of the snapshot
|
|
66
66
|
* @returns The snapshot
|
|
67
67
|
*/
|
|
68
|
-
update(orgName, spaceName, eventName, streamId, snapshotId, name) {
|
|
68
|
+
update(orgName, spaceName, eventName, streamId, snapshotId, name, raw) {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
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;
|
|
71
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
@@ -79,9 +79,10 @@ class High5DesignSnapshots extends Base_1.default {
|
|
|
79
79
|
* @param streamId ID of the stream
|
|
80
80
|
* @param snapshotId ID of the snapshot
|
|
81
81
|
*/
|
|
82
|
-
delete(orgName, spaceName, eventName, streamId, snapshotId) {
|
|
82
|
+
delete(orgName, spaceName, eventName, streamId, snapshotId, raw) {
|
|
83
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}`));
|
|
84
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}`));
|
|
85
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
/**
|
|
@@ -95,9 +96,10 @@ class High5DesignSnapshots extends Base_1.default {
|
|
|
95
96
|
* @param streamId ID of the stream
|
|
96
97
|
* @param snapshotId ID of the snapshot
|
|
97
98
|
*/
|
|
98
|
-
restore(orgName, spaceName, eventName, streamId, snapshotId) {
|
|
99
|
+
restore(orgName, spaceName, eventName, streamId, snapshotId, raw) {
|
|
99
100
|
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
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/snapshots/${snapshotId}/restore`));
|
|
102
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
101
103
|
});
|
|
102
104
|
}
|
|
103
105
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
|
|
3
3
|
import { SingleStreamPatchOrder, Stream, StreamPatchActive, StreamPatchOrder } from "../../../../../interfaces/high5/space/event/stream";
|
|
4
4
|
import { High5Design } from "./design";
|
|
@@ -16,11 +16,13 @@ export declare class High5Stream extends Base {
|
|
|
16
16
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
17
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
18
|
*/
|
|
19
|
-
searchStreams({ orgName, spaceName, eventName, filters, sorting, limit, page, }: SearchParams & {
|
|
19
|
+
searchStreams<R extends boolean = false>({ orgName, spaceName, eventName, filters, sorting, limit, page, }: SearchParams & {
|
|
20
20
|
orgName: string;
|
|
21
21
|
spaceName: string;
|
|
22
22
|
eventName: string;
|
|
23
|
-
}
|
|
23
|
+
}, raw?: {
|
|
24
|
+
raw: R;
|
|
25
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Stream>>>;
|
|
24
26
|
/**
|
|
25
27
|
* Retrieves a Stream by its ID.
|
|
26
28
|
* @param orgName Name of the organization
|
|
@@ -29,7 +31,9 @@ export declare class High5Stream extends Base {
|
|
|
29
31
|
* @param streamId ID of the stream
|
|
30
32
|
* @returns The requested stream
|
|
31
33
|
*/
|
|
32
|
-
getStream(orgName: string, spaceName: string, eventName: string, streamId: string
|
|
34
|
+
getStream<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, raw?: {
|
|
35
|
+
raw: R;
|
|
36
|
+
}): Promise<MaybeRaw<R, Stream>>;
|
|
33
37
|
/**
|
|
34
38
|
* Creates a new Stream for the specified Event.
|
|
35
39
|
* @param orgName Name of the organization
|
|
@@ -38,7 +42,9 @@ export declare class High5Stream extends Base {
|
|
|
38
42
|
* @param name Name for the new stream
|
|
39
43
|
* @returns The created stream
|
|
40
44
|
*/
|
|
41
|
-
createStream(orgName: string, spaceName: string, eventName: string, name: string
|
|
45
|
+
createStream<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, name: string, raw?: {
|
|
46
|
+
raw: R;
|
|
47
|
+
}): Promise<MaybeRaw<R, Stream>>;
|
|
42
48
|
/**
|
|
43
49
|
* Duplicate a Stream for the specified Event.
|
|
44
50
|
* @param orgName Name of the organization
|
|
@@ -48,7 +54,9 @@ export declare class High5Stream extends Base {
|
|
|
48
54
|
* @param sourceStreamId ID for the stream to duplicate
|
|
49
55
|
* @returns The created stream
|
|
50
56
|
*/
|
|
51
|
-
duplicateStream(orgName: string, spaceName: string, eventName: string, name: string, sourceStreamId: string
|
|
57
|
+
duplicateStream<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, name: string, sourceStreamId: string, raw?: {
|
|
58
|
+
raw: R;
|
|
59
|
+
}): Promise<MaybeRaw<R, Stream>>;
|
|
52
60
|
/**
|
|
53
61
|
* Patches the order of Streams for an Event.
|
|
54
62
|
* @param orgName Name of the organization
|
|
@@ -57,7 +65,9 @@ export declare class High5Stream extends Base {
|
|
|
57
65
|
* @param StreamPatchOrder List of all event streams with their new order
|
|
58
66
|
* @returns Array of updated Streams
|
|
59
67
|
*/
|
|
60
|
-
patchStreamOrderMulti(orgName: string, spaceName: string, eventName: string, streamList: StreamPatchOrder[]
|
|
68
|
+
patchStreamOrderMulti<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamList: StreamPatchOrder[], raw?: {
|
|
69
|
+
raw: R;
|
|
70
|
+
}): Promise<MaybeRaw<R, Stream[]>>;
|
|
61
71
|
/**
|
|
62
72
|
* Activate or deactivate a stream
|
|
63
73
|
* @param orgName Name of the organization
|
|
@@ -67,7 +77,9 @@ export declare class High5Stream extends Base {
|
|
|
67
77
|
* @param StreamPatchActive Object defining if stream should be active or inactive
|
|
68
78
|
* @returns Details of the updated stream
|
|
69
79
|
*/
|
|
70
|
-
patchStreamState(orgName: string, spaceName: string, eventName: string, streamId: string, streamPatchActive: StreamPatchActive
|
|
80
|
+
patchStreamState<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, streamPatchActive: StreamPatchActive, raw?: {
|
|
81
|
+
raw: R;
|
|
82
|
+
}): Promise<MaybeRaw<R, Stream>>;
|
|
71
83
|
/**
|
|
72
84
|
* Moves a Stream up or down in the existing Streams order.
|
|
73
85
|
* @param orgName Name of the organization
|
|
@@ -77,7 +89,9 @@ export declare class High5Stream extends Base {
|
|
|
77
89
|
* @param SingleStreamPatchOrder Object defining if stream should move up or down
|
|
78
90
|
* @returns Array of updated Streams
|
|
79
91
|
*/
|
|
80
|
-
patchStreamOrder(orgName: string, spaceName: string, eventName: string, streamId: string, singleStreamPatchOrder: SingleStreamPatchOrder
|
|
92
|
+
patchStreamOrder<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, singleStreamPatchOrder: SingleStreamPatchOrder, raw?: {
|
|
93
|
+
raw: R;
|
|
94
|
+
}): Promise<MaybeRaw<R, Stream[]>>;
|
|
81
95
|
/**
|
|
82
96
|
* Rename a stream
|
|
83
97
|
* @param orgName Name of the organization
|
|
@@ -87,7 +101,9 @@ export declare class High5Stream extends Base {
|
|
|
87
101
|
* @param name New name of the stream
|
|
88
102
|
* @returns Updated stream
|
|
89
103
|
*/
|
|
90
|
-
renameStream(orgName: string, spaceName: string, eventName: string, streamId: string, name: string
|
|
104
|
+
renameStream<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, name: string, raw?: {
|
|
105
|
+
raw: R;
|
|
106
|
+
}): Promise<MaybeRaw<R, Stream>>;
|
|
91
107
|
/**
|
|
92
108
|
* Moves a Stream to another event.
|
|
93
109
|
*
|
|
@@ -100,7 +116,9 @@ export declare class High5Stream extends Base {
|
|
|
100
116
|
* @param [order] (optional) Order the stream should have in the new event
|
|
101
117
|
* @returns Updated Stream
|
|
102
118
|
*/
|
|
103
|
-
moveStream(orgName: string, spaceName: string, eventName: string, streamId: string, newEventName: string, name?: string, order?: number
|
|
119
|
+
moveStream<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, newEventName: string, name?: string, order?: number, raw?: {
|
|
120
|
+
raw: R;
|
|
121
|
+
}): Promise<MaybeRaw<R, Stream>>;
|
|
104
122
|
/**
|
|
105
123
|
* Deletes a Stream by its ID.
|
|
106
124
|
* @param orgName Name of the organization
|
|
@@ -108,6 +126,8 @@ export declare class High5Stream extends Base {
|
|
|
108
126
|
* @param eventName Name of the event
|
|
109
127
|
* @param streamId ID of the stream
|
|
110
128
|
*/
|
|
111
|
-
deleteStream(orgName: string, spaceName: string, eventName: string, streamId: string
|
|
129
|
+
deleteStream<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, raw?: {
|
|
130
|
+
raw: R;
|
|
131
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
112
132
|
protected getEndpoint(endpoint: string): string;
|
|
113
133
|
}
|