arc-1 1.5.2 → 1.7.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 (472) hide show
  1. package/README.md +26 -16
  2. package/bin/arc1-source.js +83 -0
  3. package/dist/adt/accept-fallback.d.ts +4 -0
  4. package/dist/adt/accept-fallback.d.ts.map +1 -0
  5. package/dist/adt/accept-fallback.js +27 -0
  6. package/dist/adt/accept-fallback.js.map +1 -0
  7. package/dist/adt/api-release.d.ts +40 -0
  8. package/dist/adt/api-release.d.ts.map +1 -0
  9. package/dist/adt/api-release.js +224 -0
  10. package/dist/adt/api-release.js.map +1 -0
  11. package/dist/adt/application-log.d.ts +36 -0
  12. package/dist/adt/application-log.d.ts.map +1 -0
  13. package/dist/adt/application-log.js +143 -0
  14. package/dist/adt/application-log.js.map +1 -0
  15. package/dist/adt/authorization-trace.d.ts.map +1 -1
  16. package/dist/adt/authorization-trace.js +2 -1
  17. package/dist/adt/authorization-trace.js.map +1 -1
  18. package/dist/adt/class-structure.d.ts +2 -1
  19. package/dist/adt/class-structure.d.ts.map +1 -1
  20. package/dist/adt/class-structure.js +28 -10
  21. package/dist/adt/class-structure.js.map +1 -1
  22. package/dist/adt/client.d.ts +12 -6
  23. package/dist/adt/client.d.ts.map +1 -1
  24. package/dist/adt/client.js +32 -49
  25. package/dist/adt/client.js.map +1 -1
  26. package/dist/adt/codeintel.d.ts +9 -23
  27. package/dist/adt/codeintel.d.ts.map +1 -1
  28. package/dist/adt/codeintel.js +14 -34
  29. package/dist/adt/codeintel.js.map +1 -1
  30. package/dist/adt/ddic-xml.d.ts +5 -3
  31. package/dist/adt/ddic-xml.d.ts.map +1 -1
  32. package/dist/adt/ddic-xml.js +14 -0
  33. package/dist/adt/ddic-xml.js.map +1 -1
  34. package/dist/adt/devtools.d.ts +8 -1
  35. package/dist/adt/devtools.d.ts.map +1 -1
  36. package/dist/adt/devtools.js +94 -40
  37. package/dist/adt/devtools.js.map +1 -1
  38. package/dist/adt/diagnostics.d.ts +2 -0
  39. package/dist/adt/diagnostics.d.ts.map +1 -1
  40. package/dist/adt/diagnostics.js +10 -8
  41. package/dist/adt/diagnostics.js.map +1 -1
  42. package/dist/adt/enhancement-impl.d.ts +125 -0
  43. package/dist/adt/enhancement-impl.d.ts.map +1 -0
  44. package/dist/adt/enhancement-impl.js +408 -0
  45. package/dist/adt/enhancement-impl.js.map +1 -0
  46. package/dist/adt/enhancements.d.ts.map +1 -1
  47. package/dist/adt/enhancements.js +4 -2
  48. package/dist/adt/enhancements.js.map +1 -1
  49. package/dist/adt/enho-filter.d.ts +49 -0
  50. package/dist/adt/enho-filter.d.ts.map +1 -0
  51. package/dist/adt/enho-filter.js +229 -0
  52. package/dist/adt/enho-filter.js.map +1 -0
  53. package/dist/adt/errors.d.ts +5 -1
  54. package/dist/adt/errors.d.ts.map +1 -1
  55. package/dist/adt/errors.js +32 -8
  56. package/dist/adt/errors.js.map +1 -1
  57. package/dist/adt/features.d.ts +3 -9
  58. package/dist/adt/features.d.ts.map +1 -1
  59. package/dist/adt/features.js +24 -8
  60. package/dist/adt/features.js.map +1 -1
  61. package/dist/adt/feed-schema.d.ts +32 -0
  62. package/dist/adt/feed-schema.d.ts.map +1 -0
  63. package/dist/adt/feed-schema.js +123 -0
  64. package/dist/adt/feed-schema.js.map +1 -0
  65. package/dist/adt/fm-parameter-docs.d.ts +7 -0
  66. package/dist/adt/fm-parameter-docs.d.ts.map +1 -0
  67. package/dist/adt/fm-parameter-docs.js +134 -0
  68. package/dist/adt/fm-parameter-docs.js.map +1 -0
  69. package/dist/adt/fm-signature.d.ts +8 -1
  70. package/dist/adt/fm-signature.d.ts.map +1 -1
  71. package/dist/adt/fm-signature.js +37 -28
  72. package/dist/adt/fm-signature.js.map +1 -1
  73. package/dist/adt/http-deadline.d.ts.map +1 -1
  74. package/dist/adt/http-deadline.js +4 -1
  75. package/dist/adt/http-deadline.js.map +1 -1
  76. package/dist/adt/http-retry-after.d.ts +20 -0
  77. package/dist/adt/http-retry-after.d.ts.map +1 -0
  78. package/dist/adt/http-retry-after.js +37 -0
  79. package/dist/adt/http-retry-after.js.map +1 -0
  80. package/dist/adt/http.d.ts +7 -20
  81. package/dist/adt/http.d.ts.map +1 -1
  82. package/dist/adt/http.js +112 -135
  83. package/dist/adt/http.js.map +1 -1
  84. package/dist/adt/include-expansion.d.ts +143 -0
  85. package/dist/adt/include-expansion.d.ts.map +1 -0
  86. package/dist/adt/include-expansion.js +475 -0
  87. package/dist/adt/include-expansion.js.map +1 -0
  88. package/dist/adt/internal-data-operations.d.ts +3 -3
  89. package/dist/adt/internal-data-operations.d.ts.map +1 -1
  90. package/dist/adt/internal-data-operations.js +9 -2
  91. package/dist/adt/internal-data-operations.js.map +1 -1
  92. package/dist/adt/legacy-content-handler.d.ts +2 -0
  93. package/dist/adt/legacy-content-handler.d.ts.map +1 -1
  94. package/dist/adt/legacy-content-handler.js +13 -1
  95. package/dist/adt/legacy-content-handler.js.map +1 -1
  96. package/dist/adt/package-contents.d.ts +5 -0
  97. package/dist/adt/package-contents.d.ts.map +1 -1
  98. package/dist/adt/package-contents.js +31 -0
  99. package/dist/adt/package-contents.js.map +1 -1
  100. package/dist/adt/rap-generate.d.ts +2 -4
  101. package/dist/adt/rap-generate.d.ts.map +1 -1
  102. package/dist/adt/rap-generate.js +2 -4
  103. package/dist/adt/rap-generate.js.map +1 -1
  104. package/dist/adt/revision-feed.d.ts +8 -0
  105. package/dist/adt/revision-feed.d.ts.map +1 -0
  106. package/dist/adt/revision-feed.js +108 -0
  107. package/dist/adt/revision-feed.js.map +1 -0
  108. package/dist/adt/security-session-gate.d.ts +23 -0
  109. package/dist/adt/security-session-gate.d.ts.map +1 -0
  110. package/dist/adt/security-session-gate.js +56 -0
  111. package/dist/adt/security-session-gate.js.map +1 -0
  112. package/dist/adt/server-driven.d.ts +12 -1
  113. package/dist/adt/server-driven.d.ts.map +1 -1
  114. package/dist/adt/server-driven.js +22 -4
  115. package/dist/adt/server-driven.js.map +1 -1
  116. package/dist/adt/source-diff.d.ts +4 -1
  117. package/dist/adt/source-diff.d.ts.map +1 -1
  118. package/dist/adt/source-diff.js +5 -3
  119. package/dist/adt/source-diff.js.map +1 -1
  120. package/dist/adt/stored-text/chunks.d.ts +8 -0
  121. package/dist/adt/stored-text/chunks.d.ts.map +1 -0
  122. package/dist/adt/stored-text/chunks.js +55 -0
  123. package/dist/adt/stored-text/chunks.js.map +1 -0
  124. package/dist/adt/stored-text/decoder.d.ts +31 -0
  125. package/dist/adt/stored-text/decoder.d.ts.map +1 -0
  126. package/dist/adt/stored-text/decoder.js +319 -0
  127. package/dist/adt/stored-text/decoder.js.map +1 -0
  128. package/dist/adt/stored-text/errors.d.ts +10 -0
  129. package/dist/adt/stored-text/errors.d.ts.map +1 -0
  130. package/dist/adt/stored-text/errors.js +10 -0
  131. package/dist/adt/stored-text/errors.js.map +1 -0
  132. package/dist/adt/stored-text/index.d.ts +7 -0
  133. package/dist/adt/stored-text/index.d.ts.map +1 -0
  134. package/dist/adt/stored-text/index.js +6 -0
  135. package/dist/adt/stored-text/index.js.map +1 -0
  136. package/dist/adt/stored-text/key.d.ts +3 -0
  137. package/dist/adt/stored-text/key.d.ts.map +1 -0
  138. package/dist/adt/stored-text/key.js +23 -0
  139. package/dist/adt/stored-text/key.js.map +1 -0
  140. package/dist/adt/stored-text/reader.d.ts +52 -0
  141. package/dist/adt/stored-text/reader.d.ts.map +1 -0
  142. package/dist/adt/stored-text/reader.js +142 -0
  143. package/dist/adt/stored-text/reader.js.map +1 -0
  144. package/dist/adt/stored-text/source.d.ts +5 -0
  145. package/dist/adt/stored-text/source.d.ts.map +1 -0
  146. package/dist/adt/stored-text/source.js +284 -0
  147. package/dist/adt/stored-text/source.js.map +1 -0
  148. package/dist/adt/stored-text/types.d.ts +38 -0
  149. package/dist/adt/stored-text/types.d.ts.map +1 -0
  150. package/dist/adt/stored-text/types.js +2 -0
  151. package/dist/adt/stored-text/types.js.map +1 -0
  152. package/dist/adt/structure-hierarchy.d.ts.map +1 -1
  153. package/dist/adt/structure-hierarchy.js +11 -27
  154. package/dist/adt/structure-hierarchy.js.map +1 -1
  155. package/dist/adt/syntax-batch.d.ts +66 -0
  156. package/dist/adt/syntax-batch.d.ts.map +1 -0
  157. package/dist/adt/syntax-batch.js +115 -0
  158. package/dist/adt/syntax-batch.js.map +1 -0
  159. package/dist/adt/table-index.d.ts +23 -0
  160. package/dist/adt/table-index.d.ts.map +1 -0
  161. package/dist/adt/table-index.js +69 -0
  162. package/dist/adt/table-index.js.map +1 -0
  163. package/dist/adt/table-query.d.ts +4 -2
  164. package/dist/adt/table-query.d.ts.map +1 -1
  165. package/dist/adt/table-query.js +37 -10
  166. package/dist/adt/table-query.js.map +1 -1
  167. package/dist/adt/table-settings.d.ts +67 -0
  168. package/dist/adt/table-settings.d.ts.map +1 -0
  169. package/dist/adt/table-settings.js +207 -0
  170. package/dist/adt/table-settings.js.map +1 -0
  171. package/dist/adt/text-elements.d.ts +7 -1
  172. package/dist/adt/text-elements.d.ts.map +1 -1
  173. package/dist/adt/text-elements.js +67 -25
  174. package/dist/adt/text-elements.js.map +1 -1
  175. package/dist/adt/text-part-changes.d.ts +4 -0
  176. package/dist/adt/text-part-changes.d.ts.map +1 -0
  177. package/dist/adt/text-part-changes.js +43 -0
  178. package/dist/adt/text-part-changes.js.map +1 -0
  179. package/dist/adt/transport-diff.d.ts +16 -25
  180. package/dist/adt/transport-diff.d.ts.map +1 -1
  181. package/dist/adt/transport-diff.js +201 -103
  182. package/dist/adt/transport-diff.js.map +1 -1
  183. package/dist/adt/transport-review-budget.d.ts +15 -0
  184. package/dist/adt/transport-review-budget.d.ts.map +1 -0
  185. package/dist/adt/transport-review-budget.js +57 -0
  186. package/dist/adt/transport-review-budget.js.map +1 -0
  187. package/dist/adt/transport.d.ts +1 -1
  188. package/dist/adt/transport.d.ts.map +1 -1
  189. package/dist/adt/transport.js +4 -3
  190. package/dist/adt/transport.js.map +1 -1
  191. package/dist/adt/types.d.ts +10 -4
  192. package/dist/adt/types.d.ts.map +1 -1
  193. package/dist/adt/user-agent.d.ts +1 -1
  194. package/dist/adt/where-used-native.d.ts +22 -0
  195. package/dist/adt/where-used-native.d.ts.map +1 -0
  196. package/dist/adt/where-used-native.js +111 -0
  197. package/dist/adt/where-used-native.js.map +1 -0
  198. package/dist/adt/xml-parser.d.ts +6 -36
  199. package/dist/adt/xml-parser.d.ts.map +1 -1
  200. package/dist/adt/xml-parser.js +28 -235
  201. package/dist/adt/xml-parser.js.map +1 -1
  202. package/dist/aff/validator.d.ts.map +1 -1
  203. package/dist/aff/validator.js +8 -2
  204. package/dist/aff/validator.js.map +1 -1
  205. package/dist/authz/policy.d.ts.map +1 -1
  206. package/dist/authz/policy.js +10 -2
  207. package/dist/authz/policy.js.map +1 -1
  208. package/dist/cache/sqlite-driver.d.ts +24 -0
  209. package/dist/cache/sqlite-driver.d.ts.map +1 -0
  210. package/dist/cache/sqlite-driver.js +59 -0
  211. package/dist/cache/sqlite-driver.js.map +1 -0
  212. package/dist/cache/sqlite.d.ts +4 -2
  213. package/dist/cache/sqlite.d.ts.map +1 -1
  214. package/dist/cache/sqlite.js +5 -4
  215. package/dist/cache/sqlite.js.map +1 -1
  216. package/dist/cli.js +4 -1
  217. package/dist/cli.js.map +1 -1
  218. package/dist/context/grep.d.ts +2 -0
  219. package/dist/context/grep.d.ts.map +1 -1
  220. package/dist/context/grep.js +8 -7
  221. package/dist/context/grep.js.map +1 -1
  222. package/dist/context/line-range.d.ts +6 -0
  223. package/dist/context/line-range.d.ts.map +1 -0
  224. package/dist/context/line-range.js +23 -0
  225. package/dist/context/line-range.js.map +1 -0
  226. package/dist/extract-sap-cookies.js +1 -0
  227. package/dist/extract-sap-cookies.js.map +1 -1
  228. package/dist/handlers/activate.d.ts.map +1 -1
  229. package/dist/handlers/activate.js +69 -7
  230. package/dist/handlers/activate.js.map +1 -1
  231. package/dist/handlers/activation-results.d.ts.map +1 -1
  232. package/dist/handlers/activation-results.js +9 -1
  233. package/dist/handlers/activation-results.js.map +1 -1
  234. package/dist/handlers/api-release-fields.d.ts +23 -0
  235. package/dist/handlers/api-release-fields.d.ts.map +1 -0
  236. package/dist/handlers/api-release-fields.js +21 -0
  237. package/dist/handlers/api-release-fields.js.map +1 -0
  238. package/dist/handlers/application-log-input.d.ts +32 -0
  239. package/dist/handlers/application-log-input.d.ts.map +1 -0
  240. package/dist/handlers/application-log-input.js +34 -0
  241. package/dist/handlers/application-log-input.js.map +1 -0
  242. package/dist/handlers/application-log.d.ts +4 -0
  243. package/dist/handlers/application-log.d.ts.map +1 -0
  244. package/dist/handlers/application-log.js +14 -0
  245. package/dist/handlers/application-log.js.map +1 -0
  246. package/dist/handlers/cds-hints.d.ts +2 -2
  247. package/dist/handlers/cds-hints.d.ts.map +1 -1
  248. package/dist/handlers/cds-hints.js +21 -63
  249. package/dist/handlers/cds-hints.js.map +1 -1
  250. package/dist/handlers/context.d.ts.map +1 -1
  251. package/dist/handlers/context.js +7 -3
  252. package/dist/handlers/context.js.map +1 -1
  253. package/dist/handlers/diagnose.d.ts.map +1 -1
  254. package/dist/handlers/diagnose.js +10 -1
  255. package/dist/handlers/diagnose.js.map +1 -1
  256. package/dist/handlers/dispatch.d.ts.map +1 -1
  257. package/dist/handlers/dispatch.js +54 -9
  258. package/dist/handlers/dispatch.js.map +1 -1
  259. package/dist/handlers/dump-filter-inputs.d.ts +38 -0
  260. package/dist/handlers/dump-filter-inputs.d.ts.map +1 -0
  261. package/dist/handlers/dump-filter-inputs.js +44 -0
  262. package/dist/handlers/dump-filter-inputs.js.map +1 -0
  263. package/dist/handlers/expanded-read.d.ts +24 -0
  264. package/dist/handlers/expanded-read.d.ts.map +1 -0
  265. package/dist/handlers/expanded-read.js +56 -0
  266. package/dist/handlers/expanded-read.js.map +1 -0
  267. package/dist/handlers/feature-cache.d.ts +11 -3
  268. package/dist/handlers/feature-cache.d.ts.map +1 -1
  269. package/dist/handlers/feature-cache.js +57 -3
  270. package/dist/handlers/feature-cache.js.map +1 -1
  271. package/dist/handlers/function-parameter-language.d.ts +5 -0
  272. package/dist/handlers/function-parameter-language.d.ts.map +1 -0
  273. package/dist/handlers/function-parameter-language.js +19 -0
  274. package/dist/handlers/function-parameter-language.js.map +1 -0
  275. package/dist/handlers/function-processing.d.ts +5 -0
  276. package/dist/handlers/function-processing.d.ts.map +1 -1
  277. package/dist/handlers/function-processing.js +5 -0
  278. package/dist/handlers/function-processing.js.map +1 -1
  279. package/dist/handlers/hyperfocused.d.ts +1 -1
  280. package/dist/handlers/hyperfocused.d.ts.map +1 -1
  281. package/dist/handlers/hyperfocused.js +2 -1
  282. package/dist/handlers/hyperfocused.js.map +1 -1
  283. package/dist/handlers/long-text-input.d.ts +113 -0
  284. package/dist/handlers/long-text-input.d.ts.map +1 -0
  285. package/dist/handlers/long-text-input.js +113 -0
  286. package/dist/handlers/long-text-input.js.map +1 -0
  287. package/dist/handlers/long-text.d.ts +5 -0
  288. package/dist/handlers/long-text.d.ts.map +1 -0
  289. package/dist/handlers/long-text.js +122 -0
  290. package/dist/handlers/long-text.js.map +1 -0
  291. package/dist/handlers/manage.d.ts.map +1 -1
  292. package/dist/handlers/manage.js +7 -23
  293. package/dist/handlers/manage.js.map +1 -1
  294. package/dist/handlers/navigate.d.ts.map +1 -1
  295. package/dist/handlers/navigate.js +8 -3
  296. package/dist/handlers/navigate.js.map +1 -1
  297. package/dist/handlers/object-types.d.ts.map +1 -1
  298. package/dist/handlers/object-types.js +31 -7
  299. package/dist/handlers/object-types.js.map +1 -1
  300. package/dist/handlers/query-input.d.ts +50 -0
  301. package/dist/handlers/query-input.d.ts.map +1 -0
  302. package/dist/handlers/query-input.js +59 -0
  303. package/dist/handlers/query-input.js.map +1 -0
  304. package/dist/handlers/query-tool.d.ts +11 -0
  305. package/dist/handlers/query-tool.d.ts.map +1 -0
  306. package/dist/handlers/query-tool.js +99 -0
  307. package/dist/handlers/query-tool.js.map +1 -0
  308. package/dist/handlers/query.d.ts +1 -1
  309. package/dist/handlers/query.d.ts.map +1 -1
  310. package/dist/handlers/query.js +7 -1
  311. package/dist/handlers/query.js.map +1 -1
  312. package/dist/handlers/read.d.ts +1 -0
  313. package/dist/handlers/read.d.ts.map +1 -1
  314. package/dist/handlers/read.js +119 -14
  315. package/dist/handlers/read.js.map +1 -1
  316. package/dist/handlers/schemas.d.ts +57 -4
  317. package/dist/handlers/schemas.d.ts.map +1 -1
  318. package/dist/handlers/schemas.js +140 -17
  319. package/dist/handlers/schemas.js.map +1 -1
  320. package/dist/handlers/search.d.ts.map +1 -1
  321. package/dist/handlers/search.js +10 -6
  322. package/dist/handlers/search.js.map +1 -1
  323. package/dist/handlers/syntax.d.ts.map +1 -1
  324. package/dist/handlers/syntax.js +8 -0
  325. package/dist/handlers/syntax.js.map +1 -1
  326. package/dist/handlers/table-type-fields.d.ts +33 -0
  327. package/dist/handlers/table-type-fields.d.ts.map +1 -0
  328. package/dist/handlers/table-type-fields.js +22 -0
  329. package/dist/handlers/table-type-fields.js.map +1 -0
  330. package/dist/handlers/tool-descriptions.d.ts.map +1 -1
  331. package/dist/handlers/tool-descriptions.js +8 -3
  332. package/dist/handlers/tool-descriptions.js.map +1 -1
  333. package/dist/handlers/tool-registry.d.ts +5 -5
  334. package/dist/handlers/tool-registry.d.ts.map +1 -1
  335. package/dist/handlers/tool-registry.js +10 -7
  336. package/dist/handlers/tool-registry.js.map +1 -1
  337. package/dist/handlers/tools.d.ts +1 -1
  338. package/dist/handlers/tools.d.ts.map +1 -1
  339. package/dist/handlers/tools.js +99 -101
  340. package/dist/handlers/tools.js.map +1 -1
  341. package/dist/handlers/transport-review.d.ts +5 -0
  342. package/dist/handlers/transport-review.d.ts.map +1 -0
  343. package/dist/handlers/transport-review.js +108 -0
  344. package/dist/handlers/transport-review.js.map +1 -0
  345. package/dist/handlers/transport.d.ts.map +1 -1
  346. package/dist/handlers/transport.js +3 -58
  347. package/dist/handlers/transport.js.map +1 -1
  348. package/dist/handlers/where-used-details.d.ts +28 -0
  349. package/dist/handlers/where-used-details.d.ts.map +1 -0
  350. package/dist/handlers/where-used-details.js +67 -0
  351. package/dist/handlers/where-used-details.js.map +1 -0
  352. package/dist/handlers/where-used.d.ts +8 -3
  353. package/dist/handlers/where-used.d.ts.map +1 -1
  354. package/dist/handlers/where-used.js +40 -18
  355. package/dist/handlers/where-used.js.map +1 -1
  356. package/dist/handlers/write/create.d.ts.map +1 -1
  357. package/dist/handlers/write/create.js +69 -27
  358. package/dist/handlers/write/create.js.map +1 -1
  359. package/dist/handlers/write/rap.d.ts.map +1 -1
  360. package/dist/handlers/write/rap.js +2 -4
  361. package/dist/handlers/write/rap.js.map +1 -1
  362. package/dist/handlers/write/table-settings.d.ts +5 -0
  363. package/dist/handlers/write/table-settings.d.ts.map +1 -0
  364. package/dist/handlers/write/table-settings.js +27 -0
  365. package/dist/handlers/write/table-settings.js.map +1 -0
  366. package/dist/handlers/write/update-delete.d.ts +1 -1
  367. package/dist/handlers/write/update-delete.d.ts.map +1 -1
  368. package/dist/handlers/write/update-delete.js +32 -12
  369. package/dist/handlers/write/update-delete.js.map +1 -1
  370. package/dist/handlers/write-helpers.d.ts +4 -1
  371. package/dist/handlers/write-helpers.d.ts.map +1 -1
  372. package/dist/handlers/write-helpers.js +68 -8
  373. package/dist/handlers/write-helpers.js.map +1 -1
  374. package/dist/handlers/write.d.ts.map +1 -1
  375. package/dist/handlers/write.js +6 -10
  376. package/dist/handlers/write.js.map +1 -1
  377. package/dist/server/audit.d.ts +4 -0
  378. package/dist/server/audit.d.ts.map +1 -1
  379. package/dist/server/audit.js +49 -2
  380. package/dist/server/audit.js.map +1 -1
  381. package/dist/server/config.d.ts.map +1 -1
  382. package/dist/server/config.js +43 -2
  383. package/dist/server/config.js.map +1 -1
  384. package/dist/server/destination-discovery.d.ts +12 -2
  385. package/dist/server/destination-discovery.d.ts.map +1 -1
  386. package/dist/server/destination-discovery.js +33 -7
  387. package/dist/server/destination-discovery.js.map +1 -1
  388. package/dist/server/destination-registry.d.ts +10 -6
  389. package/dist/server/destination-registry.d.ts.map +1 -1
  390. package/dist/server/destination-registry.js +38 -15
  391. package/dist/server/destination-registry.js.map +1 -1
  392. package/dist/server/http-request-body.d.ts +4 -0
  393. package/dist/server/http-request-body.d.ts.map +1 -0
  394. package/dist/server/http-request-body.js +65 -0
  395. package/dist/server/http-request-body.js.map +1 -0
  396. package/dist/server/http.d.ts +5 -2
  397. package/dist/server/http.d.ts.map +1 -1
  398. package/dist/server/http.js +71 -9
  399. package/dist/server/http.js.map +1 -1
  400. package/dist/server/multi-target-authorization-audit.d.ts +5 -0
  401. package/dist/server/multi-target-authorization-audit.d.ts.map +1 -0
  402. package/dist/server/multi-target-authorization-audit.js +18 -0
  403. package/dist/server/multi-target-authorization-audit.js.map +1 -0
  404. package/dist/server/multi-target-authorization-startup.d.ts +8 -0
  405. package/dist/server/multi-target-authorization-startup.d.ts.map +1 -0
  406. package/dist/server/multi-target-authorization-startup.js +38 -0
  407. package/dist/server/multi-target-authorization-startup.js.map +1 -0
  408. package/dist/server/multi-target-authorization.d.ts +29 -0
  409. package/dist/server/multi-target-authorization.d.ts.map +1 -0
  410. package/dist/server/multi-target-authorization.js +97 -0
  411. package/dist/server/multi-target-authorization.js.map +1 -0
  412. package/dist/server/multi-target-bearer-auth.d.ts +5 -0
  413. package/dist/server/multi-target-bearer-auth.d.ts.map +1 -0
  414. package/dist/server/multi-target-bearer-auth.js +39 -0
  415. package/dist/server/multi-target-bearer-auth.js.map +1 -0
  416. package/dist/server/multi-target-catalog-enforced.d.ts +29 -0
  417. package/dist/server/multi-target-catalog-enforced.d.ts.map +1 -0
  418. package/dist/server/multi-target-catalog-enforced.js +142 -0
  419. package/dist/server/multi-target-catalog-enforced.js.map +1 -0
  420. package/dist/server/multi-target-catalog-projection.d.ts +7 -0
  421. package/dist/server/multi-target-catalog-projection.d.ts.map +1 -0
  422. package/dist/server/multi-target-catalog-projection.js +52 -0
  423. package/dist/server/multi-target-catalog-projection.js.map +1 -0
  424. package/dist/server/multi-target-feature-state.d.ts +0 -2
  425. package/dist/server/multi-target-feature-state.d.ts.map +1 -1
  426. package/dist/server/multi-target-feature-state.js +0 -19
  427. package/dist/server/multi-target-feature-state.js.map +1 -1
  428. package/dist/server/multi-target-identity.d.ts +3 -0
  429. package/dist/server/multi-target-identity.d.ts.map +1 -1
  430. package/dist/server/multi-target-identity.js +9 -0
  431. package/dist/server/multi-target-identity.js.map +1 -1
  432. package/dist/server/multi-target-request-projection.d.ts +14 -0
  433. package/dist/server/multi-target-request-projection.d.ts.map +1 -0
  434. package/dist/server/multi-target-request-projection.js +16 -0
  435. package/dist/server/multi-target-request-projection.js.map +1 -0
  436. package/dist/server/multi-target-runtime.d.ts.map +1 -1
  437. package/dist/server/multi-target-runtime.js +1 -0
  438. package/dist/server/multi-target-runtime.js.map +1 -1
  439. package/dist/server/multi-target-server.d.ts +4 -1
  440. package/dist/server/multi-target-server.d.ts.map +1 -1
  441. package/dist/server/multi-target-server.js +111 -11
  442. package/dist/server/multi-target-server.js.map +1 -1
  443. package/dist/server/multi-target-tools.d.ts +1 -1
  444. package/dist/server/multi-target-tools.d.ts.map +1 -1
  445. package/dist/server/multi-target-tools.js +22 -15
  446. package/dist/server/multi-target-tools.js.map +1 -1
  447. package/dist/server/private-mcp-response.d.ts +4 -0
  448. package/dist/server/private-mcp-response.d.ts.map +1 -0
  449. package/dist/server/private-mcp-response.js +14 -0
  450. package/dist/server/private-mcp-response.js.map +1 -0
  451. package/dist/server/server-cache.d.ts +5 -0
  452. package/dist/server/server-cache.d.ts.map +1 -0
  453. package/dist/server/server-cache.js +30 -0
  454. package/dist/server/server-cache.js.map +1 -0
  455. package/dist/server/server.d.ts +7 -21
  456. package/dist/server/server.d.ts.map +1 -1
  457. package/dist/server/server.js +60 -89
  458. package/dist/server/server.js.map +1 -1
  459. package/dist/server/sinks/btp-auditlog.d.ts.map +1 -1
  460. package/dist/server/sinks/btp-auditlog.js +4 -1
  461. package/dist/server/sinks/btp-auditlog.js.map +1 -1
  462. package/dist/server/tool-auth.d.ts +1 -1
  463. package/dist/server/tool-auth.d.ts.map +1 -1
  464. package/dist/server/tool-auth.js +24 -4
  465. package/dist/server/tool-auth.js.map +1 -1
  466. package/dist/server/types.d.ts +7 -0
  467. package/dist/server/types.d.ts.map +1 -1
  468. package/dist/server/types.js +4 -0
  469. package/dist/server/types.js.map +1 -1
  470. package/dist/version.d.ts +1 -1
  471. package/dist/version.js +1 -1
  472. package/package.json +21 -13
