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
|
@@ -1,69 +1,81 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
2
|
-
import { Cronjob, CronjobCreate } from "../../../../interfaces/fuse/space/cronjob/Cronjob";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
3
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { Job, JobCreate } from "../../../../interfaces/high5/space/job";
|
|
4
|
+
import { High5JobLogInternal } from "../../internal/space/job/log";
|
|
5
|
+
import { High5JobLog } from "./log";
|
|
6
|
+
export declare class High5Job extends Base {
|
|
7
|
+
get jobLog(): High5JobLog;
|
|
8
|
+
private _jobLog?;
|
|
9
|
+
get jobLogInternal(): High5JobLogInternal;
|
|
10
|
+
private _jobLogInternal?;
|
|
11
11
|
/**
|
|
12
12
|
* Retrieves a cronjob by it's ID.
|
|
13
13
|
* @param orgName Name of the organization
|
|
14
|
-
* @param spaceName Name of the
|
|
15
|
-
* @param
|
|
14
|
+
* @param spaceName Name of the High5 space
|
|
15
|
+
* @param jobId ID of the cronjob
|
|
16
16
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
17
17
|
* @returns The requested cronjob
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
getJob<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, exposeNextExecution?: boolean, raw?: {
|
|
20
|
+
raw: R;
|
|
21
|
+
}): Promise<MaybeRaw<R, Job>>;
|
|
20
22
|
/**
|
|
21
23
|
* Retrieves the next n cronjob executions as Unix timestamps (in milliseconds).
|
|
22
24
|
* @param orgName Name of the organization
|
|
23
25
|
* @param spaceName Name of the space
|
|
24
|
-
* @param
|
|
26
|
+
* @param jobId ID of the cronjob
|
|
25
27
|
* @returns Array of Unix timestamps
|
|
26
28
|
*/
|
|
27
|
-
getNextCronjobExecutions(orgName: string, spaceName: string,
|
|
29
|
+
getNextCronjobExecutions<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, raw?: {
|
|
30
|
+
raw: R;
|
|
31
|
+
}): Promise<MaybeRaw<R, number[]>>;
|
|
28
32
|
/**
|
|
29
|
-
* Creates a new cronjob in the specified
|
|
33
|
+
* Creates a new cronjob in the specified High5 space.
|
|
30
34
|
* @param orgName Name of the organisation
|
|
31
|
-
* @param spaceName Name of the
|
|
32
|
-
* @param
|
|
35
|
+
* @param spaceName Name of the High5 space
|
|
36
|
+
* @param createJob Cronjob to be created
|
|
33
37
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
34
38
|
* @returns Created cronjob
|
|
35
39
|
*/
|
|
36
|
-
|
|
40
|
+
createJob<R extends boolean = false>(orgName: string, spaceName: string, createJob: JobCreate, exposeNextExecution?: boolean, raw?: {
|
|
41
|
+
raw: R;
|
|
42
|
+
}): Promise<MaybeRaw<R, Job>>;
|
|
37
43
|
/**
|
|
38
44
|
* Updates an existing cronjob.
|
|
39
45
|
* @param orgName Name of the organization
|
|
40
46
|
* @param spaceName Name of the space
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
47
|
+
* @param jobId ID of the cronjob
|
|
48
|
+
* @param createJob Cronjob to be updated
|
|
43
49
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
44
50
|
* @returns Updated cronjob
|
|
45
51
|
*/
|
|
46
|
-
|
|
52
|
+
updateJob<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, createJob: JobCreate, exposeNextExecution?: boolean, raw?: {
|
|
53
|
+
raw: R;
|
|
54
|
+
}): Promise<MaybeRaw<R, Job>>;
|
|
47
55
|
/**
|
|
48
56
|
* Change the cron expression of an existing cronjob
|
|
49
57
|
* @param orgName Name of the organization
|
|
50
58
|
* @param spaceName Name of the space
|
|
51
|
-
* @param
|
|
59
|
+
* @param jobId ID of the cronjob
|
|
52
60
|
* @param expression New cron expression
|
|
53
61
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
54
62
|
* @returns The patched cronjob
|
|
55
63
|
*/
|
|
56
|
-
patchCronjobExpression(orgName: string, spaceName: string,
|
|
64
|
+
patchCronjobExpression<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, expression: string, exposeNextExecution?: boolean, raw?: {
|
|
65
|
+
raw: R;
|
|
66
|
+
}): Promise<MaybeRaw<R, Job>>;
|
|
57
67
|
/**
|
|
58
68
|
* Change the enabled flag of an existing cronjob
|
|
59
69
|
* @param orgName Name of the organization
|
|
60
70
|
* @param spaceName Name of the space
|
|
61
|
-
* @param
|
|
71
|
+
* @param jobId ID of the cronjob
|
|
62
72
|
* @param enabled Boolean flag to set
|
|
63
73
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
64
74
|
* @returns The patched cronjob
|
|
65
75
|
*/
|
|
66
|
-
patchCronjobEnabled(orgName: string, spaceName: string,
|
|
76
|
+
patchCronjobEnabled<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, enabled: boolean, exposeNextExecution?: boolean, raw?: {
|
|
77
|
+
raw: R;
|
|
78
|
+
}): Promise<MaybeRaw<R, Job>>;
|
|
67
79
|
/**
|
|
68
80
|
* Enable a cronjob.
|
|
69
81
|
*
|
|
@@ -71,11 +83,13 @@ export declare class FuseCronjob extends Base {
|
|
|
71
83
|
*
|
|
72
84
|
* @param orgName Name of the organization
|
|
73
85
|
* @param spaceName Name of the space
|
|
74
|
-
* @param
|
|
86
|
+
* @param jobId ID of the cronjob
|
|
75
87
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
76
88
|
* @returns The patched cronjob
|
|
77
89
|
*/
|
|
78
|
-
enableCronjob
|
|
90
|
+
enableCronjob<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, exposeNextExecution?: boolean, raw?: {
|
|
91
|
+
raw: R;
|
|
92
|
+
}): Promise<MaybeRaw<R, Job>>;
|
|
79
93
|
/**
|
|
80
94
|
* Disable a cronjob.
|
|
81
95
|
*
|
|
@@ -83,20 +97,24 @@ export declare class FuseCronjob extends Base {
|
|
|
83
97
|
*
|
|
84
98
|
* @param orgName Name of the organization
|
|
85
99
|
* @param spaceName Name of the space
|
|
86
|
-
* @param
|
|
100
|
+
* @param jobId ID of the cronjob
|
|
87
101
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
88
102
|
* @returns The patched cronjob
|
|
89
103
|
*/
|
|
90
|
-
disableCronjob
|
|
104
|
+
disableCronjob<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, exposeNextExecution?: boolean, raw?: {
|
|
105
|
+
raw: R;
|
|
106
|
+
}): Promise<MaybeRaw<R, Job>>;
|
|
91
107
|
/**
|
|
92
108
|
* Deletes a cronjob by its ID
|
|
93
109
|
* @param orgName Name of the organization
|
|
94
110
|
* @param spaceName Name of the space
|
|
95
|
-
* @param
|
|
111
|
+
* @param jobId ID of the cronjob
|
|
96
112
|
*/
|
|
97
|
-
|
|
113
|
+
deleteJob<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, raw?: {
|
|
114
|
+
raw: R;
|
|
115
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
98
116
|
/**
|
|
99
|
-
* Retrieves all cronjobs of a
|
|
117
|
+
* Retrieves all cronjobs of a High5 space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
100
118
|
* @param orgName Name of the organization
|
|
101
119
|
* @param spaceName Name of the space
|
|
102
120
|
* @param filters (optional) Array of search filters
|
|
@@ -106,11 +124,13 @@ export declare class FuseCronjob extends Base {
|
|
|
106
124
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the returned cronjob objects
|
|
107
125
|
* @returns Object containing an array of filtered cronjobs as well as the total number of results found in the database (independent of limit and page)
|
|
108
126
|
*/
|
|
109
|
-
|
|
127
|
+
searchJobs<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page, exposeNextExecution, }: SearchParams & {
|
|
110
128
|
orgName: string;
|
|
111
129
|
spaceName: string;
|
|
112
130
|
exposeNextExecution?: boolean;
|
|
113
|
-
}
|
|
131
|
+
}, raw?: {
|
|
132
|
+
raw: R;
|
|
133
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Job>>>;
|
|
114
134
|
/**
|
|
115
135
|
* Resolve a cron pattern along with a timezone to get the next executions in mili-seconds.
|
|
116
136
|
* @param expression The cron expression
|
|
@@ -118,6 +138,8 @@ export declare class FuseCronjob extends Base {
|
|
|
118
138
|
* @param amount The amount of returned execution-dates (limited between 1 and 10, default is 3)
|
|
119
139
|
* @returns Array of Unix timestamps
|
|
120
140
|
*/
|
|
121
|
-
resolveCronPatternWithTimezone(expression: string, timezone: string, amount?: number
|
|
141
|
+
resolveCronPatternWithTimezone<R extends boolean = false>(expression: string, timezone: string, amount?: number, raw?: {
|
|
142
|
+
raw: R;
|
|
143
|
+
}): Promise<MaybeRaw<R, number[]>>;
|
|
122
144
|
protected getEndpoint(endpoint: string): string;
|
|
123
145
|
}
|
|
@@ -8,156 +8,157 @@ 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.High5Job = 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
|
-
const log_1 = require("../../internal/space/
|
|
19
|
+
const log_1 = require("../../internal/space/job/log");
|
|
17
20
|
const log_2 = require("./log");
|
|
18
|
-
class
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* Enable a cronjob.
|
|
23
|
-
*
|
|
24
|
-
* This is a wrapper around patchCronjobEnabled.
|
|
25
|
-
*
|
|
26
|
-
* @param orgName Name of the organization
|
|
27
|
-
* @param spaceName Name of the space
|
|
28
|
-
* @param cronjobId ID of the cronjob
|
|
29
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
30
|
-
* @returns The patched cronjob
|
|
31
|
-
*/
|
|
32
|
-
this.enableCronjob = (orgName, spaceName, cronjobId, exposeNextExecution = false) => {
|
|
33
|
-
return this.patchCronjobEnabled(orgName, spaceName, cronjobId, true, exposeNextExecution);
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Disable a cronjob.
|
|
37
|
-
*
|
|
38
|
-
* This is a wrapper around patchCronjobEnabled.
|
|
39
|
-
*
|
|
40
|
-
* @param orgName Name of the organization
|
|
41
|
-
* @param spaceName Name of the space
|
|
42
|
-
* @param cronjobId ID of the cronjob
|
|
43
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
44
|
-
* @returns The patched cronjob
|
|
45
|
-
*/
|
|
46
|
-
this.disableCronjob = (orgName, spaceName, cronjobId, exposeNextExecution = false) => {
|
|
47
|
-
return this.patchCronjobEnabled(orgName, spaceName, cronjobId, false, exposeNextExecution);
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
get cronjobLog() {
|
|
51
|
-
if (this._cronjobLog === undefined) {
|
|
52
|
-
this._cronjobLog = new log_2.FuseCronjobLog(this.options, this.axios);
|
|
21
|
+
class High5Job extends Base_1.default {
|
|
22
|
+
get jobLog() {
|
|
23
|
+
if (this._jobLog === undefined) {
|
|
24
|
+
this._jobLog = new log_2.High5JobLog(this.options, this.axios);
|
|
53
25
|
}
|
|
54
|
-
return this.
|
|
26
|
+
return this._jobLog;
|
|
55
27
|
}
|
|
56
|
-
get
|
|
57
|
-
if (this.
|
|
58
|
-
this.
|
|
28
|
+
get jobLogInternal() {
|
|
29
|
+
if (this._jobLogInternal === undefined) {
|
|
30
|
+
this._jobLogInternal = new log_1.High5JobLogInternal(this.options, this.axios);
|
|
59
31
|
}
|
|
60
|
-
return this.
|
|
32
|
+
return this._jobLogInternal;
|
|
61
33
|
}
|
|
62
34
|
/**
|
|
63
35
|
* Retrieves a cronjob by it's ID.
|
|
64
36
|
* @param orgName Name of the organization
|
|
65
|
-
* @param spaceName Name of the
|
|
66
|
-
* @param
|
|
37
|
+
* @param spaceName Name of the High5 space
|
|
38
|
+
* @param jobId ID of the cronjob
|
|
67
39
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
68
40
|
* @returns The requested cronjob
|
|
69
41
|
*/
|
|
70
|
-
|
|
71
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName,
|
|
72
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
73
|
-
return resp.data;
|
|
42
|
+
getJob(orgName_1, spaceName_1, jobId_1) {
|
|
43
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, exposeNextExecution = false, raw) {
|
|
44
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}?nextExecution=${exposeNextExecution}`));
|
|
45
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
74
46
|
});
|
|
75
47
|
}
|
|
76
48
|
/**
|
|
77
49
|
* Retrieves the next n cronjob executions as Unix timestamps (in milliseconds).
|
|
78
50
|
* @param orgName Name of the organization
|
|
79
51
|
* @param spaceName Name of the space
|
|
80
|
-
* @param
|
|
52
|
+
* @param jobId ID of the cronjob
|
|
81
53
|
* @returns Array of Unix timestamps
|
|
82
54
|
*/
|
|
83
|
-
getNextCronjobExecutions(orgName, spaceName,
|
|
55
|
+
getNextCronjobExecutions(orgName, spaceName, jobId, raw) {
|
|
84
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
86
|
-
return resp.data;
|
|
57
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/next`));
|
|
58
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
87
59
|
});
|
|
88
60
|
}
|
|
89
61
|
/**
|
|
90
|
-
* Creates a new cronjob in the specified
|
|
62
|
+
* Creates a new cronjob in the specified High5 space.
|
|
91
63
|
* @param orgName Name of the organisation
|
|
92
|
-
* @param spaceName Name of the
|
|
93
|
-
* @param
|
|
64
|
+
* @param spaceName Name of the High5 space
|
|
65
|
+
* @param createJob Cronjob to be created
|
|
94
66
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
95
67
|
* @returns Created cronjob
|
|
96
68
|
*/
|
|
97
|
-
|
|
98
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName,
|
|
99
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs?nextExecution=${exposeNextExecution}`),
|
|
100
|
-
return resp.data;
|
|
69
|
+
createJob(orgName_1, spaceName_1, createJob_1) {
|
|
70
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, createJob, exposeNextExecution = false, raw) {
|
|
71
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs?nextExecution=${exposeNextExecution}`), createJob);
|
|
72
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
101
73
|
});
|
|
102
74
|
}
|
|
103
75
|
/**
|
|
104
76
|
* Updates an existing cronjob.
|
|
105
77
|
* @param orgName Name of the organization
|
|
106
78
|
* @param spaceName Name of the space
|
|
107
|
-
* @param
|
|
108
|
-
* @param
|
|
79
|
+
* @param jobId ID of the cronjob
|
|
80
|
+
* @param createJob Cronjob to be updated
|
|
109
81
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
110
82
|
* @returns Updated cronjob
|
|
111
83
|
*/
|
|
112
|
-
|
|
113
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName,
|
|
114
|
-
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
115
|
-
return resp.data;
|
|
84
|
+
updateJob(orgName_1, spaceName_1, jobId_1, createJob_1) {
|
|
85
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, createJob, exposeNextExecution = false, raw) {
|
|
86
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}?nextExecution=${exposeNextExecution}`), createJob);
|
|
87
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
116
88
|
});
|
|
117
89
|
}
|
|
118
90
|
/**
|
|
119
91
|
* Change the cron expression of an existing cronjob
|
|
120
92
|
* @param orgName Name of the organization
|
|
121
93
|
* @param spaceName Name of the space
|
|
122
|
-
* @param
|
|
94
|
+
* @param jobId ID of the cronjob
|
|
123
95
|
* @param expression New cron expression
|
|
124
96
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
125
97
|
* @returns The patched cronjob
|
|
126
98
|
*/
|
|
127
|
-
patchCronjobExpression(orgName_1, spaceName_1,
|
|
128
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName,
|
|
129
|
-
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
130
|
-
return resp.data;
|
|
99
|
+
patchCronjobExpression(orgName_1, spaceName_1, jobId_1, expression_1) {
|
|
100
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, expression, exposeNextExecution = false, raw) {
|
|
101
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/expression?nextExecution=${exposeNextExecution}`), { expression: expression });
|
|
102
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
131
103
|
});
|
|
132
104
|
}
|
|
133
105
|
/**
|
|
134
106
|
* Change the enabled flag of an existing cronjob
|
|
135
107
|
* @param orgName Name of the organization
|
|
136
108
|
* @param spaceName Name of the space
|
|
137
|
-
* @param
|
|
109
|
+
* @param jobId ID of the cronjob
|
|
138
110
|
* @param enabled Boolean flag to set
|
|
139
111
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
140
112
|
* @returns The patched cronjob
|
|
141
113
|
*/
|
|
142
|
-
patchCronjobEnabled(orgName_1, spaceName_1,
|
|
143
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName,
|
|
144
|
-
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
145
|
-
return resp.data;
|
|
114
|
+
patchCronjobEnabled(orgName_1, spaceName_1, jobId_1, enabled_1) {
|
|
115
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, enabled, exposeNextExecution = false, raw) {
|
|
116
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/enabled?nextExecution=${exposeNextExecution}`), { enabled });
|
|
117
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
146
118
|
});
|
|
147
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Enable a cronjob.
|
|
122
|
+
*
|
|
123
|
+
* This is a wrapper around patchCronjobEnabled.
|
|
124
|
+
*
|
|
125
|
+
* @param orgName Name of the organization
|
|
126
|
+
* @param spaceName Name of the space
|
|
127
|
+
* @param jobId ID of the cronjob
|
|
128
|
+
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
129
|
+
* @returns The patched cronjob
|
|
130
|
+
*/
|
|
131
|
+
enableCronjob(orgName, spaceName, jobId, exposeNextExecution = false, raw) {
|
|
132
|
+
return this.patchCronjobEnabled(orgName, spaceName, jobId, true, exposeNextExecution, raw);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Disable a cronjob.
|
|
136
|
+
*
|
|
137
|
+
* This is a wrapper around patchCronjobEnabled.
|
|
138
|
+
*
|
|
139
|
+
* @param orgName Name of the organization
|
|
140
|
+
* @param spaceName Name of the space
|
|
141
|
+
* @param jobId ID of the cronjob
|
|
142
|
+
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
143
|
+
* @returns The patched cronjob
|
|
144
|
+
*/
|
|
145
|
+
disableCronjob(orgName, spaceName, jobId, exposeNextExecution = false, raw) {
|
|
146
|
+
return this.patchCronjobEnabled(orgName, spaceName, jobId, false, exposeNextExecution, raw);
|
|
147
|
+
}
|
|
148
148
|
/**
|
|
149
149
|
* Deletes a cronjob by its ID
|
|
150
150
|
* @param orgName Name of the organization
|
|
151
151
|
* @param spaceName Name of the space
|
|
152
|
-
* @param
|
|
152
|
+
* @param jobId ID of the cronjob
|
|
153
153
|
*/
|
|
154
|
-
|
|
154
|
+
deleteJob(orgName, spaceName, jobId, raw) {
|
|
155
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
156
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}`));
|
|
157
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
160
|
/**
|
|
160
|
-
* Retrieves all cronjobs of a
|
|
161
|
+
* Retrieves all cronjobs of a High5 space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
161
162
|
* @param orgName Name of the organization
|
|
162
163
|
* @param spaceName Name of the space
|
|
163
164
|
* @param filters (optional) Array of search filters
|
|
@@ -167,8 +168,8 @@ class FuseCronjob extends Base_1.default {
|
|
|
167
168
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the returned cronjob objects
|
|
168
169
|
* @returns Object containing an array of filtered cronjobs as well as the total number of results found in the database (independent of limit and page)
|
|
169
170
|
*/
|
|
170
|
-
|
|
171
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, exposeNextExecution = false, }) {
|
|
171
|
+
searchJobs(_a, raw_1) {
|
|
172
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, exposeNextExecution = false, }, raw) {
|
|
172
173
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
173
174
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
174
175
|
});
|
|
@@ -176,7 +177,7 @@ class FuseCronjob extends Base_1.default {
|
|
|
176
177
|
filters: filtersDTO,
|
|
177
178
|
sorting,
|
|
178
179
|
});
|
|
179
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
180
|
+
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));
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
183
|
/**
|
|
@@ -187,17 +188,17 @@ class FuseCronjob extends Base_1.default {
|
|
|
187
188
|
* @returns Array of Unix timestamps
|
|
188
189
|
*/
|
|
189
190
|
resolveCronPatternWithTimezone(expression_1, timezone_1) {
|
|
190
|
-
return __awaiter(this, arguments, void 0, function* (expression, timezone, amount = 3) {
|
|
191
|
+
return __awaiter(this, arguments, void 0, function* (expression, timezone, amount = 3, raw) {
|
|
191
192
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/cron/resolve`), {
|
|
192
193
|
expression: expression,
|
|
193
194
|
timezone: timezone,
|
|
194
195
|
amount: amount,
|
|
195
196
|
});
|
|
196
|
-
return resp.data;
|
|
197
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
197
198
|
});
|
|
198
199
|
}
|
|
199
200
|
getEndpoint(endpoint) {
|
|
200
|
-
return `${this.options.server}/api/
|
|
201
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
|
-
exports.
|
|
204
|
+
exports.High5Job = High5Job;
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
import Base from "../../../../../Base";
|
|
2
|
-
import { CronjobLogDto } from "../../../../../interfaces/fuse/space/cronjob/CronjobLog";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../Base";
|
|
3
2
|
import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
|
|
4
|
-
|
|
3
|
+
import { JobLogDto } from "../../../../../interfaces/high5/space/job/JobLog";
|
|
4
|
+
export declare class High5JobLog extends Base {
|
|
5
5
|
/**
|
|
6
|
-
* Retrieves all cronjobs of a
|
|
6
|
+
* Retrieves all cronjobs of a High5 space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
7
7
|
* @param orgName Name of the organization
|
|
8
8
|
* @param spaceName Name of the space
|
|
9
|
-
* @param
|
|
9
|
+
* @param jobId ID of the cronjob
|
|
10
10
|
* @param filters (optional) Array of search filters
|
|
11
11
|
* @param sorting (optional) Sorting object
|
|
12
12
|
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
13
13
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
14
14
|
* @returns Object containing an array of filtered cronjob logs as well as the total number of results found in the database (independent of limit and page)
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
searchJobLogs<R extends boolean = false>({ orgName, spaceName, jobId, filters, sorting, limit, page }: SearchParams & {
|
|
17
17
|
orgName: string;
|
|
18
18
|
spaceName: string;
|
|
19
|
-
|
|
20
|
-
}
|
|
19
|
+
jobId: string;
|
|
20
|
+
}, raw?: {
|
|
21
|
+
raw: R;
|
|
22
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<JobLogDto>>>;
|
|
21
23
|
/**
|
|
22
24
|
* Retrieves a cronjob log by it's ID
|
|
23
25
|
* @param orgName Name of the organization
|
|
24
26
|
* @param spaceName Name of the space
|
|
25
|
-
* @param
|
|
26
|
-
* @param
|
|
27
|
+
* @param jobId ID of the cronjob
|
|
28
|
+
* @param jobLogId ID of the cronjob log
|
|
27
29
|
* @returns the cronjob log
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
getJobLog<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, jobLogId: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, JobLogDto>>;
|
|
30
34
|
protected getEndpoint(endpoint: string): string;
|
|
31
35
|
}
|
|
@@ -8,51 +8,54 @@ 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.High5JobLog = 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
|
-
class
|
|
19
|
+
class High5JobLog extends Base_1.default {
|
|
17
20
|
/**
|
|
18
|
-
* Retrieves all cronjobs of a
|
|
21
|
+
* Retrieves all cronjobs of a High5 space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
19
22
|
* @param orgName Name of the organization
|
|
20
23
|
* @param spaceName Name of the space
|
|
21
|
-
* @param
|
|
24
|
+
* @param jobId ID of the cronjob
|
|
22
25
|
* @param filters (optional) Array of search filters
|
|
23
26
|
* @param sorting (optional) Sorting object
|
|
24
27
|
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
25
28
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
26
29
|
* @returns Object containing an array of filtered cronjob logs as well as the total number of results found in the database (independent of limit and page)
|
|
27
30
|
*/
|
|
28
|
-
|
|
29
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName,
|
|
31
|
+
searchJobLogs(_a, raw_1) {
|
|
32
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, jobId, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
30
33
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
31
34
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
32
35
|
});
|
|
33
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
36
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/logs/search?page=${page}&limit=${limit}`), {
|
|
34
37
|
filters: filtersDTO,
|
|
35
38
|
sorting,
|
|
36
39
|
});
|
|
37
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
40
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* Retrieves a cronjob log by it's ID
|
|
42
45
|
* @param orgName Name of the organization
|
|
43
46
|
* @param spaceName Name of the space
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
47
|
+
* @param jobId ID of the cronjob
|
|
48
|
+
* @param jobLogId ID of the cronjob log
|
|
46
49
|
* @returns the cronjob log
|
|
47
50
|
*/
|
|
48
|
-
|
|
51
|
+
getJobLog(orgName, spaceName, jobId, jobLogId, raw) {
|
|
49
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${
|
|
51
|
-
return resp.data;
|
|
53
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/logs/${jobLogId}`));
|
|
54
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
getEndpoint(endpoint) {
|
|
55
|
-
return `${this.options.server}/api/
|
|
58
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
|
-
exports.
|
|
61
|
+
exports.High5JobLog = High5JobLog;
|