@cloudize-sdks/cloudize-workflow-sdk 1.0.21
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/LICENSE +1 -0
- package/README.md +2 -0
- package/lib/package.json +56 -0
- package/lib/src/endpoints/application.healthchecks.d.ts +7 -0
- package/lib/src/endpoints/application.healthchecks.js +23 -0
- package/lib/src/endpoints/index.d.ts +8 -0
- package/lib/src/endpoints/index.js +24 -0
- package/lib/src/endpoints/workflow.action.delays.d.ts +8 -0
- package/lib/src/endpoints/workflow.action.delays.js +29 -0
- package/lib/src/endpoints/workflow.action.executions.d.ts +8 -0
- package/lib/src/endpoints/workflow.action.executions.js +29 -0
- package/lib/src/endpoints/workflow.action.responses.d.ts +8 -0
- package/lib/src/endpoints/workflow.action.responses.js +29 -0
- package/lib/src/endpoints/workflow.action.timeouts.d.ts +8 -0
- package/lib/src/endpoints/workflow.action.timeouts.js +29 -0
- package/lib/src/endpoints/workflow.cancellations.d.ts +8 -0
- package/lib/src/endpoints/workflow.cancellations.js +29 -0
- package/lib/src/endpoints/workflow.transition.initializations.d.ts +8 -0
- package/lib/src/endpoints/workflow.transition.initializations.js +29 -0
- package/lib/src/endpoints/workflows.d.ts +13 -0
- package/lib/src/endpoints/workflows.js +59 -0
- package/lib/src/index.d.ts +5 -0
- package/lib/src/index.js +33 -0
- package/lib/src/resources/application.healthcheck.d.ts +19 -0
- package/lib/src/resources/application.healthcheck.js +54 -0
- package/lib/src/resources/index.d.ts +8 -0
- package/lib/src/resources/index.js +24 -0
- package/lib/src/resources/workflow.action.delay.d.ts +20 -0
- package/lib/src/resources/workflow.action.delay.js +57 -0
- package/lib/src/resources/workflow.action.execution.d.ts +20 -0
- package/lib/src/resources/workflow.action.execution.js +57 -0
- package/lib/src/resources/workflow.action.response.d.ts +23 -0
- package/lib/src/resources/workflow.action.response.js +64 -0
- package/lib/src/resources/workflow.action.timeout.d.ts +20 -0
- package/lib/src/resources/workflow.action.timeout.js +57 -0
- package/lib/src/resources/workflow.cancellation.d.ts +21 -0
- package/lib/src/resources/workflow.cancellation.js +58 -0
- package/lib/src/resources/workflow.d.ts +25 -0
- package/lib/src/resources/workflow.js +70 -0
- package/lib/src/resources/workflow.transition.initialization.d.ts +20 -0
- package/lib/src/resources/workflow.transition.initialization.js +55 -0
- package/lib/src/type-guards/index.d.ts +2 -0
- package/lib/src/type-guards/index.js +7 -0
- package/lib/src/type-guards/workflow.action.json.api.format.d.ts +2 -0
- package/lib/src/type-guards/workflow.action.json.api.format.js +11 -0
- package/lib/src/type-guards/workflow.action.json.format.d.ts +2 -0
- package/lib/src/type-guards/workflow.action.json.format.js +11 -0
- package/lib/src/types/index.d.ts +9 -0
- package/lib/src/types/index.js +21 -0
- package/lib/src/types/uuid.value.d.ts +2 -0
- package/lib/src/types/uuid.value.js +9 -0
- package/lib/src/types/workflow.action.custom.retry.policy.d.ts +2 -0
- package/lib/src/types/workflow.action.custom.retry.policy.js +15 -0
- package/lib/src/types/workflow.action.d.ts +14 -0
- package/lib/src/types/workflow.action.format.d.ts +4 -0
- package/lib/src/types/workflow.action.format.js +11 -0
- package/lib/src/types/workflow.action.header.d.ts +5 -0
- package/lib/src/types/workflow.action.header.js +12 -0
- package/lib/src/types/workflow.action.headers.d.ts +3 -0
- package/lib/src/types/workflow.action.headers.js +17 -0
- package/lib/src/types/workflow.action.identifier.d.ts +2 -0
- package/lib/src/types/workflow.action.identifier.js +9 -0
- package/lib/src/types/workflow.action.js +25 -0
- package/lib/src/types/workflow.action.json.api.format.d.ts +8 -0
- package/lib/src/types/workflow.action.json.api.format.js +23 -0
- package/lib/src/types/workflow.action.json.format.d.ts +6 -0
- package/lib/src/types/workflow.action.json.format.js +19 -0
- package/lib/src/types/workflow.action.response.processing.status.d.ts +2 -0
- package/lib/src/types/workflow.action.response.processing.status.js +14 -0
- package/lib/src/types/workflow.action.retry.policy.d.ts +10 -0
- package/lib/src/types/workflow.action.retry.policy.js +20 -0
- package/lib/src/types/workflow.action.retry.strategy.d.ts +2 -0
- package/lib/src/types/workflow.action.retry.strategy.js +15 -0
- package/lib/src/types/workflow.action.url.d.ts +2 -0
- package/lib/src/types/workflow.action.url.js +9 -0
- package/lib/src/types/workflow.actions.d.ts +3 -0
- package/lib/src/types/workflow.actions.js +17 -0
- package/lib/src/types/workflow.control.d.ts +7 -0
- package/lib/src/types/workflow.control.js +14 -0
- package/lib/src/types/workflow.control.log.d.ts +3 -0
- package/lib/src/types/workflow.control.log.entry.d.ts +5 -0
- package/lib/src/types/workflow.control.log.entry.js +13 -0
- package/lib/src/types/workflow.control.log.js +17 -0
- package/lib/src/types/workflow.control.status.d.ts +2 -0
- package/lib/src/types/workflow.control.status.js +16 -0
- package/lib/src/types/workflow.control.transitions.d.ts +9 -0
- package/lib/src/types/workflow.control.transitions.js +17 -0
- package/lib/src/types/workflow.error.transition.d.ts +7 -0
- package/lib/src/types/workflow.error.transition.js +14 -0
- package/lib/src/types/workflow.error.transitions.d.ts +3 -0
- package/lib/src/types/workflow.error.transitions.js +17 -0
- package/lib/src/types/workflow.finalization.transition.d.ts +7 -0
- package/lib/src/types/workflow.finalization.transition.js +14 -0
- package/lib/src/types/workflow.finalization.transitions.d.ts +3 -0
- package/lib/src/types/workflow.finalization.transitions.js +17 -0
- package/lib/src/types/workflow.options.d.ts +5 -0
- package/lib/src/types/workflow.options.js +12 -0
- package/lib/src/types/workflow.transition.action.execution.parameters.d.ts +6 -0
- package/lib/src/types/workflow.transition.action.execution.parameters.js +13 -0
- package/lib/src/types/workflow.transition.before.action.execution.parameters.d.ts +7 -0
- package/lib/src/types/workflow.transition.before.action.execution.parameters.js +14 -0
- package/lib/src/types/workflow.transition.d.ts +13 -0
- package/lib/src/types/workflow.transition.delayed.action.execution.parameters.d.ts +5 -0
- package/lib/src/types/workflow.transition.delayed.action.execution.parameters.js +13 -0
- package/lib/src/types/workflow.transition.exit.state.d.ts +5 -0
- package/lib/src/types/workflow.transition.exit.state.js +12 -0
- package/lib/src/types/workflow.transition.identifier.d.ts +2 -0
- package/lib/src/types/workflow.transition.identifier.js +9 -0
- package/lib/src/types/workflow.transition.js +23 -0
- package/lib/src/types/workflow.transition.match.conditions.d.ts +5 -0
- package/lib/src/types/workflow.transition.match.conditions.js +11 -0
- package/lib/src/types/workflow.transition.state.data.d.ts +2 -0
- package/lib/src/types/workflow.transition.state.data.js +8 -0
- package/lib/src/types/workflow.transition.status.d.ts +2 -0
- package/lib/src/types/workflow.transition.status.js +18 -0
- package/lib/src/types/workflow.transition.timeout.action.d.ts +2 -0
- package/lib/src/types/workflow.transition.timeout.action.js +14 -0
- package/lib/src/types/workflow.transition.timeout.settings.d.ts +7 -0
- package/lib/src/types/workflow.transition.timeout.settings.js +14 -0
- package/lib/src/types/workflow.transitions.d.ts +3 -0
- package/lib/src/types/workflow.transitions.js +17 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Copyright (c) 2025 Cloudize Limited. All rights reserved.
|
package/README.md
ADDED
package/lib/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cloudize-sdks/cloudize-workflow-sdk",
|
|
3
|
+
"author": {
|
|
4
|
+
"name": "the Cloudize Platform API Team",
|
|
5
|
+
"email": "apis@cloudize.net",
|
|
6
|
+
"url": ""
|
|
7
|
+
},
|
|
8
|
+
"contributors": [
|
|
9
|
+
{
|
|
10
|
+
"name": "the Cloudize Platform API Team",
|
|
11
|
+
"email": "apis@cloudize.net"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"description": "Cloudize Workflow SDK",
|
|
15
|
+
"license": "UNLICENSED",
|
|
16
|
+
"version": "1.0.21",
|
|
17
|
+
"main": "lib/src/index.js",
|
|
18
|
+
"types": "lib/src/index.d.ts",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"run:build": "node lib/src/index.js",
|
|
21
|
+
"run:dev": "ts-node src/index.ts",
|
|
22
|
+
"test:coverage": "jest --coverage --config jest.config.js",
|
|
23
|
+
"test:watch": "jest --watch --config jest.config.js",
|
|
24
|
+
"win:build": "jest --config jest.config.js --coverage && (if exist lib rmdir /s /q lib) && tsc",
|
|
25
|
+
"unx:build": "jest --config jest.config.js --coverage && rm -rf lib && tsc",
|
|
26
|
+
"win:build:publish": "jest --config jest.config.js --coverage && (if exist lib rmdir /s /q lib) && tsc && npm publish",
|
|
27
|
+
"unx:build:publish": "jest --config jest.config.js --coverage && rm -rf lib && tsc && npm publish",
|
|
28
|
+
"win:upgrade-latest": "(if exist node_modules rmdir /s /q node_modules) && (if exist package-lock.json del /s /q package-lock.json) && ncu -u --target latest && npm install",
|
|
29
|
+
"unx:upgrade-latest": "rm -rf node_modules && rm -f package-lock.json && ncu -u --target latest && npm install",
|
|
30
|
+
"win:upgrade-minor": "(if exist node_modules rmdir /s /q node_modules) && (if exist package-lock.json del /s /q package-lock.json) && ncu -u --target minor && npm install",
|
|
31
|
+
"unx:upgrade-minor": "rm -rf node_modules && rm -f package-lock.json && ncu -u --target minor && npm install"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@cloudize/highres-timer": "^24.1.9",
|
|
35
|
+
"@cloudize/json": "^24.1.9",
|
|
36
|
+
"@cloudize/rest-client": "^24.1.9",
|
|
37
|
+
"@cloudize/sdk-core": "^24.1.11"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/jest": "^29.5.14",
|
|
41
|
+
"@types/node": "^20.17.25",
|
|
42
|
+
"@types/uuid": "^9.0.8",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
44
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
45
|
+
"eslint": "^8.57.1",
|
|
46
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
47
|
+
"eslint-plugin-import": "^2.31.0",
|
|
48
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
49
|
+
"eslint-plugin-react": "^7.37.4",
|
|
50
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
51
|
+
"jest": "^29.7.0",
|
|
52
|
+
"ts-jest": "^29.2.6",
|
|
53
|
+
"ts-node": "^10.9.2",
|
|
54
|
+
"typescript": "^5.8.2"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ResourceContainer } from '@cloudize/sdk-core';
|
|
2
|
+
import { ApplicationHealthcheck } from '../resources';
|
|
3
|
+
export declare class ApplicationHealthchecks extends ResourceContainer {
|
|
4
|
+
get data(): ApplicationHealthcheck | ApplicationHealthcheck[];
|
|
5
|
+
protected EndpointPath(): string;
|
|
6
|
+
protected EndpointContentType(): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplicationHealthchecks = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
class ApplicationHealthchecks extends sdk_core_1.ResourceContainer {
|
|
7
|
+
get data() {
|
|
8
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
9
|
+
return this._data;
|
|
10
|
+
}
|
|
11
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
12
|
+
return this._data;
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
EndpointPath() {
|
|
17
|
+
return this.sdkConfig.FormatURL('/v1/healthcheck/app');
|
|
18
|
+
}
|
|
19
|
+
EndpointContentType() {
|
|
20
|
+
return 'application/json';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ApplicationHealthchecks = ApplicationHealthchecks;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './application.healthchecks';
|
|
2
|
+
export * from './workflows';
|
|
3
|
+
export * from './workflow.cancellations';
|
|
4
|
+
export * from './workflow.action.delays';
|
|
5
|
+
export * from './workflow.action.executions';
|
|
6
|
+
export * from './workflow.action.responses';
|
|
7
|
+
export * from './workflow.action.timeouts';
|
|
8
|
+
export * from './workflow.transition.initializations';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./application.healthchecks"), exports);
|
|
18
|
+
__exportStar(require("./workflows"), exports);
|
|
19
|
+
__exportStar(require("./workflow.cancellations"), exports);
|
|
20
|
+
__exportStar(require("./workflow.action.delays"), exports);
|
|
21
|
+
__exportStar(require("./workflow.action.executions"), exports);
|
|
22
|
+
__exportStar(require("./workflow.action.responses"), exports);
|
|
23
|
+
__exportStar(require("./workflow.action.timeouts"), exports);
|
|
24
|
+
__exportStar(require("./workflow.transition.initializations"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceContainer } from '@cloudize/sdk-core';
|
|
2
|
+
import { WorkflowActionDelay } from '../resources';
|
|
3
|
+
export declare class WorkflowActionDelays extends ResourceContainer {
|
|
4
|
+
get data(): WorkflowActionDelay | WorkflowActionDelay[];
|
|
5
|
+
Add(): WorkflowActionDelay;
|
|
6
|
+
protected EndpointPath(): string;
|
|
7
|
+
protected EndpointContentType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowActionDelays = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
const resources_1 = require("../resources");
|
|
7
|
+
class WorkflowActionDelays extends sdk_core_1.ResourceContainer {
|
|
8
|
+
get data() {
|
|
9
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
10
|
+
return this._data;
|
|
11
|
+
}
|
|
12
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
13
|
+
return this._data;
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
Add() {
|
|
18
|
+
const obj = new resources_1.WorkflowActionDelay(this, sdk_core_1.ResourceObjectMode.NewDocument);
|
|
19
|
+
this.AddResourceToMemoryStructure(obj);
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
EndpointPath() {
|
|
23
|
+
return this.sdkConfig.FormatURL('/v1/workflows/{workflow}/transition/{transition}/action/delay');
|
|
24
|
+
}
|
|
25
|
+
EndpointContentType() {
|
|
26
|
+
return 'application/vnd.api+json';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.WorkflowActionDelays = WorkflowActionDelays;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceContainer } from '@cloudize/sdk-core';
|
|
2
|
+
import { WorkflowActionExecution } from '../resources';
|
|
3
|
+
export declare class WorkflowActionExecutions extends ResourceContainer {
|
|
4
|
+
get data(): WorkflowActionExecution | WorkflowActionExecution[];
|
|
5
|
+
Add(): WorkflowActionExecution;
|
|
6
|
+
protected EndpointPath(): string;
|
|
7
|
+
protected EndpointContentType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowActionExecutions = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
const resources_1 = require("../resources");
|
|
7
|
+
class WorkflowActionExecutions extends sdk_core_1.ResourceContainer {
|
|
8
|
+
get data() {
|
|
9
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
10
|
+
return this._data;
|
|
11
|
+
}
|
|
12
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
13
|
+
return this._data;
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
Add() {
|
|
18
|
+
const obj = new resources_1.WorkflowActionExecution(this, sdk_core_1.ResourceObjectMode.NewDocument);
|
|
19
|
+
this.AddResourceToMemoryStructure(obj);
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
EndpointPath() {
|
|
23
|
+
return this.sdkConfig.FormatURL('/v1/workflows/{workflow}/transition/{transition}/action/execution');
|
|
24
|
+
}
|
|
25
|
+
EndpointContentType() {
|
|
26
|
+
return 'application/vnd.api+json';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.WorkflowActionExecutions = WorkflowActionExecutions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceContainer } from '@cloudize/sdk-core';
|
|
2
|
+
import { WorkflowActionResponse } from '../resources';
|
|
3
|
+
export declare class WorkflowActionResponses extends ResourceContainer {
|
|
4
|
+
get data(): WorkflowActionResponse | WorkflowActionResponse[];
|
|
5
|
+
Add(): WorkflowActionResponse;
|
|
6
|
+
protected EndpointPath(): string;
|
|
7
|
+
protected EndpointContentType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowActionResponses = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
const resources_1 = require("../resources");
|
|
7
|
+
class WorkflowActionResponses extends sdk_core_1.ResourceContainer {
|
|
8
|
+
get data() {
|
|
9
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
10
|
+
return this._data;
|
|
11
|
+
}
|
|
12
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
13
|
+
return this._data;
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
Add() {
|
|
18
|
+
const obj = new resources_1.WorkflowActionResponse(this, sdk_core_1.ResourceObjectMode.NewDocument);
|
|
19
|
+
this.AddResourceToMemoryStructure(obj);
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
EndpointPath() {
|
|
23
|
+
return this.sdkConfig.FormatURL('/v1/workflows/{workflow}/transition/{transition}/action/response');
|
|
24
|
+
}
|
|
25
|
+
EndpointContentType() {
|
|
26
|
+
return 'application/vnd.api+json';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.WorkflowActionResponses = WorkflowActionResponses;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceContainer } from '@cloudize/sdk-core';
|
|
2
|
+
import { WorkflowActionTimeout } from '../resources';
|
|
3
|
+
export declare class WorkflowActionTimeouts extends ResourceContainer {
|
|
4
|
+
get data(): WorkflowActionTimeout | WorkflowActionTimeout[];
|
|
5
|
+
Add(): WorkflowActionTimeout;
|
|
6
|
+
protected EndpointPath(): string;
|
|
7
|
+
protected EndpointContentType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowActionTimeouts = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
const resources_1 = require("../resources");
|
|
7
|
+
class WorkflowActionTimeouts extends sdk_core_1.ResourceContainer {
|
|
8
|
+
get data() {
|
|
9
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
10
|
+
return this._data;
|
|
11
|
+
}
|
|
12
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
13
|
+
return this._data;
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
Add() {
|
|
18
|
+
const obj = new resources_1.WorkflowActionTimeout(this, sdk_core_1.ResourceObjectMode.NewDocument);
|
|
19
|
+
this.AddResourceToMemoryStructure(obj);
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
EndpointPath() {
|
|
23
|
+
return this.sdkConfig.FormatURL('/v1/workflows/{workflow}/transition/{transition}/action/timeout');
|
|
24
|
+
}
|
|
25
|
+
EndpointContentType() {
|
|
26
|
+
return 'application/vnd.api+json';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.WorkflowActionTimeouts = WorkflowActionTimeouts;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceContainer } from '@cloudize/sdk-core';
|
|
2
|
+
import { WorkflowCancellation } from '../resources';
|
|
3
|
+
export declare class WorkflowCancellations extends ResourceContainer {
|
|
4
|
+
get data(): WorkflowCancellation | WorkflowCancellation[];
|
|
5
|
+
Add(): WorkflowCancellation;
|
|
6
|
+
protected EndpointPath(): string;
|
|
7
|
+
protected EndpointContentType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowCancellations = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
const resources_1 = require("../resources");
|
|
7
|
+
class WorkflowCancellations extends sdk_core_1.ResourceContainer {
|
|
8
|
+
get data() {
|
|
9
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
10
|
+
return this._data;
|
|
11
|
+
}
|
|
12
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
13
|
+
return this._data;
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
Add() {
|
|
18
|
+
const obj = new resources_1.WorkflowCancellation(this, sdk_core_1.ResourceObjectMode.NewDocument);
|
|
19
|
+
this.AddResourceToMemoryStructure(obj);
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
EndpointPath() {
|
|
23
|
+
return this.sdkConfig.FormatURL('/v1/workflows/{workflow}/stop');
|
|
24
|
+
}
|
|
25
|
+
EndpointContentType() {
|
|
26
|
+
return 'application/vnd.api+json';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.WorkflowCancellations = WorkflowCancellations;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceContainer } from '@cloudize/sdk-core';
|
|
2
|
+
import { WorkflowTransitionInitialization } from '../resources';
|
|
3
|
+
export declare class WorkflowTransitionInitializations extends ResourceContainer {
|
|
4
|
+
get data(): WorkflowTransitionInitialization | WorkflowTransitionInitialization[];
|
|
5
|
+
Add(): WorkflowTransitionInitialization;
|
|
6
|
+
protected EndpointPath(): string;
|
|
7
|
+
protected EndpointContentType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowTransitionInitializations = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
const resources_1 = require("../resources");
|
|
7
|
+
class WorkflowTransitionInitializations extends sdk_core_1.ResourceContainer {
|
|
8
|
+
get data() {
|
|
9
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
10
|
+
return this._data;
|
|
11
|
+
}
|
|
12
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
13
|
+
return this._data;
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
Add() {
|
|
18
|
+
const obj = new resources_1.WorkflowTransitionInitialization(this, sdk_core_1.ResourceObjectMode.NewDocument);
|
|
19
|
+
this.AddResourceToMemoryStructure(obj);
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
EndpointPath() {
|
|
23
|
+
return this.sdkConfig.FormatURL('/v1/workflows/{workflow}/transition/{transition}/init');
|
|
24
|
+
}
|
|
25
|
+
EndpointContentType() {
|
|
26
|
+
return 'application/vnd.api+json';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.WorkflowTransitionInitializations = WorkflowTransitionInitializations;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IResourceContainer, ResourceContainer, ResourceFilterType, ResourceFilterValue } from '@cloudize/sdk-core';
|
|
2
|
+
import { Workflow } from '../resources';
|
|
3
|
+
export declare enum WorkflowsFilter {
|
|
4
|
+
Id = "id",
|
|
5
|
+
TenantId = "tenantId"
|
|
6
|
+
}
|
|
7
|
+
export declare class Workflows extends ResourceContainer {
|
|
8
|
+
get data(): Workflow | Workflow[];
|
|
9
|
+
Add(): Workflow;
|
|
10
|
+
Filter(filter: WorkflowsFilter, selector: ResourceFilterType, value: ResourceFilterValue): IResourceContainer;
|
|
11
|
+
protected EndpointPath(): string;
|
|
12
|
+
protected EndpointContentType(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Workflows = exports.WorkflowsFilter = void 0;
|
|
4
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
5
|
+
const json_1 = require("@cloudize/json");
|
|
6
|
+
const resources_1 = require("../resources");
|
|
7
|
+
var WorkflowsFilter;
|
|
8
|
+
(function (WorkflowsFilter) {
|
|
9
|
+
WorkflowsFilter["Id"] = "id";
|
|
10
|
+
WorkflowsFilter["TenantId"] = "tenantId";
|
|
11
|
+
})(WorkflowsFilter || (exports.WorkflowsFilter = WorkflowsFilter = {}));
|
|
12
|
+
class Workflows extends sdk_core_1.ResourceContainer {
|
|
13
|
+
get data() {
|
|
14
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceObject(this._data)) {
|
|
15
|
+
return this._data;
|
|
16
|
+
}
|
|
17
|
+
if ((0, json_1.isDefined)(this._data) && this.isResourceList(this._data)) {
|
|
18
|
+
return this._data;
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
Add() {
|
|
23
|
+
const obj = new resources_1.Workflow(this, sdk_core_1.ResourceObjectMode.NewDocument);
|
|
24
|
+
this.AddResourceToMemoryStructure(obj);
|
|
25
|
+
return obj;
|
|
26
|
+
}
|
|
27
|
+
Filter(filter, selector, value) {
|
|
28
|
+
switch (filter) {
|
|
29
|
+
case WorkflowsFilter.Id:
|
|
30
|
+
switch (selector) {
|
|
31
|
+
case sdk_core_1.ResourceFilterType.Equal:
|
|
32
|
+
return super.Filter(WorkflowsFilter.Id, selector, value);
|
|
33
|
+
default:
|
|
34
|
+
throw new sdk_core_1.SDKException('INVALID-SELECTOR', 'The selector applied to the '
|
|
35
|
+
+ '\'id\' filter is not supported. Please refer to the API documentation '
|
|
36
|
+
+ 'for a full list of supported filtering options.');
|
|
37
|
+
}
|
|
38
|
+
case WorkflowsFilter.TenantId:
|
|
39
|
+
switch (selector) {
|
|
40
|
+
case sdk_core_1.ResourceFilterType.Equal:
|
|
41
|
+
return super.Filter(WorkflowsFilter.TenantId, selector, value);
|
|
42
|
+
default:
|
|
43
|
+
throw new sdk_core_1.SDKException('INVALID-SELECTOR', 'The selector applied to the '
|
|
44
|
+
+ '\'tenantId\' filter is not supported. Please refer to the API documentation '
|
|
45
|
+
+ 'for a full list of supported filtering options.');
|
|
46
|
+
}
|
|
47
|
+
default:
|
|
48
|
+
throw new sdk_core_1.SDKException('INVALID-FILTER', 'The API does not support the requested filter. Please '
|
|
49
|
+
+ 'refer to the API documentation for a complete list of filtering options that are supported.');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
EndpointPath() {
|
|
53
|
+
return this.sdkConfig.FormatURL('/v1/workflows');
|
|
54
|
+
}
|
|
55
|
+
EndpointContentType() {
|
|
56
|
+
return 'application/vnd.api+json';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.Workflows = Workflows;
|
package/lib/src/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.RegisterResourceClasses = RegisterResourceClasses;
|
|
18
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
19
|
+
const resources_1 = require("./resources");
|
|
20
|
+
__exportStar(require("./endpoints"), exports);
|
|
21
|
+
__exportStar(require("./resources"), exports);
|
|
22
|
+
__exportStar(require("./types"), exports);
|
|
23
|
+
function RegisterResourceClasses(config) {
|
|
24
|
+
config.RegisterResourceClass('ApplicationHealthcheck', resources_1.ApplicationHealthcheck);
|
|
25
|
+
config.RegisterResourceClass('Workflow', resources_1.Workflow);
|
|
26
|
+
config.RegisterResourceClass('WorkflowCancellation', resources_1.WorkflowCancellation);
|
|
27
|
+
config.RegisterResourceClass('WorkflowTransitionInitialization', resources_1.WorkflowTransitionInitialization);
|
|
28
|
+
config.RegisterResourceClass('WorkflowActionDelay', resources_1.WorkflowActionDelay);
|
|
29
|
+
config.RegisterResourceClass('WorkflowActionExecution', resources_1.WorkflowActionExecution);
|
|
30
|
+
config.RegisterResourceClass('WorkflowActionResponse', resources_1.WorkflowActionResponse);
|
|
31
|
+
config.RegisterResourceClass('WorkflowActionTimeout', resources_1.WorkflowActionTimeout);
|
|
32
|
+
}
|
|
33
|
+
RegisterResourceClasses((0, sdk_core_1.SDKConfig)());
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IResourceContainer, IResourceObjectAttributes, ResourceObject, ResourceObjectAttributesLoadType, ResourceObjectMode } from '@cloudize/sdk-core';
|
|
2
|
+
export declare class ApplicationHealthcheckAttributes implements IResourceObjectAttributes {
|
|
3
|
+
status?: string;
|
|
4
|
+
versionInfo?: {
|
|
5
|
+
api?: string;
|
|
6
|
+
sdk?: string;
|
|
7
|
+
};
|
|
8
|
+
clearData(): void;
|
|
9
|
+
LoadData(data: any, action: ResourceObjectAttributesLoadType): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class ApplicationHealthcheck extends ResourceObject {
|
|
12
|
+
private current;
|
|
13
|
+
private shadow;
|
|
14
|
+
constructor(container: IResourceContainer, mode: ResourceObjectMode);
|
|
15
|
+
protected EndpointContentType(): string;
|
|
16
|
+
protected LoadAttributes(data: any): void;
|
|
17
|
+
get attributes(): ApplicationHealthcheckAttributes;
|
|
18
|
+
get type(): string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ApplicationHealthcheck = exports.ApplicationHealthcheckAttributes = void 0;
|
|
7
|
+
const json_1 = require("@cloudize/json");
|
|
8
|
+
const sdk_core_1 = require("@cloudize/sdk-core");
|
|
9
|
+
const package_json_1 = __importDefault(require("../../package.json"));
|
|
10
|
+
class ApplicationHealthcheckAttributes {
|
|
11
|
+
clearData() {
|
|
12
|
+
this.status = undefined;
|
|
13
|
+
this.versionInfo = undefined;
|
|
14
|
+
}
|
|
15
|
+
LoadData(data, action) {
|
|
16
|
+
if (action === sdk_core_1.ResourceObjectAttributesLoadType.Replace)
|
|
17
|
+
this.clearData();
|
|
18
|
+
if ((0, json_1.hasProperty)(data, 'status'))
|
|
19
|
+
this.status = data.status;
|
|
20
|
+
let apiVersion;
|
|
21
|
+
if ((0, json_1.hasProperty)(data, 'version'))
|
|
22
|
+
apiVersion = data.version;
|
|
23
|
+
this.versionInfo = {
|
|
24
|
+
api: apiVersion,
|
|
25
|
+
sdk: package_json_1.default.version,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ApplicationHealthcheckAttributes = ApplicationHealthcheckAttributes;
|
|
30
|
+
class ApplicationHealthcheck extends sdk_core_1.ResourceObject {
|
|
31
|
+
constructor(container, mode) {
|
|
32
|
+
super(container, mode);
|
|
33
|
+
this.current = {
|
|
34
|
+
attributes: new ApplicationHealthcheckAttributes(),
|
|
35
|
+
};
|
|
36
|
+
this.shadow = {
|
|
37
|
+
attributes: new ApplicationHealthcheckAttributes(),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
EndpointContentType() {
|
|
41
|
+
return 'application/json';
|
|
42
|
+
}
|
|
43
|
+
LoadAttributes(data) {
|
|
44
|
+
this.current.attributes.LoadData(data, sdk_core_1.ResourceObjectAttributesLoadType.Replace);
|
|
45
|
+
this.shadow.attributes.LoadData(data, sdk_core_1.ResourceObjectAttributesLoadType.Replace);
|
|
46
|
+
}
|
|
47
|
+
get attributes() {
|
|
48
|
+
return this.current.attributes;
|
|
49
|
+
}
|
|
50
|
+
get type() {
|
|
51
|
+
return 'ApplicationHealthcheck';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ApplicationHealthcheck = ApplicationHealthcheck;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './application.healthcheck';
|
|
2
|
+
export * from './workflow';
|
|
3
|
+
export * from './workflow.cancellation';
|
|
4
|
+
export * from './workflow.transition.initialization';
|
|
5
|
+
export * from './workflow.action.delay';
|
|
6
|
+
export * from './workflow.action.execution';
|
|
7
|
+
export * from './workflow.action.response';
|
|
8
|
+
export * from './workflow.action.timeout';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./application.healthcheck"), exports);
|
|
18
|
+
__exportStar(require("./workflow"), exports);
|
|
19
|
+
__exportStar(require("./workflow.cancellation"), exports);
|
|
20
|
+
__exportStar(require("./workflow.transition.initialization"), exports);
|
|
21
|
+
__exportStar(require("./workflow.action.delay"), exports);
|
|
22
|
+
__exportStar(require("./workflow.action.execution"), exports);
|
|
23
|
+
__exportStar(require("./workflow.action.response"), exports);
|
|
24
|
+
__exportStar(require("./workflow.action.timeout"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IResourceContainer, IResourceObjectAttributes, IResourceObjectRelationships, ResourceObject, ResourceObjectAttributeBase, ResourceObjectAttributesLoadType, ResourceObjectMode } from '@cloudize/sdk-core';
|
|
2
|
+
export declare class WorkflowActionDelayAttributes extends ResourceObjectAttributeBase implements IResourceObjectAttributes {
|
|
3
|
+
success?: boolean | null;
|
|
4
|
+
message?: string | null;
|
|
5
|
+
clearData(): void;
|
|
6
|
+
LoadData(data: any, action: ResourceObjectAttributesLoadType): void;
|
|
7
|
+
}
|
|
8
|
+
export declare class WorkflowActionDelay extends ResourceObject {
|
|
9
|
+
private current;
|
|
10
|
+
private shadow;
|
|
11
|
+
constructor(container: IResourceContainer, mode: ResourceObjectMode);
|
|
12
|
+
protected EndpointContentType(): string;
|
|
13
|
+
protected LoadAttributes(data: any): void;
|
|
14
|
+
UpdateAttributes(data: any): void;
|
|
15
|
+
get attributes(): WorkflowActionDelayAttributes;
|
|
16
|
+
get relationships(): IResourceObjectRelationships;
|
|
17
|
+
protected get shadowAttributes(): WorkflowActionDelayAttributes;
|
|
18
|
+
protected get shadowRelationships(): IResourceObjectRelationships;
|
|
19
|
+
get type(): string;
|
|
20
|
+
}
|