@ptkl/sdk 1.7.1 → 1.9.1

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.
@@ -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, };
@@ -0,0 +1,38 @@
1
+ export interface ParsedPRN {
2
+ type: string;
3
+ ref: string;
4
+ path: string;
5
+ params: Record<string, string>;
6
+ }
7
+ export declare class PRN {
8
+ private readonly _raw;
9
+ private constructor();
10
+ /**
11
+ * Validates a PRN string and returns it as a PRN instance.
12
+ * Throws if the string is not a valid PRN.
13
+ */
14
+ static parse(s: string): PRN;
15
+ /**
16
+ * Constructs a PRN from its constituent parts.
17
+ * Params are sorted by key for deterministic output.
18
+ */
19
+ static create(type: string, ref: string, path?: string, params?: Record<string, string>): PRN;
20
+ private _parse;
21
+ /** The resource category — e.g. "component", "integration", "user". */
22
+ get type(): string;
23
+ /** The resource identifier within its type — slug, UUID, name. */
24
+ get ref(): string;
25
+ /** The resource path segment, or empty string if absent. */
26
+ get path(): string;
27
+ /** All query-string key-value pairs, or empty object if none. */
28
+ get params(): Record<string, string>;
29
+ /** Returns the value for the given query-param key, or empty string if not present. */
30
+ param(key: string): string;
31
+ toString(): string;
32
+ }
33
+ /**
34
+ * Convenience wrapper around PRN.parse.
35
+ * Validates a PRN string and returns a PRN instance.
36
+ * Throws if the string is not a valid PRN.
37
+ */
38
+ export declare function parsePRN(s: string): PRN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptkl/sdk",
3
- "version": "1.7.1",
3
+ "version": "1.9.1",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "build:monaco": "npm run build && node scripts/generate-monaco-types.cjs",