@uipath/case-tool 1.206.0-preview.303 → 1.207.0-preview.305

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 (150) hide show
  1. package/README.md +7 -90
  2. package/dist/THIRD-PARTY-NOTICES.md +162 -7
  3. package/dist/{authoring-wt5ngnjb.js → authoring-qqev46bh.js} +233 -63
  4. package/dist/{bindings-v2-x100hvcy.js → bindings-v2-wjgg92tj.js} +4 -4
  5. package/dist/{browser-strategy-627rrg7z.js → browser-strategy-qc6htsnf.js} +1 -1
  6. package/dist/{business-rule-export-pggs7x01.js → business-rule-export-0pbc3ysq.js} +2 -2
  7. package/dist/{carry-forward-gxsadrqb.js → carry-forward-tj5yrqf6.js} +6 -6
  8. package/dist/{case-api-a6v5beat.js → case-api-bfwmvkb8.js} +24 -28
  9. package/dist/{case-bindings-service-9zemt0r2.js → case-bindings-service-5r7c70kz.js} +5 -5
  10. package/dist/case-catalog-h4fjn6q3.js +304 -0
  11. package/dist/{case-debug-solution-projects-c300019s.js → case-debug-solution-projects-5tr4pwbs.js} +2 -2
  12. package/dist/{case-debug-studio-web-service-b6xe8es1.js → case-debug-studio-web-service-7smzvq4c.js} +10 -9
  13. package/dist/{case-described-io-service-8dw21x2y.js → case-described-io-service-ddsvkz8w.js} +5 -5
  14. package/dist/{case-event-trigger-bindings-pmad4dev.js → case-event-trigger-bindings-8nd78j4e.js} +5 -5
  15. package/dist/{case-format-service-xjvnx3jd.js → case-format-service-4mzszgfb.js} +2 -2
  16. package/dist/case-pack-service-bp7sh20v.js +297 -0
  17. package/dist/{case-splice-service-8deak994.js → case-splice-service-tpp2syvn.js} +7 -7
  18. package/dist/{case-validate-service-p324kcry.js → case-validate-service-fxvq4qx7.js} +146 -38
  19. package/dist/{connector-enrichment-service-9wnew5a0.js → connector-enrichment-service-x0w721wj.js} +26 -25
  20. package/dist/{connector-library-1yw5r47w.js → connector-library-844myxz2.js} +20 -6
  21. package/dist/{connector-lookup-service-v8r2htmg.js → connector-lookup-service-51pca3bf.js} +8 -8
  22. package/dist/{connector-task-shape-bgywpbqc.js → connector-task-shape-s2zny4gf.js} +3 -3
  23. package/dist/{de-AI7ML6JM-km47f8k4.js → de-B6IFKV43-9sk50xx0.js} +164 -2
  24. package/dist/{de-2BEKRUMY-x4dx0nn9.js → de-HF4GJ4EK-xrrajtht.js} +1277 -10
  25. package/dist/{debug-service-tm92ws5e.js → debug-service-hf2wb4tw.js} +9 -4
  26. package/dist/{en-LAVDF7IQ-yzy20n6d.js → en-5JIPZTS5-c68n8taw.js} +4 -2
  27. package/dist/{en-X6T4SP2Y-xm47mf18.js → en-ETY46SDS-far9tmsf.js} +66 -2
  28. package/dist/{enrichment-service-hzsn1aqp.js → enrichment-service-7f4sdff5.js} +17 -17
  29. package/dist/{es-SPNKTD5Y-vw5cbgv5.js → es-AQW6PFIU-q2mz247f.js} +164 -2
  30. package/dist/{es-7ZTQTGKN-11sj0yjx.js → es-IYP2OLUY-98xsbyd5.js} +1271 -10
  31. package/dist/{es-MX-IHGRIEWH-g63p0gb4.js → es-MX-D2MN3U37-0y5q0nbe.js} +1276 -10
  32. package/dist/{es-MX-7KJZPEQN-1fq0a9jr.js → es-MX-KWITVBWE-w49gknha.js} +164 -2
  33. package/dist/{fr-7ZDL4MVO-pd27vwh6.js → fr-NISALSPL-vzfmygd7.js} +1277 -10
  34. package/dist/{fr-AXJGUT53-hdg3pmd4.js → fr-RNWK2TMC-dpyzj366.js} +164 -2
  35. package/dist/{index-n1ndwwsz.js → index-2j5tfjwv.js} +129 -76
  36. package/dist/{index-kc1h1yf6.js → index-ezxmyhan.js} +4 -4
  37. package/dist/{index-j2gw61z0.js → index-gb75pv5a.js} +111 -65
  38. package/dist/index-prn518fr.js +36 -0
  39. package/dist/{index-nj3axvya.js → index-rk82650j.js} +7 -5
  40. package/dist/{index-pg9wmyrf.js → index-t6fnts8a.js} +2 -2
  41. package/dist/index-wkmh1h6w.js +26 -0
  42. package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
  43. package/dist/index.js +13 -11
  44. package/dist/init-entry-points-52kvvbg9.js +15 -0
  45. package/dist/input-reader-zr71xcm9.js +13 -0
  46. package/dist/integration-service-fetcher-bpbz1gcx.js +68 -0
  47. package/dist/{ja-C7GZV6YP-hvtbngr5.js → ja-DH4I3GEF-ywyhhppa.js} +164 -2
  48. package/dist/{ja-LGAM5HKR-sgrtjqjh.js → ja-HTS2Q4YG-4ahnq47y.js} +1277 -10
  49. package/dist/{known-types-gak9by1w.js → known-types-a5d0evdm.js} +2 -2
  50. package/dist/{ko-7B4SUZB7-c8wr20sc.js → ko-3JFGTMNY-qnf1bnef.js} +1271 -10
  51. package/dist/{ko-Q24HSSL4-5vn55pte.js → ko-R5BCWVO7-whzgmh6q.js} +164 -2
  52. package/dist/library-option-pbvkt66g.js +13 -0
  53. package/dist/{localSolutionDiscovery-9pj8mzye.js → localSolutionDiscovery-5sqz9dkr.js} +5 -5
  54. package/dist/manifest-rhee8kem.js +32 -0
  55. package/dist/{node-strategy-2mqzg36t.js → node-strategy-aaf2qe6c.js} +2 -2
  56. package/dist/{node-sync-service-7n5960qy.js → node-sync-service-q1a37d6n.js} +21 -15
  57. package/dist/{out-target-gtg3we44.js → out-target-02x6x6nk.js} +5 -5
  58. package/dist/{packager-tool-h2ar8xf8.js → packager-tool-00ck60cc.js} +25 -24
  59. package/dist/{packager-tool-rfdkx9c9.js → packager-tool-00qmds4s.js} +254 -69
  60. package/dist/{packager-tool-388vyja1.js → packager-tool-0gmnk7sb.js} +2 -2
  61. package/dist/{packager-tool-fcektt1g.js → packager-tool-0nbcqyvp.js} +10 -9
  62. package/dist/{packager-tool-anvg0etj.js → packager-tool-178xtejt.js} +191 -154
  63. package/dist/{packager-tool-j69tzg52.js → packager-tool-1dsedy7x.js} +59 -34
  64. package/dist/packager-tool-1yew22sn.js +9 -0
  65. package/dist/{packager-tool-1hpd2gmh.js → packager-tool-225b9qhq.js} +1 -1
  66. package/dist/{packager-tool-z4phaas7.js → packager-tool-2x40ye7a.js} +21 -7
  67. package/dist/{packager-tool-p0rdmmvk.js → packager-tool-2xemp3b1.js} +2 -2
  68. package/dist/packager-tool-34ttsx9q.js +18 -0
  69. package/dist/{packager-tool-3zy717ga.js → packager-tool-36vkdb3h.js} +2 -2
  70. package/dist/{packager-tool-7hcpmn4g.js → packager-tool-380ac64s.js} +61 -11
  71. package/dist/{packager-tool-cqkbf2fg.js → packager-tool-3hzsw5r7.js} +906 -41
  72. package/dist/packager-tool-3k5j706w.js +73 -0
  73. package/dist/{packager-tool-scy94jyb.js → packager-tool-4seehsme.js} +2 -72
  74. package/dist/{packager-tool-es77jvky.js → packager-tool-4w7nzx18.js} +360 -44
  75. package/dist/{packager-tool-4avchhz8.js → packager-tool-57970zfm.js} +12 -7
  76. package/dist/{packager-tool-bjt8b2nz.js → packager-tool-5s476jdt.js} +13 -13
  77. package/dist/{packager-tool-0xj79bbd.js → packager-tool-8kcwawyg.js} +13 -4
  78. package/dist/{packager-tool-wy3a65rx.js → packager-tool-bw4fsdq4.js} +27 -13
  79. package/dist/{packager-tool-dn9d4ywm.js → packager-tool-c0pavv0s.js} +66 -10
  80. package/dist/packager-tool-c9h0rwgv.js +31 -0
  81. package/dist/{packager-tool-t8qx6hvn.js → packager-tool-dv2vtyg0.js} +4 -4
  82. package/dist/{packager-tool-3r23qsca.js → packager-tool-ef43cy32.js} +213 -231
  83. package/dist/{packager-tool-m4kp6a7j.js → packager-tool-ej14cxen.js} +22 -22
  84. package/dist/{packager-tool-5w0gjcck.js → packager-tool-engs9gvj.js} +1 -1
  85. package/dist/{packager-tool-stdwmgvd.js → packager-tool-exrjwmew.js} +202 -83
  86. package/dist/{task-type-declaration-yhczvj05.js → packager-tool-f9n5mk1c.js} +8 -12
  87. package/dist/{packager-tool-b2q8m9pq.js → packager-tool-fspmvh6g.js} +5 -4
  88. package/dist/packager-tool-geh2qybm.js +179 -0
  89. package/dist/{packager-tool-17b466mr.js → packager-tool-hrd44w8g.js} +7561 -6408
  90. package/dist/{packager-tool-snesn0bt.js → packager-tool-j1etnthk.js} +19 -14
  91. package/dist/{packager-tool-k871wgpe.js → packager-tool-j53d4vv1.js} +18 -4
  92. package/dist/{packager-tool-6ewsbrnb.js → packager-tool-j8mnpsv8.js} +329 -149
  93. package/dist/{packager-tool-7x1tmb8a.js → packager-tool-jydreskq.js} +1 -1
  94. package/dist/{packager-tool-r5pha7xq.js → packager-tool-k08k9g2y.js} +9 -9
  95. package/dist/{packager-tool-bg3tdpva.js → packager-tool-kh9gs4d5.js} +4 -2
  96. package/dist/{packager-tool-8467kcz9.js → packager-tool-m7s4n455.js} +120 -13
  97. package/dist/{packager-tool-q26hncjr.js → packager-tool-n3r5apbb.js} +4 -2
  98. package/dist/packager-tool-n6h4bz4d.js +22 -0
  99. package/dist/{packager-tool-ad8v11jd.js → packager-tool-p4c1g2sj.js} +1032 -819
  100. package/dist/{packager-tool-z070caqq.js → packager-tool-p64w2wrt.js} +30 -8
  101. package/dist/{packager-tool-xd1wbvay.js → packager-tool-pq61r2f1.js} +1 -1
  102. package/dist/{packager-tool-65vr263d.js → packager-tool-qzyb1eac.js} +1 -1
  103. package/dist/{packager-tool-5dptce1y.js → packager-tool-rzxnm9yj.js} +2 -2
  104. package/dist/{init-entry-points-5xzn81bb.js → packager-tool-t6xwkhht.js} +12 -10
  105. package/dist/packager-tool-vmfd007q.js +27 -0
  106. package/dist/packager-tool-wvf6b31h.js +50 -0
  107. package/dist/{packager-tool-cdvrca04.js → packager-tool-x9z4krtr.js} +1036 -259
  108. package/dist/{packager-tool-z1fw9a8v.js → packager-tool-y69796fy.js} +19 -11
  109. package/dist/{packager-tool-jkwpw95j.js → packager-tool-z13dp55w.js} +3393 -3092
  110. package/dist/{packager-tool-9m7jbv7t.js → packager-tool-zbfwp75m.js} +4 -4
  111. package/dist/{packager-tool-pq9xv4vq.js → packager-tool-zte9svtn.js} +11 -4
  112. package/dist/packager-tool.js +2 -2
  113. package/dist/{prepare-uip-ad7mfs8t.js → prepare-uip-2hcb65bn.js} +39 -6
  114. package/dist/{project-artifacts-pfcn65cg.js → project-artifacts-77yctm8b.js} +1 -1
  115. package/dist/{pt-BR-BIUJXIPU-2sqzhr8y.js → pt-BR-6TBBEDQS-y3f2vg5d.js} +164 -2
  116. package/dist/{pt-BR-PHLFHMXZ-n6de4s7z.js → pt-BR-7H7BP5DT-z2e5aaj1.js} +1276 -10
  117. package/dist/{pt-N7ZTJT4W-d6c67xcn.js → pt-QWGSZKMD-m50nrkx8.js} +1271 -10
  118. package/dist/{pt-MHX6JGAX-xfgvdqwg.js → pt-ZSQC5RZ3-8kp3g1z5.js} +164 -2
  119. package/dist/{resolved-check-dz8eqrf6.js → resolved-check-kwgy875v.js} +1 -1
  120. package/dist/{resourcesSyncService-y5r4k43w.js → resourcesSyncService-gegbd8b8.js} +49 -26
  121. package/dist/{ro-FLNXVYJI-ytrwabg2.js → ro-B7G474JK-9k2jjk88.js} +1271 -10
  122. package/dist/{ro-3RKJNGJZ-xqj14e3d.js → ro-P33AQ6ZL-s92z1mgg.js} +164 -2
  123. package/dist/{rule-type-declaration-ze0saj5r.js → rule-type-declaration-a0fk7fe7.js} +12 -11
  124. package/dist/{sdd-convert-service-m8e615a1.js → sdd-convert-service-2ag3xjpj.js} +120 -621
  125. package/dist/{sdd-lookup-fwj6x364.js → sdd-lookup-wgm5ctnd.js} +2 -2
  126. package/dist/{sdd-resolve-service-dvg387wx.js → sdd-resolve-service-epygyb0n.js} +34 -6
  127. package/dist/{sdd-resolve-siblings-xsm2ktkq.js → sdd-resolve-siblings-qz7gwws5.js} +4 -4
  128. package/dist/solution-auth-yb1twb9d.js +11 -0
  129. package/dist/{solution-discovery-gfdqhgt2.js → solution-discovery-t0nkzpm3.js} +4 -4
  130. package/dist/{strict-case-rules-045kbjvv.js → strict-case-rules-x1sytx3e.js} +91 -46
  131. package/dist/{strict-entry-points-wd85a81g.js → strict-entry-points-anxeg692.js} +6 -6
  132. package/dist/strict-sdd-audit-z1bg2zr0.js +28 -0
  133. package/dist/taggable-variables-gc58xb0s.js +6094 -0
  134. package/dist/task-type-declaration-b0ejzhc6.js +15 -0
  135. package/dist/tool.js +13 -11
  136. package/dist/{tr-7AIZZWZ6-pdzp9n0p.js → tr-FX7WCKK2-x3rx9fjt.js} +1271 -10
  137. package/dist/{tr-PQLUUHPC-qsb7btxn.js → tr-XD73CQAA-tb2nrpyp.js} +164 -2
  138. package/dist/{trigger-enrichment-service-dzkht78s.js → trigger-enrichment-service-bsj58ppa.js} +33 -32
  139. package/dist/{trigger-entry-point-id-4j9rk3kp.js → trigger-entry-point-id-hre2ewts.js} +1 -1
  140. package/dist/{zh-CN-OHNTHZRI-b0hjkfqn.js → zh-CN-GWP3B2EM-c07fm17a.js} +164 -2
  141. package/dist/{zh-CN-CN2ARPFS-e0p2qrxf.js → zh-CN-NCMB6YM5-drw9bnxg.js} +1271 -10
  142. package/dist/{zh-TW-E4D3Y6ZR-tn3bmzz5.js → zh-TW-2DLUOA7C-9khqnr4r.js} +164 -2
  143. package/dist/{zh-TW-7RUFEVFK-qd7myw31.js → zh-TW-UNIEJPLE-4vxzbphe.js} +1272 -11
  144. package/package.json +2 -2
  145. package/dist/case-pack-service-adhg30nq.js +0 -167
  146. package/dist/index-garh9kcd.js +0 -35
  147. package/dist/input-reader-pjt4a914.js +0 -10
  148. package/dist/packager-tool-v11fx4dk.js +0 -25
  149. package/dist/solution-auth-a1p22hq1.js +0 -11
  150. package/dist/strict-sdd-audit-6es2j6fs.js +0 -26
