@emilgroup/action-sdk 1.0.1-beta.23 → 1.1.1-beta.10

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 (50) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +2 -2
  3. package/api/actions-api.ts +313 -42
  4. package/api/executions-api.ts +471 -0
  5. package/api.ts +2 -0
  6. package/dist/api/actions-api.d.ts +188 -39
  7. package/dist/api/actions-api.js +251 -38
  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 +38 -2
  13. package/dist/models/action-execution-class.d.ts +137 -0
  14. package/dist/models/action-execution-class.js +15 -0
  15. package/dist/models/create-action-request-dto.d.ts +31 -1
  16. package/dist/models/create-action-request-dto.js +6 -0
  17. package/dist/models/export-actions-as-yaml-response-class.d.ts +24 -0
  18. package/dist/models/export-actions-as-yaml-response-class.js +15 -0
  19. package/dist/models/get-action-execution-status-response-class.d.ts +25 -0
  20. package/dist/models/get-action-execution-status-response-class.js +15 -0
  21. package/dist/models/import-actions-from-yaml-request-dto.d.ts +36 -0
  22. package/dist/models/import-actions-from-yaml-request-dto.js +15 -0
  23. package/dist/models/import-actions-from-yaml-response-class.d.ts +37 -0
  24. package/dist/models/import-actions-from-yaml-response-class.js +15 -0
  25. package/dist/models/index.d.ts +9 -0
  26. package/dist/models/index.js +9 -0
  27. package/dist/models/list-action-executions-response-class.d.ts +43 -0
  28. package/dist/models/list-action-executions-response-class.js +15 -0
  29. package/dist/models/trigger-action-request-dto.d.ts +62 -0
  30. package/dist/models/trigger-action-request-dto.js +15 -0
  31. package/dist/models/trigger-action-response-class.d.ts +25 -0
  32. package/dist/models/trigger-action-response-class.js +15 -0
  33. package/dist/models/update-action-request-dto.d.ts +30 -0
  34. package/dist/models/update-action-request-dto.js +6 -0
  35. package/dist/models/workflow-output-reference-class.d.ts +30 -0
  36. package/dist/models/workflow-output-reference-class.js +15 -0
  37. package/models/action-class.ts +38 -2
  38. package/models/action-execution-class.ts +139 -0
  39. package/models/create-action-request-dto.ts +34 -1
  40. package/models/export-actions-as-yaml-response-class.ts +30 -0
  41. package/models/get-action-execution-status-response-class.ts +31 -0
  42. package/models/import-actions-from-yaml-request-dto.ts +42 -0
  43. package/models/import-actions-from-yaml-response-class.ts +43 -0
  44. package/models/index.ts +9 -0
  45. package/models/list-action-executions-response-class.ts +49 -0
  46. package/models/trigger-action-request-dto.ts +66 -0
  47. package/models/trigger-action-response-class.ts +31 -0
  48. package/models/update-action-request-dto.ts +33 -0
  49. package/models/workflow-output-reference-class.ts +36 -0
  50. package/package.json +2 -1
