@ptkl/sdk 1.7.0 → 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 +17 -3
- 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 +17 -3
- package/dist/v0.9/index.esm.js +17 -3
- 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
|
@@ -142,7 +142,7 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
142
142
|
* )
|
|
143
143
|
**/
|
|
144
144
|
async find(filters, opts) {
|
|
145
|
-
const {
|
|
145
|
+
const { buildTTL = -1, locale = "en_US", } = opts !== null && opts !== void 0 ? opts : {};
|
|
146
146
|
let payload = {
|
|
147
147
|
context: filters,
|
|
148
148
|
ref: this.ref,
|
|
@@ -191,8 +191,7 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
191
191
|
return await this.client.get(`${this.getComponentPath()}/models`, {
|
|
192
192
|
params: params,
|
|
193
193
|
headers: {
|
|
194
|
-
'X-
|
|
195
|
-
'X-Build-Ttl': buildttl,
|
|
194
|
+
'X-Build-Ttl': buildTTL,
|
|
196
195
|
'Accept-Language': locale
|
|
197
196
|
}
|
|
198
197
|
});
|
|
@@ -941,6 +940,21 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
941
940
|
}
|
|
942
941
|
|
|
943
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
|
+
}
|
|
944
958
|
async trigger(id, event, data) {
|
|
945
959
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
946
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
|
@@ -19110,7 +19110,7 @@ class Component extends PlatformBaseClient {
|
|
|
19110
19110
|
* )
|
|
19111
19111
|
**/
|
|
19112
19112
|
async find(filters, opts) {
|
|
19113
|
-
const {
|
|
19113
|
+
const { buildTTL = -1, locale = "en_US", } = opts !== null && opts !== void 0 ? opts : {};
|
|
19114
19114
|
let payload = {
|
|
19115
19115
|
context: filters,
|
|
19116
19116
|
ref: this.ref,
|
|
@@ -19159,8 +19159,7 @@ class Component extends PlatformBaseClient {
|
|
|
19159
19159
|
return await this.client.get(`${this.getComponentPath()}/models`, {
|
|
19160
19160
|
params: params,
|
|
19161
19161
|
headers: {
|
|
19162
|
-
'X-
|
|
19163
|
-
'X-Build-Ttl': buildttl,
|
|
19162
|
+
'X-Build-Ttl': buildTTL,
|
|
19164
19163
|
'Accept-Language': locale
|
|
19165
19164
|
}
|
|
19166
19165
|
});
|
|
@@ -19909,6 +19908,21 @@ class System extends PlatformBaseClient {
|
|
|
19909
19908
|
}
|
|
19910
19909
|
|
|
19911
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
|
+
}
|
|
19912
19926
|
async trigger(id, event, data) {
|
|
19913
19927
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
19914
19928
|
}
|
package/dist/v0.9/index.esm.js
CHANGED
|
@@ -141,7 +141,7 @@ class Component extends PlatformBaseClient {
|
|
|
141
141
|
* )
|
|
142
142
|
**/
|
|
143
143
|
async find(filters, opts) {
|
|
144
|
-
const {
|
|
144
|
+
const { buildTTL = -1, locale = "en_US", } = opts !== null && opts !== void 0 ? opts : {};
|
|
145
145
|
let payload = {
|
|
146
146
|
context: filters,
|
|
147
147
|
ref: this.ref,
|
|
@@ -190,8 +190,7 @@ class Component extends PlatformBaseClient {
|
|
|
190
190
|
return await this.client.get(`${this.getComponentPath()}/models`, {
|
|
191
191
|
params: params,
|
|
192
192
|
headers: {
|
|
193
|
-
'X-
|
|
194
|
-
'X-Build-Ttl': buildttl,
|
|
193
|
+
'X-Build-Ttl': buildTTL,
|
|
195
194
|
'Accept-Language': locale
|
|
196
195
|
}
|
|
197
196
|
});
|
|
@@ -940,6 +939,21 @@ class System extends PlatformBaseClient {
|
|
|
940
939
|
}
|
|
941
940
|
|
|
942
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
|
+
}
|
|
943
957
|
async trigger(id, event, data) {
|
|
944
958
|
return await this.client.post(`/v1/project/workflow/workflow/${id}/event/${event}`, data);
|
|
945
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, };
|