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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
2
|
import { FullSAMLProvider, SAMLProvider, SAMLProviderCreateDto } from "../../../../../../interfaces/idp/organization/settings/domain/saml";
|
|
3
3
|
export declare class IdpSAMLProvider extends Base {
|
|
4
4
|
/**
|
|
@@ -6,7 +6,9 @@ export declare class IdpSAMLProvider extends Base {
|
|
|
6
6
|
* @param orgName Name of the Organization
|
|
7
7
|
* @returns Array of SAML providers
|
|
8
8
|
*/
|
|
9
|
-
getAllSAMLProvidersOfOrganization(orgName: string
|
|
9
|
+
getAllSAMLProvidersOfOrganization<R extends boolean = false>(orgName: string, raw?: {
|
|
10
|
+
raw: R;
|
|
11
|
+
}): Promise<MaybeRaw<R, FullSAMLProvider[]>>;
|
|
10
12
|
/**
|
|
11
13
|
* Creates a new SAML provider for the specified domain.
|
|
12
14
|
* @param orgName Name of the Organization
|
|
@@ -14,7 +16,9 @@ export declare class IdpSAMLProvider extends Base {
|
|
|
14
16
|
* @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
|
|
15
17
|
* @returns The created SAML provider
|
|
16
18
|
*/
|
|
17
|
-
createProvider(orgName: string, domainName: string, provider: SAMLProviderCreateDto
|
|
19
|
+
createProvider<R extends boolean = false>(orgName: string, domainName: string, provider: SAMLProviderCreateDto, raw?: {
|
|
20
|
+
raw: R;
|
|
21
|
+
}): Promise<MaybeRaw<R, SAMLProvider>>;
|
|
18
22
|
/**
|
|
19
23
|
* Updates a SAML provider for the specified domain
|
|
20
24
|
* @param orgName Name of the Organization
|
|
@@ -22,7 +26,9 @@ export declare class IdpSAMLProvider extends Base {
|
|
|
22
26
|
* @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
|
|
23
27
|
* @returns The updated SAML provider
|
|
24
28
|
*/
|
|
25
|
-
updateProvider(orgName: string, domainName: string, provider: SAMLProviderCreateDto
|
|
29
|
+
updateProvider<R extends boolean = false>(orgName: string, domainName: string, provider: SAMLProviderCreateDto, raw?: {
|
|
30
|
+
raw: R;
|
|
31
|
+
}): Promise<MaybeRaw<R, SAMLProvider>>;
|
|
26
32
|
/**
|
|
27
33
|
* Adds certificates to a SAML provider
|
|
28
34
|
* @param orgName Name of the Organization
|
|
@@ -30,13 +36,17 @@ export declare class IdpSAMLProvider extends Base {
|
|
|
30
36
|
* @param certificates Certificates to add
|
|
31
37
|
* @returns The updated SAML provider
|
|
32
38
|
*/
|
|
33
|
-
addCertificatesToProvider(orgName: string, domainName: string, certificates: string[]
|
|
39
|
+
addCertificatesToProvider<R extends boolean = false>(orgName: string, domainName: string, certificates: string[], raw?: {
|
|
40
|
+
raw: R;
|
|
41
|
+
}): Promise<MaybeRaw<R, SAMLProvider>>;
|
|
34
42
|
/**
|
|
35
43
|
* Removes a SAML provider from the specified domain
|
|
36
44
|
* @param orgName Name of the Organization
|
|
37
45
|
* @param domainName Name of the Domain
|
|
38
46
|
*/
|
|
39
|
-
deleteProvider(orgName: string, domainName: string
|
|
47
|
+
deleteProvider<R extends boolean = false>(orgName: string, domainName: string, raw?: {
|
|
48
|
+
raw: R;
|
|
49
|
+
}): Promise<MaybeRaw<R, SAMLProvider>>;
|
|
40
50
|
private convertProviderToFormData;
|
|
41
51
|
private createFileFromString;
|
|
42
52
|
protected getEndpoint(endpoint: string): string;
|
|
@@ -14,14 +14,6 @@ const Base_1 = require("../../../../../../Base");
|
|
|
14
14
|
class IdpSAMLProvider extends Base_1.default {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
-
this.convertProviderToFormData = (provider) => {
|
|
18
|
-
const formData = new FormData();
|
|
19
|
-
formData.append("ssoLoginURL", provider.ssoLoginURL);
|
|
20
|
-
formData.append("ssoLogoutURL", provider.ssoLogoutURL);
|
|
21
|
-
provider.certificates.forEach(c => formData.append("certificate", this.createFileFromString(c)));
|
|
22
|
-
provider.allowUnencryptedAssertion && formData.append("allowUnencryptedAssertion", provider.allowUnencryptedAssertion.toString());
|
|
23
|
-
return formData;
|
|
24
|
-
};
|
|
25
17
|
this.createFileFromString = (certificate) => {
|
|
26
18
|
const blob = new Blob([certificate]);
|
|
27
19
|
return new File([blob], "certificate");
|
|
@@ -32,10 +24,10 @@ class IdpSAMLProvider extends Base_1.default {
|
|
|
32
24
|
* @param orgName Name of the Organization
|
|
33
25
|
* @returns Array of SAML providers
|
|
34
26
|
*/
|
|
35
|
-
getAllSAMLProvidersOfOrganization(orgName) {
|
|
27
|
+
getAllSAMLProvidersOfOrganization(orgName, raw) {
|
|
36
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
29
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/settings/domains/saml`));
|
|
38
|
-
return resp.data;
|
|
30
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
39
31
|
});
|
|
40
32
|
}
|
|
41
33
|
/**
|
|
@@ -45,11 +37,11 @@ class IdpSAMLProvider extends Base_1.default {
|
|
|
45
37
|
* @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
|
|
46
38
|
* @returns The created SAML provider
|
|
47
39
|
*/
|
|
48
|
-
createProvider(orgName, domainName, provider) {
|
|
40
|
+
createProvider(orgName, domainName, provider, raw) {
|
|
49
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
42
|
const formData = this.convertProviderToFormData(provider);
|
|
51
43
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`), formData);
|
|
52
|
-
return resp.data;
|
|
44
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
53
45
|
});
|
|
54
46
|
}
|
|
55
47
|
/**
|
|
@@ -59,11 +51,11 @@ class IdpSAMLProvider extends Base_1.default {
|
|
|
59
51
|
* @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
|
|
60
52
|
* @returns The updated SAML provider
|
|
61
53
|
*/
|
|
62
|
-
updateProvider(orgName, domainName, provider) {
|
|
54
|
+
updateProvider(orgName, domainName, provider, raw) {
|
|
63
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
56
|
const formData = this.convertProviderToFormData(provider);
|
|
65
57
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`), formData);
|
|
66
|
-
return resp.data;
|
|
58
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
67
59
|
});
|
|
68
60
|
}
|
|
69
61
|
/**
|
|
@@ -73,12 +65,12 @@ class IdpSAMLProvider extends Base_1.default {
|
|
|
73
65
|
* @param certificates Certificates to add
|
|
74
66
|
* @returns The updated SAML provider
|
|
75
67
|
*/
|
|
76
|
-
addCertificatesToProvider(orgName, domainName, certificates) {
|
|
68
|
+
addCertificatesToProvider(orgName, domainName, certificates, raw) {
|
|
77
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
70
|
const formData = new FormData();
|
|
79
71
|
certificates.forEach(c => formData.append("certificate", this.createFileFromString(c)));
|
|
80
72
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml/certificates`), formData);
|
|
81
|
-
return resp.data;
|
|
73
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
82
74
|
});
|
|
83
75
|
}
|
|
84
76
|
/**
|
|
@@ -86,11 +78,20 @@ class IdpSAMLProvider extends Base_1.default {
|
|
|
86
78
|
* @param orgName Name of the Organization
|
|
87
79
|
* @param domainName Name of the Domain
|
|
88
80
|
*/
|
|
89
|
-
deleteProvider(orgName, domainName) {
|
|
81
|
+
deleteProvider(orgName, domainName, raw) {
|
|
90
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`));
|
|
83
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`));
|
|
84
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
92
85
|
});
|
|
93
86
|
}
|
|
87
|
+
convertProviderToFormData(provider) {
|
|
88
|
+
const formData = new FormData();
|
|
89
|
+
formData.append("ssoLoginURL", provider.ssoLoginURL);
|
|
90
|
+
formData.append("ssoLogoutURL", provider.ssoLogoutURL);
|
|
91
|
+
provider.certificates.forEach(c => formData.append("certificate", this.createFileFromString(c)));
|
|
92
|
+
provider.allowUnencryptedAssertion && formData.append("allowUnencryptedAssertion", provider.allowUnencryptedAssertion.toString());
|
|
93
|
+
return formData;
|
|
94
|
+
}
|
|
94
95
|
getEndpoint(endpoint) {
|
|
95
96
|
return `${this.options.server}/api/account${endpoint}`;
|
|
96
97
|
}
|
|
@@ -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 { OAuthApp, OAuthAppCreate } from "../../../../../interfaces/idp/organization/settings/oauthApp";
|
|
4
4
|
export declare class IdpOAuthApp extends Base {
|
|
@@ -11,23 +11,29 @@ export declare class IdpOAuthApp extends Base {
|
|
|
11
11
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
12
12
|
* @returns Object containing an array of OAuth apps and the total number of results found in the database (independent of limit and page)
|
|
13
13
|
*/
|
|
14
|
-
searchOauthAppsOfOrganization({ organizationName, filters, sorting, limit, page
|
|
14
|
+
searchOauthAppsOfOrganization<R extends boolean = false>({ organizationName, filters, sorting, limit, page }: SearchParams & {
|
|
15
15
|
organizationName: string;
|
|
16
|
-
}
|
|
16
|
+
}, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<OAuthApp>>>;
|
|
17
19
|
/**
|
|
18
20
|
* Retrieves an OAuthApp by its ID.
|
|
19
21
|
* @param orgName Name of the Organization
|
|
20
22
|
* @param oauthAppId ID of the OAuthApp
|
|
21
23
|
* @returns the requested OAuthApp
|
|
22
24
|
*/
|
|
23
|
-
getOAuthApp(orgName: string, oauthAppId: string
|
|
25
|
+
getOAuthApp<R extends boolean = false>(orgName: string, oauthAppId: string, raw?: {
|
|
26
|
+
raw: R;
|
|
27
|
+
}): Promise<MaybeRaw<R, OAuthApp>>;
|
|
24
28
|
/**
|
|
25
29
|
* Creates a new OAuth app in the specified Organization.
|
|
26
30
|
* @param orgName Name of the Organization
|
|
27
31
|
* @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
|
|
28
32
|
* @returns The created OAuth app
|
|
29
33
|
*/
|
|
30
|
-
createOAuthApp(orgName: string, oAuthAppCreate: OAuthAppCreate
|
|
34
|
+
createOAuthApp<R extends boolean = false>(orgName: string, oAuthAppCreate: OAuthAppCreate, raw?: {
|
|
35
|
+
raw: R;
|
|
36
|
+
}): Promise<MaybeRaw<R, OAuthApp>>;
|
|
31
37
|
/**
|
|
32
38
|
* Updates an existing OAuth app.
|
|
33
39
|
* @param orgName Name of the Organization
|
|
@@ -35,13 +41,17 @@ export declare class IdpOAuthApp extends Base {
|
|
|
35
41
|
* @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
|
|
36
42
|
* @returns the updated OAuth app
|
|
37
43
|
*/
|
|
38
|
-
updateOAuthApp(orgName: string, oauthAppId: string, oAuthAppCreate: OAuthAppCreate
|
|
44
|
+
updateOAuthApp<R extends boolean = false>(orgName: string, oauthAppId: string, oAuthAppCreate: OAuthAppCreate, raw?: {
|
|
45
|
+
raw: R;
|
|
46
|
+
}): Promise<MaybeRaw<R, OAuthApp>>;
|
|
39
47
|
/**
|
|
40
48
|
* Deletes an OAuthApp by its ID.
|
|
41
49
|
* @param orgName Name of the Organization
|
|
42
50
|
* @param oauthAppId ID of the OAuthApp
|
|
43
51
|
*/
|
|
44
|
-
deleteOAuthApp(orgName: string, oauthAppId: string
|
|
52
|
+
deleteOAuthApp<R extends boolean = false>(orgName: string, oauthAppId: string, raw?: {
|
|
53
|
+
raw: R;
|
|
54
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
45
55
|
/**
|
|
46
56
|
* Creates a new secret for an existing OAuthApp.
|
|
47
57
|
* @param orgName Name of the Organization
|
|
@@ -49,7 +59,9 @@ export declare class IdpOAuthApp extends Base {
|
|
|
49
59
|
* @param secretName Name of the Secret
|
|
50
60
|
* @returns the updated OAuth app
|
|
51
61
|
*/
|
|
52
|
-
createOAuthAppSecret(orgName: string, oauthAppId: string, secretName: string
|
|
62
|
+
createOAuthAppSecret<R extends boolean = false>(orgName: string, oauthAppId: string, secretName: string, raw?: {
|
|
63
|
+
raw: R;
|
|
64
|
+
}): Promise<MaybeRaw<R, OAuthApp>>;
|
|
53
65
|
/**
|
|
54
66
|
* Deletes the specified OAuthApp secret.
|
|
55
67
|
* @param orgName Name of the Organization
|
|
@@ -57,6 +69,8 @@ export declare class IdpOAuthApp extends Base {
|
|
|
57
69
|
* @param secret Name of the secret that shall be deleted
|
|
58
70
|
* @returns the updated OAuthApp
|
|
59
71
|
*/
|
|
60
|
-
deleteOAuthAppSecret(orgName: string, oauthAppId: string, secret: string
|
|
72
|
+
deleteOAuthAppSecret<R extends boolean = false>(orgName: string, oauthAppId: string, secret: string, raw?: {
|
|
73
|
+
raw: R;
|
|
74
|
+
}): Promise<MaybeRaw<R, OAuthApp>>;
|
|
61
75
|
protected getEndpoint(endpoint: string): string;
|
|
62
76
|
}
|
|
@@ -23,8 +23,8 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
23
23
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
24
24
|
* @returns Object containing an array of OAuth apps and the total number of results found in the database (independent of limit and page)
|
|
25
25
|
*/
|
|
26
|
-
searchOauthAppsOfOrganization(_a) {
|
|
27
|
-
return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0,
|
|
26
|
+
searchOauthAppsOfOrganization(_a, raw_1) {
|
|
27
|
+
return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
28
28
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
29
29
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
30
30
|
});
|
|
@@ -32,7 +32,7 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
32
32
|
filters: filtersDTO,
|
|
33
33
|
sorting: sorting,
|
|
34
34
|
});
|
|
35
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
35
|
+
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));
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -41,10 +41,10 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
41
41
|
* @param oauthAppId ID of the OAuthApp
|
|
42
42
|
* @returns the requested OAuthApp
|
|
43
43
|
*/
|
|
44
|
-
getOAuthApp(orgName, oauthAppId) {
|
|
44
|
+
getOAuthApp(orgName, oauthAppId, raw) {
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
|
|
47
|
-
return resp.data;
|
|
47
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -53,10 +53,10 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
53
53
|
* @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
|
|
54
54
|
* @returns The created OAuth app
|
|
55
55
|
*/
|
|
56
|
-
createOAuthApp(orgName, oAuthAppCreate) {
|
|
56
|
+
createOAuthApp(orgName, oAuthAppCreate, raw) {
|
|
57
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
58
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth`), oAuthAppCreate);
|
|
59
|
-
return resp.data;
|
|
59
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -66,10 +66,10 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
66
66
|
* @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
|
|
67
67
|
* @returns the updated OAuth app
|
|
68
68
|
*/
|
|
69
|
-
updateOAuthApp(orgName, oauthAppId, oAuthAppCreate) {
|
|
69
|
+
updateOAuthApp(orgName, oauthAppId, oAuthAppCreate, raw) {
|
|
70
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
71
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`), oAuthAppCreate);
|
|
72
|
-
return resp.data;
|
|
72
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
@@ -77,9 +77,10 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
77
77
|
* @param orgName Name of the Organization
|
|
78
78
|
* @param oauthAppId ID of the OAuthApp
|
|
79
79
|
*/
|
|
80
|
-
deleteOAuthApp(orgName, oauthAppId) {
|
|
80
|
+
deleteOAuthApp(orgName, oauthAppId, raw) {
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
|
|
82
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
|
|
83
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
@@ -89,12 +90,12 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
89
90
|
* @param secretName Name of the Secret
|
|
90
91
|
* @returns the updated OAuth app
|
|
91
92
|
*/
|
|
92
|
-
createOAuthAppSecret(orgName, oauthAppId, secretName) {
|
|
93
|
+
createOAuthAppSecret(orgName, oauthAppId, secretName, raw) {
|
|
93
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
95
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}/secret`), {
|
|
95
96
|
secretName,
|
|
96
97
|
});
|
|
97
|
-
return resp.data;
|
|
98
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
/**
|
|
@@ -104,10 +105,10 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
104
105
|
* @param secret Name of the secret that shall be deleted
|
|
105
106
|
* @returns the updated OAuthApp
|
|
106
107
|
*/
|
|
107
|
-
deleteOAuthAppSecret(orgName, oauthAppId, secret) {
|
|
108
|
+
deleteOAuthAppSecret(orgName, oauthAppId, secret, raw) {
|
|
108
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
110
|
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}/secret/${secret}`));
|
|
110
|
-
return resp.data;
|
|
111
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
getEndpoint(endpoint) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Base from "../../../../Base";
|
|
2
|
+
import { Stats } from "../../../../interfaces/idp/organization/stats";
|
|
3
|
+
export declare class IdpOrganizationStat extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves usage statistics for a specific organization.
|
|
6
|
+
* @param orgName Name of the organization
|
|
7
|
+
* @returns Statistics information
|
|
8
|
+
*/
|
|
9
|
+
getStats(orgName: string): Promise<Stats>;
|
|
10
|
+
protected getEndpoint(endpoint: string): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IdpOrganizationStat = void 0;
|
|
13
|
+
const Base_1 = require("../../../../Base");
|
|
14
|
+
class IdpOrganizationStat extends Base_1.default {
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves usage statistics for a specific organization.
|
|
17
|
+
* @param orgName Name of the organization
|
|
18
|
+
* @returns Statistics information
|
|
19
|
+
*/
|
|
20
|
+
getStats(orgName) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const resp = yield this.axios.get(this.getEndpoint(`/${orgName}/stats`));
|
|
23
|
+
return resp.data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
getEndpoint(endpoint) {
|
|
27
|
+
return `${this.options.server}/api/account/v1/org${endpoint}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.IdpOrganizationStat = IdpOrganizationStat;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchFilter, SearchParams, Sorting } from "../../../../interfaces/global";
|
|
3
3
|
import { Team, TeamQueryOptions, TeamUsersPatchOperation } from "../../../../interfaces/idp/organization/team";
|
|
4
4
|
import { ReducedUser } from "../../../../interfaces/idp/user";
|
|
@@ -10,13 +10,17 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
10
10
|
* @param userIds List of User IDs to be added to the Team
|
|
11
11
|
* @returns The created Team
|
|
12
12
|
*/
|
|
13
|
-
createTeam(orgName: string, teamName: string, userIds: string[]
|
|
13
|
+
createTeam<R extends boolean = false>(orgName: string, teamName: string, userIds: string[], raw?: {
|
|
14
|
+
raw: R;
|
|
15
|
+
}): Promise<MaybeRaw<R, Team>>;
|
|
14
16
|
/**
|
|
15
17
|
* Deletes a Team.
|
|
16
18
|
* @param orgName Name of the Organization
|
|
17
19
|
* @param teamName Name of the Team
|
|
18
20
|
*/
|
|
19
|
-
deleteTeam(orgName: string, teamName: string
|
|
21
|
+
deleteTeam<R extends boolean = false>(orgName: string, teamName: string, raw?: {
|
|
22
|
+
raw: R;
|
|
23
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
20
24
|
/**
|
|
21
25
|
* Updates an existing Team.
|
|
22
26
|
* @param orgName Name of the Organization
|
|
@@ -26,14 +30,18 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
26
30
|
* @param teamUsersPatchOperation (optional) Enum describing what operation shall be executed: Add, set or remove
|
|
27
31
|
* @returns The updated Team object
|
|
28
32
|
*/
|
|
29
|
-
patchTeam(orgName: string, teamName: string, newName?: string, userIds?: string[], teamUsersPatchOperation?: TeamUsersPatchOperation
|
|
33
|
+
patchTeam<R extends boolean = false>(orgName: string, teamName: string, newName?: string, userIds?: string[], teamUsersPatchOperation?: TeamUsersPatchOperation, raw?: {
|
|
34
|
+
raw: R;
|
|
35
|
+
}): Promise<MaybeRaw<R, Team>>;
|
|
30
36
|
/**
|
|
31
37
|
* Retrieve a Team by its name.
|
|
32
38
|
* @param orgName Name of the Organization
|
|
33
39
|
* @param teamName Name of the Team
|
|
34
40
|
* @returns The requested Team
|
|
35
41
|
*/
|
|
36
|
-
getTeam(orgName: string, teamName: string
|
|
42
|
+
getTeam<R extends boolean = false>(orgName: string, teamName: string, raw?: {
|
|
43
|
+
raw: R;
|
|
44
|
+
}): Promise<MaybeRaw<R, Team>>;
|
|
37
45
|
/**
|
|
38
46
|
* Retrieves all Teams of an Organization that match the provided search filter(s). Returns all Teams if no search filter is provided.
|
|
39
47
|
* @param organizationName Name of the organization
|
|
@@ -44,14 +52,16 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
44
52
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
45
53
|
* @returns Object containing an array of Teams and the total number of results found in the database (independent of limit and page)
|
|
46
54
|
*/
|
|
47
|
-
searchTeams(params: {
|
|
55
|
+
searchTeams<R extends boolean = false>(params: {
|
|
48
56
|
organizationName: string;
|
|
49
57
|
filters: SearchFilter[];
|
|
50
58
|
sorting?: Sorting;
|
|
51
59
|
options?: TeamQueryOptions;
|
|
52
60
|
limit?: number;
|
|
53
61
|
page?: number;
|
|
54
|
-
}
|
|
62
|
+
}, raw?: {
|
|
63
|
+
raw: R;
|
|
64
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Team>>>;
|
|
55
65
|
/**
|
|
56
66
|
* Retrieves all Members of a Team that match the provided search filter(s). Returns all Members if no search filter is provided.
|
|
57
67
|
* @param organizationName Name of the organization
|
|
@@ -62,11 +72,13 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
62
72
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
63
73
|
* @returns Object containing an array of Team members and the total number of results found in the database (independent of limit and page)
|
|
64
74
|
*/
|
|
65
|
-
searchTeamMembers({ organizationName, teamName, filters, sorting, limit, page
|
|
75
|
+
searchTeamMembers<R extends boolean = false>({ organizationName, teamName, filters, sorting, limit, page }: SearchParams & {
|
|
66
76
|
organizationName: string;
|
|
67
77
|
teamName: string;
|
|
68
|
-
}
|
|
78
|
+
}, raw?: {
|
|
79
|
+
raw: R;
|
|
80
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<ReducedUser & {
|
|
69
81
|
email: string;
|
|
70
|
-
}
|
|
82
|
+
}>>>;
|
|
71
83
|
protected getEndpoint(endpoint: string): string;
|
|
72
84
|
}
|
|
@@ -21,10 +21,10 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
21
21
|
* @param userIds List of User IDs to be added to the Team
|
|
22
22
|
* @returns The created Team
|
|
23
23
|
*/
|
|
24
|
-
createTeam(orgName, teamName, userIds) {
|
|
24
|
+
createTeam(orgName, teamName, userIds, raw) {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
const resp = yield this.axios.post(this.getEndpoint(`/${orgName}/teams`), { name: teamName, userIds: userIds });
|
|
27
|
-
return resp.data;
|
|
27
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
@@ -32,9 +32,10 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
32
32
|
* @param orgName Name of the Organization
|
|
33
33
|
* @param teamName Name of the Team
|
|
34
34
|
*/
|
|
35
|
-
deleteTeam(orgName, teamName) {
|
|
35
|
+
deleteTeam(orgName, teamName, raw) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
yield this.axios.delete(this.getEndpoint(`/${orgName}/teams/${teamName}`));
|
|
37
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/${orgName}/teams/${teamName}`));
|
|
38
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
@@ -46,14 +47,14 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
46
47
|
* @param teamUsersPatchOperation (optional) Enum describing what operation shall be executed: Add, set or remove
|
|
47
48
|
* @returns The updated Team object
|
|
48
49
|
*/
|
|
49
|
-
patchTeam(orgName, teamName, newName, userIds, teamUsersPatchOperation) {
|
|
50
|
+
patchTeam(orgName, teamName, newName, userIds, teamUsersPatchOperation, raw) {
|
|
50
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
52
|
const resp = yield this.axios.patch(this.getEndpoint(`/${orgName}/teams/${teamName}`), {
|
|
52
53
|
name: newName,
|
|
53
54
|
userIds: userIds,
|
|
54
55
|
usersOperation: teamUsersPatchOperation,
|
|
55
56
|
});
|
|
56
|
-
return resp.data;
|
|
57
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
60
|
/**
|
|
@@ -62,10 +63,10 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
62
63
|
* @param teamName Name of the Team
|
|
63
64
|
* @returns The requested Team
|
|
64
65
|
*/
|
|
65
|
-
getTeam(orgName, teamName) {
|
|
66
|
+
getTeam(orgName, teamName, raw) {
|
|
66
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
68
|
const resp = yield this.axios.get(this.getEndpoint(`/${orgName}/teams/${teamName}`));
|
|
68
|
-
return resp.data;
|
|
69
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
/**
|
|
@@ -78,7 +79,7 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
78
79
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
79
80
|
* @returns Object containing an array of Teams and the total number of results found in the database (independent of limit and page)
|
|
80
81
|
*/
|
|
81
|
-
searchTeams(params) {
|
|
82
|
+
searchTeams(params, raw) {
|
|
82
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
84
|
var _a, _b;
|
|
84
85
|
const limit = params.limit || 25;
|
|
@@ -92,7 +93,7 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
92
93
|
filters: filtersDTO,
|
|
93
94
|
sorting: params.sorting,
|
|
94
95
|
});
|
|
95
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
96
|
+
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));
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
/**
|
|
@@ -105,8 +106,8 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
105
106
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
106
107
|
* @returns Object containing an array of Team members and the total number of results found in the database (independent of limit and page)
|
|
107
108
|
*/
|
|
108
|
-
searchTeamMembers(_a) {
|
|
109
|
-
return __awaiter(this, arguments, void 0, function* ({ organizationName, teamName, filters, sorting, limit = 25, page = 0,
|
|
109
|
+
searchTeamMembers(_a, raw_1) {
|
|
110
|
+
return __awaiter(this, arguments, void 0, function* ({ organizationName, teamName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
110
111
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
111
112
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
112
113
|
});
|
|
@@ -114,7 +115,7 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
114
115
|
filters: filtersDTO,
|
|
115
116
|
sorting: sorting,
|
|
116
117
|
});
|
|
117
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
118
|
+
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));
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { SuccessfulAuth } from "../../../interfaces/idp/user/SuccessfulAuth";
|
|
3
3
|
export declare class IdpRegistration extends Base {
|
|
4
4
|
/**
|
|
@@ -13,7 +13,9 @@ export declare class IdpRegistration extends Base {
|
|
|
13
13
|
* @param regionId - Optional region id
|
|
14
14
|
* @param targetUrl Optional url the link in the mail will point to
|
|
15
15
|
*/
|
|
16
|
-
register(name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string, validationCode?: string
|
|
16
|
+
register<R extends boolean = false>(name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string, validationCode?: string, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
17
19
|
/**
|
|
18
20
|
* Triggers the registration mail to be resend if the first one got lost
|
|
19
21
|
* @param name - Name of the User
|
|
@@ -24,7 +26,9 @@ export declare class IdpRegistration extends Base {
|
|
|
24
26
|
* @param regionId - Optional region id
|
|
25
27
|
* @param targetUrl Optional url the link in the mail will point to
|
|
26
28
|
*/
|
|
27
|
-
resendRegistrationMail(name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string
|
|
29
|
+
resendRegistrationMail<R extends boolean = false>(name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string, raw?: {
|
|
30
|
+
raw: R;
|
|
31
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
28
32
|
/**
|
|
29
33
|
* Validates a previous registration. If successful, the Users account status will be set to 'Active'.
|
|
30
34
|
* @param email - Email of the User
|
|
@@ -32,6 +36,8 @@ export declare class IdpRegistration extends Base {
|
|
|
32
36
|
* @param regionId - Optional region id
|
|
33
37
|
* @returns Bearer Token and User object
|
|
34
38
|
*/
|
|
35
|
-
validateRegistration(email: string, verificationCode: string
|
|
39
|
+
validateRegistration<R extends boolean = false>(email: string, verificationCode: string, raw?: {
|
|
40
|
+
raw: R;
|
|
41
|
+
}): Promise<MaybeRaw<R, SuccessfulAuth>>;
|
|
36
42
|
protected getEndpoint(endpoint: string): string;
|
|
37
43
|
}
|
|
@@ -24,9 +24,9 @@ class IdpRegistration extends Base_1.default {
|
|
|
24
24
|
* @param regionId - Optional region id
|
|
25
25
|
* @param targetUrl Optional url the link in the mail will point to
|
|
26
26
|
*/
|
|
27
|
-
register(name, email, password, captcha, company, regionId, targetUrl, validationCode) {
|
|
27
|
+
register(name, email, password, captcha, company, regionId, targetUrl, validationCode, raw) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
yield this.axios.post(this.getEndpoint("/v1/register"), {
|
|
29
|
+
const resp = yield this.axios.post(this.getEndpoint("/v1/register"), {
|
|
30
30
|
name: name,
|
|
31
31
|
email: email,
|
|
32
32
|
password: password,
|
|
@@ -35,6 +35,7 @@ class IdpRegistration extends Base_1.default {
|
|
|
35
35
|
regionId,
|
|
36
36
|
targetUrl,
|
|
37
37
|
}, { params: { validationCode } });
|
|
38
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
@@ -47,9 +48,9 @@ class IdpRegistration extends Base_1.default {
|
|
|
47
48
|
* @param regionId - Optional region id
|
|
48
49
|
* @param targetUrl Optional url the link in the mail will point to
|
|
49
50
|
*/
|
|
50
|
-
resendRegistrationMail(name, email, password, captcha, company, regionId, targetUrl) {
|
|
51
|
+
resendRegistrationMail(name, email, password, captcha, company, regionId, targetUrl, raw) {
|
|
51
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
yield this.axios.patch(this.getEndpoint("/v1/register/resendRegistrationEmail"), {
|
|
53
|
+
const resp = yield this.axios.patch(this.getEndpoint("/v1/register/resendRegistrationEmail"), {
|
|
53
54
|
name: name,
|
|
54
55
|
email: email,
|
|
55
56
|
password: password,
|
|
@@ -58,6 +59,7 @@ class IdpRegistration extends Base_1.default {
|
|
|
58
59
|
regionId,
|
|
59
60
|
targetUrl,
|
|
60
61
|
});
|
|
62
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
/**
|
|
@@ -67,17 +69,21 @@ class IdpRegistration extends Base_1.default {
|
|
|
67
69
|
* @param regionId - Optional region id
|
|
68
70
|
* @returns Bearer Token and User object
|
|
69
71
|
*/
|
|
70
|
-
validateRegistration(email, verificationCode) {
|
|
72
|
+
validateRegistration(email, verificationCode, raw) {
|
|
71
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
var _a;
|
|
74
|
+
var _a, _b;
|
|
73
75
|
const resp = yield this.axios.patch(this.getEndpoint("/v1/register/verify"), {
|
|
74
76
|
email,
|
|
75
77
|
verificationCode,
|
|
76
78
|
});
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw)
|
|
80
|
+
? Object.assign(Object.assign({}, resp), { data: {
|
|
81
|
+
token: ((_a = resp.headers["authorization"]) === null || _a === void 0 ? void 0 : _a.toString()) || "",
|
|
82
|
+
user: resp.data,
|
|
83
|
+
} }) : {
|
|
84
|
+
token: ((_b = resp.headers["authorization"]) === null || _b === void 0 ? void 0 : _b.toString()) || "",
|
|
79
85
|
user: resp.data,
|
|
80
|
-
};
|
|
86
|
+
});
|
|
81
87
|
});
|
|
82
88
|
}
|
|
83
89
|
getEndpoint(endpoint) {
|