@uipath/maestro-builder-sdk 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +322 -0
  3. package/dist/bindings-v2.d.ts +37 -0
  4. package/dist/bindings-v2.js +155 -0
  5. package/dist/bindings.d.ts +6 -0
  6. package/dist/bindings.js +6 -0
  7. package/dist/bpmn/bpmn-expr-check.d.ts +41 -0
  8. package/dist/bpmn/bpmn-expr-check.js +218 -0
  9. package/dist/bpmn/bpmn-sdk.d.ts +2257 -0
  10. package/dist/bpmn/bpmn-sdk.js +1476 -0
  11. package/dist/bpmn/check-cli.d.ts +3 -0
  12. package/dist/bpmn/check-cli.js +32 -0
  13. package/dist/bpmn/check.d.ts +25 -0
  14. package/dist/bpmn/check.js +430 -0
  15. package/dist/bpmn/compile-cli.d.ts +3 -0
  16. package/dist/bpmn/compile-cli.js +60 -0
  17. package/dist/bpmn/connector.d.ts +56 -0
  18. package/dist/bpmn/connector.js +199 -0
  19. package/dist/bpmn/decompile-cli.d.ts +8 -0
  20. package/dist/bpmn/decompile-cli.js +54 -0
  21. package/dist/bpmn/decompile.d.ts +6 -0
  22. package/dist/bpmn/decompile.js +1108 -0
  23. package/dist/bpmn/format-profile.d.ts +27 -0
  24. package/dist/bpmn/format-profile.js +11 -0
  25. package/dist/bpmn/intsvc.d.ts +77 -0
  26. package/dist/bpmn/intsvc.js +155 -0
  27. package/dist/bpmn/load.d.ts +4 -0
  28. package/dist/bpmn/load.js +22 -0
  29. package/dist/bpmn/merge-cli.d.ts +3 -0
  30. package/dist/bpmn/merge-cli.js +45 -0
  31. package/dist/bpmn/merge.d.ts +19 -0
  32. package/dist/bpmn/merge.js +293 -0
  33. package/dist/bpmn/registry-types.json +1869 -0
  34. package/dist/bpmn/serialize.d.ts +28 -0
  35. package/dist/bpmn/serialize.js +757 -0
  36. package/dist/bpmn/tidy-cli.d.ts +2 -0
  37. package/dist/bpmn/tidy-cli.js +39 -0
  38. package/dist/bpmn/typed-node.d.ts +382 -0
  39. package/dist/bpmn/typed-node.js +551 -0
  40. package/dist/bpmn/uipath-moddle.v1.json +823 -0
  41. package/dist/bpmn/xml-ranges.d.ts +45 -0
  42. package/dist/bpmn/xml-ranges.js +151 -0
  43. package/dist/case/case-expr-check.d.ts +35 -0
  44. package/dist/case/case-expr-check.js +85 -0
  45. package/dist/case/case-sdk.d.ts +1282 -0
  46. package/dist/case/case-sdk.js +923 -0
  47. package/dist/case/check-cli.d.ts +3 -0
  48. package/dist/case/check-cli.js +31 -0
  49. package/dist/case/check.d.ts +18 -0
  50. package/dist/case/check.js +456 -0
  51. package/dist/case/compile-cli.d.ts +3 -0
  52. package/dist/case/compile-cli.js +291 -0
  53. package/dist/case/decompile-cli.d.ts +9 -0
  54. package/dist/case/decompile-cli.js +117 -0
  55. package/dist/case/decompile.d.ts +187 -0
  56. package/dist/case/decompile.js +1170 -0
  57. package/dist/case/entry-points.d.ts +79 -0
  58. package/dist/case/entry-points.js +118 -0
  59. package/dist/case/format-profile.d.ts +60 -0
  60. package/dist/case/format-profile.js +79 -0
  61. package/dist/case/ids.d.ts +24 -0
  62. package/dist/case/ids.js +76 -0
  63. package/dist/case/load.d.ts +12 -0
  64. package/dist/case/load.js +32 -0
  65. package/dist/case/preserve.d.ts +133 -0
  66. package/dist/case/preserve.js +105 -0
  67. package/dist/case/serialize.d.ts +10 -0
  68. package/dist/case/serialize.js +1414 -0
  69. package/dist/check-cli.d.ts +3 -0
  70. package/dist/check-cli.js +118 -0
  71. package/dist/check.d.ts +146 -0
  72. package/dist/check.js +4898 -0
  73. package/dist/cli/commands/bpmn.d.ts +2 -0
  74. package/dist/cli/commands/bpmn.js +73 -0
  75. package/dist/cli/commands/case.d.ts +2 -0
  76. package/dist/cli/commands/case.js +60 -0
  77. package/dist/cli/commands/flow.d.ts +2 -0
  78. package/dist/cli/commands/flow.js +99 -0
  79. package/dist/cli/commands/registry.d.ts +10 -0
  80. package/dist/cli/commands/registry.js +170 -0
  81. package/dist/cli/common.d.ts +30 -0
  82. package/dist/cli/common.js +92 -0
  83. package/dist/cli/index.d.ts +2 -0
  84. package/dist/cli/index.js +18 -0
  85. package/dist/cli-run.d.ts +2 -0
  86. package/dist/cli-run.js +42 -0
  87. package/dist/compile-cli.d.ts +3 -0
  88. package/dist/compile-cli.js +160 -0
  89. package/dist/config.d.ts +47 -0
  90. package/dist/config.js +201 -0
  91. package/dist/core/actions.d.ts +3244 -0
  92. package/dist/core/actions.js +1062 -0
  93. package/dist/core/binding-messages.d.ts +1 -0
  94. package/dist/core/binding-messages.js +16 -0
  95. package/dist/core/bindings.d.ts +12 -0
  96. package/dist/core/bindings.js +67 -0
  97. package/dist/core/ceql.d.ts +73 -0
  98. package/dist/core/ceql.js +272 -0
  99. package/dist/core/cli-spelling.d.ts +39 -0
  100. package/dist/core/cli-spelling.js +62 -0
  101. package/dist/core/connector-raw-node.d.ts +21 -0
  102. package/dist/core/connector-raw-node.js +47 -0
  103. package/dist/core/connectors.d.ts +184 -0
  104. package/dist/core/connectors.js +128 -0
  105. package/dist/core/expr-check.d.ts +93 -0
  106. package/dist/core/expr-check.js +186 -0
  107. package/dist/core/expr.d.ts +323 -0
  108. package/dist/core/expr.js +400 -0
  109. package/dist/core/index.d.ts +10 -0
  110. package/dist/core/index.js +10 -0
  111. package/dist/core/library.d.ts +440 -0
  112. package/dist/core/library.js +1183 -0
  113. package/dist/core/list-envelope.d.ts +45 -0
  114. package/dist/core/list-envelope.js +97 -0
  115. package/dist/core/lookup-store.d.ts +22 -0
  116. package/dist/core/lookup-store.js +85 -0
  117. package/dist/core/lookups.d.ts +227 -0
  118. package/dist/core/lookups.js +231 -0
  119. package/dist/core/node-classes.d.ts +234 -0
  120. package/dist/core/node-classes.js +158 -0
  121. package/dist/core/script-return.d.ts +68 -0
  122. package/dist/core/script-return.js +197 -0
  123. package/dist/core/stable-id.d.ts +28 -0
  124. package/dist/core/stable-id.js +37 -0
  125. package/dist/core-definitions.json +16249 -0
  126. package/dist/decompile-cli.d.ts +3 -0
  127. package/dist/decompile-cli.js +131 -0
  128. package/dist/decompile.d.ts +138 -0
  129. package/dist/decompile.js +2482 -0
  130. package/dist/emit.d.ts +10 -0
  131. package/dist/emit.js +60 -0
  132. package/dist/event-filters.d.ts +130 -0
  133. package/dist/event-filters.js +137 -0
  134. package/dist/flow-expr-check.d.ts +17 -0
  135. package/dist/flow-expr-check.js +193 -0
  136. package/dist/flow-sdk.d.ts +1341 -0
  137. package/dist/flow-sdk.js +1164 -0
  138. package/dist/flow-variables.d.ts +13 -0
  139. package/dist/flow-variables.js +42 -0
  140. package/dist/format-profile.d.ts +72 -0
  141. package/dist/format-profile.js +97 -0
  142. package/dist/generators/_connections.py +287 -0
  143. package/dist/generators/_events.py +355 -0
  144. package/dist/generators/_lookups.py +114 -0
  145. package/dist/generators/_naming.py +185 -0
  146. package/dist/generators/_objects.py +299 -0
  147. package/dist/generators/_resolve.py +273 -0
  148. package/dist/generators/convert_library_to_md.py +1441 -0
  149. package/dist/generators/extract_library.py +125 -0
  150. package/dist/generators/generate_connectors_ts.py +936 -0
  151. package/dist/generators/generate_library_json.py +2527 -0
  152. package/dist/generators/generate_triggers_ts.py +110 -0
  153. package/dist/generators/materialize_registry.py +155 -0
  154. package/dist/generators/prepare_connector.py +1688 -0
  155. package/dist/index.d.ts +35 -0
  156. package/dist/index.js +35 -0
  157. package/dist/ixp-definition.json +1982 -0
  158. package/dist/library.d.ts +6 -0
  159. package/dist/library.js +6 -0
  160. package/dist/load.d.ts +16 -0
  161. package/dist/load.js +95 -0
  162. package/dist/merge-cli.d.ts +3 -0
  163. package/dist/merge-cli.js +47 -0
  164. package/dist/merge.d.ts +125 -0
  165. package/dist/merge.js +0 -0
  166. package/dist/migrate.d.ts +15 -0
  167. package/dist/migrate.js +245 -0
  168. package/dist/node-runtime.d.ts +3 -0
  169. package/dist/node-runtime.js +22 -0
  170. package/dist/package-name.d.ts +17 -0
  171. package/dist/package-name.js +17 -0
  172. package/dist/ref-resolve.d.ts +77 -0
  173. package/dist/ref-resolve.js +170 -0
  174. package/dist/registry/cache.d.ts +55 -0
  175. package/dist/registry/cache.js +134 -0
  176. package/dist/registry/curated-overlay.d.ts +16 -0
  177. package/dist/registry/curated-overlay.js +62 -0
  178. package/dist/registry/extractor.d.ts +22 -0
  179. package/dist/registry/extractor.js +18 -0
  180. package/dist/registry/materialize-bin.d.ts +2 -0
  181. package/dist/registry/materialize-bin.js +7 -0
  182. package/dist/registry/materialize-cli.d.ts +1 -0
  183. package/dist/registry/materialize-cli.js +46 -0
  184. package/dist/registry/materializer.d.ts +23 -0
  185. package/dist/registry/materializer.js +34 -0
  186. package/dist/registry/path-cli.d.ts +1 -0
  187. package/dist/registry/path-cli.js +56 -0
  188. package/dist/registry/prepare-cli.d.ts +62 -0
  189. package/dist/registry/prepare-cli.js +185 -0
  190. package/dist/registry/pull-cli.d.ts +1 -0
  191. package/dist/registry/pull-cli.js +274 -0
  192. package/dist/registry/python.d.ts +26 -0
  193. package/dist/registry/python.js +46 -0
  194. package/dist/registry/search-cli.d.ts +52 -0
  195. package/dist/registry/search-cli.js +159 -0
  196. package/dist/schema-version.d.ts +165 -0
  197. package/dist/schema-version.js +148 -0
  198. package/dist/serialize.d.ts +64 -0
  199. package/dist/serialize.js +6398 -0
  200. package/lib/README.md +112 -0
  201. package/lib/library-json.samples/index.json +158 -0
  202. package/lib/library-json.samples/invariant-collections.json +83 -0
  203. package/lib/library-json.samples/list-envelopes.json +123 -0
  204. package/lib/library-json.samples/uipath-atlassian-jira/create-issue@1.0.0.json +131 -0
  205. package/lib/library-json.samples/uipath-atlassian-jira/create-issue@1.0.0.v1def.json +306 -0
  206. package/lib/library-json.samples/uipath-atlassian-jira/generic/create_issue/create@1.0.0.json +86 -0
  207. package/lib/library-json.samples/uipath-atlassian-jira/generic/create_issue/create@1.0.0.v1def.json +208 -0
  208. package/lib/library-json.samples/uipath-atlassian-jira/get-issue@1.0.0.json +2040 -0
  209. package/lib/library-json.samples/uipath-atlassian-jira/get-issue@1.0.0.v1def.json +195 -0
  210. package/lib/library-json.samples/uipath-google-vertex/execute-google-vertex-agent@1.0.0.json +169 -0
  211. package/lib/library-json.samples/uipath-google-vertex/execute-google-vertex-agent@1.0.0.v1def.json +209 -0
  212. package/lib/library-json.samples/uipath-http-webhook/event-http-webhook@1.0.0.json +63 -0
  213. package/lib/library-json.samples/uipath-http-webhook/event-http-webhook@1.0.0.v1def.json +262 -0
  214. package/lib/library-json.samples/uipath-http-webhook/trigger-http-webhook@1.0.0.json +63 -0
  215. package/lib/library-json.samples/uipath-http-webhook/trigger-http-webhook@1.0.0.v1def.json +213 -0
  216. package/lib/library-json.samples/uipath-microsoft-azureactivedirectory/list-groups@1.0.0.json +227 -0
  217. package/lib/library-json.samples/uipath-microsoft-azureactivedirectory/list-groups@1.0.0.v1def.json +373 -0
  218. package/lib/library-json.samples/uipath-microsoft-onedrive/event-file-created@1.0.0.json +116 -0
  219. package/lib/library-json.samples/uipath-microsoft-onedrive/event-file-created@1.0.0.v1def.json +369 -0
  220. package/lib/library-json.samples/uipath-microsoft-onedrive/event-list-item-added@1.0.0.json +56 -0
  221. package/lib/library-json.samples/uipath-microsoft-onedrive/event-list-item-added@1.0.0.v1def.json +256 -0
  222. package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-file-created@1.0.0.json +116 -0
  223. package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-file-created@1.0.0.v1def.json +320 -0
  224. package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-list-item-added@1.0.0.json +56 -0
  225. package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-list-item-added@1.0.0.v1def.json +207 -0
  226. package/lib/library-json.samples/uipath-microsoft-outlook365/event-email-received@1.0.0.json +107 -0
  227. package/lib/library-json.samples/uipath-microsoft-outlook365/event-email-received@1.0.0.v1def.json +264 -0
  228. package/lib/library-json.samples/uipath-microsoft-outlook365/send-email@1.0.0.json +142 -0
  229. package/lib/library-json.samples/uipath-microsoft-outlook365/send-email@1.0.0.v1def.json +306 -0
  230. package/lib/library-json.samples/uipath-microsoft-outlook365/trigger-email-received@1.0.0.json +107 -0
  231. package/lib/library-json.samples/uipath-microsoft-outlook365/trigger-email-received@1.0.0.v1def.json +217 -0
  232. package/lib/library-json.samples/uipath-microsoft-powerautomate/invoke-a-microsoft-power-automate-flow@1.0.0.json +85 -0
  233. package/lib/library-json.samples/uipath-microsoft-powerautomate/invoke-a-microsoft-power-automate-flow@1.0.0.v1def.json +209 -0
  234. package/lib/library-json.samples/uipath-salesforce-slack/send-message-to-user@1.0.0.json +755 -0
  235. package/lib/library-json.samples/uipath-salesforce-slack/send-message-to-user@1.0.0.v1def.json +513 -0
  236. package/lib/library-json.samples/uipath-uipath-dataservice/query-entity-records@1.0.0.json +122 -0
  237. package/lib/library-json.samples/uipath-uipath-dataservice/query-entity-records@1.0.0.v1def.json +227 -0
  238. package/package.json +85 -0
