hcloud-sdk 18.0.0 → 19.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 +86 -175
- package/lib/Hcloud.d.ts +18 -3
- package/lib/Hcloud.js +113 -21
- package/lib/helper/ErrorHelper.js +5 -2
- package/lib/helper/ValidationHelper.d.ts +6 -4
- package/lib/helper/ValidationHelper.js +30 -18
- package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
- package/lib/interfaces/agent/logging/index.d.ts +2 -0
- package/lib/interfaces/{fuse → agent/logging}/index.js +2 -3
- package/lib/interfaces/agent/logging/log-collector.d.ts +35 -0
- package/lib/interfaces/agent/logging/log-collector.js +2 -0
- package/lib/interfaces/agent/module/index.d.ts +7 -0
- package/lib/interfaces/agent/module/index.js +2 -0
- package/lib/interfaces/auditor/index.d.ts +0 -1
- package/lib/interfaces/auditor/index.js +0 -1
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/cosmo/asset/index.d.ts +40 -9
- package/lib/interfaces/cosmo/asset/index.js +9 -1
- package/lib/interfaces/cosmo/comment/index.d.ts +4 -1
- package/lib/interfaces/cosmo/event/index.d.ts +34 -5
- package/lib/interfaces/cosmo/event/index.js +16 -2
- package/lib/interfaces/cosmo/share/index.d.ts +89 -7
- package/lib/interfaces/cosmo/share/index.js +21 -0
- package/lib/interfaces/cosmo/space/index.d.ts +6 -0
- package/lib/interfaces/cosmo/stats/index.d.ts +11 -0
- package/lib/interfaces/cosmo/stats/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +2 -1
- package/lib/interfaces/global/Products.d.ts +0 -1
- package/lib/interfaces/global/Products.js +0 -1
- package/lib/interfaces/global/Views.d.ts +0 -1
- package/lib/interfaces/global/Views.js +0 -1
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +1 -0
- package/lib/interfaces/high5/space/job/index.d.ts +64 -19
- package/lib/interfaces/high5/space/job/index.js +9 -6
- package/lib/interfaces/high5/wave/dependentInputs.d.ts +42 -0
- package/lib/interfaces/high5/wave/dependentInputs.js +144 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.d.ts +22 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.js +220 -0
- package/lib/interfaces/idp/index.d.ts +3 -3
- package/lib/interfaces/idp/index.js +3 -3
- package/lib/interfaces/idp/oauth/device.d.ts +18 -0
- package/lib/interfaces/idp/oauth/device.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +17 -4
- package/lib/interfaces/idp/organization/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/index.js +1 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
- package/lib/interfaces/idp/user/Message.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -9
- package/lib/interfaces/idp/user/Scopes.js +0 -12
- package/lib/interfaces/idp/user/index.d.ts +3 -0
- package/lib/interfaces/mailer/index.d.ts +20 -1
- package/lib/interfaces/mailer/index.js +14 -2
- package/lib/interfaces/nats/index.d.ts +30 -32
- package/lib/interfaces/nats/index.js +103 -117
- package/lib/interfaces/shorts/index.d.ts +7 -0
- package/lib/interfaces/shorts/index.js +6 -0
- package/lib/service/agent/bundle/dev/index.js +4 -1
- package/lib/service/agent/bundle/index.js +4 -1
- package/lib/service/agent/context/index.js +4 -1
- package/lib/service/agent/index.d.ts +6 -0
- package/lib/service/agent/index.js +18 -1
- package/lib/service/agent/installer/index.js +4 -1
- package/lib/service/agent/logging/index.d.ts +69 -0
- package/lib/service/agent/logging/index.js +117 -0
- package/lib/service/agent/module/index.d.ts +36 -0
- package/lib/service/agent/module/index.js +65 -0
- package/lib/service/auditor/index.js +4 -1
- package/lib/service/auditor/internal/index.js +4 -1
- package/lib/service/bouncer/features/index.js +4 -1
- package/lib/service/bouncer/index.js +5 -2
- package/lib/service/cosmo/asset/index.d.ts +49 -3
- package/lib/service/cosmo/asset/index.js +111 -5
- package/lib/service/cosmo/comment/index.d.ts +7 -36
- package/lib/service/cosmo/comment/index.js +18 -43
- package/lib/service/cosmo/event/index.js +4 -1
- package/lib/service/cosmo/folder/index.js +4 -1
- package/lib/service/cosmo/index.d.ts +3 -0
- package/lib/service/cosmo/index.js +11 -1
- package/lib/service/cosmo/internal/index.js +4 -1
- package/lib/service/cosmo/internal/space/index.js +4 -1
- package/lib/service/cosmo/location/index.js +4 -1
- package/lib/service/cosmo/namespace/index.d.ts +15 -1
- package/lib/service/cosmo/namespace/index.js +21 -1
- package/lib/service/cosmo/organization/index.js +4 -1
- package/lib/service/cosmo/permissions/index.js +4 -1
- package/lib/service/cosmo/production/index.js +4 -1
- package/lib/service/cosmo/share/index.d.ts +37 -29
- package/lib/service/cosmo/share/index.js +47 -35
- package/lib/service/cosmo/space/index.d.ts +28 -1
- package/lib/service/cosmo/space/index.js +45 -1
- package/lib/service/cosmo/stats/index.d.ts +35 -0
- package/lib/service/cosmo/stats/index.js +58 -0
- package/lib/service/cosmo/tag/index.js +4 -1
- package/lib/service/dali/DaliAvatar.d.ts +0 -6
- package/lib/service/dali/DaliAvatar.js +4 -11
- package/lib/service/dali/avatar/DaliCosmoSpace.js +4 -1
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +2 -1
- package/lib/service/dali/avatar/DaliHigh5Pool.js +5 -2
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +2 -1
- package/lib/service/dali/avatar/DaliHigh5Space.js +5 -2
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +2 -1
- package/lib/service/dali/avatar/DaliOAuthApp.js +5 -2
- package/lib/service/dali/avatar/DaliOrganization.d.ts +2 -1
- package/lib/service/dali/avatar/DaliOrganization.js +5 -2
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +1 -1
- package/lib/service/dali/avatar/DaliServiceAccount.js +6 -3
- package/lib/service/dali/avatar/DaliTeam.d.ts +2 -1
- package/lib/service/dali/avatar/DaliTeam.js +5 -2
- package/lib/service/dali/avatar/DaliUser.d.ts +2 -1
- package/lib/service/dali/avatar/DaliUser.js +5 -2
- package/lib/service/dali/index.js +4 -1
- package/lib/service/high5/execution/index.js +4 -1
- package/lib/service/high5/execution/log/index.js +4 -1
- package/lib/service/high5/execution/status/index.js +4 -1
- package/lib/service/high5/index.js +4 -1
- package/lib/service/high5/internal/index.js +4 -1
- package/lib/service/high5/internal/space/index.js +4 -1
- package/lib/service/high5/internal/space/job/index.js +4 -1
- package/lib/service/high5/internal/space/job/log/index.js +4 -1
- package/lib/service/high5/joinToken/index.js +4 -1
- package/lib/service/high5/space/database/document/array/index.js +4 -1
- package/lib/service/high5/space/database/document/index.js +4 -1
- package/lib/service/high5/space/database/document/number/index.js +4 -1
- package/lib/service/high5/space/database/index.js +4 -1
- package/lib/service/high5/space/event/index.js +4 -1
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +4 -1
- package/lib/service/high5/space/event/stream/design/index.js +6 -3
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +4 -1
- package/lib/service/high5/space/event/stream/index.js +4 -1
- package/lib/service/high5/space/execution/index.js +4 -1
- package/lib/service/high5/space/execution/log/index.js +4 -1
- package/lib/service/high5/space/execution/status/index.js +4 -1
- package/lib/service/high5/space/index.d.ts +10 -0
- package/lib/service/high5/space/index.js +25 -5
- package/lib/service/high5/space/job/index.js +4 -1
- package/lib/service/high5/space/job/log/index.js +4 -1
- package/lib/service/high5/space/node/index.js +4 -1
- package/lib/service/high5/space/pool/index.d.ts +11 -0
- package/lib/service/high5/space/pool/index.js +22 -1
- package/lib/service/high5/space/secret/index.js +4 -1
- package/lib/service/high5/space/stat/index.js +4 -1
- package/lib/service/high5/space/wave/index.js +4 -1
- package/lib/service/high5/space/webhook/index.js +4 -1
- package/lib/service/high5/space/webhook/log/index.js +4 -1
- package/lib/service/high5/stat/index.js +4 -1
- package/lib/service/high5/wave/index.js +4 -1
- package/lib/service/high5/wave/s3/index.js +5 -2
- package/lib/service/idp/guest/index.js +4 -1
- package/lib/service/idp/index.js +4 -1
- package/lib/service/idp/internal/index.js +4 -1
- package/lib/service/idp/oauth/device.d.ts +131 -0
- package/lib/service/idp/oauth/device.js +177 -0
- package/lib/service/idp/oauth/index.d.ts +3 -0
- package/lib/service/idp/oauth/index.js +11 -1
- package/lib/service/idp/organization/index.d.ts +9 -0
- package/lib/service/idp/organization/index.js +22 -3
- package/lib/service/idp/organization/license/index.js +4 -1
- package/lib/service/idp/organization/member/index.js +5 -2
- package/lib/service/idp/organization/member/invitations/index.d.ts +19 -0
- package/lib/service/idp/organization/member/invitations/index.js +23 -1
- package/lib/service/idp/organization/service-accounts/index.d.ts +11 -1
- package/lib/service/idp/organization/service-accounts/index.js +22 -2
- package/lib/service/idp/organization/settings/domain/index.js +4 -1
- package/lib/service/idp/organization/settings/domain/saml/index.js +4 -1
- package/lib/service/idp/organization/settings/index.js +4 -1
- package/lib/service/idp/organization/settings/oauth/index.d.ts +10 -0
- package/lib/service/idp/organization/settings/oauth/index.js +21 -1
- package/lib/service/idp/organization/stat/index.js +4 -1
- package/lib/service/idp/organization/team/index.d.ts +10 -0
- package/lib/service/idp/organization/team/index.js +21 -1
- package/lib/service/idp/registration/index.js +4 -1
- package/lib/service/idp/user/index.d.ts +8 -0
- package/lib/service/idp/user/index.js +20 -3
- package/lib/service/idp/user/license/index.js +4 -1
- package/lib/service/idp/user/message/index.d.ts +1 -0
- package/lib/service/idp/user/message/index.js +4 -1
- package/lib/service/idp/user/password/index.js +4 -1
- package/lib/service/idp/user/settings/connections/index.js +4 -1
- package/lib/service/idp/user/settings/general/index.js +4 -1
- package/lib/service/idp/user/settings/index.js +4 -1
- package/lib/service/idp/user/settings/notifications/index.js +4 -1
- package/lib/service/idp/user/settings/oauthApps/index.js +4 -1
- package/lib/service/idp/user/settings/pats/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +4 -1
- package/lib/service/mailer/index.js +5 -2
- package/lib/service/mailer/internal/index.d.ts +2 -2
- package/lib/service/mailer/internal/index.js +5 -2
- package/lib/service/mothership/index.js +4 -1
- package/lib/service/nats/index.d.ts +7 -0
- package/lib/service/nats/index.js +19 -1
- package/lib/service/shorts/index.js +4 -1
- package/lib/service/shorts/internal/index.d.ts +6 -3
- package/lib/service/shorts/internal/index.js +20 -6
- package/lib/utils/bouncer/features/Provider.js +0 -1
- package/package.json +2 -2
- package/lib/interfaces/fuse/index.d.ts +0 -3
- package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +0 -38
- package/lib/interfaces/fuse/space/cronjob/Cronjob.js +0 -8
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +0 -16
- package/lib/interfaces/fuse/space/index.d.ts +0 -22
- package/lib/interfaces/fuse/space/index.js +0 -11
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -32
- package/lib/service/dali/avatar/DaliFuseSpace.js +0 -59
- package/lib/service/fuse/index.d.ts +0 -20
- package/lib/service/fuse/index.js +0 -48
- package/lib/service/fuse/internal/index.d.ts +0 -10
- package/lib/service/fuse/internal/index.js +0 -32
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +0 -7
- package/lib/service/fuse/internal/space/cronjob/index.js +0 -17
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +0 -17
- package/lib/service/fuse/internal/space/cronjob/log/index.js +0 -34
- package/lib/service/fuse/internal/space/index.d.ts +0 -26
- package/lib/service/fuse/internal/space/index.js +0 -51
- package/lib/service/fuse/space/cronjob/index.d.ts +0 -145
- package/lib/service/fuse/space/cronjob/index.js +0 -201
- package/lib/service/fuse/space/cronjob/log/index.d.ts +0 -35
- package/lib/service/fuse/space/cronjob/log/index.js +0 -58
- package/lib/service/fuse/space/index.d.ts +0 -97
- package/lib/service/fuse/space/index.js +0 -153
- /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/cloudwatch.js} +0 -0
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5SpaceExecutionLogs = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../../../helper/searchFilter");
|
|
16
19
|
class High5SpaceExecutionLogs extends Base_1.default {
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5SpaceExecutionStates = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../Base"));
|
|
14
17
|
class High5SpaceExecutionStates extends Base_1.default {
|
|
15
18
|
constructor(options, axios) {
|
|
16
19
|
super(options, axios);
|
|
@@ -148,5 +148,15 @@ export declare class High5Space extends Base {
|
|
|
148
148
|
enableDev<R extends boolean = false>(orgName: string, spaceName: string, enableDev: boolean, raw?: {
|
|
149
149
|
raw: R;
|
|
150
150
|
}): Promise<MaybeRaw<R, Space>>;
|
|
151
|
+
/**
|
|
152
|
+
* Updates the avatar of the specified High5 space
|
|
153
|
+
* @param orgName Name of the organization
|
|
154
|
+
* @param spaceName Name of the space
|
|
155
|
+
* @param file Image as Javascript File
|
|
156
|
+
* @returns Space details with updated avatar
|
|
157
|
+
*/
|
|
158
|
+
updateAvatar<R extends boolean = false>(orgName: string, spaceName: string, file: File, raw?: {
|
|
159
|
+
raw: R;
|
|
160
|
+
}): Promise<MaybeRaw<R, Space>>;
|
|
151
161
|
protected getEndpoint(endpoint: string): string;
|
|
152
162
|
}
|
|
@@ -8,20 +8,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5Space = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../helper/searchFilter");
|
|
16
19
|
const database_1 = require("./database");
|
|
17
20
|
const event_1 = require("./event");
|
|
18
21
|
const execution_1 = require("./execution");
|
|
19
22
|
const job_1 = require("./job");
|
|
20
|
-
const node_1 = require("./node");
|
|
21
|
-
const pool_1 = require("./pool");
|
|
22
|
-
const secret_1 = require("./secret");
|
|
23
|
+
const node_1 = __importDefault(require("./node"));
|
|
24
|
+
const pool_1 = __importDefault(require("./pool"));
|
|
25
|
+
const secret_1 = __importDefault(require("./secret"));
|
|
23
26
|
const stat_1 = require("./stat");
|
|
24
|
-
const wave_1 = require("./wave");
|
|
27
|
+
const wave_1 = __importDefault(require("./wave"));
|
|
25
28
|
const webhook_1 = require("./webhook");
|
|
26
29
|
class High5Space extends Base_1.default {
|
|
27
30
|
get event() {
|
|
@@ -243,6 +246,23 @@ class High5Space extends Base_1.default {
|
|
|
243
246
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
244
247
|
});
|
|
245
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Updates the avatar of the specified High5 space
|
|
251
|
+
* @param orgName Name of the organization
|
|
252
|
+
* @param spaceName Name of the space
|
|
253
|
+
* @param file Image as Javascript File
|
|
254
|
+
* @returns Space details with updated avatar
|
|
255
|
+
*/
|
|
256
|
+
updateAvatar(orgName, spaceName, file, raw) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const data = new FormData();
|
|
259
|
+
data.append("avatar", file);
|
|
260
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/avatar`), data, {
|
|
261
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
262
|
+
});
|
|
263
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
246
266
|
getEndpoint(endpoint) {
|
|
247
267
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
248
268
|
}
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5Job = void 0;
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
19
|
const log_1 = require("../../internal/space/job/log");
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5JobLog = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../../../helper/searchFilter");
|
|
16
19
|
class High5JobLog extends Base_1.default {
|
|
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Base_1 = require("../../../../Base");
|
|
15
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
13
16
|
class High5Node extends Base_1.default {
|
|
14
17
|
/**
|
|
15
18
|
* Retrieves all Nodes for the specified stream.
|
|
@@ -109,5 +109,16 @@ export default class High5Pool extends Base {
|
|
|
109
109
|
}, raw?: {
|
|
110
110
|
raw: R;
|
|
111
111
|
}): Promise<MaybeRaw<R, PaginatedResponse<OrganizationMember>>>;
|
|
112
|
+
/**
|
|
113
|
+
* Updates the avatar of the specified pool
|
|
114
|
+
* @param orgName Name of the organization
|
|
115
|
+
* @param spaceName Name of the space
|
|
116
|
+
* @param name Name of the pool
|
|
117
|
+
* @param file Image as Javascript File
|
|
118
|
+
* @returns Pool details with updated avatar
|
|
119
|
+
*/
|
|
120
|
+
updateAvatar<R extends boolean = false>(orgName: string, spaceName: string, name: string, file: File, raw?: {
|
|
121
|
+
raw: R;
|
|
122
|
+
}): Promise<MaybeRaw<R, Pool>>;
|
|
112
123
|
protected getEndpoint(endpoint: string): string;
|
|
113
124
|
}
|
|
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Base_1 = require("../../../../Base");
|
|
15
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
13
16
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
14
17
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
15
18
|
class High5Pool extends Base_1.default {
|
|
@@ -165,6 +168,24 @@ class High5Pool extends Base_1.default {
|
|
|
165
168
|
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));
|
|
166
169
|
});
|
|
167
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Updates the avatar of the specified pool
|
|
173
|
+
* @param orgName Name of the organization
|
|
174
|
+
* @param spaceName Name of the space
|
|
175
|
+
* @param name Name of the pool
|
|
176
|
+
* @param file Image as Javascript File
|
|
177
|
+
* @returns Pool details with updated avatar
|
|
178
|
+
*/
|
|
179
|
+
updateAvatar(orgName, spaceName, name, file, raw) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
const data = new FormData();
|
|
182
|
+
data.append("avatar", file);
|
|
183
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${name}/avatar`), data, {
|
|
184
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
185
|
+
});
|
|
186
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
168
189
|
getEndpoint(endpoint) {
|
|
169
190
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
170
191
|
}
|
|
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Base_1 = require("../../../../Base");
|
|
15
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
13
16
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
14
17
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
15
18
|
class High5Secret extends Base_1.default {
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5SpaceStat = void 0;
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
14
17
|
class High5SpaceStat extends Base_1.default {
|
|
15
18
|
/**
|
|
16
19
|
* Retrieves usage statistics for a specific space.
|
|
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Base_1 = require("../../../../Base");
|
|
15
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
13
16
|
class High5Wave extends Base_1.default {
|
|
14
17
|
/**
|
|
15
18
|
* Patch wave engine version for a space
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5Webhook = void 0;
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
19
|
const log_1 = require("./log");
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5WebhookLog = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
18
|
class High5WebhookLog extends Base_1.default {
|
|
16
19
|
/**
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5OrgStat = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
14
17
|
class High5OrgStat extends Base_1.default {
|
|
15
18
|
/**
|
|
16
19
|
* Retrieves usage statistics for a specific organization.
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.High5Wave = void 0;
|
|
4
|
-
const Base_1 = require("../../../Base");
|
|
7
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
5
8
|
const s3_1 = require("./s3");
|
|
6
9
|
class High5Wave extends Base_1.default {
|
|
7
10
|
constructor(options, axios) {
|
|
@@ -8,11 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.S3 = void 0;
|
|
13
|
-
const axios_1 = require("axios");
|
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
|
14
17
|
const package_json_1 = require("../../../../../package.json");
|
|
15
|
-
const Base_1 = require("../../../../Base");
|
|
18
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
16
19
|
const axios_2 = require("../../../../interfaces/axios");
|
|
17
20
|
const sdkVersion = "hcloud-sdk-js/v" + package_json_1.version;
|
|
18
21
|
/**
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.IdpGuest = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
14
17
|
class IdpGuest extends Base_1.default {
|
|
15
18
|
/**
|
|
16
19
|
* Creates a new guest user account.
|
package/lib/service/idp/index.js
CHANGED
|
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Base_1 = require("../../Base");
|
|
15
|
+
const Base_1 = __importDefault(require("../../Base"));
|
|
13
16
|
const guest_1 = require("./guest");
|
|
14
17
|
const internal_1 = require("./internal");
|
|
15
18
|
const oauth_1 = require("./oauth");
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.IdpInternal = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
14
17
|
class IdpInternal extends Base_1.default {
|
|
15
18
|
/**
|
|
16
19
|
* Creates an agent user for an organization.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { OAuthAppPublicInfo, Scope } from "../../../interfaces/idp";
|
|
3
|
+
import { OAuthDeviceAuthorizationResponse, OAuthDeviceTokenResponse } from "../../../interfaces/idp/oauth/device";
|
|
4
|
+
/**
|
|
5
|
+
* IdpOAuthDevice
|
|
6
|
+
*
|
|
7
|
+
* Client wrapper for OAuth 2.0 Device Authorization Grant (RFC 8628).
|
|
8
|
+
*
|
|
9
|
+
* This class provides methods to:
|
|
10
|
+
* - Initiate a device authorization request
|
|
11
|
+
* - Validate a user-provided code
|
|
12
|
+
* - Approve or reject a device authorization
|
|
13
|
+
* - Exchange a device code for an access token
|
|
14
|
+
*
|
|
15
|
+
* All methods support returning either the parsed response body or the raw Axios
|
|
16
|
+
* response via the `{ raw: true }` option.
|
|
17
|
+
*
|
|
18
|
+
* @extends Base
|
|
19
|
+
*/
|
|
20
|
+
export default class IdpOAuthDevice extends Base {
|
|
21
|
+
/**
|
|
22
|
+
* Initiates the OAuth Device Authorization flow.
|
|
23
|
+
*
|
|
24
|
+
* This endpoint returns a `device_code` and `user_code` which should be:
|
|
25
|
+
* - Displayed to the user on the device
|
|
26
|
+
* - Entered by the user on a separate verification page
|
|
27
|
+
*
|
|
28
|
+
* @typeParam R - Whether to return the raw Axios response
|
|
29
|
+
*
|
|
30
|
+
* @param clientId - OAuth client identifier
|
|
31
|
+
* @param scope - Optional OAuth scope string (space-delimited)
|
|
32
|
+
* @param raw - Optional flag to return the raw Axios response
|
|
33
|
+
*
|
|
34
|
+
* @returns Device authorization response or raw Axios response
|
|
35
|
+
*/
|
|
36
|
+
authorize<R extends boolean = false>(clientId: string, scope?: string, raw?: {
|
|
37
|
+
raw: R;
|
|
38
|
+
}): Promise<MaybeRaw<R, OAuthDeviceAuthorizationResponse>>;
|
|
39
|
+
/**
|
|
40
|
+
* Validates a user-entered device code.
|
|
41
|
+
*
|
|
42
|
+
* This is typically called by the authorization UI after the user enters
|
|
43
|
+
* the `user_code`. It returns public information about the requesting
|
|
44
|
+
* application and the requested scopes.
|
|
45
|
+
*
|
|
46
|
+
* @typeParam R - Whether to return the raw Axios response
|
|
47
|
+
*
|
|
48
|
+
* @param clientId - OAuth client identifier
|
|
49
|
+
* @param userCode - User-facing verification code
|
|
50
|
+
* @param raw - Optional flag to return the raw Axios response
|
|
51
|
+
*
|
|
52
|
+
* @returns Application public info and requested scopes
|
|
53
|
+
*/
|
|
54
|
+
validateUserCode<R extends boolean = false>(clientId: string, userCode: string, raw?: {
|
|
55
|
+
raw: R;
|
|
56
|
+
}): Promise<MaybeRaw<R, {
|
|
57
|
+
app: OAuthAppPublicInfo;
|
|
58
|
+
scopes: Scope[];
|
|
59
|
+
}>>;
|
|
60
|
+
/**
|
|
61
|
+
* Approves or rejects a device authorization request.
|
|
62
|
+
*
|
|
63
|
+
* ⚠️ This endpoint requires an `Authorization` header to be set
|
|
64
|
+
* on the HCloud instance (e.g., a logged-in user session or access token).
|
|
65
|
+
*
|
|
66
|
+
* @typeParam R - Whether to return the raw Axios response
|
|
67
|
+
*
|
|
68
|
+
* @param clientId - OAuth client identifier
|
|
69
|
+
* @param userCode - User-facing verification code
|
|
70
|
+
* @param status - Authorization decision (`APPROVED` or `REJECTED`)
|
|
71
|
+
* @param raw - Optional flag to return the raw Axios response
|
|
72
|
+
*
|
|
73
|
+
* @throws Error if the Authorization header is not set
|
|
74
|
+
*
|
|
75
|
+
* @returns Void response or raw Axios response
|
|
76
|
+
*/
|
|
77
|
+
decide<R extends boolean = false>(clientId: string, userCode: string, status: "APPROVED" | "REJECTED", raw?: {
|
|
78
|
+
raw: R;
|
|
79
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
80
|
+
/**
|
|
81
|
+
* Approves a device authorization request.
|
|
82
|
+
*
|
|
83
|
+
* Shorthand for {@link decide} with status `"APPROVED"`.
|
|
84
|
+
*
|
|
85
|
+
* @typeParam R - Whether to return the raw Axios response
|
|
86
|
+
*
|
|
87
|
+
* @param clientId - OAuth client identifier
|
|
88
|
+
* @param userCode - User-facing verification code
|
|
89
|
+
* @param raw - Optional flag to return the raw Axios response
|
|
90
|
+
*
|
|
91
|
+
* @returns Void response or raw Axios response
|
|
92
|
+
*/
|
|
93
|
+
approve<R extends boolean = false>(clientId: string, userCode: string, raw?: {
|
|
94
|
+
raw: R;
|
|
95
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
96
|
+
/**
|
|
97
|
+
* Rejects a device authorization request.
|
|
98
|
+
*
|
|
99
|
+
* Shorthand for {@link decide} with status `"REJECTED"`.
|
|
100
|
+
*
|
|
101
|
+
* @typeParam R - Whether to return the raw Axios response
|
|
102
|
+
*
|
|
103
|
+
* @param clientId - OAuth client identifier
|
|
104
|
+
* @param userCode - User-facing verification code
|
|
105
|
+
* @param raw - Optional flag to return the raw Axios response
|
|
106
|
+
*
|
|
107
|
+
* @returns Void response or raw Axios response
|
|
108
|
+
*/
|
|
109
|
+
reject<R extends boolean = false>(clientId: string, userCode: string, raw?: {
|
|
110
|
+
raw: R;
|
|
111
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
112
|
+
/**
|
|
113
|
+
* Exchanges a device code for an access token.
|
|
114
|
+
*
|
|
115
|
+
* This endpoint may return HTTP 400 responses for non-fatal OAuth states
|
|
116
|
+
* such as `authorization_pending` or `slow_down`. These responses are
|
|
117
|
+
* returned normally and should be handled by the caller.
|
|
118
|
+
*
|
|
119
|
+
* @typeParam R - Whether to return the raw Axios response
|
|
120
|
+
*
|
|
121
|
+
* @param clientId - OAuth client identifier
|
|
122
|
+
* @param deviceCode - Device code obtained from {@link authorize}
|
|
123
|
+
* @param raw - Optional flag to return the raw Axios response
|
|
124
|
+
*
|
|
125
|
+
* @returns Device token response or raw Axios response
|
|
126
|
+
*/
|
|
127
|
+
token<R extends boolean = false>(clientId: string, deviceCode: string, raw?: {
|
|
128
|
+
raw: R;
|
|
129
|
+
}): Promise<MaybeRaw<R, OAuthDeviceTokenResponse>>;
|
|
130
|
+
protected getEndpoint(endpoint: string): string;
|
|
131
|
+
}
|