@uipath/case-tool 1.205.0-preview.281 → 1.206.0-preview.282
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.
- package/dist/THIRD-PARTY-NOTICES.md +68 -7
- package/dist/applicationinsights-web-8m26566f.js +17209 -0
- package/dist/{authoring-kqh34zzm.js → authoring-vg90pqrn.js} +488 -213
- package/dist/bindings-v2-1da35xsc.js +27 -0
- package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-627rrg7z.js} +6 -7
- package/dist/{business-rule-export-ey588rv7.js → business-rule-export-jv60r9jf.js} +3 -7
- package/dist/carry-forward-sfdnta6q.js +52 -0
- package/dist/{case-api-sme7esce.js → case-api-by95rf40.js} +38 -37
- package/dist/{case-bindings-service-cht20gqt.js → case-bindings-service-pp3c9g1e.js} +93 -45
- package/dist/{case-debug-solution-projects-qqd3h10v.js → case-debug-solution-projects-je7h4hmq.js} +3 -7
- package/dist/{case-debug-studio-web-service-nqzmwbr5.js → case-debug-studio-web-service-d83h3atd.js} +48 -45
- package/dist/{case-described-io-service-dx1f4nxe.js → case-described-io-service-tsm8r189.js} +33 -15
- package/dist/case-event-trigger-bindings-qbs8ywf5.js +17 -0
- package/dist/{case-format-service-6aew6tqc.js → case-format-service-3sab2297.js} +9 -10
- package/dist/{case-pack-service-pqq8wnfd.js → case-pack-service-txnv711n.js} +47 -42
- package/dist/case-schema-version-cw0h2nrv.js +18 -0
- package/dist/case-shape-reader-xaxmrd40.js +14 -0
- package/dist/{case-splice-service-s5gccctq.js → case-splice-service-6y35w83e.js} +139 -51
- package/dist/{case-validate-service-vq38va33.js → case-validate-service-hz0j90we.js} +234 -170
- package/dist/connector-enrichment-service-sjjmb9dy.js +56 -0
- package/dist/connector-library-1yw5r47w.js +99 -0
- package/dist/connector-lookup-service-yerhg9cd.js +20 -0
- package/dist/connector-task-shape-bgywpbqc.js +13 -0
- package/dist/{de-WLW6KWOJ-2qnsqdtw.js → de-2BEKRUMY-x4dx0nn9.js} +190 -10
- package/dist/{de-UZI7FJDO-mwvc4cxe.js → de-AI7ML6JM-km47f8k4.js} +20 -5
- package/dist/debug-service-h4jxbn1r.js +56 -0
- package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/en-LAVDF7IQ-yzy20n6d.js +254 -0
- package/dist/en-X6T4SP2Y-xm47mf18.js +2752 -0
- package/dist/{enrichment-service-hv7ff88p.js → enrichment-service-wpprec7k.js} +36 -37
- package/dist/{es-5THCNRFN-tqwyrdgy.js → es-7ZTQTGKN-11sj0yjx.js} +190 -10
- package/dist/{es-MX-5RELIXKI-9jhqtddc.js → es-MX-7KJZPEQN-1fq0a9jr.js} +20 -5
- package/dist/{es-MX-TWZBRAXK-gqd9swzw.js → es-MX-IHGRIEWH-g63p0gb4.js} +191 -11
- package/dist/{es-4UBUTCQA-m1ytpyx2.js → es-SPNKTD5Y-vw5cbgv5.js} +20 -5
- package/dist/filter-engine-dh9s90gb.js +10 -0
- package/dist/first-party-service-ahcc6xc6.js +8 -0
- package/dist/{fr-CERONSRC-edpxhbmb.js → fr-7ZDL4MVO-pd27vwh6.js} +191 -11
- package/dist/{fr-VBM5WRC2-63z7w4mh.js → fr-AXJGUT53-hdg3pmd4.js} +20 -5
- package/dist/index-21kns9qg.js +10 -0
- package/dist/{index-fyc0k5dd.js → index-5pzp2qeb.js} +5350 -3271
- package/dist/{connector-task-spec-pzfzmfr5.js → index-9f8naxbk.js} +320 -144
- package/dist/{index-5dxh9z60.js → index-a7y7etmy.js} +6 -5
- package/dist/{index-ekwtgx7y.js → index-ec115v05.js} +309 -287
- package/dist/index-j9t2k52h.js +35 -0
- package/dist/index-myf7b4a5.js +26 -0
- package/dist/index-nj3axvya.js +159 -0
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-pg9wmyrf.js +36 -0
- package/dist/index-z2qk2qn6.js +24 -0
- package/dist/index.js +19 -25
- package/dist/index.umd.min-ttg1qc0x.js +7814 -0
- package/dist/{init-entry-points-hhpv3e3f.js → init-entry-points-pc128f7z.js} +22 -35
- package/dist/input-reader-9ym8mkbc.js +10 -0
- package/dist/{ja-43QL7CGO-c3q8gre9.js → ja-C7GZV6YP-hvtbngr5.js} +20 -5
- package/dist/{ja-U2MCNHGT-gz0ap1jk.js → ja-LGAM5HKR-sgrtjqjh.js} +190 -10
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/known-types-gak9by1w.js +11 -0
- package/dist/{ko-XAUYQWDR-zp81gjp4.js → ko-7B4SUZB7-c8wr20sc.js} +190 -10
- package/dist/{ko-TLL6Z6CD-wrt3n8a9.js → ko-Q24HSSL4-5vn55pte.js} +20 -5
- package/dist/localSolutionDiscovery-48d1bnkj.js +15 -0
- package/dist/{migration-diagnosis-ns5cw4e3.js → migration-diagnosis-myqqgwj0.js} +1 -4
- package/dist/{node-strategy-v442hwgd.js → node-strategy-2mqzg36t.js} +15 -18
- package/dist/node-sync-service-y8b5w1rd.js +56 -0
- package/dist/{out-target-wjgmna0r.js → out-target-eqsttq1k.js} +18 -22
- package/dist/{packager-tool-f8vwy92w.js → packager-tool-0te1tyhf.js} +186 -16
- package/dist/{packager-tool-ydyvtknp.js → packager-tool-0w4fsdzv.js} +44 -20
- package/dist/{packager-tool-8ftat1vn.js → packager-tool-17b466mr.js} +59158 -59666
- package/dist/packager-tool-1nfdj0zm.js +425 -0
- package/dist/packager-tool-1wgav5ma.js +139 -0
- package/dist/{packager-tool-b1nw50ev.js → packager-tool-265h946t.js} +256 -486
- package/dist/{packager-tool-nj4seavy.js → packager-tool-35c9npcy.js} +26 -7
- package/dist/{packager-tool-r0x3qh59.js → packager-tool-388vyja1.js} +185 -29
- package/dist/packager-tool-3m8482sw.js +78 -0
- package/dist/packager-tool-3r23qsca.js +4832 -0
- package/dist/packager-tool-3xehbdyd.js +1302 -0
- package/dist/packager-tool-4avchhz8.js +539 -0
- package/dist/{packager-tool-9kvkzc05.js → packager-tool-5w0gjcck.js} +4 -4
- package/dist/packager-tool-68648y3j.js +6 -0
- package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
- package/dist/{packager-tool-aagnvyba.js → packager-tool-76zhn5pa.js} +131 -432
- package/dist/packager-tool-7x1tmb8a.js +46 -0
- package/dist/{packager-tool-kyrm4e5m.js → packager-tool-9ar5829n.js} +781 -741
- package/dist/{packager-tool-4p11fvf4.js → packager-tool-b2q8m9pq.js} +10 -13
- package/dist/packager-tool-bg3tdpva.js +27 -0
- package/dist/{packager-tool-wr12ndwk.js → packager-tool-ccejfs0r.js} +252 -468
- package/dist/{packager-tool-yn33pw57.js → packager-tool-dn9d4ywm.js} +246 -225
- package/dist/{packager-tool-kdhey8gz.js → packager-tool-e02jkmrq.js} +41 -29
- package/dist/{packager-tool-sq931c23.js → packager-tool-e1tx5mqg.js} +1 -1
- package/dist/{packager-tool-qn3zkrrc.js → packager-tool-ehjw672b.js} +32 -15
- package/dist/packager-tool-gy4yjqhf.js +178 -0
- package/dist/packager-tool-h2ar8xf8.js +222 -0
- package/dist/{packager-tool-v2kcgjbf.js → packager-tool-j6nfje7t.js} +5 -4
- package/dist/packager-tool-k0ar6cn7.js +295 -0
- package/dist/packager-tool-kz7zz79p.js +71 -0
- package/dist/{packager-tool-1gwbq864.js → packager-tool-m5384a1s.js} +66 -82
- package/dist/{packager-tool-9e59z4d6.js → packager-tool-me8gd22q.js} +82 -83
- package/dist/packager-tool-mk9fmzdy.js +20 -0
- package/dist/{packager-tool-yfmby4dd.js → packager-tool-mkt1njk2.js} +630 -689
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
- package/dist/{packager-tool-mqy97y5f.js → packager-tool-p5gs9xqy.js} +14 -14
- package/dist/{packager-tool-83v804p7.js → packager-tool-psmb758n.js} +3108 -2627
- package/dist/packager-tool-q26hncjr.js +13 -0
- package/dist/packager-tool-q9fnx278.js +77 -0
- package/dist/{packager-tool-ezds6t5e.js → packager-tool-s12s1dp6.js} +11 -11
- package/dist/packager-tool-scy94jyb.js +5424 -0
- package/dist/{packager-tool-yn7r7zq2.js → packager-tool-snesn0bt.js} +177 -96
- package/dist/{packager-tool-d8e2mrkq.js → packager-tool-tgehy324.js} +56 -56
- package/dist/{packager-tool-tqn0j6f9.js → packager-tool-v11fx4dk.js} +7 -7
- package/dist/{packager-tool-67vy1fz3.js → packager-tool-v6rkp2ay.js} +24 -92
- package/dist/{packager-tool-9sd483vs.js → packager-tool-vs7gqa4r.js} +15 -15
- package/dist/packager-tool-vyavrbym.js +488 -0
- package/dist/{packager-tool-b098y4a2.js → packager-tool-wbksf242.js} +97 -97
- package/dist/{packager-tool-2sn7d8fd.js → packager-tool-x74mmjkw.js} +9 -13
- package/dist/{packager-tool-7hw344bt.js → packager-tool-xb16e3tz.js} +5 -5
- package/dist/{packager-tool-a17g0pj1.js → packager-tool-xd1wbvay.js} +10 -8
- package/dist/{packager-tool-1yfw674x.js → packager-tool-xehhk3c3.js} +10 -5
- package/dist/packager-tool-yh8mmj3p.js +123 -0
- package/dist/{packager-tool-hdxtgckw.js → packager-tool-z070caqq.js} +56 -12
- package/dist/{packager-tool-b250k6w4.js → packager-tool-z1fw9a8v.js} +41 -9
- package/dist/{packager-tool-0gctz400.js → packager-tool-z9fmqtm6.js} +4 -4
- package/dist/{packager-tool-mzf4gmph.js → packager-tool-zbx189j3.js} +11 -8
- package/dist/{packager-tool-zf8f9pmm.js → packager-tool-zrbnms9b.js} +3 -4
- package/dist/packager-tool.js +10 -11
- package/dist/prepare-uip-ad7mfs8t.js +92 -0
- package/dist/{project-artifacts-bgyyb0dm.js → project-artifacts-q0c0zghw.js} +2 -6
- package/dist/{pt-BR-USP2T7GD-pedn77m1.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +20 -5
- package/dist/{pt-BR-GNQNAAZ2-xadharv4.js → pt-BR-PHLFHMXZ-n6de4s7z.js} +191 -11
- package/dist/{pt-RMIAKZB4-67enhx3m.js → pt-MHX6JGAX-xfgvdqwg.js} +20 -5
- package/dist/{pt-TO2DARY2-ftcce1bv.js → pt-N7ZTJT4W-d6c67xcn.js} +190 -10
- package/dist/{resolved-check-aqw7568y.js → resolved-check-dz8eqrf6.js} +2 -3
- package/dist/{resourcesSyncService-8ac6ncq2.js → resourcesSyncService-yrhhh62m.js} +81 -141
- package/dist/{ro-GHOBYW2S-mhnqsgaa.js → ro-3RKJNGJZ-xqj14e3d.js} +20 -5
- package/dist/{ro-WUYJV6OW-a8d9qy1n.js → ro-FLNXVYJI-ytrwabg2.js} +190 -10
- package/dist/ru-GSCT4ARZ-c2cfq4h1.js +7 -0
- package/dist/ru-WBLQ5B2U-bf20yr5y.js +7 -0
- package/dist/{rule-group-members-zje7n3kf.js → rule-group-members-p0nv1rmj.js} +1 -3
- package/dist/rule-type-declaration-s2nxpcfy.js +77 -0
- package/dist/{sdd-convert-service-8jpew7vz.js → sdd-convert-service-ffbx00k6.js} +481 -504
- package/dist/{sdd-lookup-fe900sdb.js → sdd-lookup-sah7wj5j.js} +8 -9
- package/dist/{sdd-resolve-service-qdtmxw9b.js → sdd-resolve-service-6nt10vhq.js} +28 -20
- package/dist/{sdd-resolve-siblings-8gf9zjwf.js → sdd-resolve-siblings-ap8j1c8h.js} +11 -14
- package/dist/solution-auth-a1p22hq1.js +11 -0
- package/dist/solution-discovery-r1y550sz.js +33 -0
- package/dist/{strict-case-rules-4tjcaznr.js → strict-case-rules-045kbjvv.js} +16 -28
- package/dist/{strict-entry-points-g2pd4mf4.js → strict-entry-points-40ha9afz.js} +15 -14
- package/dist/strict-sdd-audit-bp7fq2tg.js +26 -0
- package/dist/{task-selector-8bjn35dv.js → task-selector-jt60hdbt.js} +1 -3
- package/dist/{task-type-declaration-7a8fqdvs.js → task-type-declaration-yhczvj05.js} +9 -9
- package/dist/tool.js +18 -24
- package/dist/{tr-M3F5A6AU-bb0tg39m.js → tr-7AIZZWZ6-pdzp9n0p.js} +190 -10
- package/dist/{tr-GDTLECMM-k5fhmq13.js → tr-PQLUUHPC-qsb7btxn.js} +20 -5
- package/dist/{trigger-enrichment-service-agvnhdf7.js → trigger-enrichment-service-z8kxy6qr.js} +53 -57
- package/dist/trigger-entry-point-id-751v48qd.js +14 -0
- package/dist/{zh-CN-C5G4PC7C-ds9gkptg.js → zh-CN-CN2ARPFS-e0p2qrxf.js} +190 -10
- package/dist/{zh-CN-I5D7WHBD-sr5h0a98.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +20 -5
- package/dist/{zh-TW-62HZIG6O-787kdwex.js → zh-TW-7RUFEVFK-qd7myw31.js} +190 -10
- package/dist/{zh-TW-2AVLM723-288pkc1z.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +20 -5
- package/package.json +2 -2
- package/dist/canvas-notes-86fxx1t8.js +0 -19
- package/dist/case-event-trigger-bindings-g9ftnm4x.js +0 -16
- package/dist/case-schema-version-h820ne16.js +0 -20
- package/dist/case-shape-reader-dsbraetf.js +0 -13
- package/dist/connector-enrichment-service-6kskfevq.js +0 -65
- package/dist/connector-lookup-service-yyn8kkw7.js +0 -22
- package/dist/connector-task-shape-mpazkf7s.js +0 -14
- package/dist/debug-service-7q98j726.js +0 -59
- package/dist/en-EJCBA3LK-dtpdghgj.js +0 -146
- package/dist/en-M7GQYBV2-5nfmpnfz.js +0 -2018
- package/dist/filter-engine-7ep90g7f.js +0 -11
- package/dist/first-party-service-srxaftkn.js +0 -27
- package/dist/index-0d7qc2gs.js +0 -282
- package/dist/index-jmv5by9z.js +0 -666
- package/dist/index-kmp9fmhb.js +0 -25
- package/dist/index-n9qvnx4x.js +0 -29
- package/dist/index-ngs0a2he.js +0 -15
- package/dist/index-xq6ajhgq.js +0 -157
- package/dist/index.umd.min-fqefd9kn.js +0 -7814
- package/dist/input-reader-c7wz8ra2.js +0 -11
- package/dist/known-types-5b6yrsqn.js +0 -16
- package/dist/localSolutionDiscovery-yyx234ak.js +0 -13
- package/dist/node-sync-service-2ezr3akv.js +0 -57
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-6z1hsm2h.js +0 -143
- package/dist/packager-tool-93mdeqay.js +0 -18
- package/dist/packager-tool-9kf3fqtr.js +0 -23
- package/dist/packager-tool-bfgdz1zh.js +0 -73
- package/dist/packager-tool-e15kqpyh.js +0 -266
- package/dist/packager-tool-gmykn1ef.js +0 -5365
- package/dist/packager-tool-jysvpt8p.js +0 -11
- package/dist/packager-tool-pcvhcn2k.js +0 -2019
- package/dist/packager-tool-rk25wp3c.js +0 -28
- package/dist/packager-tool-sc961w0q.js +0 -16
- package/dist/packager-tool-wekqkmgn.js +0 -265
- package/dist/packager-tool-yc4kw997.js +0 -13
- package/dist/packager-tool-zgpsnxkd.js +0 -13189
- package/dist/ru-GSCT4ARZ-1sa9wbr8.js +0 -10
- package/dist/ru-WBLQ5B2U-s4em88p0.js +0 -10
- package/dist/solution-auth-30yycqtv.js +0 -14
- package/dist/solution-discovery-e9mamp6w.js +0 -38
- package/dist/strict-sdd-audit-q7tb9yj7.js +0 -25
- package/dist/trigger-entry-point-id-yhqwnkx9.js +0 -15
- /package/dist/{packager-tool-5qp9xza1.js → packager-tool-1c30ttpm.js} +0 -0
- /package/dist/{packager-tool-mknccck5.js → packager-tool-1h7abxw6.js} +0 -0
- /package/dist/{packager-tool-9y1w2wds.js → packager-tool-fcektt1g.js} +0 -0
- /package/dist/{packager-tool-k6jbedyc.js → packager-tool-hcdnc420.js} +0 -0
- /package/dist/{packager-tool-7nxppa3d.js → packager-tool-jv5byaww.js} +0 -0
- /package/dist/{packager-tool-qa9gftnj.js → packager-tool-mxgybnmt.js} +0 -0
- /package/dist/{packager-tool-87y6xw3a.js → packager-tool-nfhtwa72.js} +0 -0
- /package/dist/{packager-tool-cv05dwac.js → packager-tool-p0rdmmvk.js} +0 -0
- /package/dist/{packager-tool-21qfsbxn.js → packager-tool-yaertxsw.js} +0 -0
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError2
|
|
3
|
+
} from "./packager-tool-psmb758n.js";
|
|
4
|
+
import {
|
|
5
|
+
STAGE_SELECTOR_RULES,
|
|
6
|
+
TASK_SELECTOR_RULES,
|
|
7
|
+
parseIfCell,
|
|
8
|
+
expandXrefs,
|
|
9
|
+
canonicalExpression,
|
|
10
|
+
unquoteLiteral
|
|
11
|
+
} from "./packager-tool-1nfdj0zm.js";
|
|
12
|
+
import {
|
|
13
|
+
BINDING_REFERENCE_PREFIX
|
|
14
|
+
} from "./packager-tool-nfhtwa72.js";
|
|
15
|
+
import {
|
|
16
|
+
connectionPairFor
|
|
17
|
+
} from "./packager-tool-b2q8m9pq.js";
|
|
18
|
+
import {
|
|
19
|
+
referenceSpellings,
|
|
20
|
+
indexKey,
|
|
21
|
+
scopedSlaKey
|
|
22
|
+
} from "./packager-tool-5w0gjcck.js";
|
|
23
|
+
import {
|
|
24
|
+
prefixedId
|
|
25
|
+
} from "./packager-tool-1h7abxw6.js";
|
|
26
|
+
import {
|
|
27
|
+
v2ConfigurationVersionEntry
|
|
28
|
+
} from "./packager-tool-68648y3j.js";
|
|
29
|
+
|
|
30
|
+
// src/services/sdd-convert/business-events.ts
|
|
31
|
+
var JSON_SCHEMA_DRAFT_7 = "http://json-schema.org/draft-07/schema#";
|
|
32
|
+
var payloadSchema = (text) => {
|
|
33
|
+
const [error, parsed] = catchError2(() => JSON.parse(text));
|
|
34
|
+
if (error)
|
|
35
|
+
return { error: "is not JSON" };
|
|
36
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
37
|
+
return { error: "is not a JSON Schema object" };
|
|
38
|
+
}
|
|
39
|
+
const schema = parsed;
|
|
40
|
+
const properties = schema.properties;
|
|
41
|
+
const declares = schema.type === "array" || typeof properties === "object" && properties !== null && Object.keys(properties).length > 0;
|
|
42
|
+
if (!declares)
|
|
43
|
+
return {};
|
|
44
|
+
return {
|
|
45
|
+
schema: JSON.stringify({
|
|
46
|
+
...schema,
|
|
47
|
+
$schema: schema.$schema ?? JSON_SCHEMA_DRAFT_7
|
|
48
|
+
})
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
var emitBusinessEvents = (document, events, unresolved) => {
|
|
52
|
+
if (events === undefined || events.length === 0)
|
|
53
|
+
return 0;
|
|
54
|
+
const plan = document;
|
|
55
|
+
plan.metadata ??= {};
|
|
56
|
+
const metadata = plan.metadata;
|
|
57
|
+
metadata.businessEvents = events.map((event) => {
|
|
58
|
+
const read = event.payload === undefined ? {} : payloadSchema(event.payload);
|
|
59
|
+
if (read.error !== undefined) {
|
|
60
|
+
unresolved.push({
|
|
61
|
+
kind: "business-event",
|
|
62
|
+
where: `metadata.businessEvents[${event.name}]`,
|
|
63
|
+
detail: `business event "${event.name}"'s Payload ${read.error}, so the event is declared with no payload schema; write it as a JSON Schema object such as \`{"type": "object", "properties": {"amount": {"type": "number"}}}\``
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
name: event.name,
|
|
68
|
+
...event.description !== undefined && {
|
|
69
|
+
description: event.description
|
|
70
|
+
},
|
|
71
|
+
...read.schema !== undefined && { schema: read.schema }
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
return events.length;
|
|
75
|
+
};
|
|
76
|
+
var applyApiEvent = (base, argumentList, context) => {
|
|
77
|
+
const name = argumentList[0];
|
|
78
|
+
if (name === undefined) {
|
|
79
|
+
context.unresolved.push({
|
|
80
|
+
kind: "selector-target",
|
|
81
|
+
where: context.where,
|
|
82
|
+
detail: '`api-event` names no business event, so the rule listens for nothing; write `api-event("<name>")` with a name from `### Business Events`'
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
base.businessEventType = name;
|
|
87
|
+
if (context.businessEvents?.has(name) !== true) {
|
|
88
|
+
context.unresolved.push({
|
|
89
|
+
kind: "selector-target",
|
|
90
|
+
where: context.where,
|
|
91
|
+
detail: `\`api-event\` listens for a business event named "${name}", which \`### Business Events\` does not declare; rules match on the exact name, so declare it there`
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// src/services/exit-condition-types.ts
|
|
97
|
+
var EXIT_CONDITION_TYPES = new Set([
|
|
98
|
+
"exit-only",
|
|
99
|
+
"wait-for-user",
|
|
100
|
+
"return-to-origin"
|
|
101
|
+
]);
|
|
102
|
+
|
|
103
|
+
// src/services/sdd-convert/connector.ts
|
|
104
|
+
var connectorInputs = (inputs, connector, elementId, where, unresolved) => {
|
|
105
|
+
if (connector === undefined)
|
|
106
|
+
return inputs;
|
|
107
|
+
if (inputs.length === 0) {
|
|
108
|
+
if (String(connector.serviceType ?? "") !== "Intsvc.WaitForEvent") {
|
|
109
|
+
return inputs;
|
|
110
|
+
}
|
|
111
|
+
const id = prefixedId("v", 8);
|
|
112
|
+
return [
|
|
113
|
+
{ name: "body", type: "json", value: "", id, var: id, elementId }
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
if (connector.method === undefined) {
|
|
117
|
+
unresolved.push({
|
|
118
|
+
kind: "connector-context",
|
|
119
|
+
where,
|
|
120
|
+
detail: `${inputs.length} connector input(s) stay flat: the document states no method for this activity, so which of pathParameters/queryParameters/body each belongs in is not decidable from it`
|
|
121
|
+
});
|
|
122
|
+
return inputs;
|
|
123
|
+
}
|
|
124
|
+
const bodies = new Map;
|
|
125
|
+
const kept = [];
|
|
126
|
+
for (const input of inputs) {
|
|
127
|
+
const field = String(input.name ?? "");
|
|
128
|
+
const container = containerFor(field, connector);
|
|
129
|
+
if (container === undefined) {
|
|
130
|
+
kept.push(input);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
const body = bodies.get(container) ?? {};
|
|
134
|
+
body[field] = unquoteLiteral(String(input.value ?? ""));
|
|
135
|
+
bodies.set(container, body);
|
|
136
|
+
}
|
|
137
|
+
if (bodies.size === 0)
|
|
138
|
+
return kept;
|
|
139
|
+
if (!bodies.has("pathParameters"))
|
|
140
|
+
bodies.set("pathParameters", {});
|
|
141
|
+
const containers = [];
|
|
142
|
+
for (const name of ["pathParameters", "queryParameters", "body"]) {
|
|
143
|
+
const body = bodies.get(name);
|
|
144
|
+
if (body === undefined)
|
|
145
|
+
continue;
|
|
146
|
+
const id = prefixedId("v", 8);
|
|
147
|
+
containers.push({
|
|
148
|
+
name,
|
|
149
|
+
type: "json",
|
|
150
|
+
target: name,
|
|
151
|
+
body,
|
|
152
|
+
id,
|
|
153
|
+
var: id,
|
|
154
|
+
elementId
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return [...containers, ...kept];
|
|
158
|
+
};
|
|
159
|
+
var connectorContextFor = (connector, where, connections, bindings, unresolved) => {
|
|
160
|
+
const entry = (name, value) => typeof value === "string" && value !== "" ? [{ name, type: "string", value }] : [];
|
|
161
|
+
const connectionId = String(connector.connectionId ?? "");
|
|
162
|
+
const context = [
|
|
163
|
+
...entry("connectorKey", connector.connectorKey),
|
|
164
|
+
...entry("resourceKey", connectionId),
|
|
165
|
+
...entry("objectName", connector.objectName),
|
|
166
|
+
...entry("operation", connector.operation ?? connector.method),
|
|
167
|
+
...entry("method", connector.method),
|
|
168
|
+
...entry("path", connector.path)
|
|
169
|
+
];
|
|
170
|
+
if (connectionId !== "") {
|
|
171
|
+
let ref = connections.get(connectionId);
|
|
172
|
+
if (ref === undefined) {
|
|
173
|
+
const pair = connectionPairFor(connectionId, connections.size + 1);
|
|
174
|
+
bindings.push(pair.connection, pair.folder);
|
|
175
|
+
ref = pair.connectionRef;
|
|
176
|
+
connections.set(connectionId, ref);
|
|
177
|
+
}
|
|
178
|
+
context.push({
|
|
179
|
+
name: "connection",
|
|
180
|
+
type: "string",
|
|
181
|
+
value: `${BINDING_REFERENCE_PREFIX}${ref}`
|
|
182
|
+
});
|
|
183
|
+
} else {
|
|
184
|
+
unresolved.push({
|
|
185
|
+
kind: "connector-connection",
|
|
186
|
+
where,
|
|
187
|
+
detail: "the document names no connection id, so nothing can be bound for this activity"
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
const activityTypeId = String(connector.activityTypeId ?? "");
|
|
191
|
+
if (activityTypeId !== "") {
|
|
192
|
+
context.push({
|
|
193
|
+
name: "metadata",
|
|
194
|
+
type: "json",
|
|
195
|
+
body: {
|
|
196
|
+
activityPropertyConfiguration: {
|
|
197
|
+
uiPathActivityTypeId: activityTypeId
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}, v2ConfigurationVersionEntry());
|
|
201
|
+
}
|
|
202
|
+
unresolved.push({
|
|
203
|
+
kind: "connector-context",
|
|
204
|
+
where,
|
|
205
|
+
detail: `\`folderKey\` binds the folder's GUID and \`metadata.activityPropertyConfiguration.configuration\` carries the connector version and instance parameters; the document states a folder path and no schema, so ${activityTypeId === "" ? "those and the activity type id" : "both"} come from \`case spec\` against a tenant`
|
|
206
|
+
});
|
|
207
|
+
return context;
|
|
208
|
+
};
|
|
209
|
+
var QUERY_METHODS = new Set(["GET", "HEAD", "DELETE", "OPTIONS"]);
|
|
210
|
+
var containerFor = (field, connector) => {
|
|
211
|
+
const method = String(connector?.method ?? "").toUpperCase();
|
|
212
|
+
if (method === "")
|
|
213
|
+
return;
|
|
214
|
+
const path = String(connector?.path ?? "");
|
|
215
|
+
if (path.includes(`{${field}}`))
|
|
216
|
+
return "pathParameters";
|
|
217
|
+
return QUERY_METHODS.has(method) ? "queryParameters" : "body";
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
// src/services/sdd-convert/rules.ts
|
|
221
|
+
var RULE_VOCABULARY = new Set([
|
|
222
|
+
"wait-for-connector",
|
|
223
|
+
"case-entered",
|
|
224
|
+
"selected-stage-completed",
|
|
225
|
+
"selected-stage-exited",
|
|
226
|
+
"selected-tasks-completed",
|
|
227
|
+
"current-stage-entered",
|
|
228
|
+
"adhoc",
|
|
229
|
+
"required-stages-completed",
|
|
230
|
+
"required-tasks-completed",
|
|
231
|
+
"user-selected-stage",
|
|
232
|
+
"runs-sequentially",
|
|
233
|
+
"sla-status-change",
|
|
234
|
+
"api-event"
|
|
235
|
+
]);
|
|
236
|
+
var parseWhen = (cell) => {
|
|
237
|
+
const text = cell.replaceAll("`", "").trim();
|
|
238
|
+
const bare = /^([a-z-]+)/i.exec(text);
|
|
239
|
+
const rule = bare ? bare[1] : "";
|
|
240
|
+
const open = text.indexOf("(");
|
|
241
|
+
if (rule === "" || open === -1)
|
|
242
|
+
return { rule, argumentList: [] };
|
|
243
|
+
let depth = 0;
|
|
244
|
+
let close = -1;
|
|
245
|
+
for (let at = open;at < text.length; at += 1) {
|
|
246
|
+
if (text[at] === "(")
|
|
247
|
+
depth += 1;
|
|
248
|
+
else if (text[at] === ")") {
|
|
249
|
+
depth -= 1;
|
|
250
|
+
if (depth === 0) {
|
|
251
|
+
close = at;
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const inner = text.slice(open + 1, close === -1 ? undefined : close);
|
|
257
|
+
const quoted = [...inner.matchAll(/"([^"]*)"/g)].map((match) => match[1].trim());
|
|
258
|
+
if (quoted.length > 0) {
|
|
259
|
+
return { rule, argumentList: quoted.filter((one) => one !== "") };
|
|
260
|
+
}
|
|
261
|
+
const plain = inner.split("(")[0].trim();
|
|
262
|
+
return { rule, argumentList: plain === "" ? [] : [plain] };
|
|
263
|
+
};
|
|
264
|
+
var resolveStage = (argument, stages) => {
|
|
265
|
+
for (const variant of referenceSpellings(argument)) {
|
|
266
|
+
const found = stages.get(indexKey(variant));
|
|
267
|
+
if (found !== undefined)
|
|
268
|
+
return found;
|
|
269
|
+
}
|
|
270
|
+
const prefix = indexKey(argument);
|
|
271
|
+
const matches = [...stages.entries()].filter(([name]) => name.startsWith(prefix) && /^[\s\-:_]/.test(name.slice(prefix.length)));
|
|
272
|
+
return matches.length === 1 ? matches[0][1] : undefined;
|
|
273
|
+
};
|
|
274
|
+
var ruleFor = (condition, idPrefix, context) => {
|
|
275
|
+
const whenCell = typeof condition.when === "string" ? condition.when : "";
|
|
276
|
+
const { rule, argumentList } = parseWhen(whenCell);
|
|
277
|
+
const parsedIf = parseIfCell(typeof condition.ifExpression === "string" ? condition.ifExpression : "");
|
|
278
|
+
const ifExpression = parsedIf.expression;
|
|
279
|
+
if (!RULE_VOCABULARY.has(rule)) {
|
|
280
|
+
context.unresolved.push({
|
|
281
|
+
kind: "condition-rule",
|
|
282
|
+
where: context.where,
|
|
283
|
+
detail: whenCell === "" ? "the condition row names no WHEN rule, so the condition is left out" : `the WHEN cell "${whenCell}" is not one of the rules the plan accepts, so the condition is left out`
|
|
284
|
+
});
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const base = { id: prefixedId(`${idPrefix}r`, 6), rule };
|
|
288
|
+
if (ifExpression !== "" && ifExpression !== "—") {
|
|
289
|
+
base.conditionExpression = canonicalExpression(expandXrefs(ifExpression, context));
|
|
290
|
+
}
|
|
291
|
+
const argument = argumentList[0];
|
|
292
|
+
const selectorMiss = (what, named) => {
|
|
293
|
+
context.unresolved.push({
|
|
294
|
+
kind: "selector-target",
|
|
295
|
+
where: context.where,
|
|
296
|
+
detail: `\`${rule}\` selects ${named === undefined ? `no ${what}` : `a ${what} named "${named}", which this SDD does not declare`}`
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
if (STAGE_SELECTOR_RULES.has(rule)) {
|
|
300
|
+
const wanted = parsedIf.stage ?? argument;
|
|
301
|
+
const id = wanted === undefined ? undefined : resolveStage(wanted, context.stages);
|
|
302
|
+
if (id === undefined)
|
|
303
|
+
selectorMiss("stage", parsedIf.stage ?? argument);
|
|
304
|
+
else
|
|
305
|
+
base.selectedStageIds = [id];
|
|
306
|
+
} else if (TASK_SELECTOR_RULES.has(rule)) {
|
|
307
|
+
const named = parsedIf.tasks === undefined ? argumentList : parsedIf.tasks.split(",").map((one) => one.trim());
|
|
308
|
+
const ids = [];
|
|
309
|
+
for (const name of named) {
|
|
310
|
+
const exact = context.tasks.get(name);
|
|
311
|
+
const folded = exact === undefined ? context.taskNameConflicts?.get(indexKey(name)) : undefined;
|
|
312
|
+
const id = exact ?? (folded === undefined ? context.tasks.get(indexKey(name)) : undefined);
|
|
313
|
+
if (id !== undefined && context.stageTasks?.has(id) === false) {
|
|
314
|
+
context.unresolved.push({
|
|
315
|
+
kind: "selector-target",
|
|
316
|
+
where: context.where,
|
|
317
|
+
detail: `\`${rule}\` selects a task named "${name}", which is in another stage. A stage's rules and its tasks' rules select only that stage's own tasks, so name one of them`
|
|
318
|
+
});
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
if (id !== undefined) {
|
|
322
|
+
ids.push(id);
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
if (folded === undefined) {
|
|
326
|
+
selectorMiss("task", name);
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
const shared = new Set(folded).size < folded.length;
|
|
330
|
+
if (shared) {
|
|
331
|
+
context.unresolved.push({
|
|
332
|
+
kind: "selector-target",
|
|
333
|
+
where: context.where,
|
|
334
|
+
detail: `\`${rule}\` selects a task named "${name}", and ${folded.length} tasks answer to it (${[
|
|
335
|
+
...new Set(folded)
|
|
336
|
+
].map((one) => `"${one}"`).join(", ")}). Task names are unique across the case, so rename all but one and point the selector at the one it means`
|
|
337
|
+
});
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
context.unresolved.push({
|
|
341
|
+
kind: "selector-target",
|
|
342
|
+
where: context.where,
|
|
343
|
+
detail: `\`${rule}\` selects a task named "${name}", which matches none of this SDD's task names exactly and more than one when case and surrounding space are ignored (${folded.map((one) => `"${one}"`).join(", ")}) — task names are compared exactly, so the selector has to spell one of them`
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
if (ids.length === 0 && named.length === 0) {
|
|
347
|
+
selectorMiss("task");
|
|
348
|
+
}
|
|
349
|
+
if (ids.length > 0)
|
|
350
|
+
base.selectedTasksIds = ids;
|
|
351
|
+
} else if (rule === "api-event") {
|
|
352
|
+
applyApiEvent(base, argumentList, context);
|
|
353
|
+
} else if (rule === "sla-status-change") {
|
|
354
|
+
const title = argumentList.at(-1);
|
|
355
|
+
const found = title === undefined ? undefined : context.slas?.get(indexKey(title));
|
|
356
|
+
if (found === undefined) {
|
|
357
|
+
context.unresolved.push({
|
|
358
|
+
kind: "selector-target",
|
|
359
|
+
where: context.where,
|
|
360
|
+
detail: `\`sla-status-change\` selects ${title === undefined ? "no SLA" : `an SLA named "${title}", which neither the case nor any stage in this SDD declares`}`
|
|
361
|
+
});
|
|
362
|
+
} else {
|
|
363
|
+
if (argumentList.length < 2) {
|
|
364
|
+
base.slaId = found.id;
|
|
365
|
+
} else {
|
|
366
|
+
const named = argumentList[0];
|
|
367
|
+
const scope = indexKey(named) === "root" ? "root" : resolveStage(named, context.stages);
|
|
368
|
+
if (scope === undefined) {
|
|
369
|
+
selectorMiss("stage", named);
|
|
370
|
+
base.slaId = found.id;
|
|
371
|
+
} else {
|
|
372
|
+
const own = context.slas?.get(scopedSlaKey(scope, indexKey(title ?? "")));
|
|
373
|
+
if (own !== undefined) {
|
|
374
|
+
base.slaId = own.id;
|
|
375
|
+
} else {
|
|
376
|
+
context.unresolved.push({
|
|
377
|
+
kind: "selector-target",
|
|
378
|
+
where: context.where,
|
|
379
|
+
detail: `\`sla-status-change\` names the SLA "${title}" in ${scope === "root" ? "the case" : `stage "${named}"`}, and that SLA belongs to ${found.stageId === "root" ? "the case" : "another stage"}, so the rule is left without an \`slaId\` rather than watching an SLA it was not written for`
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
} else if (rule === "wait-for-connector") {
|
|
386
|
+
if (context.connector === undefined || context.connections === undefined || context.bindings === undefined) {
|
|
387
|
+
context.unresolved.push({
|
|
388
|
+
kind: "connector-connection",
|
|
389
|
+
where: context.where,
|
|
390
|
+
detail: "a `wait-for-connector` rule needs its activity's context, and no `**Connector Rule Detail:**` accompanies this stage's entry table, so the rule is written with an empty `context` to fill before debug"
|
|
391
|
+
});
|
|
392
|
+
base.uipath = {
|
|
393
|
+
serviceType: WAIT_FOR_EVENT,
|
|
394
|
+
context: [],
|
|
395
|
+
inputs: [],
|
|
396
|
+
outputs: [],
|
|
397
|
+
bindings: []
|
|
398
|
+
};
|
|
399
|
+
} else {
|
|
400
|
+
const built = connectorContextFor(context.connector, context.where, context.connections, context.bindings, context.unresolved).filter((entry) => entry.name !== "operation" || context.connector?.operation !== undefined);
|
|
401
|
+
const missing = missingActivitySlots(built);
|
|
402
|
+
if (missing.length > 0) {
|
|
403
|
+
context.unresolved.push({
|
|
404
|
+
kind: "connector-context",
|
|
405
|
+
where: context.where,
|
|
406
|
+
detail: `the document names no ${missing.map((name) => `\`${name}\``).join(" or ")} for this \`wait-for-connector\` rule, so it is left out of the rule's \`context\`, to fill before debug`
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
base.uipath = {
|
|
410
|
+
serviceType: WAIT_FOR_EVENT,
|
|
411
|
+
context: built,
|
|
412
|
+
...missing.length > 0 && {
|
|
413
|
+
inputs: [],
|
|
414
|
+
outputs: [],
|
|
415
|
+
bindings: []
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
return base;
|
|
421
|
+
};
|
|
422
|
+
var WAIT_FOR_EVENT = "Intsvc.WaitForEvent";
|
|
423
|
+
var ACTIVITY_SLOTS = ["connectorKey", "operation"];
|
|
424
|
+
var missingActivitySlots = (entries) => ACTIVITY_SLOTS.filter((name) => !entries.some((entry) => entry.name === name && typeof entry.value === "string" && entry.value !== ""));
|
|
425
|
+
var displayNameOf = (condition) => {
|
|
426
|
+
const name = String(condition.displayName ?? "").trim();
|
|
427
|
+
return name === "" ? {} : { displayName: name };
|
|
428
|
+
};
|
|
429
|
+
var entryConditionFor = (condition, context) => {
|
|
430
|
+
const rule = ruleFor(condition, "Rule_", context);
|
|
431
|
+
if (rule === undefined)
|
|
432
|
+
return;
|
|
433
|
+
return {
|
|
434
|
+
id: prefixedId("Condition_", 6),
|
|
435
|
+
...displayNameOf(condition),
|
|
436
|
+
isInterrupting: condition.interrupting === true,
|
|
437
|
+
rules: [[rule]]
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
var caseExitRuleFor = (condition, context) => {
|
|
441
|
+
const rule = ruleFor(condition, "Rule_", context);
|
|
442
|
+
if (rule === undefined)
|
|
443
|
+
return;
|
|
444
|
+
return {
|
|
445
|
+
id: prefixedId("Condition_", 6),
|
|
446
|
+
...displayNameOf(condition),
|
|
447
|
+
marksCaseComplete: condition.marksComplete === true,
|
|
448
|
+
rules: [[rule]]
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
var exitConditionFor = (condition, context) => {
|
|
452
|
+
const rule = ruleFor(condition, "Rule_", context);
|
|
453
|
+
if (rule === undefined)
|
|
454
|
+
return;
|
|
455
|
+
const declaredExit = typeof condition.exitType === "string" && condition.exitType !== "" ? condition.exitType.trim() : undefined;
|
|
456
|
+
const exitType = declaredExit !== undefined && EXIT_CONDITION_TYPES.has(declaredExit) ? declaredExit : undefined;
|
|
457
|
+
if (declaredExit !== undefined && exitType === undefined) {
|
|
458
|
+
context.unresolved.push({
|
|
459
|
+
kind: "case-exit",
|
|
460
|
+
where: `${context.where}.type`,
|
|
461
|
+
detail: `the exit type "${declaredExit}" is none of ${[...EXIT_CONDITION_TYPES].map((type) => `\`${type}\``).join(", ")}, so no type is written — the rule still exits, and whichever of those three the document meant has to be chosen`
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
const exitTo = typeof condition.exitToStage === "string" ? condition.exitToStage : "";
|
|
465
|
+
let exitToStageId;
|
|
466
|
+
if (exitTo !== "") {
|
|
467
|
+
exitToStageId = resolveStage(exitTo, context.stages);
|
|
468
|
+
if (exitToStageId === undefined) {
|
|
469
|
+
context.unresolved.push({
|
|
470
|
+
kind: "selector-target",
|
|
471
|
+
where: context.where,
|
|
472
|
+
detail: `the Exit-To Stage cell names "${exitTo}", which this SDD does not declare as a stage, so the exit routes nowhere`
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return {
|
|
477
|
+
id: prefixedId("Condition_", 6),
|
|
478
|
+
...displayNameOf(condition),
|
|
479
|
+
...exitType !== undefined && { type: exitType },
|
|
480
|
+
...exitToStageId !== undefined && { exitToStageId },
|
|
481
|
+
marksStageComplete: condition.marksComplete === true,
|
|
482
|
+
rules: [[rule]]
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
export { emitBusinessEvents, connectorInputs, connectorContextFor, RULE_VOCABULARY, parseWhen, entryConditionFor, caseExitRuleFor, exitConditionFor };
|
|
487
|
+
|
|
488
|
+
//# debugId=1A5D045F6F14E87464756E2164756E21
|