hcloud-sdk 17.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 +87 -76
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +24 -6
- package/lib/Hcloud.js +127 -24
- package/lib/helper/ErrorHelper.js +5 -2
- package/lib/helper/ValidationHelper.d.ts +14 -4
- package/lib/helper/ValidationHelper.js +71 -11
- package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
- package/lib/interfaces/agent/logging/index.d.ts +2 -0
- package/lib/interfaces/{friday → agent/logging}/index.js +2 -3
- package/lib/interfaces/agent/logging/log-collector.d.ts +35 -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 +13 -3
- package/lib/interfaces/auditor/index.js +9 -2
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/cosmo/asset/index.d.ts +216 -0
- package/lib/interfaces/cosmo/asset/index.js +90 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +41 -0
- package/lib/interfaces/cosmo/comment/index.js +8 -0
- package/lib/interfaces/cosmo/event/index.d.ts +60 -0
- package/lib/interfaces/cosmo/event/index.js +31 -0
- package/lib/interfaces/cosmo/location/index.d.ts +4 -0
- package/lib/interfaces/cosmo/location/index.js +2 -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 +110 -0
- package/lib/interfaces/cosmo/share/index.js +23 -0
- package/lib/interfaces/cosmo/space/index.d.ts +31 -0
- package/lib/interfaces/cosmo/space/index.js +2 -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 +13 -0
- package/lib/interfaces/cosmo/tag/tag.js +2 -0
- package/lib/interfaces/global/Products.d.ts +2 -3
- package/lib/interfaces/global/Products.js +1 -2
- package/lib/interfaces/global/Views.d.ts +0 -1
- package/lib/interfaces/global/Views.js +0 -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 +10 -2
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +3 -1
- package/lib/interfaces/{fuse/space/cronjob/CronjobLog.d.ts → high5/space/job/JobLog.d.ts} +3 -3
- package/lib/interfaces/high5/space/job/JobLog.js +2 -0
- package/lib/interfaces/high5/space/job/index.d.ts +83 -0
- package/lib/interfaces/high5/space/job/index.js +11 -0
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- 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 +19 -5
- package/lib/interfaces/idp/organization/index.d.ts +2 -0
- package/lib/interfaces/idp/organization/index.js +2 -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/settings/oauthApp/index.d.ts +4 -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 +22 -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 -15
- package/lib/interfaces/idp/user/Scopes.js +0 -21
- package/lib/interfaces/idp/user/index.d.ts +5 -1
- package/lib/interfaces/mailer/index.d.ts +50 -2
- package/lib/interfaces/mailer/index.js +100 -2
- 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 +79 -51
- package/lib/interfaces/nats/index.js +140 -125
- package/lib/interfaces/shorts/index.d.ts +17 -0
- package/lib/interfaces/shorts/index.js +8 -0
- package/lib/service/agent/bundle/dev/index.d.ts +16 -6
- package/lib/service/agent/bundle/dev/index.js +16 -11
- package/lib/service/agent/bundle/index.d.ts +10 -4
- package/lib/service/agent/bundle/index.js +10 -7
- package/lib/service/agent/context/index.d.ts +22 -8
- package/lib/service/agent/context/index.js +19 -15
- 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.d.ts +8 -4
- package/lib/service/auditor/index.js +9 -6
- package/lib/service/auditor/internal/index.d.ts +27 -3
- package/lib/service/auditor/internal/index.js +38 -6
- package/lib/service/bouncer/features/index.d.ts +4 -2
- package/lib/service/bouncer/features/index.js +6 -3
- package/lib/service/bouncer/index.js +5 -2
- package/lib/service/cosmo/asset/index.d.ts +265 -0
- package/lib/service/cosmo/asset/index.js +420 -0
- package/lib/service/cosmo/comment/index.d.ts +93 -0
- package/lib/service/cosmo/comment/index.js +136 -0
- package/lib/service/cosmo/event/index.d.ts +23 -0
- package/lib/service/cosmo/event/index.js +43 -0
- package/lib/service/cosmo/folder/index.d.ts +27 -0
- package/lib/service/cosmo/folder/index.js +50 -0
- package/lib/service/cosmo/index.d.ts +52 -0
- package/lib/service/cosmo/index.js +129 -0
- package/lib/service/cosmo/internal/index.d.ts +7 -0
- package/lib/service/cosmo/internal/index.js +20 -0
- package/lib/service/cosmo/internal/space/index.d.ts +15 -0
- package/lib/service/cosmo/internal/space/index.js +37 -0
- package/lib/service/cosmo/location/index.d.ts +40 -0
- package/lib/service/cosmo/location/index.js +66 -0
- package/lib/service/cosmo/namespace/index.d.ts +56 -0
- package/lib/service/cosmo/namespace/index.js +85 -0
- package/lib/service/cosmo/organization/index.d.ts +47 -0
- package/lib/service/cosmo/organization/index.js +67 -0
- package/lib/service/cosmo/permissions/index.d.ts +131 -0
- package/lib/service/cosmo/permissions/index.js +184 -0
- package/lib/service/cosmo/production/index.d.ts +26 -0
- package/lib/service/cosmo/production/index.js +48 -0
- package/lib/service/cosmo/share/index.d.ts +169 -0
- package/lib/service/cosmo/share/index.js +227 -0
- package/lib/service/cosmo/space/index.d.ts +131 -0
- package/lib/service/cosmo/space/index.js +190 -0
- 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.d.ts +67 -0
- package/lib/service/cosmo/tag/index.js +96 -0
- package/lib/service/dali/DaliAvatar.d.ts +0 -6
- package/lib/service/dali/DaliAvatar.js +4 -11
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliCosmoSpace.js +12 -8
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +11 -4
- package/lib/service/dali/avatar/DaliHigh5Pool.js +12 -8
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +11 -4
- package/lib/service/dali/avatar/DaliHigh5Space.js +12 -8
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +11 -4
- package/lib/service/dali/avatar/DaliOAuthApp.js +12 -8
- package/lib/service/dali/avatar/DaliOrganization.d.ts +11 -4
- package/lib/service/dali/avatar/DaliOrganization.js +12 -8
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
- package/lib/service/dali/avatar/DaliServiceAccount.js +12 -8
- package/lib/service/dali/avatar/DaliTeam.d.ts +11 -4
- package/lib/service/dali/avatar/DaliTeam.js +12 -8
- package/lib/service/dali/avatar/DaliUser.d.ts +11 -4
- package/lib/service/dali/avatar/DaliUser.js +12 -8
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +6 -6
- package/lib/service/high5/execution/index.d.ts +4 -2
- package/lib/service/high5/execution/index.js +7 -3
- package/lib/service/high5/execution/log/index.js +4 -1
- package/lib/service/high5/execution/status/index.d.ts +5 -3
- package/lib/service/high5/execution/status/index.js +7 -4
- package/lib/service/high5/index.d.ts +7 -2
- package/lib/service/high5/index.js +13 -3
- package/lib/service/high5/internal/index.d.ts +4 -2
- package/lib/service/high5/internal/index.js +7 -3
- package/lib/service/high5/internal/space/index.d.ts +10 -3
- package/lib/service/high5/internal/space/index.js +17 -5
- package/lib/service/high5/internal/space/job/index.d.ts +7 -0
- package/lib/service/high5/internal/space/job/index.js +20 -0
- package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
- package/lib/service/{fuse/internal/space/cronjob → high5/internal/space/job}/log/index.js +13 -10
- package/lib/service/high5/joinToken/index.d.ts +14 -6
- package/lib/service/high5/joinToken/index.js +14 -10
- package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
- package/lib/service/high5/space/database/document/array/index.js +105 -0
- package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
- package/lib/service/{friday → high5}/space/database/document/index.js +35 -17
- package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
- package/lib/service/high5/space/database/document/number/index.js +80 -0
- package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
- package/lib/service/{friday → high5}/space/database/index.js +22 -18
- package/lib/service/high5/space/event/index.d.ts +17 -7
- package/lib/service/high5/space/event/index.js +16 -12
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +6 -3
- package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
- package/lib/service/high5/space/event/stream/design/index.js +13 -9
- 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 +16 -11
- package/lib/service/high5/space/event/stream/index.d.ts +32 -12
- package/lib/service/high5/space/event/stream/index.js +26 -22
- package/lib/service/high5/space/execution/index.d.ts +19 -7
- package/lib/service/high5/space/execution/index.js +21 -13
- package/lib/service/high5/space/execution/log/index.d.ts +8 -4
- package/lib/service/high5/space/execution/log/index.js +9 -6
- package/lib/service/high5/space/execution/status/index.d.ts +7 -3
- package/lib/service/high5/space/execution/status/index.js +8 -5
- package/lib/service/high5/space/index.d.ts +53 -14
- package/lib/service/high5/space/index.js +70 -28
- package/lib/service/{fuse/space/cronjob → high5/space/job}/index.d.ts +57 -35
- package/lib/service/{fuse/space/cronjob → high5/space/job}/index.js +88 -87
- package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.d.ts +15 -11
- package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.js +19 -16
- package/lib/service/high5/space/node/index.d.ts +20 -8
- package/lib/service/high5/space/node/index.js +18 -14
- package/lib/service/high5/space/pool/index.d.ts +38 -11
- package/lib/service/high5/space/pool/index.js +41 -19
- package/lib/service/high5/space/secret/index.d.ts +17 -7
- package/lib/service/high5/space/secret/index.js +16 -12
- package/lib/service/high5/space/stat/index.d.ts +12 -0
- package/lib/service/high5/space/stat/index.js +34 -0
- package/lib/service/high5/space/wave/index.d.ts +16 -6
- package/lib/service/high5/space/wave/index.js +15 -11
- package/lib/service/high5/space/webhook/index.d.ts +32 -12
- package/lib/service/high5/space/webhook/index.js +29 -22
- package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
- package/lib/service/high5/space/webhook/log/index.js +6 -3
- package/lib/service/high5/stat/index.d.ts +11 -0
- package/lib/service/{fuse/internal → high5/stat}/index.js +16 -14
- package/lib/service/high5/wave/index.js +4 -1
- package/lib/service/high5/wave/s3/index.d.ts +31 -8
- package/lib/service/high5/wave/s3/index.js +47 -23
- package/lib/service/idp/guest/index.d.ts +42 -0
- package/lib/service/idp/guest/index.js +69 -0
- package/lib/service/idp/index.d.ts +25 -7
- package/lib/service/idp/index.js +27 -13
- package/lib/service/idp/internal/index.d.ts +5 -3
- package/lib/service/idp/internal/index.js +9 -4
- 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 +19 -6
- package/lib/service/idp/oauth/index.js +26 -16
- package/lib/service/idp/organization/index.d.ts +28 -5
- package/lib/service/idp/organization/index.js +41 -11
- package/lib/service/idp/organization/license/index.d.ts +7 -3
- package/lib/service/idp/organization/license/index.js +8 -5
- package/lib/service/idp/organization/member/index.d.ts +20 -8
- package/lib/service/idp/organization/member/index.js +20 -15
- package/lib/service/idp/organization/member/invitations/index.d.ts +42 -9
- package/lib/service/idp/organization/member/invitations/index.js +94 -59
- package/lib/service/idp/organization/service-accounts/index.d.ts +31 -9
- package/lib/service/idp/organization/service-accounts/index.js +35 -14
- package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
- package/lib/service/idp/organization/settings/domain/index.js +13 -9
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
- package/lib/service/idp/organization/settings/domain/saml/index.js +23 -19
- package/lib/service/idp/organization/settings/index.js +4 -1
- package/lib/service/idp/organization/settings/oauth/index.d.ts +33 -9
- package/lib/service/idp/organization/settings/oauth/index.js +37 -16
- package/lib/service/idp/organization/stat/index.d.ts +11 -0
- package/lib/service/idp/organization/stat/index.js +33 -0
- package/lib/service/idp/organization/team/index.d.ts +32 -10
- package/lib/service/idp/organization/team/index.js +35 -14
- package/lib/service/idp/registration/index.d.ts +10 -4
- package/lib/service/idp/registration/index.js +19 -10
- package/lib/service/idp/user/index.d.ts +41 -11
- package/lib/service/idp/user/index.js +49 -19
- package/lib/service/idp/user/license/index.d.ts +7 -3
- package/lib/service/idp/user/license/index.js +8 -5
- package/lib/service/idp/user/message/index.d.ts +62 -0
- package/lib/service/idp/user/message/index.js +95 -0
- package/lib/service/idp/user/password/index.d.ts +4 -2
- package/lib/service/idp/user/password/index.js +6 -3
- package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
- package/lib/service/idp/user/settings/connections/index.js +6 -3
- package/lib/service/idp/user/settings/general/index.d.ts +10 -4
- package/lib/service/idp/user/settings/general/index.js +10 -7
- package/lib/service/idp/user/settings/index.js +4 -1
- package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
- package/lib/service/idp/user/settings/notifications/index.js +8 -5
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
- package/lib/service/idp/user/settings/oauthApps/index.js +10 -6
- package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
- package/lib/service/idp/user/settings/pats/index.js +21 -16
- package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +17 -11
- package/lib/service/mailer/index.d.ts +4 -2
- package/lib/service/mailer/index.js +7 -4
- package/lib/service/mailer/internal/index.d.ts +14 -6
- package/lib/service/mailer/internal/index.js +12 -9
- package/lib/service/mothership/index.d.ts +35 -13
- package/lib/service/mothership/index.js +36 -18
- package/lib/service/nats/index.d.ts +7 -0
- package/lib/service/nats/index.js +77 -44
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/{friday → shorts}/index.js +17 -11
- package/lib/service/shorts/internal/index.d.ts +75 -0
- package/lib/service/shorts/internal/index.js +118 -0
- package/lib/utils/bouncer/features/Provider.js +0 -1
- package/package.json +2 -2
- package/lib/interfaces/friday/index.d.ts +0 -3
- package/lib/interfaces/friday/space/index.d.ts +0 -21
- package/lib/interfaces/friday/space/index.js +0 -11
- package/lib/interfaces/fuse/index.d.ts +0 -3
- package/lib/interfaces/fuse/index.js +0 -19
- 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/index.d.ts +0 -22
- package/lib/interfaces/fuse/space/index.js +0 -11
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -26
- package/lib/service/dali/avatar/DaliFuseSpace.js +0 -58
- 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/service/fuse/index.d.ts +0 -18
- package/lib/service/fuse/index.js +0 -48
- package/lib/service/fuse/internal/index.d.ts +0 -8
- 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 -15
- package/lib/service/fuse/internal/space/index.d.ts +0 -22
- package/lib/service/fuse/internal/space/index.js +0 -49
- package/lib/service/fuse/space/index.d.ts +0 -81
- package/lib/service/fuse/space/index.js +0 -152
- /package/lib/interfaces/{friday/space/database/index.js → agent/logging/cloudwatch.js} +0 -0
- /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/log-collector.js} +0 -0
- /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
|
@@ -8,12 +8,15 @@ 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.IdpOrganizationMember = 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
|
-
const invitations_1 = require("./invitations");
|
|
19
|
+
const invitations_1 = __importDefault(require("./invitations"));
|
|
17
20
|
class IdpOrganizationMember extends Base_1.default {
|
|
18
21
|
get invitations() {
|
|
19
22
|
if (this._invitations === undefined) {
|
|
@@ -31,8 +34,8 @@ class IdpOrganizationMember extends Base_1.default {
|
|
|
31
34
|
* @param page (optional) Page number to skip the first (page * limit) results (defaults to 0)
|
|
32
35
|
* @returns Object containing an array of Organization Members and the total number of results found in the database (independent of limit and page)
|
|
33
36
|
*/
|
|
34
|
-
searchOrganizationMembers(_a) {
|
|
35
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, excludeTeamByName, excludeServiceAccounts, sorting, limit = 25, page = 0, }) {
|
|
37
|
+
searchOrganizationMembers(_a, raw_1) {
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, excludeTeamByName, excludeServiceAccounts, sorting, limit = 25, page = 0, }, raw) {
|
|
36
39
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
37
40
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
38
41
|
});
|
|
@@ -42,7 +45,7 @@ class IdpOrganizationMember extends Base_1.default {
|
|
|
42
45
|
excludeTeamByName,
|
|
43
46
|
excludeServiceAccounts,
|
|
44
47
|
});
|
|
45
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
48
|
+
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));
|
|
46
49
|
});
|
|
47
50
|
}
|
|
48
51
|
/**
|
|
@@ -51,10 +54,10 @@ class IdpOrganizationMember extends Base_1.default {
|
|
|
51
54
|
* @param userId ID of the user
|
|
52
55
|
* @returns The requested Organization Member
|
|
53
56
|
*/
|
|
54
|
-
getOrganizationMember(orgName, userId) {
|
|
57
|
+
getOrganizationMember(orgName, userId, raw) {
|
|
55
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
59
|
const resp = yield this.axios.get(this.getEndpoint(`/${orgName}/members/${userId}`));
|
|
57
|
-
return resp.data;
|
|
60
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
58
61
|
});
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
@@ -64,10 +67,10 @@ class IdpOrganizationMember extends Base_1.default {
|
|
|
64
67
|
* @param orgMemberPatch New role
|
|
65
68
|
* @returns The updated OrganizationMember
|
|
66
69
|
*/
|
|
67
|
-
patchOrganizationMemberRole(orgName, userId, orgMemberPatch) {
|
|
70
|
+
patchOrganizationMemberRole(orgName, userId, orgMemberPatch, raw) {
|
|
68
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
72
|
const resp = yield this.axios.patch(this.getEndpoint(`/${orgName}/members/${userId}/role`), orgMemberPatch);
|
|
70
|
-
return resp.data;
|
|
73
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
71
74
|
});
|
|
72
75
|
}
|
|
73
76
|
/**
|
|
@@ -77,12 +80,12 @@ class IdpOrganizationMember extends Base_1.default {
|
|
|
77
80
|
* @param executionTarget Boolean value to set
|
|
78
81
|
* @returns The updated OrganizationMember
|
|
79
82
|
*/
|
|
80
|
-
patchOrganizationExecutionTarget(orgName, userId, executionTarget) {
|
|
83
|
+
patchOrganizationExecutionTarget(orgName, userId, executionTarget, raw) {
|
|
81
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
85
|
const resp = yield this.axios.patch(this.getEndpoint(`/${orgName}/members/${userId}/executionTarget`), {
|
|
83
86
|
executionTarget,
|
|
84
87
|
});
|
|
85
|
-
return resp.data;
|
|
88
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
86
89
|
});
|
|
87
90
|
}
|
|
88
91
|
/**
|
|
@@ -90,18 +93,20 @@ class IdpOrganizationMember extends Base_1.default {
|
|
|
90
93
|
* @param orgName Name of the Organization
|
|
91
94
|
* @param userId ID of the User
|
|
92
95
|
*/
|
|
93
|
-
removeOrganizationMember(orgName, userId) {
|
|
96
|
+
removeOrganizationMember(orgName, userId, raw) {
|
|
94
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
yield this.axios.delete(this.getEndpoint(`/${orgName}/members/${userId}`));
|
|
98
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/${orgName}/members/${userId}`));
|
|
99
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
96
100
|
});
|
|
97
101
|
}
|
|
98
102
|
/**
|
|
99
103
|
* Member leaves the organization independently.
|
|
100
104
|
* @param orgName Name of the Organization
|
|
101
105
|
*/
|
|
102
|
-
leaveOrganization(orgName) {
|
|
106
|
+
leaveOrganization(orgName, raw) {
|
|
103
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
-
yield this.axios.delete(this.getEndpoint(`/${orgName}/members`));
|
|
108
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/${orgName}/members`));
|
|
109
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
105
110
|
});
|
|
106
111
|
}
|
|
107
112
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchFilter, Sorting } from "../../../../../interfaces/global";
|
|
3
3
|
import { OrganizationRole } from "../../../../../interfaces/idp";
|
|
4
4
|
import { OrganizationMemberInvitation } from "../../../../../interfaces/idp/organization/member/invitations";
|
|
@@ -12,13 +12,15 @@ export default class IdpOrganizationMemberInvitations extends Base {
|
|
|
12
12
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
13
13
|
* @returns Object containing an array of invitations and the total number of results found in the database (independent of limit and page)
|
|
14
14
|
*/
|
|
15
|
-
search(params: {
|
|
15
|
+
search<R extends boolean = false>(params: {
|
|
16
16
|
orgName: string;
|
|
17
17
|
filters: SearchFilter[];
|
|
18
18
|
sorting?: Sorting;
|
|
19
19
|
limit?: number;
|
|
20
20
|
page?: number;
|
|
21
|
-
}
|
|
21
|
+
}, raw?: {
|
|
22
|
+
raw: R;
|
|
23
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<OrganizationMemberInvitation>>>;
|
|
22
24
|
/**
|
|
23
25
|
* Invites a User to an Organization.
|
|
24
26
|
*
|
|
@@ -31,7 +33,28 @@ export default class IdpOrganizationMemberInvitations extends Base {
|
|
|
31
33
|
* @param targetUrl Optional url the link in the mail will point to
|
|
32
34
|
* @returns The created invitation
|
|
33
35
|
*/
|
|
34
|
-
create(orgName: string, email: string, role: OrganizationRole, allowNonRegisteredUsers?: boolean, targetUrl?: string
|
|
36
|
+
create<R extends boolean = false>(orgName: string, email: string, role: OrganizationRole, allowNonRegisteredUsers?: boolean, targetUrl?: string, raw?: {
|
|
37
|
+
raw: R;
|
|
38
|
+
}): Promise<MaybeRaw<R, OrganizationMemberInvitation>>;
|
|
39
|
+
/**
|
|
40
|
+
* Invites list of users to an Organization.
|
|
41
|
+
*
|
|
42
|
+
* @param orgName Name of the Organization
|
|
43
|
+
* @param users - List of users to be invited should contain the following data:
|
|
44
|
+
* - email of the person to be invited
|
|
45
|
+
* - the role they will have within the organization if they accept the invitation
|
|
46
|
+
* - allowNonRegisteredUsers Flag to determine if the invitation should go through in the case that the email is not bound to an Helmut Cloud user.
|
|
47
|
+
* If this is set to true and the email is unbound, then an email will be sent asking the person to register.
|
|
48
|
+
* When they do they will automatically join the organization.
|
|
49
|
+
* - targetUrl Optional url the link in the mail will point to
|
|
50
|
+
* @returns The list of created invitations
|
|
51
|
+
*/
|
|
52
|
+
createList(orgName: string, users: Array<{
|
|
53
|
+
email: string;
|
|
54
|
+
role: OrganizationRole;
|
|
55
|
+
allowNonRegisteredUsers: false;
|
|
56
|
+
targetUrl?: string;
|
|
57
|
+
}>): Promise<OrganizationMemberInvitation[]>;
|
|
35
58
|
/**
|
|
36
59
|
* Accept an invitation.
|
|
37
60
|
*
|
|
@@ -41,7 +64,9 @@ export default class IdpOrganizationMemberInvitations extends Base {
|
|
|
41
64
|
* @param invitationId ID of the invitation
|
|
42
65
|
* @returns The patched invitation
|
|
43
66
|
*/
|
|
44
|
-
accept
|
|
67
|
+
accept<R extends boolean = false>(orgName: string, invitationId: string, raw?: {
|
|
68
|
+
raw: R;
|
|
69
|
+
}): Promise<MaybeRaw<R, OrganizationMemberInvitation>>;
|
|
45
70
|
/**
|
|
46
71
|
* Reject an invitation.
|
|
47
72
|
*
|
|
@@ -51,7 +76,9 @@ export default class IdpOrganizationMemberInvitations extends Base {
|
|
|
51
76
|
* @param invitationId ID of the invitation
|
|
52
77
|
* @returns The patched invitation
|
|
53
78
|
*/
|
|
54
|
-
reject
|
|
79
|
+
reject<R extends boolean = false>(orgName: string, invitationId: string, raw?: {
|
|
80
|
+
raw: R;
|
|
81
|
+
}): Promise<MaybeRaw<R, OrganizationMemberInvitation>>;
|
|
55
82
|
/**
|
|
56
83
|
* Respond to an invitation.
|
|
57
84
|
*
|
|
@@ -60,20 +87,26 @@ export default class IdpOrganizationMemberInvitations extends Base {
|
|
|
60
87
|
* @param accept Whether or not to accept the invitation
|
|
61
88
|
* @returns The patched invitation
|
|
62
89
|
*/
|
|
63
|
-
respond
|
|
90
|
+
respond<R extends boolean = false>(orgName: string, invitationId: string, accept: boolean, raw?: {
|
|
91
|
+
raw: R;
|
|
92
|
+
}): Promise<MaybeRaw<R, OrganizationMemberInvitation>>;
|
|
64
93
|
/**
|
|
65
94
|
* Resends an invitation email.
|
|
66
95
|
*
|
|
67
96
|
* @param orgName Name of the Organization
|
|
68
97
|
* @param invitationId ID of the invitation
|
|
69
98
|
*/
|
|
70
|
-
resendInvitationEmail
|
|
99
|
+
resendInvitationEmail<R extends boolean = false>(orgName: string, invitationId: string, raw?: {
|
|
100
|
+
raw: R;
|
|
101
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
71
102
|
/**
|
|
72
103
|
* Cancel/Delete an invitation.
|
|
73
104
|
*
|
|
74
105
|
* @param orgName Name of the Organization
|
|
75
106
|
* @param invitationId ID of the invitation
|
|
76
107
|
*/
|
|
77
|
-
delete
|
|
108
|
+
delete<R extends boolean = false>(orgName: string, invitationId: string, raw?: {
|
|
109
|
+
raw: R;
|
|
110
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
78
111
|
protected getEndpoint(endpoint: string): string;
|
|
79
112
|
}
|
|
@@ -8,66 +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
|
-
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 IdpOrganizationMemberInvitations extends Base_1.default {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
/**
|
|
19
|
-
* Accept an invitation.
|
|
20
|
-
*
|
|
21
|
-
* Internally this calls respond.
|
|
22
|
-
*
|
|
23
|
-
* @param orgName Name of the Organization
|
|
24
|
-
* @param invitationId ID of the invitation
|
|
25
|
-
* @returns The patched invitation
|
|
26
|
-
*/
|
|
27
|
-
this.accept = (orgName, invitationId) => __awaiter(this, void 0, void 0, function* () { return this.respond(orgName, invitationId, true); });
|
|
28
|
-
/**
|
|
29
|
-
* Reject an invitation.
|
|
30
|
-
*
|
|
31
|
-
* Internally this calls respond.
|
|
32
|
-
*
|
|
33
|
-
* @param orgName Name of the Organization
|
|
34
|
-
* @param invitationId ID of the invitation
|
|
35
|
-
* @returns The patched invitation
|
|
36
|
-
*/
|
|
37
|
-
this.reject = (orgName, invitationId) => __awaiter(this, void 0, void 0, function* () { return this.respond(orgName, invitationId, false); });
|
|
38
|
-
/**
|
|
39
|
-
* Respond to an invitation.
|
|
40
|
-
*
|
|
41
|
-
* @param orgName Name of the Organization
|
|
42
|
-
* @param invitationId ID of the invitation
|
|
43
|
-
* @param accept Whether or not to accept the invitation
|
|
44
|
-
* @returns The patched invitation
|
|
45
|
-
*/
|
|
46
|
-
this.respond = (orgName, invitationId, accept) => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
const resp = yield this.axios.patch(this.getEndpoint(`/${orgName}/members/invitations/${invitationId}/approval`), {
|
|
48
|
-
accept,
|
|
49
|
-
});
|
|
50
|
-
return resp.data;
|
|
51
|
-
});
|
|
52
|
-
/**
|
|
53
|
-
* Resends an invitation email.
|
|
54
|
-
*
|
|
55
|
-
* @param orgName Name of the Organization
|
|
56
|
-
* @param invitationId ID of the invitation
|
|
57
|
-
*/
|
|
58
|
-
this.resendInvitationEmail = (orgName, invitationId) => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
yield this.axios.post(this.getEndpoint(`/${orgName}/members/invitations/${invitationId}/resend`));
|
|
60
|
-
});
|
|
61
|
-
/**
|
|
62
|
-
* Cancel/Delete an invitation.
|
|
63
|
-
*
|
|
64
|
-
* @param orgName Name of the Organization
|
|
65
|
-
* @param invitationId ID of the invitation
|
|
66
|
-
*/
|
|
67
|
-
this.delete = (orgName, invitationId) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
yield this.axios.delete(this.getEndpoint(`/${orgName}/members/invitations/${invitationId}`));
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
19
|
/**
|
|
72
20
|
* Retrieves all invitations sent out by the organization that match the provided search filter(s). Returns all invitations if no search filter is provided.
|
|
73
21
|
* @param orgName Name of the organization
|
|
@@ -77,7 +25,7 @@ class IdpOrganizationMemberInvitations extends Base_1.default {
|
|
|
77
25
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
78
26
|
* @returns Object containing an array of invitations and the total number of results found in the database (independent of limit and page)
|
|
79
27
|
*/
|
|
80
|
-
search(params) {
|
|
28
|
+
search(params, raw) {
|
|
81
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
30
|
const limit = params.limit || 25;
|
|
83
31
|
const page = params.page || 0;
|
|
@@ -89,7 +37,7 @@ class IdpOrganizationMemberInvitations extends Base_1.default {
|
|
|
89
37
|
filters: filtersDTO,
|
|
90
38
|
sorting: params.sorting,
|
|
91
39
|
});
|
|
92
|
-
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));
|
|
93
41
|
});
|
|
94
42
|
}
|
|
95
43
|
/**
|
|
@@ -105,16 +53,103 @@ class IdpOrganizationMemberInvitations extends Base_1.default {
|
|
|
105
53
|
* @returns The created invitation
|
|
106
54
|
*/
|
|
107
55
|
create(orgName_1, email_1, role_1) {
|
|
108
|
-
return __awaiter(this, arguments, void 0, function* (orgName, email, role, allowNonRegisteredUsers = false, targetUrl) {
|
|
56
|
+
return __awaiter(this, arguments, void 0, function* (orgName, email, role, allowNonRegisteredUsers = false, targetUrl, raw) {
|
|
109
57
|
const resp = yield this.axios.post(this.getEndpoint(`/${orgName}/members/invitations`), {
|
|
110
58
|
email,
|
|
111
59
|
role,
|
|
112
60
|
allowNonRegisteredUsers,
|
|
113
61
|
targetUrl,
|
|
114
62
|
});
|
|
63
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Invites list of users to an Organization.
|
|
68
|
+
*
|
|
69
|
+
* @param orgName Name of the Organization
|
|
70
|
+
* @param users - List of users to be invited should contain the following data:
|
|
71
|
+
* - email of the person to be invited
|
|
72
|
+
* - the role they will have within the organization if they accept the invitation
|
|
73
|
+
* - allowNonRegisteredUsers Flag to determine if the invitation should go through in the case that the email is not bound to an Helmut Cloud user.
|
|
74
|
+
* If this is set to true and the email is unbound, then an email will be sent asking the person to register.
|
|
75
|
+
* When they do they will automatically join the organization.
|
|
76
|
+
* - targetUrl Optional url the link in the mail will point to
|
|
77
|
+
* @returns The list of created invitations
|
|
78
|
+
*/
|
|
79
|
+
createList(orgName, users) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const resp = yield this.axios.post(this.getEndpoint(`/${orgName}/members/invitations-list`), { users });
|
|
115
82
|
return resp.data;
|
|
116
83
|
});
|
|
117
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Accept an invitation.
|
|
87
|
+
*
|
|
88
|
+
* Internally this calls respond.
|
|
89
|
+
*
|
|
90
|
+
* @param orgName Name of the Organization
|
|
91
|
+
* @param invitationId ID of the invitation
|
|
92
|
+
* @returns The patched invitation
|
|
93
|
+
*/
|
|
94
|
+
accept(orgName, invitationId, raw) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return this.respond(orgName, invitationId, true, raw);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Reject an invitation.
|
|
101
|
+
*
|
|
102
|
+
* Internally this calls respond.
|
|
103
|
+
*
|
|
104
|
+
* @param orgName Name of the Organization
|
|
105
|
+
* @param invitationId ID of the invitation
|
|
106
|
+
* @returns The patched invitation
|
|
107
|
+
*/
|
|
108
|
+
reject(orgName, invitationId, raw) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
return this.respond(orgName, invitationId, false, raw);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Respond to an invitation.
|
|
115
|
+
*
|
|
116
|
+
* @param orgName Name of the Organization
|
|
117
|
+
* @param invitationId ID of the invitation
|
|
118
|
+
* @param accept Whether or not to accept the invitation
|
|
119
|
+
* @returns The patched invitation
|
|
120
|
+
*/
|
|
121
|
+
respond(orgName, invitationId, accept, raw) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/${orgName}/members/invitations/${invitationId}/approval`), {
|
|
124
|
+
accept,
|
|
125
|
+
});
|
|
126
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Resends an invitation email.
|
|
131
|
+
*
|
|
132
|
+
* @param orgName Name of the Organization
|
|
133
|
+
* @param invitationId ID of the invitation
|
|
134
|
+
*/
|
|
135
|
+
resendInvitationEmail(orgName, invitationId, raw) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const repo = yield this.axios.post(this.getEndpoint(`/${orgName}/members/invitations/${invitationId}/resend`));
|
|
138
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? repo : repo.data);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Cancel/Delete an invitation.
|
|
143
|
+
*
|
|
144
|
+
* @param orgName Name of the Organization
|
|
145
|
+
* @param invitationId ID of the invitation
|
|
146
|
+
*/
|
|
147
|
+
delete(orgName, invitationId, raw) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
const repo = yield this.axios.delete(this.getEndpoint(`/${orgName}/members/invitations/${invitationId}`));
|
|
150
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? repo : repo.data);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
118
153
|
getEndpoint(endpoint) {
|
|
119
154
|
return `${this.options.server}/api/account/v1/org${endpoint}`;
|
|
120
155
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchFilter, Sorting } from "../../../../interfaces/global";
|
|
3
3
|
import { ServiceAccount, ServiceAccountNoToken } from "../../../../interfaces/idp/organization/service-accounts";
|
|
4
4
|
export default class IdpOrganizationServiceAccounts extends Base {
|
|
@@ -9,15 +9,19 @@ export default class IdpOrganizationServiceAccounts extends Base {
|
|
|
9
9
|
* @param name {string} Name for the service account
|
|
10
10
|
* @returns {ServiceAccount} Created service account
|
|
11
11
|
*/
|
|
12
|
-
create(orgName: string, name: string
|
|
12
|
+
create<R extends boolean = false>(orgName: string, name: string, raw?: {
|
|
13
|
+
raw: R;
|
|
14
|
+
}): Promise<MaybeRaw<R, ServiceAccount>>;
|
|
13
15
|
/**
|
|
14
16
|
* Delete a service account
|
|
15
17
|
*
|
|
16
18
|
* @param orgName {string} Organization name
|
|
17
19
|
* @param id {string} Service account ID
|
|
18
|
-
* @returns {
|
|
20
|
+
* @returns {ServiceAccountNoToken}
|
|
19
21
|
*/
|
|
20
|
-
delete(orgName: string, id: string
|
|
22
|
+
delete<R extends boolean = false>(orgName: string, id: string, raw?: {
|
|
23
|
+
raw: R;
|
|
24
|
+
}): Promise<MaybeRaw<R, ServiceAccountNoToken>>;
|
|
21
25
|
/**
|
|
22
26
|
* Fetch a service account by ID
|
|
23
27
|
*
|
|
@@ -25,7 +29,9 @@ export default class IdpOrganizationServiceAccounts extends Base {
|
|
|
25
29
|
* @param id {string} Service account ID
|
|
26
30
|
* @returns {ServiceAccountNoToken} The service account's token is only visible on creation or token regeneration
|
|
27
31
|
*/
|
|
28
|
-
get(orgName: string, id: string
|
|
32
|
+
get<R extends boolean = false>(orgName: string, id: string, raw?: {
|
|
33
|
+
raw: R;
|
|
34
|
+
}): Promise<MaybeRaw<R, ServiceAccountNoToken>>;
|
|
29
35
|
/**
|
|
30
36
|
* Search the service accounts of the organization
|
|
31
37
|
*
|
|
@@ -36,13 +42,15 @@ export default class IdpOrganizationServiceAccounts extends Base {
|
|
|
36
42
|
* @param page {number|undefined} Page number
|
|
37
43
|
* @returns {PaginatedResponse<ServiceAccountNoToken>} A paginated response containing the service accounts that matched the search parameters
|
|
38
44
|
*/
|
|
39
|
-
search(params: {
|
|
45
|
+
search<R extends boolean = false>(params: {
|
|
40
46
|
orgName: string;
|
|
41
47
|
filters: SearchFilter[];
|
|
42
48
|
sorting?: Sorting;
|
|
43
49
|
limit?: number;
|
|
44
50
|
page?: number;
|
|
45
|
-
}
|
|
51
|
+
}, raw?: {
|
|
52
|
+
raw: R;
|
|
53
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<ServiceAccountNoToken>>>;
|
|
46
54
|
/**
|
|
47
55
|
* Regenerate a service account's token
|
|
48
56
|
*
|
|
@@ -50,7 +58,9 @@ export default class IdpOrganizationServiceAccounts extends Base {
|
|
|
50
58
|
* @param id {string} Service account ID
|
|
51
59
|
* @returns {ServiceAccount}
|
|
52
60
|
*/
|
|
53
|
-
regenerateToken(orgName: string, id: string
|
|
61
|
+
regenerateToken<R extends boolean = false>(orgName: string, id: string, raw?: {
|
|
62
|
+
raw: R;
|
|
63
|
+
}): Promise<MaybeRaw<R, ServiceAccount>>;
|
|
54
64
|
/**
|
|
55
65
|
* Rename a service account
|
|
56
66
|
*
|
|
@@ -59,6 +69,18 @@ export default class IdpOrganizationServiceAccounts extends Base {
|
|
|
59
69
|
* @param newName {string} Service account's new name
|
|
60
70
|
* @returns {ServiceAccountNoToken}
|
|
61
71
|
*/
|
|
62
|
-
rename(orgName: string, id: string, newName: string
|
|
72
|
+
rename<R extends boolean = false>(orgName: string, id: string, newName: string, raw?: {
|
|
73
|
+
raw: R;
|
|
74
|
+
}): Promise<MaybeRaw<R, ServiceAccountNoToken>>;
|
|
75
|
+
/**
|
|
76
|
+
* Updates the avatar of the specified service account
|
|
77
|
+
* @param orgName Name of the organization
|
|
78
|
+
* @param id {string} Service account ID
|
|
79
|
+
* @param file Image as Javascript File
|
|
80
|
+
* @returns Service account details with updated avatar
|
|
81
|
+
*/
|
|
82
|
+
updateAvatar<R extends boolean = false>(orgName: string, id: string, file: File, raw?: {
|
|
83
|
+
raw: R;
|
|
84
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
63
85
|
protected getEndpoint(endpoint: string): string;
|
|
64
86
|
}
|
|
@@ -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 IdpOrganizationServiceAccounts extends Base_1.default {
|
|
@@ -20,10 +23,10 @@ class IdpOrganizationServiceAccounts extends Base_1.default {
|
|
|
20
23
|
* @param name {string} Name for the service account
|
|
21
24
|
* @returns {ServiceAccount} Created service account
|
|
22
25
|
*/
|
|
23
|
-
create(orgName, name) {
|
|
26
|
+
create(orgName, name, raw) {
|
|
24
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
28
|
const res = yield this.axios.post(this.getEndpoint(`/${orgName}/service-accounts`), { name });
|
|
26
|
-
return res.data;
|
|
29
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
27
30
|
});
|
|
28
31
|
}
|
|
29
32
|
/**
|
|
@@ -31,11 +34,12 @@ class IdpOrganizationServiceAccounts extends Base_1.default {
|
|
|
31
34
|
*
|
|
32
35
|
* @param orgName {string} Organization name
|
|
33
36
|
* @param id {string} Service account ID
|
|
34
|
-
* @returns {
|
|
37
|
+
* @returns {ServiceAccountNoToken}
|
|
35
38
|
*/
|
|
36
|
-
delete(orgName, id) {
|
|
39
|
+
delete(orgName, id, raw) {
|
|
37
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
yield this.axios.delete(this.getEndpoint(`/${orgName}/service-accounts/${id}`));
|
|
41
|
+
const repo = yield this.axios.delete(this.getEndpoint(`/${orgName}/service-accounts/${id}`));
|
|
42
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? repo : repo.data);
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
/**
|
|
@@ -45,10 +49,10 @@ class IdpOrganizationServiceAccounts extends Base_1.default {
|
|
|
45
49
|
* @param id {string} Service account ID
|
|
46
50
|
* @returns {ServiceAccountNoToken} The service account's token is only visible on creation or token regeneration
|
|
47
51
|
*/
|
|
48
|
-
get(orgName, id) {
|
|
52
|
+
get(orgName, id, raw) {
|
|
49
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
54
|
const res = yield this.axios.get(this.getEndpoint(`/${orgName}/service-accounts/${id}`));
|
|
51
|
-
return res.data;
|
|
55
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
52
56
|
});
|
|
53
57
|
}
|
|
54
58
|
/**
|
|
@@ -61,7 +65,7 @@ class IdpOrganizationServiceAccounts extends Base_1.default {
|
|
|
61
65
|
* @param page {number|undefined} Page number
|
|
62
66
|
* @returns {PaginatedResponse<ServiceAccountNoToken>} A paginated response containing the service accounts that matched the search parameters
|
|
63
67
|
*/
|
|
64
|
-
search(params) {
|
|
68
|
+
search(params, raw) {
|
|
65
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
70
|
const limit = params.limit || 25;
|
|
67
71
|
const page = params.page || 0;
|
|
@@ -69,7 +73,7 @@ class IdpOrganizationServiceAccounts extends Base_1.default {
|
|
|
69
73
|
filters: params.filters.map(f => new searchFilter_1.SearchFilterDTO(f)),
|
|
70
74
|
sorting: params.sorting,
|
|
71
75
|
});
|
|
72
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(res);
|
|
76
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, res), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(res) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(res));
|
|
73
77
|
});
|
|
74
78
|
}
|
|
75
79
|
/**
|
|
@@ -79,10 +83,10 @@ class IdpOrganizationServiceAccounts extends Base_1.default {
|
|
|
79
83
|
* @param id {string} Service account ID
|
|
80
84
|
* @returns {ServiceAccount}
|
|
81
85
|
*/
|
|
82
|
-
regenerateToken(orgName, id) {
|
|
86
|
+
regenerateToken(orgName, id, raw) {
|
|
83
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
88
|
const res = yield this.axios.patch(this.getEndpoint(`/${orgName}/service-accounts/${id}/regenerate`));
|
|
85
|
-
return res.data;
|
|
89
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
86
90
|
});
|
|
87
91
|
}
|
|
88
92
|
/**
|
|
@@ -93,12 +97,29 @@ class IdpOrganizationServiceAccounts extends Base_1.default {
|
|
|
93
97
|
* @param newName {string} Service account's new name
|
|
94
98
|
* @returns {ServiceAccountNoToken}
|
|
95
99
|
*/
|
|
96
|
-
rename(orgName, id, newName) {
|
|
100
|
+
rename(orgName, id, newName, raw) {
|
|
97
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
102
|
const res = yield this.axios.patch(this.getEndpoint(`/${orgName}/service-accounts/${id}/name`), {
|
|
99
103
|
name: newName,
|
|
100
104
|
});
|
|
101
|
-
return res.data;
|
|
105
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Updates the avatar of the specified service account
|
|
110
|
+
* @param orgName Name of the organization
|
|
111
|
+
* @param id {string} Service account ID
|
|
112
|
+
* @param file Image as Javascript File
|
|
113
|
+
* @returns Service account details with updated avatar
|
|
114
|
+
*/
|
|
115
|
+
updateAvatar(orgName, id, file, raw) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const data = new FormData();
|
|
118
|
+
data.append("avatar", file);
|
|
119
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/${orgName}/service-accounts/${id}/avatar`), data, {
|
|
120
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
121
|
+
});
|
|
122
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
102
123
|
});
|
|
103
124
|
}
|
|
104
125
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../Base";
|
|
2
2
|
import { Domain } from "../../../../../interfaces/idp/organization/settings/domain";
|
|
3
3
|
import { IdpSAMLProvider } from "./saml";
|
|
4
4
|
export declare class IdpDomain extends Base {
|
|
@@ -12,26 +12,34 @@ export declare class IdpDomain extends Base {
|
|
|
12
12
|
* @param orgName Name of Organization
|
|
13
13
|
* @returns Array of Domains
|
|
14
14
|
*/
|
|
15
|
-
getDomains(orgName: string
|
|
15
|
+
getDomains<R extends boolean = false>(orgName: string, raw?: {
|
|
16
|
+
raw: R;
|
|
17
|
+
}): Promise<MaybeRaw<R, Domain[]>>;
|
|
16
18
|
/**
|
|
17
19
|
* Creates a new Domain for the given Organization
|
|
18
20
|
* @param orgName Name of the Organization
|
|
19
21
|
* @param domainName Name of the Domain
|
|
20
22
|
* @returns the created Domain
|
|
21
23
|
*/
|
|
22
|
-
createDomain(orgName: string, domainName: string
|
|
24
|
+
createDomain<R extends boolean = false>(orgName: string, domainName: string, raw?: {
|
|
25
|
+
raw: R;
|
|
26
|
+
}): Promise<MaybeRaw<R, Domain>>;
|
|
23
27
|
/**
|
|
24
28
|
* Verifies the provided Domain.
|
|
25
29
|
* @param orgName Name of the organization
|
|
26
30
|
* @param domainName Name of the Domain
|
|
27
31
|
* @returns Domain object with domain.verified set to 'true' if verification was succesful.
|
|
28
32
|
*/
|
|
29
|
-
verifyDomain(orgName: string, domainName: string
|
|
33
|
+
verifyDomain<R extends boolean = false>(orgName: string, domainName: string, raw?: {
|
|
34
|
+
raw: R;
|
|
35
|
+
}): Promise<MaybeRaw<R, Domain>>;
|
|
30
36
|
/**
|
|
31
37
|
* Deletes a domain.
|
|
32
38
|
* @param orgName Name of the organization
|
|
33
39
|
* @param domainName Name of the domain
|
|
34
40
|
*/
|
|
35
|
-
deleteDomain(orgName: string, domainName: string
|
|
41
|
+
deleteDomain<R extends boolean = false>(orgName: string, domainName: string, raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
36
44
|
protected getEndpoint(endpoint: string): string;
|
|
37
45
|
}
|