@@ -0,0 +1,440 @@
1
+ import { type LookupResolutions, type LookupSpec } from './lookups.js';
2
+ export interface ResolvedConnector {
3
+ nodeType: string;
4
+ version: string;
5
+ /** connector key, e.g. "uipath-salesforce-slack" */
6
+ connectorKey: string;
7
+ connectorName: string;
8
+ httpMethod: string;
9
+ endpoint: string;
10
+ /** stable per-(connector, action) id required by uip >= 1.2 */
11
+ activityTypeId?: string;
12
+ /** the Flow definitions[] entry */
13
+ v1def: any;
14
+ /** the raw library entry (connector + operation metadata) */
15
+ entry: any;
16
+ /**
17
+ * The connector's activity input vocabulary: [{ name, type, required, location }].
18
+ *
19
+ * The union of TWO declarations, because the platform splits a connector
20
+ * operation's inputs across two files (see `readFields`):
21
+ * * the v1def's `inputDefinition.fields` — the request BODY;
22
+ * * the entry's `operation.parameters` — the QUERY and PATH parameters,
23
+ * each tagged with its `type`.
24
+ * `location` says which, and is what `serialize` routes on.
25
+ */
26
+ fields: ConnectorField[];
27
+ /**
28
+ * The operation's multipart TRANSPORT parts, in declaration order — what
29
+ * `detail.multipartParameters` lists, whether or not the author supplies a value.
30
+ *
31
+ * A `file` part is also an author input (it appears in `fields` with
32
+ * `location: 'multipart'` and carries the author's value). A part of any other
33
+ * dataType (`string` for all 105 in the shipped library — Teams `body`, Gmail
34
+ * `body`, GenAI `RagRequest`) is a CONTAINER the runtime composes from
35
+ * `bodyParameters`: it is listed here, never in `fields`, and is emitted
36
+ * without a value. See `readFields`.
37
+ */
38
+ multipartParts: MultipartPart[];
39
+ /**
40
+ * Which OBJECT this resolved operation addresses — `''` for an operation that
41
+ * has none (the `*.http-request` passthroughs; 38 of 7,029 entries).
42
+ */
43
+ objectName: string;
44
+ /**
45
+ * True when the object came from the AUTHOR and no library entry names it — a
46
+ * connection-scoped object (`acr_user`). The schema is a sibling entry's, so
47
+ * `compile` cannot check this operation's inputs against the real thing, and
48
+ * the tenant is what resolves the name. Recorded rather than dropped, so a
49
+ * downstream reader can tell an author-supplied object from a resolved one.
50
+ */
51
+ objectNameUnverified?: boolean;
52
+ /**
53
+ * The measured LIST envelope for this operation, or `undefined` when it is
54
+ * UNDECLARED (see `core/list-envelope.ts` for what the two mean and why the
55
+ * difference is load-bearing). `{envelope: null}` is a measured BARE array;
56
+ * `{envelope: 'records'}` is a measured `{records: […]}` wrapper.
57
+ *
58
+ * An OVERLAY entry may carry `envelope` on the entry JSON itself and it wins
59
+ * over the ledger — that is how a connection-scoped `prepare-connector` result
60
+ * declares one for an operation the shipped ledger has never measured.
61
+ */
62
+ listEnvelope?: {
63
+ envelope: string | null;
64
+ source: string;
65
+ tier: string;
66
+ };
67
+ }
68
+ /**
69
+ * Where a connector input rides on the wire.
70
+ *
71
+ * No operation in the shipped library declares a `header` parameter (measured
72
+ * over all 7,029 entries — 10,705 `query`, 4,161 `path`, 105 `multipart`, zero
73
+ * `header`). The platform knows a `headers` slot because a *configuration*
74
+ * `fieldsContainer` can carry `fieldLocation: 'header'`; that is a different
75
+ * vocabulary, and inventing the surface here would be an unevidenced field.
76
+ */
77
+ export type FieldLocation = 'body' | 'query' | 'path' | 'multipart';
78
+ /** One multipart transport part: `{ name, dataType }` as the platform lists it. */
79
+ export interface MultipartPart {
80
+ name: string;
81
+ dataType: string;
82
+ }
83
+ export interface ConnectorField {
84
+ name: string;
85
+ type?: string;
86
+ required?: boolean;
87
+ displayName?: string;
88
+ /**
89
+ * The wire slot this input goes to — `inputs.detail.{body,query,path}Parameters`
90
+ * / `detail.headers`. Defaults to `body`, which is where an `inputDefinition`
91
+ * field goes and where an untagged input has always gone.
92
+ */
93
+ location?: FieldLocation;
94
+ /** A one-line description, when the declaration carries one (parameters do). */
95
+ description?: string;
96
+ /**
97
+ * The resolvable-value contract, when the declaration carries one.
98
+ *
99
+ * Preserved rather than dropped so `check` can say "this is a lookup field"
100
+ * about a pasted literal. It is the raw registry block, not the generated
101
+ * `LookupSpec` — the classification that decides whether a helper exists at
102
+ * all lives in the generator (`_lookups.py`) and is mirrored by
103
+ * {@link lookupSpecOf} here.
104
+ */
105
+ reference?: {
106
+ objectName?: string;
107
+ path?: string;
108
+ lookupNames?: string[];
109
+ lookupValue?: string;
110
+ filterPattern?: string;
111
+ childPath?: string;
112
+ dependsOn?: string[];
113
+ };
114
+ }
115
+ /** The authored connector identity recovered from an already-resolved wire payload. */
116
+ export interface ConnectorActionIdentity {
117
+ key: string;
118
+ action: string;
119
+ version: string;
120
+ object?: string;
121
+ }
122
+ /** The authored connector event identity recovered from a resolved payload. */
123
+ export interface ConnectorEventIdentity {
124
+ key: string;
125
+ event: string;
126
+ version: string;
127
+ /** The author-chosen object of a GENERIC event (`record-created` on one entity); absent for a curated one. */
128
+ object?: string;
129
+ }
130
+ /**
131
+ * What a library says about a connector event's subscription contract — the
132
+ * `where` half (its event parameters) and the object half.
133
+ *
134
+ * `known: false` means the library declares nothing either way; `names: []` with
135
+ * `known: true` means "this operation takes NO event parameters". `generic` marks
136
+ * a GENERIC event (`activityType: GenericTrigger`): its node type covers every
137
+ * object of the connection, so the author must name one — `object` is then the
138
+ * entry's own object, `''` for a generic entry and the built-in object of a
139
+ * curated one (`Message` for Outlook `email-received`).
140
+ */
141
+ export interface EventParameterFields {
142
+ known: boolean;
143
+ names: string[];
144
+ generic: boolean;
145
+ object: string;
146
+ /**
147
+ * Required parameters that SELECT the event's schema rather than scope its
148
+ * subscription — Jira's `project` and `issuetype`, both required and
149
+ * query-bucket, are what its filter and output fields are derived from.
150
+ * `uip is triggers describe` accepts no parameter values, so wherever this
151
+ * is non-empty the discovered filter vocabulary is a BASELINE that the real
152
+ * one extends, and `check` softens its unknown-field rule accordingly.
153
+ */
154
+ selectors: string[];
155
+ /**
156
+ * The subscription named an object this library has no variant for, on a
157
+ * connector whose objects come from the CONNECTION. The generic template
158
+ * answers in its place — which is why nothing used to notice — but it
159
+ * carries no object's vocabulary, so the author owes a `prepare --object`.
160
+ */
161
+ objectUnprepared: boolean;
162
+ /**
163
+ * The connector discovers CUSTOM FIELDS per connection
164
+ * (`hasCustomFieldDiscovery`) and no overlay has prepared this event, so the
165
+ * baked vocabulary is a strict subset of the tenant's by design. A field
166
+ * outside it may be perfectly real, which is the difference between an
167
+ * error and a warning.
168
+ */
169
+ customFieldsUnprepared: boolean;
170
+ /**
171
+ * The filter vocabulary is a subset NO `prepare` can complete, because this
172
+ * connector's schema comes from the connection and the trigger metadata call
173
+ * accepts no parent values. The activity path has `-f` / `--action` and so
174
+ * has no equivalent — this is the event-only half of the same story.
175
+ */
176
+ filtersPartial: boolean;
177
+ }
178
+ /**
179
+ * What `check` can know, OFFLINE, about whether a connector step's schema is
180
+ * in hand — the fact behind the OBJECT_UNPREPARED / CUSTOM_FIELDS_UNPREPARED
181
+ * warnings. Three kinds, matching the three connector discovery shapes:
182
+ *
183
+ * - `object` — a Generic operation addressed by `{ object }` (SFDC
184
+ * insert-record on `Company__c`): the schema exists per object, only after
185
+ * `registry prepare --object` materializes it into the overlay;
186
+ * - `customFields` — a curated operation whose REAL field set is
187
+ * connection-resolved (Zoho Desk create-ticket: `hasCustomFieldDiscovery`):
188
+ * the baked fields are a subset, the tenant's custom fields arrive only
189
+ * from a prepare;
190
+ * - `static` — nothing owed (Slack send-message: the schema is baked).
191
+ */
192
+ export interface SchemaReadiness {
193
+ kind: 'object' | 'customFields' | 'static';
194
+ /** True when the local layers already carry what the step needs. */
195
+ prepared: boolean;
196
+ /** A materialized variant whose objectName differs only by case — the fix is
197
+ * usually to use this spelling, so it travels as the suggestion. */
198
+ canonical?: string;
199
+ /** For `customFields`: the field names the tenant-agnostic snapshot carries,
200
+ * so the caller can warn ONLY about inputs outside it. */
201
+ bakedFields?: readonly string[];
202
+ }
203
+ export interface LibraryOpts {
204
+ /**
205
+ * An ephemeral, connection-scoped overlay dir (`./connectors-local/`) produced
206
+ * by `prepare-connector`/`prepare-trigger`. Searched BEFORE the baked library,
207
+ * so a locally-prepared entry (with the full connection-resolved field schema)
208
+ * takes precedence. Auto-detected by the compile CLIs next to the
209
+ * `.flow.ts`/`.case.ts`/`.bpmn.ts`, mirroring `bindings.json`.
210
+ *
211
+ * When the same op exists in BOTH layers the field sets are UNIONED, not
212
+ * replaced: the overlay's definition wins per field name (it is
213
+ * connection-resolved), but a field the baked library already had is never
214
+ * dropped. This keeps `prepare-connector` strictly additive — fetching a live
215
+ * schema can only ADD accepted fields, never silently remove ones the baked
216
+ * library exposed (a thin `describe` response must not shrink what compiles).
217
+ */
218
+ overlayDir?: string;
219
+ }
220
+ export declare class Library {
221
+ private layers;
222
+ /** The LIST-ENVELOPE LEDGER, overlay first so a prepared entry can add a row. */
223
+ private envelopeRows;
224
+ /**
225
+ * Everything `prepare --resolve` has recorded, from the overlay only.
226
+ *
227
+ * Never from the baked library: a resolution is a fact about ONE tenant's
228
+ * data, so shipping one in the published archive would hand every consumer an
229
+ * id from someone else's connection.
230
+ */
231
+ readonly lookupResolutions: LookupResolutions;
232
+ /** Collections the ledger declares connector-invariant; overlay unions over baked. */
233
+ private readonly invariantCollections;
234
+ constructor(dir: string, opts?: LibraryOpts);
235
+ /**
236
+ * Resolve a connector ACTION (`uipath.connector.<key>.<action>`).
237
+ *
238
+ * `objectName` picks WHICH object a **generic** operation addresses; see
239
+ * {@link Library.resolveType} for what happens when it is omitted on a
240
+ * nodeType that needs it, and when it names an object the library has never
241
+ * heard of.
242
+ *
243
+ * The event family lives under two sibling namespaces and is resolved by
244
+ * `resolveEvent` below — same files, same sidecar convention, different
245
+ * position in the flow.
246
+ */
247
+ /**
248
+ * One operation's resolvable lookup fields, keyed by the WIRE field name.
249
+ *
250
+ * The same set the descriptor generator emits helpers for, decided by the same
251
+ * rules ({@link lookupSpecOf}) over the same field vocabulary — so a `check`
252
+ * diagnostic can never name a `.by*` the generator did not write.
253
+ *
254
+ * @param key - Connector library key.
255
+ * @param action - Operation id.
256
+ * @param version - Pin an operation version; newest otherwise.
257
+ * @param objectName - The object a generic operation addresses.
258
+ * @returns `{ field: spec }`, empty when the operation has no resolvable lookups.
259
+ */
260
+ lookupSpecs(key: string, action: string, version?: string, objectName?: string): Record<string, LookupSpec>;
261
+ resolve(key: string, action: string, version?: string, objectName?: string): ResolvedConnector;
262
+ /**
263
+ * Whether a connector step's schema is materialized locally — see
264
+ * {@link SchemaReadiness}. Index rows are enough for the `object` question
265
+ * (activityType + objectName travel on every row); the `customFields`
266
+ * question reads one canonical entry, because the discovery flags and
267
+ * `requiresConnectionForSchema` live there and nowhere thinner.
268
+ *
269
+ * `undefined` means "this library has never heard of the operation", which
270
+ * is a different answer from "unprepared": the caller fails open on it, the
271
+ * same rule every other check callback follows.
272
+ */
273
+ schemaReadiness(key: string, action: string, version?: string, object?: string): SchemaReadiness | undefined;
274
+ /**
275
+ * Reverse a resolved connector activity back to the symbolic authoring key.
276
+ * Case decompile uses the same library that compile will use, so it never has
277
+ * to guess an action name from a display label.
278
+ */
279
+ identifyAction(wire: {
280
+ connectorKey: string;
281
+ httpMethod?: string;
282
+ endpoint?: string;
283
+ objectName?: string;
284
+ version?: string;
285
+ }): ConnectorActionIdentity;
286
+ /**
287
+ * Resolve a connector EVENT: the START trigger
288
+ * (`uipath.connector.trigger.<key>.<event>`, a bpmn:StartEvent — the flow
289
+ * begins when the event fires) or the mid-flow wait
290
+ * (`uipath.connector.event.<key>.<event>`, a bpmn:ReceiveTask — the flow pauses
291
+ * until it fires). The platform ships both for one connector operation, with
292
+ * the same `uiPathActivityTypeId`; the namespace is the only difference.
293
+ */
294
+ /**
295
+ * The connector's discovery classification, from whichever layer carries it.
296
+ *
297
+ * `resolveType` takes METADATA from the highest-priority layer, and a
298
+ * `prepare-connector` overlay writes `connector: { key }` with no
299
+ * `discovery` block — and a `runtime.requiresConnectionForSchema: false`
300
+ * that CONTRADICTS the baked library (jira is `hasFieldDiscovery: true`
301
+ * there). So reading discovery off the resolved entry silently reclassifies
302
+ * every prepared connector as static, which is exactly backwards: preparing
303
+ * is what an author does on the connectors whose schema comes from the
304
+ * connection. Fields legitimately come from the overlay; this connector-level
305
+ * fact does not, so it is read across layers and the first real block wins.
306
+ */
307
+ private connectorDiscovery;
308
+ resolveEvent(kind: 'trigger' | 'event', key: string, event: string, version?: string, objectName?: string): ResolvedConnector;
309
+ /**
310
+ * Reverse a resolved connector event payload back to its symbolic event name.
311
+ * Case decompile uses the same library that compile will use, mirroring
312
+ * {@link identifyAction} for connector activities.
313
+ */
314
+ identifyEvent(kind: 'trigger' | 'event', wire: {
315
+ connectorKey: string;
316
+ objectName?: string;
317
+ eventOperation?: string;
318
+ eventMode?: string;
319
+ version?: string;
320
+ }): ConnectorEventIdentity;
321
+ /**
322
+ * The EVENT PARAMETERS a connector event operation declares — the `where` half
323
+ * of a subscription — or `undefined` if the library has never heard of the
324
+ * operation.
325
+ *
326
+ * `{ known: true, names: [] }` and `undefined` are DIFFERENT answers, and the
327
+ * difference is the whole reason this method exists: "this operation takes no
328
+ * event parameters" is a fact (HTTP Webhook scopes by the connection, so its
329
+ * only correct `where` is `{}`), while "I could not look it up" is not. Reading
330
+ * an empty list as "none declared, so scope it anyway" is what made
331
+ * `EVENT_NO_SCOPE` reject correct authoring for four of the FIVE event
332
+ * OPERATIONS the deployed corpus contains.
333
+ *
334
+ * Two declaration sites, in order of authority:
335
+ *
336
+ * 1. the v1def's `eventParameters.fields` — the registry's OWN enrichment,
337
+ * returned verbatim by `uip maestro flow registry get <trigger nodeType>
338
+ * --connection-id <id>`. Present only on the `.trigger.` form (IS enriches
339
+ * per node type, not per operation), so the pair is tried together;
340
+ * 2. the entry's `inputSchema.fields`, where a curated def declares them as
341
+ * `eventParameters.<name>` alongside `filter.<name>` — PR 10's convention.
342
+ *
343
+ * Note this is the one family where `inputSchema.fields` IS authoritative. For
344
+ * connector ACTIONS it is a lossy third summary (`readFields`' doc comment: 5,243
345
+ * of 7,029 entries disagree with the union) — but both event node types ship
346
+ * `inputDefinition: {}` in every version, so there is no other declaration to
347
+ * disagree with, and the whole population is the curated overlay's four defs (the
348
+ * raw library snapshot carries ZERO trigger/event entries).
349
+ */
350
+ eventParameterFields(key: string, event: string, objectName?: string): EventParameterFields | undefined;
351
+ /**
352
+ * The filterable-field names a connector event declares — the vocabulary a
353
+ * `filters` leaf may name.
354
+ *
355
+ * TWO SOURCES, because the platform builds the two kinds of event's filter
356
+ * list differently, and reading one array for both under-advertises the
357
+ * generic form by an order of magnitude:
358
+ *
359
+ * - a CURATED event filters on the fields its definition MARKS
360
+ * (`order: 1` / `isCuratedEventField`), which is what `triggers describe`
361
+ * returns as `FilterFields` and what lands in `v1def.filterFields.fields`.
362
+ * Outlook `email-received`: 15 of the Message resource's 73 fields.
363
+ * - a GENERIC event filters on EVERY field the object supports GET on,
364
+ * which is exactly `triggers describe`'s `OutputFields` and lands in the
365
+ * entry's `outputSchema.fields`. Verified against the connector
366
+ * definitions: jira `issue` 323 fields → 258 GET → 258 output; outlook
367
+ * `Message` 73 → 73 → 73; gmail `Message` 33 → 33 → 33.
368
+ *
369
+ * Reading `filterFields` for both is what made jira `record-created`
370
+ * advertise 2 filterable fields where the designer offers 258, and gmail
371
+ * `new-record-created` advertise none where it offers 33. The union is taken
372
+ * on the generic side rather than a swap, so a connector that populates both
373
+ * (outlook's generic form carries its curated sibling's 15) loses nothing.
374
+ *
375
+ * Only a connection-scoped prepare or an enriched generation writes either
376
+ * array: the thin baked manifests carry none, and for them this answers
377
+ * `undefined` (unknown), never `[]` (known-empty). A GENERIC event's
378
+ * vocabulary is per object, so pass the subscription's `object` to select
379
+ * the prepared variant.
380
+ */
381
+ eventFilterFields(key: string, event: string, objectName?: string): string[] | undefined;
382
+ /**
383
+ * Resolve one library entry for `nodeType`. Two orthogonal concerns compose:
384
+ * - **object selection** within a layer — a GENERIC operation encodes only the
385
+ * verb in its node type and the library expands it into one entry per object,
386
+ * so `objectName` picks which. See `resolveInLayer` for the four cases (#143).
387
+ * - **field union** across layers — a connection-scoped overlay
388
+ * (`prepare-connector`) is searched before the baked library, and the fields
389
+ * of the entries each layer resolves are UNIONED: the overlay can ADD fields
390
+ * but never drop ones the baked library already exposed (C4).
391
+ */
392
+ private resolveType;
393
+ /**
394
+ * Turn a lookup miss into something actionable: which operations this connector
395
+ * DOES carry, the nearest spelling to what was asked for, and where the library
396
+ * being searched actually is.
397
+ *
398
+ * Without this the message was a dead end. In the 2026-09-09 case eval an agent
399
+ * read the tenant's `objectName` (`send-mail-v2`) off `uip maestro case spec`
400
+ * and passed it as the OPERATION slug; the real slug is `send-email`, and
401
+ * `connector not in library: …send-mail-v2.` said nothing that would reveal
402
+ * that. It resorted to grepping the library's JSON out of `node_modules`.
403
+ */
404
+ private describeMiss;
405
+ /**
406
+ * Resolve the op WITHIN one layer, selecting the entry by `objectName` for a
407
+ * GENERIC operation. Returns undefined when the layer does not carry the op;
408
+ * throws on an author error (a missing/ambiguous object). The four cases (#143):
409
+ * (1) one entry — resolved (a disagreeing `objectName` is an error, unless the
410
+ * entry is an un-expanded GENERIC — then accepted connection-scoped like case 4);
411
+ * (2) many + matching `objectName` — that entry; (3) many + no `objectName` — a
412
+ * named error listing the objects; (4) many + an unlisted object — accepted with
413
+ * a warning, synthesized from a sibling entry with the object stamped in. A
414
+ * connector's object set belongs to the CONNECTION, not to the registry snapshot,
415
+ * and the platform's designer resolves such objects live.
416
+ */
417
+ private resolveInLayer;
418
+ /**
419
+ * Pick the sibling entry a connection-scoped object borrows its schema from:
420
+ * the first whose path template is exactly `/<its own objectName>`, else the
421
+ * first whose template merely CONTAINS its object name, else the first entry.
422
+ * Index order breaks every tie, so the choice is stable across builds.
423
+ */
424
+ private pickDerivationSibling;
425
+ private build;
426
+ /**
427
+ * The measured LIST envelope for one resolved operation, if any.
428
+ *
429
+ * Two sources, entry-first: an OVERLAY entry may declare `envelope` on the
430
+ * entry JSON (a `prepare-connector` result that measured it live), and that
431
+ * wins; otherwise the shipped ledger beside `index.json`. Nothing is inferred
432
+ * — an operation the ledger has never measured comes back undeclared, and
433
+ * every consumer treats that as "behave exactly as before" (#156).
434
+ *
435
+ * Fenced to the LIST verb: the envelope question is only about a collection,
436
+ * and a row against a non-List operation would be a ledger mistake, so it is
437
+ * ignored rather than honoured.
438
+ */
439
+ private resolveListEnvelope;
440
+ }