@voxgig/sdkgen 1.3.8 → 1.3.10

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 (1731) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/package.json +1 -1
  3. package/project/.sdk/model/feature/audit.aontu +22 -0
  4. package/project/.sdk/model/feature/cache.aontu +23 -0
  5. package/project/.sdk/model/feature/clienttrack.aontu +20 -0
  6. package/project/.sdk/model/feature/debug.aontu +25 -0
  7. package/project/.sdk/model/feature/feature-index.aontu +20 -1
  8. package/project/.sdk/model/feature/idempotency.aontu +21 -0
  9. package/project/.sdk/model/feature/metrics.aontu +20 -0
  10. package/project/.sdk/model/feature/netsim.aontu +36 -0
  11. package/project/.sdk/model/feature/paging.aontu +23 -0
  12. package/project/.sdk/model/feature/proxy.aontu +23 -0
  13. package/project/.sdk/model/feature/ratelimit.aontu +21 -0
  14. package/project/.sdk/model/feature/rbac.aontu +24 -0
  15. package/project/.sdk/model/feature/retry.aontu +23 -0
  16. package/project/.sdk/model/feature/streaming.aontu +22 -0
  17. package/project/.sdk/model/feature/telemetry.aontu +21 -0
  18. package/project/.sdk/model/feature/timeout.aontu +18 -0
  19. package/project/.sdk/model/target/c.aontu +37 -0
  20. package/project/.sdk/model/target/clojure.aontu +36 -0
  21. package/project/.sdk/model/target/cpp.aontu +35 -0
  22. package/project/.sdk/model/target/csharp.aontu +35 -0
  23. package/project/.sdk/model/target/dart.aontu +34 -0
  24. package/project/.sdk/model/target/elixir.aontu +33 -0
  25. package/project/.sdk/model/target/haskell.aontu +47 -0
  26. package/project/.sdk/model/target/java.aontu +37 -0
  27. package/project/.sdk/model/target/kotlin.aontu +37 -0
  28. package/project/.sdk/model/target/ocaml.aontu +36 -0
  29. package/project/.sdk/model/target/perl.aontu +37 -0
  30. package/project/.sdk/model/target/rust.aontu +37 -0
  31. package/project/.sdk/model/target/scala.aontu +37 -0
  32. package/project/.sdk/model/target/swift.aontu +35 -0
  33. package/project/.sdk/model/target/zig.aontu +27 -0
  34. package/project/.sdk/src/cmp/c/Config_c.ts +109 -0
  35. package/project/.sdk/src/cmp/c/EntityBase_c.ts +61 -0
  36. package/project/.sdk/src/cmp/c/EntityOperation_c.ts +41 -0
  37. package/project/.sdk/src/cmp/c/Entity_c.ts +85 -0
  38. package/project/.sdk/src/cmp/c/Gitignore_c.ts +29 -0
  39. package/project/.sdk/src/cmp/c/MainEntity_c.ts +31 -0
  40. package/project/.sdk/src/cmp/c/Main_c.ts +83 -0
  41. package/project/.sdk/src/cmp/c/Package_c.ts +17 -0
  42. package/project/.sdk/src/cmp/c/TestDirect_c.ts +227 -0
  43. package/project/.sdk/src/cmp/c/TestEntity_c.ts +82 -0
  44. package/project/.sdk/src/cmp/c/Test_c.ts +51 -0
  45. package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +265 -0
  46. package/project/.sdk/src/cmp/c/fragment/EntityCreateOp.fragment.c +27 -0
  47. package/project/.sdk/src/cmp/c/fragment/EntityListOp.fragment.c +24 -0
  48. package/project/.sdk/src/cmp/c/fragment/EntityLoadOp.fragment.c +29 -0
  49. package/project/.sdk/src/cmp/c/fragment/EntityRemoveOp.fragment.c +29 -0
  50. package/project/.sdk/src/cmp/c/fragment/EntityUpdateOp.fragment.c +29 -0
  51. package/project/.sdk/src/cmp/c/fragment/Main.fragment.c +220 -0
  52. package/project/.sdk/src/cmp/c/tsconfig.json +15 -0
  53. package/project/.sdk/src/cmp/c/utility_c.ts +102 -0
  54. package/project/.sdk/src/cmp/clojure/Config_clojure.ts +94 -0
  55. package/project/.sdk/src/cmp/clojure/EntityOperation_clojure.ts +35 -0
  56. package/project/.sdk/src/cmp/clojure/Entity_clojure.ts +77 -0
  57. package/project/.sdk/src/cmp/clojure/Gitignore_clojure.ts +28 -0
  58. package/project/.sdk/src/cmp/clojure/MainEntity_clojure.ts +21 -0
  59. package/project/.sdk/src/cmp/clojure/Main_clojure.ts +88 -0
  60. package/project/.sdk/src/cmp/clojure/Package_clojure.ts +41 -0
  61. package/project/.sdk/src/cmp/clojure/Test_clojure.ts +120 -0
  62. package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +158 -0
  63. package/project/.sdk/src/cmp/clojure/fragment/EntityCreateOp.fragment.clj +14 -0
  64. package/project/.sdk/src/cmp/clojure/fragment/EntityListOp.fragment.clj +17 -0
  65. package/project/.sdk/src/cmp/clojure/fragment/EntityLoadOp.fragment.clj +15 -0
  66. package/project/.sdk/src/cmp/clojure/fragment/EntityRemoveOp.fragment.clj +15 -0
  67. package/project/.sdk/src/cmp/clojure/fragment/EntityUpdateOp.fragment.clj +15 -0
  68. package/project/.sdk/src/cmp/clojure/tsconfig.json +15 -0
  69. package/project/.sdk/src/cmp/clojure/utility_clojure.ts +82 -0
  70. package/project/.sdk/src/cmp/cpp/Config_cpp.ts +136 -0
  71. package/project/.sdk/src/cmp/cpp/EntityBase_cpp.ts +51 -0
  72. package/project/.sdk/src/cmp/cpp/EntityOperation_cpp.ts +37 -0
  73. package/project/.sdk/src/cmp/cpp/Entity_cpp.ts +78 -0
  74. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +27 -0
  75. package/project/.sdk/src/cmp/cpp/MainEntity_cpp.ts +35 -0
  76. package/project/.sdk/src/cmp/cpp/Main_cpp.ts +84 -0
  77. package/project/.sdk/src/cmp/cpp/Package_cpp.ts +17 -0
  78. package/project/.sdk/src/cmp/cpp/TestDirect_cpp.ts +258 -0
  79. package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +454 -0
  80. package/project/.sdk/src/cmp/cpp/Test_cpp.ts +36 -0
  81. package/project/.sdk/src/cmp/cpp/fragment/Entity.fragment.cpp +40 -0
  82. package/project/.sdk/src/cmp/cpp/fragment/EntityCreateOp.fragment.cpp +22 -0
  83. package/project/.sdk/src/cmp/cpp/fragment/EntityListOp.fragment.cpp +21 -0
  84. package/project/.sdk/src/cmp/cpp/fragment/EntityLoadOp.fragment.cpp +25 -0
  85. package/project/.sdk/src/cmp/cpp/fragment/EntityRemoveOp.fragment.cpp +21 -0
  86. package/project/.sdk/src/cmp/cpp/fragment/EntityUpdateOp.fragment.cpp +22 -0
  87. package/project/.sdk/src/cmp/cpp/fragment/Main.fragment.cpp +43 -0
  88. package/project/.sdk/src/cmp/cpp/tsconfig.json +15 -0
  89. package/project/.sdk/src/cmp/cpp/utility_cpp.ts +83 -0
  90. package/project/.sdk/src/cmp/csharp/Config_csharp.ts +134 -0
  91. package/project/.sdk/src/cmp/csharp/EntityBase_csharp.ts +39 -0
  92. package/project/.sdk/src/cmp/csharp/EntityOperation_csharp.ts +41 -0
  93. package/project/.sdk/src/cmp/csharp/Entity_csharp.ts +85 -0
  94. package/project/.sdk/src/cmp/csharp/Gitignore_csharp.ts +38 -0
  95. package/project/.sdk/src/cmp/csharp/MainEntity_csharp.ts +36 -0
  96. package/project/.sdk/src/cmp/csharp/Main_csharp.ts +91 -0
  97. package/project/.sdk/src/cmp/csharp/Package_csharp.ts +101 -0
  98. package/project/.sdk/src/cmp/csharp/SdkError_csharp.ts +42 -0
  99. package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +560 -0
  100. package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +618 -0
  101. package/project/.sdk/src/cmp/csharp/Test_csharp.ts +38 -0
  102. package/project/.sdk/src/cmp/csharp/fragment/Entity.fragment.cs +28 -0
  103. package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +268 -0
  104. package/project/.sdk/src/cmp/csharp/fragment/EntityCreateOp.fragment.cs +37 -0
  105. package/project/.sdk/src/cmp/csharp/fragment/EntityListOp.fragment.cs +35 -0
  106. package/project/.sdk/src/cmp/csharp/fragment/EntityLoadOp.fragment.cs +41 -0
  107. package/project/.sdk/src/cmp/csharp/fragment/EntityRemoveOp.fragment.cs +41 -0
  108. package/project/.sdk/src/cmp/csharp/fragment/EntityUpdateOp.fragment.cs +41 -0
  109. package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +278 -0
  110. package/project/.sdk/src/cmp/csharp/fragment/SdkError.fragment.cs +21 -0
  111. package/project/.sdk/src/cmp/csharp/tsconfig.json +15 -0
  112. package/project/.sdk/src/cmp/csharp/utility_csharp.ts +143 -0
  113. package/project/.sdk/src/cmp/dart/Config_dart.ts +99 -0
  114. package/project/.sdk/src/cmp/dart/EntityBase_dart.ts +34 -0
  115. package/project/.sdk/src/cmp/dart/EntityOperation_dart.ts +43 -0
  116. package/project/.sdk/src/cmp/dart/EntityTypes_dart.ts +190 -0
  117. package/project/.sdk/src/cmp/dart/Entity_dart.ts +79 -0
  118. package/project/.sdk/src/cmp/dart/Gitignore_dart.ts +34 -0
  119. package/project/.sdk/src/cmp/dart/MainEntity_dart.ts +33 -0
  120. package/project/.sdk/src/cmp/dart/Main_dart.ts +105 -0
  121. package/project/.sdk/src/cmp/dart/Package_dart.ts +81 -0
  122. package/project/.sdk/src/cmp/dart/SdkError_dart.ts +42 -0
  123. package/project/.sdk/src/cmp/dart/TestDirect_dart.ts +498 -0
  124. package/project/.sdk/src/cmp/dart/TestEntity_dart.ts +552 -0
  125. package/project/.sdk/src/cmp/dart/Test_dart.ts +105 -0
  126. package/project/.sdk/src/cmp/dart/fragment/Config.fragment.dart +48 -0
  127. package/project/.sdk/src/cmp/dart/fragment/Direct.test.fragment.dart +25 -0
  128. package/project/.sdk/src/cmp/dart/fragment/Entity.fragment.dart +31 -0
  129. package/project/.sdk/src/cmp/dart/fragment/Entity.test.fragment.dart +67 -0
  130. package/project/.sdk/src/cmp/dart/fragment/EntityBase.fragment.dart +285 -0
  131. package/project/.sdk/src/cmp/dart/fragment/EntityCreateOp.fragment.dart +90 -0
  132. package/project/.sdk/src/cmp/dart/fragment/EntityListOp.fragment.dart +90 -0
  133. package/project/.sdk/src/cmp/dart/fragment/EntityLoadOp.fragment.dart +94 -0
  134. package/project/.sdk/src/cmp/dart/fragment/EntityRemoveOp.fragment.dart +94 -0
  135. package/project/.sdk/src/cmp/dart/fragment/EntityUpdateOp.fragment.dart +94 -0
  136. package/project/.sdk/src/cmp/dart/fragment/Main.fragment.dart +240 -0
  137. package/project/.sdk/src/cmp/dart/fragment/SdkError.fragment.dart +18 -0
  138. package/project/.sdk/src/cmp/dart/tsconfig.json +15 -0
  139. package/project/.sdk/src/cmp/dart/utility_dart.ts +86 -0
  140. package/project/.sdk/src/cmp/elixir/Config_elixir.ts +101 -0
  141. package/project/.sdk/src/cmp/elixir/EntityOperation_elixir.ts +27 -0
  142. package/project/.sdk/src/cmp/elixir/Entity_elixir.ts +54 -0
  143. package/project/.sdk/src/cmp/elixir/Gitignore_elixir.ts +28 -0
  144. package/project/.sdk/src/cmp/elixir/MainEntity_elixir.ts +26 -0
  145. package/project/.sdk/src/cmp/elixir/Main_elixir.ts +124 -0
  146. package/project/.sdk/src/cmp/elixir/Package_elixir.ts +64 -0
  147. package/project/.sdk/src/cmp/elixir/TestDirect_elixir.ts +95 -0
  148. package/project/.sdk/src/cmp/elixir/TestEntity_elixir.ts +115 -0
  149. package/project/.sdk/src/cmp/elixir/Test_elixir.ts +47 -0
  150. package/project/.sdk/src/cmp/elixir/fragment/Entity.fragment.ex +37 -0
  151. package/project/.sdk/src/cmp/elixir/fragment/EntityCreateOp.fragment.ex +28 -0
  152. package/project/.sdk/src/cmp/elixir/fragment/EntityListOp.fragment.ex +30 -0
  153. package/project/.sdk/src/cmp/elixir/fragment/EntityLoadOp.fragment.ex +32 -0
  154. package/project/.sdk/src/cmp/elixir/fragment/EntityRemoveOp.fragment.ex +32 -0
  155. package/project/.sdk/src/cmp/elixir/fragment/EntityUpdateOp.fragment.ex +30 -0
  156. package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +218 -0
  157. package/project/.sdk/src/cmp/elixir/fragment/Pipeline.fragment.ex +62 -0
  158. package/project/.sdk/src/cmp/elixir/tsconfig.json +15 -0
  159. package/project/.sdk/src/cmp/elixir/utility_elixir.ts +85 -0
  160. package/project/.sdk/src/cmp/go/TestEntity_go.ts +62 -0
  161. package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +133 -0
  162. package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +14 -8
  163. package/project/.sdk/src/cmp/haskell/Config_haskell.ts +115 -0
  164. package/project/.sdk/src/cmp/haskell/Entity_haskell.ts +13 -0
  165. package/project/.sdk/src/cmp/haskell/Gitignore_haskell.ts +27 -0
  166. package/project/.sdk/src/cmp/haskell/Main_haskell.ts +123 -0
  167. package/project/.sdk/src/cmp/haskell/Package_haskell.ts +58 -0
  168. package/project/.sdk/src/cmp/haskell/Test_haskell.ts +263 -0
  169. package/project/.sdk/src/cmp/haskell/tsconfig.json +15 -0
  170. package/project/.sdk/src/cmp/haskell/utility_haskell.ts +105 -0
  171. package/project/.sdk/src/cmp/java/Config_java.ts +138 -0
  172. package/project/.sdk/src/cmp/java/EntityBase_java.ts +50 -0
  173. package/project/.sdk/src/cmp/java/EntityOperation_java.ts +48 -0
  174. package/project/.sdk/src/cmp/java/Entity_java.ts +95 -0
  175. package/project/.sdk/src/cmp/java/Gitignore_java.ts +37 -0
  176. package/project/.sdk/src/cmp/java/MainEntity_java.ts +41 -0
  177. package/project/.sdk/src/cmp/java/Main_java.ts +100 -0
  178. package/project/.sdk/src/cmp/java/Package_java.ts +126 -0
  179. package/project/.sdk/src/cmp/java/SdkError_java.ts +49 -0
  180. package/project/.sdk/src/cmp/java/TestDirect_java.ts +509 -0
  181. package/project/.sdk/src/cmp/java/TestEntity_java.ts +599 -0
  182. package/project/.sdk/src/cmp/java/Test_java.ts +42 -0
  183. package/project/.sdk/src/cmp/java/fragment/Entity.fragment.java +35 -0
  184. package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +235 -0
  185. package/project/.sdk/src/cmp/java/fragment/EntityCreateOp.fragment.java +42 -0
  186. package/project/.sdk/src/cmp/java/fragment/EntityListOp.fragment.java +39 -0
  187. package/project/.sdk/src/cmp/java/fragment/EntityLoadOp.fragment.java +45 -0
  188. package/project/.sdk/src/cmp/java/fragment/EntityRemoveOp.fragment.java +45 -0
  189. package/project/.sdk/src/cmp/java/fragment/EntityUpdateOp.fragment.java +45 -0
  190. package/project/.sdk/src/cmp/java/fragment/Main.fragment.java +34 -0
  191. package/project/.sdk/src/cmp/java/fragment/SdkError.fragment.java +27 -0
  192. package/project/.sdk/src/cmp/java/tsconfig.json +15 -0
  193. package/project/.sdk/src/cmp/java/utility_java.ts +102 -0
  194. package/project/.sdk/src/cmp/js/Config_js.ts +4 -2
  195. package/project/.sdk/src/cmp/js/TestEntity_js.ts +1 -0
  196. package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +32 -1
  197. package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +81 -0
  198. package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +10 -5
  199. package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +128 -0
  200. package/project/.sdk/src/cmp/kotlin/EntityBase_kotlin.ts +50 -0
  201. package/project/.sdk/src/cmp/kotlin/EntityOperation_kotlin.ts +48 -0
  202. package/project/.sdk/src/cmp/kotlin/Entity_kotlin.ts +93 -0
  203. package/project/.sdk/src/cmp/kotlin/Gitignore_kotlin.ts +41 -0
  204. package/project/.sdk/src/cmp/kotlin/MainEntity_kotlin.ts +40 -0
  205. package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +94 -0
  206. package/project/.sdk/src/cmp/kotlin/Package_kotlin.ts +110 -0
  207. package/project/.sdk/src/cmp/kotlin/SdkError_kotlin.ts +48 -0
  208. package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +479 -0
  209. package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +567 -0
  210. package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +42 -0
  211. package/project/.sdk/src/cmp/kotlin/fragment/Entity.fragment.kt +28 -0
  212. package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +195 -0
  213. package/project/.sdk/src/cmp/kotlin/fragment/EntityCreateOp.fragment.kt +37 -0
  214. package/project/.sdk/src/cmp/kotlin/fragment/EntityListOp.fragment.kt +34 -0
  215. package/project/.sdk/src/cmp/kotlin/fragment/EntityLoadOp.fragment.kt +40 -0
  216. package/project/.sdk/src/cmp/kotlin/fragment/EntityRemoveOp.fragment.kt +40 -0
  217. package/project/.sdk/src/cmp/kotlin/fragment/EntityUpdateOp.fragment.kt +40 -0
  218. package/project/.sdk/src/cmp/kotlin/fragment/Main.fragment.kt +28 -0
  219. package/project/.sdk/src/cmp/kotlin/fragment/SdkError.fragment.kt +24 -0
  220. package/project/.sdk/src/cmp/kotlin/tsconfig.json +15 -0
  221. package/project/.sdk/src/cmp/kotlin/utility_kotlin.ts +101 -0
  222. package/project/.sdk/src/cmp/lua/Entity_lua.ts +7 -9
  223. package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +55 -0
  224. package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +137 -0
  225. package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +9 -6
  226. package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +114 -0
  227. package/project/.sdk/src/cmp/ocaml/EntityOperation_ocaml.ts +63 -0
  228. package/project/.sdk/src/cmp/ocaml/Entity_ocaml.ts +152 -0
  229. package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +37 -0
  230. package/project/.sdk/src/cmp/ocaml/MainEntity_ocaml.ts +28 -0
  231. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +111 -0
  232. package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +47 -0
  233. package/project/.sdk/src/cmp/ocaml/SdkError_ocaml.ts +42 -0
  234. package/project/.sdk/src/cmp/ocaml/TestDirect_ocaml.ts +47 -0
  235. package/project/.sdk/src/cmp/ocaml/TestEntity_ocaml.ts +130 -0
  236. package/project/.sdk/src/cmp/ocaml/Test_ocaml.ts +35 -0
  237. package/project/.sdk/src/cmp/ocaml/fragment/RunOp.fragment.ml +32 -0
  238. package/project/.sdk/src/cmp/ocaml/tsconfig.json +15 -0
  239. package/project/.sdk/src/cmp/ocaml/utility_ocaml.ts +129 -0
  240. package/project/.sdk/src/cmp/perl/Config_perl.ts +127 -0
  241. package/project/.sdk/src/cmp/perl/EntityOperation_perl.ts +42 -0
  242. package/project/.sdk/src/cmp/perl/Entity_perl.ts +84 -0
  243. package/project/.sdk/src/cmp/perl/Gitignore_perl.ts +32 -0
  244. package/project/.sdk/src/cmp/perl/MainEntity_perl.ts +34 -0
  245. package/project/.sdk/src/cmp/perl/Main_perl.ts +140 -0
  246. package/project/.sdk/src/cmp/perl/Package_perl.ts +63 -0
  247. package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +433 -0
  248. package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +515 -0
  249. package/project/.sdk/src/cmp/perl/Test_perl.ts +54 -0
  250. package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +235 -0
  251. package/project/.sdk/src/cmp/perl/fragment/EntityCreateOp.fragment.pm +31 -0
  252. package/project/.sdk/src/cmp/perl/fragment/EntityListOp.fragment.pm +43 -0
  253. package/project/.sdk/src/cmp/perl/fragment/EntityLoadOp.fragment.pm +34 -0
  254. package/project/.sdk/src/cmp/perl/fragment/EntityRemoveOp.fragment.pm +32 -0
  255. package/project/.sdk/src/cmp/perl/fragment/EntityUpdateOp.fragment.pm +32 -0
  256. package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +263 -0
  257. package/project/.sdk/src/cmp/perl/fragment/SdkError.fragment.pm +27 -0
  258. package/project/.sdk/src/cmp/perl/tsconfig.json +15 -0
  259. package/project/.sdk/src/cmp/perl/utility_perl.ts +30 -0
  260. package/project/.sdk/src/cmp/php/TestEntity_php.ts +53 -0
  261. package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +124 -0
  262. package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +13 -6
  263. package/project/.sdk/src/cmp/py/Entity_py.ts +8 -9
  264. package/project/.sdk/src/cmp/py/TestEntity_py.ts +48 -0
  265. package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +135 -28
  266. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +9 -6
  267. package/project/.sdk/src/cmp/rb/Entity_rb.ts +8 -9
  268. package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +4 -1
  269. package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +50 -0
  270. package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +122 -23
  271. package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +9 -6
  272. package/project/.sdk/src/cmp/rust/Config_rust.ts +118 -0
  273. package/project/.sdk/src/cmp/rust/EntityBase_rust.ts +59 -0
  274. package/project/.sdk/src/cmp/rust/EntityOperation_rust.ts +44 -0
  275. package/project/.sdk/src/cmp/rust/Entity_rust.ts +94 -0
  276. package/project/.sdk/src/cmp/rust/Gitignore_rust.ts +29 -0
  277. package/project/.sdk/src/cmp/rust/MainEntity_rust.ts +37 -0
  278. package/project/.sdk/src/cmp/rust/Main_rust.ts +146 -0
  279. package/project/.sdk/src/cmp/rust/Package_rust.ts +80 -0
  280. package/project/.sdk/src/cmp/rust/SdkError_rust.ts +42 -0
  281. package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +448 -0
  282. package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +635 -0
  283. package/project/.sdk/src/cmp/rust/Test_rust.ts +51 -0
  284. package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +288 -0
  285. package/project/.sdk/src/cmp/rust/fragment/EntityCreateOp.fragment.rs +29 -0
  286. package/project/.sdk/src/cmp/rust/fragment/EntityListOp.fragment.rs +26 -0
  287. package/project/.sdk/src/cmp/rust/fragment/EntityLoadOp.fragment.rs +35 -0
  288. package/project/.sdk/src/cmp/rust/fragment/EntityRemoveOp.fragment.rs +35 -0
  289. package/project/.sdk/src/cmp/rust/fragment/EntityUpdateOp.fragment.rs +35 -0
  290. package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +296 -0
  291. package/project/.sdk/src/cmp/rust/fragment/SdkError.fragment.rs +34 -0
  292. package/project/.sdk/src/cmp/rust/tsconfig.json +15 -0
  293. package/project/.sdk/src/cmp/rust/utility_rust.ts +104 -0
  294. package/project/.sdk/src/cmp/scala/Config_scala.ts +126 -0
  295. package/project/.sdk/src/cmp/scala/EntityBase_scala.ts +50 -0
  296. package/project/.sdk/src/cmp/scala/EntityOperation_scala.ts +46 -0
  297. package/project/.sdk/src/cmp/scala/Entity_scala.ts +87 -0
  298. package/project/.sdk/src/cmp/scala/Gitignore_scala.ts +31 -0
  299. package/project/.sdk/src/cmp/scala/MainEntity_scala.ts +40 -0
  300. package/project/.sdk/src/cmp/scala/Main_scala.ts +93 -0
  301. package/project/.sdk/src/cmp/scala/Package_scala.ts +22 -0
  302. package/project/.sdk/src/cmp/scala/TestDirect_scala.ts +233 -0
  303. package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +397 -0
  304. package/project/.sdk/src/cmp/scala/Test_scala.ts +93 -0
  305. package/project/.sdk/src/cmp/scala/fragment/Entity.fragment.scala +24 -0
  306. package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +169 -0
  307. package/project/.sdk/src/cmp/scala/fragment/EntityCreateOp.fragment.scala +32 -0
  308. package/project/.sdk/src/cmp/scala/fragment/EntityListOp.fragment.scala +28 -0
  309. package/project/.sdk/src/cmp/scala/fragment/EntityLoadOp.fragment.scala +33 -0
  310. package/project/.sdk/src/cmp/scala/fragment/EntityRemoveOp.fragment.scala +33 -0
  311. package/project/.sdk/src/cmp/scala/fragment/EntityUpdateOp.fragment.scala +33 -0
  312. package/project/.sdk/src/cmp/scala/fragment/Main.fragment.scala +27 -0
  313. package/project/.sdk/src/cmp/scala/tsconfig.json +15 -0
  314. package/project/.sdk/src/cmp/scala/utility_scala.ts +99 -0
  315. package/project/.sdk/src/cmp/swift/Config_swift.ts +127 -0
  316. package/project/.sdk/src/cmp/swift/EntityBase_swift.ts +38 -0
  317. package/project/.sdk/src/cmp/swift/EntityOperation_swift.ts +39 -0
  318. package/project/.sdk/src/cmp/swift/Entity_swift.ts +86 -0
  319. package/project/.sdk/src/cmp/swift/Gitignore_swift.ts +32 -0
  320. package/project/.sdk/src/cmp/swift/MainEntity_swift.ts +35 -0
  321. package/project/.sdk/src/cmp/swift/Main_swift.ts +94 -0
  322. package/project/.sdk/src/cmp/swift/Package_swift.ts +66 -0
  323. package/project/.sdk/src/cmp/swift/SdkError_swift.ts +41 -0
  324. package/project/.sdk/src/cmp/swift/TestDirect_swift.ts +84 -0
  325. package/project/.sdk/src/cmp/swift/TestEntity_swift.ts +84 -0
  326. package/project/.sdk/src/cmp/swift/Test_swift.ts +39 -0
  327. package/project/.sdk/src/cmp/swift/fragment/Entity.fragment.swift +23 -0
  328. package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +202 -0
  329. package/project/.sdk/src/cmp/swift/fragment/EntityCreateOp.fragment.swift +23 -0
  330. package/project/.sdk/src/cmp/swift/fragment/EntityListOp.fragment.swift +21 -0
  331. package/project/.sdk/src/cmp/swift/fragment/EntityLoadOp.fragment.swift +24 -0
  332. package/project/.sdk/src/cmp/swift/fragment/EntityRemoveOp.fragment.swift +24 -0
  333. package/project/.sdk/src/cmp/swift/fragment/EntityUpdateOp.fragment.swift +24 -0
  334. package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +211 -0
  335. package/project/.sdk/src/cmp/swift/fragment/SdkError.fragment.swift +22 -0
  336. package/project/.sdk/src/cmp/swift/tsconfig.json +15 -0
  337. package/project/.sdk/src/cmp/swift/utility_swift.ts +76 -0
  338. package/project/.sdk/src/cmp/ts/Config_ts.ts +4 -2
  339. package/project/.sdk/src/cmp/ts/Package_ts.ts +12 -0
  340. package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +8 -0
  341. package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +81 -0
  342. package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +10 -5
  343. package/project/.sdk/src/cmp/zig/Config_zig.ts +113 -0
  344. package/project/.sdk/src/cmp/zig/EntityOperation_zig.ts +39 -0
  345. package/project/.sdk/src/cmp/zig/Entity_zig.ts +89 -0
  346. package/project/.sdk/src/cmp/zig/Gitignore_zig.ts +27 -0
  347. package/project/.sdk/src/cmp/zig/MainEntity_zig.ts +38 -0
  348. package/project/.sdk/src/cmp/zig/Main_zig.ts +78 -0
  349. package/project/.sdk/src/cmp/zig/Test_zig.ts +114 -0
  350. package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +278 -0
  351. package/project/.sdk/src/cmp/zig/fragment/EntityCreateOp.fragment.zig +24 -0
  352. package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +21 -0
  353. package/project/.sdk/src/cmp/zig/fragment/EntityLoadOp.fragment.zig +26 -0
  354. package/project/.sdk/src/cmp/zig/fragment/EntityRemoveOp.fragment.zig +26 -0
  355. package/project/.sdk/src/cmp/zig/fragment/EntityUpdateOp.fragment.zig +26 -0
  356. package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +258 -0
  357. package/project/.sdk/src/cmp/zig/tsconfig.json +15 -0
  358. package/project/.sdk/src/cmp/zig/utility_zig.ts +95 -0
  359. package/project/.sdk/tm/c/LICENSE +22 -0
  360. package/project/.sdk/tm/c/Makefile +50 -0
  361. package/project/.sdk/tm/c/VERSION +1 -0
  362. package/project/.sdk/tm/c/core/context.c +145 -0
  363. package/project/.sdk/tm/c/core/control.c +19 -0
  364. package/project/.sdk/tm/c/core/error.c +24 -0
  365. package/project/.sdk/tm/c/core/helpers.c +228 -0
  366. package/project/.sdk/tm/c/core/operation.c +34 -0
  367. package/project/.sdk/tm/c/core/point.c +49 -0
  368. package/project/.sdk/tm/c/core/response.c +29 -0
  369. package/project/.sdk/tm/c/core/result.c +60 -0
  370. package/project/.sdk/tm/c/core/sdk.h +514 -0
  371. package/project/.sdk/tm/c/core/spec.c +94 -0
  372. package/project/.sdk/tm/c/core/utility.c +74 -0
  373. package/project/.sdk/tm/c/feature/audit.c +134 -0
  374. package/project/.sdk/tm/c/feature/base.c +40 -0
  375. package/project/.sdk/tm/c/feature/cache.c +262 -0
  376. package/project/.sdk/tm/c/feature/clienttrack.c +144 -0
  377. package/project/.sdk/tm/c/feature/debug.c +230 -0
  378. package/project/.sdk/tm/c/feature/idempotency.c +164 -0
  379. package/project/.sdk/tm/c/feature/log.c +79 -0
  380. package/project/.sdk/tm/c/feature/metrics.c +177 -0
  381. package/project/.sdk/tm/c/feature/netsim.c +211 -0
  382. package/project/.sdk/tm/c/feature/paging.c +223 -0
  383. package/project/.sdk/tm/c/feature/proxy.c +249 -0
  384. package/project/.sdk/tm/c/feature/ratelimit.c +124 -0
  385. package/project/.sdk/tm/c/feature/rbac.c +167 -0
  386. package/project/.sdk/tm/c/feature/retry.c +164 -0
  387. package/project/.sdk/tm/c/feature/streaming.c +147 -0
  388. package/project/.sdk/tm/c/feature/support.c +115 -0
  389. package/project/.sdk/tm/c/feature/telemetry.c +205 -0
  390. package/project/.sdk/tm/c/feature/test.c +385 -0
  391. package/project/.sdk/tm/c/feature/timeout.c +106 -0
  392. package/project/.sdk/tm/c/src/feature/README.md +1 -0
  393. package/project/.sdk/tm/c/src/feature/audit/.gitkeep +0 -0
  394. package/project/.sdk/tm/c/src/feature/base/.gitkeep +0 -0
  395. package/project/.sdk/tm/c/src/feature/cache/.gitkeep +0 -0
  396. package/project/.sdk/tm/c/src/feature/clienttrack/.gitkeep +0 -0
  397. package/project/.sdk/tm/c/src/feature/debug/.gitkeep +0 -0
  398. package/project/.sdk/tm/c/src/feature/idempotency/.gitkeep +0 -0
  399. package/project/.sdk/tm/c/src/feature/log/.gitkeep +0 -0
  400. package/project/.sdk/tm/c/src/feature/metrics/.gitkeep +0 -0
  401. package/project/.sdk/tm/c/src/feature/netsim/.gitkeep +0 -0
  402. package/project/.sdk/tm/c/src/feature/paging/.gitkeep +0 -0
  403. package/project/.sdk/tm/c/src/feature/proxy/.gitkeep +0 -0
  404. package/project/.sdk/tm/c/src/feature/ratelimit/.gitkeep +0 -0
  405. package/project/.sdk/tm/c/src/feature/rbac/.gitkeep +0 -0
  406. package/project/.sdk/tm/c/src/feature/retry/.gitkeep +0 -0
  407. package/project/.sdk/tm/c/src/feature/streaming/.gitkeep +0 -0
  408. package/project/.sdk/tm/c/src/feature/telemetry/.gitkeep +0 -0
  409. package/project/.sdk/tm/c/src/feature/test/.gitkeep +0 -0
  410. package/project/.sdk/tm/c/src/feature/timeout/.gitkeep +0 -0
  411. package/project/.sdk/tm/c/tests/ctest.h +58 -0
  412. package/project/.sdk/tm/c/tests/feature_harness.h +441 -0
  413. package/project/.sdk/tm/c/tests/feature_test.c +1210 -0
  414. package/project/.sdk/tm/c/tests/pipeline_test.c +561 -0
  415. package/project/.sdk/tm/c/tests/primary_utility_test.c +573 -0
  416. package/project/.sdk/tm/c/tests/runner.h +274 -0
  417. package/project/.sdk/tm/c/tests/sdk_pipeline_test.c +89 -0
  418. package/project/.sdk/tm/c/tests/struct_corpus_test.c +939 -0
  419. package/project/.sdk/tm/c/utility/clean.c +20 -0
  420. package/project/.sdk/tm/c/utility/done.c +26 -0
  421. package/project/.sdk/tm/c/utility/feature_add.c +42 -0
  422. package/project/.sdk/tm/c/utility/feature_hook.c +22 -0
  423. package/project/.sdk/tm/c/utility/feature_init.c +22 -0
  424. package/project/.sdk/tm/c/utility/fetcher.c +78 -0
  425. package/project/.sdk/tm/c/utility/jsonparse.c +11 -0
  426. package/project/.sdk/tm/c/utility/make_context.c +7 -0
  427. package/project/.sdk/tm/c/utility/make_error.c +66 -0
  428. package/project/.sdk/tm/c/utility/make_fetch_def.c +43 -0
  429. package/project/.sdk/tm/c/utility/make_options.c +179 -0
  430. package/project/.sdk/tm/c/utility/make_point.c +109 -0
  431. package/project/.sdk/tm/c/utility/make_request.c +62 -0
  432. package/project/.sdk/tm/c/utility/make_response.c +45 -0
  433. package/project/.sdk/tm/c/utility/make_result.c +61 -0
  434. package/project/.sdk/tm/c/utility/make_spec.c +60 -0
  435. package/project/.sdk/tm/c/utility/make_url.c +88 -0
  436. package/project/.sdk/tm/c/utility/param.c +58 -0
  437. package/project/.sdk/tm/c/utility/prepare_auth.c +65 -0
  438. package/project/.sdk/tm/c/utility/prepare_body.c +12 -0
  439. package/project/.sdk/tm/c/utility/prepare_headers.c +13 -0
  440. package/project/.sdk/tm/c/utility/prepare_method.c +16 -0
  441. package/project/.sdk/tm/c/utility/prepare_params.c +30 -0
  442. package/project/.sdk/tm/c/utility/prepare_path.c +17 -0
  443. package/project/.sdk/tm/c/utility/prepare_query.c +37 -0
  444. package/project/.sdk/tm/c/utility/result_basic.c +43 -0
  445. package/project/.sdk/tm/c/utility/result_body.c +17 -0
  446. package/project/.sdk/tm/c/utility/result_headers.c +17 -0
  447. package/project/.sdk/tm/c/utility/struct/inject.c +703 -0
  448. package/project/.sdk/tm/c/utility/struct/re_util.c +221 -0
  449. package/project/.sdk/tm/c/utility/struct/regex.c +1103 -0
  450. package/project/.sdk/tm/c/utility/struct/regex.h +84 -0
  451. package/project/.sdk/tm/c/utility/struct/transform.c +2224 -0
  452. package/project/.sdk/tm/c/utility/struct/utility.c +1971 -0
  453. package/project/.sdk/tm/c/utility/struct/value.c +640 -0
  454. package/project/.sdk/tm/c/utility/struct/value.h +273 -0
  455. package/project/.sdk/tm/c/utility/struct/value_io.c +366 -0
  456. package/project/.sdk/tm/c/utility/struct/value_io.h +31 -0
  457. package/project/.sdk/tm/c/utility/struct/voxgig_struct.h +216 -0
  458. package/project/.sdk/tm/c/utility/transform_request.c +21 -0
  459. package/project/.sdk/tm/c/utility/transform_response.c +36 -0
  460. package/project/.sdk/tm/clojure/LICENSE +22 -0
  461. package/project/.sdk/tm/clojure/Makefile +15 -0
  462. package/project/.sdk/tm/clojure/VERSION +1 -0
  463. package/project/.sdk/tm/clojure/src/feature/README.md +1 -0
  464. package/project/.sdk/tm/clojure/src/feature/audit/.gitkeep +0 -0
  465. package/project/.sdk/tm/clojure/src/feature/base/.gitkeep +0 -0
  466. package/project/.sdk/tm/clojure/src/feature/cache/.gitkeep +0 -0
  467. package/project/.sdk/tm/clojure/src/feature/clienttrack/.gitkeep +0 -0
  468. package/project/.sdk/tm/clojure/src/feature/debug/.gitkeep +0 -0
  469. package/project/.sdk/tm/clojure/src/feature/idempotency/.gitkeep +0 -0
  470. package/project/.sdk/tm/clojure/src/feature/log/.gitkeep +0 -0
  471. package/project/.sdk/tm/clojure/src/feature/metrics/.gitkeep +0 -0
  472. package/project/.sdk/tm/clojure/src/feature/netsim/.gitkeep +0 -0
  473. package/project/.sdk/tm/clojure/src/feature/paging/.gitkeep +0 -0
  474. package/project/.sdk/tm/clojure/src/feature/proxy/.gitkeep +0 -0
  475. package/project/.sdk/tm/clojure/src/feature/ratelimit/.gitkeep +0 -0
  476. package/project/.sdk/tm/clojure/src/feature/rbac/.gitkeep +0 -0
  477. package/project/.sdk/tm/clojure/src/feature/retry/.gitkeep +0 -0
  478. package/project/.sdk/tm/clojure/src/feature/streaming/.gitkeep +0 -0
  479. package/project/.sdk/tm/clojure/src/feature/telemetry/.gitkeep +0 -0
  480. package/project/.sdk/tm/clojure/src/feature/test/.gitkeep +0 -0
  481. package/project/.sdk/tm/clojure/src/feature/timeout/.gitkeep +0 -0
  482. package/project/.sdk/tm/clojure/src/sdk/client.clj +119 -0
  483. package/project/.sdk/tm/clojure/src/sdk/core.clj +901 -0
  484. package/project/.sdk/tm/clojure/src/sdk/features.clj +1027 -0
  485. package/project/.sdk/tm/clojure/src/voxgig/struct.clj +1734 -0
  486. package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +596 -0
  487. package/project/.sdk/tm/clojure/test/sdk/test/netsim.clj +42 -0
  488. package/project/.sdk/tm/clojure/test/sdk/test/pipeline.clj +314 -0
  489. package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +52 -0
  490. package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +337 -0
  491. package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +39 -0
  492. package/project/.sdk/tm/clojure/test/sdk/testutil.clj +35 -0
  493. package/project/.sdk/tm/cpp/LICENSE +22 -0
  494. package/project/.sdk/tm/cpp/Makefile +36 -0
  495. package/project/.sdk/tm/cpp/VERSION +1 -0
  496. package/project/.sdk/tm/cpp/core/sdk.hpp +16 -0
  497. package/project/.sdk/tm/cpp/core/struct.hpp +225 -0
  498. package/project/.sdk/tm/cpp/core/types.hpp +1105 -0
  499. package/project/.sdk/tm/cpp/feature/audit.hpp +107 -0
  500. package/project/.sdk/tm/cpp/feature/base.hpp +34 -0
  501. package/project/.sdk/tm/cpp/feature/cache.hpp +189 -0
  502. package/project/.sdk/tm/cpp/feature/clienttrack.hpp +105 -0
  503. package/project/.sdk/tm/cpp/feature/debug.hpp +157 -0
  504. package/project/.sdk/tm/cpp/feature/idempotency.hpp +119 -0
  505. package/project/.sdk/tm/cpp/feature/log.hpp +90 -0
  506. package/project/.sdk/tm/cpp/feature/metrics.hpp +103 -0
  507. package/project/.sdk/tm/cpp/feature/netsim.hpp +152 -0
  508. package/project/.sdk/tm/cpp/feature/options.hpp +156 -0
  509. package/project/.sdk/tm/cpp/feature/paging.hpp +156 -0
  510. package/project/.sdk/tm/cpp/feature/proxy.hpp +145 -0
  511. package/project/.sdk/tm/cpp/feature/ratelimit.hpp +87 -0
  512. package/project/.sdk/tm/cpp/feature/rbac.hpp +108 -0
  513. package/project/.sdk/tm/cpp/feature/retry.hpp +130 -0
  514. package/project/.sdk/tm/cpp/feature/streaming.hpp +98 -0
  515. package/project/.sdk/tm/cpp/feature/telemetry.hpp +139 -0
  516. package/project/.sdk/tm/cpp/feature/test.hpp +289 -0
  517. package/project/.sdk/tm/cpp/feature/timeout.hpp +88 -0
  518. package/project/.sdk/tm/cpp/src/feature/README.md +1 -0
  519. package/project/.sdk/tm/cpp/src/feature/audit/.gitkeep +0 -0
  520. package/project/.sdk/tm/cpp/src/feature/base/.gitkeep +0 -0
  521. package/project/.sdk/tm/cpp/src/feature/cache/.gitkeep +0 -0
  522. package/project/.sdk/tm/cpp/src/feature/clienttrack/.gitkeep +0 -0
  523. package/project/.sdk/tm/cpp/src/feature/debug/.gitkeep +0 -0
  524. package/project/.sdk/tm/cpp/src/feature/idempotency/.gitkeep +0 -0
  525. package/project/.sdk/tm/cpp/src/feature/log/.gitkeep +0 -0
  526. package/project/.sdk/tm/cpp/src/feature/metrics/.gitkeep +0 -0
  527. package/project/.sdk/tm/cpp/src/feature/netsim/.gitkeep +0 -0
  528. package/project/.sdk/tm/cpp/src/feature/paging/.gitkeep +0 -0
  529. package/project/.sdk/tm/cpp/src/feature/proxy/.gitkeep +0 -0
  530. package/project/.sdk/tm/cpp/src/feature/ratelimit/.gitkeep +0 -0
  531. package/project/.sdk/tm/cpp/src/feature/rbac/.gitkeep +0 -0
  532. package/project/.sdk/tm/cpp/src/feature/retry/.gitkeep +0 -0
  533. package/project/.sdk/tm/cpp/src/feature/streaming/.gitkeep +0 -0
  534. package/project/.sdk/tm/cpp/src/feature/telemetry/.gitkeep +0 -0
  535. package/project/.sdk/tm/cpp/src/feature/test/.gitkeep +0 -0
  536. package/project/.sdk/tm/cpp/src/feature/timeout/.gitkeep +0 -0
  537. package/project/.sdk/tm/cpp/test/custom_utility_test.cpp +57 -0
  538. package/project/.sdk/tm/cpp/test/exists_test.cpp +16 -0
  539. package/project/.sdk/tm/cpp/test/feature_test.cpp +911 -0
  540. package/project/.sdk/tm/cpp/test/harness.hpp +344 -0
  541. package/project/.sdk/tm/cpp/test/netsim_test.cpp +48 -0
  542. package/project/.sdk/tm/cpp/test/pipeline_test.cpp +526 -0
  543. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +841 -0
  544. package/project/.sdk/tm/cpp/test/runner_support.hpp +437 -0
  545. package/project/.sdk/tm/cpp/test/sdk-test-control.json +19 -0
  546. package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +494 -0
  547. package/project/.sdk/tm/cpp/test/struct_runner.hpp +314 -0
  548. package/project/.sdk/tm/cpp/test/testlib.hpp +82 -0
  549. package/project/.sdk/tm/cpp/utility/pipeline.hpp +1054 -0
  550. package/project/.sdk/tm/cpp/utility/voxgigstruct/value.hpp +525 -0
  551. package/project/.sdk/tm/cpp/utility/voxgigstruct/value_io.hpp +315 -0
  552. package/project/.sdk/tm/cpp/utility/voxgigstruct/voxgig_struct.hpp +3379 -0
  553. package/project/.sdk/tm/csharp/LICENSE +22 -0
  554. package/project/.sdk/tm/csharp/Makefile +43 -0
  555. package/project/.sdk/tm/csharp/VERSION +1 -0
  556. package/project/.sdk/tm/csharp/core/Context.cs +257 -0
  557. package/project/.sdk/tm/csharp/core/Control.cs +17 -0
  558. package/project/.sdk/tm/csharp/core/Helpers.cs +61 -0
  559. package/project/.sdk/tm/csharp/core/Operation.cs +51 -0
  560. package/project/.sdk/tm/csharp/core/Point.cs +68 -0
  561. package/project/.sdk/tm/csharp/core/Response.cs +45 -0
  562. package/project/.sdk/tm/csharp/core/Result.cs +63 -0
  563. package/project/.sdk/tm/csharp/core/Spec.cs +81 -0
  564. package/project/.sdk/tm/csharp/core/Types.cs +21 -0
  565. package/project/.sdk/tm/csharp/core/Utility.cs +88 -0
  566. package/project/.sdk/tm/csharp/feature/AuditFeature.cs +116 -0
  567. package/project/.sdk/tm/csharp/feature/BaseFeature.cs +39 -0
  568. package/project/.sdk/tm/csharp/feature/CacheFeature.cs +186 -0
  569. package/project/.sdk/tm/csharp/feature/ClienttrackFeature.cs +103 -0
  570. package/project/.sdk/tm/csharp/feature/DebugFeature.cs +157 -0
  571. package/project/.sdk/tm/csharp/feature/FeatureOptions.cs +197 -0
  572. package/project/.sdk/tm/csharp/feature/IdempotencyFeature.cs +97 -0
  573. package/project/.sdk/tm/csharp/feature/LogFeature.cs +109 -0
  574. package/project/.sdk/tm/csharp/feature/MetricsFeature.cs +117 -0
  575. package/project/.sdk/tm/csharp/feature/NetsimFeature.cs +200 -0
  576. package/project/.sdk/tm/csharp/feature/PagingFeature.cs +187 -0
  577. package/project/.sdk/tm/csharp/feature/ProxyFeature.cs +138 -0
  578. package/project/.sdk/tm/csharp/feature/RatelimitFeature.cs +89 -0
  579. package/project/.sdk/tm/csharp/feature/RbacFeature.cs +124 -0
  580. package/project/.sdk/tm/csharp/feature/RetryFeature.cs +174 -0
  581. package/project/.sdk/tm/csharp/feature/StreamingFeature.cs +93 -0
  582. package/project/.sdk/tm/csharp/feature/TelemetryFeature.cs +145 -0
  583. package/project/.sdk/tm/csharp/feature/TestFeature.cs +368 -0
  584. package/project/.sdk/tm/csharp/feature/TimeoutFeature.cs +69 -0
  585. package/project/.sdk/tm/csharp/src/feature/README.md +1 -0
  586. package/project/.sdk/tm/csharp/src/feature/audit/.gitkeep +0 -0
  587. package/project/.sdk/tm/csharp/src/feature/base/.gitkeep +0 -0
  588. package/project/.sdk/tm/csharp/src/feature/cache/.gitkeep +0 -0
  589. package/project/.sdk/tm/csharp/src/feature/clienttrack/.gitkeep +0 -0
  590. package/project/.sdk/tm/csharp/src/feature/debug/.gitkeep +0 -0
  591. package/project/.sdk/tm/csharp/src/feature/idempotency/.gitkeep +0 -0
  592. package/project/.sdk/tm/csharp/src/feature/log/.gitkeep +0 -0
  593. package/project/.sdk/tm/csharp/src/feature/metrics/.gitkeep +0 -0
  594. package/project/.sdk/tm/csharp/src/feature/netsim/.gitkeep +0 -0
  595. package/project/.sdk/tm/csharp/src/feature/paging/.gitkeep +0 -0
  596. package/project/.sdk/tm/csharp/src/feature/proxy/.gitkeep +0 -0
  597. package/project/.sdk/tm/csharp/src/feature/ratelimit/.gitkeep +0 -0
  598. package/project/.sdk/tm/csharp/src/feature/rbac/.gitkeep +0 -0
  599. package/project/.sdk/tm/csharp/src/feature/retry/.gitkeep +0 -0
  600. package/project/.sdk/tm/csharp/src/feature/streaming/.gitkeep +0 -0
  601. package/project/.sdk/tm/csharp/src/feature/telemetry/.gitkeep +0 -0
  602. package/project/.sdk/tm/csharp/src/feature/test/.gitkeep +0 -0
  603. package/project/.sdk/tm/csharp/src/feature/timeout/.gitkeep +0 -0
  604. package/project/.sdk/tm/csharp/test/CustomUtilityTest.cs +51 -0
  605. package/project/.sdk/tm/csharp/test/ExistsTest.cs +17 -0
  606. package/project/.sdk/tm/csharp/test/FeatureTest.cs +1653 -0
  607. package/project/.sdk/tm/csharp/test/NetsimTest.cs +67 -0
  608. package/project/.sdk/tm/csharp/test/PipelineTest.cs +605 -0
  609. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +957 -0
  610. package/project/.sdk/tm/csharp/test/Runner.cs +626 -0
  611. package/project/.sdk/tm/csharp/test/StructRunner.cs +276 -0
  612. package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +1273 -0
  613. package/project/.sdk/tm/csharp/test/sdk-test-control.json +19 -0
  614. package/project/.sdk/tm/csharp/utility/Clean.cs +11 -0
  615. package/project/.sdk/tm/csharp/utility/Done.cs +28 -0
  616. package/project/.sdk/tm/csharp/utility/FeatureAdd.cs +54 -0
  617. package/project/.sdk/tm/csharp/utility/FeatureHook.cs +35 -0
  618. package/project/.sdk/tm/csharp/utility/FeatureInit.cs +28 -0
  619. package/project/.sdk/tm/csharp/utility/Fetcher.cs +181 -0
  620. package/project/.sdk/tm/csharp/utility/MakeContext.cs +11 -0
  621. package/project/.sdk/tm/csharp/utility/MakeError.cs +69 -0
  622. package/project/.sdk/tm/csharp/utility/MakeFetchDef.cs +38 -0
  623. package/project/.sdk/tm/csharp/utility/MakeOptions.cs +203 -0
  624. package/project/.sdk/tm/csharp/utility/MakePoint.cs +127 -0
  625. package/project/.sdk/tm/csharp/utility/MakeRequest.cs +87 -0
  626. package/project/.sdk/tm/csharp/utility/MakeResponse.cs +55 -0
  627. package/project/.sdk/tm/csharp/utility/MakeResult.cs +64 -0
  628. package/project/.sdk/tm/csharp/utility/MakeSpec.cs +64 -0
  629. package/project/.sdk/tm/csharp/utility/MakeUrl.cs +54 -0
  630. package/project/.sdk/tm/csharp/utility/Param.cs +67 -0
  631. package/project/.sdk/tm/csharp/utility/PrepareAuth.cs +54 -0
  632. package/project/.sdk/tm/csharp/utility/PrepareBody.cs +19 -0
  633. package/project/.sdk/tm/csharp/utility/PrepareHeaders.cs +22 -0
  634. package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +22 -0
  635. package/project/.sdk/tm/csharp/utility/PrepareParams.cs +38 -0
  636. package/project/.sdk/tm/csharp/utility/PreparePath.cs +18 -0
  637. package/project/.sdk/tm/csharp/utility/PrepareQuery.cs +40 -0
  638. package/project/.sdk/tm/csharp/utility/Register.cs +41 -0
  639. package/project/.sdk/tm/csharp/utility/ResultBasic.cs +39 -0
  640. package/project/.sdk/tm/csharp/utility/ResultBody.cs +22 -0
  641. package/project/.sdk/tm/csharp/utility/ResultHeaders.cs +26 -0
  642. package/project/.sdk/tm/csharp/utility/TransformRequest.cs +39 -0
  643. package/project/.sdk/tm/csharp/utility/TransformResponse.cs +53 -0
  644. package/project/.sdk/tm/csharp/utility/struct/Struct.cs +3582 -0
  645. package/project/.sdk/tm/dart/LICENSE +22 -0
  646. package/project/.sdk/tm/dart/Makefile +50 -0
  647. package/project/.sdk/tm/dart/lib/Context.dart +150 -0
  648. package/project/.sdk/tm/dart/lib/Control.dart +15 -0
  649. package/project/.sdk/tm/dart/lib/Operation.dart +31 -0
  650. package/project/.sdk/tm/dart/lib/Point.dart +43 -0
  651. package/project/.sdk/tm/dart/lib/Response.dart +32 -0
  652. package/project/.sdk/tm/dart/lib/Result.dart +39 -0
  653. package/project/.sdk/tm/dart/lib/Spec.dart +49 -0
  654. package/project/.sdk/tm/dart/lib/feature/audit/AuditFeature.dart +103 -0
  655. package/project/.sdk/tm/dart/lib/feature/base/BaseFeature.dart +76 -0
  656. package/project/.sdk/tm/dart/lib/feature/cache/CacheFeature.dart +152 -0
  657. package/project/.sdk/tm/dart/lib/feature/clienttrack/ClienttrackFeature.dart +104 -0
  658. package/project/.sdk/tm/dart/lib/feature/debug/DebugFeature.dart +153 -0
  659. package/project/.sdk/tm/dart/lib/feature/idempotency/IdempotencyFeature.dart +92 -0
  660. package/project/.sdk/tm/dart/lib/feature/log/LogFeature.dart +85 -0
  661. package/project/.sdk/tm/dart/lib/feature/metrics/MetricsFeature.dart +103 -0
  662. package/project/.sdk/tm/dart/lib/feature/netsim/NetsimFeature.dart +186 -0
  663. package/project/.sdk/tm/dart/lib/feature/paging/PagingFeature.dart +145 -0
  664. package/project/.sdk/tm/dart/lib/feature/proxy/ProxyFeature.dart +118 -0
  665. package/project/.sdk/tm/dart/lib/feature/ratelimit/RatelimitFeature.dart +103 -0
  666. package/project/.sdk/tm/dart/lib/feature/rbac/RbacFeature.dart +121 -0
  667. package/project/.sdk/tm/dart/lib/feature/retry/RetryFeature.dart +155 -0
  668. package/project/.sdk/tm/dart/lib/feature/streaming/StreamingFeature.dart +97 -0
  669. package/project/.sdk/tm/dart/lib/feature/telemetry/TelemetryFeature.dart +136 -0
  670. package/project/.sdk/tm/dart/lib/feature/test/TestFeature.dart +270 -0
  671. package/project/.sdk/tm/dart/lib/feature/timeout/TimeoutFeature.dart +104 -0
  672. package/project/.sdk/tm/dart/lib/utility/CleanUtility.dart +12 -0
  673. package/project/.sdk/tm/dart/lib/utility/DoneUtility.dart +18 -0
  674. package/project/.sdk/tm/dart/lib/utility/ErrUtility.dart +46 -0
  675. package/project/.sdk/tm/dart/lib/utility/FeatureAddUtility.dart +35 -0
  676. package/project/.sdk/tm/dart/lib/utility/FeatureHookUtility.dart +20 -0
  677. package/project/.sdk/tm/dart/lib/utility/FeatureInitUtility.dart +9 -0
  678. package/project/.sdk/tm/dart/lib/utility/FetcherUtility.dart +95 -0
  679. package/project/.sdk/tm/dart/lib/utility/MakeContextUtility.dart +6 -0
  680. package/project/.sdk/tm/dart/lib/utility/MakeErrorUtility.dart +67 -0
  681. package/project/.sdk/tm/dart/lib/utility/MakeFetchDefUtility.dart +42 -0
  682. package/project/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +147 -0
  683. package/project/.sdk/tm/dart/lib/utility/MakePointUtility.dart +84 -0
  684. package/project/.sdk/tm/dart/lib/utility/MakeRequestUtility.dart +63 -0
  685. package/project/.sdk/tm/dart/lib/utility/MakeResponseUtility.dart +54 -0
  686. package/project/.sdk/tm/dart/lib/utility/MakeResultUtility.dart +49 -0
  687. package/project/.sdk/tm/dart/lib/utility/MakeSpecUtility.dart +61 -0
  688. package/project/.sdk/tm/dart/lib/utility/MakeUrlUtility.dart +51 -0
  689. package/project/.sdk/tm/dart/lib/utility/ParamUtility.dart +56 -0
  690. package/project/.sdk/tm/dart/lib/utility/PrepareAuthUtility.dart +46 -0
  691. package/project/.sdk/tm/dart/lib/utility/PrepareBodyUtility.dart +19 -0
  692. package/project/.sdk/tm/dart/lib/utility/PrepareHeadersUtility.dart +11 -0
  693. package/project/.sdk/tm/dart/lib/utility/PrepareMethodUtility.dart +15 -0
  694. package/project/.sdk/tm/dart/lib/utility/PrepareParamsUtility.dart +23 -0
  695. package/project/.sdk/tm/dart/lib/utility/PreparePathUtility.dart +9 -0
  696. package/project/.sdk/tm/dart/lib/utility/PrepareQueryUtility.dart +18 -0
  697. package/project/.sdk/tm/dart/lib/utility/ResultBasicUtility.dart +29 -0
  698. package/project/.sdk/tm/dart/lib/utility/ResultBodyUtility.dart +15 -0
  699. package/project/.sdk/tm/dart/lib/utility/ResultHeadersUtility.dart +18 -0
  700. package/project/.sdk/tm/dart/lib/utility/StructUtility.dart +127 -0
  701. package/project/.sdk/tm/dart/lib/utility/TransformRequestUtility.dart +28 -0
  702. package/project/.sdk/tm/dart/lib/utility/TransformResponseUtility.dart +44 -0
  703. package/project/.sdk/tm/dart/lib/utility/Utility.dart +230 -0
  704. package/project/.sdk/tm/dart/lib/utility/voxgig_struct.dart +2456 -0
  705. package/project/.sdk/tm/dart/src/feature/README.md +3 -0
  706. package/project/.sdk/tm/dart/src/feature/audit/.gitkeep +0 -0
  707. package/project/.sdk/tm/dart/src/feature/base/.gitkeep +0 -0
  708. package/project/.sdk/tm/dart/src/feature/cache/.gitkeep +0 -0
  709. package/project/.sdk/tm/dart/src/feature/clienttrack/.gitkeep +0 -0
  710. package/project/.sdk/tm/dart/src/feature/debug/.gitkeep +0 -0
  711. package/project/.sdk/tm/dart/src/feature/idempotency/.gitkeep +0 -0
  712. package/project/.sdk/tm/dart/src/feature/log/.gitkeep +0 -0
  713. package/project/.sdk/tm/dart/src/feature/metrics/.gitkeep +0 -0
  714. package/project/.sdk/tm/dart/src/feature/netsim/.gitkeep +0 -0
  715. package/project/.sdk/tm/dart/src/feature/paging/.gitkeep +0 -0
  716. package/project/.sdk/tm/dart/src/feature/proxy/.gitkeep +0 -0
  717. package/project/.sdk/tm/dart/src/feature/ratelimit/.gitkeep +0 -0
  718. package/project/.sdk/tm/dart/src/feature/rbac/.gitkeep +0 -0
  719. package/project/.sdk/tm/dart/src/feature/retry/.gitkeep +0 -0
  720. package/project/.sdk/tm/dart/src/feature/streaming/.gitkeep +0 -0
  721. package/project/.sdk/tm/dart/src/feature/telemetry/.gitkeep +0 -0
  722. package/project/.sdk/tm/dart/src/feature/test/.gitkeep +0 -0
  723. package/project/.sdk/tm/dart/src/feature/timeout/.gitkeep +0 -0
  724. package/project/.sdk/tm/dart/test/custom_test.dart +65 -0
  725. package/project/.sdk/tm/dart/test/exists_test.dart +12 -0
  726. package/project/.sdk/tm/dart/test/feature/harness.dart +329 -0
  727. package/project/.sdk/tm/dart/test/feature_test.dart +1139 -0
  728. package/project/.sdk/tm/dart/test/harness.dart +153 -0
  729. package/project/.sdk/tm/dart/test/netsim_test.dart +48 -0
  730. package/project/.sdk/tm/dart/test/pipeline_test.dart +608 -0
  731. package/project/.sdk/tm/dart/test/primary_test.dart +411 -0
  732. package/project/.sdk/tm/dart/test/runner.dart +406 -0
  733. package/project/.sdk/tm/dart/test/sdk-test-control.json +19 -0
  734. package/project/.sdk/tm/dart/test/struct_corpus.dart +531 -0
  735. package/project/.sdk/tm/dart/test/struct_test.dart +41 -0
  736. package/project/.sdk/tm/dart/test/utility.dart +159 -0
  737. package/project/.sdk/tm/elixir/LICENSE +21 -0
  738. package/project/.sdk/tm/elixir/Makefile +15 -0
  739. package/project/.sdk/tm/elixir/VERSION +1 -0
  740. package/project/.sdk/tm/elixir/lib/projectname/context.ex +138 -0
  741. package/project/.sdk/tm/elixir/lib/projectname/core.ex +125 -0
  742. package/project/.sdk/tm/elixir/lib/projectname/entity_base.ex +155 -0
  743. package/project/.sdk/tm/elixir/lib/projectname/error.ex +16 -0
  744. package/project/.sdk/tm/elixir/lib/projectname/feature/audit.ex +125 -0
  745. package/project/.sdk/tm/elixir/lib/projectname/feature/cache.ex +170 -0
  746. package/project/.sdk/tm/elixir/lib/projectname/feature/clienttrack.ex +136 -0
  747. package/project/.sdk/tm/elixir/lib/projectname/feature/debug.ex +232 -0
  748. package/project/.sdk/tm/elixir/lib/projectname/feature/idempotency.ex +107 -0
  749. package/project/.sdk/tm/elixir/lib/projectname/feature/log.ex +62 -0
  750. package/project/.sdk/tm/elixir/lib/projectname/feature/metrics.ex +130 -0
  751. package/project/.sdk/tm/elixir/lib/projectname/feature/netsim.ex +213 -0
  752. package/project/.sdk/tm/elixir/lib/projectname/feature/paging.ex +191 -0
  753. package/project/.sdk/tm/elixir/lib/projectname/feature/proxy.ex +142 -0
  754. package/project/.sdk/tm/elixir/lib/projectname/feature/ratelimit.ex +81 -0
  755. package/project/.sdk/tm/elixir/lib/projectname/feature/rbac.ex +139 -0
  756. package/project/.sdk/tm/elixir/lib/projectname/feature/retry.ex +150 -0
  757. package/project/.sdk/tm/elixir/lib/projectname/feature/streaming.ex +107 -0
  758. package/project/.sdk/tm/elixir/lib/projectname/feature/telemetry.ex +172 -0
  759. package/project/.sdk/tm/elixir/lib/projectname/feature/test.ex +285 -0
  760. package/project/.sdk/tm/elixir/lib/projectname/feature/timeout.ex +64 -0
  761. package/project/.sdk/tm/elixir/lib/projectname/feature.ex +90 -0
  762. package/project/.sdk/tm/elixir/lib/projectname/helpers.ex +66 -0
  763. package/project/.sdk/tm/elixir/lib/projectname/json.ex +115 -0
  764. package/project/.sdk/tm/elixir/lib/projectname/utility.ex +1257 -0
  765. package/project/.sdk/tm/elixir/lib/utility/struct/voxgig_struct.ex +2615 -0
  766. package/project/.sdk/tm/elixir/src/feature/README.md +3 -0
  767. package/project/.sdk/tm/elixir/src/feature/audit/.gitkeep +0 -0
  768. package/project/.sdk/tm/elixir/src/feature/base/.gitkeep +0 -0
  769. package/project/.sdk/tm/elixir/src/feature/cache/.gitkeep +0 -0
  770. package/project/.sdk/tm/elixir/src/feature/clienttrack/.gitkeep +0 -0
  771. package/project/.sdk/tm/elixir/src/feature/debug/.gitkeep +0 -0
  772. package/project/.sdk/tm/elixir/src/feature/idempotency/.gitkeep +0 -0
  773. package/project/.sdk/tm/elixir/src/feature/log/.gitkeep +0 -0
  774. package/project/.sdk/tm/elixir/src/feature/metrics/.gitkeep +0 -0
  775. package/project/.sdk/tm/elixir/src/feature/netsim/.gitkeep +0 -0
  776. package/project/.sdk/tm/elixir/src/feature/paging/.gitkeep +0 -0
  777. package/project/.sdk/tm/elixir/src/feature/proxy/.gitkeep +0 -0
  778. package/project/.sdk/tm/elixir/src/feature/ratelimit/.gitkeep +0 -0
  779. package/project/.sdk/tm/elixir/src/feature/rbac/.gitkeep +0 -0
  780. package/project/.sdk/tm/elixir/src/feature/retry/.gitkeep +0 -0
  781. package/project/.sdk/tm/elixir/src/feature/streaming/.gitkeep +0 -0
  782. package/project/.sdk/tm/elixir/src/feature/telemetry/.gitkeep +0 -0
  783. package/project/.sdk/tm/elixir/src/feature/test/.gitkeep +0 -0
  784. package/project/.sdk/tm/elixir/src/feature/timeout/.gitkeep +0 -0
  785. package/project/.sdk/tm/elixir/test/feature_test.exs +879 -0
  786. package/project/.sdk/tm/elixir/test/netsim_test.exs +58 -0
  787. package/project/.sdk/tm/elixir/test/pipeline_test.exs +558 -0
  788. package/project/.sdk/tm/elixir/test/primary_utility_test.exs +133 -0
  789. package/project/.sdk/tm/elixir/test/stream_test.exs +119 -0
  790. package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +18 -0
  791. package/project/.sdk/tm/elixir/test/support/feature_harness.ex +346 -0
  792. package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +677 -0
  793. package/project/.sdk/tm/elixir/test/test_helper.exs +1 -0
  794. package/project/.sdk/tm/go/core/context.go +10 -0
  795. package/project/.sdk/tm/go/core/control.go +2 -0
  796. package/project/.sdk/tm/go/core/result.go +6 -0
  797. package/project/.sdk/tm/go/core/types.go +1 -0
  798. package/project/.sdk/tm/go/feature/audit_feature.go +110 -0
  799. package/project/.sdk/tm/go/feature/base_feature.go +8 -0
  800. package/project/.sdk/tm/go/feature/cache_feature.go +171 -0
  801. package/project/.sdk/tm/go/feature/clienttrack_feature.go +100 -0
  802. package/project/.sdk/tm/go/feature/debug_feature.go +159 -0
  803. package/project/.sdk/tm/go/feature/feature_options.go +204 -0
  804. package/project/.sdk/tm/go/feature/idempotency_feature.go +115 -0
  805. package/project/.sdk/tm/go/feature/metrics_feature.go +112 -0
  806. package/project/.sdk/tm/go/feature/netsim_feature.go +184 -0
  807. package/project/.sdk/tm/go/feature/paging_feature.go +173 -0
  808. package/project/.sdk/tm/go/feature/proxy_feature.go +121 -0
  809. package/project/.sdk/tm/go/feature/ratelimit_feature.go +88 -0
  810. package/project/.sdk/tm/go/feature/rbac_feature.go +126 -0
  811. package/project/.sdk/tm/go/feature/retry_feature.go +165 -0
  812. package/project/.sdk/tm/go/feature/streaming_feature.go +119 -0
  813. package/project/.sdk/tm/go/feature/telemetry_feature.go +142 -0
  814. package/project/.sdk/tm/go/feature/test_feature.go +78 -3
  815. package/project/.sdk/tm/go/feature/timeout_feature.go +88 -0
  816. package/project/.sdk/tm/go/src/feature/audit/.gitkeep +0 -0
  817. package/project/.sdk/tm/go/src/feature/cache/.gitkeep +0 -0
  818. package/project/.sdk/tm/go/src/feature/clienttrack/.gitkeep +0 -0
  819. package/project/.sdk/tm/go/src/feature/debug/.gitkeep +0 -0
  820. package/project/.sdk/tm/go/src/feature/idempotency/.gitkeep +0 -0
  821. package/project/.sdk/tm/go/src/feature/metrics/.gitkeep +0 -0
  822. package/project/.sdk/tm/go/src/feature/netsim/.gitkeep +0 -0
  823. package/project/.sdk/tm/go/src/feature/paging/.gitkeep +0 -0
  824. package/project/.sdk/tm/go/src/feature/proxy/.gitkeep +0 -0
  825. package/project/.sdk/tm/go/src/feature/ratelimit/.gitkeep +0 -0
  826. package/project/.sdk/tm/go/src/feature/rbac/.gitkeep +0 -0
  827. package/project/.sdk/tm/go/src/feature/retry/.gitkeep +0 -0
  828. package/project/.sdk/tm/go/src/feature/streaming/.gitkeep +0 -0
  829. package/project/.sdk/tm/go/src/feature/telemetry/.gitkeep +0 -0
  830. package/project/.sdk/tm/go/src/feature/timeout/.gitkeep +0 -0
  831. package/project/.sdk/tm/go/test/feature_test.go +1465 -0
  832. package/project/.sdk/tm/go/test/netsim_test.go +70 -0
  833. package/project/.sdk/tm/go/test/pipeline_test.go +571 -0
  834. package/project/.sdk/tm/go/utility/feature_add.go +38 -0
  835. package/project/.sdk/tm/go/utility/fetcher.go +13 -1
  836. package/project/.sdk/tm/go/utility/make_error.go +8 -0
  837. package/project/.sdk/tm/go/utility/make_options.go +62 -0
  838. package/project/.sdk/tm/go/utility/make_point.go +6 -0
  839. package/project/.sdk/tm/go-cli/src/feature/audit/.gitkeep +0 -0
  840. package/project/.sdk/tm/go-cli/src/feature/cache/.gitkeep +0 -0
  841. package/project/.sdk/tm/go-cli/src/feature/clienttrack/.gitkeep +0 -0
  842. package/project/.sdk/tm/go-cli/src/feature/debug/.gitkeep +0 -0
  843. package/project/.sdk/tm/go-cli/src/feature/idempotency/.gitkeep +0 -0
  844. package/project/.sdk/tm/go-cli/src/feature/metrics/.gitkeep +0 -0
  845. package/project/.sdk/tm/go-cli/src/feature/netsim/.gitkeep +0 -0
  846. package/project/.sdk/tm/go-cli/src/feature/paging/.gitkeep +0 -0
  847. package/project/.sdk/tm/go-cli/src/feature/proxy/.gitkeep +0 -0
  848. package/project/.sdk/tm/go-cli/src/feature/ratelimit/.gitkeep +0 -0
  849. package/project/.sdk/tm/go-cli/src/feature/rbac/.gitkeep +0 -0
  850. package/project/.sdk/tm/go-cli/src/feature/retry/.gitkeep +0 -0
  851. package/project/.sdk/tm/go-cli/src/feature/streaming/.gitkeep +0 -0
  852. package/project/.sdk/tm/go-cli/src/feature/telemetry/.gitkeep +0 -0
  853. package/project/.sdk/tm/go-cli/src/feature/timeout/.gitkeep +0 -0
  854. package/project/.sdk/tm/go-mcp/src/feature/audit/.gitkeep +0 -0
  855. package/project/.sdk/tm/go-mcp/src/feature/cache/.gitkeep +0 -0
  856. package/project/.sdk/tm/go-mcp/src/feature/clienttrack/.gitkeep +0 -0
  857. package/project/.sdk/tm/go-mcp/src/feature/debug/.gitkeep +0 -0
  858. package/project/.sdk/tm/go-mcp/src/feature/idempotency/.gitkeep +0 -0
  859. package/project/.sdk/tm/go-mcp/src/feature/metrics/.gitkeep +0 -0
  860. package/project/.sdk/tm/go-mcp/src/feature/netsim/.gitkeep +0 -0
  861. package/project/.sdk/tm/go-mcp/src/feature/paging/.gitkeep +0 -0
  862. package/project/.sdk/tm/go-mcp/src/feature/proxy/.gitkeep +0 -0
  863. package/project/.sdk/tm/go-mcp/src/feature/ratelimit/.gitkeep +0 -0
  864. package/project/.sdk/tm/go-mcp/src/feature/rbac/.gitkeep +0 -0
  865. package/project/.sdk/tm/go-mcp/src/feature/retry/.gitkeep +0 -0
  866. package/project/.sdk/tm/go-mcp/src/feature/streaming/.gitkeep +0 -0
  867. package/project/.sdk/tm/go-mcp/src/feature/telemetry/.gitkeep +0 -0
  868. package/project/.sdk/tm/go-mcp/src/feature/timeout/.gitkeep +0 -0
  869. package/project/.sdk/tm/haskell/LICENSE +21 -0
  870. package/project/.sdk/tm/haskell/Makefile +22 -0
  871. package/project/.sdk/tm/haskell/VERSION +1 -0
  872. package/project/.sdk/tm/haskell/src/SdkFeatures.hs +1278 -0
  873. package/project/.sdk/tm/haskell/src/SdkHelpers.hs +337 -0
  874. package/project/.sdk/tm/haskell/src/SdkRuntime.hs +1007 -0
  875. package/project/.sdk/tm/haskell/src/SdkTypes.hs +186 -0
  876. package/project/.sdk/tm/haskell/src/VoxgigStruct.hs +2299 -0
  877. package/project/.sdk/tm/haskell/src/Vregex.hs +237 -0
  878. package/project/.sdk/tm/haskell/src/feature/README.md +5 -0
  879. package/project/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
  880. package/project/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
  881. package/project/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
  882. package/project/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
  883. package/project/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
  884. package/project/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
  885. package/project/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
  886. package/project/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
  887. package/project/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
  888. package/project/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
  889. package/project/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
  890. package/project/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
  891. package/project/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
  892. package/project/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
  893. package/project/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
  894. package/project/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
  895. package/project/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
  896. package/project/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
  897. package/project/.sdk/tm/haskell/test/Harness.hs +276 -0
  898. package/project/.sdk/tm/haskell/test/Runner.hs +47 -0
  899. package/project/.sdk/tm/haskell/test/StructCorpus.hs +449 -0
  900. package/project/.sdk/tm/haskell/test/TCustomUtility.hs +38 -0
  901. package/project/.sdk/tm/haskell/test/TFeature.hs +794 -0
  902. package/project/.sdk/tm/haskell/test/TNetsim.hs +50 -0
  903. package/project/.sdk/tm/haskell/test/TPipeline.hs +334 -0
  904. package/project/.sdk/tm/haskell/test/TPrimaryUtility.hs +386 -0
  905. package/project/.sdk/tm/haskell/test/TestJson.hs +107 -0
  906. package/project/.sdk/tm/haskell/test/Testutil.hs +59 -0
  907. package/project/.sdk/tm/java/LICENSE +22 -0
  908. package/project/.sdk/tm/java/Makefile +44 -0
  909. package/project/.sdk/tm/java/VERSION +1 -0
  910. package/project/.sdk/tm/java/core/Context.java +269 -0
  911. package/project/.sdk/tm/java/core/Control.java +23 -0
  912. package/project/.sdk/tm/java/core/Entity.java +13 -0
  913. package/project/.sdk/tm/java/core/Feature.java +45 -0
  914. package/project/.sdk/tm/java/core/FeaturePlacement.java +13 -0
  915. package/project/.sdk/tm/java/core/Helpers.java +50 -0
  916. package/project/.sdk/tm/java/core/Operation.java +47 -0
  917. package/project/.sdk/tm/java/core/Point.java +90 -0
  918. package/project/.sdk/tm/java/core/Response.java +48 -0
  919. package/project/.sdk/tm/java/core/Result.java +64 -0
  920. package/project/.sdk/tm/java/core/SdkClient.java +280 -0
  921. package/project/.sdk/tm/java/core/SdkEntity.java +28 -0
  922. package/project/.sdk/tm/java/core/Spec.java +84 -0
  923. package/project/.sdk/tm/java/core/Utility.java +128 -0
  924. package/project/.sdk/tm/java/feature/AuditFeature.java +113 -0
  925. package/project/.sdk/tm/java/feature/BaseFeature.java +91 -0
  926. package/project/.sdk/tm/java/feature/CacheFeature.java +184 -0
  927. package/project/.sdk/tm/java/feature/ClienttrackFeature.java +103 -0
  928. package/project/.sdk/tm/java/feature/DebugFeature.java +163 -0
  929. package/project/.sdk/tm/java/feature/FeatureOptions.java +204 -0
  930. package/project/.sdk/tm/java/feature/IdempotencyFeature.java +115 -0
  931. package/project/.sdk/tm/java/feature/LogFeature.java +143 -0
  932. package/project/.sdk/tm/java/feature/MetricsFeature.java +115 -0
  933. package/project/.sdk/tm/java/feature/NetsimFeature.java +181 -0
  934. package/project/.sdk/tm/java/feature/PagingFeature.java +178 -0
  935. package/project/.sdk/tm/java/feature/ProxyFeature.java +122 -0
  936. package/project/.sdk/tm/java/feature/RatelimitFeature.java +83 -0
  937. package/project/.sdk/tm/java/feature/RbacFeature.java +132 -0
  938. package/project/.sdk/tm/java/feature/RetryFeature.java +156 -0
  939. package/project/.sdk/tm/java/feature/StreamingFeature.java +110 -0
  940. package/project/.sdk/tm/java/feature/TelemetryFeature.java +146 -0
  941. package/project/.sdk/tm/java/feature/TestFeature.java +333 -0
  942. package/project/.sdk/tm/java/feature/TimeoutFeature.java +89 -0
  943. package/project/.sdk/tm/java/src/feature/README.md +1 -0
  944. package/project/.sdk/tm/java/src/feature/audit/.gitkeep +0 -0
  945. package/project/.sdk/tm/java/src/feature/base/.gitkeep +0 -0
  946. package/project/.sdk/tm/java/src/feature/cache/.gitkeep +0 -0
  947. package/project/.sdk/tm/java/src/feature/clienttrack/.gitkeep +0 -0
  948. package/project/.sdk/tm/java/src/feature/debug/.gitkeep +0 -0
  949. package/project/.sdk/tm/java/src/feature/idempotency/.gitkeep +0 -0
  950. package/project/.sdk/tm/java/src/feature/log/.gitkeep +0 -0
  951. package/project/.sdk/tm/java/src/feature/metrics/.gitkeep +0 -0
  952. package/project/.sdk/tm/java/src/feature/netsim/.gitkeep +0 -0
  953. package/project/.sdk/tm/java/src/feature/paging/.gitkeep +0 -0
  954. package/project/.sdk/tm/java/src/feature/proxy/.gitkeep +0 -0
  955. package/project/.sdk/tm/java/src/feature/ratelimit/.gitkeep +0 -0
  956. package/project/.sdk/tm/java/src/feature/rbac/.gitkeep +0 -0
  957. package/project/.sdk/tm/java/src/feature/retry/.gitkeep +0 -0
  958. package/project/.sdk/tm/java/src/feature/streaming/.gitkeep +0 -0
  959. package/project/.sdk/tm/java/src/feature/telemetry/.gitkeep +0 -0
  960. package/project/.sdk/tm/java/src/feature/test/.gitkeep +0 -0
  961. package/project/.sdk/tm/java/src/feature/timeout/.gitkeep +0 -0
  962. package/project/.sdk/tm/java/test/CustomUtilityTest.java +59 -0
  963. package/project/.sdk/tm/java/test/ExistsTest.java +16 -0
  964. package/project/.sdk/tm/java/test/FeatureHarness.java +448 -0
  965. package/project/.sdk/tm/java/test/FeatureTest.java +1018 -0
  966. package/project/.sdk/tm/java/test/NetsimTest.java +59 -0
  967. package/project/.sdk/tm/java/test/PipelineTest.java +618 -0
  968. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +864 -0
  969. package/project/.sdk/tm/java/test/RunnerSupport.java +545 -0
  970. package/project/.sdk/tm/java/test/StructCorpusTest.java +351 -0
  971. package/project/.sdk/tm/java/test/StructRunner.java +281 -0
  972. package/project/.sdk/tm/java/test/sdk-test-control.json +19 -0
  973. package/project/.sdk/tm/java/utility/Clean.java +12 -0
  974. package/project/.sdk/tm/java/utility/Done.java +29 -0
  975. package/project/.sdk/tm/java/utility/FeatureAdd.java +59 -0
  976. package/project/.sdk/tm/java/utility/FeatureHookUtil.java +72 -0
  977. package/project/.sdk/tm/java/utility/FeatureInit.java +35 -0
  978. package/project/.sdk/tm/java/utility/Fetcher.java +170 -0
  979. package/project/.sdk/tm/java/utility/Json.java +268 -0
  980. package/project/.sdk/tm/java/utility/MakeContext.java +14 -0
  981. package/project/.sdk/tm/java/utility/MakeError.java +81 -0
  982. package/project/.sdk/tm/java/utility/MakeFetchDef.java +48 -0
  983. package/project/.sdk/tm/java/utility/MakeOptions.java +168 -0
  984. package/project/.sdk/tm/java/utility/MakePoint.java +118 -0
  985. package/project/.sdk/tm/java/utility/MakeRequest.java +83 -0
  986. package/project/.sdk/tm/java/utility/MakeResponse.java +54 -0
  987. package/project/.sdk/tm/java/utility/MakeResult.java +68 -0
  988. package/project/.sdk/tm/java/utility/MakeSpec.java +69 -0
  989. package/project/.sdk/tm/java/utility/MakeUrl.java +67 -0
  990. package/project/.sdk/tm/java/utility/Param.java +74 -0
  991. package/project/.sdk/tm/java/utility/PrepareAuth.java +66 -0
  992. package/project/.sdk/tm/java/utility/PrepareBody.java +16 -0
  993. package/project/.sdk/tm/java/utility/PrepareHeaders.java +28 -0
  994. package/project/.sdk/tm/java/utility/PrepareMethod.java +28 -0
  995. package/project/.sdk/tm/java/utility/PrepareParams.java +50 -0
  996. package/project/.sdk/tm/java/utility/PreparePath.java +26 -0
  997. package/project/.sdk/tm/java/utility/PrepareQuery.java +54 -0
  998. package/project/.sdk/tm/java/utility/Register.java +41 -0
  999. package/project/.sdk/tm/java/utility/ResultBasic.java +36 -0
  1000. package/project/.sdk/tm/java/utility/ResultBody.java +23 -0
  1001. package/project/.sdk/tm/java/utility/ResultHeaders.java +36 -0
  1002. package/project/.sdk/tm/java/utility/TransformRequest.java +35 -0
  1003. package/project/.sdk/tm/java/utility/TransformResponse.java +52 -0
  1004. package/project/.sdk/tm/java/utility/struct/Struct.java +3550 -0
  1005. package/project/.sdk/tm/js/src/feature/audit/AuditFeature.js +96 -0
  1006. package/project/.sdk/tm/js/src/feature/cache/CacheFeature.js +150 -0
  1007. package/project/.sdk/tm/js/src/feature/clienttrack/ClienttrackFeature.js +104 -0
  1008. package/project/.sdk/tm/js/src/feature/debug/DebugFeature.js +132 -0
  1009. package/project/.sdk/tm/js/src/feature/idempotency/IdempotencyFeature.js +95 -0
  1010. package/project/.sdk/tm/js/src/feature/metrics/MetricsFeature.js +102 -0
  1011. package/project/.sdk/tm/js/src/feature/netsim/NetsimFeature.js +187 -0
  1012. package/project/.sdk/tm/js/src/feature/paging/PagingFeature.js +139 -0
  1013. package/project/.sdk/tm/js/src/feature/proxy/ProxyFeature.js +110 -0
  1014. package/project/.sdk/tm/js/src/feature/ratelimit/RatelimitFeature.js +106 -0
  1015. package/project/.sdk/tm/js/src/feature/rbac/RbacFeature.js +102 -0
  1016. package/project/.sdk/tm/js/src/feature/retry/RetryFeature.js +158 -0
  1017. package/project/.sdk/tm/js/src/feature/streaming/StreamingFeature.js +96 -0
  1018. package/project/.sdk/tm/js/src/feature/telemetry/TelemetryFeature.js +128 -0
  1019. package/project/.sdk/tm/js/src/feature/test/TestFeature.js +58 -1
  1020. package/project/.sdk/tm/js/src/feature/timeout/TimeoutFeature.js +101 -0
  1021. package/project/.sdk/tm/js/src/utility/FeatureHookUtility.js +4 -1
  1022. package/project/.sdk/tm/js/src/utility/MakeErrorUtility.js +9 -0
  1023. package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +31 -1
  1024. package/project/.sdk/tm/js/test/feature/harness.js +275 -0
  1025. package/project/.sdk/tm/js/test/feature.test.js +772 -0
  1026. package/project/.sdk/tm/js/test/netsim.test.js +43 -0
  1027. package/project/.sdk/tm/js/test/pipeline.test.js +382 -0
  1028. package/project/.sdk/tm/kotlin/LICENSE +22 -0
  1029. package/project/.sdk/tm/kotlin/Makefile +43 -0
  1030. package/project/.sdk/tm/kotlin/VERSION +1 -0
  1031. package/project/.sdk/tm/kotlin/core/Context.kt +247 -0
  1032. package/project/.sdk/tm/kotlin/core/Control.kt +21 -0
  1033. package/project/.sdk/tm/kotlin/core/Helpers.kt +49 -0
  1034. package/project/.sdk/tm/kotlin/core/Interfaces.kt +88 -0
  1035. package/project/.sdk/tm/kotlin/core/Operation.kt +43 -0
  1036. package/project/.sdk/tm/kotlin/core/Point.kt +83 -0
  1037. package/project/.sdk/tm/kotlin/core/Response.kt +43 -0
  1038. package/project/.sdk/tm/kotlin/core/Result.kt +61 -0
  1039. package/project/.sdk/tm/kotlin/core/SdkClient.kt +266 -0
  1040. package/project/.sdk/tm/kotlin/core/Spec.kt +76 -0
  1041. package/project/.sdk/tm/kotlin/core/Utility.kt +93 -0
  1042. package/project/.sdk/tm/kotlin/feature/AuditFeature.kt +96 -0
  1043. package/project/.sdk/tm/kotlin/feature/BaseFeature.kt +57 -0
  1044. package/project/.sdk/tm/kotlin/feature/CacheFeature.kt +167 -0
  1045. package/project/.sdk/tm/kotlin/feature/ClienttrackFeature.kt +84 -0
  1046. package/project/.sdk/tm/kotlin/feature/DebugFeature.kt +141 -0
  1047. package/project/.sdk/tm/kotlin/feature/FeatureOptions.kt +191 -0
  1048. package/project/.sdk/tm/kotlin/feature/IdempotencyFeature.kt +98 -0
  1049. package/project/.sdk/tm/kotlin/feature/LogFeature.kt +92 -0
  1050. package/project/.sdk/tm/kotlin/feature/MetricsFeature.kt +96 -0
  1051. package/project/.sdk/tm/kotlin/feature/NetsimFeature.kt +162 -0
  1052. package/project/.sdk/tm/kotlin/feature/PagingFeature.kt +143 -0
  1053. package/project/.sdk/tm/kotlin/feature/ProxyFeature.kt +109 -0
  1054. package/project/.sdk/tm/kotlin/feature/RatelimitFeature.kt +77 -0
  1055. package/project/.sdk/tm/kotlin/feature/RbacFeature.kt +100 -0
  1056. package/project/.sdk/tm/kotlin/feature/RetryFeature.kt +140 -0
  1057. package/project/.sdk/tm/kotlin/feature/StreamingFeature.kt +90 -0
  1058. package/project/.sdk/tm/kotlin/feature/TelemetryFeature.kt +118 -0
  1059. package/project/.sdk/tm/kotlin/feature/TestFeature.kt +306 -0
  1060. package/project/.sdk/tm/kotlin/feature/TimeoutFeature.kt +74 -0
  1061. package/project/.sdk/tm/kotlin/src/feature/README.md +1 -0
  1062. package/project/.sdk/tm/kotlin/src/feature/audit/.gitkeep +0 -0
  1063. package/project/.sdk/tm/kotlin/src/feature/base/.gitkeep +0 -0
  1064. package/project/.sdk/tm/kotlin/src/feature/cache/.gitkeep +0 -0
  1065. package/project/.sdk/tm/kotlin/src/feature/clienttrack/.gitkeep +0 -0
  1066. package/project/.sdk/tm/kotlin/src/feature/debug/.gitkeep +0 -0
  1067. package/project/.sdk/tm/kotlin/src/feature/idempotency/.gitkeep +0 -0
  1068. package/project/.sdk/tm/kotlin/src/feature/log/.gitkeep +0 -0
  1069. package/project/.sdk/tm/kotlin/src/feature/metrics/.gitkeep +0 -0
  1070. package/project/.sdk/tm/kotlin/src/feature/netsim/.gitkeep +0 -0
  1071. package/project/.sdk/tm/kotlin/src/feature/paging/.gitkeep +0 -0
  1072. package/project/.sdk/tm/kotlin/src/feature/proxy/.gitkeep +0 -0
  1073. package/project/.sdk/tm/kotlin/src/feature/ratelimit/.gitkeep +0 -0
  1074. package/project/.sdk/tm/kotlin/src/feature/rbac/.gitkeep +0 -0
  1075. package/project/.sdk/tm/kotlin/src/feature/retry/.gitkeep +0 -0
  1076. package/project/.sdk/tm/kotlin/src/feature/streaming/.gitkeep +0 -0
  1077. package/project/.sdk/tm/kotlin/src/feature/telemetry/.gitkeep +0 -0
  1078. package/project/.sdk/tm/kotlin/src/feature/test/.gitkeep +0 -0
  1079. package/project/.sdk/tm/kotlin/src/feature/timeout/.gitkeep +0 -0
  1080. package/project/.sdk/tm/kotlin/test/CustomUtilityTest.kt +51 -0
  1081. package/project/.sdk/tm/kotlin/test/ExistsTest.kt +15 -0
  1082. package/project/.sdk/tm/kotlin/test/FeatureHarness.kt +380 -0
  1083. package/project/.sdk/tm/kotlin/test/FeatureTest.kt +924 -0
  1084. package/project/.sdk/tm/kotlin/test/NetsimTest.kt +50 -0
  1085. package/project/.sdk/tm/kotlin/test/PipelineTest.kt +556 -0
  1086. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +829 -0
  1087. package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +477 -0
  1088. package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +297 -0
  1089. package/project/.sdk/tm/kotlin/test/StructRunner.kt +177 -0
  1090. package/project/.sdk/tm/kotlin/test/sdk-test-control.json +19 -0
  1091. package/project/.sdk/tm/kotlin/utility/CoreUtil.kt +96 -0
  1092. package/project/.sdk/tm/kotlin/utility/FeatureUtil.kt +121 -0
  1093. package/project/.sdk/tm/kotlin/utility/Fetcher.kt +156 -0
  1094. package/project/.sdk/tm/kotlin/utility/Json.kt +237 -0
  1095. package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +152 -0
  1096. package/project/.sdk/tm/kotlin/utility/MakePoint.kt +108 -0
  1097. package/project/.sdk/tm/kotlin/utility/MakeReqRes.kt +152 -0
  1098. package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +142 -0
  1099. package/project/.sdk/tm/kotlin/utility/Prepare.kt +236 -0
  1100. package/project/.sdk/tm/kotlin/utility/Register.kt +39 -0
  1101. package/project/.sdk/tm/kotlin/utility/ResultTransform.kt +109 -0
  1102. package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +2697 -0
  1103. package/project/.sdk/tm/lua/feature/audit_feature.lua +132 -0
  1104. package/project/.sdk/tm/lua/feature/cache_feature.lua +188 -0
  1105. package/project/.sdk/tm/lua/feature/clienttrack_feature.lua +127 -0
  1106. package/project/.sdk/tm/lua/feature/debug_feature.lua +194 -0
  1107. package/project/.sdk/tm/lua/feature/idempotency_feature.lua +127 -0
  1108. package/project/.sdk/tm/lua/feature/metrics_feature.lua +135 -0
  1109. package/project/.sdk/tm/lua/feature/netsim_feature.lua +205 -0
  1110. package/project/.sdk/tm/lua/feature/paging_feature.lua +180 -0
  1111. package/project/.sdk/tm/lua/feature/proxy_feature.lua +147 -0
  1112. package/project/.sdk/tm/lua/feature/ratelimit_feature.lua +120 -0
  1113. package/project/.sdk/tm/lua/feature/rbac_feature.lua +141 -0
  1114. package/project/.sdk/tm/lua/feature/retry_feature.lua +188 -0
  1115. package/project/.sdk/tm/lua/feature/streaming_feature.lua +143 -0
  1116. package/project/.sdk/tm/lua/feature/telemetry_feature.lua +159 -0
  1117. package/project/.sdk/tm/lua/feature/test_feature.lua +85 -1
  1118. package/project/.sdk/tm/lua/feature/timeout_feature.lua +94 -0
  1119. package/project/.sdk/tm/lua/src/feature/audit/.gitkeep +0 -0
  1120. package/project/.sdk/tm/lua/src/feature/cache/.gitkeep +0 -0
  1121. package/project/.sdk/tm/lua/src/feature/clienttrack/.gitkeep +0 -0
  1122. package/project/.sdk/tm/lua/src/feature/debug/.gitkeep +0 -0
  1123. package/project/.sdk/tm/lua/src/feature/idempotency/.gitkeep +0 -0
  1124. package/project/.sdk/tm/lua/src/feature/metrics/.gitkeep +0 -0
  1125. package/project/.sdk/tm/lua/src/feature/netsim/.gitkeep +0 -0
  1126. package/project/.sdk/tm/lua/src/feature/paging/.gitkeep +0 -0
  1127. package/project/.sdk/tm/lua/src/feature/proxy/.gitkeep +0 -0
  1128. package/project/.sdk/tm/lua/src/feature/ratelimit/.gitkeep +0 -0
  1129. package/project/.sdk/tm/lua/src/feature/rbac/.gitkeep +0 -0
  1130. package/project/.sdk/tm/lua/src/feature/retry/.gitkeep +0 -0
  1131. package/project/.sdk/tm/lua/src/feature/streaming/.gitkeep +0 -0
  1132. package/project/.sdk/tm/lua/src/feature/telemetry/.gitkeep +0 -0
  1133. package/project/.sdk/tm/lua/src/feature/timeout/.gitkeep +0 -0
  1134. package/project/.sdk/tm/lua/test/feature_test.lua +1244 -0
  1135. package/project/.sdk/tm/lua/test/netsim_test.lua +61 -0
  1136. package/project/.sdk/tm/lua/test/pipeline_test.lua +613 -0
  1137. package/project/.sdk/tm/lua/utility/feature_add.lua +28 -1
  1138. package/project/.sdk/tm/lua/utility/make_error.lua +9 -0
  1139. package/project/.sdk/tm/lua/utility/make_options.lua +58 -0
  1140. package/project/.sdk/tm/lua/utility/make_point.lua +8 -1
  1141. package/project/.sdk/tm/ocaml/LICENSE +21 -0
  1142. package/project/.sdk/tm/ocaml/Makefile +58 -0
  1143. package/project/.sdk/tm/ocaml/VERSION +1 -0
  1144. package/project/.sdk/tm/ocaml/sdk_features.ml +1127 -0
  1145. package/project/.sdk/tm/ocaml/sdk_helpers.ml +110 -0
  1146. package/project/.sdk/tm/ocaml/sdk_runtime.ml +942 -0
  1147. package/project/.sdk/tm/ocaml/sdk_types.ml +259 -0
  1148. package/project/.sdk/tm/ocaml/src/feature/README.md +1 -0
  1149. package/project/.sdk/tm/ocaml/src/feature/audit/.gitkeep +0 -0
  1150. package/project/.sdk/tm/ocaml/src/feature/base/.gitkeep +0 -0
  1151. package/project/.sdk/tm/ocaml/src/feature/cache/.gitkeep +0 -0
  1152. package/project/.sdk/tm/ocaml/src/feature/clienttrack/.gitkeep +0 -0
  1153. package/project/.sdk/tm/ocaml/src/feature/debug/.gitkeep +0 -0
  1154. package/project/.sdk/tm/ocaml/src/feature/idempotency/.gitkeep +0 -0
  1155. package/project/.sdk/tm/ocaml/src/feature/log/.gitkeep +0 -0
  1156. package/project/.sdk/tm/ocaml/src/feature/metrics/.gitkeep +0 -0
  1157. package/project/.sdk/tm/ocaml/src/feature/netsim/.gitkeep +0 -0
  1158. package/project/.sdk/tm/ocaml/src/feature/paging/.gitkeep +0 -0
  1159. package/project/.sdk/tm/ocaml/src/feature/proxy/.gitkeep +0 -0
  1160. package/project/.sdk/tm/ocaml/src/feature/ratelimit/.gitkeep +0 -0
  1161. package/project/.sdk/tm/ocaml/src/feature/rbac/.gitkeep +0 -0
  1162. package/project/.sdk/tm/ocaml/src/feature/retry/.gitkeep +0 -0
  1163. package/project/.sdk/tm/ocaml/src/feature/streaming/.gitkeep +0 -0
  1164. package/project/.sdk/tm/ocaml/src/feature/telemetry/.gitkeep +0 -0
  1165. package/project/.sdk/tm/ocaml/src/feature/test/.gitkeep +0 -0
  1166. package/project/.sdk/tm/ocaml/src/feature/timeout/.gitkeep +0 -0
  1167. package/project/.sdk/tm/ocaml/test/custom_utility.ml +30 -0
  1168. package/project/.sdk/tm/ocaml/test/harness.ml +198 -0
  1169. package/project/.sdk/tm/ocaml/test/struct_corpus.ml +487 -0
  1170. package/project/.sdk/tm/ocaml/test/t_feature.ml +533 -0
  1171. package/project/.sdk/tm/ocaml/test/t_main.ml +5 -0
  1172. package/project/.sdk/tm/ocaml/test/t_pipeline.ml +354 -0
  1173. package/project/.sdk/tm/ocaml/test/testutil.ml +57 -0
  1174. package/project/.sdk/tm/ocaml/utility/voxgig_struct.ml +1858 -0
  1175. package/project/.sdk/tm/ocaml/utility/vregex.ml +254 -0
  1176. package/project/.sdk/tm/perl/LICENSE +22 -0
  1177. package/project/.sdk/tm/perl/Makefile +57 -0
  1178. package/project/.sdk/tm/perl/core/context.pm +138 -0
  1179. package/project/.sdk/tm/perl/core/control.pm +22 -0
  1180. package/project/.sdk/tm/perl/core/error.pm +30 -0
  1181. package/project/.sdk/tm/perl/core/helpers.pm +142 -0
  1182. package/project/.sdk/tm/perl/core/operation.pm +47 -0
  1183. package/project/.sdk/tm/perl/core/response.pm +40 -0
  1184. package/project/.sdk/tm/perl/core/result.pm +45 -0
  1185. package/project/.sdk/tm/perl/core/spec.pm +33 -0
  1186. package/project/.sdk/tm/perl/core/utility_type.pm +32 -0
  1187. package/project/.sdk/tm/perl/feature/audit_feature.pm +128 -0
  1188. package/project/.sdk/tm/perl/feature/base_feature.pm +41 -0
  1189. package/project/.sdk/tm/perl/feature/cache_feature.pm +168 -0
  1190. package/project/.sdk/tm/perl/feature/clienttrack_feature.pm +126 -0
  1191. package/project/.sdk/tm/perl/feature/debug_feature.pm +168 -0
  1192. package/project/.sdk/tm/perl/feature/idempotency_feature.pm +104 -0
  1193. package/project/.sdk/tm/perl/feature/log_feature.pm +77 -0
  1194. package/project/.sdk/tm/perl/feature/metrics_feature.pm +124 -0
  1195. package/project/.sdk/tm/perl/feature/netsim_feature.pm +215 -0
  1196. package/project/.sdk/tm/perl/feature/paging_feature.pm +158 -0
  1197. package/project/.sdk/tm/perl/feature/proxy_feature.pm +128 -0
  1198. package/project/.sdk/tm/perl/feature/ratelimit_feature.pm +126 -0
  1199. package/project/.sdk/tm/perl/feature/rbac_feature.pm +124 -0
  1200. package/project/.sdk/tm/perl/feature/retry_feature.pm +153 -0
  1201. package/project/.sdk/tm/perl/feature/streaming_feature.pm +112 -0
  1202. package/project/.sdk/tm/perl/feature/telemetry_feature.pm +155 -0
  1203. package/project/.sdk/tm/perl/feature/test_feature.pm +314 -0
  1204. package/project/.sdk/tm/perl/feature/timeout_feature.pm +110 -0
  1205. package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +2897 -0
  1206. package/project/.sdk/tm/perl/src/feature/README.md +3 -0
  1207. package/project/.sdk/tm/perl/src/feature/audit/.gitkeep +0 -0
  1208. package/project/.sdk/tm/perl/src/feature/base/.gitkeep +0 -0
  1209. package/project/.sdk/tm/perl/src/feature/cache/.gitkeep +0 -0
  1210. package/project/.sdk/tm/perl/src/feature/clienttrack/.gitkeep +0 -0
  1211. package/project/.sdk/tm/perl/src/feature/debug/.gitkeep +0 -0
  1212. package/project/.sdk/tm/perl/src/feature/idempotency/.gitkeep +0 -0
  1213. package/project/.sdk/tm/perl/src/feature/log/.gitkeep +0 -0
  1214. package/project/.sdk/tm/perl/src/feature/metrics/.gitkeep +0 -0
  1215. package/project/.sdk/tm/perl/src/feature/netsim/.gitkeep +0 -0
  1216. package/project/.sdk/tm/perl/src/feature/paging/.gitkeep +0 -0
  1217. package/project/.sdk/tm/perl/src/feature/proxy/.gitkeep +0 -0
  1218. package/project/.sdk/tm/perl/src/feature/ratelimit/.gitkeep +0 -0
  1219. package/project/.sdk/tm/perl/src/feature/rbac/.gitkeep +0 -0
  1220. package/project/.sdk/tm/perl/src/feature/retry/.gitkeep +0 -0
  1221. package/project/.sdk/tm/perl/src/feature/streaming/.gitkeep +0 -0
  1222. package/project/.sdk/tm/perl/src/feature/telemetry/.gitkeep +0 -0
  1223. package/project/.sdk/tm/perl/src/feature/test/.gitkeep +0 -0
  1224. package/project/.sdk/tm/perl/src/feature/timeout/.gitkeep +0 -0
  1225. package/project/.sdk/tm/perl/t/feature.t +1054 -0
  1226. package/project/.sdk/tm/perl/t/netsim.t +55 -0
  1227. package/project/.sdk/tm/perl/t/pipeline.t +632 -0
  1228. package/project/.sdk/tm/perl/t/primary_utility.t +1023 -0
  1229. package/project/.sdk/tm/perl/t/runner.pm +140 -0
  1230. package/project/.sdk/tm/perl/t/sdk-test-control.json +19 -0
  1231. package/project/.sdk/tm/perl/t/stream.t +132 -0
  1232. package/project/.sdk/tm/perl/t/struct_runner.pm +275 -0
  1233. package/project/.sdk/tm/perl/t/struct_utility.t +438 -0
  1234. package/project/.sdk/tm/perl/utility/clean.pm +15 -0
  1235. package/project/.sdk/tm/perl/utility/done.pm +34 -0
  1236. package/project/.sdk/tm/perl/utility/feature_add.pm +47 -0
  1237. package/project/.sdk/tm/perl/utility/feature_hook.pm +25 -0
  1238. package/project/.sdk/tm/perl/utility/feature_init.pm +33 -0
  1239. package/project/.sdk/tm/perl/utility/fetcher.pm +112 -0
  1240. package/project/.sdk/tm/perl/utility/make_context.pm +22 -0
  1241. package/project/.sdk/tm/perl/utility/make_error.pm +74 -0
  1242. package/project/.sdk/tm/perl/utility/make_fetch_def.pm +46 -0
  1243. package/project/.sdk/tm/perl/utility/make_options.pm +123 -0
  1244. package/project/.sdk/tm/perl/utility/make_point.pm +104 -0
  1245. package/project/.sdk/tm/perl/utility/make_request.pm +66 -0
  1246. package/project/.sdk/tm/perl/utility/make_response.pm +38 -0
  1247. package/project/.sdk/tm/perl/utility/make_result.pm +53 -0
  1248. package/project/.sdk/tm/perl/utility/make_spec.pm +71 -0
  1249. package/project/.sdk/tm/perl/utility/make_url.pm +63 -0
  1250. package/project/.sdk/tm/perl/utility/param.pm +65 -0
  1251. package/project/.sdk/tm/perl/utility/prepare_auth.pm +56 -0
  1252. package/project/.sdk/tm/perl/utility/prepare_body.pm +17 -0
  1253. package/project/.sdk/tm/perl/utility/prepare_headers.pm +27 -0
  1254. package/project/.sdk/tm/perl/utility/prepare_method.pm +25 -0
  1255. package/project/.sdk/tm/perl/utility/prepare_params.pm +41 -0
  1256. package/project/.sdk/tm/perl/utility/prepare_path.pm +29 -0
  1257. package/project/.sdk/tm/perl/utility/prepare_query.pm +40 -0
  1258. package/project/.sdk/tm/perl/utility/register.pm +53 -0
  1259. package/project/.sdk/tm/perl/utility/result_basic.pm +38 -0
  1260. package/project/.sdk/tm/perl/utility/result_body.pm +28 -0
  1261. package/project/.sdk/tm/perl/utility/result_headers.pm +32 -0
  1262. package/project/.sdk/tm/perl/utility/transform_request.pm +30 -0
  1263. package/project/.sdk/tm/perl/utility/transform_response.pm +43 -0
  1264. package/project/.sdk/tm/php/core/Result.php +10 -0
  1265. package/project/.sdk/tm/php/feature/AuditFeature.php +125 -0
  1266. package/project/.sdk/tm/php/feature/BaseFeature.php +6 -0
  1267. package/project/.sdk/tm/php/feature/CacheFeature.php +158 -0
  1268. package/project/.sdk/tm/php/feature/ClienttrackFeature.php +126 -0
  1269. package/project/.sdk/tm/php/feature/DebugFeature.php +167 -0
  1270. package/project/.sdk/tm/php/feature/IdempotencyFeature.php +102 -0
  1271. package/project/.sdk/tm/php/feature/MetricsFeature.php +122 -0
  1272. package/project/.sdk/tm/php/feature/NetsimFeature.php +190 -0
  1273. package/project/.sdk/tm/php/feature/PagingFeature.php +153 -0
  1274. package/project/.sdk/tm/php/feature/ProxyFeature.php +136 -0
  1275. package/project/.sdk/tm/php/feature/RatelimitFeature.php +116 -0
  1276. package/project/.sdk/tm/php/feature/RbacFeature.php +133 -0
  1277. package/project/.sdk/tm/php/feature/RetryFeature.php +159 -0
  1278. package/project/.sdk/tm/php/feature/StreamingFeature.php +107 -0
  1279. package/project/.sdk/tm/php/feature/TelemetryFeature.php +156 -0
  1280. package/project/.sdk/tm/php/feature/TestFeature.php +80 -1
  1281. package/project/.sdk/tm/php/feature/TimeoutFeature.php +95 -0
  1282. package/project/.sdk/tm/php/src/feature/audit/.gitkeep +0 -0
  1283. package/project/.sdk/tm/php/src/feature/cache/.gitkeep +0 -0
  1284. package/project/.sdk/tm/php/src/feature/clienttrack/.gitkeep +0 -0
  1285. package/project/.sdk/tm/php/src/feature/debug/.gitkeep +0 -0
  1286. package/project/.sdk/tm/php/src/feature/idempotency/.gitkeep +0 -0
  1287. package/project/.sdk/tm/php/src/feature/metrics/.gitkeep +0 -0
  1288. package/project/.sdk/tm/php/src/feature/netsim/.gitkeep +0 -0
  1289. package/project/.sdk/tm/php/src/feature/paging/.gitkeep +0 -0
  1290. package/project/.sdk/tm/php/src/feature/proxy/.gitkeep +0 -0
  1291. package/project/.sdk/tm/php/src/feature/ratelimit/.gitkeep +0 -0
  1292. package/project/.sdk/tm/php/src/feature/rbac/.gitkeep +0 -0
  1293. package/project/.sdk/tm/php/src/feature/retry/.gitkeep +0 -0
  1294. package/project/.sdk/tm/php/src/feature/streaming/.gitkeep +0 -0
  1295. package/project/.sdk/tm/php/src/feature/telemetry/.gitkeep +0 -0
  1296. package/project/.sdk/tm/php/src/feature/timeout/.gitkeep +0 -0
  1297. package/project/.sdk/tm/php/test/FeatureTest.php +1259 -0
  1298. package/project/.sdk/tm/php/test/NetsimTest.php +53 -0
  1299. package/project/.sdk/tm/php/test/PipelineTest.php +674 -0
  1300. package/project/.sdk/tm/php/utility/FeatureAdd.php +32 -1
  1301. package/project/.sdk/tm/php/utility/MakeError.php +9 -0
  1302. package/project/.sdk/tm/php/utility/MakeOptions.php +46 -0
  1303. package/project/.sdk/tm/php/utility/MakePoint.php +7 -0
  1304. package/project/.sdk/tm/py/core/context.py +4 -0
  1305. package/project/.sdk/tm/py/core/control.py +3 -0
  1306. package/project/.sdk/tm/py/feature/audit_feature.py +98 -0
  1307. package/project/.sdk/tm/py/feature/cache_feature.py +138 -0
  1308. package/project/.sdk/tm/py/feature/clienttrack_feature.py +97 -0
  1309. package/project/.sdk/tm/py/feature/debug_feature.py +134 -0
  1310. package/project/.sdk/tm/py/feature/idempotency_feature.py +89 -0
  1311. package/project/.sdk/tm/py/feature/metrics_feature.py +93 -0
  1312. package/project/.sdk/tm/py/feature/netsim_feature.py +170 -0
  1313. package/project/.sdk/tm/py/feature/paging_feature.py +134 -0
  1314. package/project/.sdk/tm/py/feature/proxy_feature.py +104 -0
  1315. package/project/.sdk/tm/py/feature/ratelimit_feature.py +98 -0
  1316. package/project/.sdk/tm/py/feature/rbac_feature.py +102 -0
  1317. package/project/.sdk/tm/py/feature/retry_feature.py +142 -0
  1318. package/project/.sdk/tm/py/feature/streaming_feature.py +84 -0
  1319. package/project/.sdk/tm/py/feature/telemetry_feature.py +128 -0
  1320. package/project/.sdk/tm/py/feature/test_feature.py +70 -1
  1321. package/project/.sdk/tm/py/feature/timeout_feature.py +78 -0
  1322. package/project/.sdk/tm/py/src/feature/audit/.gitkeep +0 -0
  1323. package/project/.sdk/tm/py/src/feature/cache/.gitkeep +0 -0
  1324. package/project/.sdk/tm/py/src/feature/clienttrack/.gitkeep +0 -0
  1325. package/project/.sdk/tm/py/src/feature/debug/.gitkeep +0 -0
  1326. package/project/.sdk/tm/py/src/feature/idempotency/.gitkeep +0 -0
  1327. package/project/.sdk/tm/py/src/feature/metrics/.gitkeep +0 -0
  1328. package/project/.sdk/tm/py/src/feature/netsim/.gitkeep +0 -0
  1329. package/project/.sdk/tm/py/src/feature/paging/.gitkeep +0 -0
  1330. package/project/.sdk/tm/py/src/feature/proxy/.gitkeep +0 -0
  1331. package/project/.sdk/tm/py/src/feature/ratelimit/.gitkeep +0 -0
  1332. package/project/.sdk/tm/py/src/feature/rbac/.gitkeep +0 -0
  1333. package/project/.sdk/tm/py/src/feature/retry/.gitkeep +0 -0
  1334. package/project/.sdk/tm/py/src/feature/streaming/.gitkeep +0 -0
  1335. package/project/.sdk/tm/py/src/feature/telemetry/.gitkeep +0 -0
  1336. package/project/.sdk/tm/py/src/feature/timeout/.gitkeep +0 -0
  1337. package/project/.sdk/tm/py/test/feature_harness.py +336 -0
  1338. package/project/.sdk/tm/py/test/test_feature.py +807 -0
  1339. package/project/.sdk/tm/py/test/test_netsim.py +52 -0
  1340. package/project/.sdk/tm/py/test/test_pipeline.py +606 -0
  1341. package/project/.sdk/tm/py/utility/feature_add.py +25 -1
  1342. package/project/.sdk/tm/py/utility/make_error.py +8 -0
  1343. package/project/.sdk/tm/py/utility/make_options.py +32 -0
  1344. package/project/.sdk/tm/py/utility/make_point.py +8 -2
  1345. package/project/.sdk/tm/py/utility/make_request.py +6 -2
  1346. package/project/.sdk/tm/py/utility/make_response.py +6 -2
  1347. package/project/.sdk/tm/py/utility/make_result.py +6 -2
  1348. package/project/.sdk/tm/py/utility/make_spec.py +6 -2
  1349. package/project/.sdk/tm/rb/core/context.rb +2 -0
  1350. package/project/.sdk/tm/rb/core/control.rb +5 -1
  1351. package/project/.sdk/tm/rb/core/result.rb +2 -1
  1352. package/project/.sdk/tm/rb/feature/audit_feature.rb +103 -0
  1353. package/project/.sdk/tm/rb/feature/base_feature.rb +5 -0
  1354. package/project/.sdk/tm/rb/feature/cache_feature.rb +133 -0
  1355. package/project/.sdk/tm/rb/feature/clienttrack_feature.rb +91 -0
  1356. package/project/.sdk/tm/rb/feature/debug_feature.rb +138 -0
  1357. package/project/.sdk/tm/rb/feature/idempotency_feature.rb +78 -0
  1358. package/project/.sdk/tm/rb/feature/metrics_feature.rb +91 -0
  1359. package/project/.sdk/tm/rb/feature/netsim_feature.rb +167 -0
  1360. package/project/.sdk/tm/rb/feature/paging_feature.rb +120 -0
  1361. package/project/.sdk/tm/rb/feature/proxy_feature.rb +93 -0
  1362. package/project/.sdk/tm/rb/feature/ratelimit_feature.rb +95 -0
  1363. package/project/.sdk/tm/rb/feature/rbac_feature.rb +96 -0
  1364. package/project/.sdk/tm/rb/feature/retry_feature.rb +116 -0
  1365. package/project/.sdk/tm/rb/feature/streaming_feature.rb +85 -0
  1366. package/project/.sdk/tm/rb/feature/telemetry_feature.rb +122 -0
  1367. package/project/.sdk/tm/rb/feature/test_feature.rb +65 -1
  1368. package/project/.sdk/tm/rb/feature/timeout_feature.rb +74 -0
  1369. package/project/.sdk/tm/rb/src/feature/audit/.gitkeep +0 -0
  1370. package/project/.sdk/tm/rb/src/feature/cache/.gitkeep +0 -0
  1371. package/project/.sdk/tm/rb/src/feature/clienttrack/.gitkeep +0 -0
  1372. package/project/.sdk/tm/rb/src/feature/debug/.gitkeep +0 -0
  1373. package/project/.sdk/tm/rb/src/feature/idempotency/.gitkeep +0 -0
  1374. package/project/.sdk/tm/rb/src/feature/metrics/.gitkeep +0 -0
  1375. package/project/.sdk/tm/rb/src/feature/netsim/.gitkeep +0 -0
  1376. package/project/.sdk/tm/rb/src/feature/paging/.gitkeep +0 -0
  1377. package/project/.sdk/tm/rb/src/feature/proxy/.gitkeep +0 -0
  1378. package/project/.sdk/tm/rb/src/feature/ratelimit/.gitkeep +0 -0
  1379. package/project/.sdk/tm/rb/src/feature/rbac/.gitkeep +0 -0
  1380. package/project/.sdk/tm/rb/src/feature/retry/.gitkeep +0 -0
  1381. package/project/.sdk/tm/rb/src/feature/streaming/.gitkeep +0 -0
  1382. package/project/.sdk/tm/rb/src/feature/telemetry/.gitkeep +0 -0
  1383. package/project/.sdk/tm/rb/src/feature/timeout/.gitkeep +0 -0
  1384. package/project/.sdk/tm/rb/test/feature_test.rb +1031 -0
  1385. package/project/.sdk/tm/rb/test/netsim_test.rb +48 -0
  1386. package/project/.sdk/tm/rb/test/pipeline_test.rb +584 -0
  1387. package/project/.sdk/tm/rb/utility/feature_add.rb +28 -1
  1388. package/project/.sdk/tm/rb/utility/make_error.rb +8 -0
  1389. package/project/.sdk/tm/rb/utility/make_options.rb +35 -0
  1390. package/project/.sdk/tm/rb/utility/make_point.rb +7 -1
  1391. package/project/.sdk/tm/rust/LICENSE +22 -0
  1392. package/project/.sdk/tm/rust/Makefile +41 -0
  1393. package/project/.sdk/tm/rust/VERSION +1 -0
  1394. package/project/.sdk/tm/rust/core/context.rs +320 -0
  1395. package/project/.sdk/tm/rust/core/control.rs +37 -0
  1396. package/project/.sdk/tm/rust/core/helpers.rs +168 -0
  1397. package/project/.sdk/tm/rust/core/mod.rs +18 -0
  1398. package/project/.sdk/tm/rust/core/operation.rs +35 -0
  1399. package/project/.sdk/tm/rust/core/point.rs +68 -0
  1400. package/project/.sdk/tm/rust/core/response.rs +38 -0
  1401. package/project/.sdk/tm/rust/core/result.rs +90 -0
  1402. package/project/.sdk/tm/rust/core/spec.rs +109 -0
  1403. package/project/.sdk/tm/rust/core/types.rs +105 -0
  1404. package/project/.sdk/tm/rust/core/utility_type.rs +184 -0
  1405. package/project/.sdk/tm/rust/feature/audit.rs +138 -0
  1406. package/project/.sdk/tm/rust/feature/base.rs +49 -0
  1407. package/project/.sdk/tm/rust/feature/cache.rs +198 -0
  1408. package/project/.sdk/tm/rust/feature/clienttrack.rs +154 -0
  1409. package/project/.sdk/tm/rust/feature/debug.rs +188 -0
  1410. package/project/.sdk/tm/rust/feature/idempotency.rs +139 -0
  1411. package/project/.sdk/tm/rust/feature/log.rs +114 -0
  1412. package/project/.sdk/tm/rust/feature/metrics.rs +136 -0
  1413. package/project/.sdk/tm/rust/feature/mod.rs +24 -0
  1414. package/project/.sdk/tm/rust/feature/netsim.rs +233 -0
  1415. package/project/.sdk/tm/rust/feature/paging.rs +209 -0
  1416. package/project/.sdk/tm/rust/feature/proxy.rs +165 -0
  1417. package/project/.sdk/tm/rust/feature/ratelimit.rs +116 -0
  1418. package/project/.sdk/tm/rust/feature/rbac.rs +152 -0
  1419. package/project/.sdk/tm/rust/feature/retry.rs +190 -0
  1420. package/project/.sdk/tm/rust/feature/streaming.rs +124 -0
  1421. package/project/.sdk/tm/rust/feature/support.rs +145 -0
  1422. package/project/.sdk/tm/rust/feature/telemetry.rs +185 -0
  1423. package/project/.sdk/tm/rust/feature/test.rs +397 -0
  1424. package/project/.sdk/tm/rust/feature/timeout.rs +103 -0
  1425. package/project/.sdk/tm/rust/src/feature/README.md +1 -0
  1426. package/project/.sdk/tm/rust/src/feature/audit/.gitkeep +0 -0
  1427. package/project/.sdk/tm/rust/src/feature/base/.gitkeep +0 -0
  1428. package/project/.sdk/tm/rust/src/feature/cache/.gitkeep +0 -0
  1429. package/project/.sdk/tm/rust/src/feature/clienttrack/.gitkeep +0 -0
  1430. package/project/.sdk/tm/rust/src/feature/debug/.gitkeep +0 -0
  1431. package/project/.sdk/tm/rust/src/feature/idempotency/.gitkeep +0 -0
  1432. package/project/.sdk/tm/rust/src/feature/log/.gitkeep +0 -0
  1433. package/project/.sdk/tm/rust/src/feature/metrics/.gitkeep +0 -0
  1434. package/project/.sdk/tm/rust/src/feature/netsim/.gitkeep +0 -0
  1435. package/project/.sdk/tm/rust/src/feature/paging/.gitkeep +0 -0
  1436. package/project/.sdk/tm/rust/src/feature/proxy/.gitkeep +0 -0
  1437. package/project/.sdk/tm/rust/src/feature/ratelimit/.gitkeep +0 -0
  1438. package/project/.sdk/tm/rust/src/feature/rbac/.gitkeep +0 -0
  1439. package/project/.sdk/tm/rust/src/feature/retry/.gitkeep +0 -0
  1440. package/project/.sdk/tm/rust/src/feature/streaming/.gitkeep +0 -0
  1441. package/project/.sdk/tm/rust/src/feature/telemetry/.gitkeep +0 -0
  1442. package/project/.sdk/tm/rust/src/feature/test/.gitkeep +0 -0
  1443. package/project/.sdk/tm/rust/src/feature/timeout/.gitkeep +0 -0
  1444. package/project/.sdk/tm/rust/tests/common/mod.rs +969 -0
  1445. package/project/.sdk/tm/rust/tests/custom_utility_test.rs +69 -0
  1446. package/project/.sdk/tm/rust/tests/feature_test.rs +1864 -0
  1447. package/project/.sdk/tm/rust/tests/netsim_test.rs +78 -0
  1448. package/project/.sdk/tm/rust/tests/pipeline_test.rs +699 -0
  1449. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +999 -0
  1450. package/project/.sdk/tm/rust/tests/sdk-test-control.json +19 -0
  1451. package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +424 -0
  1452. package/project/.sdk/tm/rust/tests/struct_utility_test.rs +733 -0
  1453. package/project/.sdk/tm/rust/utility/clean.rs +13 -0
  1454. package/project/.sdk/tm/rust/utility/done.rs +31 -0
  1455. package/project/.sdk/tm/rust/utility/feature_add.rs +46 -0
  1456. package/project/.sdk/tm/rust/utility/feature_hook.rs +18 -0
  1457. package/project/.sdk/tm/rust/utility/feature_init.rs +26 -0
  1458. package/project/.sdk/tm/rust/utility/fetcher.rs +142 -0
  1459. package/project/.sdk/tm/rust/utility/jsonparse.rs +211 -0
  1460. package/project/.sdk/tm/rust/utility/make_context.rs +7 -0
  1461. package/project/.sdk/tm/rust/utility/make_error.rs +79 -0
  1462. package/project/.sdk/tm/rust/utility/make_fetch_def.rs +42 -0
  1463. package/project/.sdk/tm/rust/utility/make_options.rs +175 -0
  1464. package/project/.sdk/tm/rust/utility/make_point.rs +116 -0
  1465. package/project/.sdk/tm/rust/utility/make_request.rs +73 -0
  1466. package/project/.sdk/tm/rust/utility/make_response.rs +56 -0
  1467. package/project/.sdk/tm/rust/utility/make_result.rs +64 -0
  1468. package/project/.sdk/tm/rust/utility/make_spec.rs +70 -0
  1469. package/project/.sdk/tm/rust/utility/make_url.rs +83 -0
  1470. package/project/.sdk/tm/rust/utility/mod.rs +36 -0
  1471. package/project/.sdk/tm/rust/utility/param.rs +67 -0
  1472. package/project/.sdk/tm/rust/utility/prepare_auth.rs +65 -0
  1473. package/project/.sdk/tm/rust/utility/prepare_body.rs +14 -0
  1474. package/project/.sdk/tm/rust/utility/prepare_headers.rs +23 -0
  1475. package/project/.sdk/tm/rust/utility/prepare_method.rs +18 -0
  1476. package/project/.sdk/tm/rust/utility/prepare_params.rs +33 -0
  1477. package/project/.sdk/tm/rust/utility/prepare_path.rs +17 -0
  1478. package/project/.sdk/tm/rust/utility/prepare_query.rs +47 -0
  1479. package/project/.sdk/tm/rust/utility/result_basic.rs +35 -0
  1480. package/project/.sdk/tm/rust/utility/result_body.rs +26 -0
  1481. package/project/.sdk/tm/rust/utility/result_headers.rs +24 -0
  1482. package/project/.sdk/tm/rust/utility/transform_request.rs +31 -0
  1483. package/project/.sdk/tm/rust/utility/transform_response.rs +55 -0
  1484. package/project/.sdk/tm/rust/utility/voxgigstruct/consts.rs +122 -0
  1485. package/project/.sdk/tm/rust/utility/voxgigstruct/major.rs +2688 -0
  1486. package/project/.sdk/tm/rust/utility/voxgigstruct/mini.rs +1081 -0
  1487. package/project/.sdk/tm/rust/utility/voxgigstruct/mod.rs +70 -0
  1488. package/project/.sdk/tm/rust/utility/voxgigstruct/ordered_map.rs +159 -0
  1489. package/project/.sdk/tm/rust/utility/voxgigstruct/re.rs +1229 -0
  1490. package/project/.sdk/tm/rust/utility/voxgigstruct/value.rs +372 -0
  1491. package/project/.sdk/tm/scala/LICENSE +22 -0
  1492. package/project/.sdk/tm/scala/Makefile +24 -0
  1493. package/project/.sdk/tm/scala/VERSION +1 -0
  1494. package/project/.sdk/tm/scala/core/Context.scala +160 -0
  1495. package/project/.sdk/tm/scala/core/Contracts.scala +76 -0
  1496. package/project/.sdk/tm/scala/core/Control.scala +23 -0
  1497. package/project/.sdk/tm/scala/core/Helpers.scala +38 -0
  1498. package/project/.sdk/tm/scala/core/Operation.scala +37 -0
  1499. package/project/.sdk/tm/scala/core/Point.scala +44 -0
  1500. package/project/.sdk/tm/scala/core/Response.scala +37 -0
  1501. package/project/.sdk/tm/scala/core/Result.scala +42 -0
  1502. package/project/.sdk/tm/scala/core/SdkClient.scala +220 -0
  1503. package/project/.sdk/tm/scala/core/SdkError.scala +15 -0
  1504. package/project/.sdk/tm/scala/core/Spec.scala +39 -0
  1505. package/project/.sdk/tm/scala/core/Types.scala +31 -0
  1506. package/project/.sdk/tm/scala/core/Utility.scala +85 -0
  1507. package/project/.sdk/tm/scala/feature/AuditFeature.scala +101 -0
  1508. package/project/.sdk/tm/scala/feature/BaseFeature.scala +21 -0
  1509. package/project/.sdk/tm/scala/feature/CacheFeature.scala +181 -0
  1510. package/project/.sdk/tm/scala/feature/ClienttrackFeature.scala +93 -0
  1511. package/project/.sdk/tm/scala/feature/DebugFeature.scala +149 -0
  1512. package/project/.sdk/tm/scala/feature/FeatureOptions.scala +111 -0
  1513. package/project/.sdk/tm/scala/feature/IdempotencyFeature.scala +106 -0
  1514. package/project/.sdk/tm/scala/feature/LogFeature.scala +64 -0
  1515. package/project/.sdk/tm/scala/feature/MetricsFeature.scala +105 -0
  1516. package/project/.sdk/tm/scala/feature/NetsimFeature.scala +134 -0
  1517. package/project/.sdk/tm/scala/feature/PagingFeature.scala +170 -0
  1518. package/project/.sdk/tm/scala/feature/ProxyFeature.scala +113 -0
  1519. package/project/.sdk/tm/scala/feature/RatelimitFeature.scala +58 -0
  1520. package/project/.sdk/tm/scala/feature/RbacFeature.scala +90 -0
  1521. package/project/.sdk/tm/scala/feature/RetryFeature.scala +104 -0
  1522. package/project/.sdk/tm/scala/feature/StreamingFeature.scala +98 -0
  1523. package/project/.sdk/tm/scala/feature/TelemetryFeature.scala +129 -0
  1524. package/project/.sdk/tm/scala/feature/TestFeature.scala +253 -0
  1525. package/project/.sdk/tm/scala/feature/TimeoutFeature.scala +57 -0
  1526. package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +766 -0
  1527. package/project/.sdk/tm/scala/sdktest/SdkTestSupport.scala +93 -0
  1528. package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
  1529. package/project/.sdk/tm/scala/sdktest/sdk-test-control.json +19 -0
  1530. package/project/.sdk/tm/scala/src/feature/README.md +1 -0
  1531. package/project/.sdk/tm/scala/src/feature/audit/.gitkeep +0 -0
  1532. package/project/.sdk/tm/scala/src/feature/base/.gitkeep +0 -0
  1533. package/project/.sdk/tm/scala/src/feature/cache/.gitkeep +0 -0
  1534. package/project/.sdk/tm/scala/src/feature/clienttrack/.gitkeep +0 -0
  1535. package/project/.sdk/tm/scala/src/feature/debug/.gitkeep +0 -0
  1536. package/project/.sdk/tm/scala/src/feature/idempotency/.gitkeep +0 -0
  1537. package/project/.sdk/tm/scala/src/feature/log/.gitkeep +0 -0
  1538. package/project/.sdk/tm/scala/src/feature/metrics/.gitkeep +0 -0
  1539. package/project/.sdk/tm/scala/src/feature/netsim/.gitkeep +0 -0
  1540. package/project/.sdk/tm/scala/src/feature/paging/.gitkeep +0 -0
  1541. package/project/.sdk/tm/scala/src/feature/proxy/.gitkeep +0 -0
  1542. package/project/.sdk/tm/scala/src/feature/ratelimit/.gitkeep +0 -0
  1543. package/project/.sdk/tm/scala/src/feature/rbac/.gitkeep +0 -0
  1544. package/project/.sdk/tm/scala/src/feature/retry/.gitkeep +0 -0
  1545. package/project/.sdk/tm/scala/src/feature/streaming/.gitkeep +0 -0
  1546. package/project/.sdk/tm/scala/src/feature/telemetry/.gitkeep +0 -0
  1547. package/project/.sdk/tm/scala/src/feature/test/.gitkeep +0 -0
  1548. package/project/.sdk/tm/scala/src/feature/timeout/.gitkeep +0 -0
  1549. package/project/.sdk/tm/scala/utility/FeatureUtils.scala +68 -0
  1550. package/project/.sdk/tm/scala/utility/Fetcher.scala +129 -0
  1551. package/project/.sdk/tm/scala/utility/Json.java +268 -0
  1552. package/project/.sdk/tm/scala/utility/Make.scala +463 -0
  1553. package/project/.sdk/tm/scala/utility/MakeSpec.scala +49 -0
  1554. package/project/.sdk/tm/scala/utility/Misc.scala +68 -0
  1555. package/project/.sdk/tm/scala/utility/Prepare.scala +142 -0
  1556. package/project/.sdk/tm/scala/utility/Register.scala +38 -0
  1557. package/project/.sdk/tm/scala/utility/Results.scala +63 -0
  1558. package/project/.sdk/tm/scala/utility/StructUtility.scala +29 -0
  1559. package/project/.sdk/tm/scala/utility/Transform.scala +52 -0
  1560. package/project/.sdk/tm/scala/utility/struct/Struct.java +3550 -0
  1561. package/project/.sdk/tm/scala/utility/struct/voxgig_struct.scala +1833 -0
  1562. package/project/.sdk/tm/swift/LICENSE +22 -0
  1563. package/project/.sdk/tm/swift/Makefile +41 -0
  1564. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +113 -0
  1565. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +260 -0
  1566. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +111 -0
  1567. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/JSON.swift +327 -0
  1568. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Merge.swift +55 -0
  1569. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +601 -0
  1570. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/OrderedDictionary.swift +79 -0
  1571. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Path.swift +157 -0
  1572. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Select.swift +259 -0
  1573. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Transform.swift +462 -0
  1574. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +378 -0
  1575. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Value.swift +184 -0
  1576. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Walk.swift +44 -0
  1577. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Context.swift +161 -0
  1578. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Control.swift +20 -0
  1579. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Operation.swift +27 -0
  1580. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Point.swift +37 -0
  1581. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Response.swift +29 -0
  1582. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Result.swift +41 -0
  1583. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Spec.swift +36 -0
  1584. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Support.swift +98 -0
  1585. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Types.swift +25 -0
  1586. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Utility.swift +81 -0
  1587. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/AuditFeature.swift +99 -0
  1588. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/BaseFeature.swift +60 -0
  1589. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/CacheFeature.swift +164 -0
  1590. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ClienttrackFeature.swift +95 -0
  1591. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/DebugFeature.swift +126 -0
  1592. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/FeatureOptions.swift +96 -0
  1593. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/IdempotencyFeature.swift +80 -0
  1594. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/LogFeature.swift +69 -0
  1595. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/MetricsFeature.swift +103 -0
  1596. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/NetsimFeature.swift +177 -0
  1597. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/PagingFeature.swift +154 -0
  1598. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ProxyFeature.swift +122 -0
  1599. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RatelimitFeature.swift +79 -0
  1600. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RbacFeature.swift +103 -0
  1601. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RetryFeature.swift +150 -0
  1602. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/StreamingFeature.swift +82 -0
  1603. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TelemetryFeature.swift +119 -0
  1604. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +257 -0
  1605. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TimeoutFeature.swift +83 -0
  1606. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Feature.swift +56 -0
  1607. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +107 -0
  1608. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Make.swift +321 -0
  1609. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeError.swift +56 -0
  1610. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +151 -0
  1611. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +157 -0
  1612. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Register.swift +40 -0
  1613. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/ResultUtil.swift +107 -0
  1614. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/CustomUtilityTest.swift +44 -0
  1615. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/ExistsTest.swift +12 -0
  1616. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/FeatureTest.swift +1049 -0
  1617. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/NetsimTest.swift +50 -0
  1618. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PipelineTest.swift +398 -0
  1619. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +750 -0
  1620. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +237 -0
  1621. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +523 -0
  1622. package/project/.sdk/tm/swift/VERSION +1 -0
  1623. package/project/.sdk/tm/swift/src/feature/README.md +6 -0
  1624. package/project/.sdk/tm/swift/src/feature/audit/.gitkeep +0 -0
  1625. package/project/.sdk/tm/swift/src/feature/base/.gitkeep +0 -0
  1626. package/project/.sdk/tm/swift/src/feature/cache/.gitkeep +0 -0
  1627. package/project/.sdk/tm/swift/src/feature/clienttrack/.gitkeep +0 -0
  1628. package/project/.sdk/tm/swift/src/feature/debug/.gitkeep +0 -0
  1629. package/project/.sdk/tm/swift/src/feature/idempotency/.gitkeep +0 -0
  1630. package/project/.sdk/tm/swift/src/feature/log/.gitkeep +0 -0
  1631. package/project/.sdk/tm/swift/src/feature/metrics/.gitkeep +0 -0
  1632. package/project/.sdk/tm/swift/src/feature/netsim/.gitkeep +0 -0
  1633. package/project/.sdk/tm/swift/src/feature/paging/.gitkeep +0 -0
  1634. package/project/.sdk/tm/swift/src/feature/proxy/.gitkeep +0 -0
  1635. package/project/.sdk/tm/swift/src/feature/ratelimit/.gitkeep +0 -0
  1636. package/project/.sdk/tm/swift/src/feature/rbac/.gitkeep +0 -0
  1637. package/project/.sdk/tm/swift/src/feature/retry/.gitkeep +0 -0
  1638. package/project/.sdk/tm/swift/src/feature/streaming/.gitkeep +0 -0
  1639. package/project/.sdk/tm/swift/src/feature/telemetry/.gitkeep +0 -0
  1640. package/project/.sdk/tm/swift/src/feature/test/.gitkeep +0 -0
  1641. package/project/.sdk/tm/swift/src/feature/timeout/.gitkeep +0 -0
  1642. package/project/.sdk/tm/ts/Makefile +6 -1
  1643. package/project/.sdk/tm/ts/src/feature/audit/AuditFeature.ts +98 -0
  1644. package/project/.sdk/tm/ts/src/feature/cache/CacheFeature.ts +152 -0
  1645. package/project/.sdk/tm/ts/src/feature/clienttrack/ClienttrackFeature.ts +106 -0
  1646. package/project/.sdk/tm/ts/src/feature/debug/DebugFeature.ts +134 -0
  1647. package/project/.sdk/tm/ts/src/feature/idempotency/IdempotencyFeature.ts +97 -0
  1648. package/project/.sdk/tm/ts/src/feature/metrics/MetricsFeature.ts +104 -0
  1649. package/project/.sdk/tm/ts/src/feature/netsim/NetsimFeature.ts +189 -0
  1650. package/project/.sdk/tm/ts/src/feature/paging/PagingFeature.ts +141 -0
  1651. package/project/.sdk/tm/ts/src/feature/proxy/ProxyFeature.ts +112 -0
  1652. package/project/.sdk/tm/ts/src/feature/ratelimit/RatelimitFeature.ts +108 -0
  1653. package/project/.sdk/tm/ts/src/feature/rbac/RbacFeature.ts +104 -0
  1654. package/project/.sdk/tm/ts/src/feature/retry/RetryFeature.ts +160 -0
  1655. package/project/.sdk/tm/ts/src/feature/streaming/StreamingFeature.ts +98 -0
  1656. package/project/.sdk/tm/ts/src/feature/telemetry/TelemetryFeature.ts +130 -0
  1657. package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +58 -1
  1658. package/project/.sdk/tm/ts/src/feature/timeout/TimeoutFeature.ts +103 -0
  1659. package/project/.sdk/tm/ts/src/utility/FeatureHookUtility.ts +4 -1
  1660. package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +9 -0
  1661. package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +31 -1
  1662. package/project/.sdk/tm/ts/test/feature/harness.ts +293 -0
  1663. package/project/.sdk/tm/ts/test/feature.test.ts +772 -0
  1664. package/project/.sdk/tm/ts/test/netsim.test.ts +43 -0
  1665. package/project/.sdk/tm/ts/test/pipeline.test.ts +382 -0
  1666. package/project/.sdk/tm/zig/LICENSE +21 -0
  1667. package/project/.sdk/tm/zig/Makefile +31 -0
  1668. package/project/.sdk/tm/zig/VERSION +1 -0
  1669. package/project/.sdk/tm/zig/build.zig +58 -0
  1670. package/project/.sdk/tm/zig/build.zig.zon +11 -0
  1671. package/project/.sdk/tm/zig/core/context.zig +258 -0
  1672. package/project/.sdk/tm/zig/core/control.zig +26 -0
  1673. package/project/.sdk/tm/zig/core/error.zig +28 -0
  1674. package/project/.sdk/tm/zig/core/helpers.zig +326 -0
  1675. package/project/.sdk/tm/zig/core/mem.zig +20 -0
  1676. package/project/.sdk/tm/zig/core/operation.zig +34 -0
  1677. package/project/.sdk/tm/zig/core/point.zig +63 -0
  1678. package/project/.sdk/tm/zig/core/response.zig +32 -0
  1679. package/project/.sdk/tm/zig/core/result.zig +73 -0
  1680. package/project/.sdk/tm/zig/core/spec.zig +68 -0
  1681. package/project/.sdk/tm/zig/core/types.zig +101 -0
  1682. package/project/.sdk/tm/zig/core/utility.zig +1115 -0
  1683. package/project/.sdk/tm/zig/feature/audit.zig +131 -0
  1684. package/project/.sdk/tm/zig/feature/base.zig +52 -0
  1685. package/project/.sdk/tm/zig/feature/cache.zig +216 -0
  1686. package/project/.sdk/tm/zig/feature/clienttrack.zig +129 -0
  1687. package/project/.sdk/tm/zig/feature/debug.zig +191 -0
  1688. package/project/.sdk/tm/zig/feature/idempotency.zig +121 -0
  1689. package/project/.sdk/tm/zig/feature/log.zig +93 -0
  1690. package/project/.sdk/tm/zig/feature/metrics.zig +145 -0
  1691. package/project/.sdk/tm/zig/feature/netsim.zig +186 -0
  1692. package/project/.sdk/tm/zig/feature/paging.zig +201 -0
  1693. package/project/.sdk/tm/zig/feature/proxy.zig +180 -0
  1694. package/project/.sdk/tm/zig/feature/ratelimit.zig +123 -0
  1695. package/project/.sdk/tm/zig/feature/rbac.zig +126 -0
  1696. package/project/.sdk/tm/zig/feature/retry.zig +167 -0
  1697. package/project/.sdk/tm/zig/feature/streaming.zig +127 -0
  1698. package/project/.sdk/tm/zig/feature/support.zig +128 -0
  1699. package/project/.sdk/tm/zig/feature/telemetry.zig +165 -0
  1700. package/project/.sdk/tm/zig/feature/test.zig +315 -0
  1701. package/project/.sdk/tm/zig/feature/timeout.zig +105 -0
  1702. package/project/.sdk/tm/zig/root.zig +74 -0
  1703. package/project/.sdk/tm/zig/src/feature/README.md +1 -0
  1704. package/project/.sdk/tm/zig/src/feature/audit/.gitkeep +0 -0
  1705. package/project/.sdk/tm/zig/src/feature/base/.gitkeep +0 -0
  1706. package/project/.sdk/tm/zig/src/feature/cache/.gitkeep +0 -0
  1707. package/project/.sdk/tm/zig/src/feature/clienttrack/.gitkeep +0 -0
  1708. package/project/.sdk/tm/zig/src/feature/debug/.gitkeep +0 -0
  1709. package/project/.sdk/tm/zig/src/feature/idempotency/.gitkeep +0 -0
  1710. package/project/.sdk/tm/zig/src/feature/log/.gitkeep +0 -0
  1711. package/project/.sdk/tm/zig/src/feature/metrics/.gitkeep +0 -0
  1712. package/project/.sdk/tm/zig/src/feature/netsim/.gitkeep +0 -0
  1713. package/project/.sdk/tm/zig/src/feature/paging/.gitkeep +0 -0
  1714. package/project/.sdk/tm/zig/src/feature/proxy/.gitkeep +0 -0
  1715. package/project/.sdk/tm/zig/src/feature/ratelimit/.gitkeep +0 -0
  1716. package/project/.sdk/tm/zig/src/feature/rbac/.gitkeep +0 -0
  1717. package/project/.sdk/tm/zig/src/feature/retry/.gitkeep +0 -0
  1718. package/project/.sdk/tm/zig/src/feature/streaming/.gitkeep +0 -0
  1719. package/project/.sdk/tm/zig/src/feature/telemetry/.gitkeep +0 -0
  1720. package/project/.sdk/tm/zig/src/feature/test/.gitkeep +0 -0
  1721. package/project/.sdk/tm/zig/src/feature/timeout/.gitkeep +0 -0
  1722. package/project/.sdk/tm/zig/test/feature_test.zig +1045 -0
  1723. package/project/.sdk/tm/zig/test/fh.zig +531 -0
  1724. package/project/.sdk/tm/zig/test/gotcha_test.zig +230 -0
  1725. package/project/.sdk/tm/zig/test/pipeline_test.zig +493 -0
  1726. package/project/.sdk/tm/zig/test/primary_utility_test.zig +346 -0
  1727. package/project/.sdk/tm/zig/test/struct_corpus.zig +1145 -0
  1728. package/project/.sdk/tm/zig/test/struct_runner.zig +226 -0
  1729. package/project/.sdk/tm/zig/utility/jsonparse.zig +13 -0
  1730. package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +779 -0
  1731. package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +4400 -0