@@ -3,7 +3,7 @@ import"./packager-tool-yh8mmj3p.js";
3
3
  import {
4
4
  withoutTrailingSlug,
5
5
  namedValue
6
- } from "./packager-tool-fcektt1g.js";
6
+ } from "./packager-tool-0nbcqyvp.js";
7
7
  import {
8
8
  emitBusinessEvents,
9
9
  connectorInputs,
@@ -12,7 +12,7 @@ import {
12
12
  entryConditionFor,
13
13
  caseExitRuleFor,
14
14
  exitConditionFor
15
- } from "./packager-tool-r5pha7xq.js";
15
+ } from "./packager-tool-k08k9g2y.js";
16
16
  import {
17
17
  markDeferredOutputs,
18
18
  expandXrefs,
@@ -27,12 +27,12 @@ import {
27
27
  customOutputFor,
28
28
  canonicalExpression,
29
29
  inputsFor
30
- } from "./packager-tool-stdwmgvd.js";
31
- import"./packager-tool-z070caqq.js";
30
+ } from "./packager-tool-exrjwmew.js";
31
+ import"./packager-tool-p64w2wrt.js";
32
32
  import {
33
33
  catchError2
34
- } from "./packager-tool-6ewsbrnb.js";
35
- import"./packager-tool-h2ar8xf8.js";
34
+ } from "./packager-tool-j8mnpsv8.js";
35
+ import"./packager-tool-00ck60cc.js";
36
36
  import {
37
37
  NAME_BOUND_TASK_TYPES,
38
38
  BINDING_REFERENCE_PREFIX
@@ -40,35 +40,43 @@ import {
40
40
  import"./packager-tool-mk9fmzdy.js";
41
41
  import {
42
42
  CONNECTOR_CALL_TASK_TYPES
43
- } from "./packager-tool-7x1tmb8a.js";
43
+ } from "./packager-tool-jydreskq.js";
44
44
  import {
45
+ payloadOutputName,
45
46
  hasFixedOutputs,
46
47
  fixedOutputName,
47
- ERROR_OUTPUT_SCHEMA,
48
48
  FILE_TYPE_JSON_SCHEMA,
49
49
  BUSINESS_RULE_TASK_VERSION
50
- } from "./packager-tool-wy3a65rx.js";
50
+ } from "./packager-tool-bw4fsdq4.js";
51
+ import"./packager-tool-4seehsme.js";
51
52
  import {
52
53
  SDD_TASK_TYPES,
53
54
  UNAUTHORABLE_TASK_TYPES,
54
55
  bindingPairFor
55
- } from "./packager-tool-b2q8m9pq.js";
56
+ } from "./packager-tool-fspmvh6g.js";
56
57
  import {
57
58
  CASE_SLA_PROPERTY,
58
59
  VARIABLE_PLACEMENT2,
59
- DEFAULT_GROUP2
60
- } from "./packager-tool-cqkbf2fg.js";
60
+ DEFAULT_GROUP2,
61
+ documentExtractionData,
62
+ httpRequestData,
63
+ scriptData,
64
+ fixedOutputsFor
65
+ } from "./packager-tool-3hzsw5r7.js";
61
66
  import {
62
67
  gateKey,
63
68
  canonicalVariableType
64
69
  } from "./packager-tool-hcdnc420.js";