package/README.md CHANGED
@@ -23,7 +23,7 @@ Built for organizations that need AI-assisted SAP development with guardrails. I
23
23
  - **Safe by default** — read-only, no free SQL, no table preview, no transport writes, no Git writes. Enable each capability with explicit `SAP_ALLOW_*` flags
24
24
  - **Action deny list** — block specific tool actions with `SAP_DENY_ACTIONS` (for example `SAPWrite.delete`), without exposing low-level operation codes to admins
25
25
  - **Package restrictions** — limit AI write operations (create, update, delete) to specific packages with wildcards (`--allowed-packages "Z*,$TMP"`). Read operations are not restricted by package — use SAP's native authorization for read-level access control
26
- - **Data access control (off by default)** — `SAPRead(type=TABLE_CONTENTS)` and `SAPQuery` are gated behind explicit env vars (`SAP_ALLOW_DATA_PREVIEW=true`, `SAP_ALLOW_FREE_SQL=true`). These capabilities can expose application data or run ad-hoc SQL, so they are intentionally separated from the default development-tooling surface. They can be enabled for governed use cases, but should be reviewed against the [SAP API Policy](docs_page/sap-api-policy-and-architecture.md), your SAP agreement, and internal data-governance rules
26
+ - **Data access control (off by default)** — table previews, saved SAPscript texts and SLG1 messages require `SAP_ALLOW_DATA_PREVIEW=true`; freestyle SQL separately requires `SAP_ALLOW_FREE_SQL=true`. Review enabled uses against the [SAP API Policy](docs_page/sap-api-policy-and-architecture.md), your SAP agreement, and internal data-governance rules.
27
27
  - **Experimental data-source emergency brake** — approved data/SQL deployments can set `SAP_BLOCKED_DATA_SOURCES=USR02,PA0002`. ARC-1 then parses each SQL request and resolves active CDS plus replacement-object lineage before execution, denying direct or transitive exact-name matches and failing closed when lineage is unsupported or cannot be proven. The empty default adds no metadata calls. This denylist is defense in depth, not a production allowlist or replacement for SAP authorization/CDS DCL; see [Authorization & Roles](docs_page/authorization.md#experimental-data-source-blocklist).
28
28
  - **Transport safety** — transport reads are available for review, while transport mutations require both `--allow-writes` and `--allow-transport-writes`. Update/delete operations auto-use the lock correction number when no explicit transport is provided
29
29
  - **Git workflow safety** — Git operations are disabled by default. Enable explicitly with `--allow-git-writes` / `SAP_ALLOW_GIT_WRITES=true`
@@ -51,6 +51,9 @@ Deploy ARC-1 as a Cloud Foundry app on SAP BTP with full platform integration:
51
51
  destinations marked `arc1.enabled=true` and exposes pinned SID/client plus aggregate endpoints
52
52
  ([setup](docs_page/multi-target-setup.md),
53
53
  [administration](docs_page/multi-target-administration.md))
54
+ - **Optional target filtering** — for shared multi-system gateways where teams need different target
55
+ lists. [Assign systems/clients through XSUAA roles](docs_page/multi-target-authorization.md);
56
+ IAS changes are optional. This filters IAM-assigned targets, not automatically discovered SAP accounts.
54
57
  - **Cloud Connector** — reach on-premise systems through the connectivity proxy
55
58
  - **Per-user destinations** — user identity forwarded end-to-end via X.509 certificates for on-premise SAP, or exchanged for an ABAP bearer token for BTP ABAP Environment
56
59
  - **XSUAA OAuth proxy** — MCP clients authenticate via standard OAuth, ARC-1 handles the BTP token exchange
@@ -89,12 +92,12 @@ The 12 tools are designed from real LLM interaction feedback:
89
92
 
90
93
  | Tool | What it does |
91
94
  |------|-------------|
92
- | **SAPRead** | Read exact ABAP source, method bodies, grep matches, table data, CDS views, access controls (`DCLS`), metadata extensions (`DDLX`), service bindings (`SRVB`), knowledge-transfer docs (`SKTD` or friendly alias `KTD`), message classes (`MSAG`), revision history (`VERSIONS`/`VERSION_SOURCE`), inactive object state, BOR objects, deployed UI5/Fiori apps (BSP, BSP_DEPLOY), and ABAP Platform 2025 server-driven objects (`DESD`, `EVTB`, `EVTO`, `DTSC`, `CSNM`, `COTA`). For "what does this object do?" use `SAPContext` first, then `SAPRead` for precise source. On-prem metadata reads include authorization fields (`AUTH`), feature toggles (`FEATURE_TOGGLE`), and enhancement implementations (`ENHO`). Structured format for classes returns metadata + decomposed includes as JSON. Optional `grep` regex returns only matching source lines (+context, method-annotated for classes) for token-efficient search. (Deprecated aliases `MESSAGES`/`FTG2` accepted for one minor.) |
95
+ | **SAPRead** | Read exact ABAP source, method bodies, grep matches, table data, CDS views, access controls (`DCLS`), metadata extensions (`DDLX`), service bindings (`SRVB`), knowledge-transfer docs (`SKTD` or friendly alias `KTD`), message classes (`MSAG`), revision history (`VERSIONS`/`VERSION_SOURCE`), inactive object state, BOR objects, deployed UI5/Fiori apps (BSP, BSP_DEPLOY), and ABAP Platform 2025 server-driven objects (`DESD`, `EVTB`, `EVTO`, `DTSC`, `CSNM`, `COTA`). For "what does this object do?" use `SAPContext` first, then `SAPRead` for precise source. Enhancement implementations (`ENHO`) are readable on-prem and on BTP; authorization fields (`AUTH`) and feature toggles (`FEATURE_TOGGLE`) are on-prem only. Structured format for classes returns metadata + decomposed includes as JSON. Optional `grep` regex returns only matching source lines (+context, method-annotated for classes) for token-efficient search. (Deprecated aliases `MESSAGES`/`FTG2` accepted for one minor.) |
93
96
  | **SAPSearch** | Object search + full-text source code search across the system |
94
97
  | **SAPWrite** | Create/update/delete ABAP source and DDIC metadata with automatic lock/unlock (PROG, CLAS, INTF, FUNC, FUGR, INCL, DDLS, DCLS, DDLX, BDEF, SRVD, SRVB, SKTD/KTD, TABL, DOMA, DTEL, MSAG; availability adapts for BTP). Class updates can target local includes (`definitions`, `implementations`, `macros`, `testclasses`); class-section surgery (`edit_class_definition`, `add_method`, `edit_method_signature`, `delete_method`, `change_method_visibility`) lets an LLM edit a global class signature without re-sending `/source/main`; RAP behavior-pool scaffolding can auto-create `lhc_*` skeletons before injecting signatures/stubs. Batch creation supports terminal activation for interdependent multi-object workflows (e.g., RAP stack or domain+data element in one call) |
95
98
  | **SAPActivate** | Activate ABAP objects — single or batch (essential for RAP stacks), with guarded retry for the S/4HANA ED064 batch quirk. Publish/unpublish OData service bindings (SRVB) |
96
99
  | **SAPNavigate** | Go-to-definition, find references, code completion |
97
- | **SAPQuery** | Execute ABAP SQL with table-not-found suggestions and automatic chunking for simple long literal `IN (...)` lists |
100
+ | **SAPQuery** | Read saved SAPscript long texts or execute ABAP SQL; each path requires its own opt-in |
98
101
  | **SAPTransport** | CTS transport management (list/get/create/release/delete/reassign/release-recursive), transport layer/target lookup, package transport requirement checks, and reverse lookup history (`action="history"`) |
99
102
  | **SAPGit** | Git-based ABAP workflows across gCTS and abapGit (list/clone/pull/push/commit/branch/unlink) with backend auto-selection and safety gating (`--allow-git-writes`) |
100
103
  | **SAPContext** | Dependency APIs (`action="deps"`): optional KTD plus bounded source-derived contracts, not a complete relationship inventory. Also supports live where-used (`action="usages"`), CDS impact (`action="impact"`), and TABL includes/appends (`action="structure"`) |
@@ -116,23 +119,26 @@ ARC-1 probes the SAP system at startup and adapts its behavior:
116
119
 
117
120
  ## ADT API Status and Strategy
118
121
 
119
- ARC-1 is a governed development-tooling proxy around ADT behavior — code checks, build/activate,
120
- transport management, AI-assisted ABAP authoring, Git workflows — not a bulk data-extraction product.
121
- It runs with real user identity, respects SAP authorization, and keeps audit and rate controls in place.
122
+ For a custom MCP server such as ARC-1, SAP's
123
+ [Third-Party MCP Access reference architecture](https://architecture.learning.sap.com/docs/ref-arch/137800)
124
+ is the primary design and control baseline we recommend. For a shared service, start with BTP Cloud
125
+ Foundry, XSUAA and strict principal propagation. SAP's API Policy FAQ Q56 allows custom MCP servers
126
+ under conditions; Q32 confirms that Integration Suite is not mandatory.
122
127
 
123
- **Where this stands under SAP's API Policy is covered in full in
124
- [SAP API Policy & Architecture Alignment](docs_page/sap-api-policy-and-architecture.md)** — what
125
- [API Policy v.4.2026a](https://help.sap.com/doc/sap-api-policy/latest/en-US/API_Policy_latest.pdf) says
126
- clause by clause, why the ADT question is more nuanced than "undocumented API", where ARC-1 sits against
127
- SAP's reference architecture for third-party MCP access, and the specific questions to put to your SAP
128
- contact. Short version: **usable at your own risk, and worth asking SAP before production.**
128
+ **[SAP API Policy & Architecture Alignment](docs_page/sap-api-policy-and-architecture.md)** explains
129
+ that path, the controls ARC-1 already supports, and the remaining gaps. FAQ Q33 classifies ADT APIs
130
+ as internal and limits them to endorsed development channels; ARC-1's direct TypeScript ADT client
131
+ is not specifically identified as one. Clarify that channel and the intended AI-assisted development
132
+ use with SAP before adoption, including dev/test. BTP hosting and security controls alone do not
133
+ establish full policy adherence. Per-user SAP identity applies to PP; shared Basic modes retain a
134
+ shared SAP identity.
129
135
 
130
136
  Two ARC-1 capabilities can expose business data or execute ad-hoc SQL. Both are **off by default** and require explicit opt-in env vars, so the operator makes a deliberate decision before they are reachable:
131
137
 
132
138
  | Capability | Env var | Default | Policy note |
133
139
  | ---------- | ------- | ------- | ----------- |
134
- | Named table content preview (`SAPRead(type=TABLE_CONTENTS)`) | `SAP_ALLOW_DATA_PREVIEW=true` | `false` (off) | Can expose application-table data; keep off unless the use case is approved. |
135
- | Freestyle ABAP SQL (`SAPQuery`) | `SAP_ALLOW_FREE_SQL=true` | `false` (off) | Executes ad-hoc ABAP SQL; keep off unless the use case is approved. |
140
+ | Table previews (`SAPRead(type=TABLE_CONTENTS/TABLE_QUERY)`), [saved SAPscript texts](docs_page/tools.md#stored-sapscript-long-texts) and [SLG1 messages](docs_page/tools.md#saved-application-logs-actionapplication_log) (`SAPQuery` actions `long_text` / `application_log`) | `SAP_ALLOW_DATA_PREVIEW=true` | `false` (off) | Reads application data; authenticated callers also need `data` scope. |
141
+ | Freestyle ABAP SQL (`SAPQuery(action=sql)`) | `SAP_ALLOW_FREE_SQL=true` | `false` (off) | Executes ad-hoc ABAP SQL; authenticated callers also need `sql` scope. |
136
142
  | Exact source blocklist (experimental) | `SAP_BLOCKED_DATA_SOURCES=USR02,PA0002` | empty (off) | Denies exact direct/transitive table or CDS dependencies; active mode is deliberately fail-closed and slower. |
137
143
 
138
144
  When either capability is enabled, successful data-preview bodies are limited cumulatively per tool
@@ -141,9 +147,13 @@ and serialization. `SAPQuery.maxRows` is separately clamped to 10,000, but wide
141
147
  byte limit much earlier. See [Configuration](docs_page/configuration-reference.md) before tuning
142
148
  `ARC1_MAX_DATAPREVIEW_RESPONSE_BYTES` or `ARC1_MAX_CONCURRENT_DATA_RESULTS`.
143
149
 
144
- With both flags at their defaults, ARC-1's data/sql rows are unreachable. Turning either flag on is a valid operational choice for approved scenarios, but it should be deliberate: check the current SAP API Policy, the customer's SAP agreement, SAP authorizations, and internal data-protection rules before enabling it on a productive system.
150
+ With both flags at their defaults, ARC-1's data/sql rows are unreachable. FAQ Q33 excludes application-table
151
+ reads, business-data export and backend SQL from ADT's intended development-tooling scope. Keep these
152
+ flags off unless the specific use has a documented allowance or SAP authorization under the applicable
153
+ agreements; internal approval or a technical opt-in alone is insufficient. Use Published business APIs
154
+ for business-data integration.
145
155
 
146
- ARC-1's strategy is to stay close to documented and discoverable ADT behavior, probe system capabilities before exposing tools, keep conservative security defaults (writes off, data preview off, free SQL off, package allowlist `$TMP`), and continuously review SAP's guidance as it evolves. This README is not a compliance decision for any specific customer landscape, but the default posture is intended to support normal governed development use rather than block it.
156
+ ARC-1 combines capability discovery with conservative defaults and centralized authorization. Discovery establishes technical availability, not API-policy permission. Follow the reference architecture and verify both the API-specific allowance and the deployed controls.
147
157
 
148
158
  ## Versioning & Stability
149
159
 
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env node
2
+ /** Local source transfer helper. No SAP connection or ARC-1 configuration is loaded. */
3
+ import { createHash } from 'node:crypto';
4
+ import { closeSync, constants, fstatSync, openSync, readSync } from 'node:fs';
5
+
6
+ const SOURCE_LIMIT = 200_000;
7
+ const ENVELOPE_LIMIT = 300_000;
8
+
9
+ function readBounded(fd, limit) {
10
+ const bytes = Buffer.alloc(limit + 1);
11
+ let size = 0;
12
+ while (size < bytes.length) {
13
+ const count = readSync(fd, bytes, size, bytes.length - size, null);
14
+ if (count === 0) break;
15
+ size += count;
16
+ }
17
+ if (size > limit) throw new Error(`Input exceeds ${limit} bytes; use a smaller source part.`);
18
+ return bytes.subarray(0, size);
19
+ }
20
+
21
+ function decode(bytes) {
22
+ return new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(bytes);
23
+ }
24
+
25
+ function inspect(source) {
26
+ if (typeof source !== 'string' || !source || source.includes('\0'))
27
+ throw new Error('Source must be non-empty UTF-8 text without NUL characters.');
28
+ if (source.startsWith('\ufeff'))
29
+ throw new Error('Source starts with a UTF-8 BOM; save the file as UTF-8 without BOM.');
30
+ const bytes = Buffer.from(source, 'utf8');
31
+ // JSON can contain lone surrogates; never silently replace them during verification.
32
+ if (decode(bytes) !== source) throw new Error('Source contains invalid Unicode.');
33
+ if (bytes.length > SOURCE_LIMIT) throw new Error(`Source exceeds ${SOURCE_LIMIT} bytes.`);
34
+ return { sourceBytes: bytes.length, sourceSha256: createHash('sha256').update(bytes).digest('hex') };
35
+ }
36
+
37
+ function readFile(path) {
38
+ // Non-blocking open lets us refuse FIFOs instead of waiting for a writer on POSIX.
39
+ const fd = openSync(path, constants.O_RDONLY | (constants.O_NONBLOCK ?? 0));
40
+ try {
41
+ const stat = fstatSync(fd);
42
+ if (!stat.isFile()) throw new Error('Source path must be a regular file.');
43
+ if (stat.size > SOURCE_LIMIT) throw new Error(`Source exceeds ${SOURCE_LIMIT} bytes.`);
44
+ const source = decode(readBounded(fd, SOURCE_LIMIT));
45
+ return { source, ...inspect(source) };
46
+ } finally {
47
+ closeSync(fd);
48
+ }
49
+ }
50
+
51
+ function verify(envelope) {
52
+ if (!envelope || typeof envelope !== 'object' || Array.isArray(envelope))
53
+ throw new Error('Expected a source envelope.');
54
+ const actual = inspect(envelope.source);
55
+ if (envelope.sourceBytes !== actual.sourceBytes || envelope.sourceSha256 !== actual.sourceSha256)
56
+ throw new Error('Source integrity mismatch; refuse SAPWrite.');
57
+ return { verified: true, ...actual };
58
+ }
59
+
60
+ function readEnvelope() {
61
+ const input = decode(readBounded(0, ENVELOPE_LIMIT));
62
+ try {
63
+ return JSON.parse(input);
64
+ } catch {
65
+ // JSON parser errors can include source excerpts; do not echo them.
66
+ throw new Error('Invalid source envelope JSON.');
67
+ }
68
+ }
69
+
70
+ try {
71
+ const [command, path, ...extra] = process.argv.slice(2);
72
+ let result;
73
+ if (command === 'read' && path && extra.length === 0) result = readFile(path);
74
+ else if (command === 'verify' && path === undefined) result = verify(readEnvelope());
75
+ else throw new Error('Usage: arc1-source read FILE | arc1-source verify < envelope.json');
76
+ const json = JSON.stringify(result);
77
+ if (Buffer.byteLength(json) + 1 > ENVELOPE_LIMIT)
78
+ throw new Error(`Encoded envelope exceeds ${ENVELOPE_LIMIT} bytes.`);
79
+ process.stdout.write(`${json}\n`);
80
+ } catch (error) {
81
+ process.stderr.write(`arc1-source: ${error instanceof Error ? error.message : 'Source transfer failed'}\n`);
82
+ process.exitCode = 1;
83
+ }
@@ -0,0 +1,4 @@
1
+ /** Text-part PUTs use 406 for application errors too. SADT_RESOURCE identifies
2
+ * framework negotiation; changing Accept cannot fix a structured application error. */
3
+ export declare function acceptFallback(body: string, accept: string | undefined, method: string, path: string): string | undefined;
4
+ //# sourceMappingURL=accept-fallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accept-fallback.d.ts","sourceRoot":"","sources":["../../src/adt/accept-fallback.ts"],"names":[],"mappings":"AAEA;uFACuF;AACvF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAyBpB"}
@@ -0,0 +1,27 @@
1
+ import { AdtApiError } from './errors.js';
2
+ /** Text-part PUTs use 406 for application errors too. SADT_RESOURCE identifies
3
+ * framework negotiation; changing Accept cannot fix a structured application error. */
4
+ export function acceptFallback(body, accept, method, path) {
5
+ if (method === 'PUT' &&
6
+ /^\/sap\/bc\/adt\/textelements\/(classes|programs|functiongroups)\/[^/]+\/source\/(symbols|selections|headings)$/.test(path)) {
7
+ const props = AdtApiError.extractProperties(body);
8
+ const id = props['T100KEY-ID'] ?? props['T100KEY-MSGID'];
9
+ if (id && id !== 'SADT_RESOURCE')
10
+ return undefined;
11
+ }
12
+ const inferred = body.match(/application\/[\w.+-]+(?:\/[\w.+-]+)?/)?.[0];
13
+ if (inferred && inferred !== accept)
14
+ return inferred;
15
+ // SAP_BASIS 755 accepts v1 binding XML but rejects v2 without listing an accepted type (#991).
16
+ if (method === 'GET' &&
17
+ /^\/sap\/bc\/adt\/businessservices\/bindings\/[^/]+$/.test(path) &&
18
+ accept === 'application/vnd.sap.adt.businessservices.servicebinding.v2+xml') {
19
+ return 'application/vnd.sap.adt.businessservices.servicebinding.v1+xml';
20
+ }
21
+ if (accept && accept !== '*/*' && accept !== 'application/xml')
22
+ return 'application/xml';
23
+ if (accept === 'application/xml')
24
+ return '*/*';
25
+ return undefined;
26
+ }
27
+ //# sourceMappingURL=accept-fallback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accept-fallback.js","sourceRoot":"","sources":["../../src/adt/accept-fallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;uFACuF;AACvF,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,MAA0B,EAC1B,MAAc,EACd,IAAY;IAEZ,IACE,MAAM,KAAK,KAAK;QAChB,iHAAiH,CAAC,IAAI,CACpH,IAAI,CACL,EACD,CAAC;QACD,MAAM,KAAK,GAAG,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACzD,IAAI,EAAE,IAAI,EAAE,KAAK,eAAe;YAAE,OAAO,SAAS,CAAC;IACrD,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzE,IAAI,QAAQ,IAAI,QAAQ,KAAK,MAAM;QAAE,OAAO,QAAQ,CAAC;IACrD,+FAA+F;IAC/F,IACE,MAAM,KAAK,KAAK;QAChB,qDAAqD,CAAC,IAAI,CAAC,IAAI,CAAC;QAChE,MAAM,KAAK,gEAAgE,EAC3E,CAAC;QACD,OAAO,gEAAgE,CAAC;IAC1E,CAAC;IACD,IAAI,MAAM,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,iBAAiB;QAAE,OAAO,iBAAiB,CAAC;IACzF,IAAI,MAAM,KAAK,iBAAiB;QAAE,OAAO,KAAK,CAAC;IAC/C,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { AdtHttpClient } from './http.js';
2
+ import type { ApiReleaseStateInfo } from './types.js';
3
+ /**
4
+ * Parse API release state XML from /sap/bc/adt/apireleases/{encoded-uri}.
5
+ *
6
+ * Returns structured release info with per-contract states (C0–C4),
7
+ * successor information, and catalog metadata.
8
+ *
9
+ * Expected root: element with releasableObject, c0Release–c4Release, apiCatalogData.
10
+ */
11
+ export declare function parseApiReleaseState(xml: string): ApiReleaseStateInfo;
12
+ export declare function assertApiReleaseStateConfirmed(info: ApiReleaseStateInfo, contract: string, expectedState: string, expectedVisibility?: {
13
+ useInSAPCloudPlatform: boolean;
14
+ useInKeyUserApps: boolean;
15
+ }): void;
16
+ /**
17
+ * Build the PUT body that sets an object's API release contract `state` (RELEASED / NOT_RELEASED).
18
+ *
19
+ * The apireleases GET (v10) returns a rich document, but the PUT to `…/apireleases/{uri}/{contract}`
20
+ * accepts only a NARROW, strictly-ordered subset — live reverse-engineered on a4h 758 + 816: the
21
+ * standalone contract block (`ars:contract="C1"`) carrying `status` + the successor scaffold, plus
22
+ * a sibling `apiCatalogData`/`ApiCatalogs` envelope. Response-only nodes (`atom:link`,
23
+ * `stateTransitions`, `transportObject`, `authValueObject`) are rejected with HTTP 400.
24
+ *
25
+ * Omitted visibility uses the contract's native defaults. Explicit selections respect its
26
+ * ReadOnly flags; other requirements remain native SAP validation (C0–C4 differ).
27
+ * NOT_RELEASED retains visibility. No fallback invents exposure.
28
+ */
29
+ export declare const API_RELEASE_VISIBILITIES: readonly ['cloudDevelopment', 'keyUserApps'];
30
+ export type ApiReleaseVisibility = (typeof API_RELEASE_VISIBILITIES)[number][];
31
+ export declare function buildApiReleasePutBody(getXml: string, contract: string, state: string, visibility?: ApiReleaseVisibility): string;
32
+ export declare function setApiReleaseState(http: AdtHttpClient, objectUri: string, opts: {
33
+ state?: string;
34
+ contract?: string;
35
+ transport?: string;
36
+ visibility?: ApiReleaseVisibility;
37
+ }): Promise<ApiReleaseStateInfo & {
38
+ changed: boolean;
39
+ }>;
40
+ //# sourceMappingURL=api-release.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-release.d.ts","sourceRoot":"","sources":["../../src/adt/api-release.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAG1E;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAoDrE;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE;IAAE,qBAAqB,EAAE,OAAO,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAA;CAAE,GACjF,IAAI,CAmBN;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,YAAI,kBAAkB,EAAE,aAAa,CAAU,CAAC;AACrF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;AAE/E,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,oBAAoB,GAChC,MAAM,CAuER;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,oBAAoB,CAAA;CAAE,GACjG,OAAO,CAAC,mBAAmB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAwErD"}
@@ -0,0 +1,224 @@
1
+ import { AdtApiError, AdtError } from './errors.js';
2
+ import { parseXml } from './xml-parser.js';
3
+ /**
4
+ * Parse API release state XML from /sap/bc/adt/apireleases/{encoded-uri}.
5
+ *
6
+ * Returns structured release info with per-contract states (C0–C4),
7
+ * successor information, and catalog metadata.
8
+ *
9
+ * Expected root: element with releasableObject, c0Release–c4Release, apiCatalogData.
10
+ */
11
+ export function parseApiReleaseState(xml) {
12
+ const parsed = parseXml(xml);
13
+ // The root element name varies — find the first non-declaration key
14
+ const rootKey = Object.keys(parsed).find((k) => !k.startsWith('?'));
15
+ const root = (rootKey ? parsed[rootKey] : parsed);
16
+ // releasableObject attrs
17
+ const relObj = (root.releasableObject ?? {});
18
+ // Parse C0–C4 contract releases
19
+ const contracts = [];
20
+ for (const key of ['c0Release', 'c1Release', 'c2Release', 'c3Release', 'c4Release']) {
21
+ const release = root[key];
22
+ if (!release)
23
+ continue;
24
+ const status = (release.status ?? {});
25
+ const successorsContainer = release.successors;
26
+ const successorArr = [];
27
+ if (successorsContainer) {
28
+ const succs = Array.isArray(successorsContainer.successor)
29
+ ? successorsContainer.successor
30
+ : successorsContainer.successor
31
+ ? [successorsContainer.successor]
32
+ : [];
33
+ for (const s of succs) {
34
+ successorArr.push({
35
+ uri: String(s['@_uri'] ?? ''),
36
+ type: String(s['@_type'] ?? ''),
37
+ name: String(s['@_name'] ?? ''),
38
+ });
39
+ }
40
+ }
41
+ contracts.push({
42
+ contract: String(release['@_contract'] ?? key.replace('Release', '').toUpperCase()),
43
+ state: String(status['@_state'] ?? ''),
44
+ stateDescription: String(status['@_stateDescription'] ?? ''),
45
+ useInKeyUserApps: String(release['@_useInKeyUserApps'] ?? 'false') === 'true',
46
+ useInSAPCloudPlatform: String(release['@_useInSAPCloudPlatform'] ?? 'false') === 'true',
47
+ successors: successorArr,
48
+ });
49
+ }
50
+ // apiCatalogData attrs
51
+ const catalog = (root.apiCatalogData ?? {});
52
+ return {
53
+ objectUri: String(relObj['@_uri'] ?? ''),
54
+ objectType: String(relObj['@_type'] ?? ''),
55
+ objectName: String(relObj['@_name'] ?? ''),
56
+ contracts,
57
+ isAnyContractReleased: String(catalog['@_isAnyContractReleased'] ?? 'false') === 'true',
58
+ isAnyAssignmentPossible: String(catalog['@_isAnyAssignmentPossible'] ?? 'false') === 'true',
59
+ };
60
+ }
61
+ export function assertApiReleaseStateConfirmed(info, contract, expectedState, expectedVisibility) {
62
+ const c = contract.toUpperCase();
63
+ const confirmedContract = info.contracts.find((release) => release.contract.toUpperCase() === c);
64
+ if (!confirmedContract) {
65
+ throw new Error(`API release contract ${c} read-back did not include the contract after PUT.`);
66
+ }
67
+ if (confirmedContract.state !== expectedState) {
68
+ throw new Error(`API release contract ${c} read-back state is ${confirmedContract.state || '(missing)'}, expected ${expectedState}.`);
69
+ }
70
+ if (expectedState === 'RELEASED' &&
71
+ expectedVisibility &&
72
+ (confirmedContract.useInSAPCloudPlatform !== expectedVisibility.useInSAPCloudPlatform ||
73
+ confirmedContract.useInKeyUserApps !== expectedVisibility.useInKeyUserApps)) {
74
+ throw new Error(`API release contract ${c} read-back visibility does not match the requested visibility.`);
75
+ }
76
+ }
77
+ /**
78
+ * Build the PUT body that sets an object's API release contract `state` (RELEASED / NOT_RELEASED).
79
+ *
80
+ * The apireleases GET (v10) returns a rich document, but the PUT to `…/apireleases/{uri}/{contract}`
81
+ * accepts only a NARROW, strictly-ordered subset — live reverse-engineered on a4h 758 + 816: the
82
+ * standalone contract block (`ars:contract="C1"`) carrying `status` + the successor scaffold, plus
83
+ * a sibling `apiCatalogData`/`ApiCatalogs` envelope. Response-only nodes (`atom:link`,
84
+ * `stateTransitions`, `transportObject`, `authValueObject`) are rejected with HTTP 400.
85
+ *
86
+ * Omitted visibility uses the contract's native defaults. Explicit selections respect its
87
+ * ReadOnly flags; other requirements remain native SAP validation (C0–C4 differ).
88
+ * NOT_RELEASED retains visibility. No fallback invents exposure.
89
+ */
90
+ export const API_RELEASE_VISIBILITIES = ['cloudDevelopment', 'keyUserApps'];
91
+ export function buildApiReleasePutBody(getXml, contract, state, visibility) {
92
+ const c = contract.toUpperCase();
93
+ const targetState = state.toUpperCase();
94
+ if (targetState !== 'RELEASED' && targetState !== 'NOT_RELEASED') {
95
+ throw new Error(`API release state must be RELEASED or NOT_RELEASED, got ${state}.`);
96
+ }
97
+ if (visibility !== undefined &&
98
+ (targetState !== 'RELEASED' ||
99
+ !Array.isArray(visibility) ||
100
+ visibility.some((value) => !API_RELEASE_VISIBILITIES.includes(value)) ||
101
+ new Set(visibility).size !== visibility.length)) {
102
+ throw new Error('apiVisibility must contain unique cloudDevelopment/keyUserApps selections and requires RELEASED.');
103
+ }
104
+ const tag = `c${c.slice(1)}Release`; // 'C1' -> 'c1Release'
105
+ // The behaviour block lists the *Default visibility flags (self-closing element with "Default" attrs).
106
+ const behaviour = new RegExp(`<ars:${tag}\\b([^>]*Default[^>]*)/>`).exec(getXml)?.[1] ?? '';
107
+ const cloudDefault = /useInSAPCloudPlatformDefault="true"/.test(behaviour);
108
+ const keyUserDefault = /useInKeyUserAppsDefault="true"/.test(behaviour);
109
+ // The standalone contract block's opening tag (has ars:contract="<C>").
110
+ const openTagMatch = new RegExp(`<ars:${tag}\\b[^>]*\\bars:contract="${c}"[^>]*>`).exec(getXml);
111
+ if (!openTagMatch) {
112
+ // Only the contracts the object type supports appear as settable `ars:contract="Cn"` blocks
113
+ // (e.g. SRVD supports only C0, classic VIEW only C3) — list them so the caller can retry.
114
+ const supported = [...new Set([...getXml.matchAll(/ars:contract="(C\d)"/g)].map((m) => m[1]))];
115
+ const hint = supported.length ? ` This object supports: ${supported.join(', ')}.` : '';
116
+ throw new Error(`API release contract ${c} is not available for this object.${hint}`);
117
+ }
118
+ let openTag = openTagMatch[0];
119
+ if (targetState === 'RELEASED') {
120
+ // Set both visibility flags from the contract's own defaults — both-false stays both-false (no
121
+ // invented exposure); SAP decides whether that's acceptable for this contract.
122
+ const setAttr = (tagText, attr, value) => {
123
+ const rendered = `${attr}="${value}"`;
124
+ return new RegExp(`\\b${attr}="[^"]*"`).test(tagText)
125
+ ? tagText.replace(new RegExp(`\\b${attr}="[^"]*"`), rendered)
126
+ : tagText.replace(/>$/, ` ${rendered}>`);
127
+ };
128
+ const selected = (selection, attribute, fallback) => {
129
+ if (visibility === undefined)
130
+ return fallback;
131
+ const requested = visibility.includes(selection);
132
+ const readOnly = new RegExp(`\\b${attribute}ReadOnly="(true|false)"`).exec(behaviour)?.[1];
133
+ const current = new RegExp(`\\b${attribute}="(true|false)"`).exec(openTagMatch[0])?.[1];
134
+ const defaultKnown = new RegExp(`\\b${attribute}Default="(?:true|false)"`).test(behaviour);
135
+ if (readOnly === undefined || current === undefined || !defaultKnown) {
136
+ throw new Error(`API release contract ${c} has no complete ${selection} visibility metadata.`);
137
+ }
138
+ if (readOnly === 'true' && requested !== (current === 'true') && requested !== fallback) {
139
+ throw new Error(`API release contract ${c} marks ${selection} visibility read-only.`);
140
+ }
141
+ return requested;
142
+ };
143
+ openTag = setAttr(openTag, 'ars:useInSAPCloudPlatform', selected('cloudDevelopment', 'useInSAPCloudPlatform', cloudDefault));
144
+ openTag = setAttr(openTag, 'ars:useInKeyUserApps', selected('keyUserApps', 'useInKeyUserApps', keyUserDefault));
145
+ }
146
+ const contractBlock = `${openTag}<ars:status ars:state="${targetState}"/>` +
147
+ '<ars:useConceptAsSuccessor>false</ars:useConceptAsSuccessor><ars:successors/><ars:successorConceptName/>' +
148
+ `</ars:${tag}>`;
149
+ return ('<?xml version="1.0" encoding="utf-8"?>' +
150
+ '<ars:apiRelease xmlns:ars="http://www.sap.com/adt/ars" xmlns:adtcore="http://www.sap.com/adt/core">' +
151
+ contractBlock +
152
+ '<ars:apiCatalogData ars:isAnyAssignmentPossible="true" ars:isAnyContractReleased="true"><ars:ApiCatalogs/></ars:apiCatalogData>' +
153
+ '</ars:apiRelease>');
154
+ }
155
+ export async function setApiReleaseState(http, objectUri, opts) {
156
+ const state = (opts.state ?? 'RELEASED').toUpperCase();
157
+ const contract = (opts.contract ?? 'C1').toUpperCase();
158
+ if (state !== 'RELEASED' && state !== 'NOT_RELEASED') {
159
+ throw new Error(`apiState must be RELEASED or NOT_RELEASED, got ${opts.state}.`);
160
+ }
161
+ const accept = 'application/vnd.sap.adt.apirelease.v10+xml';
162
+ const encoded = encodeURIComponent(objectUri);
163
+ const current = await http.get(`/sap/bc/adt/apireleases/${encoded}`, { Accept: accept });
164
+ const body = buildApiReleasePutBody(current.body, contract, state, opts.visibility);
165
+ const path = `/sap/bc/adt/apireleases/${encoded}/${contract.toLowerCase()}`;
166
+ const expectedVisibility = {
167
+ useInSAPCloudPlatform: /ars:useInSAPCloudPlatform="true"/.test(body),
168
+ useInKeyUserApps: /ars:useInKeyUserApps="true"/.test(body),
169
+ };
170
+ let changed = true;
171
+ try {
172
+ await http.put(opts.transport ? `${path}?request=${encodeURIComponent(opts.transport)}` : path, body, accept, {
173
+ Accept: accept,
174
+ });
175
+ }
176
+ catch (err) {
177
+ // SAP returns 400 "No changes were made" when the contract is already in the requested state.
178
+ // Treat that as an idempotent no-op (the desired state already holds — confirmed via read-back
179
+ // below) rather than surfacing a confusing error for "release something already released".
180
+ if (err instanceof AdtApiError &&
181
+ err.statusCode === 400 &&
182
+ /no changes were made/i.test(`${err.message} ${err.responseBody ?? ''}`)) {
183
+ changed = false;
184
+ }
185
+ else {
186
+ throw err;
187
+ }
188
+ }
189
+ // The PUT outcome stands: a read-back that cannot confirm it must not look like a refused request.
190
+ const unconfirmed = `SAP ${changed ? 'accepted' : 'reported no change for'} the ${contract} ${state} request for ${objectUri}, ` +
191
+ 'but the read-back did not confirm it, so the resulting state is unconfirmed. ' +
192
+ 'Read SAPRead(type="API_STATE") for this object before retrying or deleting it.';
193
+ let confirmed;
194
+ try {
195
+ confirmed = parseApiReleaseState((await http.get(`/sap/bc/adt/apireleases/${encoded}`, { Accept: accept })).body);
196
+ }
197
+ catch (error) {
198
+ if (error instanceof AdtError)
199
+ error.extraHint = error.extraHint ? `${unconfirmed}\n${error.extraHint}` : unconfirmed;
200
+ else if (error instanceof Error)
201
+ error.message = `${unconfirmed} ${error.message}`;
202
+ throw error;
203
+ }
204
+ const result = confirmed.contracts.find((release) => release.contract.toUpperCase() === contract);
205
+ if (!result)
206
+ throw new Error(`API release contract ${contract} is missing from the read-back. ${unconfirmed}`);
207
+ // On a real write, assert the full target (state + requested visibility). On an idempotent no-op,
208
+ // explicit selections still require exact visibility; omission keeps the existing state-only no-op check.
209
+ try {
210
+ assertApiReleaseStateConfirmed(confirmed, contract, state, changed || opts.visibility !== undefined ? expectedVisibility : undefined);
211
+ }
212
+ catch (error) {
213
+ // A failed postcondition does not undo SAP's PUT. Expose the actual state so callers
214
+ // can reconcile an applied release instead of treating this as a rejected mutation.
215
+ throw new Error(`${error instanceof Error ? error.message : String(error)} ` +
216
+ `Confirmed SAP result: ${JSON.stringify({ ...confirmed, changed })}.` +
217
+ (result.state === 'RELEASED'
218
+ ? ` If the release is unintended, call SAPManage set_api_state with objectUri="${objectUri}", ` +
219
+ `contract="${contract}" and apiState="NOT_RELEASED"; verify API_STATE before deleting the object.`
220
+ : ''));
221
+ }
222
+ return { ...confirmed, changed };
223
+ }
224
+ //# sourceMappingURL=api-release.js.map
@@ -0,0 +1 @@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ACnF,MAAM,KAAK,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,CAAC;IAClG,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,QAAQ,mCAAmC,WAAW,EAAE,CAAC,CAAC;IAC/G,kGAAkG;IAClG,0GAA0G;IAC1G,IAAI,CAAC;QACH,8BAA8B,CAC5B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,OAAO,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAC1E,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,qFAAqF;QACrF,oFAAoF;QACpF,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG;YAC1D,yBAAyB,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG;YACrE,CAAC,MAAM,CAAC,KAAK,KAAK,UAAU;gBAC1B,CAAC,CAAC,+EAA+E,SAAS,KAAK;oBAC7F,aAAa,QAAQ,6EAA6E;gBACpG,CAAC,CAAC,EAAE,CAAC,CACV,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC;AACnC,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { AdtClient } from './client.js';
2
+ export interface ApplicationLogInput {
3
+ logNumber: string;
4
+ maxRows?: number;
5
+ offset?: number;
6
+ }
7
+ export declare function readApplicationLog(client: AdtClient, input: ApplicationLogInput): Promise<{
8
+ status: 'not_found_or_not_visible';
9
+ logNumber: string;
10
+ message: string;
11
+ } | {
12
+ message?: undefined;
13
+ status: 'ok';
14
+ logNumber: string;
15
+ header: {
16
+ object: string;
17
+ subobject: string;
18
+ externalNumber: string;
19
+ severity: string;
20
+ createdAt: string;
21
+ };
22
+ offset: number;
23
+ messages: {
24
+ number: string;
25
+ type: string;
26
+ text: string;
27
+ timestamp: string;
28
+ hasLongText: boolean;
29
+ hasDetails: boolean;
30
+ }[];
31
+ more: boolean;
32
+ nextOffset?: number | undefined;
33
+ limitReached?: boolean | undefined;
34
+ snapshotGuaranteed: boolean;
35
+ }>;
36
+ //# sourceMappingURL=application-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-log.d.ts","sourceRoot":"","sources":["../../src/adt/application-log.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8BD,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,mBAAmB;YAoDtE,0BAA0B;;;;;YAqC5B,IAAI;;;QAGV,MAAM;QACN,SAAS;QACT,cAAc;QACd,QAAQ;QACR,SAAS;;;;;;;;;;;;;;;GAoBhB"}