@emilgroup/action-sdk 1.1.1-beta.6 → 1.2.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.
Files changed (43) hide show
  1. package/.openapi-generator/FILES +7 -0
  2. package/README.md +2 -2
  3. package/api/actions-api.ts +559 -130
  4. package/api/executions-api.ts +471 -0
  5. package/api.ts +2 -0
  6. package/dist/api/actions-api.d.ts +358 -112
  7. package/dist/api/actions-api.js +427 -97
  8. package/dist/api/executions-api.d.ts +272 -0
  9. package/dist/api/executions-api.js +452 -0
  10. package/dist/api.d.ts +1 -0
  11. package/dist/api.js +1 -0
  12. package/dist/models/action-class.d.ts +9 -20
  13. package/dist/models/action-execution-class.d.ts +36 -0
  14. package/dist/models/action-ref-class.d.ts +36 -0
  15. package/dist/models/action-ref-class.js +15 -0
  16. package/dist/models/action-version-class.d.ts +127 -0
  17. package/dist/models/action-version-class.js +21 -0
  18. package/dist/models/create-action-request-dto.d.ts +47 -5
  19. package/dist/models/create-action-request-dto.js +6 -0
  20. package/dist/models/get-action-version-response-class.d.ts +25 -0
  21. package/dist/models/get-action-version-response-class.js +15 -0
  22. package/dist/models/index.d.ts +6 -0
  23. package/dist/models/index.js +6 -0
  24. package/dist/models/list-action-versions-response-class.d.ts +43 -0
  25. package/dist/models/list-action-versions-response-class.js +15 -0
  26. package/dist/models/trigger-action-request-dto.d.ts +62 -0
  27. package/dist/models/trigger-action-request-dto.js +15 -0
  28. package/dist/models/trigger-action-response-class.d.ts +25 -0
  29. package/dist/models/trigger-action-response-class.js +15 -0
  30. package/dist/models/update-action-request-dto.d.ts +41 -5
  31. package/dist/models/update-action-request-dto.js +6 -0
  32. package/models/action-class.ts +9 -20
  33. package/models/action-execution-class.ts +36 -0
  34. package/models/action-ref-class.ts +42 -0
  35. package/models/action-version-class.ts +136 -0
  36. package/models/create-action-request-dto.ts +50 -5
  37. package/models/get-action-version-response-class.ts +31 -0
  38. package/models/index.ts +6 -0
  39. package/models/list-action-versions-response-class.ts +49 -0
  40. package/models/trigger-action-request-dto.ts +66 -0
  41. package/models/trigger-action-response-class.ts +31 -0
  42. package/models/update-action-request-dto.ts +44 -5
  43. package/package.json +1 -1
@@ -39,6 +39,12 @@ export interface ActionExecutionClass {
39
39
  * @memberof ActionExecutionClass
40
40
  */
41
41
  'actionCode': string;
42
+ /**
43
+ * Action config version (version_number) at trigger time for audit/tracing
44
+ * @type {number}
45
+ * @memberof ActionExecutionClass
46
+ */
47
+ 'actionVersion': number;
42
48
  /**
43
49
  * Execution status
44
50
  * @type {string}
@@ -105,5 +111,35 @@ export interface ActionExecutionClass {
105
111
  * @memberof ActionExecutionClass
106
112
  */
107
113
  'workflowOutputReference'?: WorkflowOutputReferenceClass;
114
+ /**
115
+ * When true, execution was triggered with force (e.g. draft/disabled action)
116
+ * @type {boolean}
117
+ * @memberof ActionExecutionClass
118
+ */
119
+ 'force'?: boolean;
120
+ /**
121
+ * For entity actions: code of the entity the action was run on (e.g. policy code, lead code)
122
+ * @type {string}
123
+ * @memberof ActionExecutionClass
124
+ */
125
+ 'entityCode'?: string;
126
+ /**
127
+ * For entity actions: entity type (POLICY, LEAD, CLAIM) for lookup
128
+ * @type {string}
129
+ * @memberof ActionExecutionClass
130
+ */
131
+ 'entityType'?: string;
132
+ /**
133
+ * JWT sub of who triggered the action (set when trigger is from API; null for webhook/system)
134
+ * @type {string}
135
+ * @memberof ActionExecutionClass
136
+ */
137
+ 'triggeredBySub'?: string;
138
+ /**
139
+ * When the action was triggered (set at creation, same for all status rows of this execution)
140
+ * @type {string}
141
+ * @memberof ActionExecutionClass
142
+ */
143
+ 'triggeredAt'?: string;
108
144
  }
