hcloud-sdk 0.0.15 → 14.13.2
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/README.md +1 -0
- package/changelog.md +809 -0
- package/index.d.ts +3 -2
- package/index.js +5 -2
- package/lib/Base.d.ts +26 -0
- package/lib/Base.js +12 -0
- package/lib/Hcloud.d.ts +80 -0
- package/lib/Hcloud.js +134 -0
- package/lib/helper/ErrorHelper.d.ts +7 -0
- package/lib/helper/ErrorHelper.js +19 -0
- package/lib/helper/paginatedResponseHelper.d.ts +3 -0
- package/lib/helper/paginatedResponseHelper.js +9 -0
- package/lib/helper/searchFilter.d.ts +9 -0
- package/lib/helper/searchFilter.js +12 -0
- package/lib/interfaces/agent/bundle/dev/index.d.ts +3 -0
- package/lib/interfaces/agent/context/index.d.ts +19 -0
- package/lib/interfaces/agent/index.d.ts +21 -0
- package/lib/interfaces/agent/index.js +2 -0
- package/lib/interfaces/auditor/index.d.ts +72 -0
- package/lib/interfaces/{Auditor.js → auditor/index.js} +21 -5
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/axios/index.js +8 -0
- package/lib/interfaces/bouncer/features/index.d.ts +10 -0
- package/lib/interfaces/bouncer/features/index.js +2 -0
- package/lib/interfaces/bouncer/index.d.ts +6 -0
- package/lib/interfaces/bouncer/index.js +17 -0
- package/lib/interfaces/dali/index.d.ts +3 -0
- package/lib/interfaces/dali/index.js +2 -0
- package/lib/interfaces/frontend/config/index.d.ts +33 -0
- package/lib/interfaces/frontend/config/index.js +10 -0
- package/lib/interfaces/fuse/index.d.ts +3 -0
- package/lib/interfaces/fuse/index.js +19 -0
- package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +38 -0
- package/lib/interfaces/fuse/space/cronjob/Cronjob.js +8 -0
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +16 -0
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.js +2 -0
- package/lib/interfaces/fuse/space/index.d.ts +21 -0
- package/lib/interfaces/fuse/space/index.js +11 -0
- package/lib/interfaces/global/HCloudError.d.ts +8 -0
- package/lib/interfaces/global/HCloudError.js +13 -0
- package/lib/interfaces/global/Header.d.ts +4 -0
- package/lib/interfaces/global/Header.js +2 -0
- package/lib/interfaces/global/HttpMethod.d.ts +7 -0
- package/lib/interfaces/global/HttpMethod.js +11 -0
- package/lib/interfaces/global/PaginatedResponse.d.ts +4 -0
- package/lib/interfaces/global/PaginatedResponse.js +2 -0
- package/lib/interfaces/global/Products.d.ts +11 -0
- package/lib/interfaces/global/Products.js +15 -0
- package/lib/interfaces/global/SearchFilters.d.ts +86 -0
- package/lib/interfaces/global/SearchFilters.js +49 -0
- package/lib/interfaces/global/Space.d.ts +20 -0
- package/lib/interfaces/global/Space.js +8 -0
- package/lib/interfaces/global/Version.d.ts +3 -0
- package/lib/interfaces/global/Version.js +2 -0
- package/lib/interfaces/global/Views.d.ts +8 -0
- package/lib/interfaces/global/Views.js +12 -0
- package/lib/interfaces/global/index.d.ts +9 -0
- package/lib/interfaces/global/index.js +25 -0
- package/lib/interfaces/high5/index.d.ts +16 -0
- package/lib/interfaces/high5/index.js +32 -0
- package/lib/interfaces/high5/joinToken/index.d.ts +10 -0
- package/lib/interfaces/high5/joinToken/index.js +2 -0
- package/lib/interfaces/high5/space/event/index.d.ts +15 -0
- package/lib/interfaces/high5/space/event/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/DesignOperation.d.ts +68 -0
- package/lib/interfaces/high5/space/event/stream/design/DesignOperation.js +20 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +92 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.js +20 -0
- package/lib/interfaces/high5/space/event/stream/design/index.d.ts +22 -0
- package/lib/interfaces/high5/space/event/stream/design/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/snapshot/index.d.ts +30 -0
- package/lib/interfaces/high5/space/event/stream/design/snapshot/index.js +8 -0
- package/lib/interfaces/high5/space/event/stream/index.d.ts +77 -0
- package/lib/interfaces/high5/space/event/stream/index.js +13 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +60 -0
- package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +137 -0
- package/lib/interfaces/high5/space/execution/index.js +21 -0
- package/lib/interfaces/high5/space/index.d.ts +23 -0
- package/lib/interfaces/high5/space/index.js +12 -0
- package/lib/interfaces/high5/space/secret/index.d.ts +12 -0
- package/lib/interfaces/high5/space/secret/index.js +2 -0
- package/lib/interfaces/high5/space/webhook/index.d.ts +75 -0
- package/lib/interfaces/high5/space/webhook/index.js +9 -0
- package/lib/interfaces/high5/wave/index.d.ts +171 -0
- package/lib/interfaces/high5/wave/index.js +52 -0
- package/lib/interfaces/idp/index.d.ts +26 -0
- package/lib/interfaces/idp/index.js +38 -0
- package/lib/interfaces/idp/oauth/index.d.ts +19 -0
- package/lib/interfaces/idp/oauth/index.js +8 -0
- package/lib/interfaces/idp/organization/index.d.ts +32 -0
- package/lib/interfaces/idp/organization/index.js +25 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +84 -0
- package/lib/interfaces/idp/organization/license/index.js +15 -0
- package/lib/interfaces/idp/organization/member/index.d.ts +15 -0
- package/lib/interfaces/idp/organization/member/index.js +2 -0
- package/lib/interfaces/idp/organization/member/invitations/index.d.ts +26 -0
- package/lib/interfaces/idp/organization/member/invitations/index.js +18 -0
- package/lib/interfaces/idp/organization/settings/domain/index.d.ts +19 -0
- package/lib/interfaces/idp/organization/settings/domain/index.js +8 -0
- package/lib/interfaces/idp/organization/settings/domain/saml/index.d.ts +10 -0
- package/lib/interfaces/idp/organization/settings/domain/saml/index.js +2 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +37 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +24 -0
- package/lib/interfaces/idp/organization/team/index.js +9 -0
- package/lib/interfaces/idp/user/ConnectionSettings.d.ts +6 -0
- package/lib/interfaces/idp/user/ConnectionSettings.js +2 -0
- package/lib/interfaces/idp/user/GeneralSettings.d.ts +44 -0
- package/lib/interfaces/idp/user/GeneralSettings.js +38 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +8 -0
- package/lib/interfaces/idp/user/NotificationSettings.js +2 -0
- package/lib/interfaces/idp/user/Pat.d.ts +19 -0
- package/lib/interfaces/idp/user/Pat.js +2 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +40 -0
- package/lib/interfaces/idp/user/Scopes.js +50 -0
- package/lib/interfaces/idp/user/SuccessfulAuth.d.ts +5 -0
- package/lib/interfaces/idp/user/SuccessfulAuth.js +2 -0
- package/lib/interfaces/idp/user/Totp.d.ts +20 -0
- package/lib/interfaces/idp/user/Totp.js +2 -0
- package/lib/interfaces/idp/user/index.d.ts +23 -0
- package/lib/interfaces/idp/user/index.js +2 -0
- package/lib/interfaces/mailer/index.d.ts +66 -0
- package/lib/interfaces/mailer/index.js +81 -0
- package/lib/interfaces/mothership/index.d.ts +27 -0
- package/lib/interfaces/mothership/index.js +8 -0
- package/lib/interfaces/nats/index.d.ts +252 -0
- package/lib/interfaces/nats/index.js +334 -0
- package/lib/service/agent/bundle/dev/index.d.ts +17 -0
- package/lib/service/agent/bundle/dev/index.js +40 -0
- package/lib/service/agent/bundle/index.d.ts +11 -0
- package/lib/service/agent/bundle/index.js +55 -0
- package/lib/service/agent/context/index.d.ts +37 -0
- package/lib/service/agent/context/index.js +81 -0
- package/lib/service/agent/index.d.ts +14 -0
- package/lib/service/agent/index.js +20 -0
- package/lib/service/agent/installer/index.d.ts +15 -0
- package/lib/service/agent/installer/index.js +97 -0
- package/lib/service/auditor/index.d.ts +26 -0
- package/lib/service/auditor/index.js +49 -0
- package/lib/service/auditor/internal/index.d.ts +27 -0
- package/lib/service/auditor/internal/index.js +61 -0
- package/lib/service/bouncer/features/index.d.ts +8 -0
- package/lib/service/bouncer/features/index.js +25 -0
- package/lib/service/bouncer/index.d.ts +14 -0
- package/lib/service/bouncer/index.js +31 -0
- package/lib/service/dali/DaliAvatar.d.ts +36 -0
- package/lib/service/dali/DaliAvatar.js +25 -0
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +28 -0
- package/lib/service/dali/avatar/DaliFuseSpace.js +55 -0
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +28 -0
- package/lib/service/dali/avatar/DaliHigh5Space.js +55 -0
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +28 -0
- package/lib/service/dali/avatar/DaliOAuthApp.js +55 -0
- package/lib/service/dali/avatar/DaliOrganization.d.ts +25 -0
- package/lib/service/dali/avatar/DaliOrganization.js +52 -0
- package/lib/service/dali/avatar/DaliTeam.d.ts +28 -0
- package/lib/service/dali/avatar/DaliTeam.js +55 -0
- package/lib/service/dali/avatar/DaliUser.d.ts +22 -0
- package/lib/service/dali/avatar/DaliUser.js +49 -0
- package/lib/service/dali/index.d.ts +16 -0
- package/lib/service/dali/index.js +30 -0
- package/lib/service/fuse/index.d.ts +17 -0
- package/lib/service/fuse/index.js +34 -0
- package/lib/service/fuse/internal/index.d.ts +9 -0
- package/lib/service/fuse/internal/index.js +29 -0
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +8 -0
- package/lib/service/fuse/internal/space/cronjob/index.js +15 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +17 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.js +35 -0
- package/lib/service/fuse/internal/space/index.d.ts +23 -0
- package/lib/service/fuse/internal/space/index.js +43 -0
- package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
- package/lib/service/fuse/space/cronjob/index.js +175 -0
- package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
- package/lib/service/fuse/space/cronjob/log/index.js +57 -0
- package/lib/service/fuse/space/index.d.ts +82 -0
- package/lib/service/fuse/space/index.js +134 -0
- package/lib/service/high5/execution/index.d.ts +10 -0
- package/lib/service/high5/execution/index.js +17 -0
- package/lib/service/high5/execution/log/index.d.ts +19 -0
- package/lib/service/high5/execution/log/index.js +41 -0
- package/lib/service/high5/execution/status/index.d.ts +18 -0
- package/lib/service/high5/execution/status/index.js +41 -0
- package/lib/service/high5/index.d.ts +22 -0
- package/lib/service/high5/index.js +39 -0
- package/lib/service/high5/internal/index.d.ts +9 -0
- package/lib/service/high5/internal/index.js +29 -0
- package/lib/service/high5/internal/space/index.d.ts +21 -0
- package/lib/service/high5/internal/space/index.js +41 -0
- package/lib/service/high5/joinToken/index.d.ts +40 -0
- package/lib/service/high5/joinToken/index.js +64 -0
- package/lib/service/high5/space/event/index.d.ts +56 -0
- package/lib/service/high5/space/event/index.js +89 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +31 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +117 -0
- package/lib/service/high5/space/event/stream/design/index.d.ts +38 -0
- package/lib/service/high5/space/event/stream/design/index.js +56 -0
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +62 -0
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +100 -0
- package/lib/service/high5/space/event/stream/index.d.ts +114 -0
- package/lib/service/high5/space/event/stream/index.js +164 -0
- package/lib/service/high5/space/execution/index.d.ts +48 -0
- package/lib/service/high5/space/execution/index.js +74 -0
- package/lib/service/high5/space/execution/log/index.d.ts +31 -0
- package/lib/service/high5/space/execution/log/index.js +57 -0
- package/lib/service/high5/space/execution/status/index.d.ts +16 -0
- package/lib/service/high5/space/execution/status/index.js +34 -0
- package/lib/service/high5/space/index.d.ts +107 -0
- package/lib/service/high5/space/index.js +160 -0
- package/lib/service/high5/space/node/index.d.ts +58 -0
- package/lib/service/high5/space/node/index.js +116 -0
- package/lib/service/high5/space/secret/index.d.ts +60 -0
- package/lib/service/high5/space/secret/index.js +92 -0
- package/lib/service/high5/space/wave/index.d.ts +38 -0
- package/lib/service/high5/space/wave/index.js +66 -0
- package/lib/service/high5/space/webhook/index.d.ts +83 -0
- package/lib/service/high5/space/webhook/index.js +132 -0
- package/lib/service/high5/space/webhook/log/index.d.ts +18 -0
- package/lib/service/high5/space/webhook/log/index.js +38 -0
- package/lib/service/high5/wave/index.d.ts +8 -0
- package/lib/service/high5/wave/index.js +15 -0
- package/lib/service/high5/wave/s3/index.d.ts +48 -0
- package/lib/service/high5/wave/s3/index.js +88 -0
- package/lib/service/idp/index.d.ts +82 -0
- package/lib/service/idp/index.js +137 -0
- package/lib/service/idp/internal/index.d.ts +19 -0
- package/lib/service/idp/internal/index.js +34 -0
- package/lib/service/idp/oauth/index.d.ts +45 -0
- package/lib/service/idp/oauth/index.js +105 -0
- package/lib/service/idp/organization/index.d.ts +54 -0
- package/lib/service/idp/organization/index.js +79 -0
- package/lib/service/idp/organization/license/index.d.ts +7 -0
- package/lib/service/idp/organization/license/index.js +30 -0
- package/lib/service/idp/organization/member/index.d.ts +58 -0
- package/lib/service/idp/organization/member/index.js +96 -0
- package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
- package/lib/service/idp/organization/member/invitations/index.js +118 -0
- package/lib/service/idp/organization/settings/domain/index.d.ts +38 -0
- package/lib/service/idp/organization/settings/domain/index.js +63 -0
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
- package/lib/service/idp/organization/settings/domain/saml/index.js +88 -0
- package/lib/service/idp/organization/settings/index.d.ts +16 -0
- package/lib/service/idp/organization/settings/index.js +16 -0
- package/lib/service/idp/organization/settings/oauth/index.d.ts +64 -0
- package/lib/service/idp/organization/settings/oauth/index.js +106 -0
- package/lib/service/idp/organization/team/index.d.ts +72 -0
- package/lib/service/idp/organization/team/index.js +115 -0
- package/lib/service/idp/registration/index.d.ts +39 -0
- package/lib/service/idp/registration/index.js +84 -0
- package/lib/service/idp/user/index.d.ts +82 -0
- package/lib/service/idp/user/index.js +125 -0
- package/lib/service/idp/user/license/index.d.ts +7 -0
- package/lib/service/idp/user/license/index.js +30 -0
- package/lib/service/idp/user/password/index.d.ts +19 -0
- package/lib/service/idp/user/password/index.js +52 -0
- package/lib/service/idp/user/settings/connections/index.d.ts +15 -0
- package/lib/service/idp/user/settings/connections/index.js +33 -0
- package/lib/service/idp/user/settings/general/index.d.ts +18 -0
- package/lib/service/idp/user/settings/general/index.js +39 -0
- package/lib/service/idp/user/settings/index.d.ts +36 -0
- package/lib/service/idp/user/settings/index.js +25 -0
- package/lib/service/idp/user/settings/notifications/index.d.ts +18 -0
- package/lib/service/idp/user/settings/notifications/index.js +39 -0
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +22 -0
- package/lib/service/idp/user/settings/oauthApps/index.js +54 -0
- package/lib/service/idp/user/settings/pats/index.d.ts +50 -0
- package/lib/service/idp/user/settings/pats/index.js +93 -0
- package/lib/service/idp/user/settings/twoFactor/index.d.ts +11 -0
- package/lib/service/idp/user/settings/twoFactor/index.js +15 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +34 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +65 -0
- package/lib/service/mailer/index.d.ts +14 -0
- package/lib/service/mailer/index.js +31 -0
- package/lib/service/mailer/internal/index.d.ts +36 -0
- package/lib/service/mailer/internal/index.js +64 -0
- package/lib/service/mothership/index.d.ts +97 -0
- package/lib/service/mothership/index.js +136 -0
- package/lib/service/nats/index.d.ts +51 -0
- package/lib/service/nats/index.js +138 -0
- package/lib/utils/Types.d.ts +1 -0
- package/lib/utils/Types.js +2 -0
- package/lib/utils/bouncer/features/Provider.d.ts +16 -0
- package/lib/utils/bouncer/features/Provider.js +83 -0
- package/package.json +36 -27
- package/lib/base.d.ts +0 -12
- package/lib/base.js +0 -8
- package/lib/hcloud.d.ts +0 -11
- package/lib/hcloud.js +0 -27
- package/lib/interfaces/Auditor.d.ts +0 -40
- package/lib/interfaces/Global.d.ts +0 -8
- package/lib/interfaces/IDP.d.ts +0 -9
- package/lib/service/Auditor.d.ts +0 -42
- package/lib/service/Auditor.js +0 -101
- package/lib/service/High5.d.ts +0 -4
- package/lib/service/High5.js +0 -9
- package/lib/service/IDP.d.ts +0 -39
- package/lib/service/IDP.js +0 -84
- /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
- /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
|
+
export declare class DaliFuse extends Base {
|
|
5
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a default avatar for the specified Fuse space.
|
|
8
|
+
* @param orgName Name of the organization
|
|
9
|
+
* @param spaceName Name of the space
|
|
10
|
+
* @returns Public URL of the created avatar
|
|
11
|
+
*/
|
|
12
|
+
createAvatar: (orgName: string, spaceName: string) => Promise<AvatarCreated>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes the avatar of the Fuse space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
|
+
* @param orgName Name of the organization
|
|
16
|
+
* @param spaceName Name of the space
|
|
17
|
+
*/
|
|
18
|
+
deleteAvatar: (orgName: string, spaceName: string) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Updates the avatar of the specified Fuse space
|
|
21
|
+
* @param orgName Name of the organization
|
|
22
|
+
* @param spaceName Name of the space
|
|
23
|
+
* @param file Image as Javascript File
|
|
24
|
+
* @returns Public URL of the new avatar
|
|
25
|
+
*/
|
|
26
|
+
updateAvatar: (orgName: string, spaceName: string, file: File) => Promise<AvatarCreated>;
|
|
27
|
+
protected getEndpoint(endpoint: string): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.DaliFuse = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliFuse extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a default avatar for the specified Fuse space.
|
|
19
|
+
* @param orgName Name of the organization
|
|
20
|
+
* @param spaceName Name of the space
|
|
21
|
+
* @returns Public URL of the created avatar
|
|
22
|
+
*/
|
|
23
|
+
this.createAvatar = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`), {});
|
|
25
|
+
return resp.data;
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the Fuse space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param spaceName Name of the space
|
|
31
|
+
*/
|
|
32
|
+
this.deleteAvatar = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`));
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Updates the avatar of the specified Fuse space
|
|
37
|
+
* @param orgName Name of the organization
|
|
38
|
+
* @param spaceName Name of the space
|
|
39
|
+
* @param file Image as Javascript File
|
|
40
|
+
* @returns Public URL of the new avatar
|
|
41
|
+
*/
|
|
42
|
+
this.updateAvatar = (orgName, spaceName, file) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const data = new FormData();
|
|
44
|
+
data.append("avatar", file);
|
|
45
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`), data, {
|
|
46
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
47
|
+
});
|
|
48
|
+
return resp.data;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getEndpoint(endpoint) {
|
|
52
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.DaliFuse = DaliFuse;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
|
+
export declare class DaliHigh5 extends Base {
|
|
5
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a default avatar for the specified High5 space.
|
|
8
|
+
* @param orgName Name of the organization
|
|
9
|
+
* @param spaceName Name of the space
|
|
10
|
+
* @returns Public URL of the created avatar
|
|
11
|
+
*/
|
|
12
|
+
createAvatar: (orgName: string, spaceName: string) => Promise<AvatarCreated>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes the avatar of the High5 space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
|
+
* @param orgName Name of the organization
|
|
16
|
+
* @param spaceName Name of the space
|
|
17
|
+
*/
|
|
18
|
+
deleteAvatar: (orgName: string, spaceName: string) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Updates the avatar of the specified High5 space
|
|
21
|
+
* @param orgName Name of the organization
|
|
22
|
+
* @param spaceName Name of the space
|
|
23
|
+
* @param file Image as Javascript File
|
|
24
|
+
* @returns Public URL of the new avatar
|
|
25
|
+
*/
|
|
26
|
+
updateAvatar: (orgName: string, spaceName: string, file: File) => Promise<AvatarCreated>;
|
|
27
|
+
protected getEndpoint(endpoint: string): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.DaliHigh5 = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliHigh5 extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a default avatar for the specified High5 space.
|
|
19
|
+
* @param orgName Name of the organization
|
|
20
|
+
* @param spaceName Name of the space
|
|
21
|
+
* @returns Public URL of the created avatar
|
|
22
|
+
*/
|
|
23
|
+
this.createAvatar = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}`), {});
|
|
25
|
+
return resp.data;
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the High5 space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param spaceName Name of the space
|
|
31
|
+
*/
|
|
32
|
+
this.deleteAvatar = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}`));
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Updates the avatar of the specified High5 space
|
|
37
|
+
* @param orgName Name of the organization
|
|
38
|
+
* @param spaceName Name of the space
|
|
39
|
+
* @param file Image as Javascript File
|
|
40
|
+
* @returns Public URL of the new avatar
|
|
41
|
+
*/
|
|
42
|
+
this.updateAvatar = (orgName, spaceName, file) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const data = new FormData();
|
|
44
|
+
data.append("avatar", file);
|
|
45
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}`), data, {
|
|
46
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
47
|
+
});
|
|
48
|
+
return resp.data;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getEndpoint(endpoint) {
|
|
52
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.DaliHigh5 = DaliHigh5;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
|
+
export declare class DaliOAuthApp extends Base {
|
|
5
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a default avatar for the specified OAuth app.
|
|
8
|
+
* @param orgName Name of the organization
|
|
9
|
+
* @param appId ID of the OAuth app
|
|
10
|
+
* @returns Public URL of the created avatar
|
|
11
|
+
*/
|
|
12
|
+
createAvatar: (orgName: string, appId: string) => Promise<AvatarCreated>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes the avatar of the OAuth app from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
|
+
* @param orgName Name of the organization
|
|
16
|
+
* @param appId ID of the OAuth app
|
|
17
|
+
*/
|
|
18
|
+
deleteAvatar: (orgName: string, appId: string) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Updates the avatar of the specified OAuth app.
|
|
21
|
+
* @param orgName Name of the organization
|
|
22
|
+
* @param appId ID of the OAuth app
|
|
23
|
+
* @param file Image as Javascript File
|
|
24
|
+
* @returns Public URL of the new avatar
|
|
25
|
+
*/
|
|
26
|
+
updateAvatar: (orgName: string, appId: string, file: File) => Promise<AvatarCreated>;
|
|
27
|
+
protected getEndpoint(endpoint: string): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.DaliOAuthApp = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliOAuthApp extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a default avatar for the specified OAuth app.
|
|
19
|
+
* @param orgName Name of the organization
|
|
20
|
+
* @param appId ID of the OAuth app
|
|
21
|
+
* @returns Public URL of the created avatar
|
|
22
|
+
*/
|
|
23
|
+
this.createAvatar = (orgName, appId) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/applications/oauth/${appId}`), {});
|
|
25
|
+
return resp.data;
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the OAuth app from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param appId ID of the OAuth app
|
|
31
|
+
*/
|
|
32
|
+
this.deleteAvatar = (orgName, appId) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/applications/oauth/${appId}`));
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Updates the avatar of the specified OAuth app.
|
|
37
|
+
* @param orgName Name of the organization
|
|
38
|
+
* @param appId ID of the OAuth app
|
|
39
|
+
* @param file Image as Javascript File
|
|
40
|
+
* @returns Public URL of the new avatar
|
|
41
|
+
*/
|
|
42
|
+
this.updateAvatar = (orgName, appId, file) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const data = new FormData();
|
|
44
|
+
data.append("avatar", file);
|
|
45
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/applications/oauth/${appId}`), data, {
|
|
46
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
47
|
+
});
|
|
48
|
+
return resp.data;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getEndpoint(endpoint) {
|
|
52
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.DaliOAuthApp = DaliOAuthApp;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
|
+
export declare class DaliOrganization extends Base {
|
|
5
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a default avatar for the specified organization.
|
|
8
|
+
* @param orgName Name of the organization
|
|
9
|
+
* @returns Public URL of the created avatar
|
|
10
|
+
*/
|
|
11
|
+
createAvatar: (orgName: string) => Promise<AvatarCreated>;
|
|
12
|
+
/**
|
|
13
|
+
* Deletes the avatar of the organization from cloud storage. If you want to update it, use updateAvatar() instead.
|
|
14
|
+
* @param orgName Name of the organization
|
|
15
|
+
*/
|
|
16
|
+
deleteAvatar: (orgName: string) => Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Updates the avatar of the specified organization.
|
|
19
|
+
* @param orgName Name of the organization
|
|
20
|
+
* @param file Image as Javascript File
|
|
21
|
+
* @returns Public URL of the new avatar
|
|
22
|
+
*/
|
|
23
|
+
updateAvatar: (orgName: string, file: File) => Promise<AvatarCreated>;
|
|
24
|
+
protected getEndpoint(endpoint: string): string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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.DaliOrganization = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliOrganization extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a default avatar for the specified organization.
|
|
19
|
+
* @param orgName Name of the organization
|
|
20
|
+
* @returns Public URL of the created avatar
|
|
21
|
+
*/
|
|
22
|
+
this.createAvatar = (orgName) => __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}`), {});
|
|
24
|
+
return resp.data;
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* Deletes the avatar of the organization from cloud storage. If you want to update it, use updateAvatar() instead.
|
|
28
|
+
* @param orgName Name of the organization
|
|
29
|
+
*/
|
|
30
|
+
this.deleteAvatar = (orgName) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}`));
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Updates the avatar of the specified organization.
|
|
35
|
+
* @param orgName Name of the organization
|
|
36
|
+
* @param file Image as Javascript File
|
|
37
|
+
* @returns Public URL of the new avatar
|
|
38
|
+
*/
|
|
39
|
+
this.updateAvatar = (orgName, file) => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const data = new FormData();
|
|
41
|
+
data.append("avatar", file);
|
|
42
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}`), data, {
|
|
43
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
44
|
+
});
|
|
45
|
+
return resp.data;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getEndpoint(endpoint) {
|
|
49
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.DaliOrganization = DaliOrganization;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
|
+
export declare class DaliTeam extends Base {
|
|
5
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a default avatar for the specified team.
|
|
8
|
+
* @param orgName Name of the organization
|
|
9
|
+
* @param teamName Name of the team
|
|
10
|
+
* @returns Public URL of the created avatar
|
|
11
|
+
*/
|
|
12
|
+
createAvatar: (orgName: string, teamName: string) => Promise<AvatarCreated>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes the avatar of the team from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
|
+
* @param orgName Name of the organization
|
|
16
|
+
* @param teamName Name of the team
|
|
17
|
+
*/
|
|
18
|
+
deleteAvatar: (orgName: string, teamName: string) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Updates the avatar of the specified team.
|
|
21
|
+
* @param orgName Name of the organization
|
|
22
|
+
* @param teamName Name of the team
|
|
23
|
+
* @param file Image as Javascript File
|
|
24
|
+
* @returns Public URL of the new avatar
|
|
25
|
+
*/
|
|
26
|
+
updateAvatar: (orgName: string, teamName: string, file: File) => Promise<AvatarCreated>;
|
|
27
|
+
protected getEndpoint(endpoint: string): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.DaliTeam = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliTeam extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a default avatar for the specified team.
|
|
19
|
+
* @param orgName Name of the organization
|
|
20
|
+
* @param teamName Name of the team
|
|
21
|
+
* @returns Public URL of the created avatar
|
|
22
|
+
*/
|
|
23
|
+
this.createAvatar = (orgName, teamName) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/teams/${teamName}`), {});
|
|
25
|
+
return resp.data;
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the team from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param teamName Name of the team
|
|
31
|
+
*/
|
|
32
|
+
this.deleteAvatar = (orgName, teamName) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/teams/${teamName}`));
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Updates the avatar of the specified team.
|
|
37
|
+
* @param orgName Name of the organization
|
|
38
|
+
* @param teamName Name of the team
|
|
39
|
+
* @param file Image as Javascript File
|
|
40
|
+
* @returns Public URL of the new avatar
|
|
41
|
+
*/
|
|
42
|
+
this.updateAvatar = (orgName, teamName, file) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const data = new FormData();
|
|
44
|
+
data.append("avatar", file);
|
|
45
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/teams/${teamName}`), data, {
|
|
46
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
47
|
+
});
|
|
48
|
+
return resp.data;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getEndpoint(endpoint) {
|
|
52
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.DaliTeam = DaliTeam;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
4
|
+
export declare class DaliUser extends Base {
|
|
5
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a default avatar for the requesting user.
|
|
8
|
+
* @returns Public URL of the created avatar
|
|
9
|
+
*/
|
|
10
|
+
createAvatar: () => Promise<AvatarCreated>;
|
|
11
|
+
/**
|
|
12
|
+
* Deletes the avatar of the requesting user from cloud storage. If you want to update it instead, use updateAvatar().
|
|
13
|
+
*/
|
|
14
|
+
deleteAvatar: () => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Updates the avatar of the requesting user.
|
|
17
|
+
* @param file Image as Javascript File
|
|
18
|
+
* @returns Public URL of the new avatar
|
|
19
|
+
*/
|
|
20
|
+
updateAvatar: (file: File) => Promise<AvatarCreated>;
|
|
21
|
+
protected getEndpoint(endpoint: string): string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.DaliUser = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliUser extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a default avatar for the requesting user.
|
|
19
|
+
* @returns Public URL of the created avatar
|
|
20
|
+
*/
|
|
21
|
+
this.createAvatar = () => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/user`), {});
|
|
23
|
+
return resp.data;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Deletes the avatar of the requesting user from cloud storage. If you want to update it instead, use updateAvatar().
|
|
27
|
+
*/
|
|
28
|
+
this.deleteAvatar = () => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
yield this.axios.delete(this.getEndpoint(`/v1/avatar/user`));
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Updates the avatar of the requesting user.
|
|
33
|
+
* @param file Image as Javascript File
|
|
34
|
+
* @returns Public URL of the new avatar
|
|
35
|
+
*/
|
|
36
|
+
this.updateAvatar = (file) => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const data = new FormData();
|
|
38
|
+
data.append("avatar", file);
|
|
39
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/user`), data, {
|
|
40
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
41
|
+
});
|
|
42
|
+
return resp.data;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
getEndpoint(endpoint) {
|
|
46
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.DaliUser = DaliUser;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../Base";
|
|
3
|
+
import { Version } from "../../interfaces/global";
|
|
4
|
+
import { DaliAvatar } from "./DaliAvatar";
|
|
5
|
+
export default class Dali extends Base {
|
|
6
|
+
/**
|
|
7
|
+
* Handles everything around avatars
|
|
8
|
+
*/
|
|
9
|
+
avatar: DaliAvatar;
|
|
10
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
11
|
+
/**
|
|
12
|
+
* @returns An object containing the endpoint version as a string
|
|
13
|
+
*/
|
|
14
|
+
version: () => Promise<Version>;
|
|
15
|
+
protected getEndpoint(endpoint: string): string;
|
|
16
|
+
}
|
|
@@ -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
|
+
const Base_1 = require("../../Base");
|
|
13
|
+
const DaliAvatar_1 = require("./DaliAvatar");
|
|
14
|
+
class Dali extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
/**
|
|
18
|
+
* @returns An object containing the endpoint version as a string
|
|
19
|
+
*/
|
|
20
|
+
this.version = () => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
|
|
22
|
+
return resp.data;
|
|
23
|
+
});
|
|
24
|
+
this.avatar = new DaliAvatar_1.DaliAvatar(this.options, this.axios);
|
|
25
|
+
}
|
|
26
|
+
getEndpoint(endpoint) {
|
|
27
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.default = Dali;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../Base";
|
|
3
|
+
import { Version } from "../../interfaces/global";
|
|
4
|
+
import { FuseInternal } from "./internal";
|
|
5
|
+
import { FuseSpaceInternal } from "./internal/space";
|
|
6
|
+
import { FuseSpace } from "./space";
|
|
7
|
+
export default class Fuse extends Base {
|
|
8
|
+
space: FuseSpace;
|
|
9
|
+
internal: FuseInternal;
|
|
10
|
+
spaceInternal: FuseSpaceInternal;
|
|
11
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
12
|
+
/**
|
|
13
|
+
* @returns Object containing the version as a string
|
|
14
|
+
*/
|
|
15
|
+
version: () => Promise<Version>;
|
|
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
|
+
const Base_1 = require("../../Base");
|
|
13
|
+
const internal_1 = require("./internal");
|
|
14
|
+
const space_1 = require("./internal/space");
|
|
15
|
+
const space_2 = require("./space");
|
|
16
|
+
class Fuse extends Base_1.default {
|
|
17
|
+
constructor(options, axios) {
|
|
18
|
+
super(options, axios);
|
|
19
|
+
/**
|
|
20
|
+
* @returns Object containing the version as a string
|
|
21
|
+
*/
|
|
22
|
+
this.version = () => __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
|
|
24
|
+
return resp.data;
|
|
25
|
+
});
|
|
26
|
+
this.space = new space_2.FuseSpace(this.options, this.axios);
|
|
27
|
+
this.spaceInternal = new space_1.FuseSpaceInternal(this.options, this.axios);
|
|
28
|
+
this.internal = new internal_1.FuseInternal(this.options, this.axios);
|
|
29
|
+
}
|
|
30
|
+
getEndpoint(endpoint) {
|
|
31
|
+
return `${this.options.server}/api/fuse${endpoint}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = Fuse;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { FuseSpaceInternal } from "./space";
|
|
4
|
+
export declare class FuseInternal extends Base {
|
|
5
|
+
space: FuseSpaceInternal;
|
|
6
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
7
|
+
deleteUsers(userIds: string[]): Promise<void>;
|
|
8
|
+
protected getEndpoint(endpoint: string): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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.FuseInternal = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
const space_1 = require("./space");
|
|
15
|
+
class FuseInternal extends Base_1.default {
|
|
16
|
+
constructor(options, axios) {
|
|
17
|
+
super(options, axios);
|
|
18
|
+
this.space = new space_1.FuseSpaceInternal(options, axios);
|
|
19
|
+
}
|
|
20
|
+
deleteUsers(userIds) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
yield this.axios.delete(this.getEndpoint("/v1/users"), { data: { userIds } });
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
getEndpoint(endpoint) {
|
|
26
|
+
return `${this.options.server}/api/fuse/internal${endpoint}`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.FuseInternal = FuseInternal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../../../Base";
|
|
3
|
+
import { FuseCronjobLogInternal } from "./log";
|
|
4
|
+
export declare class FuseCronjobInternal extends Base {
|
|
5
|
+
cronjobLog: FuseCronjobLogInternal;
|
|
6
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
7
|
+
protected getEndpoint(endpoint: string): string;
|
|
8
|
+
}
|