@@ -0,0 +1,139 @@
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 { WorkflowOutputReferenceClass } from './workflow-output-reference-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface ActionExecutionClass
22
+ */
23
+ export interface ActionExecutionClass {
24
+ /**
25
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
26
+ * @type {number}
27
+ * @memberof ActionExecutionClass
28
+ */
29
+ 'id': number;
30
+ /**
31
+ * Unique identifier for the object.
32
+ * @type {string}
33
+ * @memberof ActionExecutionClass
34
+ */
35
+ 'code': string;
36
+ /**
37
+ * Action configuration code (action_configs.code)
38
+ * @type {string}
39
+ * @memberof ActionExecutionClass
40
+ */
41
+ 'actionCode': string;
42
+ /**
43
+ * Action config version (config_version) at trigger time for audit/tracing
44
+ * @type {number}
45
+ * @memberof ActionExecutionClass
46
+ */
47
+ 'actionVersion': number;
48
+ /**
49
+ * Execution status
50
+ * @type {string}
51
+ * @memberof ActionExecutionClass
52
+ */
53
+ 'status': string;
54
+ /**
55
+ * Who triggered the execution
56
+ * @type {string}
57
+ * @memberof ActionExecutionClass
58
+ */
59
+ 'triggeredBy': string;
60
+ /**
61
+ * How the execution was triggered
62
+ * @type {string}
63
+ * @memberof ActionExecutionClass
64
+ */
65
+ 'triggerSource': string;
66
+ /**
67
+ * Error message when execution fails
68
+ * @type {string}
69
+ * @memberof ActionExecutionClass
70
+ */
71
+ 'error'?: string;
72
+ /**
73
+ * Structured error details when execution fails
74
+ * @type {{ [key: string]: object; }}
75
+ * @memberof ActionExecutionClass
76
+ */
77
+ 'errorDetails'?: { [key: string]: object; };
78
+ /**
79
+ * Time at which the object was created.
80
+ * @type {string}
81
+ * @memberof ActionExecutionClass
82
+ */
83
+ 'createdAt': string;
84
+ /**
85
+ * Time at which the object was updated.
86
+ * @type {string}
87
+ * @memberof ActionExecutionClass
88
+ */
89
+ 'updatedAt': string;
90
+ /**
91
+ * When the execution completed (succeeded or failed)
92
+ * @type {string}
93
+ * @memberof ActionExecutionClass
94
+ */
95
+ 'completedAt'?: string;
96
+ /**
97
+ * Correlation ID (e.g. webhook execution code that triggered this action execution)
98
+ * @type {string}
99
+ * @memberof ActionExecutionClass
100
+ */
101
+ 'correlationId': string;
102
+ /**
103
+ * Input payload for the execution
104
+ * @type {{ [key: string]: object; }}
105
+ * @memberof ActionExecutionClass
106
+ */
107
+ 'inputPayload'?: { [key: string]: object; };
108
+ /**
109
+ * Reference to ProcessManager workflow output (avoids duplicating workflow outputs)
110
+ * @type {WorkflowOutputReferenceClass}
111
+ * @memberof ActionExecutionClass
112
+ */
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
+
@@ -39,16 +39,49 @@ export interface CreateActionRequestDto {
39
39
  */
40
40
  'workflowCode': string;
41
41
  /**
42
- * Whether the action is enabled and can be triggered
42
+ * true = published (triggerable), false = draft. Default true.
43
43
  * @type {boolean}
44
44
  * @memberof CreateActionRequestDto
45
45
  */
46
46
  'isEnabled'?: boolean;
47
+ /**
48
+ * Whether the action is available in the UI
49
+ * @type {boolean}
50
+ * @memberof CreateActionRequestDto
51
+ */
52
+ 'isAvailableInUi'?: boolean;
47
53
  /**
48
54
  * Detailed description of what this action does
49
55
  * @type {string}
50
56
  * @memberof CreateActionRequestDto
51
57
  */
52
58
  'description'?: string;
59
+ /**
60
+ * Entity type. When provided, productVersionId is required (and vice versa).
61
+ * @type {string}
62
+ * @memberof CreateActionRequestDto
63
+ */
64
+ 'entityType'?: CreateActionRequestDtoEntityTypeEnum;
65
+ /**
66
+ * Product version ID. When provided, entityType is required (and vice versa).
67
+ * @type {number}
68
+ * @memberof CreateActionRequestDto
69
+ */
70
+ 'productVersionId'?: number;
71
+ /**
72
+ * Optional JSON Schema to validate input_payload when triggering the action
73
+ * @type {object}
74
+ * @memberof CreateActionRequestDto
75
+ */
76
+ 'inputValidationSchema'?: object;
53
77
  }
54
78
 
79
+ export const CreateActionRequestDtoEntityTypeEnum = {
80
+ Policy: 'POLICY',
81
+ Lead: 'LEAD',
82
+ Claim: 'CLAIM'
83
+ } as const;
84
+
85
+ export type CreateActionRequestDtoEntityTypeEnum = typeof CreateActionRequestDtoEntityTypeEnum[keyof typeof CreateActionRequestDtoEntityTypeEnum];
86
+
87
+
@@ -0,0 +1,30 @@
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 ExportActionsAsYamlResponseClass
21
+ */
22
+ export interface ExportActionsAsYamlResponseClass {
23
+ /**
24
+ * Serialized YAML for the product version (all entity types)
25
+ * @type {string}
26
+ * @memberof ExportActionsAsYamlResponseClass
27
+ */
28
+ 'yamlContent': string;
29
+ }
30
+
@@ -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 GetActionExecutionStatusResponseClass
22
+ */
23
+ export interface GetActionExecutionStatusResponseClass {
24
+ /**
25
+ * Latest action execution status
26
+ * @type {ActionExecutionClass}
27
+ * @memberof GetActionExecutionStatusResponseClass
28
+ */
29
+ 'actionExecution'?: ActionExecutionClass;
30
+ }
31
+
@@ -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 ImportActionsFromYamlRequestDto
21
+ */
22
+ export interface ImportActionsFromYamlRequestDto {
23
+ /**
24
+ * Product slug for the whole document
25
+ * @type {string}
26
+ * @memberof ImportActionsFromYamlRequestDto
27
+ */
28
+ 'productSlug': string;
29
+ /**
30
+ * Product version ID for the whole document
31
+ * @type {number}
32
+ * @memberof ImportActionsFromYamlRequestDto
33
+ */
34
+ 'productVersionId': number;
35
+ /**
36
+ * Full YAML body (entity_actions keyed by entity type)
37
+ * @type {string}
38
+ * @memberof ImportActionsFromYamlRequestDto
39
+ */
40
+ 'yamlContent': string;
41
+ }
42
+
@@ -0,0 +1,43 @@
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 { ActionClass } from './action-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface ImportActionsFromYamlResponseClass
22
+ */
23
+ export interface ImportActionsFromYamlResponseClass {
24
+ /**
25
+ * Normalized YAML for client to store
26
+ * @type {string}
27
+ * @memberof ImportActionsFromYamlResponseClass
28
+ */
29
+ 'yamlContent': string;
30
+ /**
31
+ * Actions that were created
32
+ * @type {Array<ActionClass>}
33
+ * @memberof ImportActionsFromYamlResponseClass
34
+ */
35
+ 'createdActions': Array<ActionClass>;
36
+ /**
37
+ * Actions that were updated
38
+ * @type {Array<ActionClass>}
39
+ * @memberof ImportActionsFromYamlResponseClass
40
+ */
41
+ 'updatedActions': Array<ActionClass>;
42
+ }
43
+
package/models/index.ts CHANGED
@@ -1,9 +1,18 @@
1
1
  export * from './action-class';
2
+ export * from './action-execution-class';
2
3
  export * from './create-action-request-dto';
3
4
  export * from './create-action-response-class';
5
+ export * from './export-actions-as-yaml-response-class';
6
+ export * from './get-action-execution-status-response-class';
4
7
  export * from './get-action-response-class';
8
+ export * from './import-actions-from-yaml-request-dto';
9
+ export * from './import-actions-from-yaml-response-class';
5
10
  export * from './inline-response200';
6
11
  export * from './inline-response503';
12
+ export * from './list-action-executions-response-class';
7
13
  export * from './list-actions-response-class';
14
+ export * from './trigger-action-request-dto';
15
+ export * from './trigger-action-response-class';
8
16
  export * from './update-action-request-dto';
9
17
  export * from './update-action-response-class';
18
+ 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 { ActionExecutionClass } from './action-execution-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface ListActionExecutionsResponseClass
22
+ */
23
+ export interface ListActionExecutionsResponseClass {
24
+ /**
25
+ * List of action executions
26
+ * @type {Array<ActionExecutionClass>}
27
+ * @memberof ListActionExecutionsResponseClass
28
+ */
29
+ 'items': Array<ActionExecutionClass>;
30
+ /**
31
+ * Token for the next page
32
+ * @type {string}
33
+ * @memberof ListActionExecutionsResponseClass
34
+ */
35
+ 'nextPageToken': string;
36
+ /**
37
+ * Number of items per page
38
+ * @type {number}
39
+ * @memberof ListActionExecutionsResponseClass
40
+ */
41
+ 'itemsPerPage': number;
42
+ /**
43
+ * Total number of items
44
+ * @type {number}
45
+ * @memberof ListActionExecutionsResponseClass
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.
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
+ * If true, allow triggering a draft (disabled) action and run its workflow
43
+ * @type {boolean}
44
+ * @memberof TriggerActionRequestDto
45
+ */
46
+ 'force'?: boolean;
47
+ /**
48
+ * Optional correlation ID for tracing/idempotency
49
+ * @type {string}
50
+ * @memberof TriggerActionRequestDto
51
+ */
52
+ 'correlationId'?: string;
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
+
@@ -50,11 +50,44 @@ export interface UpdateActionRequestDto {
50
50
  * @memberof UpdateActionRequestDto
51
51
  */
52
52
  'isEnabled'?: 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. When provided, entityType is required (and vice versa).
73
+ * @type {number}
74
+ * @memberof UpdateActionRequestDto
75
+ */
76
+ 'productVersionId'?: number;
77
+ /**
78
+ * Optional JSON Schema to validate input_payload when triggering the action
79
+ * @type {object}
80
+ * @memberof UpdateActionRequestDto
81
+ */
82
+ 'inputValidationSchema'?: object;
59
83
  }
60
84
 
85
+ export const UpdateActionRequestDtoEntityTypeEnum = {
86
+ Policy: 'POLICY',
87
+ Lead: 'LEAD',
88
+ Claim: 'CLAIM'
89
+ } as const;
90
+
91
+ export type UpdateActionRequestDtoEntityTypeEnum = typeof UpdateActionRequestDtoEntityTypeEnum[keyof typeof UpdateActionRequestDtoEntityTypeEnum];
92
+
93
+
@@ -0,0 +1,36 @@
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 WorkflowOutputReferenceClass
21
+ */
22
+ export interface WorkflowOutputReferenceClass {
23
+ /**
24
+ * ProcessManager workflow instance key/code
25
+ * @type {string}
26
+ * @memberof WorkflowOutputReferenceClass
27
+ */
28
+ 'workflowInstanceKey': string;
29
+ /**
30
+ * Workflow task key that contains the output
31
+ * @type {string}
32
+ * @memberof WorkflowOutputReferenceClass
33
+ */
34
+ 'workflowTaskKey': string;
35
+ }
36
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/action-sdk",
3
- "version": "1.0.1-beta.23",
3
+ "version": "1.1.1-beta.10",
4
4
  "description": "OpenAPI client for @emilgroup/action-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -21,6 +21,7 @@
21
21
  "axios": "^1.12.0"
22
22
  },
23
23
  "devDependencies": {
24
+
24
25
  "typescript": "^4.0"
25
26
  }
26
27
  }