hcloud-sdk 17.0.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +87 -76
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +24 -6
- package/lib/Hcloud.js +127 -24
- package/lib/helper/ErrorHelper.js +5 -2
- package/lib/helper/ValidationHelper.d.ts +14 -4
- package/lib/helper/ValidationHelper.js +71 -11
- package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
- package/lib/interfaces/agent/logging/index.d.ts +2 -0
- package/lib/interfaces/{friday → agent/logging}/index.js +2 -3
- package/lib/interfaces/agent/logging/log-collector.d.ts +35 -0
- package/lib/interfaces/agent/module/index.d.ts +7 -0
- package/lib/interfaces/agent/module/index.js +2 -0
- package/lib/interfaces/auditor/index.d.ts +13 -3
- package/lib/interfaces/auditor/index.js +9 -2
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/cosmo/asset/index.d.ts +216 -0
- package/lib/interfaces/cosmo/asset/index.js +90 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +41 -0
- package/lib/interfaces/cosmo/comment/index.js +8 -0
- package/lib/interfaces/cosmo/event/index.d.ts +60 -0
- package/lib/interfaces/cosmo/event/index.js +31 -0
- package/lib/interfaces/cosmo/location/index.d.ts +4 -0
- package/lib/interfaces/cosmo/location/index.js +2 -0
- package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
- package/lib/interfaces/cosmo/namespace/index.js +9 -0
- package/lib/interfaces/cosmo/permissions.d.ts +96 -0
- package/lib/interfaces/cosmo/permissions.js +58 -0
- package/lib/interfaces/cosmo/share/index.d.ts +110 -0
- package/lib/interfaces/cosmo/share/index.js +23 -0
- package/lib/interfaces/cosmo/space/index.d.ts +31 -0
- package/lib/interfaces/cosmo/space/index.js +2 -0
- package/lib/interfaces/cosmo/stats/index.d.ts +11 -0
- package/lib/interfaces/cosmo/stats/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +13 -0
- package/lib/interfaces/cosmo/tag/tag.js +2 -0
- package/lib/interfaces/global/Products.d.ts +2 -3
- package/lib/interfaces/global/Products.js +1 -2
- package/lib/interfaces/global/Views.d.ts +0 -1
- package/lib/interfaces/global/Views.js +0 -1
- package/lib/interfaces/high5/index.d.ts +7 -7
- package/lib/interfaces/high5/index.js +7 -7
- package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
- package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
- package/lib/interfaces/high5/space/database/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +10 -2
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +3 -1
- package/lib/interfaces/{fuse/space/cronjob/CronjobLog.d.ts → high5/space/job/JobLog.d.ts} +3 -3
- package/lib/interfaces/high5/space/job/JobLog.js +2 -0
- package/lib/interfaces/high5/space/job/index.d.ts +83 -0
- package/lib/interfaces/high5/space/job/index.js +11 -0
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- package/lib/interfaces/high5/wave/dependentInputs.d.ts +42 -0
- package/lib/interfaces/high5/wave/dependentInputs.js +144 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.d.ts +22 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.js +220 -0
- package/lib/interfaces/idp/index.d.ts +3 -3
- package/lib/interfaces/idp/index.js +3 -3
- package/lib/interfaces/idp/oauth/device.d.ts +18 -0
- package/lib/interfaces/idp/oauth/device.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +19 -5
- package/lib/interfaces/idp/organization/index.d.ts +2 -0
- package/lib/interfaces/idp/organization/index.js +2 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
- package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
- package/lib/interfaces/idp/organization/stats.d.ts +7 -0
- package/lib/interfaces/idp/organization/stats.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
- package/lib/interfaces/idp/user/Message.d.ts +22 -0
- package/lib/interfaces/idp/user/Message.js +14 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -15
- package/lib/interfaces/idp/user/Scopes.js +0 -21
- package/lib/interfaces/idp/user/index.d.ts +5 -1
- package/lib/interfaces/mailer/index.d.ts +50 -2
- package/lib/interfaces/mailer/index.js +100 -2
- package/lib/interfaces/mothership/index.d.ts +3 -1
- package/lib/interfaces/mothership/index.js +15 -0
- package/lib/interfaces/mothership/stats.d.ts +4 -0
- package/lib/interfaces/mothership/stats.js +2 -0
- package/lib/interfaces/nats/index.d.ts +79 -51
- package/lib/interfaces/nats/index.js +140 -125
- package/lib/interfaces/shorts/index.d.ts +17 -0
- package/lib/interfaces/shorts/index.js +8 -0
- package/lib/service/agent/bundle/dev/index.d.ts +16 -6
- package/lib/service/agent/bundle/dev/index.js +16 -11
- package/lib/service/agent/bundle/index.d.ts +10 -4
- package/lib/service/agent/bundle/index.js +10 -7
- package/lib/service/agent/context/index.d.ts +22 -8
- package/lib/service/agent/context/index.js +19 -15
- package/lib/service/agent/index.d.ts +6 -0
- package/lib/service/agent/index.js +18 -1
- package/lib/service/agent/installer/index.js +4 -1
- package/lib/service/agent/logging/index.d.ts +69 -0
- package/lib/service/agent/logging/index.js +117 -0
- package/lib/service/agent/module/index.d.ts +36 -0
- package/lib/service/agent/module/index.js +65 -0
- package/lib/service/auditor/index.d.ts +8 -4
- package/lib/service/auditor/index.js +9 -6
- package/lib/service/auditor/internal/index.d.ts +27 -3
- package/lib/service/auditor/internal/index.js +38 -6
- package/lib/service/bouncer/features/index.d.ts +4 -2
- package/lib/service/bouncer/features/index.js +6 -3
- package/lib/service/bouncer/index.js +5 -2
- package/lib/service/cosmo/asset/index.d.ts +265 -0
- package/lib/service/cosmo/asset/index.js +420 -0
- package/lib/service/cosmo/comment/index.d.ts +93 -0
- package/lib/service/cosmo/comment/index.js +136 -0
- package/lib/service/cosmo/event/index.d.ts +23 -0
- package/lib/service/cosmo/event/index.js +43 -0
- package/lib/service/cosmo/folder/index.d.ts +27 -0
- package/lib/service/cosmo/folder/index.js +50 -0
- package/lib/service/cosmo/index.d.ts +52 -0
- package/lib/service/cosmo/index.js +129 -0
- package/lib/service/cosmo/internal/index.d.ts +7 -0
- package/lib/service/cosmo/internal/index.js +20 -0
- package/lib/service/cosmo/internal/space/index.d.ts +15 -0
- package/lib/service/cosmo/internal/space/index.js +37 -0
- package/lib/service/cosmo/location/index.d.ts +40 -0
- package/lib/service/cosmo/location/index.js +66 -0
- package/lib/service/cosmo/namespace/index.d.ts +56 -0
- package/lib/service/cosmo/namespace/index.js +85 -0
- package/lib/service/cosmo/organization/index.d.ts +47 -0
- package/lib/service/cosmo/organization/index.js +67 -0
- package/lib/service/cosmo/permissions/index.d.ts +131 -0
- package/lib/service/cosmo/permissions/index.js +184 -0
- package/lib/service/cosmo/production/index.d.ts +26 -0
- package/lib/service/cosmo/production/index.js +48 -0
- package/lib/service/cosmo/share/index.d.ts +169 -0
- package/lib/service/cosmo/share/index.js +227 -0
- package/lib/service/cosmo/space/index.d.ts +131 -0
- package/lib/service/cosmo/space/index.js +190 -0
- package/lib/service/cosmo/stats/index.d.ts +35 -0
- package/lib/service/cosmo/stats/index.js +58 -0
- package/lib/service/cosmo/tag/index.d.ts +67 -0
- package/lib/service/cosmo/tag/index.js +96 -0
- package/lib/service/dali/DaliAvatar.d.ts +0 -6
- package/lib/service/dali/DaliAvatar.js +4 -11
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliCosmoSpace.js +12 -8
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +11 -4
- package/lib/service/dali/avatar/DaliHigh5Pool.js +12 -8
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +11 -4
- package/lib/service/dali/avatar/DaliHigh5Space.js +12 -8
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +11 -4
- package/lib/service/dali/avatar/DaliOAuthApp.js +12 -8
- package/lib/service/dali/avatar/DaliOrganization.d.ts +11 -4
- package/lib/service/dali/avatar/DaliOrganization.js +12 -8
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
- package/lib/service/dali/avatar/DaliServiceAccount.js +12 -8
- package/lib/service/dali/avatar/DaliTeam.d.ts +11 -4
- package/lib/service/dali/avatar/DaliTeam.js +12 -8
- package/lib/service/dali/avatar/DaliUser.d.ts +11 -4
- package/lib/service/dali/avatar/DaliUser.js +12 -8
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +6 -6
- package/lib/service/high5/execution/index.d.ts +4 -2
- package/lib/service/high5/execution/index.js +7 -3
- package/lib/service/high5/execution/log/index.js +4 -1
- package/lib/service/high5/execution/status/index.d.ts +5 -3
- package/lib/service/high5/execution/status/index.js +7 -4
- package/lib/service/high5/index.d.ts +7 -2
- package/lib/service/high5/index.js +13 -3
- package/lib/service/high5/internal/index.d.ts +4 -2
- package/lib/service/high5/internal/index.js +7 -3
- package/lib/service/high5/internal/space/index.d.ts +10 -3
- package/lib/service/high5/internal/space/index.js +17 -5
- package/lib/service/high5/internal/space/job/index.d.ts +7 -0
- package/lib/service/high5/internal/space/job/index.js +20 -0
- package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
- package/lib/service/{fuse/internal/space/cronjob → high5/internal/space/job}/log/index.js +13 -10
- package/lib/service/high5/joinToken/index.d.ts +14 -6
- package/lib/service/high5/joinToken/index.js +14 -10
- package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
- package/lib/service/high5/space/database/document/array/index.js +105 -0
- package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
- package/lib/service/{friday → high5}/space/database/document/index.js +35 -17
- package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
- package/lib/service/high5/space/database/document/number/index.js +80 -0
- package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
- package/lib/service/{friday → high5}/space/database/index.js +22 -18
- package/lib/service/high5/space/event/index.d.ts +17 -7
- package/lib/service/high5/space/event/index.js +16 -12
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +6 -3
- package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
- package/lib/service/high5/space/event/stream/design/index.js +13 -9
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +16 -11
- package/lib/service/high5/space/event/stream/index.d.ts +32 -12
- package/lib/service/high5/space/event/stream/index.js +26 -22
- package/lib/service/high5/space/execution/index.d.ts +19 -7
- package/lib/service/high5/space/execution/index.js +21 -13
- package/lib/service/high5/space/execution/log/index.d.ts +8 -4
- package/lib/service/high5/space/execution/log/index.js +9 -6
- package/lib/service/high5/space/execution/status/index.d.ts +7 -3
- package/lib/service/high5/space/execution/status/index.js +8 -5
- package/lib/service/high5/space/index.d.ts +53 -14
- package/lib/service/high5/space/index.js +70 -28
- package/lib/service/{fuse/space/cronjob → high5/space/job}/index.d.ts +57 -35
- package/lib/service/{fuse/space/cronjob → high5/space/job}/index.js +88 -87
- package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.d.ts +15 -11
- package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.js +19 -16
- package/lib/service/high5/space/node/index.d.ts +20 -8
- package/lib/service/high5/space/node/index.js +18 -14
- package/lib/service/high5/space/pool/index.d.ts +38 -11
- package/lib/service/high5/space/pool/index.js +41 -19
- package/lib/service/high5/space/secret/index.d.ts +17 -7
- package/lib/service/high5/space/secret/index.js +16 -12
- package/lib/service/high5/space/stat/index.d.ts +12 -0
- package/lib/service/high5/space/stat/index.js +34 -0
- package/lib/service/high5/space/wave/index.d.ts +16 -6
- package/lib/service/high5/space/wave/index.js +15 -11
- package/lib/service/high5/space/webhook/index.d.ts +32 -12
- package/lib/service/high5/space/webhook/index.js +29 -22
- package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
- package/lib/service/high5/space/webhook/log/index.js +6 -3
- package/lib/service/high5/stat/index.d.ts +11 -0
- package/lib/service/{fuse/internal → high5/stat}/index.js +16 -14
- package/lib/service/high5/wave/index.js +4 -1
- package/lib/service/high5/wave/s3/index.d.ts +31 -8
- package/lib/service/high5/wave/s3/index.js +47 -23
- package/lib/service/idp/guest/index.d.ts +42 -0
- package/lib/service/idp/guest/index.js +69 -0
- package/lib/service/idp/index.d.ts +25 -7
- package/lib/service/idp/index.js +27 -13
- package/lib/service/idp/internal/index.d.ts +5 -3
- package/lib/service/idp/internal/index.js +9 -4
- package/lib/service/idp/oauth/device.d.ts +131 -0
- package/lib/service/idp/oauth/device.js +177 -0
- package/lib/service/idp/oauth/index.d.ts +19 -6
- package/lib/service/idp/oauth/index.js +26 -16
- package/lib/service/idp/organization/index.d.ts +28 -5
- package/lib/service/idp/organization/index.js +41 -11
- package/lib/service/idp/organization/license/index.d.ts +7 -3
- package/lib/service/idp/organization/license/index.js +8 -5
- package/lib/service/idp/organization/member/index.d.ts +20 -8
- package/lib/service/idp/organization/member/index.js +20 -15
- package/lib/service/idp/organization/member/invitations/index.d.ts +42 -9
- package/lib/service/idp/organization/member/invitations/index.js +94 -59
- package/lib/service/idp/organization/service-accounts/index.d.ts +31 -9
- package/lib/service/idp/organization/service-accounts/index.js +35 -14
- package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
- package/lib/service/idp/organization/settings/domain/index.js +13 -9
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
- package/lib/service/idp/organization/settings/domain/saml/index.js +23 -19
- package/lib/service/idp/organization/settings/index.js +4 -1
- package/lib/service/idp/organization/settings/oauth/index.d.ts +33 -9
- package/lib/service/idp/organization/settings/oauth/index.js +37 -16
- package/lib/service/idp/organization/stat/index.d.ts +11 -0
- package/lib/service/idp/organization/stat/index.js +33 -0
- package/lib/service/idp/organization/team/index.d.ts +32 -10
- package/lib/service/idp/organization/team/index.js +35 -14
- package/lib/service/idp/registration/index.d.ts +10 -4
- package/lib/service/idp/registration/index.js +19 -10
- package/lib/service/idp/user/index.d.ts +41 -11
- package/lib/service/idp/user/index.js +49 -19
- package/lib/service/idp/user/license/index.d.ts +7 -3
- package/lib/service/idp/user/license/index.js +8 -5
- package/lib/service/idp/user/message/index.d.ts +62 -0
- package/lib/service/idp/user/message/index.js +95 -0
- package/lib/service/idp/user/password/index.d.ts +4 -2
- package/lib/service/idp/user/password/index.js +6 -3
- package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
- package/lib/service/idp/user/settings/connections/index.js +6 -3
- package/lib/service/idp/user/settings/general/index.d.ts +10 -4
- package/lib/service/idp/user/settings/general/index.js +10 -7
- package/lib/service/idp/user/settings/index.js +4 -1
- package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
- package/lib/service/idp/user/settings/notifications/index.js +8 -5
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
- package/lib/service/idp/user/settings/oauthApps/index.js +10 -6
- package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
- package/lib/service/idp/user/settings/pats/index.js +21 -16
- package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +17 -11
- package/lib/service/mailer/index.d.ts +4 -2
- package/lib/service/mailer/index.js +7 -4
- package/lib/service/mailer/internal/index.d.ts +14 -6
- package/lib/service/mailer/internal/index.js +12 -9
- package/lib/service/mothership/index.d.ts +35 -13
- package/lib/service/mothership/index.js +36 -18
- package/lib/service/nats/index.d.ts +7 -0
- package/lib/service/nats/index.js +77 -44
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/{friday → shorts}/index.js +17 -11
- package/lib/service/shorts/internal/index.d.ts +75 -0
- package/lib/service/shorts/internal/index.js +118 -0
- package/lib/utils/bouncer/features/Provider.js +0 -1
- package/package.json +2 -2
- package/lib/interfaces/friday/index.d.ts +0 -3
- package/lib/interfaces/friday/space/index.d.ts +0 -21
- package/lib/interfaces/friday/space/index.js +0 -11
- package/lib/interfaces/fuse/index.d.ts +0 -3
- package/lib/interfaces/fuse/index.js +0 -19
- package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +0 -38
- package/lib/interfaces/fuse/space/cronjob/Cronjob.js +0 -8
- package/lib/interfaces/fuse/space/index.d.ts +0 -22
- package/lib/interfaces/fuse/space/index.js +0 -11
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -26
- package/lib/service/dali/avatar/DaliFuseSpace.js +0 -58
- package/lib/service/friday/index.d.ts +0 -13
- package/lib/service/friday/space/index.d.ts +0 -81
- package/lib/service/friday/space/index.js +0 -150
- package/lib/service/fuse/index.d.ts +0 -18
- package/lib/service/fuse/index.js +0 -48
- package/lib/service/fuse/internal/index.d.ts +0 -8
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +0 -7
- package/lib/service/fuse/internal/space/cronjob/index.js +0 -17
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +0 -15
- package/lib/service/fuse/internal/space/index.d.ts +0 -22
- package/lib/service/fuse/internal/space/index.js +0 -49
- package/lib/service/fuse/space/index.d.ts +0 -81
- package/lib/service/fuse/space/index.js +0 -152
- /package/lib/interfaces/{friday/space/database/index.js → agent/logging/cloudwatch.js} +0 -0
- /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/log-collector.js} +0 -0
- /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
|
+
import { Document } from "../../../../../../interfaces/high5";
|
|
3
|
+
export declare class High5DocumentNumber extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Increments the current integer value by one.
|
|
6
|
+
* @param orgName Name of the Organization
|
|
7
|
+
* @param spaceName Name of the Space
|
|
8
|
+
* @param dbName Name of the Database
|
|
9
|
+
* @param key Key of the Document
|
|
10
|
+
* @returns Updated Document
|
|
11
|
+
*/
|
|
12
|
+
increment<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, raw?: {
|
|
13
|
+
raw: R;
|
|
14
|
+
}): Promise<MaybeRaw<R, Document>>;
|
|
15
|
+
/**
|
|
16
|
+
* Decrements the current integer value by one.
|
|
17
|
+
* @param orgName Name of the Organization
|
|
18
|
+
* @param spaceName Name of the Space
|
|
19
|
+
* @param dbName Name of the Database
|
|
20
|
+
* @param key Key of the Document
|
|
21
|
+
* @returns Updated Document
|
|
22
|
+
*/
|
|
23
|
+
decrement<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, raw?: {
|
|
24
|
+
raw: R;
|
|
25
|
+
}): Promise<MaybeRaw<R, Document>>;
|
|
26
|
+
/**
|
|
27
|
+
* Adds value to current numeric document value.
|
|
28
|
+
* @param orgName Name of the Organization
|
|
29
|
+
* @param spaceName Name of the Space
|
|
30
|
+
* @param dbName Name of the Database
|
|
31
|
+
* @param key Key of the Document
|
|
32
|
+
* @param value Value to be added
|
|
33
|
+
* @returns Updated Document
|
|
34
|
+
*/
|
|
35
|
+
add<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, value: number, raw?: {
|
|
36
|
+
raw: R;
|
|
37
|
+
}): Promise<MaybeRaw<R, Document>>;
|
|
38
|
+
/**
|
|
39
|
+
* Subtracts value from current numeric document value.
|
|
40
|
+
* @param orgName Name of the Organization
|
|
41
|
+
* @param spaceName Name of the Space
|
|
42
|
+
* @param dbName Name of the Database
|
|
43
|
+
* @param key Key of the Document
|
|
44
|
+
* @param value Value to be subtracted
|
|
45
|
+
* @returns Updated Document
|
|
46
|
+
*/
|
|
47
|
+
subtract<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, value: number, raw?: {
|
|
48
|
+
raw: R;
|
|
49
|
+
}): Promise<MaybeRaw<R, Document>>;
|
|
50
|
+
protected getEndpoint(endpoint: string): string;
|
|
51
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.High5DocumentNumber = void 0;
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../../Base"));
|
|
17
|
+
class High5DocumentNumber extends Base_1.default {
|
|
18
|
+
/**
|
|
19
|
+
* Increments the current integer value by one.
|
|
20
|
+
* @param orgName Name of the Organization
|
|
21
|
+
* @param spaceName Name of the Space
|
|
22
|
+
* @param dbName Name of the Database
|
|
23
|
+
* @param key Key of the Document
|
|
24
|
+
* @returns Updated Document
|
|
25
|
+
*/
|
|
26
|
+
increment(orgName, spaceName, dbName, key, raw) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/inc`));
|
|
29
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Decrements the current integer value by one.
|
|
34
|
+
* @param orgName Name of the Organization
|
|
35
|
+
* @param spaceName Name of the Space
|
|
36
|
+
* @param dbName Name of the Database
|
|
37
|
+
* @param key Key of the Document
|
|
38
|
+
* @returns Updated Document
|
|
39
|
+
*/
|
|
40
|
+
decrement(orgName, spaceName, dbName, key, raw) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/dec`));
|
|
43
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Adds value to current numeric document value.
|
|
48
|
+
* @param orgName Name of the Organization
|
|
49
|
+
* @param spaceName Name of the Space
|
|
50
|
+
* @param dbName Name of the Database
|
|
51
|
+
* @param key Key of the Document
|
|
52
|
+
* @param value Value to be added
|
|
53
|
+
* @returns Updated Document
|
|
54
|
+
*/
|
|
55
|
+
add(orgName, spaceName, dbName, key, value, raw) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/inc/${value}`));
|
|
58
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Subtracts value from current numeric document value.
|
|
63
|
+
* @param orgName Name of the Organization
|
|
64
|
+
* @param spaceName Name of the Space
|
|
65
|
+
* @param dbName Name of the Database
|
|
66
|
+
* @param key Key of the Document
|
|
67
|
+
* @param value Value to be subtracted
|
|
68
|
+
* @returns Updated Document
|
|
69
|
+
*/
|
|
70
|
+
subtract(orgName, spaceName, dbName, key, value, raw) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/dec/${value}`));
|
|
73
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
getEndpoint(endpoint) {
|
|
77
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.High5DocumentNumber = High5DocumentNumber;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
2
|
-
import { Database } from "../../../../interfaces/friday";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
3
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { Database } from "../../../../interfaces/high5";
|
|
4
|
+
import { High5Document } from "./document";
|
|
5
|
+
export declare class High5Database extends Base {
|
|
6
|
+
get document(): High5Document;
|
|
7
7
|
private _document?;
|
|
8
8
|
/**
|
|
9
|
-
* Retrieves all Databases of a
|
|
9
|
+
* Retrieves all Databases of a High5 Space which match the provided search filter(s). Will return all Databases of the Space if no filter is provided.
|
|
10
10
|
* @param orgName Name of the Organization
|
|
11
11
|
* @param spaceName Name of the Space
|
|
12
12
|
* @param filters (optional) Array of search filters
|
|
@@ -15,10 +15,12 @@ export declare class FridayDatabase extends Base {
|
|
|
15
15
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
16
16
|
* @returns Object containing an array of Databases and the total number of results found in the database (independent of limit and page)
|
|
17
17
|
*/
|
|
18
|
-
searchDatabases({ orgName, spaceName, filters, sorting, limit, page
|
|
18
|
+
searchDatabases<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
|
|
19
19
|
orgName: string;
|
|
20
20
|
spaceName: string;
|
|
21
|
-
}
|
|
21
|
+
}, raw?: {
|
|
22
|
+
raw: R;
|
|
23
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Database>>>;
|
|
22
24
|
/**
|
|
23
25
|
* Retrieves a Database by its name.
|
|
24
26
|
* @param orgName Name of the Organization
|
|
@@ -26,7 +28,9 @@ export declare class FridayDatabase extends Base {
|
|
|
26
28
|
* @param dbName Name of the Database
|
|
27
29
|
* @returns The requested Database
|
|
28
30
|
*/
|
|
29
|
-
getDatabase(orgName: string, spaceName: string, dbName: string
|
|
31
|
+
getDatabase<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, Database>>;
|
|
30
34
|
/**
|
|
31
35
|
* Creates a new Database in the provided Space.
|
|
32
36
|
* @param orgName Name of the Organization
|
|
@@ -34,7 +38,9 @@ export declare class FridayDatabase extends Base {
|
|
|
34
38
|
* @param name Name of the new Database
|
|
35
39
|
* @returns The created Database
|
|
36
40
|
*/
|
|
37
|
-
createDatabase(orgName: string, spaceName: string, name: string
|
|
41
|
+
createDatabase<R extends boolean = false>(orgName: string, spaceName: string, name: string, raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, Database>>;
|
|
38
44
|
/**
|
|
39
45
|
* Rename a Database
|
|
40
46
|
* @param orgName Name of the Organization
|
|
@@ -43,13 +49,17 @@ export declare class FridayDatabase extends Base {
|
|
|
43
49
|
* @param name New name of the Database
|
|
44
50
|
* @returns Updated Database
|
|
45
51
|
*/
|
|
46
|
-
renameDatabase(orgName: string, spaceName: string, dbName: string, name: string
|
|
52
|
+
renameDatabase<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, name: string, raw?: {
|
|
53
|
+
raw: R;
|
|
54
|
+
}): Promise<MaybeRaw<R, Database>>;
|
|
47
55
|
/**
|
|
48
56
|
* Deletes a Database by its name.
|
|
49
57
|
* @param orgName Name of the Organization
|
|
50
58
|
* @param spaceName Name of the Space
|
|
51
59
|
* @param dbName Name of the Database
|
|
52
60
|
*/
|
|
53
|
-
deleteDatabase(orgName: string, spaceName: string, dbName: string
|
|
61
|
+
deleteDatabase<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, raw?: {
|
|
62
|
+
raw: R;
|
|
63
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
54
64
|
protected getEndpoint(endpoint: string): string;
|
|
55
65
|
}
|
|
@@ -8,21 +8,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
15
|
+
exports.High5Database = void 0;
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
19
|
const document_1 = require("./document");
|
|
17
|
-
class
|
|
20
|
+
class High5Database extends Base_1.default {
|
|
18
21
|
get document() {
|
|
19
22
|
if (this._document === undefined) {
|
|
20
|
-
this._document = new document_1.
|
|
23
|
+
this._document = new document_1.High5Document(this.options, this.axios);
|
|
21
24
|
}
|
|
22
25
|
return this._document;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
* Retrieves all Databases of a
|
|
28
|
+
* Retrieves all Databases of a High5 Space which match the provided search filter(s). Will return all Databases of the Space if no filter is provided.
|
|
26
29
|
* @param orgName Name of the Organization
|
|
27
30
|
* @param spaceName Name of the Space
|
|
28
31
|
* @param filters (optional) Array of search filters
|
|
@@ -31,14 +34,14 @@ class FridayDatabase extends Base_1.default {
|
|
|
31
34
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
32
35
|
* @returns Object containing an array of Databases and the total number of results found in the database (independent of limit and page)
|
|
33
36
|
*/
|
|
34
|
-
searchDatabases(_a) {
|
|
35
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0,
|
|
37
|
+
searchDatabases(_a, raw_1) {
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
36
39
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
37
40
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/search?page=${page}&limit=${limit}`), {
|
|
38
41
|
filters: filtersDTO,
|
|
39
42
|
sorting: sorting,
|
|
40
43
|
});
|
|
41
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
44
|
+
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));
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
47
|
/**
|
|
@@ -48,10 +51,10 @@ class FridayDatabase extends Base_1.default {
|
|
|
48
51
|
* @param dbName Name of the Database
|
|
49
52
|
* @returns The requested Database
|
|
50
53
|
*/
|
|
51
|
-
getDatabase(orgName, spaceName, dbName) {
|
|
54
|
+
getDatabase(orgName, spaceName, dbName, raw) {
|
|
52
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
56
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}`));
|
|
54
|
-
return resp.data;
|
|
57
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
@@ -61,10 +64,10 @@ class FridayDatabase extends Base_1.default {
|
|
|
61
64
|
* @param name Name of the new Database
|
|
62
65
|
* @returns The created Database
|
|
63
66
|
*/
|
|
64
|
-
createDatabase(orgName, spaceName, name) {
|
|
67
|
+
createDatabase(orgName, spaceName, name, raw) {
|
|
65
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
69
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases`), { name });
|
|
67
|
-
return resp.data;
|
|
70
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
@@ -75,12 +78,12 @@ class FridayDatabase extends Base_1.default {
|
|
|
75
78
|
* @param name New name of the Database
|
|
76
79
|
* @returns Updated Database
|
|
77
80
|
*/
|
|
78
|
-
renameDatabase(orgName, spaceName, dbName, name) {
|
|
81
|
+
renameDatabase(orgName, spaceName, dbName, name, raw) {
|
|
79
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
83
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/name`), {
|
|
81
84
|
name: name,
|
|
82
85
|
});
|
|
83
|
-
return resp.data;
|
|
86
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
84
87
|
});
|
|
85
88
|
}
|
|
86
89
|
/**
|
|
@@ -89,13 +92,14 @@ class FridayDatabase extends Base_1.default {
|
|
|
89
92
|
* @param spaceName Name of the Space
|
|
90
93
|
* @param dbName Name of the Database
|
|
91
94
|
*/
|
|
92
|
-
deleteDatabase(orgName, spaceName, dbName) {
|
|
95
|
+
deleteDatabase(orgName, spaceName, dbName, raw) {
|
|
93
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}`));
|
|
97
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}`));
|
|
98
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
101
|
getEndpoint(endpoint) {
|
|
98
|
-
return `${this.options.server}/api/
|
|
102
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
|
-
exports.
|
|
105
|
+
exports.High5Database = High5Database;
|
|
@@ -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 { Event } from "../../../../interfaces/high5/space/event";
|
|
4
4
|
import { High5Stream } from "./stream";
|
|
@@ -15,10 +15,12 @@ export declare class High5Event extends Base {
|
|
|
15
15
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
16
16
|
* @returns Object containing an array of Events and the total number of results found in the database (independent of limit and page)
|
|
17
17
|
*/
|
|
18
|
-
searchEvents({ orgName, spaceName, filters, sorting, limit, page
|
|
18
|
+
searchEvents<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
|
|
19
19
|
orgName: string;
|
|
20
20
|
spaceName: string;
|
|
21
|
-
}
|
|
21
|
+
}, raw?: {
|
|
22
|
+
raw: R;
|
|
23
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Event>>>;
|
|
22
24
|
/**
|
|
23
25
|
* Retrieves an Event by its name.
|
|
24
26
|
* @param orgName Name of the Organization
|
|
@@ -26,7 +28,9 @@ export declare class High5Event extends Base {
|
|
|
26
28
|
* @param eventName Name of the Event
|
|
27
29
|
* @returns The requested Event
|
|
28
30
|
*/
|
|
29
|
-
getEvent(orgName: string, spaceName: string, eventName: string
|
|
31
|
+
getEvent<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, Event>>;
|
|
30
34
|
/**
|
|
31
35
|
* Creates a new Event in the provided Space.
|
|
32
36
|
* @param orgName Name of the Organization
|
|
@@ -34,7 +38,9 @@ export declare class High5Event extends Base {
|
|
|
34
38
|
* @param name Name of the new Event
|
|
35
39
|
* @returns The created Event
|
|
36
40
|
*/
|
|
37
|
-
createEvent(orgName: string, spaceName: string, name: string
|
|
41
|
+
createEvent<R extends boolean = false>(orgName: string, spaceName: string, name: string, raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, Event>>;
|
|
38
44
|
/**
|
|
39
45
|
* Rename an event
|
|
40
46
|
* @param orgName Name of the Organization
|
|
@@ -43,13 +49,17 @@ export declare class High5Event extends Base {
|
|
|
43
49
|
* @param name New name of the Event
|
|
44
50
|
* @returns Updated Event
|
|
45
51
|
*/
|
|
46
|
-
renameEvent(orgName: string, spaceName: string, eventName: string, name: string
|
|
52
|
+
renameEvent<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, name: string, raw?: {
|
|
53
|
+
raw: R;
|
|
54
|
+
}): Promise<MaybeRaw<R, Event>>;
|
|
47
55
|
/**
|
|
48
56
|
* Deletes an Event by its name.
|
|
49
57
|
* @param orgName Name of the Organization
|
|
50
58
|
* @param spaceName Name of the Space
|
|
51
59
|
* @param eventName Name of the Event
|
|
52
60
|
*/
|
|
53
|
-
deleteEvent(orgName: string, spaceName: string, eventName: string
|
|
61
|
+
deleteEvent<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, raw?: {
|
|
62
|
+
raw: R;
|
|
63
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
54
64
|
protected getEndpoint(endpoint: string): string;
|
|
55
65
|
}
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5Event = void 0;
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
19
|
const stream_1 = require("./stream");
|
|
@@ -31,14 +34,14 @@ class High5Event extends Base_1.default {
|
|
|
31
34
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
32
35
|
* @returns Object containing an array of Events and the total number of results found in the database (independent of limit and page)
|
|
33
36
|
*/
|
|
34
|
-
searchEvents(_a) {
|
|
35
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0,
|
|
37
|
+
searchEvents(_a, raw_1) {
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
36
39
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
37
40
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/search?page=${page}&limit=${limit}`), {
|
|
38
41
|
filters: filtersDTO,
|
|
39
42
|
sorting: sorting,
|
|
40
43
|
});
|
|
41
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
44
|
+
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));
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
47
|
/**
|
|
@@ -48,10 +51,10 @@ class High5Event extends Base_1.default {
|
|
|
48
51
|
* @param eventName Name of the Event
|
|
49
52
|
* @returns The requested Event
|
|
50
53
|
*/
|
|
51
|
-
getEvent(orgName, spaceName, eventName) {
|
|
54
|
+
getEvent(orgName, spaceName, eventName, raw) {
|
|
52
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
56
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
54
|
-
return resp.data;
|
|
57
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
@@ -61,10 +64,10 @@ class High5Event extends Base_1.default {
|
|
|
61
64
|
* @param name Name of the new Event
|
|
62
65
|
* @returns The created Event
|
|
63
66
|
*/
|
|
64
|
-
createEvent(orgName, spaceName, name) {
|
|
67
|
+
createEvent(orgName, spaceName, name, raw) {
|
|
65
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
69
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events`), { name: name });
|
|
67
|
-
return resp.data;
|
|
70
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
@@ -75,12 +78,12 @@ class High5Event extends Base_1.default {
|
|
|
75
78
|
* @param name New name of the Event
|
|
76
79
|
* @returns Updated Event
|
|
77
80
|
*/
|
|
78
|
-
renameEvent(orgName, spaceName, eventName, name) {
|
|
81
|
+
renameEvent(orgName, spaceName, eventName, name, raw) {
|
|
79
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
83
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/name`), {
|
|
81
84
|
name: name,
|
|
82
85
|
});
|
|
83
|
-
return resp.data;
|
|
86
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
84
87
|
});
|
|
85
88
|
}
|
|
86
89
|
/**
|
|
@@ -89,9 +92,10 @@ class High5Event extends Base_1.default {
|
|
|
89
92
|
* @param spaceName Name of the Space
|
|
90
93
|
* @param eventName Name of the Event
|
|
91
94
|
*/
|
|
92
|
-
deleteEvent(orgName, spaceName, eventName) {
|
|
95
|
+
deleteEvent(orgName, spaceName, eventName, raw) {
|
|
93
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
97
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}`));
|
|
98
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
101
|
getEndpoint(endpoint) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import Base from "../../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
2
|
import { Design } from "../../../../../../interfaces/high5";
|
|
3
3
|
import { AddNode, DesignOperation, EditNode, LinkNodes, MoveNode } from "../../../../../../interfaces/high5/space/event/stream/design/DesignOperation";
|
|
4
4
|
import { DesignerNode } from "../../../../../../interfaces/high5/space/event/stream/design/StreamDesign";
|
|
5
5
|
export default class DesignOperations extends Base {
|
|
6
|
-
send(orgName: string, spaceName: string, eventName: string, streamId: string, designHash: string, operations: DesignOperation[]
|
|
6
|
+
send<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, designHash: string, operations: DesignOperation[], raw?: {
|
|
7
|
+
raw: R;
|
|
8
|
+
}): Promise<MaybeRaw<R, Design>>;
|
|
7
9
|
queue(): OperationQueue;
|
|
8
10
|
addNode(details: DesignerNode): OperationQueue;
|
|
9
11
|
deleteNode(uuid: string): OperationQueue;
|
|
@@ -8,15 +8,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.OperationQueue = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../../Base"));
|
|
14
17
|
const DesignOperation_1 = require("../../../../../../interfaces/high5/space/event/stream/design/DesignOperation");
|
|
15
18
|
class DesignOperations extends Base_1.default {
|
|
16
|
-
send(orgName, spaceName, eventName, streamId, designHash, operations) {
|
|
19
|
+
send(orgName, spaceName, eventName, streamId, designHash, operations, raw) {
|
|
17
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
21
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/operations`), { hash: designHash, operations });
|
|
19
|
-
return resp.data;
|
|
22
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
queue() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
2
|
import { Design } from "../../../../../../interfaces/high5/space/event/stream/design";
|
|
3
3
|
import { DesignContent } from "../../../../../../interfaces/high5/space/event/stream/design/StreamDesign";
|
|
4
4
|
import DesignOperations from "./DesignOperations";
|
|
@@ -22,7 +22,9 @@ export declare class High5Design extends Base {
|
|
|
22
22
|
* @param streamId ID of the stream
|
|
23
23
|
* @returns The requested design
|
|
24
24
|
*/
|
|
25
|
-
getDesign(orgName: string, spaceName: string, eventName: string, streamId: string
|
|
25
|
+
getDesign<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, raw?: {
|
|
26
|
+
raw: R;
|
|
27
|
+
}): Promise<MaybeRaw<R, Design>>;
|
|
26
28
|
/**
|
|
27
29
|
* Creates/overwrites a new design for the specified stream.
|
|
28
30
|
*
|
|
@@ -35,7 +37,9 @@ export declare class High5Design extends Base {
|
|
|
35
37
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
36
38
|
* @returns The created design
|
|
37
39
|
*/
|
|
38
|
-
createDesign(orgName: string, spaceName: string, eventName: string, streamId: string, name: string, content: DesignContent
|
|
40
|
+
createDesign<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, name: string, content: DesignContent, raw?: {
|
|
41
|
+
raw: R;
|
|
42
|
+
}): Promise<MaybeRaw<R, Design>>;
|
|
39
43
|
/**
|
|
40
44
|
* Publish the current design for a specified stream
|
|
41
45
|
*
|
|
@@ -48,6 +52,8 @@ export declare class High5Design extends Base {
|
|
|
48
52
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
49
53
|
* @returns The created design
|
|
50
54
|
*/
|
|
51
|
-
publishDesign(orgName: string, spaceName: string, eventName: string, streamId: string
|
|
55
|
+
publishDesign<R extends boolean = false>(orgName: string, spaceName: string, eventName: string, streamId: string, raw?: {
|
|
56
|
+
raw: R;
|
|
57
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
52
58
|
protected getEndpoint(endpoint: string): string;
|
|
53
59
|
}
|
|
@@ -8,11 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.High5Design = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../../Base");
|
|
14
|
-
const DesignOperations_1 = require("./DesignOperations");
|
|
15
|
-
const snapshot_1 = require("./snapshot");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../../Base"));
|
|
17
|
+
const DesignOperations_1 = __importDefault(require("./DesignOperations"));
|
|
18
|
+
const snapshot_1 = __importDefault(require("./snapshot"));
|
|
16
19
|
class High5Design extends Base_1.default {
|
|
17
20
|
/**
|
|
18
21
|
* API to manage design snapshots
|
|
@@ -40,10 +43,10 @@ class High5Design extends Base_1.default {
|
|
|
40
43
|
* @param streamId ID of the stream
|
|
41
44
|
* @returns The requested design
|
|
42
45
|
*/
|
|
43
|
-
getDesign(orgName, spaceName, eventName, streamId) {
|
|
46
|
+
getDesign(orgName, spaceName, eventName, streamId, raw) {
|
|
44
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
48
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design`));
|
|
46
|
-
return resp.data;
|
|
49
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
/**
|
|
@@ -58,13 +61,13 @@ class High5Design extends Base_1.default {
|
|
|
58
61
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
59
62
|
* @returns The created design
|
|
60
63
|
*/
|
|
61
|
-
createDesign(orgName, spaceName, eventName, streamId, name, content) {
|
|
64
|
+
createDesign(orgName, spaceName, eventName, streamId, name, content, raw) {
|
|
62
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
66
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design`), {
|
|
64
67
|
name,
|
|
65
68
|
content,
|
|
66
69
|
});
|
|
67
|
-
return resp.data;
|
|
70
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
@@ -79,9 +82,10 @@ class High5Design extends Base_1.default {
|
|
|
79
82
|
* @param content Design as Json payload (schema created by Stream Designer Studio)
|
|
80
83
|
* @returns The created design
|
|
81
84
|
*/
|
|
82
|
-
publishDesign(orgName, spaceName, eventName, streamId) {
|
|
85
|
+
publishDesign(orgName, spaceName, eventName, streamId, raw) {
|
|
83
86
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/publish`));
|
|
87
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/design/publish`));
|
|
88
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
85
89
|
});
|
|
86
90
|
}
|
|
87
91
|
getEndpoint(endpoint) {
|