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 { FuseSpace as IFuseSpace, FuseSpaceEntityPermission as SpaceEntityPermission, FuseSpacePermission as SpacePermission } from "../../../interfaces/fuse/space";
|
|
3
3
|
import { PaginatedResponse, SearchParams } from "../../../interfaces/global";
|
|
4
4
|
import { FuseCronjob } from "./cronjob";
|
|
@@ -11,20 +11,26 @@ export declare class FuseSpace extends Base {
|
|
|
11
11
|
* @param spaceName Name of the space
|
|
12
12
|
* @returns The requested space
|
|
13
13
|
*/
|
|
14
|
-
getSpace(orgName: string, spaceName: string
|
|
14
|
+
getSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
15
|
+
raw: R;
|
|
16
|
+
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
15
17
|
/**
|
|
16
18
|
* Creates a new Fuse space
|
|
17
19
|
* @param orgName Name of the organization
|
|
18
20
|
* @param name Name of the space to be created
|
|
19
21
|
* @returns The created space
|
|
20
22
|
*/
|
|
21
|
-
createSpace(orgName: string, name: string
|
|
23
|
+
createSpace<R extends boolean = false>(orgName: string, name: string, raw?: {
|
|
24
|
+
raw: R;
|
|
25
|
+
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
22
26
|
/**
|
|
23
27
|
* Deletes a space by its name
|
|
24
28
|
* @param orgName Name of the organization
|
|
25
29
|
* @param spaceName Name of the space
|
|
26
30
|
*/
|
|
27
|
-
deleteSpace(orgName: string, spaceName: string
|
|
31
|
+
deleteSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
28
34
|
/**
|
|
29
35
|
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
30
36
|
* @param orgName Name of the organization
|
|
@@ -33,7 +39,9 @@ export declare class FuseSpace extends Base {
|
|
|
33
39
|
* @param permission New permission
|
|
34
40
|
* @returns The Fuse space with the updated permissions
|
|
35
41
|
*/
|
|
36
|
-
updateUserSpacePermission(orgName: string, spaceName: string, userId: string, permission: SpacePermission
|
|
42
|
+
updateUserSpacePermission<R extends boolean = false>(orgName: string, spaceName: string, userId: string, permission: SpacePermission, raw?: {
|
|
43
|
+
raw: R;
|
|
44
|
+
}): Promise<MaybeRaw<R, SpaceEntityPermission>>;
|
|
37
45
|
/**
|
|
38
46
|
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
39
47
|
* @param orgName Name of the organization
|
|
@@ -42,7 +50,9 @@ export declare class FuseSpace extends Base {
|
|
|
42
50
|
* @param permission New permission
|
|
43
51
|
* @returns The Fuse space with the updated permissions
|
|
44
52
|
*/
|
|
45
|
-
updateTeamSpacePermission(orgName: string, spaceName: string, teamName: string, permission: SpacePermission
|
|
53
|
+
updateTeamSpacePermission<R extends boolean = false>(orgName: string, spaceName: string, teamName: string, permission: SpacePermission, raw?: {
|
|
54
|
+
raw: R;
|
|
55
|
+
}): Promise<MaybeRaw<R, SpaceEntityPermission>>;
|
|
46
56
|
/**
|
|
47
57
|
* Retrieves all Fuse spaces of an organization which match the provided search filter(s). Will return all spaces of the organization if no filter is provided.
|
|
48
58
|
* @param orgName Name of the organization
|
|
@@ -52,9 +62,11 @@ export declare class FuseSpace extends Base {
|
|
|
52
62
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
53
63
|
* @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
|
|
54
64
|
*/
|
|
55
|
-
searchSpaces({ orgName, filters, sorting, limit, page
|
|
65
|
+
searchSpaces<R extends boolean = false>({ orgName, filters, sorting, limit, page }: SearchParams & {
|
|
56
66
|
orgName: string;
|
|
57
|
-
}
|
|
67
|
+
}, raw?: {
|
|
68
|
+
raw: R;
|
|
69
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<IFuseSpace>>>;
|
|
58
70
|
/**
|
|
59
71
|
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
60
72
|
* @param orgName Name of the organization
|
|
@@ -65,10 +77,12 @@ export declare class FuseSpace extends Base {
|
|
|
65
77
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
66
78
|
* @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
67
79
|
*/
|
|
68
|
-
searchSpacePermissions({ orgName, spaceName, filters, sorting, limit, page
|
|
80
|
+
searchSpacePermissions<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
|
|
69
81
|
orgName: string;
|
|
70
82
|
spaceName: string;
|
|
71
|
-
}
|
|
83
|
+
}, raw?: {
|
|
84
|
+
raw: R;
|
|
85
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<SpaceEntityPermission>>>;
|
|
72
86
|
/**
|
|
73
87
|
* Updates the name of a space.
|
|
74
88
|
* @param orgName Name of the organization
|
|
@@ -76,6 +90,8 @@ export declare class FuseSpace extends Base {
|
|
|
76
90
|
* @param newSpaceName New name for the space
|
|
77
91
|
* @returns The updated space
|
|
78
92
|
*/
|
|
79
|
-
renameSpace(orgName: string, spaceName: string, newSpaceName: string
|
|
93
|
+
renameSpace<R extends boolean = false>(orgName: string, spaceName: string, newSpaceName: string, raw?: {
|
|
94
|
+
raw: R;
|
|
95
|
+
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
80
96
|
protected getEndpoint(endpoint: string): string;
|
|
81
97
|
}
|
|
@@ -27,10 +27,10 @@ class FuseSpace extends Base_1.default {
|
|
|
27
27
|
* @param spaceName Name of the space
|
|
28
28
|
* @returns The requested space
|
|
29
29
|
*/
|
|
30
|
-
getSpace(orgName, spaceName) {
|
|
30
|
+
getSpace(orgName, spaceName, raw) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
33
|
-
return resp.data;
|
|
33
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -39,10 +39,10 @@ class FuseSpace extends Base_1.default {
|
|
|
39
39
|
* @param name Name of the space to be created
|
|
40
40
|
* @returns The created space
|
|
41
41
|
*/
|
|
42
|
-
createSpace(orgName, name) {
|
|
42
|
+
createSpace(orgName, name, raw) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
|
|
45
|
-
return resp.data;
|
|
45
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
@@ -50,9 +50,10 @@ class FuseSpace extends Base_1.default {
|
|
|
50
50
|
* @param orgName Name of the organization
|
|
51
51
|
* @param spaceName Name of the space
|
|
52
52
|
*/
|
|
53
|
-
deleteSpace(orgName, spaceName) {
|
|
53
|
+
deleteSpace(orgName, spaceName, raw) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
55
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
56
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
@@ -63,13 +64,13 @@ class FuseSpace extends Base_1.default {
|
|
|
63
64
|
* @param permission New permission
|
|
64
65
|
* @returns The Fuse space with the updated permissions
|
|
65
66
|
*/
|
|
66
|
-
updateUserSpacePermission(orgName, spaceName, userId, permission) {
|
|
67
|
+
updateUserSpacePermission(orgName, spaceName, userId, permission, raw) {
|
|
67
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
69
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
|
|
69
70
|
userId,
|
|
70
71
|
permission,
|
|
71
72
|
});
|
|
72
|
-
return resp.data;
|
|
73
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
@@ -80,13 +81,13 @@ class FuseSpace extends Base_1.default {
|
|
|
80
81
|
* @param permission New permission
|
|
81
82
|
* @returns The Fuse space with the updated permissions
|
|
82
83
|
*/
|
|
83
|
-
updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
|
|
84
|
+
updateTeamSpacePermission(orgName, spaceName, teamName, permission, raw) {
|
|
84
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
86
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
|
|
86
87
|
teamName,
|
|
87
88
|
permission,
|
|
88
89
|
});
|
|
89
|
-
return resp.data;
|
|
90
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
/**
|
|
@@ -98,8 +99,8 @@ class FuseSpace extends Base_1.default {
|
|
|
98
99
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
99
100
|
* @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
|
|
100
101
|
*/
|
|
101
|
-
searchSpaces(_a) {
|
|
102
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0,
|
|
102
|
+
searchSpaces(_a, raw_1) {
|
|
103
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
103
104
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
104
105
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
105
106
|
});
|
|
@@ -107,7 +108,7 @@ class FuseSpace extends Base_1.default {
|
|
|
107
108
|
filters: filtersDTO,
|
|
108
109
|
sorting,
|
|
109
110
|
});
|
|
110
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
111
|
+
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));
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
@@ -120,14 +121,14 @@ class FuseSpace extends Base_1.default {
|
|
|
120
121
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
121
122
|
* @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
122
123
|
*/
|
|
123
|
-
searchSpacePermissions(_a) {
|
|
124
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0,
|
|
124
|
+
searchSpacePermissions(_a, raw_1) {
|
|
125
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
125
126
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
126
127
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
|
|
127
128
|
filters: filtersDTO,
|
|
128
129
|
sorting: sorting,
|
|
129
130
|
});
|
|
130
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
131
|
+
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));
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
134
|
/**
|
|
@@ -137,12 +138,12 @@ class FuseSpace extends Base_1.default {
|
|
|
137
138
|
* @param newSpaceName New name for the space
|
|
138
139
|
* @returns The updated space
|
|
139
140
|
*/
|
|
140
|
-
renameSpace(orgName, spaceName, newSpaceName) {
|
|
141
|
+
renameSpace(orgName, spaceName, newSpaceName, raw) {
|
|
141
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
143
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
|
|
143
144
|
newSpaceName,
|
|
144
145
|
});
|
|
145
|
-
return resp.data;
|
|
146
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
146
147
|
});
|
|
147
148
|
}
|
|
148
149
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { High5OrganizationExecutionLogs } from "./log/index";
|
|
3
3
|
import { High5OrganizationExecutionStates } from "./status/index";
|
|
4
4
|
export declare class High5OrganizationExecute extends Base {
|
|
@@ -13,6 +13,8 @@ export declare class High5OrganizationExecute extends Base {
|
|
|
13
13
|
* @param high5ExecutionId ID of the stream execution
|
|
14
14
|
* @returns 204 No Content
|
|
15
15
|
*/
|
|
16
|
-
cancelExecution(orgName: string, spaceName: string, high5ExecutionId: string
|
|
16
|
+
cancelExecution<R extends boolean = false>(orgName: string, spaceName: string, high5ExecutionId: string, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
17
19
|
protected getEndpoint(endpoint: string): string;
|
|
18
20
|
}
|
|
@@ -33,9 +33,10 @@ class High5OrganizationExecute extends Base_1.default {
|
|
|
33
33
|
* @param high5ExecutionId ID of the stream execution
|
|
34
34
|
* @returns 204 No Content
|
|
35
35
|
*/
|
|
36
|
-
cancelExecution(orgName, spaceName, high5ExecutionId) {
|
|
36
|
+
cancelExecution(orgName, spaceName, high5ExecutionId, raw) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/${high5ExecutionId}/cancel`));
|
|
38
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/${high5ExecutionId}/cancel`));
|
|
39
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
3
3
|
import { High5ExecutionStatus } from "../../../../interfaces/high5/space/execution";
|
|
4
4
|
export declare class High5OrganizationExecutionStates extends Base {
|
|
@@ -11,8 +11,10 @@ export declare class High5OrganizationExecutionStates 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 Stream execution logs as well as the total number of results
|
|
13
13
|
*/
|
|
14
|
-
searchExecutionStates({ orgName, filters, sorting, limit, page
|
|
14
|
+
searchExecutionStates<R extends boolean = false>({ orgName, filters, sorting, limit, page }: SearchParams & {
|
|
15
15
|
orgName: string;
|
|
16
|
-
}
|
|
16
|
+
}, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<High5ExecutionStatus>>>;
|
|
17
19
|
protected getEndpoint(endpoint: string): string;
|
|
18
20
|
}
|
|
@@ -23,14 +23,14 @@ class High5OrganizationExecutionStates 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 Stream execution logs as well as the total number of results
|
|
25
25
|
*/
|
|
26
|
-
searchExecutionStates(_a) {
|
|
27
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0,
|
|
26
|
+
searchExecutionStates(_a, raw_1) {
|
|
27
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
28
28
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
29
29
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/execution/status/search?page=${page}&limit=${limit}`), {
|
|
30
30
|
filters: filtersDTO,
|
|
31
31
|
sorting: sorting,
|
|
32
32
|
});
|
|
33
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
33
|
+
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));
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
getEndpoint(endpoint) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import Base from "../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../Base";
|
|
2
2
|
import { Version } from "../../interfaces/global";
|
|
3
3
|
import { High5OrganizationExecute } from "./execution";
|
|
4
4
|
import { High5Internal } from "./internal";
|
|
5
5
|
import { High5JoinToken } from "./joinToken";
|
|
6
6
|
import { High5Space } from "./space";
|
|
7
|
+
import { High5OrgStat } from "./stat";
|
|
7
8
|
import { High5Wave } from "./wave";
|
|
8
9
|
export default class High5 extends Base {
|
|
9
10
|
get space(): High5Space;
|
|
@@ -16,10 +17,14 @@ export default class High5 extends Base {
|
|
|
16
17
|
private _joinToken?;
|
|
17
18
|
get execution(): High5OrganizationExecute;
|
|
18
19
|
private _execution?;
|
|
20
|
+
get stat(): High5OrgStat;
|
|
21
|
+
private _stat?;
|
|
19
22
|
/**
|
|
20
23
|
* Requests the endpoint version
|
|
21
24
|
* @returns Version object
|
|
22
25
|
*/
|
|
23
|
-
version(
|
|
26
|
+
version<R extends boolean = false>(raw?: {
|
|
27
|
+
raw: R;
|
|
28
|
+
}): Promise<MaybeRaw<R, Version>>;
|
|
24
29
|
protected getEndpoint(endpoint: string): string;
|
|
25
30
|
}
|
|
@@ -14,6 +14,7 @@ const execution_1 = require("./execution");
|
|
|
14
14
|
const internal_1 = require("./internal");
|
|
15
15
|
const joinToken_1 = require("./joinToken");
|
|
16
16
|
const space_1 = require("./space");
|
|
17
|
+
const stat_1 = require("./stat");
|
|
17
18
|
const wave_1 = require("./wave");
|
|
18
19
|
class High5 extends Base_1.default {
|
|
19
20
|
get space() {
|
|
@@ -46,14 +47,20 @@ class High5 extends Base_1.default {
|
|
|
46
47
|
}
|
|
47
48
|
return this._execution;
|
|
48
49
|
}
|
|
50
|
+
get stat() {
|
|
51
|
+
if (this._stat === undefined) {
|
|
52
|
+
this._stat = new stat_1.High5OrgStat(this.options, this.axios);
|
|
53
|
+
}
|
|
54
|
+
return this._stat;
|
|
55
|
+
}
|
|
49
56
|
/**
|
|
50
57
|
* Requests the endpoint version
|
|
51
58
|
* @returns Version object
|
|
52
59
|
*/
|
|
53
|
-
version() {
|
|
60
|
+
version(raw) {
|
|
54
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
62
|
const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
|
|
56
|
-
return resp.data;
|
|
63
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
57
64
|
});
|
|
58
65
|
}
|
|
59
66
|
getEndpoint(endpoint) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { High5SpaceInternal } from "./space";
|
|
3
3
|
export declare class High5Internal extends Base {
|
|
4
4
|
get space(): High5SpaceInternal;
|
|
5
5
|
private _space?;
|
|
6
|
-
deleteUsers(userIds: string[]
|
|
6
|
+
deleteUsers<R extends boolean = false>(userIds: string[], raw?: {
|
|
7
|
+
raw: R;
|
|
8
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
7
9
|
protected getEndpoint(endpoint: string): string;
|
|
8
10
|
}
|
|
@@ -19,9 +19,10 @@ class High5Internal extends Base_1.default {
|
|
|
19
19
|
}
|
|
20
20
|
return this._space;
|
|
21
21
|
}
|
|
22
|
-
deleteUsers(userIds) {
|
|
22
|
+
deleteUsers(userIds, raw) {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
yield this.axios.delete(this.getEndpoint("/v1/users"), { data: { userIds } });
|
|
24
|
+
const resp = yield this.axios.delete(this.getEndpoint("/v1/users"), { data: { userIds } });
|
|
25
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
getEndpoint(endpoint) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import Base, { Options } from "../../../../Base";
|
|
2
|
+
import Base, { MaybeRaw, Options } from "../../../../Base";
|
|
3
|
+
import { High5JobInternal } from "./job";
|
|
3
4
|
export declare class High5SpaceInternal extends Base {
|
|
5
|
+
get job(): High5JobInternal;
|
|
6
|
+
private _job?;
|
|
4
7
|
constructor(options: Options, axios: AxiosInstance);
|
|
5
8
|
/**
|
|
6
9
|
* Deletes all spaces of an organization.
|
|
@@ -8,7 +11,9 @@ export declare class High5SpaceInternal extends Base {
|
|
|
8
11
|
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
9
12
|
* @param orgName Name of the organization
|
|
10
13
|
*/
|
|
11
|
-
deleteAllSpacesOfOrganization(orgName: string
|
|
14
|
+
deleteAllSpacesOfOrganization<R extends boolean = false>(orgName: string, raw?: {
|
|
15
|
+
raw: R;
|
|
16
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
12
17
|
/**
|
|
13
18
|
* Removes the user from all spaces of an organization.
|
|
14
19
|
*
|
|
@@ -16,6 +21,8 @@ export declare class High5SpaceInternal extends Base {
|
|
|
16
21
|
* @param orgName Name of the organization
|
|
17
22
|
* @param userId ID of the user
|
|
18
23
|
*/
|
|
19
|
-
removeUserFromAllSpacesOfOrganization(orgName: string, userId: string
|
|
24
|
+
removeUserFromAllSpacesOfOrganization<R extends boolean = false>(orgName: string, userId: string, raw?: {
|
|
25
|
+
raw: R;
|
|
26
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
20
27
|
protected getEndpoint(endpoint: string): string;
|
|
21
28
|
}
|
|
@@ -11,7 +11,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.High5SpaceInternal = void 0;
|
|
13
13
|
const Base_1 = require("../../../../Base");
|
|
14
|
+
const job_1 = require("./job");
|
|
14
15
|
class High5SpaceInternal extends Base_1.default {
|
|
16
|
+
get job() {
|
|
17
|
+
if (this._job === undefined) {
|
|
18
|
+
this._job = new job_1.High5JobInternal(this.options, this.axios);
|
|
19
|
+
}
|
|
20
|
+
return this._job;
|
|
21
|
+
}
|
|
15
22
|
constructor(options, axios) {
|
|
16
23
|
super(options, axios);
|
|
17
24
|
}
|
|
@@ -21,9 +28,10 @@ class High5SpaceInternal extends Base_1.default {
|
|
|
21
28
|
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
22
29
|
* @param orgName Name of the organization
|
|
23
30
|
*/
|
|
24
|
-
deleteAllSpacesOfOrganization(orgName) {
|
|
31
|
+
deleteAllSpacesOfOrganization(orgName, raw) {
|
|
25
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
|
|
33
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
|
|
34
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
27
35
|
});
|
|
28
36
|
}
|
|
29
37
|
/**
|
|
@@ -33,9 +41,10 @@ class High5SpaceInternal extends Base_1.default {
|
|
|
33
41
|
* @param orgName Name of the organization
|
|
34
42
|
* @param userId ID of the user
|
|
35
43
|
*/
|
|
36
|
-
removeUserFromAllSpacesOfOrganization(orgName, userId) {
|
|
44
|
+
removeUserFromAllSpacesOfOrganization(orgName, userId, raw) {
|
|
37
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
|
|
46
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
|
|
47
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
39
48
|
});
|
|
40
49
|
}
|
|
41
50
|
getEndpoint(endpoint) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.High5JobInternal = void 0;
|
|
4
|
+
const Base_1 = require("../../../../../Base");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
class High5JobInternal extends Base_1.default {
|
|
7
|
+
get jobLog() {
|
|
8
|
+
if (this._jobLog === undefined) {
|
|
9
|
+
this._jobLog = new log_1.High5JobLogInternal(this.options, this.axios);
|
|
10
|
+
}
|
|
11
|
+
return this._jobLog;
|
|
12
|
+
}
|
|
13
|
+
getEndpoint(endpoint) {
|
|
14
|
+
return `${this.options.server}/api/high5/internal${endpoint}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.High5JobInternal = High5JobInternal;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
|
+
import { JobLogCreate, JobLogDto } from "../../../../../../interfaces/high5/space/job/JobLog";
|
|
3
|
+
export declare class High5JobLogInternal extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a log for a cronjob.
|
|
6
|
+
*
|
|
7
|
+
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
8
|
+
* @param orgName Name of the organization
|
|
9
|
+
* @param spaceName Name of the High5 space
|
|
10
|
+
* @param createJobLog Cronjob log to be created
|
|
11
|
+
* @returns the created cronjob log with metadata
|
|
12
|
+
*/
|
|
13
|
+
createJobLog<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, log: JobLogCreate, raw?: {
|
|
14
|
+
raw: R;
|
|
15
|
+
}): Promise<MaybeRaw<R, JobLogDto>>;
|
|
16
|
+
protected getEndpoint(endpoint: string): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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.High5JobLogInternal = void 0;
|
|
13
|
+
const Base_1 = require("../../../../../../Base");
|
|
14
|
+
class High5JobLogInternal extends Base_1.default {
|
|
15
|
+
/**
|
|
16
|
+
* Creates a log for a cronjob.
|
|
17
|
+
*
|
|
18
|
+
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
19
|
+
* @param orgName Name of the organization
|
|
20
|
+
* @param spaceName Name of the High5 space
|
|
21
|
+
* @param createJobLog Cronjob log to be created
|
|
22
|
+
* @returns the created cronjob log with metadata
|
|
23
|
+
*/
|
|
24
|
+
createJobLog(orgName, spaceName, jobId, log, raw) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/logs}`), log);
|
|
27
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
getEndpoint(endpoint) {
|
|
31
|
+
return `${this.options.server}/api/high5/internal${endpoint}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.High5JobLogInternal = High5JobLogInternal;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
2
|
+
import Base, { MaybeRaw, Options } from "../../../Base";
|
|
3
3
|
import { PaginatedResponse } from "../../../interfaces/global";
|
|
4
4
|
import { JoinToken } from "../../../interfaces/high5/joinToken";
|
|
5
5
|
import { User } from "../../../interfaces/idp";
|
|
@@ -12,29 +12,37 @@ export declare class High5JoinToken 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 join tokens and the total number of results found in the database (independent of limit and page)
|
|
14
14
|
*/
|
|
15
|
-
get(orgName: string, limit?: number, page?: number
|
|
15
|
+
get<R extends boolean = false>(orgName: string, limit?: number, page?: number, raw?: {
|
|
16
|
+
raw: R;
|
|
17
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<JoinToken>>>;
|
|
16
18
|
/**
|
|
17
19
|
* Creates a join token for the specified organization
|
|
18
20
|
* @param orgName Name of the Organization
|
|
19
21
|
* @param name Name of the Join Token
|
|
20
22
|
* @returns Created join token
|
|
21
23
|
*/
|
|
22
|
-
create(orgName: string, name: string
|
|
24
|
+
create<R extends boolean = false>(orgName: string, name: string, raw?: {
|
|
25
|
+
raw: R;
|
|
26
|
+
}): Promise<MaybeRaw<R, JoinToken>>;
|
|
23
27
|
/**
|
|
24
28
|
* Revokes a join token of the specified organization
|
|
25
29
|
* @param orgName Name of the Organization
|
|
26
30
|
* @param tokenId ID of the Join Token
|
|
27
31
|
*/
|
|
28
|
-
revoke(orgName: string, tokenId: string
|
|
32
|
+
revoke<R extends boolean = false>(orgName: string, tokenId: string, raw?: {
|
|
33
|
+
raw: R;
|
|
34
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
29
35
|
/**
|
|
30
36
|
* Exchanges a join token for an agent user
|
|
31
37
|
*
|
|
32
38
|
* @param joinToken Join token
|
|
33
39
|
* @returns An object containing the User object and the PAT that represents the agent user
|
|
34
40
|
*/
|
|
35
|
-
exchange(joinToken: string
|
|
41
|
+
exchange<R extends boolean = false>(joinToken: string, raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, {
|
|
36
44
|
user: User;
|
|
37
45
|
pat: string;
|
|
38
|
-
}
|
|
46
|
+
}>>;
|
|
39
47
|
protected getEndpoint(endpoint: string): string;
|
|
40
48
|
}
|
|
@@ -23,12 +23,12 @@ class High5JoinToken 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 join tokens and the total number of results found in the database (independent of limit and page)
|
|
25
25
|
*/
|
|
26
|
-
get(orgName, limit, page) {
|
|
26
|
+
get(orgName, limit, page, raw) {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
limit = limit || 25;
|
|
29
29
|
page = page || 0;
|
|
30
30
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/join/token?page=${page}&limit=${limit}`));
|
|
31
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
31
|
+
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));
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
@@ -37,10 +37,10 @@ class High5JoinToken extends Base_1.default {
|
|
|
37
37
|
* @param name Name of the Join Token
|
|
38
38
|
* @returns Created join token
|
|
39
39
|
*/
|
|
40
|
-
create(orgName, name) {
|
|
40
|
+
create(orgName, name, raw) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/join/token`), { name });
|
|
43
|
-
return resp.data;
|
|
43
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -48,9 +48,10 @@ class High5JoinToken extends Base_1.default {
|
|
|
48
48
|
* @param orgName Name of the Organization
|
|
49
49
|
* @param tokenId ID of the Join Token
|
|
50
50
|
*/
|
|
51
|
-
revoke(orgName, tokenId) {
|
|
51
|
+
revoke(orgName, tokenId, raw) {
|
|
52
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/join/token/${tokenId}`));
|
|
53
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/join/token/${tokenId}`));
|
|
54
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
@@ -59,10 +60,10 @@ class High5JoinToken extends Base_1.default {
|
|
|
59
60
|
* @param joinToken Join token
|
|
60
61
|
* @returns An object containing the User object and the PAT that represents the agent user
|
|
61
62
|
*/
|
|
62
|
-
exchange(joinToken) {
|
|
63
|
+
exchange(joinToken, raw) {
|
|
63
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const
|
|
65
|
-
return { user:
|
|
65
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/join/token`), {}, { headers: { Authorization: joinToken } });
|
|
66
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: { user: resp.data, pat: resp.headers.authorization } }) : { user: resp.data, pat: resp.headers.authorization });
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
getEndpoint(endpoint) {
|