109
145
 
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL ActionService
5
+ * The EMIL ActionService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface ActionRefClass
21
+ */
22
+ export interface ActionRefClass {
23
+ /**
24
+ * Action code
25
+ * @type {string}
26
+ * @memberof ActionRefClass
27
+ */
28
+ 'code': string;
29
+ /**
30
+ * Action name
31
+ * @type {string}
32
+ * @memberof ActionRefClass
33
+ */
34
+ 'name': string;
35
+ /**
36
+ * Action slug
37
+ * @type {string}
38
+ * @memberof ActionRefClass
39
+ */
40
+ 'slug': string;
41
+ }
42
+
@@ -0,0 +1,136 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL ActionService
5
+ * The EMIL ActionService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { ActionRefClass } from './action-ref-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface ActionVersionClass
22
+ */
23
+ export interface ActionVersionClass {
24
+ /**
25
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
26
+ * @type {number}
27
+ * @memberof ActionVersionClass
28
+ */
29
+ 'id': number;
30
+ /**
31
+ * Whether this version is the active/published one (only one per action config)
32
+ * @type {boolean}
33
+ * @memberof ActionVersionClass
34
+ */
35
+ 'isActive': boolean;
36
+ /**
37
+ * Version number (1, 2, 3...)
38
+ * @type {number}
39
+ * @memberof ActionVersionClass
40
+ */
41
+ 'versionNumber': number;
42
+ /**
43
+ * Version code (unique id, e.g. acv_<nanoid>)
44
+ * @type {string}
45
+ * @memberof ActionVersionClass
46
+ */
47
+ 'code': string;
48
+ /**
49
+ * Detailed description of what this action does
50
+ * @type {string}
51
+ * @memberof ActionVersionClass
52
+ */
53
+ 'description'?: string;
54
+ /**
55
+ * BPMN/workflow code (resolved from workflow_slug)
56
+ * @type {string}
57
+ * @memberof ActionVersionClass
58
+ */
59
+ 'workflowCode': string;
60
+ /**
61
+ * BPMN/workflow slug
62
+ * @type {string}
63
+ * @memberof ActionVersionClass
64
+ */
65
+ 'workflowSlug': string;
66
+ /**
67
+ * Entity type: Policy, Lead, Claim
68
+ * @type {string}
69
+ * @memberof ActionVersionClass
70
+ */
71
+ 'entityType'?: ActionVersionClassEntityTypeEnum;
72
+ /**
73
+ * Product version ID
74
+ * @type {number}
75
+ * @memberof ActionVersionClass
76
+ */
77
+ 'productVersionId'?: number;
78
+ /**
79
+ * Derived from product_version.product_id
80
+ * @type {string}
81
+ * @memberof ActionVersionClass
82
+ */
83
+ 'productSlug'?: string;
84
+ /**
85
+ * Whether the action is available in the UI
86
+ * @type {boolean}
87
+ * @memberof ActionVersionClass
88
+ */
89
+ 'isAvailableInUi'?: boolean;
90
+ /**
91
+ * Optional JSON Schema to validate input_payload when triggering (only when expand=inputValidationSchema)
92
+ * @type {object}
93
+ * @memberof ActionVersionClass
94
+ */
95
+ 'inputValidationSchema'?: object;
96
+ /**
97
+ * Time at which the object was created.
98
+ * @type {string}
99
+ * @memberof ActionVersionClass
100
+ */
101
+ 'createdAt': string;
102
+ /**
103
+ * Time at which the object was updated.
104
+ * @type {string}
105
+ * @memberof ActionVersionClass
106
+ */
107
+ 'updatedAt': string;
108
+ /**
109
+ * Identifier of the user who created the record.
110
+ * @type {string}
111
+ * @memberof ActionVersionClass
112
+ */
113
+ 'createdBy': string;
114
+ /**
115
+ * Identifier of the user who last updated the record.
116
+ * @type {string}
117
+ * @memberof ActionVersionClass
118
+ */
119
+ 'updatedBy': string;
120
+ /**
121
+ * Parent action (code, name, slug). Set when listing versions so clients know which action each version belongs to.
122
+ * @type {ActionRefClass}
123
+ * @memberof ActionVersionClass
124
+ */
125
+ 'action'?: ActionRefClass;
126
+ }
127
+
128
+ export const ActionVersionClassEntityTypeEnum = {
129
+ Policy: 'POLICY',
130
+ Lead: 'LEAD',
131
+ Claim: 'CLAIM'
132
+ } as const;
133
+
134
+ export type ActionVersionClassEntityTypeEnum = typeof ActionVersionClassEntityTypeEnum[keyof typeof ActionVersionClassEntityTypeEnum];
135
+
136
+
@@ -27,28 +27,73 @@ export interface CreateActionRequestDto {
27
27
  */
28
28
  'name': string;
29
29
  /**
30
- * Stable identifier; auto-generated from action_name if not provided
30
+ * Stable identifier; auto-generated from name if not provided. Lowercase letters, digits, hyphens only; no spaces, special symbols, umlauts, or leading/trailing hyphen (max 200 chars).
31
31
  * @type {string}
32
32
  * @memberof CreateActionRequestDto
33
33
  */
34
34
  'slug'?: string;
35
35
  /**
36
- * BPMN/workflow code to execute when this action is triggered
36
+ * BPMN/workflow slug. When provided, productSlug and productVersionId are required to resolve the workflow. At least one of workflowSlug or workflowCode required.
37
37
  * @type {string}
38
38
  * @memberof CreateActionRequestDto
39
39
  */
40
- 'workflowCode': string;
40
+ 'workflowSlug'?: string;
41
41
  /**
42
- * Whether the action is enabled and can be triggered
42
+ * BPMN/workflow code. At least one of workflowSlug or workflowCode is required.
43
+ * @type {string}
44
+ * @memberof CreateActionRequestDto
45
+ */
46
+ 'workflowCode'?: string;
47
+ /**
48
+ * true = published (triggerable), false = draft. Default true.
43
49
  * @type {boolean}
44
50
  * @memberof CreateActionRequestDto
45
51
  */
46
- 'isEnabled'?: boolean;
52
+ 'isActive'?: boolean;
53
+ /**
54
+ * Whether the action is available in the UI
55
+ * @type {boolean}
56
+ * @memberof CreateActionRequestDto
57
+ */
58
+ 'isAvailableInUi'?: boolean;
47
59
  /**
48
60
  * Detailed description of what this action does
49
61
  * @type {string}
50
62
  * @memberof CreateActionRequestDto
51
63
  */
52
64
  'description'?: string;
65
+ /**
66
+ * Entity type. When provided, productVersionId is required (and vice versa).
67
+ * @type {string}
68
+ * @memberof CreateActionRequestDto
69
+ */
70
+ 'entityType'?: CreateActionRequestDtoEntityTypeEnum;
71
+ /**
72
+ * Product version ID. Required for entity actions (when entityType is set).
73
+ * @type {number}
74
+ * @memberof CreateActionRequestDto
75
+ */
76
+ 'productVersionId'?: number;
77
+ /**
78
+ * Product slug. Required for entity actions (when entityType is set). Must match the product that owns productVersionId.
79
+ * @type {string}
80
+ * @memberof CreateActionRequestDto
81
+ */
82
+ 'productSlug'?: string;
83
+ /**
84
+ * Optional JSON Schema to validate input_payload when triggering the action
85
+ * @type {object}
86
+ * @memberof CreateActionRequestDto
87
+ */
88
+ 'inputValidationSchema'?: object;
53
89
  }
