@uipath/case-tool 1.201.0 → 1.202.0-preview.136

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 (96) hide show
  1. package/dist/{authoring-aaaqwck3.js → authoring-cvjhkfxp.js} +74 -48
  2. package/dist/{browser-strategy-rkcvc6tn.js → browser-strategy-6atc7v8s.js} +3 -3
  3. package/dist/case-api-bwcxsbxe.js +381 -0
  4. package/dist/case-debug-studio-web-service-qcb328bt.js +335 -0
  5. package/dist/{case-pack-service-bxas5bxz.js → case-pack-service-txby2znw.js} +11 -18
  6. package/dist/case-validate-service-0q8krj2a.js +2114 -0
  7. package/dist/connector-enrichment-service-agqxam5y.js +60 -0
  8. package/dist/connector-lookup-service-ycgk77n0.js +22 -0
  9. package/dist/connector-task-spec-kdx5bv87.js +1250 -0
  10. package/dist/{de-5KVP66U6-t37qr521.js → de-5KVP66U6-1bnf4zt5.js} +54 -54
  11. package/dist/{de-5HU6GFWV-zheyw6d2.js → de-7XQXX2DK-tqdy5n2b.js} +857 -845
  12. package/dist/debug-service-dxx5pfev.js +57 -0
  13. package/dist/{en-MABQK6C4-nkzq2j8t.js → en-5ZGC5VQ3-h581y30k.js} +897 -897
  14. package/dist/{en-4KXU7N7B-24v330b5.js → en-X3S6IZ5J-nhkg6pwn.js} +55 -61
  15. package/dist/enrichment-service-ebz1f4ds.js +421 -0
  16. package/dist/{es-MX-POESXYP2-9538722k.js → es-MX-U2VN3SZW-anynsmd8.js} +857 -845
  17. package/dist/{es-MX-XAVLOQW3-47a405kf.js → es-MX-XAVLOQW3-q00km2y7.js} +54 -54
  18. package/dist/{es-VFPNVMP5-6sftsdxe.js → es-VFPNVMP5-bx2c337j.js} +54 -54
  19. package/dist/{es-LUTYN7U7-ye5zn4sn.js → es-ZGCPPOME-8gazspjj.js} +857 -845
  20. package/dist/{fr-E5MDO4EG-f3x1jeqw.js → fr-E5MDO4EG-c3mkty2t.js} +54 -54
  21. package/dist/{fr-LJIK56LW-xf3xf2kh.js → fr-T3G5GZCT-y3f7xb1q.js} +857 -845
  22. package/dist/{index-cncq089f.js → index-7s201ka0.js} +163 -80
  23. package/dist/{index-hsadteg4.js → index-h8cph72k.js} +4 -4
  24. package/dist/index-k4xz16db.js +63712 -0
  25. package/dist/{index-p50kx6jv.js → index-k5tbd184.js} +276 -276
  26. package/dist/index-kwxe1vep.js +143 -0
  27. package/dist/{index-9f8q2ege.js → index-p3vk57z7.js} +27 -27
  28. package/dist/index-qyf1dee9.js +630 -0
  29. package/dist/index.js +16 -17
  30. package/dist/{index.umd.min-drpc57vn.js → index.umd.min-fqefd9kn.js} +3 -3
  31. package/dist/input-reader-xb9vecxv.js +11 -0
  32. package/dist/{ja-FGEGLBJ3-w9byjhze.js → ja-BI5K3JDZ-77zat4z2.js} +857 -845
  33. package/dist/{ja-DPO5PPLO-fmbg7zt2.js → ja-DPO5PPLO-mysfmznx.js} +54 -54
  34. package/dist/{js-yaml-cggj6w7q.js → js-yaml-87cdx6bm.js} +27 -19
  35. package/dist/known-types-qryebm95.js +15 -0
  36. package/dist/{ko-ITOPNIYI-aqy82jk8.js → ko-ITOPNIYI-hmxd2asd.js} +54 -54
  37. package/dist/{ko-TUAK3G3A-s25w0ckg.js → ko-JOBF5V7N-4bv0mjje.js} +857 -845
  38. package/dist/{node-strategy-8gzp67xs.js → node-strategy-0267x5e5.js} +130 -14
  39. package/dist/node-sync-service-9a9ksj9s.js +38 -0
  40. package/dist/{packager-tool-9qecd4wb.js → packager-tool-0gctz400.js} +5 -2
  41. package/dist/packager-tool-0mj06yen.js +65 -0
  42. package/dist/{packager-tool-1cb0d5e0.js → packager-tool-0v3s8r01.js} +2 -2
  43. package/dist/packager-tool-134mvmcm.js +3040 -0
  44. package/dist/{packager-tool-wckvcay0.js → packager-tool-1yh8g550.js} +9 -7
  45. package/dist/{packager-tool-zqa5k9f7.js → packager-tool-37zvccmt.js} +990 -2287
  46. package/dist/packager-tool-3ze5vt52.js +54 -0
  47. package/dist/{packager-tool-w3h8xrnv.js → packager-tool-56j6keqr.js} +71 -3
  48. package/dist/{packager-tool-3wygxefb.js → packager-tool-58q3tvh7.js} +10 -10
  49. package/dist/{packager-tool-zx48pq4v.js → packager-tool-5ax2ywcg.js} +1997 -1174
  50. package/dist/{packager-tool-we1phz71.js → packager-tool-885mmrvr.js} +31 -3
  51. package/dist/packager-tool-9scn4b15.js +852 -0
  52. package/dist/{packager-tool-p9j43p8h.js → packager-tool-a42jnpy5.js} +3 -9
  53. package/dist/packager-tool-ajvse9r3.js +356 -0
  54. package/dist/{packager-tool-jysvpt8p.js → packager-tool-c23zrhj8.js} +2 -2
  55. package/dist/packager-tool-dqs5qy9s.js +2327 -0
  56. package/dist/packager-tool-ee5dhff3.js +6717 -0
  57. package/dist/{packager-tool-wvqz81mx.js → packager-tool-gtzs471w.js} +3 -2
  58. package/dist/packager-tool-hrr0efqc.js +546 -0
  59. package/dist/packager-tool-j9rfdrdm.js +1125 -0
  60. package/dist/{packager-tool-gq6952nc.js → packager-tool-jhdf8gt1.js} +5054 -17851
  61. package/dist/packager-tool-mp59jtpm.js +6865 -0
  62. package/dist/packager-tool-njzcfve1.js +77 -0
  63. package/dist/packager-tool-p7jgrm5r.js +15 -0
  64. package/dist/packager-tool-r84ng21s.js +57 -0
  65. package/dist/packager-tool-rqvr63x5.js +1217 -0
  66. package/dist/packager-tool-s12392rd.js +80 -0
  67. package/dist/packager-tool-sv0d6wb6.js +173 -0
  68. package/dist/packager-tool-ty1t2byf.js +27 -0
  69. package/dist/packager-tool-vepqrsse.js +23 -0
  70. package/dist/packager-tool-w5ek334f.js +4892 -0
  71. package/dist/{packager-tool-5arsyj36.js → packager-tool-yc4kw997.js} +4 -2
  72. package/dist/packager-tool.js +91 -5
  73. package/dist/project-artifacts-vhanbtw5.js +14 -0
  74. package/dist/{pt-BR-7XGDXRDJ-espnkgrj.js → pt-BR-7DYX2YPT-fqxqzqtf.js} +857 -845
  75. package/dist/{pt-BR-BXURWX4W-xzyndmrx.js → pt-BR-BXURWX4W-bwfcwhk1.js} +54 -54
  76. package/dist/{pt-TMVOOITK-myha14p9.js → pt-HTXGGX6Y-97t21dty.js} +857 -845
  77. package/dist/{pt-YI4VE4YQ-521681zf.js → pt-YI4VE4YQ-wdkn2dcf.js} +54 -54
  78. package/dist/resourcesSyncService-mrmmwaqr.js +683 -0
  79. package/dist/{ro-2VALF3S5-cdz5afkr.js → ro-KTNQ3MNU-y08n1x5g.js} +857 -845
  80. package/dist/{ro-RKXZUG7Z-pdztdafr.js → ro-RKXZUG7Z-nndrrsq7.js} +54 -54
  81. package/dist/{ru-GSCT4ARZ-qj8dm4dp.js → ru-GSCT4ARZ-1sa9wbr8.js} +1 -1
  82. package/dist/ru-WBLQ5B2U-8r3c7v6d.js +10 -0
  83. package/dist/strict-case-rules-303vjvas.js +377 -0
  84. package/dist/strict-sdd-audit-qdmc9e1y.js +1024 -0
  85. package/dist/tool.js +17 -18
  86. package/dist/{tr-AA6O2WSR-bj9n80k8.js → tr-AA6O2WSR-86ba4bdf.js} +54 -54
  87. package/dist/{tr-RIFCEXFH-hgkb4g8y.js → tr-XHSSPNK7-cmqyc4wd.js} +857 -845
  88. package/dist/trigger-enrichment-service-zdx4x92j.js +340 -0
  89. package/dist/{zh-CN-IP3FMXWM-1cfarhcp.js → zh-CN-2EHQT23P-mr63c4xz.js} +857 -845
  90. package/dist/{zh-CN-R2KLHXQV-x6gnk2n0.js → zh-CN-R2KLHXQV-agqr45ds.js} +54 -54
  91. package/dist/{zh-TW-AGIDXIPF-n6r6w7vy.js → zh-TW-MGZCE5BT-c4ekmrz9.js} +857 -845
  92. package/dist/{zh-TW-RJGCQANM-tt8j5wv2.js → zh-TW-RJGCQANM-w0x3qc1p.js} +54 -54
  93. package/package.json +2 -2
  94. package/dist/index-8bsngk9y.js +0 -247140
  95. package/dist/packager-tool-axcdppp9.js +0 -13607
  96. package/dist/ru-WBLQ5B2U-8xd4gpv2.js +0 -10