@@ -0,0 +1,1858 @@
1
+ (* Copyright (c) 2025-2026 Voxgig Ltd. MIT LICENSE.
2
+ *
3
+ * Voxgig Struct — OCaml port.
4
+ *
5
+ * A faithful port of the canonical TypeScript implementation
6
+ * (typescript/src/StructUtility.ts). Like TypeScript (and the Rust port),
7
+ * OCaml keeps `undefined` (Noval) and JSON `null` (Null) distinct, so this
8
+ * port mirrors the canonical TS logic directly. Nodes are mutable and
9
+ * reference-stable: lists are `value list ref`, maps are an in-tree ordered
10
+ * map (insertion order preserved). Zero third-party runtime dependencies; the
11
+ * regex helper is the in-tree Vregex engine (RE2 subset). *)
12
+
13
+ (* ---------------------------------------------------------------------------
14
+ * Value model
15
+ * ------------------------------------------------------------------------- *)
16
+
17
+ type value =
18
+ | Noval (* TS undefined — property absent *)
19
+ | Null (* JSON null *)
20
+ | Bool of bool
21
+ | Num of float
22
+ | Str of string
23
+ | List of value list ref
24
+ | Map of omap
25
+ | Func of injector
26
+ | Sentinel of string (* SKIP / DELETE, by tag *)
27
+
28
+ and omap = { mutable entries : (string * value) list }
29
+
30
+ and injector = inj -> value -> string -> value -> value
31
+
32
+ and modifyfn = value -> value -> value -> inj -> unit
33
+
34
+ and inj = {
35
+ mutable mode : int;
36
+ mutable full : bool;
37
+ mutable keyi : int;
38
+ mutable keys : value; (* List of Str *)
39
+ mutable key : value; (* Str *)
40
+ mutable ival : value;
41
+ mutable parent : value;
42
+ mutable path : value; (* List of Str *)
43
+ mutable nodes : value; (* List *)
44
+ mutable handler : injector;
45
+ mutable errs : value; (* List *)
46
+ mutable meta : value; (* Map *)
47
+ mutable dparent : value;
48
+ mutable dpath : value; (* List *)
49
+ mutable base : value; (* Str or Noval *)
50
+ mutable modify : modifyfn option;
51
+ mutable prior : inj option;
52
+ mutable extra : value;
53
+ }
54
+
55
+ (* injdef: the loose Partial<Injection> the public API accepts. *)
56
+ and injdef = {
57
+ mutable d_meta : value;
58
+ mutable d_extra : value;
59
+ mutable d_errs : value;
60
+ mutable d_modify : modifyfn option;
61
+ mutable d_handler : injector option;
62
+ mutable d_base : value;
63
+ mutable d_dparent : value;
64
+ mutable d_dpath : value;
65
+ mutable d_key : value;
66
+ }
67
+
68
+ type injarg = IInj of inj | IDef of injdef | INone
69
+
70
+ exception Struct_error of string
71
+
72
+ (* ---------------------------------------------------------------------------
73
+ * Constants
74
+ * ------------------------------------------------------------------------- *)
75
+
76
+ let m_keypre = 1
77
+ let m_keypost = 2
78
+ let m_val = 4
79
+
80
+ let s_dkey = "$KEY"
81
+ let s_banno = "`$ANNO`"
82
+ let s_dtop = "$TOP"
83
+ let s_derrs = "$ERRS"
84
+ let s_dspec = "$SPEC"
85
+ let s_bexact = "`$EXACT`"
86
+ let s_bval = "`$VAL`"
87
+ let s_bkey = "`$KEY`"
88
+ let s_bopen = "`$OPEN`"
89
+
90
+ let s_mt = ""
91
+ let s_bt = "`"
92
+ let s_ds = "$"
93
+ let s_dt = "."
94
+ let s_cn = ":"
95
+ let s_fs = "/"
96
+ let s_key = "KEY"
97
+ let s_viz = ": "
98
+
99
+ let s_string = "string"
100
+ let s_object = "object"
101
+ let s_list = "list"
102
+ let s_map = "map"
103
+ let s_nil = "nil"
104
+ let s_null = "null"
105
+
106
+ let t_any = (1 lsl 31) - 1
107
+ let t_noval = 1 lsl 30
108
+ let t_boolean = 1 lsl 29
109
+ let t_decimal = 1 lsl 28
110
+ let t_integer = 1 lsl 27
111
+ let t_number = 1 lsl 26
112
+ let t_string = 1 lsl 25
113
+ let t_function = 1 lsl 24
114
+ let t_null = 1 lsl 22
115
+ let t_list = 1 lsl 14
116
+ let t_map = 1 lsl 13
117
+ let t_instance = 1 lsl 12
118
+ let t_scalar = 1 lsl 7
119
+ let t_node = 1 lsl 6
120
+
121
+ let typename_tbl = [|
122
+ "any"; "nil"; "boolean"; "decimal"; "integer"; "number"; "string"; "function";
123
+ "symbol"; "null"; ""; ""; ""; ""; ""; ""; ""; "list"; "map"; "instance";
124
+ ""; ""; ""; ""; "scalar"; "node" |]
125
+
126
+ let skip = Sentinel "skip"
127
+ let delete = Sentinel "delete"
128
+
129
+ let maxdepth = 32
130
+
131
+ (* ---------------------------------------------------------------------------
132
+ * Small helpers
133
+ * ------------------------------------------------------------------------- *)
134
+
135
+ let lst l = List (ref l)
136
+ let empty_list () = List (ref [])
137
+ let empty_map () = Map { entries = [] }
138
+ let vstr s = Str s
139
+ let vint i = Num (float_of_int i)
140
+
141
+ let is_noval = function Noval -> true | _ -> false
142
+ let is_nullish = function Noval | Null -> true | _ -> false
143
+ let is_skip v = (match v with Sentinel "skip" -> true | _ -> false)
144
+ let is_delete v = (match v with Sentinel "delete" -> true | _ -> false)
145
+
146
+ let is_integer_f n = Float.is_finite n && Float.rem n 1.0 = 0.0
147
+
148
+ let num_to_string n =
149
+ if Float.is_nan n then "NaN"
150
+ else if Float.is_integer n && Float.abs n < 1e16 then Printf.sprintf "%.0f" n
151
+ else begin
152
+ let rec try_prec p =
153
+ if p > 17 then Printf.sprintf "%.17g" n
154
+ else let s = Printf.sprintf "%.*g" p n in
155
+ if float_of_string s = n then s else try_prec (p + 1)
156
+ in try_prec 1
157
+ end
158
+
159
+ (* JS `'' + v` / String(v) for keys and concatenation. *)
160
+ let rec js_string v =
161
+ match v with
162
+ | Noval -> "undefined"
163
+ | Null -> "null"
164
+ | Bool b -> if b then "true" else "false"
165
+ | Num n -> num_to_string n
166
+ | Str s -> s
167
+ | List r ->
168
+ String.concat ","
169
+ (List.map (fun x -> match x with Noval | Null -> "" | _ -> js_string x) !r)
170
+ | Map _ -> "[object Object]"
171
+ | Func _ -> "function"
172
+ | Sentinel s -> s
173
+
174
+ let is_int_key s =
175
+ let n = String.length s in
176
+ n > 0 &&
177
+ (let ok = ref true in
178
+ String.iteri (fun i c ->
179
+ if not ((c >= '0' && c <= '9') || (c = '-')) then ok := false;
180
+ ignore i) s;
181
+ !ok)
182
+
183
+ let clz32 n =
184
+ let n = n land 0xFFFFFFFF in
185
+ if n = 0 then 32
186
+ else begin
187
+ let r = ref 0 and x = ref n in
188
+ while !x land 0x80000000 = 0 do incr r; x := (!x lsl 1) land 0xFFFFFFFF done;
189
+ !r
190
+ end
191
+
192
+ (* ----- ordered map ops ----- *)
193
+ let omap_get m k = try Some (List.assoc k m.entries) with Not_found -> None
194
+ let omap_has m k = List.mem_assoc k m.entries
195
+ let omap_keys m = List.map fst m.entries
196
+ let omap_len m = List.length m.entries
197
+ let omap_set m k v =
198
+ if List.mem_assoc k m.entries then
199
+ m.entries <- List.map (fun (k', v') -> if k' = k then (k, v) else (k', v')) m.entries
200
+ else m.entries <- m.entries @ [(k, v)]
201
+ let omap_del m k = m.entries <- List.filter (fun (k', _) -> k' <> k) m.entries
202
+
203
+ (* ---------------------------------------------------------------------------
204
+ * The big mutually-recursive block of library functions
205
+ * ------------------------------------------------------------------------- *)
206
+
207
+ (* a placeholder inj for the (corpus-unreached) getelem function-alt path *)
208
+ let dummy_inj_ref : inj option ref = ref None
209
+
210
+ let rec isnode v = match v with Map _ | List _ -> true | _ -> false
211
+ and ismap v = match v with Map _ -> true | _ -> false
212
+ and islist v = match v with List _ -> true | _ -> false
213
+ and isfunc v = match v with Func _ -> true | _ -> false
214
+
215
+ and iskey k = match k with Str s -> s <> "" | Num _ -> true | _ -> false
216
+
217
+ and isempty v =
218
+ is_nullish v || v = Str "" ||
219
+ (match v with List r -> !r = [] | Map m -> m.entries = [] | _ -> false)
220
+
221
+ and getdef v alt = if is_noval v then alt else v
222
+
223
+ and typify v =
224
+ match v with
225
+ | Noval -> t_noval
226
+ | Null -> t_scalar lor t_null
227
+ | Bool _ -> t_scalar lor t_boolean
228
+ | Num n ->
229
+ if Float.is_nan n then t_noval
230
+ else if is_integer_f n then t_scalar lor t_number lor t_integer
231
+ else t_scalar lor t_number lor t_decimal
232
+ | Str _ -> t_scalar lor t_string
233
+ | Func _ -> t_scalar lor t_function
234
+ | List _ -> t_node lor t_list
235
+ | Map _ -> t_node lor t_map
236
+ | Sentinel _ -> t_node lor t_map
237
+
238
+ and typename t =
239
+ let i = clz32 t in
240
+ if i >= 0 && i < Array.length typename_tbl then typename_tbl.(i) else typename_tbl.(0)
241
+
242
+ and size v =
243
+ match v with
244
+ | List r -> List.length !r
245
+ | Map m -> omap_len m
246
+ | Str s -> String.length s
247
+ | Bool b -> if b then 1 else 0
248
+ | Num n -> int_of_float (Float.floor n)
249
+ | _ -> 0
250
+
251
+ and strkey ?(key = Noval) () =
252
+ match key with
253
+ | Noval -> s_mt
254
+ | Str s -> s
255
+ | Bool _ -> s_mt
256
+ | Num n -> if is_integer_f n then num_to_string n else num_to_string (Float.floor n)
257
+ | _ -> s_mt
258
+
259
+ and keysof v =
260
+ match v with
261
+ | Map m -> List.sort compare (omap_keys m)
262
+ | List r -> List.mapi (fun i _ -> string_of_int i) !r
263
+ | _ -> []
264
+
265
+ (* internal: list element by numeric key, no negative wrap, returns Noval if oob *)
266
+ and list_index lr key =
267
+ let ks = (match key with Str s -> s | Num n -> num_to_string n | _ -> "") in
268
+ match int_of_string_opt ks with
269
+ | Some i when i >= 0 && i < List.length !lr -> List.nth !lr i
270
+ | _ -> Noval
271
+
272
+ and getprop ?(alt = Noval) v key =
273
+ if is_noval v || is_noval key then alt
274
+ else
275
+ let out =
276
+ match v with
277
+ | Map m -> (match omap_get m (js_string key) with Some x -> x | None -> Noval)
278
+ | List r -> list_index r key
279
+ | _ -> Noval
280
+ in
281
+ if is_nullish out then alt else out
282
+
283
+ and lookup_ v key =
284
+ if is_noval v || is_noval key then Noval
285
+ else match v with
286
+ | Map m -> (match omap_get m (js_string key) with Some x -> x | None -> Noval)
287
+ | List r -> list_index r key
288
+ | _ -> Noval
289
+
290
+ and haskey v key = not (is_nullish (getprop v key))
291
+
292
+ and getelem ?(alt = Noval) v key =
293
+ if is_noval v || is_noval key then alt
294
+ else begin
295
+ let out = ref Noval in
296
+ (match v with
297
+ | List r ->
298
+ let ks = (match key with Str s -> s | Num n -> num_to_string n | _ -> "") in
299
+ if is_int_key ks then begin
300
+ let len = List.length !r in
301
+ let nk0 = int_of_string ks in
302
+ let nk = if nk0 < 0 then len + nk0 else nk0 in
303
+ if nk >= 0 && nk < len then out := List.nth !r nk
304
+ end
305
+ | _ -> ());
306
+ if is_nullish !out then
307
+ (match alt with
308
+ | Func f -> f (Option.get !dummy_inj_ref) Noval "" Noval
309
+ | _ -> alt)
310
+ else !out
311
+ end
312
+
313
+ and items_pairs v : (string * value) list =
314
+ if not (isnode v) then []
315
+ else List.map (fun k -> (k, getprop_raw v k)) (keysof v)
316
+
317
+ and getprop_raw v k =
318
+ (* literal stored value at sorted-key k (string), preserving null *)
319
+ match v with
320
+ | Map m -> (match omap_get m k with Some x -> x | None -> Noval)
321
+ | List r -> (try List.nth !r (int_of_string k) with _ -> Noval)
322
+ | _ -> Noval
323
+
324
+ and items_v v (f : (string * value) -> value) : value =
325
+ lst (List.map f (items_pairs v))
326
+
327
+ and items v : value =
328
+ lst (List.map (fun (k, x) -> lst [Str k; x]) (items_pairs v))
329
+
330
+ and flatten ?(depth = 1) l =
331
+ if not (islist l) then l
332
+ else begin
333
+ let out = ref [] in
334
+ (match l with List r ->
335
+ List.iter (fun item ->
336
+ if islist item && depth > 0 then
337
+ (match flatten ~depth:(depth - 1) item with
338
+ | List r2 -> List.iter (fun x -> out := x :: !out) !r2
339
+ | _ -> ())
340
+ else out := item :: !out) !r
341
+ | _ -> ());
342
+ lst (List.rev !out)
343
+ end
344
+
345
+ and filter v check =
346
+ let out = ref [] in
347
+ List.iter (fun (k, x) -> if check (k, x) then out := x :: !out) (items_pairs v);
348
+ lst (List.rev !out)
349
+
350
+ and setprop parent key v =
351
+ if not (iskey key) then parent
352
+ else begin
353
+ (match parent with
354
+ | Map m -> omap_set m (js_string key) v
355
+ | List r ->
356
+ let ks = (match key with Str s -> s | Num n -> num_to_string (Float.floor n) | _ -> "") in
357
+ (match int_of_string_opt ks with
358
+ | None -> ()
359
+ | Some ki ->
360
+ let len = List.length !r in
361
+ if ki >= 0 then begin
362
+ let ki = if ki > len then len else ki in
363
+ if ki >= len then r := !r @ [v]
364
+ else r := List.mapi (fun i x -> if i = ki then v else x) !r
365
+ end else r := v :: !r)
366
+ | _ -> ());
367
+ parent
368
+ end
369
+
370
+ and delprop parent key =
371
+ if not (iskey key) then parent
372
+ else begin
373
+ (match parent with
374
+ | Map m -> omap_del m (js_string key)
375
+ | List r ->
376
+ let ks = (match key with Str s -> s | Num n -> num_to_string (Float.floor n) | _ -> "") in
377
+ (match int_of_string_opt ks with
378
+ | Some ki when ki >= 0 && ki < List.length !r ->
379
+ r := List.filteri (fun i _ -> i <> ki) !r
380
+ | _ -> ())
381
+ | _ -> ());
382
+ parent
383
+ end
384
+
385
+ and clone v =
386
+ match v with
387
+ | List r -> List (ref (List.map clone !r))
388
+ | Map m -> Map { entries = List.map (fun (k, x) -> (k, clone x)) m.entries }
389
+ | _ -> v
390
+
391
+ and slice ?(start = Noval) ?(stop = Noval) ?(mutate = false) v =
392
+ match v with
393
+ | Num n ->
394
+ let lo = (match start with Num s -> s | _ -> neg_infinity) in
395
+ let hi = (match stop with Num e -> e -. 1.0 | _ -> infinity) in
396
+ Num (Float.max lo (Float.min n hi))
397
+ | List _ | Str _ ->
398
+ let vlen = size v in
399
+ let start = (match start, stop with Noval, x when not (is_noval x) -> Num 0.0 | _ -> start) in
400
+ (match start with
401
+ | Num sf ->
402
+ let s = int_of_float sf in
403
+ let s, e =
404
+ if s < 0 then 0, (let e = vlen + s in if e < 0 then 0 else e)
405
+ else match stop with
406
+ | Num ef ->
407
+ let e = int_of_float ef in
408
+ if e < 0 then s, (let e = vlen + e in if e < 0 then 0 else e)
409
+ else if vlen < e then s, vlen
410
+ else s, e
411
+ | _ -> s, vlen
412
+ in
413
+ let s = if vlen < s then vlen else s in
414
+ if s > -1 && s <= e && e <= vlen then
415
+ (match v with
416
+ | List r ->
417
+ if mutate then begin
418
+ r := (let arr = Array.of_list !r in Array.to_list (Array.sub arr s (e - s))); v
419
+ end else lst (let arr = Array.of_list !r in Array.to_list (Array.sub arr s (e - s)))
420
+ | Str str -> Str (String.sub str s (e - s))
421
+ | _ -> v)
422
+ else
423
+ (match v with
424
+ | List r -> if mutate then (r := []; v) else empty_list ()
425
+ | Str _ -> Str s_mt
426
+ | _ -> v)
427
+ | _ -> v)
428
+ | _ -> v
429
+
430
+ (* ----- regex helpers (uniform re_* API + targeted hand-rolled matchers) ----- *)
431
+
432
+ and re_compile ?flags:_ p = (match p with Str _ -> p | _ -> Str (js_string p))
433
+ and re_str p = (match p with Str s -> s | _ -> js_string p)
434
+ and re_find p input =
435
+ (match Vregex.find_bounds (Vregex.compile (re_str p)) (re_str input) with
436
+ | Some (s, e) -> lst [Str (String.sub (re_str input) s (e - s))]
437
+ | None -> Null)
438
+ and re_find_all _p _input = empty_list ()
439
+ and re_replace _p input _r = input
440
+ and re_test p input = Bool (Vregex.test_str (re_str p) (re_str input))
441
+ and re_escape s = escre s
442
+
443
+ and escre s =
444
+ let s = (match s with Str x -> x | Noval -> s_mt | _ -> js_string s) in
445
+ let b = Buffer.create (String.length s) in
446
+ String.iter (fun c ->
447
+ (match c with
448
+ | '.' | '*' | '+' | '?' | '^' | '$' | '{' | '}' | '(' | ')' | '|'
449
+ | '[' | ']' | '\\' -> Buffer.add_char b '\\'
450
+ | _ -> ());
451
+ Buffer.add_char b c) s;
452
+ Str (Buffer.contents b)
453
+
454
+ and escurl s =
455
+ let s = (match s with Str x -> x | Noval -> s_mt | _ -> js_string s) in
456
+ let b = Buffer.create (String.length s) in
457
+ String.iter (fun c ->
458
+ let unreserved =
459
+ (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')
460
+ || c = '-' || c = '_' || c = '.' || c = '!' || c = '~' || c = '*'
461
+ || c = '\'' || c = '(' || c = ')' in
462
+ if unreserved then Buffer.add_char b c
463
+ else Buffer.add_string b (Printf.sprintf "%%%02X" (Char.code c))) s;
464
+ Str (Buffer.contents b)
465
+
466
+ (* ----- stringify / jsonify / pathify / join ----- *)
467
+
468
+ and json_encode ?(sort = false) ?indent v =
469
+ let buf = Buffer.create 64 in
470
+ let esc s =
471
+ Buffer.add_char buf '"';
472
+ String.iter (fun c ->
473
+ match c with
474
+ | '"' -> Buffer.add_string buf "\\\""
475
+ | '\\' -> Buffer.add_string buf "\\\\"
476
+ | '\n' -> Buffer.add_string buf "\\n"
477
+ | '\r' -> Buffer.add_string buf "\\r"
478
+ | '\t' -> Buffer.add_string buf "\\t"
479
+ | c when Char.code c < 32 -> Buffer.add_string buf (Printf.sprintf "\\u%04x" (Char.code c))
480
+ | c -> Buffer.add_char buf c) s;
481
+ Buffer.add_char buf '"'
482
+ in
483
+ let rec enc v level =
484
+ match v with
485
+ | Noval | Null -> Buffer.add_string buf "null"
486
+ | Bool b -> Buffer.add_string buf (if b then "true" else "false")
487
+ | Num n -> Buffer.add_string buf (num_to_string n)
488
+ | Str s -> esc s
489
+ | Func _ | Sentinel _ -> Buffer.add_string buf "null"
490
+ | List r ->
491
+ if !r = [] then Buffer.add_string buf "[]"
492
+ else (match indent with
493
+ | Some ind ->
494
+ let pad = String.make (ind * (level + 1)) ' ' in
495
+ let cpad = String.make (ind * level) ' ' in
496
+ Buffer.add_string buf "[\n";
497
+ List.iteri (fun i x ->
498
+ if i > 0 then Buffer.add_string buf ",\n";
499
+ Buffer.add_string buf pad; enc x (level + 1)) !r;
500
+ Buffer.add_string buf "\n"; Buffer.add_string buf cpad; Buffer.add_char buf ']'
501
+ | None ->
502
+ Buffer.add_char buf '[';
503
+ List.iteri (fun i x -> if i > 0 then Buffer.add_char buf ','; enc x (level + 1)) !r;
504
+ Buffer.add_char buf ']')
505
+ | Map m ->
506
+ let ks = List.map fst m.entries in
507
+ let ks = if sort then List.sort compare ks else ks in
508
+ if ks = [] then Buffer.add_string buf "{}"
509
+ else (match indent with
510
+ | Some ind ->
511
+ let pad = String.make (ind * (level + 1)) ' ' in
512
+ let cpad = String.make (ind * level) ' ' in
513
+ Buffer.add_string buf "{\n";
514
+ List.iteri (fun i k ->
515
+ if i > 0 then Buffer.add_string buf ",\n";
516
+ Buffer.add_string buf pad; esc k; Buffer.add_string buf ": ";
517
+ enc (Option.get (omap_get m k)) (level + 1)) ks;
518
+ Buffer.add_string buf "\n"; Buffer.add_string buf cpad; Buffer.add_char buf '}'
519
+ | None ->
520
+ Buffer.add_char buf '{';
521
+ List.iteri (fun i k ->
522
+ if i > 0 then Buffer.add_char buf ',';
523
+ esc k; Buffer.add_char buf ':'; enc (Option.get (omap_get m k)) (level + 1)) ks;
524
+ Buffer.add_char buf '}')
525
+ in
526
+ enc v 0; Buffer.contents buf
527
+
528
+ and has_cycle v =
529
+ let seen = ref [] in
530
+ let rec go v =
531
+ match v with
532
+ | List r -> if List.memq v !seen then true else (seen := v :: !seen; List.exists go !r)
533
+ | Map m -> if List.memq v !seen then true else (seen := v :: !seen; List.exists (fun (_, x) -> go x) m.entries)
534
+ | _ -> false
535
+ in go v
536
+
537
+ and stringify ?(maxlen = Noval) ?(pretty = false) v =
538
+ match v with
539
+ | Noval -> if pretty then "<>" else s_mt
540
+ | _ ->
541
+ let valstr =
542
+ match v with
543
+ | Str s -> s
544
+ | _ -> if has_cycle v then "__STRINGIFY_FAILED__"
545
+ else (try let s = json_encode ~sort:true v in
546
+ (* TS removes all double quotes *)
547
+ String.concat "" (String.split_on_char '"' s)
548
+ with _ -> "__STRINGIFY_FAILED__")
549
+ in
550
+ let valstr =
551
+ match maxlen with
552
+ | Num m when m > -1.0 ->
553
+ let m = int_of_float m in
554
+ let l = String.length valstr in
555
+ if m < l then String.sub valstr 0 (max 0 (m - 3)) ^ "..."
556
+ else valstr
557
+ | _ -> valstr
558
+ in
559
+ if pretty then begin
560
+ let colors = [81;118;213;39;208;201;45;190;129;51;160;121;226;33;207;69] in
561
+ let c = Array.of_list (List.map (fun n -> Printf.sprintf "\027[38;5;%dm" n) colors) in
562
+ let r = "\027[0m" in
563
+ let d = ref 0 and o = ref c.(0) and t = Buffer.create 64 in
564
+ Buffer.add_string t c.(0);
565
+ String.iter (fun ch ->
566
+ if ch = '{' || ch = '[' then begin
567
+ incr d; o := c.(!d mod Array.length c);
568
+ Buffer.add_string t !o; Buffer.add_char t ch
569
+ end else if ch = '}' || ch = ']' then begin
570
+ Buffer.add_string t !o; Buffer.add_char t ch;
571
+ decr d; o := c.((((!d mod Array.length c) + Array.length c) mod Array.length c))
572
+ end else (Buffer.add_string t !o; Buffer.add_char t ch)) valstr;
573
+ Buffer.contents t ^ r
574
+ end else valstr
575
+
576
+ and jsonify ?(flags = Noval) v =
577
+ match v with
578
+ | Noval -> s_null
579
+ | _ ->
580
+ let indent = (match getprop ~alt:(Num 2.0) flags (Str "indent") with Num n -> int_of_float n | _ -> 2) in
581
+ (try
582
+ let str = if indent > 0 then json_encode ~indent v else json_encode v in
583
+ let offset = (match getprop ~alt:(Num 0.0) flags (Str "offset") with Num n -> int_of_float n | _ -> 0) in
584
+ if offset > 0 then
585
+ (match String.split_on_char '\n' str with
586
+ | _ :: rest -> "{\n" ^ String.concat "\n" (List.map (fun l -> String.make offset ' ' ^ l) rest)
587
+ | [] -> str)
588
+ else str
589
+ with _ -> s_null)
590
+
591
+ and pad ?(padding = Noval) ?(padchar = Noval) s =
592
+ let s = (match s with Str x -> x | Null -> "null" | _ -> stringify s) in
593
+ let padding = (match padding with Num n -> int_of_float n | _ -> 44) in
594
+ let padchar = (match padchar with Str x -> String.sub (x ^ " ") 0 1 | _ -> " ") in
595
+ if padding > -1 then
596
+ let n = padding - String.length s in
597
+ if n > 0 then s ^ String.concat "" (List.init n (fun _ -> padchar)) else s
598
+ else
599
+ let n = (- padding) - String.length s in
600
+ if n > 0 then String.concat "" (List.init n (fun _ -> padchar)) ^ s else s
601
+
602
+ and join ?(sep = Noval) ?(url = false) arr =
603
+ if not (islist arr) then s_mt
604
+ else begin
605
+ let sepdef = (match sep with Noval | Null -> "," | Str s -> s | _ -> js_string sep) in
606
+ let single = (String.length sepdef = 1) in
607
+ let sc = if single then sepdef.[0] else ' ' in
608
+ let items_ = (match arr with List r -> !r | _ -> []) in
609
+ let sarr = List.length items_ in
610
+ let strip_trailing s = let n = String.length s in let i = ref n in
611
+ while !i > 0 && s.[!i - 1] = sc do decr i done; String.sub s 0 !i in
612
+ let strip_leading s = let n = String.length s in let i = ref 0 in
613
+ while !i < n && s.[!i] = sc do incr i done; String.sub s !i (n - !i) in
614
+ (* Collapse runs of the sep char to one, but only when the run is bounded
615
+ by a non-sep char on both sides (mirrors ([^sep])sep+([^sep])). Boundary
616
+ runs (leading / trailing) are left untouched. *)
617
+ let collapse s =
618
+ let n = String.length s in
619
+ let b = Buffer.create n in
620
+ let i = ref 0 in
621
+ while !i < n do
622
+ if s.[!i] <> sc then (Buffer.add_char b s.[!i]; incr i)
623
+ else begin
624
+ let j = ref !i in
625
+ while !j < n && s.[!j] = sc do incr j done;
626
+ let before_nonsep = !i > 0 && s.[!i - 1] <> sc in
627
+ let after_nonsep = !j < n in
628
+ if before_nonsep && after_nonsep then Buffer.add_char b sc
629
+ else Buffer.add_string b (String.sub s !i (!j - !i));
630
+ i := !j
631
+ end
632
+ done;
633
+ Buffer.contents b in
634
+ let out = ref [] in
635
+ List.iteri (fun idx s0 ->
636
+ match s0 with
637
+ | Str s when s <> s_mt ->
638
+ let s =
639
+ if single then begin
640
+ if url && idx = 0 then strip_trailing s
641
+ else begin
642
+ let s = if idx > 0 then strip_leading s else s in
643
+ let s = if idx < sarr - 1 || not url then strip_trailing s else s in
644
+ collapse s
645
+ end
646
+ end else s
647
+ in
648
+ if s <> s_mt then out := s :: !out
649
+ | _ -> ()) items_;
650
+ String.concat sepdef (List.rev !out)
651
+ end
652
+
653
+ and joinurl arr = join ~sep:(Str "/") ~url:true arr
654
+
655
+ and replace s from_ to_ =
656
+ let ts = typify s in
657
+ let rs =
658
+ if (t_string land ts) = 0 then stringify s
659
+ else if ((t_noval lor t_null) land ts) > 0 then s_mt
660
+ else stringify s in
661
+ let to_s = (match to_ with Str x -> x | _ -> js_string to_) in
662
+ match from_ with
663
+ | Str f ->
664
+ (* replace all occurrences *)
665
+ if f = "" then rs
666
+ else begin
667
+ let b = Buffer.create (String.length rs) in
668
+ let flen = String.length f in let i = ref 0 in let n = String.length rs in
669
+ while !i < n do
670
+ if !i + flen <= n && String.sub rs !i flen = f then (Buffer.add_string b to_s; i := !i + flen)
671
+ else (Buffer.add_char b rs.[!i]; incr i)
672
+ done; Buffer.contents b
673
+ end
674
+ | _ -> rs
675
+
676
+ and pathify ?(startin = Noval) ?(endin = Noval) ?(absent = false) v =
677
+ let path =
678
+ if islist v then Some (match v with List r -> !r | _ -> [])
679
+ else if iskey v then Some [v]
680
+ else None in
681
+ let start = (match startin with Num n -> if n > -1.0 then int_of_float n else 0 | _ -> 0) in
682
+ let endn = (match endin with Num n -> if n > -1.0 then int_of_float n else 0 | _ -> 0) in
683
+ let pathstr =
684
+ match path with
685
+ | Some p when start >= 0 ->
686
+ let len = List.length p in
687
+ let arr = Array.of_list p in
688
+ let e = max 0 (len - endn) in
689
+ let s = min start len in
690
+ let sub = if s <= e then Array.to_list (Array.sub arr s (e - s)) else [] in
691
+ if sub = [] then Some "<root>"
692
+ else
693
+ let fp = List.filter iskey sub in
694
+ let mapped = List.map (fun pp ->
695
+ match pp with
696
+ | Num n -> num_to_string (Float.floor n)
697
+ | _ -> String.concat "" (String.split_on_char '.' (js_string pp))) fp in
698
+ Some (String.concat "." mapped)
699
+ | _ -> None
700
+ in
701
+ match pathstr with
702
+ | Some s -> s
703
+ | None -> "<unknown-path" ^ (if absent then s_mt else s_cn ^ stringify ~maxlen:(Num 47.0) v) ^ ">"
704
+
705
+ (* ----- walk ----- *)
706
+
707
+ and walk ?before ?after ?maxdepth:(md = Noval) ?(key = Noval) ?(parent = Noval) ?path ?pool v =
708
+ let pool = (match pool with Some p -> p | None -> [| ref [Noval] |] ) in
709
+ ignore pool;
710
+ walk_impl before after md key parent path v
711
+
712
+ and walk_impl before after md key parent path v =
713
+ (* path is a string list ref shared per depth (we keep it simple: an int-indexed value list) *)
714
+ let path = (match path with Some p -> p | None -> empty_list ()) in
715
+ let depth = size path in
716
+ let out = ref (match before with None -> v | Some f -> f key v parent path) in
717
+ let mdv = (match md with Num n -> if n >= 0.0 then int_of_float n else maxdepth | Noval | Null -> maxdepth | _ -> maxdepth) in
718
+ if mdv = 0 || (mdv > 0 && mdv <= depth) then !out
719
+ else begin
720
+ (if isnode !out then begin
721
+ let prefix = (match path with List r -> !r | _ -> []) in
722
+ List.iter (fun (ckey, child) ->
723
+ let childpath = lst (prefix @ [Str ckey]) in
724
+ let result = walk_impl before after (Num (float_of_int mdv)) (Str ckey) !out (Some childpath) child in
725
+ (match !out with
726
+ | Map m -> omap_set m ckey result
727
+ | List r -> r := List.mapi (fun i x -> if i = int_of_string ckey then result else x) !r
728
+ | _ -> ())) (items_pairs !out)
729
+ end);
730
+ (match after with None -> !out | Some f -> f key !out parent path)
731
+ end
732
+
733
+ (* ----- merge ----- *)
734
+
735
+ and merge ?(maxdepth = Noval) objs =
736
+ let md = (match maxdepth with Num n -> if n < 0.0 then 0 else int_of_float n | Noval | Null -> 32 | _ -> 32) in
737
+ if not (islist objs) then objs
738
+ else begin
739
+ let l = (match objs with List r -> !r | _ -> []) in
740
+ let lenlist = List.length l in
741
+ if lenlist = 0 then Noval
742
+ else if lenlist = 1 then List.nth l 0
743
+ else begin
744
+ let out = ref (getprop ~alt:(empty_map ()) objs (Num 0.0)) in
745
+ for oi = 1 to lenlist - 1 do
746
+ let obj = List.nth l oi in
747
+ if not (isnode obj) then out := obj
748
+ else begin
749
+ let cur = ref [| !out |] in
750
+ let dst = ref [| !out |] in
751
+ let grow a n = if Array.length !a <= n then begin
752
+ let na = Array.make (n + 1) Noval in
753
+ Array.blit !a 0 na 0 (Array.length !a); a := na end in
754
+ let before key v _parent path =
755
+ let pi = size path in
756
+ if md <= pi then begin
757
+ grow cur pi; !cur.(pi) <- v;
758
+ if pi > 0 then ignore (setprop !cur.(pi - 1) key v);
759
+ Noval
760
+ end else if not (isnode v) then begin
761
+ grow cur pi; !cur.(pi) <- v; v
762
+ end else begin
763
+ grow dst pi; grow cur pi;
764
+ !dst.(pi) <- (if pi > 0 then getprop !dst.(pi - 1) key else !dst.(pi));
765
+ let tval = !dst.(pi) in
766
+ if is_nullish tval then (!cur.(pi) <- (if islist v then empty_list () else empty_map ()); v)
767
+ else if (islist v && islist tval) || (ismap v && ismap tval) then
768
+ (!cur.(pi) <- tval; v)
769
+ else (!cur.(pi) <- v; Noval)
770
+ end
771
+ in
772
+ let after key _v _parent path =
773
+ let ci = size path in
774
+ if ci < 1 then (if Array.length !cur > 0 then !cur.(0) else _v)
775
+ else begin
776
+ let target = if ci - 1 < Array.length !cur then !cur.(ci - 1) else Noval in
777
+ let value = if ci < Array.length !cur then !cur.(ci) else Noval in
778
+ ignore (setprop target key value); value
779
+ end
780
+ in
781
+ out := walk ~before ~after obj
782
+ end
783
+ done;
784
+ if md = 0 then begin
785
+ let o = getprop objs (Num (float_of_int (lenlist - 1))) in
786
+ out := (if islist o then empty_list () else if ismap o then empty_map () else o)
787
+ end;
788
+ !out
789
+ end
790
+ end
791
+
792
+ (* ----- getpath / setpath ----- *)
793
+
794
+ and ia_base = function IInj i -> i.base | IDef d -> d.d_base | INone -> Noval
795
+ and ia_dparent = function IInj i -> i.dparent | IDef d -> d.d_dparent | INone -> Noval
796
+ and ia_meta = function IInj i -> i.meta | IDef d -> d.d_meta | INone -> Noval
797
+ and ia_key = function IInj i -> i.key | IDef d -> d.d_key | INone -> Noval
798
+ and ia_dpath = function IInj i -> i.dpath | IDef d -> d.d_dpath | INone -> Noval
799
+ and ia_handler = function IInj i -> Some i.handler | IDef d -> d.d_handler | INone -> None
800
+ and ia_is_some = function INone -> false | _ -> true
801
+
802
+ and getpath ?(inj = INone) store path =
803
+ let pa =
804
+ match path with
805
+ | List r -> Some (Array.of_list !r)
806
+ | Str s -> Some (Array.of_list (List.map (fun x -> Str x) (String.split_on_char '.' s)))
807
+ | Num n -> Some [| Str (strkey ~key:(Num n) ()) |]
808
+ | _ -> None
809
+ in
810
+ match pa with
811
+ | None -> Noval
812
+ | Some pa ->
813
+ let base = ia_base inj in
814
+ let dparent = ia_dparent inj in
815
+ let inj_meta = ia_meta inj in
816
+ let inj_key = ia_key inj in
817
+ let dpath = ia_dpath inj in
818
+ let src = if iskey base then getprop ~alt:store store base else store in
819
+ let numparts = Array.length pa in
820
+ let v = ref store in
821
+ let arr_get i = if i >= 0 && i < Array.length pa then pa.(i) else Noval in
822
+ (if is_noval path || is_noval store
823
+ || (numparts = 1 && pa.(0) = Str s_mt) || numparts = 0 then
824
+ v := src
825
+ else begin
826
+ if numparts = 1 then v := getprop store pa.(0);
827
+ if not (isfunc !v) then begin
828
+ v := src;
829
+ (match pa.(0) with
830
+ | Str s0 ->
831
+ (match meta_path_match s0 with
832
+ | Some (g1, _, g3) when not (is_noval inj_meta) && ia_is_some inj ->
833
+ v := getprop inj_meta (Str g1); pa.(0) <- Str g3
834
+ | _ -> ())
835
+ | _ -> ());
836
+ let pi = ref 0 in
837
+ let continue = ref true in
838
+ while !continue && not (is_noval !v) && !pi < numparts do
839
+ let raw = pa.(!pi) in
840
+ let part =
841
+ match raw with
842
+ | Str s when ia_is_some inj && s = s_dkey -> if not (is_noval inj_key) then inj_key else raw
843
+ | Str s when starts_with s "$GET:" ->
844
+ Str (stringify (getpath ~inj:INone src (slice ~start:(Num 5.0) ~stop:(Num (-1.0)) (Str s))))
845
+ | Str s when starts_with s "$REF:" ->
846
+ Str (stringify (getpath ~inj:INone (getprop store (Str s_dspec)) (slice ~start:(Num 5.0) ~stop:(Num (-1.0)) (Str s))))
847
+ | Str s when ia_is_some inj && starts_with s "$META:" ->
848
+ Str (stringify (getpath ~inj:INone inj_meta (slice ~start:(Num 6.0) ~stop:(Num (-1.0)) (Str s))))
849
+ | _ -> raw
850
+ in
851
+ let part = (match part with
852
+ | Str s -> Str (replace_all s "$$" "$")
853
+ | _ -> Str (strkey ~key:part ())) in
854
+ if part = Str s_mt then begin
855
+ let ascends = ref 0 in
856
+ while arr_get (!pi + 1) = Str s_mt do incr ascends; incr pi done;
857
+ if ia_is_some inj && !ascends > 0 then begin
858
+ if !pi = numparts - 1 then decr ascends;
859
+ if !ascends = 0 then v := dparent
860
+ else begin
861
+ let tailparts = Array.to_list (Array.sub pa (!pi + 1) (numparts - (!pi + 1))) in
862
+ let fullpath = flatten (lst [slice ~start:(Num (float_of_int (- !ascends))) dpath; lst tailparts]) in
863
+ v := (if !ascends <= size dpath then getpath ~inj:INone store fullpath else Noval);
864
+ continue := false
865
+ end
866
+ end else v := dparent
867
+ end else v := getprop !v part;
868
+ if !continue then incr pi
869
+ done
870
+ end
871
+ end);
872
+ (match ia_handler inj with
873
+ | Some h when ia_is_some inj ->
874
+ let refp = pathify path in
875
+ (match inj with
876
+ | IInj i -> v := h i !v refp store
877
+ | _ -> v := h (Option.get !dummy_inj_ref) !v refp store)
878
+ | _ -> ());
879
+ !v
880
+
881
+ and setpath ?(inj = INone) store path v =
882
+ let ptype = typify path in
883
+ let parts =
884
+ if (t_list land ptype) > 0 then (match path with List r -> lst !r | _ -> empty_list ())
885
+ else if (t_string land ptype) > 0 then (match path with Str s -> lst (List.map (fun x -> Str x) (String.split_on_char '.' s)) | _ -> empty_list ())
886
+ else if (t_number land ptype) > 0 then lst [path]
887
+ else Noval
888
+ in
889
+ if is_noval parts then Noval
890
+ else begin
891
+ let base = (match inj with INone -> Noval | _ -> ia_base inj) in
892
+ let numparts = size parts in
893
+ let parent = ref (if iskey base then getprop ~alt:store store base else store) in
894
+ for pi = 0 to numparts - 2 do
895
+ let pkey = getelem parts (Num (float_of_int pi)) in
896
+ let np = getprop !parent pkey in
897
+ let np = if not (isnode np) then begin
898
+ let nextpart = getelem parts (Num (float_of_int (pi + 1))) in
899
+ let nn = if (t_number land typify nextpart) > 0 then empty_list () else empty_map () in
900
+ ignore (setprop !parent pkey nn); nn
901
+ end else np in
902
+ parent := np
903
+ done;
904
+ if is_delete v then ignore (delprop !parent (getelem parts (Num (-1.0))))
905
+ else ignore (setprop !parent (getelem parts (Num (-1.0))) v);
906
+ !parent
907
+ end
908
+
909
+ (* ----- string-pattern helpers (hand-rolled, RE2-subset-free) ----- *)
910
+
911
+ and starts_with s pre =
912
+ String.length s >= String.length pre && String.sub s 0 (String.length pre) = pre
913
+
914
+ and replace_all s find_ repl =
915
+ if find_ = "" then s
916
+ else begin
917
+ let b = Buffer.create (String.length s) in
918
+ let flen = String.length find_ in let n = String.length s in let i = ref 0 in
919
+ while !i < n do
920
+ if !i + flen <= n && String.sub s !i flen = find_ then (Buffer.add_string b repl; i := !i + flen)
921
+ else (Buffer.add_char b s.[!i]; incr i)
922
+ done; Buffer.contents b
923
+ end
924
+
925
+ (* R_META_PATH = ^([^$]+)\$([=~])(.+)$ *)
926
+ and meta_path_match s =
927
+ match String.index_opt s '$' with
928
+ | Some i when i > 0 && i + 1 < String.length s
929
+ && (s.[i + 1] = '=' || s.[i + 1] = '~')
930
+ && i + 2 <= String.length s - 1 ->
931
+ Some (String.sub s 0 i, String.make 1 s.[i + 1], String.sub s (i + 2) (String.length s - i - 2))
932
+ | _ -> None
933
+
934
+ (* R_INJECTION_FULL: whole string is a single backtick injection; returns the
935
+ captured reference ($NAME with trailing digits stripped, or the literal). *)
936
+ and injection_full s =
937
+ let n = String.length s in
938
+ if n >= 2 && s.[0] = '`' && s.[n - 1] = '`' then begin
939
+ let inner = String.sub s 1 (n - 2) in
940
+ if String.contains inner '`' then None
941
+ else begin
942
+ (* $[A-Z]+[0-9]*$ -> group is $ + uppercase run *)
943
+ let is_dollar_upper =
944
+ String.length inner > 1 && inner.[0] = '$' &&
945
+ (let j = ref 1 in
946
+ while !j < String.length inner && inner.[!j] >= 'A' && inner.[!j] <= 'Z' do incr j done;
947
+ let letters_end = !j in
948
+ letters_end > 1 &&
949
+ (let k = ref letters_end in
950
+ while !k < String.length inner && inner.[!k] >= '0' && inner.[!k] <= '9' do incr k done;
951
+ !k = String.length inner))
952
+ in
953
+ if is_dollar_upper then begin
954
+ let j = ref 1 in
955
+ while !j < String.length inner && inner.[!j] >= 'A' && inner.[!j] <= 'Z' do incr j done;
956
+ Some (String.sub inner 0 !j)
957
+ end else Some inner
958
+ end
959
+ end else None
960
+
961
+ (* replace each `...` (R_INJECTION_PARTIAL) using f on the inner text *)
962
+ and injection_partial_replace s f =
963
+ let n = String.length s in
964
+ let b = Buffer.create n in
965
+ let i = ref 0 in
966
+ while !i < n do
967
+ if s.[!i] = '`' then begin
968
+ match String.index_from_opt s (!i + 1) '`' with
969
+ | Some j ->
970
+ let inner = String.sub s (!i + 1) (j - !i - 1) in
971
+ Buffer.add_string b (f inner);
972
+ i := j + 1
973
+ | None -> Buffer.add_char b s.[!i]; incr i
974
+ end else (Buffer.add_char b s.[!i]; incr i)
975
+ done;
976
+ Buffer.contents b
977
+
978
+ (* replace `$NAME` -> name (lowercase), used in validate error descriptions *)
979
+ and replace_transform_names s =
980
+ let n = String.length s in
981
+ let b = Buffer.create n in
982
+ let i = ref 0 in
983
+ while !i < n do
984
+ if s.[!i] = '`' && !i + 1 < n && s.[!i + 1] = '$' then begin
985
+ let j = ref (!i + 2) in
986
+ while !j < n && s.[!j] >= 'A' && s.[!j] <= 'Z' do incr j done;
987
+ if !j < n && s.[!j] = '`' && !j > !i + 2 then begin
988
+ Buffer.add_string b (String.lowercase_ascii (String.sub s (!i + 2) (!j - !i - 2)));
989
+ i := !j + 1
990
+ end else (Buffer.add_char b s.[!i]; incr i)
991
+ end else (Buffer.add_char b s.[!i]; incr i)
992
+ done;
993
+ Buffer.contents b
994
+
995
+ (* ----- Injection ----- *)
996
+
997
+ and new_inj v parent =
998
+ { mode = m_val; full = false; keyi = 0;
999
+ keys = lst [Str s_dtop]; key = Str s_dtop; ival = v; parent;
1000
+ path = lst [Str s_dtop]; nodes = lst [parent]; handler = inject_handler;
1001
+ errs = empty_list (); meta = empty_map (); dparent = Noval; dpath = lst [Str s_dtop];
1002
+ base = Str s_dtop; modify = None; prior = None; extra = Noval }
1003
+
1004
+ and inj_descend inj =
1005
+ (match inj.meta with Map m ->
1006
+ let d = (match omap_get m "__d" with Some (Num n) -> n | _ -> 0.0) in
1007
+ omap_set m "__d" (Num (d +. 1.0)) | _ -> ());
1008
+ let parentkey = getelem inj.path (Num (-2.0)) in
1009
+ if is_noval inj.dparent then begin
1010
+ if size inj.dpath > 1 then
1011
+ inj.dpath <- (match inj.dpath, parentkey with List r, _ -> lst (!r @ [parentkey]) | _ -> inj.dpath)
1012
+ end else if not (is_noval parentkey) then begin
1013
+ inj.dparent <- getprop inj.dparent parentkey;
1014
+ let lastpart = getelem inj.dpath (Num (-1.0)) in
1015
+ if lastpart = Str ("$:" ^ js_string parentkey) then
1016
+ inj.dpath <- slice ~start:(Num (-1.0)) inj.dpath
1017
+ else inj.dpath <- (match inj.dpath with List r -> lst (!r @ [parentkey]) | _ -> inj.dpath)
1018
+ end;
1019
+ inj.dparent
1020
+
1021
+ and inj_child inj keyi keys =
1022
+ let key = strkey ~key:(getelem keys (Num (float_of_int keyi))) () in
1023
+ let v = inj.ival in
1024
+ let cinj = {
1025
+ mode = inj.mode; full = inj.full; keyi; keys; key = Str key;
1026
+ ival = getprop v (Str key); parent = v;
1027
+ path = (match inj.path with List r -> lst (!r @ [Str key]) | _ -> lst [Str key]);
1028
+ nodes = (match inj.nodes with List r -> lst (!r @ [v]) | _ -> lst [v]);
1029
+ handler = inj.handler; errs = inj.errs; meta = inj.meta; base = inj.base;
1030
+ modify = inj.modify; prior = Some inj;
1031
+ dpath = (match inj.dpath with List r -> lst !r | _ -> inj.dpath);
1032
+ dparent = inj.dparent; extra = inj.extra;
1033
+ } in
1034
+ cinj
1035
+
1036
+ and inj_setval ?(ancestor = 1) inj v =
1037
+ let target, key =
1038
+ if ancestor < 2 then inj.parent, inj.key
1039
+ else getelem inj.nodes (Num (float_of_int (- ancestor))), getelem inj.path (Num (float_of_int (- ancestor)))
1040
+ in
1041
+ if is_noval v then delprop target key else setprop target key v
1042
+
1043
+ (* ----- inject ----- *)
1044
+
1045
+ and inject ?(inj = INone) v store =
1046
+ let state =
1047
+ match inj with
1048
+ | IInj i -> i
1049
+ | _ ->
1050
+ let parent = Map { entries = [(s_dtop, v)] } in
1051
+ let i = new_inj v parent in
1052
+ i.dparent <- store;
1053
+ i.errs <- getprop ~alt:(empty_list ()) store (Str s_derrs);
1054
+ (match i.meta with Map m -> omap_set m "__d" (Num 0.0) | _ -> ());
1055
+ (match inj with
1056
+ | IDef d ->
1057
+ (match d.d_modify with Some _ -> i.modify <- d.d_modify | None -> ());
1058
+ (if not (is_noval d.d_extra) then i.extra <- d.d_extra);
1059
+ (if not (is_noval d.d_meta) then i.meta <- d.d_meta);
1060
+ (match d.d_handler with Some h -> i.handler <- h | None -> ())
1061
+ | _ -> ());
1062
+ i
1063
+ in
1064
+ ignore (inj_descend state);
1065
+ let v =
1066
+ if isnode v then begin
1067
+ let nodekeys = ref (
1068
+ match v with
1069
+ | Map m ->
1070
+ let ks = List.map fst m.entries in
1071
+ let normal = List.sort compare (List.filter (fun k -> not (String.contains k '$')) ks) in
1072
+ let trans = List.sort compare (List.filter (fun k -> String.contains k '$') ks) in
1073
+ normal @ trans
1074
+ | List r -> List.mapi (fun i _ -> string_of_int i) !r
1075
+ | _ -> [])
1076
+ in
1077
+ let nki = ref 0 in
1078
+ let continue = ref true in
1079
+ while !continue && !nki < List.length !nodekeys do
1080
+ let childinj = inj_child state !nki (lst (List.map (fun s -> Str s) !nodekeys)) in
1081
+ let nodekey = childinj.key in
1082
+ childinj.mode <- m_keypre;
1083
+ let prekey = injectstr (js_string nodekey) store (Some childinj) in
1084
+ nodekeys := List.map js_string (match childinj.keys with List r -> !r | _ -> []);
1085
+ (if not (is_noval prekey) then begin
1086
+ childinj.ival <- getprop v prekey;
1087
+ childinj.mode <- m_val;
1088
+ ignore (inject ~inj:(IInj childinj) childinj.ival store);
1089
+ nodekeys := List.map js_string (match childinj.keys with List r -> !r | _ -> []);
1090
+ childinj.mode <- m_keypost;
1091
+ ignore (injectstr (js_string nodekey) store (Some childinj));
1092
+ nodekeys := List.map js_string (match childinj.keys with List r -> !r | _ -> [])
1093
+ end);
1094
+ nki := childinj.keyi + 1;
1095
+ ignore continue
1096
+ done;
1097
+ v
1098
+ end else if (match v with Str _ -> true | _ -> false) then begin
1099
+ state.mode <- m_val;
1100
+ let nv = injectstr (js_string v) store (Some state) in
1101
+ (if not (is_skip nv) then ignore (inj_setval state nv));
1102
+ nv
1103
+ end else v
1104
+ in
1105
+ (match state.modify with
1106
+ | Some f when not (is_skip v) ->
1107
+ let mkey = state.key in let mparent = state.parent in let mval = getprop mparent mkey in
1108
+ f mval mkey mparent state
1109
+ | _ -> ());
1110
+ state.ival <- v;
1111
+ lookup_ state.parent (Str s_dtop)
1112
+
1113
+ and inject_handler inj v refstr store =
1114
+ let iscmd = isfunc v && (refstr = "" || starts_with refstr s_ds) in
1115
+ if iscmd then (match v with Func f -> f inj v refstr store | _ -> v)
1116
+ else if state_mode_is_val inj && inj.full then (ignore (inj_setval inj v); v)
1117
+ else v
1118
+
1119
+ and state_mode_is_val inj = (inj.mode = m_val)
1120
+
1121
+ and injectstr v store inj_opt =
1122
+ if v = s_mt then Str s_mt
1123
+ else begin
1124
+ match injection_full v with
1125
+ | Some pathref0 ->
1126
+ (match inj_opt with Some i -> i.full <- true | None -> ());
1127
+ let pathref = if String.length pathref0 > 3 then
1128
+ replace_all (replace_all pathref0 "$BT" s_bt) "$DS" s_ds else pathref0 in
1129
+ let ia = (match inj_opt with Some i -> IInj i | None -> INone) in
1130
+ let out = getpath ~inj:ia store (Str pathref) in
1131
+ (* out may be any value, returned as the injected value *)
1132
+ out_to_val out
1133
+ | None ->
1134
+ let out = injection_partial_replace v (fun ref0 ->
1135
+ let refp = if String.length ref0 > 3 then
1136
+ replace_all (replace_all ref0 "$BT" s_bt) "$DS" s_ds else ref0 in
1137
+ (match inj_opt with Some i -> i.full <- false | None -> ());
1138
+ let ia = (match inj_opt with Some i -> IInj i | None -> INone) in
1139
+ let found = getpath ~inj:ia store (Str refp) in
1140
+ match found with
1141
+ | Noval -> s_mt
1142
+ | Str s -> if s = "__NULL__" then "null" else s
1143
+ | Func _ -> s_mt
1144
+ | _ -> (try json_encode found with _ -> stringify found))
1145
+ in
1146
+ (match inj_opt with
1147
+ | Some i when isfunc_handler i ->
1148
+ i.full <- true; out_to_val (i.handler i (Str out) v store)
1149
+ | _ -> Str out)
1150
+ end
1151
+
1152
+ and out_to_val v = v
1153
+ and isfunc_handler _i = true
1154
+
1155
+ (* ----- transform commands ----- *)
1156
+
1157
+ and transform_delete inj _v _ref _store = ignore (delprop inj.parent inj.key); Noval
1158
+
1159
+ and transform_copy inj _v _ref _store =
1160
+ if inj.mode = m_keypre || inj.mode = m_keypost then inj.key
1161
+ else begin
1162
+ let out = lookup_ inj.dparent inj.key in
1163
+ ignore (inj_setval inj out); out
1164
+ end
1165
+
1166
+ and transform_key inj _v _ref _store =
1167
+ if inj.mode <> m_val then Noval
1168
+ else begin
1169
+ let keyspec = lookup_ inj.parent (Str s_bkey) in
1170
+ if not (is_noval keyspec) then (ignore (delprop inj.parent (Str s_bkey)); getprop inj.dparent keyspec)
1171
+ else
1172
+ let anno = lookup_ inj.parent (Str s_banno) in
1173
+ let fromanno = lookup_ anno (Str s_key) in
1174
+ if not (is_noval fromanno) then fromanno
1175
+ else getelem inj.path (Num (-2.0))
1176
+ end
1177
+
1178
+ and transform_anno inj _v _ref _store = ignore (delprop inj.parent (Str s_banno)); Noval
1179
+
1180
+ and transform_merge inj _v _ref _store =
1181
+ if inj.mode = m_keypre then inj.key
1182
+ else if inj.mode = m_keypost then begin
1183
+ let args0 = getprop inj.parent inj.key in
1184
+ let args = if islist args0 then args0 else lst [args0] in
1185
+ ignore (inj_setval inj Noval);
1186
+ let mergelist = flatten (lst [lst [inj.parent]; args; lst [clone inj.parent]]) in
1187
+ ignore (merge mergelist);
1188
+ inj.key
1189
+ end else Noval
1190
+
1191
+ and transform_each inj _v _ref store =
1192
+ (if islist inj.keys then ignore (slice ~start:(Num 0.0) ~stop:(Num 1.0) ~mutate:true inj.keys));
1193
+ if inj.mode <> m_val then Noval
1194
+ else begin
1195
+ let parent = inj.parent in
1196
+ let srcpath = if size parent > 1 then getelem parent (Num 1.0) else Noval in
1197
+ let child_tm = if size parent > 2 then clone (getelem parent (Num 2.0)) else Noval in
1198
+ let srcstore = getprop ~alt:store store inj.base in
1199
+ let src = getpath ~inj:(IInj inj) srcstore srcpath in
1200
+ let tkey = getelem inj.path (Num (-2.0)) in
1201
+ let nodes = inj.nodes in
1202
+ let target =
1203
+ let t = getelem nodes (Num (-2.0)) in
1204
+ if is_nullish t then getelem nodes (Num (-1.0)) else t in
1205
+ let tval = ref [] in
1206
+ let rval = ref (empty_list ()) in
1207
+ (if isnode src then begin
1208
+ (match src with
1209
+ | List r -> List.iter (fun _ -> tval := clone child_tm :: !tval) !r
1210
+ | Map m -> List.iter (fun (k, _) ->
1211
+ let cc = clone child_tm in
1212
+ (if ismap cc then ignore (setprop cc (Str s_banno) (Map { entries = [(s_key, Str k)] })));
1213
+ tval := cc :: !tval) m.entries
1214
+ | _ -> ());
1215
+ let tvall = List.rev !tval in
1216
+ let tvalv = lst tvall in
1217
+ let tcurrent = (match src with
1218
+ | Map m -> lst (List.map snd m.entries)
1219
+ | List r -> lst !r | _ -> src) in
1220
+ if List.length tvall > 0 then begin
1221
+ let path = inj.path in
1222
+ let ckey = getelem path (Num (-2.0)) in
1223
+ let plist = (match path with List r -> !r | _ -> []) in
1224
+ let tpath = lst (if plist = [] then [] else List.filteri (fun i _ -> i < List.length plist - 1) plist) in
1225
+ let dpath = ref [Str s_dtop] in
1226
+ (match srcpath with Str sp when sp <> s_mt ->
1227
+ List.iter (fun p -> if p <> s_mt then dpath := !dpath @ [Str p]) (String.split_on_char '.' sp)
1228
+ | _ -> ());
1229
+ (if not (is_noval ckey) then dpath := !dpath @ [Str ("$:" ^ js_string ckey)]);
1230
+ let tcur = ref (Map { entries = [(js_string ckey, tcurrent)] }) in
1231
+ (if size tpath > 1 then begin
1232
+ let pkey = getelem ~alt:(Str s_dtop) path (Num (-3.0)) in
1233
+ dpath := !dpath @ [Str ("$:" ^ js_string pkey)];
1234
+ tcur := Map { entries = [(js_string pkey, !tcur)] }
1235
+ end);
1236
+ let tinj = inj_child inj 0 (if not (is_noval ckey) then lst [ckey] else empty_list ()) in
1237
+ tinj.path <- tpath;
1238
+ let nlist = (match nodes with List r -> !r | _ -> []) in
1239
+ tinj.nodes <- lst (if nlist = [] then [] else List.filteri (fun i _ -> i < List.length nlist - 1) nlist);
1240
+ tinj.parent <- (if size tinj.nodes > 0 then getelem tinj.nodes (Num (-1.0)) else Noval);
1241
+ (if not (is_noval ckey) && not (is_noval tinj.parent) then ignore (setprop tinj.parent ckey tvalv));
1242
+ tinj.ival <- tvalv;
1243
+ tinj.dpath <- lst !dpath;
1244
+ tinj.dparent <- !tcur;
1245
+ ignore (inject ~inj:(IInj tinj) tvalv store);
1246
+ rval := tinj.ival
1247
+ end
1248
+ end);
1249
+ ignore (setprop target tkey !rval);
1250
+ if islist !rval && size !rval > 0 then getelem !rval (Num 0.0) else Noval
1251
+ end
1252
+
1253
+ and transform_pack inj _v _ref store =
1254
+ if inj.mode <> m_keypre || not (match inj.key with Str _ -> true | _ -> false) then Noval
1255
+ else begin
1256
+ let parent = inj.parent in let path = inj.path in let nodes = inj.nodes in
1257
+ let args_val = getprop parent inj.key in
1258
+ if not (islist args_val) || size args_val < 2 then Noval
1259
+ else begin
1260
+ let srcpath = getelem args_val (Num 0.0) in
1261
+ let origchildspec = getelem args_val (Num 1.0) in
1262
+ let tkey = getelem path (Num (-2.0)) in
1263
+ let pathsize = size path in
1264
+ let target =
1265
+ let t = getelem nodes (Num (float_of_int (pathsize - 2))) in
1266
+ if is_nullish t then getelem nodes (Num (float_of_int (pathsize - 1))) else t in
1267
+ let srcstore = getprop ~alt:store store inj.base in
1268
+ let src0 = getpath ~inj:(IInj inj) srcstore srcpath in
1269
+ let src =
1270
+ if not (islist src0) then
1271
+ (if ismap src0 then
1272
+ lst (List.map (fun (k, node) ->
1273
+ ignore (setprop node (Str s_banno) (Map { entries = [(s_key, Str k)] })); node)
1274
+ (items_pairs src0))
1275
+ else Noval)
1276
+ else src0 in
1277
+ if is_noval src then Noval
1278
+ else begin
1279
+ let keypath = getprop origchildspec (Str s_bkey) in
1280
+ let childspec = delprop origchildspec (Str s_bkey) in
1281
+ let child = getprop ~alt:childspec childspec (Str s_bval) in
1282
+ let tval = empty_map () in
1283
+ List.iter (fun (srckey, srcnode) ->
1284
+ let k =
1285
+ if is_noval keypath then Str srckey
1286
+ else (match keypath with
1287
+ | Str kp when starts_with kp s_bt ->
1288
+ inject (Str kp) (merge ~maxdepth:(Num 1.0) (lst [empty_map (); store; Map { entries = [(s_dtop, srcnode)] }]))
1289
+ | _ -> getpath ~inj:(IInj inj) srcnode keypath) in
1290
+ let tchild = clone child in
1291
+ ignore (setprop tval k tchild);
1292
+ let anno = getprop srcnode (Str s_banno) in
1293
+ if is_noval anno then ignore (delprop tchild (Str s_banno))
1294
+ else ignore (setprop tchild (Str s_banno) anno)) (items_pairs src);
1295
+ let rval = ref (empty_map ()) in
1296
+ (if not (isempty tval) then begin
1297
+ let tsrc = empty_map () in
1298
+ List.iteri (fun i node ->
1299
+ let kn =
1300
+ if is_noval keypath then vint i
1301
+ else (match keypath with
1302
+ | Str kp when starts_with kp s_bt ->
1303
+ inject (Str kp) (merge ~maxdepth:(Num 1.0) (lst [empty_map (); store; Map { entries = [(s_dtop, node)] }]))
1304
+ | _ -> getpath ~inj:(IInj inj) node keypath) in
1305
+ ignore (setprop tsrc kn node))
1306
+ (match src with List r -> !r | _ -> []);
1307
+ let tpath = slice ~start:(Num (-1.0)) inj.path in
1308
+ let ckey = getelem inj.path (Num (-2.0)) in
1309
+ let dpath = ref [Str s_dtop] in
1310
+ (match srcpath with Str sp ->
1311
+ List.iter (fun p -> if p <> s_mt then dpath := !dpath @ [Str p]) (String.split_on_char '.' sp)
1312
+ | _ -> ());
1313
+ dpath := !dpath @ [Str ("$:" ^ js_string ckey)];
1314
+ let tcur = ref (Map { entries = [(js_string ckey, tsrc)] }) in
1315
+ (if size tpath > 1 then begin
1316
+ let pkey = getelem ~alt:(Str s_dtop) inj.path (Num (-3.0)) in
1317
+ dpath := !dpath @ [Str ("$:" ^ js_string pkey)];
1318
+ tcur := Map { entries = [(js_string pkey, !tcur)] }
1319
+ end);
1320
+ let tinj = inj_child inj 0 (lst [ckey]) in
1321
+ tinj.path <- tpath;
1322
+ tinj.nodes <- slice ~start:(Num (-1.0)) inj.nodes;
1323
+ tinj.parent <- getelem tinj.nodes (Num (-1.0));
1324
+ tinj.ival <- tval;
1325
+ tinj.dpath <- lst !dpath;
1326
+ tinj.dparent <- !tcur;
1327
+ ignore (inject ~inj:(IInj tinj) tval store);
1328
+ rval := tinj.ival
1329
+ end);
1330
+ ignore (setprop target tkey !rval);
1331
+ Noval
1332
+ end
1333
+ end
1334
+ end
1335
+
1336
+ and transform_ref inj v _ref store =
1337
+ if inj.mode <> m_val then Noval
1338
+ else begin
1339
+ let nodes = inj.nodes in
1340
+ let refpath = lookup_ inj.parent (Num 1.0) in
1341
+ inj.keyi <- size inj.keys;
1342
+ let spec_func = getprop store (Str s_dspec) in
1343
+ (match spec_func with
1344
+ | Func f ->
1345
+ let spec = f inj Noval "" Noval in
1346
+ let refv = getpath ~inj:INone spec refpath in
1347
+ let has_sub = ref false in
1348
+ (if isnode refv then ignore (walk ~before:(fun _k v2 _p _path -> (if v2 = Str "`$REF`" then has_sub := true); v2) refv));
1349
+ let tref = clone refv in
1350
+ let cpath = slice ~start:(Num 0.0) ~stop:(Num (float_of_int (size inj.path - 3))) inj.path in
1351
+ let tpath = slice ~start:(Num 0.0) ~stop:(Num (float_of_int (size inj.path - 1))) inj.path in
1352
+ let tcur = getpath ~inj:INone store cpath in
1353
+ let tval = getpath ~inj:INone store tpath in
1354
+ let rval = ref Noval in
1355
+ (if not (is_noval refv) && (not !has_sub || not (is_noval tval)) then begin
1356
+ let cs = inj_child inj 0 (lst [getelem tpath (Num (-1.0))]) in
1357
+ cs.path <- tpath;
1358
+ cs.nodes <- slice ~start:(Num 0.0) ~stop:(Num (float_of_int (size inj.nodes - 1))) inj.nodes;
1359
+ cs.parent <- getelem nodes (Num (-2.0));
1360
+ cs.ival <- tref;
1361
+ cs.dparent <- tcur;
1362
+ ignore (inject ~inj:(IInj cs) tref store);
1363
+ rval := cs.ival
1364
+ end);
1365
+ ignore (inj_setval ~ancestor:2 inj !rval);
1366
+ (match inj.prior with
1367
+ | Some p when islist inj.parent -> p.keyi <- p.keyi - 1
1368
+ | _ -> ());
1369
+ v
1370
+ | _ -> Noval)
1371
+ end
1372
+
1373
+ and jsstr v = match v with Null -> "null" | Bool b -> if b then "true" else "false" | _ -> js_string v
1374
+
1375
+ and formatter_tbl = [
1376
+ ("identity", (fun _k v -> v));
1377
+ ("upper", (fun _k v -> if isnode v then v else Str (String.uppercase_ascii (jsstr v))));
1378
+ ("lower", (fun _k v -> if isnode v then v else Str (String.lowercase_ascii (jsstr v))));
1379
+ ("string", (fun _k v -> if isnode v then v else Str (jsstr v)));
1380
+ ("number", (fun _k v -> if isnode v then v else
1381
+ let n = (try float_of_string (jsstr v) with _ -> 0.0) in
1382
+ let n = if Float.is_nan n then 0.0 else n in Num n));
1383
+ ("integer", (fun _k v -> if isnode v then v else
1384
+ let n = (try float_of_string (jsstr v) with _ -> 0.0) in
1385
+ let n = if Float.is_nan n then 0.0 else n in Num (Float.of_int (int_of_float n))));
1386
+ ("concat", (fun k v -> if is_noval k && islist v then
1387
+ Str (join ~sep:(Str s_mt) (items_v v (fun (_, x) -> if isnode x then Str s_mt else Str (jsstr x))))
1388
+ else v));
1389
+ ]
1390
+
1391
+ and check_placement modes ijname parenttypes inj =
1392
+ let modenum = inj.mode in
1393
+ if (modes land modenum) = 0 then begin
1394
+ let allowed = List.filter (fun m -> (modes land m) <> 0) [m_keypre; m_keypost; m_val] in
1395
+ let placements = String.concat "," (List.map (fun m -> if m = m_val then "value" else "key") allowed) in
1396
+ let cur = if modenum = m_val then "value" else "key" in
1397
+ ignore (setprop inj.errs (Num (float_of_int (size inj.errs))) (Str (Printf.sprintf "$%s: invalid placement as %s, expected: %s." ijname cur placements)));
1398
+ false
1399
+ end else if not (isempty (Num (float_of_int parenttypes))) then begin
1400
+ let ptype = typify inj.parent in
1401
+ if (parenttypes land ptype) = 0 then begin
1402
+ ignore (setprop inj.errs (Num (float_of_int (size inj.errs)))
1403
+ (Str (Printf.sprintf "$%s: invalid placement in parent %s, expected: %s." ijname (typename ptype) (typename parenttypes))));
1404
+ false
1405
+ end else true
1406
+ end else true
1407
+
1408
+ and injector_args argtypes args =
1409
+ let numargs = List.length argtypes in
1410
+ let found = Array.make (1 + numargs) Noval in
1411
+ let err = ref None in
1412
+ (try
1413
+ List.iteri (fun argi at ->
1414
+ let arg = getelem args (Num (float_of_int argi)) in
1415
+ let argtype = typify arg in
1416
+ if (at land argtype) = 0 then begin
1417
+ found.(0) <- Str (Printf.sprintf "invalid argument: %s (%s at position %d) is not of type: %s."
1418
+ (stringify ~maxlen:(Num 22.0) arg) (typename argtype) (1 + argi) (typename at));
1419
+ err := Some (); raise Exit
1420
+ end else found.(1 + argi) <- arg) argtypes
1421
+ with Exit -> ());
1422
+ ignore !err;
1423
+ Array.to_list found
1424
+
1425
+ and inject_child child store inj =
1426
+ let cinj = ref inj in
1427
+ (match inj.prior with
1428
+ | Some prior ->
1429
+ (match prior.prior with
1430
+ | Some pprior ->
1431
+ let c = inj_child pprior prior.keyi prior.keys in
1432
+ c.ival <- child; ignore (setprop c.parent prior.key child); cinj := c
1433
+ | None ->
1434
+ let c = inj_child prior inj.keyi inj.keys in
1435
+ c.ival <- child; ignore (setprop c.parent inj.key child); cinj := c)
1436
+ | None -> ());
1437
+ ignore (inject ~inj:(IInj !cinj) child store);
1438
+ !cinj
1439
+
1440
+ and transform_format inj _v _ref store =
1441
+ ignore (slice ~start:(Num 0.0) ~stop:(Num 1.0) ~mutate:true inj.keys);
1442
+ if inj.mode <> m_val then Noval
1443
+ else begin
1444
+ let name = lookup_ inj.parent (Num 1.0) in
1445
+ let child = lookup_ inj.parent (Num 2.0) in
1446
+ let tkey = getelem inj.path (Num (-2.0)) in
1447
+ let target = let t = getelem inj.nodes (Num (-2.0)) in if is_nullish t then getelem inj.nodes (Num (-1.0)) else t in
1448
+ let cinj = inject_child child store inj in
1449
+ let resolved = cinj.ival in
1450
+ let formatter =
1451
+ if (t_function land typify name) > 0 then
1452
+ Some (fun k v -> match name with Func f -> f (Option.get !dummy_inj_ref) v (js_string k) Noval | _ -> v)
1453
+ else (match List.assoc_opt (js_string name) formatter_tbl with Some f -> Some f | None -> None)
1454
+ in
1455
+ match formatter with
1456
+ | None -> ignore (setprop inj.errs (Num (float_of_int (size inj.errs))) (Str (Printf.sprintf "$FORMAT: unknown format: %s." (js_string name)))); Noval
1457
+ | Some f ->
1458
+ let out = walk ~before:(fun k v _p _path -> f k v) resolved in
1459
+ ignore (setprop target tkey out); out
1460
+ end
1461
+
1462
+ and transform_apply inj _v _ref store =
1463
+ if not (check_placement m_val "APPLY" t_list inj) then Noval
1464
+ else begin
1465
+ let res = injector_args [t_function; t_any] (slice ~start:(Num 1.0) inj.parent) in
1466
+ let err = List.nth res 0 in
1467
+ let apply_fn = List.nth res 1 in
1468
+ let child = if List.length res > 2 then List.nth res 2 else Noval in
1469
+ if not (is_noval err) then (ignore (setprop inj.errs (Num (float_of_int (size inj.errs))) (Str ("$APPLY: " ^ js_string err))); Noval)
1470
+ else begin
1471
+ let tkey = getelem inj.path (Num (-2.0)) in
1472
+ let target = let t = getelem inj.nodes (Num (-2.0)) in if is_nullish t then getelem inj.nodes (Num (-1.0)) else t in
1473
+ let cinj = inject_child child store inj in
1474
+ let resolved = cinj.ival in
1475
+ let out = (match apply_fn with Func f -> f cinj resolved "" store | _ -> Noval) in
1476
+ ignore (setprop target tkey out); out
1477
+ end
1478
+ end
1479
+
1480
+ and transform ?(inj = INone) data spec =
1481
+ let origspec = spec in
1482
+ let spec = clone spec in
1483
+ let extra = (match inj with IDef d -> d.d_extra | _ -> Noval) in
1484
+ let collect = (match inj with IDef d -> not (is_noval d.d_errs) | _ -> false) in
1485
+ let errs = (match inj with IDef d when collect -> d.d_errs | _ -> empty_list ()) in
1486
+ let extra_transforms = empty_map () in
1487
+ let extra_data = empty_map () in
1488
+ (if not (is_noval extra) then
1489
+ List.iter (fun (k, v) ->
1490
+ if starts_with k s_ds then ignore (setprop extra_transforms (Str k) v)
1491
+ else ignore (setprop extra_data (Str k) v)) (items_pairs extra));
1492
+ let data_clone = merge (lst [(if isempty extra_data then Noval else clone extra_data); clone data]) in
1493
+ let store = empty_map () in
1494
+ let put k v = ignore (setprop store (Str k) v) in
1495
+ put s_dtop data_clone;
1496
+ put s_dspec (Func (fun _ _ _ _ -> origspec));
1497
+ put "$BT" (Func (fun _ _ _ _ -> Str s_bt));
1498
+ put "$DS" (Func (fun _ _ _ _ -> Str s_ds));
1499
+ put "$WHEN" (Func (fun _ _ _ _ -> Str "1970-01-01T00:00:00.000Z"));
1500
+ put "$DELETE" (Func transform_delete);
1501
+ put "$COPY" (Func transform_copy);
1502
+ put "$KEY" (Func transform_key);
1503
+ put "$ANNO" (Func transform_anno);
1504
+ put "$MERGE" (Func transform_merge);
1505
+ put "$EACH" (Func transform_each);
1506
+ put "$PACK" (Func transform_pack);
1507
+ put "$REF" (Func transform_ref);
1508
+ put "$FORMAT" (Func transform_format);
1509
+ put "$APPLY" (Func transform_apply);
1510
+ List.iter (fun (k, v) -> put k v) (items_pairs extra_transforms);
1511
+ put s_derrs errs;
1512
+ let idef = { (default_injdef ()) with d_errs = errs } in
1513
+ (match inj with
1514
+ | IDef d ->
1515
+ idef.d_meta <- d.d_meta; idef.d_modify <- d.d_modify; idef.d_handler <- d.d_handler;
1516
+ idef.d_base <- d.d_base
1517
+ | _ -> ());
1518
+ let out = inject ~inj:(IDef idef) spec store in
1519
+ if size errs > 0 && not collect then raise (Struct_error (join ~sep:(Str " | ") errs));
1520
+ out
1521
+
1522
+ and default_injdef () =
1523
+ { d_meta = Noval; d_extra = Noval; d_errs = Noval; d_modify = None; d_handler = None;
1524
+ d_base = Noval; d_dparent = Noval; d_dpath = Noval; d_key = Noval }
1525
+
1526
+ (* ----- validate ----- *)
1527
+
1528
+ and invalid_type_msg path needtype vt v _whence =
1529
+ let vs = if is_nullish v then "no value" else stringify v in
1530
+ "Expected "
1531
+ ^ (if size path > 1 then "field " ^ pathify ~startin:(Num 1.0) path ^ " to be " else "")
1532
+ ^ needtype ^ ", but found "
1533
+ ^ (if not (is_nullish v) then typename vt ^ s_viz else "")
1534
+ ^ vs ^ "."
1535
+
1536
+ and validate_string inj _v _ref _store =
1537
+ let out = lookup_ inj.dparent inj.key in
1538
+ let t = typify out in
1539
+ if (t_string land t) = 0 then (push_err inj (invalid_type_msg inj.path s_string t out "V1010"); Noval)
1540
+ else if out = Str s_mt then (push_err inj ("Empty string at " ^ pathify ~startin:(Num 1.0) inj.path); Noval)
1541
+ else out
1542
+
1543
+ and push_err inj msg = ignore (setprop inj.errs (Num (float_of_int (size inj.errs))) (Str msg))
1544
+
1545
+ and validate_type inj _v refstr _store =
1546
+ let tname = if String.length refstr > 1 then String.lowercase_ascii (String.sub refstr 1 (String.length refstr - 1)) else "any" in
1547
+ let idx = (let r = ref (-1) in Array.iteri (fun i x -> if x = tname && !r < 0 then r := i) typename_tbl; !r) in
1548
+ let typev0 = if idx >= 0 then 1 lsl (31 - idx) else 0 in
1549
+ let typev = if tname = s_nil then typev0 lor t_null else typev0 in
1550
+ let out = lookup_ inj.dparent inj.key in
1551
+ let t = typify out in
1552
+ if (t land typev) = 0 then (push_err inj (invalid_type_msg inj.path tname t out "V1001"); Noval)
1553
+ else out
1554
+
1555
+ and validate_any inj _v _ref _store = lookup_ inj.dparent inj.key
1556
+
1557
+ and validate_child inj _v _ref _store =
1558
+ let parent = inj.parent in let key = inj.key in let path = inj.path in let keys = inj.keys in
1559
+ if inj.mode = m_keypre then begin
1560
+ let childtm = getprop parent key in
1561
+ let pkey = getelem path (Num (-2.0)) in
1562
+ let tval = getprop inj.dparent pkey in
1563
+ if is_noval tval then begin
1564
+ List.iter (fun ckey -> ignore (setprop parent (Str ckey) (clone childtm)); ignore (setprop keys (Num (float_of_int (size keys))) (Str ckey))) (keysof (empty_map ()));
1565
+ ignore (delprop parent key); Noval
1566
+ end else if not (ismap tval) then
1567
+ (push_err inj (invalid_type_msg (slice ~start:(Num 0.0) ~stop:(Num (float_of_int (size path - 1))) path) s_object (typify tval) tval "V0220"); Noval)
1568
+ else begin
1569
+ List.iter (fun ckey -> ignore (setprop parent (Str ckey) (clone childtm)); ignore (setprop keys (Num (float_of_int (size keys))) (Str ckey))) (keysof tval);
1570
+ ignore (delprop parent key); Noval
1571
+ end
1572
+ end else if inj.mode = m_val then begin
1573
+ let childtm = getprop parent (Num 1.0) in
1574
+ if not (islist parent) then (push_err inj "Invalid $CHILD as value"; Noval)
1575
+ else if is_noval inj.dparent then (match parent with List r -> r := []; Noval | _ -> Noval)
1576
+ else if not (islist inj.dparent) then begin
1577
+ push_err inj (invalid_type_msg (slice ~start:(Num 0.0) ~stop:(Num (float_of_int (size path - 1))) path) s_list (typify inj.dparent) inj.dparent "V0230");
1578
+ inj.keyi <- size parent; inj.dparent
1579
+ end else begin
1580
+ List.iter (fun (k, _) -> ignore (setprop parent (Str k) (clone childtm))) (items_pairs inj.dparent);
1581
+ (match parent with List r -> let n = size inj.dparent in r := (let a = Array.of_list !r in Array.to_list (Array.sub a 0 (min n (Array.length a)))) | _ -> ());
1582
+ inj.keyi <- 0;
1583
+ getprop inj.dparent (Num 0.0)
1584
+ end
1585
+ end else Noval
1586
+
1587
+ and validate_one inj _v _ref store =
1588
+ if inj.mode = m_val then begin
1589
+ let parent = inj.parent in
1590
+ if not (islist parent) || inj.keyi <> 0 then
1591
+ (push_err inj ("The $ONE validator at field " ^ pathify ~startin:(Num 1.0) ~endin:(Num 1.0) inj.path ^ " must be the first element of an array."); Noval)
1592
+ else begin
1593
+ inj.keyi <- size inj.keys;
1594
+ ignore (inj_setval ~ancestor:2 inj inj.dparent);
1595
+ inj.path <- slice ~start:(Num 0.0) ~stop:(Num (float_of_int (size inj.path - 1))) inj.path;
1596
+ inj.key <- getelem inj.path (Num (-1.0));
1597
+ let tvals = slice ~start:(Num 1.0) parent in
1598
+ if size tvals = 0 then
1599
+ (push_err inj ("The $ONE validator at field " ^ pathify ~startin:(Num 1.0) ~endin:(Num 1.0) inj.path ^ " must have at least one argument."); Noval)
1600
+ else begin
1601
+ let matched = ref false in
1602
+ List.iter (fun tval ->
1603
+ if not !matched then begin
1604
+ let terrs = empty_list () in
1605
+ let vstore = merge ~maxdepth:(Num 1.0) (lst [empty_map (); store]) in
1606
+ ignore (setprop vstore (Str s_dtop) inj.dparent);
1607
+ let idef = { (default_injdef ()) with d_extra = vstore; d_errs = terrs; d_meta = inj.meta } in
1608
+ let vcurrent = validate ~inj:(IDef idef) inj.dparent tval in
1609
+ ignore (inj_setval ~ancestor:(-2) inj vcurrent);
1610
+ if size terrs = 0 then matched := true
1611
+ end) (match tvals with List r -> !r | _ -> []);
1612
+ if not !matched then begin
1613
+ let valdesc = String.concat ", " (List.map (fun (_, x) -> stringify x) (items_pairs tvals)) in
1614
+ let valdesc = replace_transform_names valdesc in
1615
+ push_err inj (invalid_type_msg inj.path ((if size tvals > 1 then "one of " else "") ^ valdesc) (typify inj.dparent) inj.dparent "V0210")
1616
+ end;
1617
+ Noval
1618
+ end
1619
+ end
1620
+ end else Noval
1621
+
1622
+ and validate_exact inj _v _ref _store =
1623
+ if inj.mode = m_val then begin
1624
+ let parent = inj.parent in
1625
+ if not (islist parent) || inj.keyi <> 0 then
1626
+ (push_err inj ("The $EXACT validator at field " ^ pathify ~startin:(Num 1.0) ~endin:(Num 1.0) inj.path ^ " must be the first element of an array."); Noval)
1627
+ else begin
1628
+ inj.keyi <- size inj.keys;
1629
+ ignore (inj_setval ~ancestor:2 inj inj.dparent);
1630
+ inj.path <- slice ~start:(Num 0.0) ~stop:(Num (float_of_int (size inj.path - 1))) inj.path;
1631
+ inj.key <- getelem inj.path (Num (-1.0));
1632
+ let tvals = slice ~start:(Num 1.0) parent in
1633
+ if size tvals = 0 then
1634
+ (push_err inj ("The $EXACT validator at field " ^ pathify ~startin:(Num 1.0) ~endin:(Num 1.0) inj.path ^ " must have at least one argument."); Noval)
1635
+ else begin
1636
+ let matched = ref false in
1637
+ List.iter (fun tval -> if not !matched && veq tval inj.dparent then matched := true)
1638
+ (match tvals with List r -> !r | _ -> []);
1639
+ if not !matched then begin
1640
+ let valdesc = String.concat ", " (List.map (fun (_, x) -> stringify x) (items_pairs tvals)) in
1641
+ let valdesc = replace_transform_names valdesc in
1642
+ push_err inj (invalid_type_msg inj.path
1643
+ ((if size inj.path > 1 then "" else "value ") ^ "exactly equal to " ^ (if size tvals = 1 then "" else "one of ") ^ valdesc)
1644
+ (typify inj.dparent) inj.dparent "V0110")
1645
+ end;
1646
+ Noval
1647
+ end
1648
+ end
1649
+ end else (ignore (delprop inj.parent inj.key); Noval)
1650
+
1651
+ and veq a b =
1652
+ match a, b with
1653
+ | Noval, Noval -> true
1654
+ | Null, Null -> true
1655
+ | Bool x, Bool y -> x = y
1656
+ | Num x, Num y -> x = y
1657
+ | Str x, Str y -> x = y
1658
+ | Sentinel x, Sentinel y -> x = y
1659
+ | List x, List y -> List.length !x = List.length !y && List.for_all2 veq !x !y
1660
+ | Map x, Map y ->
1661
+ omap_len x = omap_len y &&
1662
+ List.for_all (fun (k, v) -> match omap_get y k with Some w -> veq v w | None -> false) x.entries
1663
+ | _ -> false
1664
+
1665
+ and validation pval key parent inj =
1666
+ if not (is_skip pval) then begin
1667
+ let exact = getprop ~alt:(Bool false) inj.meta (Str s_bexact) in
1668
+ let cval = getprop inj.dparent key in
1669
+ let exact_b = (match exact with Bool true -> true | _ -> false) in
1670
+ if not ((not exact_b) && is_noval cval) then begin
1671
+ let ptype = typify pval in
1672
+ if not ((t_string land ptype) > 0 && String.contains (js_string pval) '$') then begin
1673
+ let ctype = typify cval in
1674
+ if ptype <> ctype && not (is_noval pval) then
1675
+ push_err inj (invalid_type_msg inj.path (typename ptype) ctype cval "V0010")
1676
+ else if ismap cval then begin
1677
+ if not (ismap pval) then push_err inj (invalid_type_msg inj.path (typename ptype) ctype cval "V0020")
1678
+ else begin
1679
+ let ckeys = keysof cval in
1680
+ let pkeys = keysof pval in
1681
+ if List.length pkeys > 0 && not (getprop pval (Str s_bopen) = Bool true) then begin
1682
+ let badkeys = List.filter (fun ck -> is_noval (lookup_ pval (Str ck))) ckeys in
1683
+ if List.length badkeys > 0 then
1684
+ push_err inj ("Unexpected keys at field " ^ pathify ~startin:(Num 1.0) inj.path ^ s_viz ^ String.concat ", " badkeys)
1685
+ end else begin
1686
+ ignore (merge (lst [pval; cval]));
1687
+ if isnode pval then ignore (delprop pval (Str s_bopen))
1688
+ end
1689
+ end
1690
+ end else if islist cval then
1691
+ (if not (islist pval) then push_err inj (invalid_type_msg inj.path (typename ptype) ctype cval "V0030"))
1692
+ else if exact_b then
1693
+ (if not (veq cval pval) then
1694
+ let pathmsg = if size inj.path > 1 then "at field " ^ pathify ~startin:(Num 1.0) inj.path ^ ": " else "" in
1695
+ push_err inj ("Value " ^ pathmsg ^ js_string cval ^ " should equal " ^ js_string pval ^ "."))
1696
+ else ignore (setprop parent key cval)
1697
+ end
1698
+ end
1699
+ end
1700
+
1701
+ and validate_handler inj v refstr store =
1702
+ match meta_path_match refstr with
1703
+ | Some (_, g2, _) ->
1704
+ (if g2 = "=" then ignore (inj_setval inj (lst [Str s_bexact; v])) else ignore (inj_setval inj v));
1705
+ inj.keyi <- -1; skip
1706
+ | None -> inject_handler inj v refstr store
1707
+
1708
+ and validate ?(inj = INone) data spec =
1709
+ let extra = (match inj with IDef d -> d.d_extra | _ -> Noval) in
1710
+ let collect = (match inj with IDef d -> not (is_noval d.d_errs) | _ -> false) in
1711
+ let errs = (match inj with IDef d when collect -> d.d_errs | _ -> empty_list ()) in
1712
+ let base = empty_map () in
1713
+ let put k v = ignore (setprop base (Str k) v) in
1714
+ List.iter (fun k -> put k Null) ["$DELETE"; "$COPY"; "$KEY"; "$META"; "$MERGE"; "$EACH"; "$PACK"];
1715
+ put "$STRING" (Func validate_string);
1716
+ List.iter (fun k -> put k (Func validate_type))
1717
+ ["$NUMBER"; "$INTEGER"; "$DECIMAL"; "$BOOLEAN"; "$NULL"; "$NIL"; "$MAP"; "$LIST"; "$FUNCTION"; "$INSTANCE"];
1718
+ put "$ANY" (Func validate_any);
1719
+ put "$CHILD" (Func validate_child);
1720
+ put "$ONE" (Func validate_one);
1721
+ put "$EXACT" (Func validate_exact);
1722
+ let store = merge ~maxdepth:(Num 1.0) (lst [base; (if is_noval extra then empty_map () else extra); Map { entries = [(s_derrs, errs)] }]) in
1723
+ let meta = (match inj with IDef d when not (is_noval d.d_meta) -> d.d_meta | _ -> empty_map ()) in
1724
+ ignore (setprop meta (Str s_bexact) (getprop ~alt:(Bool false) meta (Str s_bexact)));
1725
+ let idef = { (default_injdef ()) with d_meta = meta; d_extra = store; d_modify = Some validation; d_handler = Some validate_handler; d_errs = errs } in
1726
+ let out = transform ~inj:(IDef idef) data spec in
1727
+ if size errs > 0 && not collect then raise (Struct_error (join ~sep:(Str " | ") errs));
1728
+ out
1729
+
1730
+ (* ----- select ----- *)
1731
+
1732
+ and select_and inj _v _ref store =
1733
+ (if inj.mode = m_keypre then begin
1734
+ let terms = getprop inj.parent inj.key in
1735
+ let ppath = slice ~start:(Num (-1.0)) inj.path in
1736
+ let point = getpath ~inj:INone store ppath in
1737
+ let vstore = merge ~maxdepth:(Num 1.0) (lst [empty_map (); store]) in
1738
+ ignore (setprop vstore (Str s_dtop) point);
1739
+ List.iter (fun (_, term) ->
1740
+ let terrs = empty_list () in
1741
+ let idef = { (default_injdef ()) with d_extra = vstore; d_errs = terrs; d_meta = inj.meta } in
1742
+ ignore (validate ~inj:(IDef idef) point term);
1743
+ if size terrs <> 0 then push_err inj ("AND:" ^ pathify ppath ^ "\xe2\xa8\xaf" ^ stringify point ^ " fail:" ^ stringify terms)) (items_pairs terms);
1744
+ let gkey = getelem inj.path (Num (-2.0)) in
1745
+ let gp = getelem inj.nodes (Num (-2.0)) in
1746
+ ignore (setprop gp gkey point)
1747
+ end); Noval
1748
+
1749
+ and select_or inj _v _ref store =
1750
+ (if inj.mode = m_keypre then begin
1751
+ let terms = getprop inj.parent inj.key in
1752
+ let ppath = slice ~start:(Num (-1.0)) inj.path in
1753
+ let point = getpath ~inj:INone store ppath in
1754
+ let vstore = merge ~maxdepth:(Num 1.0) (lst [empty_map (); store]) in
1755
+ ignore (setprop vstore (Str s_dtop) point);
1756
+ let done_ = ref false in
1757
+ List.iter (fun (_, term) ->
1758
+ if not !done_ then begin
1759
+ let terrs = empty_list () in
1760
+ let idef = { (default_injdef ()) with d_extra = vstore; d_errs = terrs; d_meta = inj.meta } in
1761
+ ignore (validate ~inj:(IDef idef) point term);
1762
+ if size terrs = 0 then begin
1763
+ let gkey = getelem inj.path (Num (-2.0)) in
1764
+ let gp = getelem inj.nodes (Num (-2.0)) in
1765
+ ignore (setprop gp gkey point); done_ := true
1766
+ end
1767
+ end) (items_pairs terms);
1768
+ if not !done_ then push_err inj ("OR:" ^ pathify ppath ^ "\xe2\xa8\xaf" ^ stringify point ^ " fail:" ^ stringify terms)
1769
+ end); Noval
1770
+
1771
+ and select_not inj _v _ref store =
1772
+ (if inj.mode = m_keypre then begin
1773
+ let term = getprop inj.parent inj.key in
1774
+ let ppath = slice ~start:(Num (-1.0)) inj.path in
1775
+ let point = getpath ~inj:INone store ppath in
1776
+ let vstore = merge ~maxdepth:(Num 1.0) (lst [empty_map (); store]) in
1777
+ ignore (setprop vstore (Str s_dtop) point);
1778
+ let terrs = empty_list () in
1779
+ let idef = { (default_injdef ()) with d_extra = vstore; d_errs = terrs; d_meta = inj.meta } in
1780
+ ignore (validate ~inj:(IDef idef) point term);
1781
+ if size terrs = 0 then push_err inj ("NOT:" ^ pathify ppath ^ "\xe2\xa8\xaf" ^ stringify point ^ " fail:" ^ stringify term);
1782
+ let gkey = getelem inj.path (Num (-2.0)) in
1783
+ let gp = getelem inj.nodes (Num (-2.0)) in
1784
+ ignore (setprop gp gkey point)
1785
+ end); Noval
1786
+
1787
+ and num_cmp a b op =
1788
+ match a, b with
1789
+ | Num x, Num y -> (match op with `Gt -> x > y | `Lt -> x < y | `Gte -> x >= y | `Lte -> x <= y)
1790
+ | _ -> false
1791
+
1792
+ and select_cmp inj _v refstr store =
1793
+ (if inj.mode = m_keypre then begin
1794
+ let term = getprop inj.parent inj.key in
1795
+ let gkey = getelem inj.path (Num (-2.0)) in
1796
+ let ppath = slice ~start:(Num (-1.0)) inj.path in
1797
+ let point = getpath ~inj:INone store ppath in
1798
+ let pass =
1799
+ if refstr = "$GT" then num_cmp point term `Gt
1800
+ else if refstr = "$LT" then num_cmp point term `Lt
1801
+ else if refstr = "$GTE" then num_cmp point term `Gte
1802
+ else if refstr = "$LTE" then num_cmp point term `Lte
1803
+ else if refstr = "$LIKE" then (match term with Str t -> Vregex.test_str t (stringify point) | _ -> false)
1804
+ else false in
1805
+ if pass then (let gp = getelem inj.nodes (Num (-2.0)) in ignore (setprop gp gkey point))
1806
+ else push_err inj ("CMP: " ^ pathify ppath ^ "\xe2\xa8\xaf" ^ stringify point ^ " fail:" ^ refstr ^ " " ^ stringify term)
1807
+ end); Noval
1808
+
1809
+ and select children query =
1810
+ if not (isnode children) then empty_list ()
1811
+ else begin
1812
+ let children =
1813
+ if ismap children then
1814
+ lst (List.map (fun (k, n) -> ignore (setprop n (Str s_dkey) (Str k)); n) (items_pairs children))
1815
+ else
1816
+ lst (List.mapi (fun i n -> if ismap n then (ignore (setprop n (Str s_dkey) (vint i)); n) else n)
1817
+ (match children with List r -> !r | _ -> [])) in
1818
+ let results = empty_list () in
1819
+ let extra = empty_map () in
1820
+ List.iter (fun (k, f) -> ignore (setprop extra (Str k) (Func f)))
1821
+ [("$AND", select_and); ("$OR", select_or); ("$NOT", select_not);
1822
+ ("$GT", select_cmp); ("$LT", select_cmp); ("$GTE", select_cmp); ("$LTE", select_cmp); ("$LIKE", select_cmp)];
1823
+ let q = clone query in
1824
+ ignore (walk ~before:(fun _k v _p _path -> (if ismap v then ignore (setprop v (Str s_bopen) (getprop ~alt:(Bool true) v (Str s_bopen)))); v) q);
1825
+ List.iter (fun child ->
1826
+ let errs = empty_list () in
1827
+ let idef = { (default_injdef ()) with d_errs = errs; d_meta = (let m = empty_map () in ignore (setprop m (Str s_bexact) (Bool true)); m); d_extra = extra } in
1828
+ ignore (validate ~inj:(IDef idef) child (clone q));
1829
+ if size errs = 0 then ignore (setprop results (Num (float_of_int (size results))) child))
1830
+ (match children with List r -> !r | _ -> []);
1831
+ results
1832
+ end
1833
+
1834
+ (* ----- builders ----- *)
1835
+
1836
+ and jm kv =
1837
+ let m = empty_map () in
1838
+ let arr = Array.of_list kv in
1839
+ let n = Array.length arr in
1840
+ let i = ref 0 in
1841
+ while !i < n do
1842
+ let k0 = arr.(!i) in
1843
+ let k = (match k0 with Null -> "null" | Str s -> s | _ -> stringify k0) in
1844
+ omap_set (match m with Map mm -> mm | _ -> assert false) k (if !i + 1 < n then arr.(!i + 1) else Null);
1845
+ i := !i + 2
1846
+ done; m
1847
+
1848
+ and jt v = lst v
1849
+
1850
+ (* ---------------------------------------------------------------------------
1851
+ * Finish: set the dummy inj for getelem's function-alt path
1852
+ * ------------------------------------------------------------------------- *)
1853
+
1854
+ let () =
1855
+ let parent = Map { entries = [(s_dtop, Noval)] } in
1856
+ dummy_inj_ref := Some (new_inj Noval parent)
1857
+
1858
+ let tn = typename