54
90
 
91
+ export const CreateActionRequestDtoEntityTypeEnum = {
92
+ Policy: 'POLICY',
93
+ Lead: 'LEAD',
94
+ Claim: 'CLAIM'
95
+ } as const;
96
+
97
+ export type CreateActionRequestDtoEntityTypeEnum = typeof CreateActionRequestDtoEntityTypeEnum[keyof typeof CreateActionRequestDtoEntityTypeEnum];
98
+
99
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL ActionService
5
+ * The EMIL ActionService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { ActionVersionClass } from './action-version-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface GetActionVersionResponseClass
22
+ */
23
+ export interface GetActionVersionResponseClass {
24
+ /**
25
+ * The action version
26
+ * @type {ActionVersionClass}
27
+ * @memberof GetActionVersionResponseClass
28
+ */
29
+ 'actionVersion': ActionVersionClass;
30
+ }
31
+
package/models/index.ts CHANGED
@@ -1,13 +1,19 @@
1
1
  export * from './action-class';
2
2
  export * from './action-execution-class';
3
+ export * from './action-ref-class';
4
+ export * from './action-version-class';
3
5
  export * from './create-action-request-dto';
4
6
  export * from './create-action-response-class';
5
7
  export * from './get-action-execution-status-response-class';
6
8
  export * from './get-action-response-class';