@@ -24,9 +24,6 @@ import {
24
24
  dataTransform_noOperations_message,
25
25
  doWhile_limitOutOfRange_message,
26
26
  en_default,
27
- entityQuery_emptyFilterExpression_message,
28
- entityQuery_emptyFilterValueList_message,
29
- entityQuery_uncarryableExpression_message,
30
27
  escalation_appRequired_message,
31
28
  escalation_memoryArgumentRequired_message,
32
29
  escalation_nameRequired_message,
@@ -54,65 +51,62 @@ import {
54
51
  scriptBody_mustache_message,
55
52
  singleConversationTrigger_message,
56
53
  triggerRequired_message
57
- } from "./packager-tool-p9j43p8h.js";
58
- import"./packager-tool-jysvpt8p.js";
59
- import"./packager-tool-wckvcay0.js";
54
+ } from "./packager-tool-a42jnpy5.js";
55
+ import"./packager-tool-c23zrhj8.js";
56
+ import"./packager-tool-1yh8g550.js";
60
57
  export {
61
- triggerRequired_message,
62
- singleConversationTrigger_message,
63
- scriptBody_mustache_message,
64
- schemaValidator_validation_genericError,
65
- schemaValidator_typeMismatch_message,
66
- schemaValidator_required_message,
67
- schemaValidator_outOfRange_message,
68
- schemaValidator_invalidPattern_message,
69
- schemaValidator_invalidField_message,
70
- schemaValidator_invalidEnum_message,
71
- schemaValidator_genericKeyword_message,
72
- outputMapping_missing_message,
73
- ixpSchemaDraft_invalid_message,
74
- ixpSchemaDraft_invalidWithDetail_message,
75
- hitlQuickForm_fieldLabelRequired_message,
76
- hitlQuickForm_emptySchema_message,
77
- governance_temperatureExceeded_message,
78
- governance_noAllowedModel_message,
79
- governance_modelNotAvailable_message,
80
- governance_maxTokensExceeded_message,
81
- governance_maxIterationsExceeded_message,
82
- governance_hitlRequired_message,
83
- escalation_recipientRequired_message,
84
- escalation_quickFormDuplicateFieldLabel_message,
85
- escalation_nameRequired_message,
86
- escalation_memoryArgumentRequired_message,
87
- escalation_appRequired_message,
88
- entityQuery_uncarryableExpression_message,
89
- entityQuery_emptyFilterValueList_message,
90
- entityQuery_emptyFilterExpression_message,
91
- doWhile_limitOutOfRange_message,
92
- en_default as default,
93
- dataTransform_noOperations_message,
94
- dataTransform_missingCollection_message,
95
- dataTransform_mapNoMappings_message,
96
- dataTransform_mapMissingField_message,
97
- dataTransform_groupByMissingField_message,
98
- dataTransform_groupByAggMissingOutputName_message,
99
- dataTransform_groupByAggMissingField_message,
100
- dataTransform_filterNoConditions_message,
101
- dataTransform_filterMissingField_message,
102
- dataTransform_customScriptMissing_message,
103
- conversationalVoice_callContextRequired_message,
104
- conversationalVoice_callContextInvalid_message,
105
- conversationalVoiceEndCall_callContextInvalid_message,
106
- conditionExpression_required_message,
107
- conditionExpression_invalid_message,
108
- conditionExpression_incomplete_message,
109
- conditionExpression_decisionWrapped_message,
110
- agentInputRefs_unresolvedRef_message,
111
- agentInputRefs_reservedNamespace_message,
112
- agentInputRefs_reservedMetadataRoot_message,
113
- agentInputRefs_ambiguousUnderscoreRoot_message,
58
+ agentDuplicateToolNames_duplicateName_message,
114
59
  agentEmptyVar_unwrittenVariable_message,
115
- agentDuplicateToolNames_duplicateName_message
60
+ agentInputRefs_ambiguousUnderscoreRoot_message,
61
+ agentInputRefs_reservedMetadataRoot_message,
62
+ agentInputRefs_reservedNamespace_message,
63
+ agentInputRefs_unresolvedRef_message,
64
+ conditionExpression_decisionWrapped_message,
65
+ conditionExpression_incomplete_message,
66
+ conditionExpression_invalid_message,
67
+ conditionExpression_required_message,
68
+ conversationalVoiceEndCall_callContextInvalid_message,
69
+ conversationalVoice_callContextInvalid_message,
70
+ conversationalVoice_callContextRequired_message,
71
+ dataTransform_customScriptMissing_message,
72
+ dataTransform_filterMissingField_message,
73
+ dataTransform_filterNoConditions_message,
74
+ dataTransform_groupByAggMissingField_message,
75
+ dataTransform_groupByAggMissingOutputName_message,
76
+ dataTransform_groupByMissingField_message,
77
+ dataTransform_mapMissingField_message,
78
+ dataTransform_mapNoMappings_message,
79
+ dataTransform_missingCollection_message,
80
+ dataTransform_noOperations_message,
81
+ en_default as default,
82
+ doWhile_limitOutOfRange_message,
83
+ escalation_appRequired_message,
84
+ escalation_memoryArgumentRequired_message,
85
+ escalation_nameRequired_message,
86
+ escalation_quickFormDuplicateFieldLabel_message,
87
+ escalation_recipientRequired_message,
88
+ governance_hitlRequired_message,
89
+ governance_maxIterationsExceeded_message,
90
+ governance_maxTokensExceeded_message,
91
+ governance_modelNotAvailable_message,
92
+ governance_noAllowedModel_message,
93
+ governance_temperatureExceeded_message,
94
+ hitlQuickForm_emptySchema_message,
95
+ hitlQuickForm_fieldLabelRequired_message,
96
+ ixpSchemaDraft_invalidWithDetail_message,
97
+ ixpSchemaDraft_invalid_message,
98
+ outputMapping_missing_message,
99
+ schemaValidator_genericKeyword_message,
100
+ schemaValidator_invalidEnum_message,
101
+ schemaValidator_invalidField_message,
102
+ schemaValidator_invalidPattern_message,
103
+ schemaValidator_outOfRange_message,
104
+ schemaValidator_required_message,
105
+ schemaValidator_typeMismatch_message,
106
+ schemaValidator_validation_genericError,
107
+ scriptBody_mustache_message,
108
+ singleConversationTrigger_message,
109
+ triggerRequired_message
116
110
  };
117
111
 
118
- //# debugId=7BC4D228B40D709C64756E2164756E21
112
+ //# debugId=9E22726AB2689E1B64756E2164756E21
@@ -0,0 +1,421 @@
1
+ import {
2
+ addVarIdsToInputsOutputs,
3
+ buildErrorOutput,
4
+ convertActionArgsToVariables,
5
+ mapEntryPointVariablesToInputOutput,
6
+ transformSchemaToVariables
7
+ } from "./packager-tool-ajvse9r3.js";
8
+ import {
9
+ loadResourceIndex
10
+ } from "./packager-tool-s12392rd.js";
11
+ import {
12
+ getLoginStatusAsync
13
+ } from "./packager-tool-dqs5qy9s.js";
14
+ import"./packager-tool-qa9gftnj.js";
15
+ import {
16
+ catchError
17
+ } from "./packager-tool-5ax2ywcg.js";
18
+ import"./packager-tool-0v3s8r01.js";
19
+ import"./packager-tool-0gctz400.js";
20
+ import"./packager-tool-yc4kw997.js";
21
+ import"./packager-tool-1yh8g550.js";
22
+
23
+ // src/services/action-schema-api.ts
24
+ async function getActionSchema(params) {
25
+ const loginStatus = await getLoginStatusAsync();
26
+ if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl || !loginStatus.organizationId || !loginStatus.tenantId || !loginStatus.accessToken) {
27
+ throw new Error("Not logged in. Run 'uip login' first.");
28
+ }
29
+ const query = new URLSearchParams({
30
+ appSystemName: params.systemName,
31
+ version: String(params.deployVersion)
32
+ });
33
+ const url = `${loginStatus.baseUrl}/${loginStatus.organizationId}/apps_/default/api/v1/default/action-schema?${query}`;
34
+ const response = await fetch(url, {
35
+ method: "GET",
36
+ headers: {
37
+ Authorization: `Bearer ${loginStatus.accessToken}`,
38
+ "Content-Type": "application/json",
39
+ "X-Uipath-Tenantid": loginStatus.tenantId,
40
+ Accept: "application/json"
41
+ }
42
+ });
43
+ if (!response.ok) {
44
+ const errorText = await response.text();
45
+ throw new Error(`Action schema request failed: ${response.status} ${response.statusText} - ${errorText}`);
46
+ }
47
+ return await response.json();
48
+ }
49
+
50
+ // src/services/entry-point-api.ts
51
+ async function getEntryPointDetails(params) {
52
+ const loginStatus = await getLoginStatusAsync();
53
+ if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl || !loginStatus.organizationId || !loginStatus.tenantName || !loginStatus.tenantId || !loginStatus.accessToken) {
54
+ throw new Error("Not logged in. Run 'uip login' first.");
55
+ }
56
+ const key = `${encodeURIComponent(params.processKey)}:${encodeURIComponent(params.processVersion)}`;
57
+ const path = `/odata/Processes/UiPath.Server.Configuration.OData.GetPackageEntryPointsV2(key='${key}')`;
58
+ const query = new URLSearchParams({ feedId: params.feedId });
59
+ const url = `${loginStatus.baseUrl}/${loginStatus.organizationId}/${loginStatus.tenantName}/orchestrator_${path}?${query}`;
60
+ const headers = {
61
+ Authorization: `Bearer ${loginStatus.accessToken}`,
62
+ "Content-Type": "application/json",
63
+ "X-Uipath-Tenantid": loginStatus.tenantId,
64
+ Accept: "application/json"
65
+ };
66
+ if (params.folderKey) {
67
+ headers["x-uipath-folderkey"] = params.folderKey;
68
+ }
69
+ const response = await fetch(url, {
70
+ method: "GET",
71
+ headers
72
+ });
73
+ if (!response.ok) {
74
+ const errorText = await response.text();
75
+ throw new Error(`Entry point details request failed: ${response.status} ${response.statusText} - ${errorText}`);
76
+ }
77
+ const data = await response.json();
78
+ return data.value;
79
+ }
80
+
81
+ // src/services/hitl-task-output-schema.ts
82
+ var USER_LOGIN_INFO_PROPERTIES = {
83
+ Id: { type: "integer" },
84
+ Name: { type: "string" },
85
+ Surname: { type: "string" },
86
+ UserName: { type: "string" },
87
+ EmailAddress: { type: "string" },
88
+ DisplayName: { type: "string" },
89
+ Type: {
90
+ type: "string",
91
+ description: "User, Robot, DirectoryUser, DirectoryGroup, DirectoryRobot, or DirectoryExternalApplication"
92
+ },
93
+ AuthenticationSource: { type: "string" }
94
+ };
95
+ var HITL_TASK_OUTPUT_VARIABLE = {
96
+ type: "object",
97
+ displayName: "All Task Properties",
98
+ properties: {
99
+ Id: { type: "integer", description: "Task identifier" },
100
+ Key: { type: "string", description: "Unique task identifier (UUID)" },
101
+ Title: { type: "string", description: "Task title" },
102
+ Status: {
103
+ type: "string",
104
+ description: "Task status: Unassigned, Pending, or Completed"
105
+ },
106
+ Action: { type: "string", description: "Action taken on the task" },
107
+ ActionLabel: { type: "string", description: "Action display label" },
108
+ Priority: {
109
+ type: "string",
110
+ description: "Task priority: Low, Medium, High, or Critical"
111
+ },
112
+ Type: {
113
+ type: "string",
114
+ description: "Task type (e.g. FormTask, AppTask, QuickFormTask)"
115
+ },
116
+ Data: { type: "object", description: "Task form field values" },
117
+ CompletedByUser: {
118
+ type: "object",
119
+ description: "User who completed the task",
120
+ properties: USER_LOGIN_INFO_PROPERTIES
121
+ },
122
+ AssignedToUser: {
123
+ type: "object",
124
+ description: "User currently assigned to the task",
125
+ properties: USER_LOGIN_INFO_PROPERTIES
126
+ },
127
+ AssignedToUserId: {
128
+ type: "integer",
129
+ description: "ID of the assigned user"
130
+ },
131
+ TaskAssignmentCriteria: {
132
+ type: "string",
133
+ description: "Assignment criteria: SingleUser, Workload, AllUsers, RoundRobin, or Hierarchy"
134
+ },
135
+ TaskAssignees: {
136
+ type: "array",
137
+ description: "List of users assigned to the task",
138
+ items: {
139
+ type: "object",
140
+ properties: USER_LOGIN_INFO_PROPERTIES
141
+ }
142
+ },
143
+ CompletionTime: {
144
+ type: "string",
145
+ description: "Task completion timestamp"
146
+ },
147
+ CreationTime: {
148
+ type: "string",
149
+ description: "Task creation timestamp"
150
+ },
151
+ LastModificationTime: {
152
+ type: "string",
153
+ description: "Last modification timestamp"
154
+ },
155
+ LastAssignedTime: {
156
+ type: "string",
157
+ description: "Last assignment timestamp"
158
+ },
159
+ OrganizationUnitId: {
160
+ type: "integer",
161
+ description: "Folder/organization unit ID"
162
+ },
163
+ OrganizationUnitFullyQualifiedName: {
164
+ type: "string",
165
+ description: "Fully qualified folder name"
166
+ },
167
+ ParentOperationId: {
168
+ type: "string",
169
+ description: "Operation ID that created this task"
170
+ },
171
+ CreatorJobKey: {
172
+ type: "string",
173
+ description: "Key of the job that created this task (UUID)"
174
+ },
175
+ ExternalTag: {
176
+ type: "string",
177
+ description: "External system identifier"
178
+ },
179
+ ProcessingTime: {
180
+ type: "integer",
181
+ description: "Time spent in assigned state"
182
+ },
183
+ WaitJobState: {
184
+ type: "string",
185
+ description: "State of the waiting job"
186
+ },
187
+ WaitJobKey: {
188
+ type: "string",
189
+ description: "Key of the waiting job (UUID)"
190
+ },
191
+ TaskSchemaKey: {
192
+ type: "string",
193
+ description: "Schema key for QuickFormTask (UUID)"
194
+ },
195
+ IsDeleted: { type: "boolean" },
196
+ IsCurrentUserInAllUserAssignedGroup: { type: "boolean" },
197
+ CreatorUserId: {
198
+ type: "integer",
199
+ description: "ID of the user who created the task"
200
+ },
201
+ LastModifierUserId: {
202
+ type: "integer",
203
+ description: "ID of the last user to modify the task"
204
+ },
205
+ DeleterUserId: { type: "integer" },
206
+ DeletionTime: { type: "string" },
207
+ Tags: {
208
+ type: "array",
209
+ description: "Tags associated to the task",
210
+ items: {
211
+ type: "object",
212
+ properties: {
213
+ Name: { type: "string" },
214
+ DisplayName: { type: "string" },
215
+ Value: { type: "string" },
216
+ DisplayValue: { type: "string" }
217
+ }
218
+ }
219
+ },
220
+ TaskDefinitionPropertiesId: {
221
+ type: "integer",
222
+ description: "Task definition properties ID"
223
+ },
224
+ AppTasksMetadata: {
225
+ type: "object",
226
+ description: "App task metadata",
227
+ properties: {
228
+ Id: { type: "integer" },
229
+ AppId: { type: "string", description: "Associated App ID" },
230
+ AppVersion: {
231
+ type: "integer",
232
+ description: "Associated App version"
233
+ },
234
+ AppProcessKey: {
235
+ type: "string",
236
+ description: "App process key (UUID)"
237
+ },
238
+ FolderKey: { type: "string", description: "Folder key (UUID)" },
239
+ Runtime: {
240
+ type: "string",
241
+ description: "Serverless or Unattended"
242
+ },
243
+ AppType: { type: "string", description: "Custom or Dynamic" },
244
+ CreationTime: { type: "string" },
245
+ CreatorUserId: { type: "integer" },
246
+ CreatorUserKey: {
247
+ type: "string",
248
+ description: "Creator user key (UUID)"
249
+ }
250
+ }
251
+ },
252
+ TaskSlaDetails: {
253
+ type: "array",
254
+ description: "Task SLA details",
255
+ items: {
256
+ type: "object",
257
+ properties: {
258
+ ExpiryTime: {
259
+ type: "string",
260
+ description: "SLA expiry timestamp"
261
+ },
262
+ StartCriteria: {
263
+ type: "string",
264
+ description: "TaskCreated, TaskAssigned, or TaskCompleted"
265
+ },
266
+ EndCriteria: {
267
+ type: "string",
268
+ description: "TaskCreated, TaskAssigned, or TaskCompleted"
269
+ },
270
+ Status: {
271
+ type: "string",
272
+ description: "OverdueLater, OverdueSoon, Overdue, or CompletedInTime"
273
+ }
274
+ }
275
+ }
276
+ },
277
+ TaskSource: {
278
+ type: "object",
279
+ description: "Task source information",
280
+ properties: {
281
+ SourceName: {
282
+ type: "string",
283
+ description: "Agent, Workflow, Maestro, CaseManagement, or Default"
284
+ },
285
+ SourceId: { type: "string" },
286
+ JobId: { type: "string" }
287
+ }
288
+ }
289
+ }
290
+ };
291
+
292
+ // src/services/enrichment-service.ts
293
+ var TASK_TYPE_TO_INDEX = {
294
+ process: "processOrchestration",
295
+ agent: "agent",
296
+ rpa: "process",
297
+ "api-workflow": "api",
298
+ "case-management": "caseManagement",
299
+ action: "action-apps",
300
+ "flow-process": "flow"
301
+ };
302
+ function findProcessEntry(entries, id) {
303
+ return entries.find((e) => e.entityKey === id);
304
+ }
305
+ function findActionAppEntry(entries, id) {
306
+ return entries.find((e) => e.id === id);
307
+ }
308
+ function findCustomDataValue(parsed, name) {
309
+ const key = Object.keys(parsed).find((candidate) => candidate.toLowerCase() === name.toLowerCase());
310
+ return key === undefined ? undefined : parsed[key];
311
+ }
312
+ function parseCustomData(raw) {
313
+ const [parseError, parsed] = catchError(() => JSON.parse(raw));
314
+ if (parseError) {
315
+ throw new Error(`Failed to parse customData: ${parseError.message}`);
316
+ }
317
+ const customData = {
318
+ ProcessKey: findCustomDataValue(parsed, "ProcessKey"),
319
+ ProcessVersion: findCustomDataValue(parsed, "ProcessVersion"),
320
+ FeedId: findCustomDataValue(parsed, "FeedId")
321
+ };
322
+ if (!customData.ProcessKey || !customData.ProcessVersion || !customData.FeedId) {
323
+ throw new Error("customData is missing required fields: ProcessKey, ProcessVersion, FeedId" + ` (found: ${Object.keys(parsed).join(", ") || "no keys"})`);
324
+ }
325
+ return customData;
326
+ }
327
+ async function enrichProcessType(taskType, id) {
328
+ const indexType = TASK_TYPE_TO_INDEX[taskType];
329
+ const entries = await loadResourceIndex(indexType);
330
+ const entry = findProcessEntry(entries, id);
331
+ if (!entry) {
332
+ throw new Error(`No ${taskType} entry found with entityKey "${id}" in ${indexType}-index.json`);
333
+ }
334
+ const customData = parseCustomData(entry.customData);
335
+ const folderKey = entry.folders?.[0]?.key;
336
+ const params = {
337
+ processKey: customData.ProcessKey,
338
+ processVersion: customData.ProcessVersion,
339
+ feedId: customData.FeedId,
340
+ ...folderKey ? { folderKey } : {}
341
+ };
342
+ const entryPoints = await getEntryPointDetails(params);
343
+ if (entryPoints.length === 0) {
344
+ throw new Error(`No entry points returned for ${taskType} "${entry.name}" (key: ${customData.ProcessKey})`);
345
+ }
346
+ const ep = entryPoints[0];
347
+ const inputs = transformSchemaToVariables(ep.InputArguments, {
348
+ includeRequired: true
349
+ });
350
+ const outputs = transformSchemaToVariables(ep.OutputArguments);
351
+ return {
352
+ name: entry.name,
353
+ type: taskType,
354
+ folderPath: entry.folders?.[0]?.fullyQualifiedName ?? "",
355
+ inputs,
356
+ outputs
357
+ };
358
+ }
359
+ async function enrichActionType(id) {
360
+ const entries = await loadResourceIndex("action-apps");
361
+ const entry = findActionAppEntry(entries, id);
362
+ if (!entry) {
363
+ throw new Error(`No action entry found with id "${id}" in action-apps-index.json`);
364
+ }
365
+ const params = {
366
+ systemName: entry.systemName,
367
+ deployVersion: entry.deployVersion
368
+ };
369
+ const schema = await getActionSchema(params);
370
+ const inputVars = {
371
+ ...convertActionArgsToVariables(schema.inputs),
372
+ ...convertActionArgsToVariables(schema.inOuts)
373
+ };
374
+ const outputVars = {
375
+ ...convertActionArgsToVariables(schema.outputs),
376
+ ...convertActionArgsToVariables(schema.inOuts)
377
+ };
378
+ const outcomeVars = convertActionArgsToVariables(schema.outcomes);
379
+ const outcomeKeys = Object.keys(outcomeVars);
380
+ const actionType = outcomeKeys.length > 0 ? outcomeVars[outcomeKeys[0]].type : "string";
381
+ outputVars.Action = outcomeKeys.length > 0 ? {
382
+ type: actionType,
383
+ options: outcomeKeys.map((k) => ({ value: k, label: k }))
384
+ } : { type: actionType };
385
+ outputVars.hitlTask = HITL_TASK_OUTPUT_VARIABLE;
386
+ return {
387
+ name: entry.deploymentTitle,
388
+ type: "action",
389
+ folderPath: entry.deploymentFolder?.fullyQualifiedName ?? "",
390
+ inputs: inputVars,
391
+ outputs: outputVars
392
+ };
393
+ }
394
+ async function enrichTask(taskType, id, options) {
395
+ const result = taskType === "action" ? await enrichActionType(id) : await enrichProcessType(taskType, id);
396
+ const inputsList = mapEntryPointVariablesToInputOutput(result.inputs, false);
397
+ let outputsList = mapEntryPointVariablesToInputOutput(result.outputs, true);
398
+ if (taskType === "case-management") {
399
+ outputsList = [];
400
+ } else {
401
+ outputsList.push(buildErrorOutput());
402
+ }
403
+ const { inputsWithVars, outputsWithVars } = addVarIdsToInputsOutputs({
404
+ inputs: inputsList,
405
+ outputs: outputsList,
406
+ elementId: options?.elementId ?? ""
407
+ });
408
+ return {
409
+ name: result.name,
410
+ type: result.type,
411
+ folderPath: result.folderPath,
412
+ inputs: inputsWithVars,
413
+ outputs: outputsWithVars
414
+ };
415
+ }
416
+ export {
417
+ enrichTask,
418
+ parseCustomData
419
+ };
420
+
421
+ //# debugId=43D08822DEF9F55D64756E2164756E21