70
+ import {
71
+ NOT_TASK_TYPES2
72
+ } from "./packager-tool-f9n5mk1c.js";
65
73
  import {
66
74
  designerShapeConnectorTasks2
67
- } from "./packager-tool-xd1wbvay.js";
75
+ } from "./packager-tool-pq61r2f1.js";
68
76
  import {
69
77
  caseRolesFor,
70
78
  emitCanvasNotes
71
- } from "./packager-tool-388vyja1.js";
79
+ } from "./packager-tool-0gmnk7sb.js";
72
80
  import {
73
81
  buildElementId,
74
82
  stageSpellings,
@@ -76,10 +84,9 @@ import {
76
84
  modelKey,
77
85
  everySpelling,
78
86
  claim,
79
- dedupedId,
80
87
  claimOutput,
81
88
  scopedSlaKey
82
- } from "./packager-tool-5w0gjcck.js";
89
+ } from "./packager-tool-engs9gvj.js";
83
90
  import {
84
91
  buildMinimalCaseDocument
85
92
  } from "./packager-tool-j6nfje7t.js";
@@ -419,6 +426,19 @@ var jsonSchemaBody = (name, type, model, unresolved) => {
419
426
  };
420
427
  var caseVariablesFor = (model, triggers = [], unresolved = []) => {
421
428
  const buckets = { inputs: [], outputs: [], inputOutputs: [], bridges: new Map };
429
+ const ignored = model.ignoredVariableRows ?? [];
430
+ const unnamed = model.unnamedVariableRows ?? 0;
431
+ if (ignored.length + unnamed > 0) {
432
+ const rows = [
433
+ ...ignored,
434
+ ...unnamed > 0 ? [`${unnamed} with no Name`] : []
435
+ ];
436
+ unresolved.push({
437
+ kind: "variable-table",
438
+ where: "variables",
439
+ detail: `only the first table under \`### Case Variables\` declares variables — ${ignored.length + unnamed} row(s) are not read (${rows.join(", ")}), so none of them reaches the plan and any task output that writes one has no type. Move the rows into the first table and convert again`
440
+ });
441
+ }
422
442
  const categorised = model.variables.filter((name) => model.variableCategories[modelKey(name)] !== undefined).length;
423
443
  if (model.variables.length > 0 && categorised === 0) {
424
444
  unresolved.push({
@@ -704,598 +724,6 @@ var finishCaseDocument = (document, model, index, unresolved) => {
704
724
  }
705
725
  return { conditionCount };
706
726
  };
707
- // src/services/sdd-convert/document-extraction-output-schema.json
708
- var document_extraction_output_schema_default = {
709
- $schema: "http://json-schema.org/draft-07/schema#",
710
- type: "object",
711
- properties: {
712
- ExtractionResult: {
713
- type: "object",
714
- properties: {
715
- DocumentId: {
716
- type: "string"
717
- },
718
- ResultsVersion: {
719
- type: "integer"
720
- },
721
- ResultsDocument: {
722
- type: "object",
723
- properties: {
724
- Bounds: {
725
- type: "object",
726
- properties: {
727
- PageCount: {
728
- type: "integer"
729
- },
730
- PageRange: {
731
- type: "string"
732
- }
733
- }
734
- },
735
- Language: {
736
- type: "string"
737
- },
738
- DocumentGroup: {
739
- type: "string"
740
- },
741
- DocumentCategory: {
742
- type: "string"
743
- },
744
- DocumentTypeId: {
745
- type: "string"
746
- },
747
- DocumentTypeName: {
748
- type: "string"
749
- },
750
- Fields: {
751
- type: "array",
752
- items: {
753
- type: "object",
754
- properties: {
755
- FieldId: {
756
- type: "string"
757
- },
758
- FieldName: {
759
- type: "string"
760
- },
761
- FieldType: {
762
- type: "string"
763
- },
764
- Value: {
765
- type: "string"
766
- },
767
- UnformattedValue: {
768
- type: "string"
769
- },
770
- Confidence: {
771
- type: "number"
772
- },
773
- IsMissing: {
774
- type: "boolean"
775
- }
776
- }
777
- }
778
- },
779
- Tables: {
780
- type: "array",
781
- items: {
782
- type: "object"
783
- }
784
- }
785
- }
786
- },
787
- ExtractorPayloads: {
788
- type: "object"
789
- },
790
- BusinessrulesResults: {
791
- type: "array",
792
- items: {
793
- type: "object"
794
- }
795
- }
796
- }
797
- },
798
- Taxonomy: {
799
- type: "object",
800
- properties: {
801
- DataContractVersion: {
802
- type: "string"
803
- },
804
- DocumentTypes: {
805
- type: "array",
806
- items: {
807
- type: "object",
808
- properties: {
809
- DocumentTypeId: {
810
- type: "string"
811
- },
812
- Group: {
813
- type: "string"
814
- },
815
- Category: {
816
- type: "string"
817
- },
818
- Name: {
819
- type: "string"
820
- },
821
- OptionalUniqueIdentifier: {
822
- type: "string"
823
- },
824
- TypeField: {
825
- type: "object"
826
- },
827
- Fields: {
828
- type: "array",
829
- items: {
830
- type: "object"
831
- }
832
- }
833
- }
834
- }
835
- }
836
- }
837
- }
838
- }
839
- };
840
-
841
- // src/services/sdd-convert/document-extraction.ts
842
- var DOCUMENT_EXTRACTION_SERVICE_TYPE = "IXP.Extraction";
843
- var DATA_NAME = "Document extraction";
844
- var documentExtractionOutputs = (elementId, taken, reserved = new Set) => {
845
- const mint = (base) => {
846
- const id = dedupedId(base, new Set([...taken, ...reserved]));
847
- taken.add(id);
848
- return id;
849
- };
850
- const row = (name, displayName, source, schema) => {
851
- const id = mint(name);
852
- return {
853
- name,
854
- displayName,
855
- type: "jsonSchema",
856
- source,
857
- _jsonSchema: structuredClone(schema),
858
- id,
859
- var: id,
860
- value: id,
861
- elementId,
862
- body: structuredClone(schema)
863
- };
864
- };
865
- return [
866
- row("output", "Output", "=result", document_extraction_output_schema_default),
867
- row("error", "Error", "=Error", ERROR_OUTPUT_SCHEMA)
868
- ];
869
- };
870
- var INPUTS = [
871
- { name: "fileRef", displayName: "File", type: "file", required: true },
872
- { name: "pageRange", displayName: "Page range", type: "string" }
873
- ];
874
- var spelling = (name) => name.toLowerCase().replace(/[^a-z]/g, "");
875
- var deploymentBinding = (deployment, resourceKey, bindings) => {
876
- const found = bindings.find((one) => one.resource === "ixpDeployment" && one.default === deployment && (one.resourceKey ?? null) === resourceKey);
877
- if (found !== undefined)
878
- return String(found.id);
879
- const ordinal = bindings.filter((one) => one.resource === "ixpDeployment").length + 1;
880
- const id = `bIxp${ordinal}`;
881
- bindings.push({
882
- id,
883
- name: "name",
884
- type: "string",
885
- resource: "ixpDeployment",
886
- ...resourceKey !== null && { resourceKey },
887
- default: deployment,
888
- propertyAttribute: "name"
889
- });
890
- return id;
891
- };
892
- var documentExtractionData = (extraction, authored, outputs, context) => {
893
- const { elementId, where, unresolved } = context;
894
- const say = (detail) => {
895
- unresolved.push({ kind: "resource-binding", where, detail });
896
- };
897
- const deployment = namedValue(extraction?.deployment);
898
- const modelName = namedValue(extraction?.modelName);
899
- const deploymentKey = namedValue(extraction?.deploymentKey);
900
- const folderKey = namedValue(extraction?.folderKey);
901
- const folderName = namedValue(context.folderName);
902
- if (deployment === "") {
903
- say("this `document-extraction` task names no `**IXP Deployment:**`, so nothing binds the deployment it runs; write the deployment's name as the solution lists it");
904
- }
905
- if (deploymentKey === "") {
906
- say(`this \`document-extraction\` task states no \`**Deployment Key:**\`, the key of the IXP deployment's solution resource; \`uip solution resources add --source remote --kind IxpDeployment --name "${deployment === "" ? "<deployment-name>" : deployment}"\` adds it to the solution and returns it as \`Key\`, and \`uip solution resources list --kind IxpDeployment --source remote\` looks it up without changing anything`);
907
- }
908
- if (modelName === "") {
909
- say("this `document-extraction` task states no `**Model Name:**`, the deployment's DeploymentName; `uip ixp deployments list <project-name>` gives it (with DeploymentTitle, the `**IXP Deployment:**`, and FolderKey), and `uip ixp projects list` names the project");
910
- }
911
- if (folderKey === "" || folderName === "") {
912
- say(`this \`document-extraction\` task states no ${folderName === "" ? "`**Folder Path:**`" : "`**Folder Key:**`"}${folderKey === "" && folderName === "" ? " or `**Folder Key:**`" : ""} for the folder the deployment is deployed to; \`uip ixp deployments list <project-name>\` gives its FolderKey, and \`uip or folders list\` its path`);
913
- }
914
- const byName = new Map(authored.map((row) => [spelling(String(row.name ?? "")), row]));
915
- const inputs = INPUTS.map((slot) => {
916
- const row = byName.get(spelling(slot.name)) ?? byName.get(spelling(slot.displayName));
917
- const id = prefixedId("v", 8);
918
- return {
919
- name: slot.name,
920
- displayName: slot.displayName,
921
- type: slot.type,
922
- value: row === undefined ? "" : String(row.value ?? ""),
923
- ...slot.required === true && { required: true },
924
- id,
925
- var: id,
926
- elementId
927
- };
928
- });
929
- const known = new Set(INPUTS.flatMap((slot) => [
930
- spelling(slot.name),
931
- spelling(slot.displayName)
932
- ]));
933
- for (const row of authored) {
934
- const name = String(row.name ?? "");
935
- if (!known.has(spelling(name))) {
936
- unresolved.push({
937
- kind: "task-io-table",
938
- where,
939
- detail: `a \`document-extraction\` task takes only \`fileRef\` (File) and \`pageRange\` (Page range), so the Inputs row "${name}" is not written`
940
- });
941
- }
942
- }
943
- if (inputs[0].value === "") {
944
- unresolved.push({
945
- kind: "task-io-table",
946
- where,
947
- detail: "this `document-extraction` task's `fileRef` input is empty, so it has no file to extract from; add an Inputs row `fileRef` reading the file, such as `=vars.invoiceFile`"
948
- });
949
- }
950
- const resourceKey = deploymentKey === "" ? null : deploymentKey;
951
- const nameValue = deployment === "" ? "" : `${BINDING_REFERENCE_PREFIX}${deploymentBinding(deployment, resourceKey, context.bindings)}`;
952
- const entry = (name, value) => ({
953
- name,
954
- type: "string",
955
- value
956
- });
957
- return {
958
- name: DATA_NAME,
959
- serviceType: DOCUMENT_EXTRACTION_SERVICE_TYPE,
960
- context: [
961
- entry("solutionResourceKey", resourceKey),
962
- entry("name", nameValue),
963
- entry("folderKey", folderKey === "" ? null : folderKey),
964
- entry("folderName", folderName === "" ? null : folderName),
965
- entry("modelName", modelName === "" ? null : modelName),
966
- entry("modelDisplayName", deployment === "" ? null : deployment),
967
- entry("digitizationMode", "fileUpload")
968
- ],
969
- inputs,
970
- outputs,
971
- version: "v2"
972
- };
973
- };
974
- // src/services/sdd-convert/http-request-metadata.json
975
- var http_request_metadata_default = {
976
- activityPropertyConfiguration: {
977
- configuration: '=jsonString:{"essentialConfiguration":{"connectorVersion":"1.5.3","scriptRef":null,"customFieldsRequestDetails":null,"instanceParameters":{"connectorKey":"uipath-uipath-http","objectName":"http-request","httpMethod":"POST","activityType":"Curated","version":"1.0.0","supportsStreaming":false,"subType":"method"},"objectName":"http-request","operation":"create","packageVersion":"1.0.0","httpMethod":"POST","path":"/http-request","unifiedTypesCompatible":true,"savedJitInputFieldId":"in_http-request"},"optionalConfiguration":{"_textBlocks":[{"name":"contentTypeNotice","text":"The content-type header must be application/json.","position":"above"}],"objectActions":[],"connectorName":"HTTP","agentIdentity":null,"maxPageSize":100,"jobArguments":null,"isAutopilotInvalidConfig":false,"additionalHeaders":null,"cachedLookupValues":[],"cachedBrowserItems":[],"cachedPropertyMappings":[],"primaryKeys":[],"objectDisplayName":"HTTP Request","eventMode":null,"eventOperation":null,"hasBreakingChanges":false,"fieldsContainer":{"outputTypeDefinition":"{\\"body\\":object;\\"code\\":number;\\"method\\":string;\\"rawStringBody\\":string;\\"request\\":{\\"headers\\":object;\\"methodType\\":string;\\"query\\":object;\\"type\\":string;\\"url\\":string}}","outputJsonSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"method":{"title":"Method","type":"string","description":"Specifies the HTTP method to be used for the request."},"body":{"title":"Body","$ref":"#/definitions/body"},"code":{"title":"Code","type":"integer","description":"The Code"},"rawStringBody":{"title":"Raw body","type":"string","description":"The Raw string body"},"request":{"title":"Request","$ref":"#/definitions/request"}},"definitions":{"body":{"type":"object","properties":{}},"request":{"type":"object","properties":{"type":{"title":"Request type","type":"string","description":"The Request type"},"url":{"title":"Request url","type":"string","description":"The Request url"},"methodType":{"title":"Method","type":"string","description":"The Request method type"}}}}},"hasFileOutput":false,"populateOutputFields":true,"inputFields":[{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"authentication","name":"authentication","displayName":"Authentication","description":"Authentication","type":"string","sortOrder":1,"defaultValue":"manual","primaryKey":false,"enum":[{"name":"Manual authentication","value":"manual","description":"Provide authentication details directly in the request"},{"name":"Connector based authentication","value":"connector","description":"Use authentication details from a configured connector"}],"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"showMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]},{"actionType":"clearMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]}],"textBlocks":[{"name":"contentTypeNotice","text":"The content-type header must be application/json.","position":"above"}],"validation":false},"fieldActions":[{"actionType":"showMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]},{"actionType":"clearMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"targetConnector","name":"targetConnector","displayName":"Connector","description":"Select a connector","type":"string","sortOrder":2,"primaryKey":false,"lookup":{"objectName":"connectors","lookupNames":["name"],"lookupValue":"key","path":"/Connectors?hasHttpRequest=true","orderBy":"NONE","defaultLookupValues":[{"name":"HTTP","key":"uipath-uipath-http","priority":1,"isDefault":true,"description":"UiPath HTTP connector for general API requests"}]},"design":{"component":"Connectors","loadByDefault":true,"isMultiSelect":false,"enableUserOverride":false,"displayPattern":"{name}","isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]}],"position":"primary","solutionResourceKind":"connector","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"connection","name":"connection","displayName":"Connection","description":"Connections","type":"string","sortOrder":3,"primaryKey":false,"design":{"component":"Connections","loadByDefault":true,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","refFieldValues":["*"],"isCleared":true,"isVariable":false}]}],"position":"primary","solutionResourceKind":"connection","validation":false},"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","refFieldValues":["*"],"isCleared":true,"isVariable":false}]},{"rules":[{"refFieldName":"targetConnector","refFieldValues":["*"],"isCleared":false,"isConstantValue":false,"isWorkflowExpression":false}],"actionType":"grabValue","groupNames":[],"messages":null}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"method","name":"method","displayName":"Method","description":"Specifies the HTTP method to be used for the request.","type":"string","sortOrder":4,"defaultValue":"GET","primaryKey":false,"enum":[{"name":"GET","value":"GET"},{"name":"POST","value":"POST"},{"name":"PUT","value":"PUT"},{"name":"PATCH","value":"PATCH"},{"name":"DELETE","value":"DELETE"},{"name":"OPTIONS","value":"OPTIONS"},{"name":"HEAD","value":"HEAD"}],"design":{"loadByDefault":true,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"position":"primary","validation":false},"fieldActions":null,"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":true,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"url","name":"url","displayName":"URL","description":"The web address where the HTTP request is sent.","type":"string","sortOrder":5,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"path","name":"path","displayName":"Path","description":"The endpoint path for the REST API request.","type":"string","sortOrder":5,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"headers","name":"headers","displayName":"Headers","description":"Headers","type":"object","sortOrder":6,"primaryKey":false,"design":{"component":"Dictionary","loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"position":"primary","dictionaryWidget":{"windowTitle":"","windowDescription":"","columnKeyTitle":"","columnKeyDescription":"","columnKeyHint":"","columnValueTitle":"","columnValueDescription":"","columnValueHint":""},"validation":false},"fieldActions":null,"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":true,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"query","name":"query","displayName":"Query parameters","description":"Query parameters","type":"object","sortOrder":7,"primaryKey":false,"design":{"component":"Dictionary","loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"position":"primary","dictionaryWidget":{"windowTitle":"","windowDescription":"","columnKeyTitle":"","columnKeyDescription":"","columnKeyHint":"","columnValueTitle":"","columnValueDescription":"","columnValueHint":""},"validation":false},"fieldActions":null,"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":true,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"requestBodyType","name":"requestBodyType","displayName":"Request body type","description":"Determines how the request body is encoded. Available for manual authentication only; connector-based requests remain JSON.","type":"string","sortOrder":8,"defaultValue":"raw","primaryKey":false,"enum":[{"name":"Raw","value":"raw","description":"Send the body as-is using the Content-Type header (e.g. JSON, XML, plain text)."},{"name":"Multipart form data","value":"multipartFormData","description":"Send one or more form-data parts encoded as multipart/form-data."}],"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"body","name":"body","displayName":"Body","description":"Contains the data to be sent with the HTTP request.","type":"object","sortOrder":9,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":true,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"multipartFormData","name":"multipartFormData","displayName":"Form data parts","description":"Multipart form-data parts. Provide a list of parts; each part is an object with \'name\' (required), \'value\' (required), and optional \'filename\', \'contentType\' and \'encoding\'. A value that is an attachment reference is sent as a file; set encoding to \'base64\' to send a base64 string as bytes; objects are sent as JSON.","type":"object","sortOrder":10,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null}],"outputFields":[{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"http-request","name":"http-request","displayName":"HTTP Request","description":"","type":"Generatedhttp-request","sortOrder":null,"format":null,"mask":null,"defaultValue":null,"primaryKey":false,"lookup":null,"enum":null,"design":null,"fieldActions":null,"searchable":false,"searchableOperators":null,"searchableNames":null,"searchableJoins":null,"required":false,"request":false,"response":true,"responseCurated":false,"fieldLocation":"output","onCanvas":null,"isJitField":true,"isFieldActionParent":false,"isMainResponseField":true,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null}],"jitTypeNeedsRefresh":false,"jitInputField":{"typeScriptDefinition":"{\\"authentication\\":string;\\"body\\":object;\\"connection\\":string;\\"headers\\":object;\\"method\\":string;\\"multipartFormData\\":object;\\"path\\":string;\\"query\\":object;\\"requestBodyType\\":string;\\"targetConnector\\":string;\\"url\\":string}","useUrlInput":false,"resolvedUrl":null,"id":"in_http-request","name":"http-request","displayName":"HTTP Request","description":"HTTP Request input object","type":"Generatedhttp-request","sortOrder":null,"format":null,"mask":null,"defaultValue":"{\\n \\"authentication\\": null,\\n \\"body\\": null,\\n \\"connection\\": null,\\n \\"headers\\": null,\\n \\"method\\": null,\\n \\"multipartFormData\\": null,\\n \\"path\\": null,\\n \\"query\\": null,\\n \\"requestBodyType\\": null,\\n \\"targetConnector\\": null,\\n \\"url\\": null\\n}","primaryKey":false,"lookup":null,"enum":null,"design":null,"fieldActions":null,"searchable":false,"searchableOperators":null,"searchableNames":null,"searchableJoins":null,"required":true,"request":false,"response":false,"responseCurated":false,"fieldLocation":"jitObjectInput","onCanvas":null,"isJitField":true,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},"inputMode":null,"searchableFields":[],"hasUnifiedTypes":true,"jitTypeHash":null}}}',
978
- uiPathActivityTypeId: "5c4cc855-b42a-37e6-b910-de8588998fce",
979
- errorState: {
980
- issues: []
981
- }
982
- },
983
- activityMetadata: {
984
- activity: {
985
- isAppActivity: false,
986
- packageId: 196648,
987
- svgIconUrl: "icons/0dad78c9d04c245b126d8edb4c451aa8a0d395d34731cf5702441f6284c70ccc.svg",
988
- displayName: "HTTP Request",
989
- assemblyQualifiedName: "UiPath.IntegrationService.Activities.Runtime.Activities.ConnectorActivity, UiPath.IntegrationService.Activities.Runtime, Version=1.34.0.0, Culture=neutral, PublicKeyToken=null",
990
- description: "Use HTTP requests to interact with APIs via the selected connector and connection configuration.",
991
- category: "",
992
- activityColor: "#E56D5C",
993
- configuration: '{"connectorKey":"uipath-uipath-http","objectName":"http-request","httpMethod":"POST","activityType":"Curated","version":"1.0.0","supportsStreaming":false,"subType":"method"}',
994
- uiPathActivityTypeId: "5c4cc855-b42a-37e6-b910-de8588998fce",
995
- isExperimental: false,
996
- helpUrlTemplate: "https://docs.uipath.com/{0}/activities/other/latest/integration-service/uipath-uipath-http-HTTP-Request",
997
- isEnabled: true,
998
- targetPlatform: "CrossPlatform",
999
- isAdvanced: false,
1000
- isRestricted: false,
1001
- hasWpfOnlyDesigner: false,
1002
- tags: [
1003
- ""
1004
- ]
1005
- },
1006
- meta: {
1007
- packageName: "UiPath.IntegrationService.Activities",
1008
- packageVersion: "1.34.0-alpha.20261013.3",
1009
- activityColor: "#E56D5C",
1010
- packageCategoryDisplayName: "HTTP"
1011
- }
1012
- },
1013
- inputMetadata: {},
1014
- telemetryData: {
1015
- connectorKey: "uipath-uipath-http",
1016
- connectorName: "HTTP",
1017
- operationType: "create",
1018
- objectName: "http-request",
1019
- objectDisplayName: "HTTP Request",
1020
- primaryKeyName: ""
1021
- },
1022
- bindings: []
1023
- };
1024
-
1025
- // src/services/sdd-convert/http-request.ts
1026
- var HTTP_CONNECTOR_KEY = "uipath-uipath-http";
1027
- var OUTPUTS = [
1028
- {
1029
- name: "code",
1030
- displayName: "Response status code",
1031
- type: "number",
1032
- source: "=response.code"
1033
- },
1034
- {
1035
- name: "headers",
1036
- displayName: "Response headers",
1037
- type: "object",
1038
- source: "=response.headers"
1039
- },
1040
- {
1041
- name: "body",
1042
- displayName: "Response body",
1043
- type: "object",
1044
- source: "=response.body"
1045
- }
1046
- ];
1047
- var ERROR_SCHEMA = {
1048
- type: "object",
1049
- properties: {
1050
- code: { type: "string" },
1051
- message: { type: "string" },
1052
- detail: { type: "string" },
1053
- category: { type: "string" },
1054
- status: { type: "number" },
1055
- element: { type: "string" }
1056
- }
1057
- };
1058
- var httpRequestOutputs = (elementId, taken, reserved = new Set) => [
1059
- ...OUTPUTS.map((output) => {
1060
- const id = mint(String(output.name), taken, reserved);
1061
- return { ...output, var: id, value: id, id, elementId };
1062
- }),
1063
- (() => {
1064
- const id = mint("error", taken, reserved);
1065
- return {
1066
- name: "Error",
1067
- displayName: "Error",
1068
- type: "jsonSchema",
1069
- source: "=Error",
1070
- _jsonSchema: ERROR_SCHEMA,
1071
- id,
1072
- var: id,
1073
- value: id,
1074
- elementId,
1075
- body: ERROR_SCHEMA
1076
- };
1077
- })()
1078
- ];
1079
- var mint = (base, taken, reserved) => {
1080
- const id = dedupedId(base, new Set([...taken, ...reserved]));
1081
- taken.add(id);
1082
- return id;
1083
- };
1084
- var objectCell = (text) => {
1085
- if (text === undefined)
1086
- return {};
1087
- const [error, parsed] = catchError2(() => JSON.parse(text));
1088
- if (error)
1089
- return { error: "is not JSON" };
1090
- return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? { value: parsed } : { error: "is not a JSON object" };
1091
- };
1092
- var bodyValue = (text) => {
1093
- if (text.startsWith("="))
1094
- return { value: text };
1095
- const [error] = catchError2(() => JSON.parse(text));
1096
- return error ? { error: "is neither JSON nor an `=` expression" } : { value: `=js:( ${text})` };
1097
- };
1098
- var BODY_METHODS = new Set(["POST", "PUT", "PATCH"]);
1099
- var HTTP_METHODS = new Set([
1100
- "GET",
1101
- "POST",
1102
- "PUT",
1103
- "PATCH",
1104
- "DELETE",
1105
- "OPTIONS",
1106
- "HEAD"
1107
- ]);
1108
- var IMPLICIT = "ImplicitConnection";
1109
- var CONNECTION_BINDING_NAME = `${HTTP_CONNECTOR_KEY} connection`;
1110
- var binding = (id, rest) => ({
1111
- id,
1112
- name: CONNECTION_BINDING_NAME,
1113
- type: "string",
1114
- resource: "Connection",
1115
- ...rest
1116
- });
1117
- var implicitBinding = (bindings) => {
1118
- const found = bindings.find((one) => one.name === CONNECTION_BINDING_NAME && one.resourceKey === IMPLICIT);
1119
- if (found !== undefined)
1120
- return String(found.id);
1121
- const id = "bHttpImplicit";
1122
- bindings.push(binding(id, {
1123
- resourceKey: IMPLICIT,
1124
- default: IMPLICIT,
1125
- propertyAttribute: "ConnectionId"
1126
- }));
1127
- return id;
1128
- };
1129
- var connectionBindings = (connectionId, context) => {
1130
- const known = context.connections.get(`http:${connectionId}`);
1131
- const ordinal = context.connections.size + 1;
1132
- const connectionRef = known ?? `bHttpC${ordinal}`;
1133
- const folderRef = `${connectionRef}F`;
1134
- const connection = binding(connectionRef, {
1135
- resourceKey: connectionId,
1136
- default: connectionId,
1137
- propertyAttribute: "ConnectionId"
1138
- });
1139
- const folder = {
1140
- id: folderRef,
1141
- name: "FolderKey",
1142
- type: "string",
1143
- resource: "Connection",
1144
- resourceKey: connectionId,
1145
- propertyAttribute: "folderKey"
1146
- };
1147
- if (known === undefined) {
1148
- context.connections.set(`http:${connectionId}`, connectionRef);
1149
- context.bindings.push(connection, folder);
1150
- }
1151
- return { connection, folder };
1152
- };
1153
- var input = (name, elementId) => {
1154
- const id = prefixedId("v", 8);
1155
- return { name, type: "json", target: name, id, var: id, elementId };
1156
- };
1157
- var contextEntry = (name, value, type = "string") => ({
1158
- name,
1159
- value,
1160
- type
1161
- });
1162
- var httpRequestData = (http, connector, outputs, context) => {
1163
- const { where, unresolved, elementId } = context;
1164
- const expand = (value) => value.startsWith("=") ? expandXrefs(value, {
1165
- outputs: context.outputs,
1166
- where,
1167
- unresolved
1168
- }) : value;
1169
- const expandEntries = (object) => Object.fromEntries(Object.entries(object).map(([key, value]) => [
1170
- key,
1171
- typeof value === "string" ? expand(value) : value
1172
- ]));
1173
- const request = http ?? {};
1174
- const stated = (request.method ?? "").toUpperCase();
1175
- const method = HTTP_METHODS.has(stated) ? stated : "";
1176
- if (stated === "") {
1177
- unresolved.push({
1178
- kind: "connector-context",
1179
- where,
1180
- detail: "this `http-request` task states no `**Method:**`, so the request has none and the task cannot run until one is set"
1181
- });
1182
- } else if (method === "") {
1183
- unresolved.push({
1184
- kind: "connector-context",
1185
- where,
1186
- detail: `this \`http-request\` task's \`**Method:**\` is "${String(request.method)}", which is not one the activity offers (${[...HTTP_METHODS].join(", ")}), so the request has none and the task cannot run until one is set`
1187
- });
1188
- }
1189
- const targetConnector = typeof connector?.connectorKey === "string" && connector.connectorKey !== "" ? connector.connectorKey : undefined;
1190
- const connectionId = typeof connector?.connectionId === "string" ? connector.connectionId : undefined;
1191
- const connectorMode = targetConnector !== undefined && connectionId !== undefined;
1192
- if (targetConnector !== undefined && !connectorMode && (request.url ?? "") === "") {
1193
- unresolved.push({
1194
- kind: "connector-context",
1195
- where,
1196
- detail: "this `http-request` task runs as a manual request until a connection is set, and states no `**URL:**` to call"
1197
- });
1198
- }
1199
- if (targetConnector === undefined && (request.url ?? "") === "") {
1200
- unresolved.push({
1201
- kind: "connector-context",
1202
- where,
1203
- detail: "this `http-request` task names no connector, so it calls `**URL:**` directly, and it states none"
1204
- });
1205
- }
1206
- const body = {
1207
- authentication: connectorMode ? "connector" : "manual",
1208
- ...connectorMode && { targetConnector },
1209
- ...method !== "" && { method }
1210
- };
1211
- if (request.url !== undefined && request.url !== "") {
1212
- if (connectorMode)
1213
- body.path = expand(request.url);
1214
- else
1215
- body.url = expand(request.url);
1216
- }
1217
- for (const [key, cell] of [
1218
- ["headers", request.headers],
1219
- ["query", request.query]
1220
- ]) {
1221
- const read = objectCell(cell);
1222
- if (read.value !== undefined)
1223
- body[key] = expandEntries(read.value);
1224
- if (read.error !== undefined) {
1225
- unresolved.push({
1226
- kind: "connector-context",
1227
- where,
1228
- detail: `this \`http-request\` task's \`**${key === "headers" ? "Headers" : "Query"}:**\` ${read.error}, so it is left out; write it as a JSON object such as \`{"Name": "value"}\``
1229
- });
1230
- }
1231
- }
1232
- if (request.body !== undefined && request.body !== "") {
1233
- const read = bodyValue(request.body);
1234
- if (method !== "" && !BODY_METHODS.has(method)) {
1235
- unresolved.push({
1236
- kind: "connector-context",
1237
- where,
1238
- detail: `this \`http-request\` task's method is ${method}, which carries no body, so its \`**Body:**\` is left out; use POST, PUT or PATCH to send one`
1239
- });
1240
- } else if (read.value !== undefined) {
1241
- if (!connectorMode)
1242
- body.requestBodyType = "raw";
1243
- body.body = expand(read.value);
1244
- } else {
1245
- unresolved.push({
1246
- kind: "connector-context",
1247
- where,
1248
- detail: `this \`http-request\` task's \`**Body:**\` ${String(read.error)}, so it is left out; write a JSON literal such as \`{"name": "value"}\`, or an \`=\` expression`
1249
- });
1250
- }
1251
- }
1252
- let connectionValue;
1253
- let resourceKey = null;
1254
- let folderKey = null;
1255
- const taskBindings = [];
1256
- if (connectorMode && connectionId !== undefined) {
1257
- const pair = connectionBindings(connectionId, context);
1258
- connectionValue = `${BINDING_REFERENCE_PREFIX}${String(pair.connection.id)}`;
1259
- resourceKey = connectionId;
1260
- folderKey = `${BINDING_REFERENCE_PREFIX}${String(pair.folder.id)}`;
1261
- taskBindings.push(pair.connection, pair.folder);
1262
- unresolved.push({
1263
- kind: "connector-context",
1264
- where,
1265
- detail: `the folder binding \`${String(pair.folder.id)}\` needs the connection's folder GUID as its \`default\`; the document names the connection and no folder key, so \`sdd resolve\` or a person supplies it`
1266
- });
1267
- } else {
1268
- if (targetConnector !== undefined) {
1269
- unresolved.push({
1270
- kind: "connector-connection",
1271
- where,
1272
- detail: `this \`http-request\` task reuses \`${String(targetConnector)}\`'s authentication and names no \`**Connection ID:**\`, so nothing is bound and it runs as a manual request until a connection is set`
1273
- });
1274
- }
1275
- connectionValue = `${BINDING_REFERENCE_PREFIX}${implicitBinding(context.bindings)}`;
1276
- }
1277
- return {
1278
- serviceType: "Intsvc.UnifiedHttpRequest",
1279
- inputs: [
1280
- input("pathParameters", elementId),
1281
- input("queryParameters", elementId),
1282
- { ...input("body", elementId), body }
1283
- ],
1284
- outputs,
1285
- context: [
1286
- contextEntry("connectorKey", HTTP_CONNECTOR_KEY),
1287
- contextEntry("connection", connectionValue),
1288
- contextEntry("resourceKey", resourceKey),
1289
- contextEntry("folderKey", folderKey),
1290
- contextEntry("method", "POST"),
1291
- contextEntry("path", "/http-request"),
1292
- contextEntry("objectName", "http-request"),
1293
- { name: "metadata", type: "json", body: structuredClone(http_request_metadata_default) },
1294
- contextEntry("activityConfigurationVersion", "v2")
1295
- ],
1296
- bindings: taskBindings
1297
- };
1298
- };
1299
727
 
1300
728
  // src/services/sdd-convert/recipient.ts
1301
729
  var RECIPIENT_TYPES = new Map([
@@ -1334,6 +762,72 @@ var recipientFor = (recipient, where, unresolved, outputs) => {
1334
762
  };
1335
763
  };
1336
764
 
765
+ // src/services/sdd-convert/task-type-near-miss.ts
766
+ var nearMissTaskTypes = (spelling, declared, notTaskTypes = []) => {
767
+ const types = [...declared].sort(byCodeUnit);
768
+ const written = normalize(spelling);
769
+ if (written === "")
770
+ return [];
771
+ const named = notTaskTypes.find((one) => normalize(one.spelling) === written);
772
+ if (named !== undefined && declared.has(named.planType)) {
773
+ return [named.planType];
774
+ }
775
+ const same = types.filter((type) => normalize(type) === written);
776
+ if (same.length > 0)
777
+ return same;
778
+ const typos = closest(types, (type) => typoDistance(written, type)).filter(({ score }) => Number.isFinite(score));
779
+ if (typos.length > 0)
780
+ return capped(typos.map(({ type }) => type));
781
+ const words = wordsOf(written).filter((word) => word.length >= MIN_WORD_LENGTH);
782
+ if (words.length === 0)
783
+ return [];
784
+ return capped(types.filter((type) => {
785
+ const own = wordsOf(type);
786
+ return words.every((word) => own.some((candidate) => wordMatches(word, candidate)));
787
+ }));
788
+ };
789
+ var MIN_WORD_LENGTH = 3;
790
+ var wordMatches = (word, candidate) => word === candidate || candidate.startsWith(word) || word.length >= 4 && editDistance(word, candidate) <= 1;
791
+ var MAX_SUGGESTIONS = 3;
792
+ var JOINING_WORDS = new Set(["a", "an", "for", "of", "on", "the", "to"]);
793
+ var normalize = (value) => value.trim().toLowerCase().replace(/[\s_]+/g, "-");
794
+ var wordsOf = (value) => value.split("-").filter((word) => word !== "" && !JOINING_WORDS.has(word));
795
+ var typoBound = (word) => Math.min(2, Math.max(1, Math.floor(word.length / 4)));
796
+ var typoDistance = (written, type) => {
797
+ const mine = written.split("-");
798
+ const theirs = type.split("-");
799
+ if (mine.length !== theirs.length) {
800
+ return editDistance(written, type) <= 1 ? 1 : Number.POSITIVE_INFINITY;
801
+ }
802
+ let total = 0;
803
+ for (let at = 0;at < mine.length; at += 1) {
804
+ const edits = editDistance(mine[at], theirs[at]);
805
+ if (edits > typoBound(theirs[at]))
806
+ return Number.POSITIVE_INFINITY;
807
+ total += edits;
808
+ }
809
+ return total;
810
+ };
811
+ var capped = (types) => types.length > MAX_SUGGESTIONS ? [] : types;
812
+ var closest = (types, score) => {
813
+ const scored = types.map((type) => ({ type, score: score(type) }));
814
+ const best = Math.min(...scored.map((one) => one.score));
815
+ return scored.filter((one) => one.score === best);
816
+ };
817
+ var editDistance = (a, b) => {
818
+ const rows = Array.from({ length: a.length + 1 }, (_, i) => Array.from({ length: b.length + 1 }, (_, j) => i === 0 ? j : j === 0 ? i : 0));
819
+ for (let i = 1;i <= a.length; i += 1) {
820
+ for (let j = 1;j <= b.length; j += 1) {
821
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
822
+ rows[i][j] = Math.min(rows[i - 1][j] + 1, rows[i][j - 1] + 1, rows[i - 1][j - 1] + cost);
823
+ if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
824
+ rows[i][j] = Math.min(rows[i][j], rows[i - 2][j - 2] + 1);
825
+ }
826
+ }
827
+ }
828
+ return rows[a.length][b.length];
829
+ };
830
+
1337
831
  // src/services/sdd-convert/emit.ts
1338
832
  var isDeferredTask = (resolved, stageName, task) => {
1339
833
  const type = typeof task.type === "string" ? task.type : "";
@@ -1374,10 +868,13 @@ var emitTask = (task, taskId, context) => {
1374
868
  }
1375
869
  }
1376
870
  if (type === "" || !SDD_TASK_TYPES.has(type)) {
871
+ const suggestions = type === "" || UNAUTHORABLE_TASK_TYPES.has(type) ? [] : nearMissTaskTypes(type, SDD_TASK_TYPES, NOT_TASK_TYPES2);
872
+ const meant = suggestions.length === 0 ? "" : ` (did you mean ${suggestions.map((one) => `"${one}"`).join(" or ")}?)`;
1377
873
  unresolved.push({
1378
874
  kind: "task-type",
1379
875
  where: taskWhere,
1380
- detail: type === "" ? "the Tasks table row names no type, so the task cannot be emitted with one" : UNAUTHORABLE_TASK_TYPES.has(type) ? `the Tasks table row declares the type "${type}", a caseplan task type an SDD may not declare. Author this task in Studio Web.` : `the Tasks table row declares the type "${type}", which is not one of the ${SDD_TASK_TYPES.size} an SDD may use (${[
876
+ ...suggestions.length > 0 && { suggestions },
877
+ detail: type === "" ? "the Tasks table row names no type, so the task cannot be emitted with one" : UNAUTHORABLE_TASK_TYPES.has(type) ? `the Tasks table row declares the type "${type}", a caseplan task type an SDD may not declare. Author this task in Studio Web.` : `the Tasks table row declares the type "${type}"${meant}, which is not one of the ${SDD_TASK_TYPES.size} an SDD may use (${[
1381
878
  ...SDD_TASK_TYPES
1382
879
  ].sort(byCodeUnit).join(", ")}) — the task is left out rather than emitted with a type nothing resolves`
1383
880
  });
@@ -1547,6 +1044,16 @@ var emitTask = (task, taskId, context) => {
1547
1044
  unresolved
1548
1045
  });
1549
1046
  }
1047
+ if (type === "script") {
1048
+ const data = emitted.data;
1049
+ const body = task.script;
1050
+ emitted.data = scriptData(body === undefined ? undefined : expandXrefs(body, {
1051
+ outputs: outputIds,
1052
+ where: `${taskWhere}.data.script`,
1053
+ unresolved,
1054
+ script: true
1055
+ }), data.inputs ?? [], data.outputs ?? [], { where: taskWhere, unresolved });
1056
+ }
1550
1057
  return { task: emitted, conditions };
1551
1058
  };
1552
1059
  var SHARES_WITH_SIBLING = "parallel-after-predecessor";
@@ -1710,15 +1217,6 @@ var emitStages = (document, model, index, unresolved) => {
1710
1217
  return { taskCount, conditionCount };
1711
1218
  };
1712
1219
 
1713
- // src/services/sdd-convert/fixed-outputs.ts
1714
- var fixedOutputsFor = (taskType, elementId, taken, reserved) => {
1715
- if (taskType === "http-request")
1716
- return httpRequestOutputs(elementId, taken, reserved);
1717
- if (taskType === "document-extraction")
1718
- return documentExtractionOutputs(elementId, taken, reserved);
1719
- return [];
1720
- };
1721
-
1722
1220
  // src/services/sdd-convert/plan.ts
1723
1221
  var taskNameOf = (task) => typeof task.name === "string" ? task.name : "";
1724
1222
  var countByName = (entries) => {
@@ -1745,6 +1243,7 @@ var planCase = (model, unresolved) => {
1745
1243
  const taskIds = new Map;
1746
1244
  const outputIds = new Map;
1747
1245
  const takenOutputIds = new Set;
1246
+ const ignoredVariableTypes = model.ignoredVariableTypes ?? {};
1748
1247
  const tasksByExactName = [];
1749
1248
  const stagesByTaskName = new Map;
1750
1249
  const tasksByFolded = new Map;
@@ -1865,7 +1364,7 @@ var planCase = (model, unresolved) => {
1865
1364
  unresolved.push({
1866
1365
  kind: "output-type",
1867
1366
  where: `nodes[${stage.name}].data.tasks[${taskName}].outputs[${row}]`,
1868
- detail: `an \`${taskType}\` task has the activity's own outputs only (${offered.join(", ")}), so the declared output "${row}" is not written; read the field it names from \`${taskType === "http-request" ? "body" : "output"}\` instead`
1367
+ detail: `an \`${taskType}\` task has the activity's own outputs only (${offered.join(", ")}), so the declared output "${row}" is not written; read the field it names from \`${payloadOutputName(taskType) ?? "output"}\` instead`
1869
1368
  });
1870
1369
  }
1871
1370
  }
@@ -1885,7 +1384,7 @@ var planCase = (model, unresolved) => {
1885
1384
  const unmapped = extractUnmappedByField.get(row);
1886
1385
  if (unmapped !== undefined) {
1887
1386
  unresolved.push(unmappedOutputType(`nodes[${stage.name}].data.tasks[${taskName}].outputs[${row}]`, unmapped, type));
1888
- } else if (type === undefined) {
1387
+ } else if (type === undefined && !(variable !== undefined && Object.hasOwn(ignoredVariableTypes, modelKey(variable)))) {
1889
1388
  unresolved.push({
1890
1389
  kind: "output-type",
1891
1390
  where: `nodes[${stage.name}].data.tasks[${taskName}].outputs[${row}]`,
@@ -2177,4 +1676,4 @@ export {
2177
1676
  convertSddToCasePlan
2178
1677
  };
2179
1678
 
2180
- //# debugId=E3082643D54EEB6464756E2164756E21
1679
+ //# debugId=548B43B5A1EECB5F64756E2164756E21