@ptkl/sdk 1.13.0 → 1.15.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 +911 -129
- package/dist/index.0.9.js +22 -1
- package/dist/package.json +1 -1
- package/dist/v0.10/api/component.d.ts +3 -2
- package/dist/v0.10/api/forge.d.ts +24 -2
- package/dist/v0.10/api/index.d.ts +2 -0
- package/dist/v0.10/api/integrations/dms.d.ts +93 -1
- package/dist/v0.10/api/integrations.d.ts +38 -0
- package/dist/v0.10/api/kortex.d.ts +4 -1
- package/dist/v0.10/api/platform.d.ts +44 -0
- package/dist/v0.10/api/project.d.ts +52 -11
- package/dist/v0.10/api/sandbox.d.ts +126 -2
- package/dist/v0.10/api/transactions.d.ts +75 -0
- package/dist/v0.10/api/users.d.ts +22 -3
- package/dist/v0.10/api/workflow.d.ts +25 -1
- package/dist/v0.10/index.cjs.js +911 -129
- package/dist/v0.10/index.esm.js +911 -130
- package/dist/v0.10/types/component.d.ts +9 -1
- package/dist/v0.10/types/integrations.d.ts +142 -0
- package/dist/v0.10/types/kortex.d.ts +16 -1
- package/dist/v0.10/types/sandbox.d.ts +116 -0
- package/dist/v0.10/types/transactions.d.ts +198 -0
- package/dist/v0.10/types/users.d.ts +10 -0
- package/dist/v0.10/types/workflow.d.ts +104 -1
- package/dist/v0.9/api/users.d.ts +22 -3
- package/dist/v0.9/index.cjs.js +22 -1
- package/dist/v0.9/index.esm.js +22 -1
- package/dist/v0.9/types/component.d.ts +1 -0
- package/dist/v0.9/types/users.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PlatformBaseClient from "./platformBaseClient";
|
|
2
|
-
import { UserClaims, UserModel, Role, CreateRoleRequest, EditRoleRequest, RoleModel, Permission } from "../types/users";
|
|
2
|
+
import { UserClaims, UserModel, Role, CreateRoleRequest, EditRoleRequest, RoleModel, Permission, Permissions } from "../types/users";
|
|
3
3
|
import { AxiosResponse } from "axios";
|
|
4
4
|
export default class Users extends PlatformBaseClient {
|
|
5
5
|
auth(username: string, password: string, project: string): Promise<AxiosResponse<any>>;
|
|
@@ -28,9 +28,28 @@ export default class Users extends PlatformBaseClient {
|
|
|
28
28
|
*/
|
|
29
29
|
editProfile(data: any): Promise<AxiosResponse<any>>;
|
|
30
30
|
/**
|
|
31
|
-
* Get
|
|
31
|
+
* Get the current token's permissions.
|
|
32
|
+
*
|
|
33
|
+
* Returns the resolved permission set carried by the calling token. For a
|
|
34
|
+
* forge actor token this is the scoped intersection minted at launch time —
|
|
35
|
+
* see `getPrincipalPermissions()` for the underlying user's full set.
|
|
32
36
|
*/
|
|
33
|
-
getPermissions(): Promise<AxiosResponse<
|
|
37
|
+
getPermissions(): Promise<AxiosResponse<Permissions>>;
|
|
38
|
+
/**
|
|
39
|
+
* Get the FULL permissions of the user the current token is acting on behalf
|
|
40
|
+
* of (the "principal").
|
|
41
|
+
*
|
|
42
|
+
* When a forge app runs under an actor token, `getPermissions()` returns only
|
|
43
|
+
* the token's scoped permissions — the intersection of the app's declared
|
|
44
|
+
* runtime permissions and the user's permissions. This instead returns the
|
|
45
|
+
* complete permission set of the underlying user, so the app can check what
|
|
46
|
+
* that user is actually allowed to do, independent of what the app itself was
|
|
47
|
+
* granted. The token scope is unchanged: this exposes knowledge, not capability.
|
|
48
|
+
*
|
|
49
|
+
* For a normal user session (no actor token) it returns the caller's own
|
|
50
|
+
* permissions, identical to `getPermissions()`'s scope.
|
|
51
|
+
*/
|
|
52
|
+
getPrincipalPermissions(): Promise<AxiosResponse<Permissions>>;
|
|
34
53
|
/**
|
|
35
54
|
* Get list of available permissions
|
|
36
55
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import PlatformBaseClient from "./platformBaseClient";
|
|
3
|
-
import { WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse } from '../types/workflow';
|
|
3
|
+
import { WorkflowModel, WorkflowCreatePayload, WorkflowUpdatePayload, WorkflowListResponse, WorkflowInstallPayload, WorkflowHistoryQuery, WorkflowHistoryListResponse, WorkflowHistoryEntry, WorkflowStatsQuery, WorkflowStats, WorkflowRunningQuery, WorkflowRunningListResponse, WorkflowRunningExecution, WorkflowControlResponse, WorkflowRestartOptions, WorkflowRestartResponse, WorkflowNodeControlOptions, WorkflowErrorListResponse } from '../types/workflow';
|
|
4
4
|
export default class Workflow extends PlatformBaseClient {
|
|
5
5
|
create(data: WorkflowCreatePayload): Promise<AxiosResponse<WorkflowModel>>;
|
|
6
6
|
update(id: string, data: WorkflowUpdatePayload): Promise<AxiosResponse<WorkflowModel>>;
|
|
@@ -9,4 +9,28 @@ export default class Workflow extends PlatformBaseClient {
|
|
|
9
9
|
delete(id: string): Promise<AxiosResponse<void>>;
|
|
10
10
|
trigger(id: string, event: string, data: any): Promise<AxiosResponse<any, any>>;
|
|
11
11
|
publish(event: string, data: any): Promise<AxiosResponse<any, any>>;
|
|
12
|
+
/**
|
|
13
|
+
* Install (create + publish) a workflow in one call.
|
|
14
|
+
* Rejects if a workflow with the same name + integrator already exists.
|
|
15
|
+
*/
|
|
16
|
+
install(data: WorkflowInstallPayload): Promise<AxiosResponse<WorkflowModel>>;
|
|
17
|
+
getHistory(query?: WorkflowHistoryQuery): Promise<AxiosResponse<WorkflowHistoryListResponse>>;
|
|
18
|
+
getHistoryEntry(executionUuid: string): Promise<AxiosResponse<WorkflowHistoryEntry>>;
|
|
19
|
+
getStats(query?: WorkflowStatsQuery): Promise<AxiosResponse<WorkflowStats>>;
|
|
20
|
+
getRunning(query?: WorkflowRunningQuery): Promise<AxiosResponse<WorkflowRunningListResponse>>;
|
|
21
|
+
getRunningEntry(executionUuid: string): Promise<AxiosResponse<WorkflowRunningExecution>>;
|
|
22
|
+
pause(executionUuid: string): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
23
|
+
resume(executionUuid: string): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
24
|
+
kill(executionUuid: string): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
25
|
+
/**
|
|
26
|
+
* Restart a failed/killed workflow execution from history.
|
|
27
|
+
* `clearState: true` discards prior node state instead of a smart resume.
|
|
28
|
+
*/
|
|
29
|
+
restart(executionUuid: string, options?: WorkflowRestartOptions): Promise<AxiosResponse<WorkflowRestartResponse>>;
|
|
30
|
+
pauseNode(executionUuid: string, nodeId: number, options?: WorkflowNodeControlOptions): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
31
|
+
resumeNode(executionUuid: string, nodeId: number, options?: WorkflowNodeControlOptions): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
32
|
+
killNode(executionUuid: string, nodeId: number, options?: WorkflowNodeControlOptions): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
33
|
+
getErrors(): Promise<AxiosResponse<WorkflowErrorListResponse>>;
|
|
34
|
+
removeError(id: string): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
35
|
+
removeAllErrors(): Promise<AxiosResponse<WorkflowControlResponse>>;
|
|
12
36
|
}
|