@ptkl/sdk 1.7.1 → 1.8.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/dist/index.0.10.js +15 -0
- package/dist/index.0.9.js +15 -0
- package/dist/package.json +1 -1
- package/dist/v0.10/api/index.d.ts +1 -0
- package/dist/v0.10/api/workflow.d.ts +9 -2
- package/dist/v0.10/index.cjs.js +15 -0
- package/dist/v0.10/index.esm.js +15 -0
- package/dist/v0.10/types/workflow.d.ts +48 -0
- package/dist/v0.9/api/index.d.ts +1 -0
- package/dist/v0.9/api/workflow.d.ts +9 -2
- package/dist/v0.9/index.cjs.js +15 -0
- package/dist/v0.9/index.esm.js +15 -0
- package/dist/v0.9/types/workflow.d.ts +48 -0
- package/package.json +1 -1
package/dist/index.0.10.js
CHANGED
|
@@ -1253,6 +1253,21 @@ var ProtokolSDK010 = (function (exports, axios) {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
1255
|
class Workflow extends PlatformBaseClient {
|
|
1256
|
+
async create(data) {
|
|
1257
|
+
return await this.client.post(`/v1/project/workflow/workflow`, data);
|
|
1258
|
+
}
|
|
1259
|
+
async update(id, data) {
|
|
1260
|
+
return await this.client.patch(`/v1/project/workflow/workflow/${id}`, data);
|
|
1261
|
+
}
|
|
1262
|
+
async get(id) {
|
|
1263
|
+
return await this.client.get(`/v1/project/workflow/workflow/${id}`);
|
|
1264
|
+
}
|
|
1265
|
+
async list() {
|
|
1266
|
+
return await this.client.get(`/v1/project/workflow/workflows`);
|
|
1267
|
+
}
|
|
1268
|
+
async delete(id) {
|
|
1269
|
+
return await this.client.delete(`/v1/project/workflow/workflow/${id}`);
|
|
1270
|
+
}
|
|
1256
1271
|
async trigger(id, event, data) {
|
|
1257
1272
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
1258
1273
|
}
|
package/dist/index.0.9.js
CHANGED
|
@@ -940,6 +940,21 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
940
940
|
}
|
|
941
941
|
|
|
942
942
|
class Workflow extends PlatformBaseClient {
|
|
943
|
+
async create(data) {
|
|
944
|
+
return await this.client.post(`/v1/project/workflow/workflow`, data);
|
|
945
|
+
}
|
|
946
|
+
async update(id, data) {
|
|
947
|
+
return await this.client.patch(`/v1/project/workflow/workflow/${id}`, data);
|
|
948
|
+
}
|
|
949
|
+
async get(id) {
|
|
950
|
+
return await this.client.get(`/v1/project/workflow/workflow/${id}`);
|
|
951
|
+
}
|
|
952
|
+
async list() {
|
|
953
|
+
return await this.client.get(`/v1/project/workflow/workflows`);
|
|
954
|
+
}
|
|
955
|
+
async delete(id) {
|
|
956
|
+
return await this.client.delete(`/v1/project/workflow/workflow/${id}`);
|
|
957
|
+
}
|
|
943
958
|
async trigger(id, event, data) {
|
|
944
959
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
945
960
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { PlatformFunctions, PlatformFunction, FunctionInput, FunctionOutput, FunctionCallParams, ComponentModels, ComponentFunctions, ComponentModel, ComponentFunctionInput, ComponentFunctionOutput, } from '../types/functions';
|
|
2
2
|
export type { Settings, SettingsField, FieldRoles, FieldConstraints, Context, Preset, PresetContext, Filters, Extension, Policy, SetupData, Model, } from '../types/component';
|
|
3
|
+
export type { WorkflowModel, WorkflowSettings, WorkflowNode, WorkflowNodeConnection, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse, } from '../types/workflow';
|
|
3
4
|
export { default as Component } from './component';
|
|
4
5
|
export { default as Platform } from './platform';
|
|
5
6
|
export { default as Functions } from './functions';
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
1
2
|
import PlatformBaseClient from "./platformBaseClient";
|
|
3
|
+
import { WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse } from '../types/workflow';
|
|
2
4
|
export default class Workflow extends PlatformBaseClient {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
create(data: WorkflowCreatePayload): Promise<AxiosResponse<WorkflowModel>>;
|
|
6
|
+
update(id: string, data: WorkflowUpdatePayload): Promise<AxiosResponse<WorkflowModel>>;
|
|
7
|
+
get(id: string): Promise<AxiosResponse<WorkflowModel>>;
|
|
8
|
+
list(): Promise<AxiosResponse<WorkflowListResponse>>;
|
|
9
|
+
delete(id: string): Promise<AxiosResponse<void>>;
|
|
10
|
+
trigger(id: string, event: string, data: any): Promise<AxiosResponse<any, any>>;
|
|
11
|
+
publish(event: string, data: any): Promise<AxiosResponse<any, any>>;
|
|
5
12
|
}
|
package/dist/v0.10/index.cjs.js
CHANGED
|
@@ -20219,6 +20219,21 @@ class System extends PlatformBaseClient {
|
|
|
20219
20219
|
}
|
|
20220
20220
|
|
|
20221
20221
|
class Workflow extends PlatformBaseClient {
|
|
20222
|
+
async create(data) {
|
|
20223
|
+
return await this.client.post(`/v1/project/workflow/workflow`, data);
|
|
20224
|
+
}
|
|
20225
|
+
async update(id, data) {
|
|
20226
|
+
return await this.client.patch(`/v1/project/workflow/workflow/${id}`, data);
|
|
20227
|
+
}
|
|
20228
|
+
async get(id) {
|
|
20229
|
+
return await this.client.get(`/v1/project/workflow/workflow/${id}`);
|
|
20230
|
+
}
|
|
20231
|
+
async list() {
|
|
20232
|
+
return await this.client.get(`/v1/project/workflow/workflows`);
|
|
20233
|
+
}
|
|
20234
|
+
async delete(id) {
|
|
20235
|
+
return await this.client.delete(`/v1/project/workflow/workflow/${id}`);
|
|
20236
|
+
}
|
|
20222
20237
|
async trigger(id, event, data) {
|
|
20223
20238
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
20224
20239
|
}
|
package/dist/v0.10/index.esm.js
CHANGED
|
@@ -1252,6 +1252,21 @@ class System extends PlatformBaseClient {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
1254
|
class Workflow extends PlatformBaseClient {
|
|
1255
|
+
async create(data) {
|
|
1256
|
+
return await this.client.post(`/v1/project/workflow/workflow`, data);
|
|
1257
|
+
}
|
|
1258
|
+
async update(id, data) {
|
|
1259
|
+
return await this.client.patch(`/v1/project/workflow/workflow/${id}`, data);
|
|
1260
|
+
}
|
|
1261
|
+
async get(id) {
|
|
1262
|
+
return await this.client.get(`/v1/project/workflow/workflow/${id}`);
|
|
1263
|
+
}
|
|
1264
|
+
async list() {
|
|
1265
|
+
return await this.client.get(`/v1/project/workflow/workflows`);
|
|
1266
|
+
}
|
|
1267
|
+
async delete(id) {
|
|
1268
|
+
return await this.client.delete(`/v1/project/workflow/workflow/${id}`);
|
|
1269
|
+
}
|
|
1255
1270
|
async trigger(id, event, data) {
|
|
1256
1271
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
1257
1272
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type WorkflowNode = {
|
|
2
|
+
id: number;
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
name: string;
|
|
6
|
+
action: string;
|
|
7
|
+
type: string;
|
|
8
|
+
connections: WorkflowNodeConnection[];
|
|
9
|
+
paused: boolean;
|
|
10
|
+
parallel: boolean;
|
|
11
|
+
data: Record<string, any>;
|
|
12
|
+
};
|
|
13
|
+
type WorkflowNodeConnection = {
|
|
14
|
+
node_id: number;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
type WorkflowSettings = {
|
|
18
|
+
version: string;
|
|
19
|
+
nodes: WorkflowNode[];
|
|
20
|
+
};
|
|
21
|
+
type WorkflowModel = {
|
|
22
|
+
uuid: string;
|
|
23
|
+
name: string;
|
|
24
|
+
project_uuid: string;
|
|
25
|
+
dev_version: string;
|
|
26
|
+
public_version: string;
|
|
27
|
+
integrator: string;
|
|
28
|
+
roles: string[];
|
|
29
|
+
settings: WorkflowSettings[];
|
|
30
|
+
};
|
|
31
|
+
type WorkflowCreatePayload = {
|
|
32
|
+
name: string;
|
|
33
|
+
dev_version?: string;
|
|
34
|
+
public_version?: string;
|
|
35
|
+
integrator?: string;
|
|
36
|
+
roles?: string[];
|
|
37
|
+
settings?: WorkflowSettings[];
|
|
38
|
+
};
|
|
39
|
+
type WorkflowUpdatePayload = {
|
|
40
|
+
name?: string;
|
|
41
|
+
dev_version?: string;
|
|
42
|
+
public_version?: string;
|
|
43
|
+
integrator?: string;
|
|
44
|
+
roles?: string[];
|
|
45
|
+
settings?: WorkflowSettings[];
|
|
46
|
+
};
|
|
47
|
+
type WorkflowListResponse = WorkflowModel[];
|
|
48
|
+
export { WorkflowNode, WorkflowNodeConnection, WorkflowSettings, WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse, };
|
package/dist/v0.9/api/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { Settings, SettingsField, FieldRoles, FieldConstraints, Context, Preset, PresetContext, Filters, Extension, Policy, SetupData, Model, } from '../types/component';
|
|
2
|
+
export type { WorkflowModel, WorkflowSettings, WorkflowNode, WorkflowNodeConnection, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse, } from '../types/workflow';
|
|
2
3
|
export { default as Component } from './component';
|
|
3
4
|
export { default as Platform } from './platform';
|
|
4
5
|
export { default as Functions } from './functions';
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
1
2
|
import PlatformBaseClient from "./platformBaseClient";
|
|
3
|
+
import { WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse } from '../types/workflow';
|
|
2
4
|
export default class Workflow extends PlatformBaseClient {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
create(data: WorkflowCreatePayload): Promise<AxiosResponse<WorkflowModel>>;
|
|
6
|
+
update(id: string, data: WorkflowUpdatePayload): Promise<AxiosResponse<WorkflowModel>>;
|
|
7
|
+
get(id: string): Promise<AxiosResponse<WorkflowModel>>;
|
|
8
|
+
list(): Promise<AxiosResponse<WorkflowListResponse>>;
|
|
9
|
+
delete(id: string): Promise<AxiosResponse<void>>;
|
|
10
|
+
trigger(id: string, event: string, data: any): Promise<AxiosResponse<any, any>>;
|
|
11
|
+
publish(event: string, data: any): Promise<AxiosResponse<any, any>>;
|
|
5
12
|
}
|
package/dist/v0.9/index.cjs.js
CHANGED
|
@@ -19908,6 +19908,21 @@ class System extends PlatformBaseClient {
|
|
|
19908
19908
|
}
|
|
19909
19909
|
|
|
19910
19910
|
class Workflow extends PlatformBaseClient {
|
|
19911
|
+
async create(data) {
|
|
19912
|
+
return await this.client.post(`/v1/project/workflow/workflow`, data);
|
|
19913
|
+
}
|
|
19914
|
+
async update(id, data) {
|
|
19915
|
+
return await this.client.patch(`/v1/project/workflow/workflow/${id}`, data);
|
|
19916
|
+
}
|
|
19917
|
+
async get(id) {
|
|
19918
|
+
return await this.client.get(`/v1/project/workflow/workflow/${id}`);
|
|
19919
|
+
}
|
|
19920
|
+
async list() {
|
|
19921
|
+
return await this.client.get(`/v1/project/workflow/workflows`);
|
|
19922
|
+
}
|
|
19923
|
+
async delete(id) {
|
|
19924
|
+
return await this.client.delete(`/v1/project/workflow/workflow/${id}`);
|
|
19925
|
+
}
|
|
19911
19926
|
async trigger(id, event, data) {
|
|
19912
19927
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
19913
19928
|
}
|
package/dist/v0.9/index.esm.js
CHANGED
|
@@ -939,6 +939,21 @@ class System extends PlatformBaseClient {
|
|
|
939
939
|
}
|
|
940
940
|
|
|
941
941
|
class Workflow extends PlatformBaseClient {
|
|
942
|
+
async create(data) {
|
|
943
|
+
return await this.client.post(`/v1/project/workflow/workflow`, data);
|
|
944
|
+
}
|
|
945
|
+
async update(id, data) {
|
|
946
|
+
return await this.client.patch(`/v1/project/workflow/workflow/${id}`, data);
|
|
947
|
+
}
|
|
948
|
+
async get(id) {
|
|
949
|
+
return await this.client.get(`/v1/project/workflow/workflow/${id}`);
|
|
950
|
+
}
|
|
951
|
+
async list() {
|
|
952
|
+
return await this.client.get(`/v1/project/workflow/workflows`);
|
|
953
|
+
}
|
|
954
|
+
async delete(id) {
|
|
955
|
+
return await this.client.delete(`/v1/project/workflow/workflow/${id}`);
|
|
956
|
+
}
|
|
942
957
|
async trigger(id, event, data) {
|
|
943
958
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
944
959
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type WorkflowNode = {
|
|
2
|
+
id: number;
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
name: string;
|
|
6
|
+
action: string;
|
|
7
|
+
type: string;
|
|
8
|
+
connections: WorkflowNodeConnection[];
|
|
9
|
+
paused: boolean;
|
|
10
|
+
parallel: boolean;
|
|
11
|
+
data: Record<string, any>;
|
|
12
|
+
};
|
|
13
|
+
type WorkflowNodeConnection = {
|
|
14
|
+
node_id: number;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
type WorkflowSettings = {
|
|
18
|
+
version: string;
|
|
19
|
+
nodes: WorkflowNode[];
|
|
20
|
+
};
|
|
21
|
+
type WorkflowModel = {
|
|
22
|
+
uuid: string;
|
|
23
|
+
name: string;
|
|
24
|
+
project_uuid: string;
|
|
25
|
+
dev_version: string;
|
|
26
|
+
public_version: string;
|
|
27
|
+
integrator: string;
|
|
28
|
+
roles: string[];
|
|
29
|
+
settings: WorkflowSettings[];
|
|
30
|
+
};
|
|
31
|
+
type WorkflowCreatePayload = {
|
|
32
|
+
name: string;
|
|
33
|
+
dev_version?: string;
|
|
34
|
+
public_version?: string;
|
|
35
|
+
integrator?: string;
|
|
36
|
+
roles?: string[];
|
|
37
|
+
settings?: WorkflowSettings[];
|
|
38
|
+
};
|
|
39
|
+
type WorkflowUpdatePayload = {
|
|
40
|
+
name?: string;
|
|
41
|
+
dev_version?: string;
|
|
42
|
+
public_version?: string;
|
|
43
|
+
integrator?: string;
|
|
44
|
+
roles?: string[];
|
|
45
|
+
settings?: WorkflowSettings[];
|
|
46
|
+
};
|
|
47
|
+
type WorkflowListResponse = WorkflowModel[];
|
|
48
|
+
export { WorkflowNode, WorkflowNodeConnection, WorkflowSettings, WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse, };
|