9
+ export * from './get-action-version-response-class';
7
10
  export * from './inline-response200';
8
11
  export * from './inline-response503';
9
12
  export * from './list-action-executions-response-class';
13
+ export * from './list-action-versions-response-class';
10
14
  export * from './list-actions-response-class';
15
+ export * from './trigger-action-request-dto';
16
+ export * from './trigger-action-response-class';
11
17
  export * from './update-action-request-dto';
12
18
  export * from './update-action-response-class';
13
19
  export * from './workflow-output-reference-class';
@@ -0,0 +1,49 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL ActionService
5
+ * The EMIL ActionService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { ActionVersionClass } from './action-version-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface ListActionVersionsResponseClass
22
+ */
23
+ export interface ListActionVersionsResponseClass {
24
+ /**
25
+ * List of action versions
26
+ * @type {Array<ActionVersionClass>}
27
+ * @memberof ListActionVersionsResponseClass
28
+ */
29
+ 'items': Array<ActionVersionClass>;
30
+ /**
31
+ * Token for next page
32
+ * @type {string}
33
+ * @memberof ListActionVersionsResponseClass
34
+ */
35
+ 'nextPageToken': string;
36
+ /**
37
+ * Number of items per page
38
+ * @type {number}
39
+ * @memberof ListActionVersionsResponseClass
40
+ */
41
+ 'itemsPerPage': number;
42
+ /**
43
+ * Total number of versions
44
+ * @type {number}
45
+ * @memberof ListActionVersionsResponseClass
46
+ */
47
+ 'totalItems': number;
48
+ }
49
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL ActionService
5
+ * The EMIL ActionService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface TriggerActionRequestDto
21
+ */
22
+ export interface TriggerActionRequestDto {
23
+ /**
24
+ * Action slug to trigger
25
+ * @type {string}
26
+ * @memberof TriggerActionRequestDto
27
+ */
28
+ 'actionSlug': string;
29
+ /**
30
+ * Input payload for the action execution. When the action has input_validation_schema set, this payload is validated against it; validation failures return 400 with validation errors. Must be a JSON object (key-value map).
31
+ * @type {{ [key: string]: object; }}
32
+ * @memberof TriggerActionRequestDto
33
+ */
34
+ 'inputPayload'?: { [key: string]: object; };
35
+ /**
36
+ * If true, validate but do not create execution or publish
37
+ * @type {boolean}
38
+ * @memberof TriggerActionRequestDto
39
+ */
40
+ 'dryRun'?: boolean;
41
+ /**
42
+ * Correlation ID for tracing/idempotency
43
+ * @type {string}
44
+ * @memberof TriggerActionRequestDto
45
+ */
46
+ 'correlationId'?: string;
47
+ /**
48
+ * If true, allow triggering a draft (disabled) action and run its workflow
49
+ * @type {boolean}
50
+ * @memberof TriggerActionRequestDto
51
+ */
52
+ 'force'?: boolean;
53
+ /**
54
+ * For entity actions: code of the entity the action is run on (e.g. policy code, lead code)
55
+ * @type {string}
56
+ * @memberof TriggerActionRequestDto
57
+ */
58
+ 'entityCode'?: string;
59
+ /**
60
+ * For entity actions: entity type (e.g. Policy, Lead, Claim)
61
+ * @type {string}
62
+ * @memberof TriggerActionRequestDto
63
+ */
64
+ 'entityType'?: string;
65
+ }
66
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL ActionService
5
+ * The EMIL ActionService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { ActionExecutionClass } from './action-execution-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface TriggerActionResponseClass
22
+ */
23
+ export interface TriggerActionResponseClass {
24
+ /**
25
+ * Created action execution (initially PENDING)
26
+ * @type {ActionExecutionClass}
27
+ * @memberof TriggerActionResponseClass
28
+ */
29
+ 'actionExecution': ActionExecutionClass;
30
+ }
31
+
@@ -33,28 +33,67 @@ export interface UpdateActionRequestDto {
33
33
  */
34
34
  'name'?: string;
35
35
  /**
36
- * Stable identifier; unique per tenant
36
+ * BPMN/workflow slug. When provided, productSlug and productVersionId are required to resolve the workflow.
37
37
  * @type {string}
38
38
  * @memberof UpdateActionRequestDto
39
39
  */
40
- 'slug'?: string;
40
+ 'workflowSlug'?: string;
41
41
  /**
42
- * BPMN/workflow code to execute when this action is triggered
42
+ * BPMN/workflow code. When provided, used directly (no product required for resolution).
43
43
  * @type {string}
44
44
  * @memberof UpdateActionRequestDto
45
45
  */
46
46
  'workflowCode'?: string;
47
47
  /**
48
- * Whether the action is enabled and can be triggered
48
+ * Whether the action is published and can be triggered
49
49
  * @type {boolean}
50
50
  * @memberof UpdateActionRequestDto
51
51
  */
52
- 'isEnabled'?: boolean;
52
+ 'isActive'?: boolean;
53
+ /**
54
+ * Whether the action is available in the UI
55
+ * @type {boolean}
56
+ * @memberof UpdateActionRequestDto
57
+ */
58
+ 'isAvailableInUi'?: boolean;
53
59
  /**
54
60
  * Detailed description of what this action does
55
61
  * @type {string}
56
62
  * @memberof UpdateActionRequestDto
57
63
  */
58
64
  'description'?: string;
65
+ /**
66
+ * Entity type. When provided, productVersionId is required (and vice versa).
67
+ * @type {string}
68
+ * @memberof UpdateActionRequestDto
69
+ */
70
+ 'entityType'?: UpdateActionRequestDtoEntityTypeEnum;
71
+ /**
72
+ * Product version ID. Required when updating an entity action (entityType set).
73
+ * @type {number}
74
+ * @memberof UpdateActionRequestDto
75
+ */
76
+ 'productVersionId'?: number;
77
+ /**
78
+ * Product slug. Required when updating an entity action. Must match the product that owns productVersionId.
79
+ * @type {string}
80
+ * @memberof UpdateActionRequestDto
81
+ */
82
+ 'productSlug'?: string;
83
+ /**
84
+ * Optional JSON Schema to validate input_payload when triggering the action
85
+ * @type {object}
86
+ * @memberof UpdateActionRequestDto
87
+ */
88
+ 'inputValidationSchema'?: object;
59
89
  }
60
90
 
91
+ export const UpdateActionRequestDtoEntityTypeEnum = {
92
+ Policy: 'POLICY',
93
+ Lead: 'LEAD',
94
+ Claim: 'CLAIM'
95
+ } as const;
96
+
97
+ export type UpdateActionRequestDtoEntityTypeEnum = typeof UpdateActionRequestDtoEntityTypeEnum[keyof typeof UpdateActionRequestDtoEntityTypeEnum];
98
+
99
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/action-sdk",
3
- "version": "1.1.1-beta.6",
3
+ "version": "1.2.0",
4
4
  "description": "OpenAPI client for @emilgroup/action-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [