@ptkl/sdk 0.9.3 → 0.9.4
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.cjs.js
CHANGED
|
@@ -17875,6 +17875,7 @@ class PlatformBaseClient extends BaseClient {
|
|
|
17875
17875
|
timeout: 15000,
|
|
17876
17876
|
headers: {
|
|
17877
17877
|
...headers,
|
|
17878
|
+
'Content-Type': 'application/json',
|
|
17878
17879
|
},
|
|
17879
17880
|
withCredentials: true,
|
|
17880
17881
|
});
|
|
@@ -17904,7 +17905,7 @@ class Functions extends PlatformBaseClient {
|
|
|
17904
17905
|
* @returns - Function result
|
|
17905
17906
|
*
|
|
17906
17907
|
* @example
|
|
17907
|
-
* const result = await platform.function().run("myFunction", {
|
|
17908
|
+
* const result = await platform.function().run("myFunction", {input: { foo: "bar" }})
|
|
17908
17909
|
*/
|
|
17909
17910
|
async run(id, d) {
|
|
17910
17911
|
const { data } = await this.client.post(`/v1/system/function/run/${id}`, d.input, {
|
|
@@ -17928,9 +17929,12 @@ class Roles extends PlatformBaseClient {
|
|
|
17928
17929
|
async list() {
|
|
17929
17930
|
return await this.client.get(`/v1/user/role/list`);
|
|
17930
17931
|
}
|
|
17931
|
-
async
|
|
17932
|
+
async availablePermissions() {
|
|
17932
17933
|
return await this.client.get(`/v1/user/permissions/list`);
|
|
17933
17934
|
}
|
|
17935
|
+
async permissions() {
|
|
17936
|
+
return await this.client.get(`/v1/user/role/permissions`);
|
|
17937
|
+
}
|
|
17934
17938
|
async edit(permissions, workspaces, level, uuid) {
|
|
17935
17939
|
return await this.client.post(`/v1/user/role/edit/${uuid}`, { permissions, workspaces, level });
|
|
17936
17940
|
}
|
|
@@ -18206,7 +18210,9 @@ class Component extends PlatformBaseClient {
|
|
|
18206
18210
|
});
|
|
18207
18211
|
}
|
|
18208
18212
|
async function(name, input) {
|
|
18209
|
-
return await this.client.post(`/v3/system/component/${this.ref}/function/${name}`,
|
|
18213
|
+
return await this.client.post(`/v3/system/component/${this.ref}/function/${name}`, {
|
|
18214
|
+
data: input
|
|
18215
|
+
});
|
|
18210
18216
|
}
|
|
18211
18217
|
}
|
|
18212
18218
|
|
package/dist/index.esm.js
CHANGED
|
@@ -65,6 +65,7 @@ class PlatformBaseClient extends BaseClient {
|
|
|
65
65
|
timeout: 15000,
|
|
66
66
|
headers: {
|
|
67
67
|
...headers,
|
|
68
|
+
'Content-Type': 'application/json',
|
|
68
69
|
},
|
|
69
70
|
withCredentials: true,
|
|
70
71
|
});
|
|
@@ -94,7 +95,7 @@ class Functions extends PlatformBaseClient {
|
|
|
94
95
|
* @returns - Function result
|
|
95
96
|
*
|
|
96
97
|
* @example
|
|
97
|
-
* const result = await platform.function().run("myFunction", {
|
|
98
|
+
* const result = await platform.function().run("myFunction", {input: { foo: "bar" }})
|
|
98
99
|
*/
|
|
99
100
|
async run(id, d) {
|
|
100
101
|
const { data } = await this.client.post(`/v1/system/function/run/${id}`, d.input, {
|
|
@@ -118,9 +119,12 @@ class Roles extends PlatformBaseClient {
|
|
|
118
119
|
async list() {
|
|
119
120
|
return await this.client.get(`/v1/user/role/list`);
|
|
120
121
|
}
|
|
121
|
-
async
|
|
122
|
+
async availablePermissions() {
|
|
122
123
|
return await this.client.get(`/v1/user/permissions/list`);
|
|
123
124
|
}
|
|
125
|
+
async permissions() {
|
|
126
|
+
return await this.client.get(`/v1/user/role/permissions`);
|
|
127
|
+
}
|
|
124
128
|
async edit(permissions, workspaces, level, uuid) {
|
|
125
129
|
return await this.client.post(`/v1/user/role/edit/${uuid}`, { permissions, workspaces, level });
|
|
126
130
|
}
|
|
@@ -396,7 +400,9 @@ class Component extends PlatformBaseClient {
|
|
|
396
400
|
});
|
|
397
401
|
}
|
|
398
402
|
async function(name, input) {
|
|
399
|
-
return await this.client.post(`/v3/system/component/${this.ref}/function/${name}`,
|
|
403
|
+
return await this.client.post(`/v3/system/component/${this.ref}/function/${name}`, {
|
|
404
|
+
data: input
|
|
405
|
+
});
|
|
400
406
|
}
|
|
401
407
|
}
|
|
402
408
|
|
package/dist/index.iife.js
CHANGED
|
@@ -66,6 +66,7 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
66
66
|
timeout: 15000,
|
|
67
67
|
headers: {
|
|
68
68
|
...headers,
|
|
69
|
+
'Content-Type': 'application/json',
|
|
69
70
|
},
|
|
70
71
|
withCredentials: true,
|
|
71
72
|
});
|
|
@@ -95,7 +96,7 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
95
96
|
* @returns - Function result
|
|
96
97
|
*
|
|
97
98
|
* @example
|
|
98
|
-
* const result = await platform.function().run("myFunction", {
|
|
99
|
+
* const result = await platform.function().run("myFunction", {input: { foo: "bar" }})
|
|
99
100
|
*/
|
|
100
101
|
async run(id, d) {
|
|
101
102
|
const { data } = await this.client.post(`/v1/system/function/run/${id}`, d.input, {
|
|
@@ -119,9 +120,12 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
119
120
|
async list() {
|
|
120
121
|
return await this.client.get(`/v1/user/role/list`);
|
|
121
122
|
}
|
|
122
|
-
async
|
|
123
|
+
async availablePermissions() {
|
|
123
124
|
return await this.client.get(`/v1/user/permissions/list`);
|
|
124
125
|
}
|
|
126
|
+
async permissions() {
|
|
127
|
+
return await this.client.get(`/v1/user/role/permissions`);
|
|
128
|
+
}
|
|
125
129
|
async edit(permissions, workspaces, level, uuid) {
|
|
126
130
|
return await this.client.post(`/v1/user/role/edit/${uuid}`, { permissions, workspaces, level });
|
|
127
131
|
}
|
|
@@ -397,7 +401,9 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
397
401
|
});
|
|
398
402
|
}
|
|
399
403
|
async function(name, input) {
|
|
400
|
-
return await this.client.post(`/v3/system/component/${this.ref}/function/${name}`,
|
|
404
|
+
return await this.client.post(`/v3/system/component/${this.ref}/function/${name}`, {
|
|
405
|
+
data: input
|
|
406
|
+
});
|
|
401
407
|
}
|
|
402
408
|
}
|
|
403
409
|
|
|
@@ -12,12 +12,12 @@ export default class Functions extends PlatformBaseClient {
|
|
|
12
12
|
* @returns - Function result
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
|
-
* const result = await platform.function().run("myFunction", {
|
|
15
|
+
* const result = await platform.function().run("myFunction", {input: { foo: "bar" }})
|
|
16
16
|
*/
|
|
17
17
|
run(id: string, d: {
|
|
18
|
-
input?: any
|
|
19
|
-
query?:
|
|
20
|
-
headers?:
|
|
18
|
+
input?: Record<string, any>;
|
|
19
|
+
query?: Record<string, string>;
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
21
|
}): Promise<any>;
|
|
22
22
|
generateSignature(ref: string, env: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
23
|
}
|
|
@@ -3,6 +3,7 @@ export default class Roles extends PlatformBaseClient {
|
|
|
3
3
|
create(role: any): Promise<any>;
|
|
4
4
|
delete(uuid: string): Promise<any>;
|
|
5
5
|
list(): Promise<any>;
|
|
6
|
-
|
|
6
|
+
availablePermissions(): Promise<any>;
|
|
7
|
+
permissions(): Promise<any>;
|
|
7
8
|
edit(permissions: string[], workspaces: string[], level: number, uuid: string): Promise<any>;
|
|
8
9
|
}
|