@voxgig/sdkgen-langpack 0.0.1

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 (300) hide show
  1. package/.sdk/model/target/dart.aon +63 -0
  2. package/.sdk/model/target/haskell.aon +72 -0
  3. package/.sdk/model/target/lean.aon +91 -0
  4. package/.sdk/src/cmp/dart/Config_dart.ts +248 -0
  5. package/.sdk/src/cmp/dart/EntityBase_dart.ts +34 -0
  6. package/.sdk/src/cmp/dart/EntityOperation_dart.ts +43 -0
  7. package/.sdk/src/cmp/dart/EntityTypes_dart.ts +207 -0
  8. package/.sdk/src/cmp/dart/Entity_dart.ts +87 -0
  9. package/.sdk/src/cmp/dart/Gitignore_dart.ts +34 -0
  10. package/.sdk/src/cmp/dart/MainEntity_dart.ts +33 -0
  11. package/.sdk/src/cmp/dart/Main_dart.ts +178 -0
  12. package/.sdk/src/cmp/dart/Package_dart.ts +82 -0
  13. package/.sdk/src/cmp/dart/ReadmeEntity_dart.ts +177 -0
  14. package/.sdk/src/cmp/dart/ReadmeExamplesTest_dart.ts +238 -0
  15. package/.sdk/src/cmp/dart/ReadmeExplanation_dart.ts +53 -0
  16. package/.sdk/src/cmp/dart/ReadmeHowto_dart.ts +152 -0
  17. package/.sdk/src/cmp/dart/ReadmeInstall_dart.ts +59 -0
  18. package/.sdk/src/cmp/dart/ReadmeIntro_dart.ts +65 -0
  19. package/.sdk/src/cmp/dart/ReadmeModel_dart.ts +151 -0
  20. package/.sdk/src/cmp/dart/ReadmeOptions_dart.ts +63 -0
  21. package/.sdk/src/cmp/dart/ReadmeQuick_dart.ts +225 -0
  22. package/.sdk/src/cmp/dart/ReadmeRef_dart.ts +397 -0
  23. package/.sdk/src/cmp/dart/ReadmeTopHowto_dart.ts +24 -0
  24. package/.sdk/src/cmp/dart/ReadmeTopQuick_dart.ts +106 -0
  25. package/.sdk/src/cmp/dart/ReadmeTopTest_dart.ts +78 -0
  26. package/.sdk/src/cmp/dart/SdkError_dart.ts +42 -0
  27. package/.sdk/src/cmp/dart/TestDirect_dart.ts +516 -0
  28. package/.sdk/src/cmp/dart/TestEntity_dart.ts +628 -0
  29. package/.sdk/src/cmp/dart/Test_dart.ts +138 -0
  30. package/.sdk/src/cmp/dart/fragment/Config.data.fragment.dart +98 -0
  31. package/.sdk/src/cmp/dart/fragment/Config.fragment.dart +70 -0
  32. package/.sdk/src/cmp/dart/fragment/Direct.test.fragment.dart +25 -0
  33. package/.sdk/src/cmp/dart/fragment/Entity.fragment.dart +29 -0
  34. package/.sdk/src/cmp/dart/fragment/Entity.test.fragment.dart +28 -0
  35. package/.sdk/src/cmp/dart/fragment/EntityBase.fragment.dart +302 -0
  36. package/.sdk/src/cmp/dart/fragment/EntityCreateOp.fragment.dart +98 -0
  37. package/.sdk/src/cmp/dart/fragment/EntityListOp.fragment.dart +90 -0
  38. package/.sdk/src/cmp/dart/fragment/EntityLoadOp.fragment.dart +102 -0
  39. package/.sdk/src/cmp/dart/fragment/EntityRemoveOp.fragment.dart +108 -0
  40. package/.sdk/src/cmp/dart/fragment/EntityUpdateOp.fragment.dart +102 -0
  41. package/.sdk/src/cmp/dart/fragment/Main.fragment.dart +339 -0
  42. package/.sdk/src/cmp/dart/fragment/SdkError.fragment.dart +26 -0
  43. package/.sdk/src/cmp/dart/tsconfig.json +15 -0
  44. package/.sdk/src/cmp/dart/utility_dart.ts +155 -0
  45. package/.sdk/src/cmp/haskell/Config_haskell.ts +98 -0
  46. package/.sdk/src/cmp/haskell/Entity_haskell.ts +13 -0
  47. package/.sdk/src/cmp/haskell/Gitignore_haskell.ts +27 -0
  48. package/.sdk/src/cmp/haskell/Main_haskell.ts +123 -0
  49. package/.sdk/src/cmp/haskell/Package_haskell.ts +60 -0
  50. package/.sdk/src/cmp/haskell/ReadmeEntity_haskell.ts +186 -0
  51. package/.sdk/src/cmp/haskell/ReadmeExamplesTest_haskell.ts +135 -0
  52. package/.sdk/src/cmp/haskell/ReadmeExplanation_haskell.ts +48 -0
  53. package/.sdk/src/cmp/haskell/ReadmeHowto_haskell.ts +168 -0
  54. package/.sdk/src/cmp/haskell/ReadmeInstall_haskell.ts +51 -0
  55. package/.sdk/src/cmp/haskell/ReadmeIntro_haskell.ts +67 -0
  56. package/.sdk/src/cmp/haskell/ReadmeModel_haskell.ts +162 -0
  57. package/.sdk/src/cmp/haskell/ReadmeOptions_haskell.ts +74 -0
  58. package/.sdk/src/cmp/haskell/ReadmeQuick_haskell.ts +241 -0
  59. package/.sdk/src/cmp/haskell/ReadmeRef_haskell.ts +408 -0
  60. package/.sdk/src/cmp/haskell/ReadmeTopHowto_haskell.ts +31 -0
  61. package/.sdk/src/cmp/haskell/ReadmeTopQuick_haskell.ts +104 -0
  62. package/.sdk/src/cmp/haskell/ReadmeTopTest_haskell.ts +80 -0
  63. package/.sdk/src/cmp/haskell/Test_haskell.ts +297 -0
  64. package/.sdk/src/cmp/haskell/tsconfig.json +15 -0
  65. package/.sdk/src/cmp/haskell/utility_haskell.ts +166 -0
  66. package/.sdk/src/cmp/lean/Config_lean.ts +93 -0
  67. package/.sdk/src/cmp/lean/Entity_lean.ts +9 -0
  68. package/.sdk/src/cmp/lean/Gitignore_lean.ts +18 -0
  69. package/.sdk/src/cmp/lean/Main_lean.ts +120 -0
  70. package/.sdk/src/cmp/lean/Package_lean.ts +93 -0
  71. package/.sdk/src/cmp/lean/ReadmeEntity_lean.ts +29 -0
  72. package/.sdk/src/cmp/lean/ReadmeExplanation_lean.ts +19 -0
  73. package/.sdk/src/cmp/lean/ReadmeHowto_lean.ts +25 -0
  74. package/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +39 -0
  75. package/.sdk/src/cmp/lean/ReadmeIntro_lean.ts +25 -0
  76. package/.sdk/src/cmp/lean/ReadmeModel_lean.ts +24 -0
  77. package/.sdk/src/cmp/lean/ReadmeOptions_lean.ts +22 -0
  78. package/.sdk/src/cmp/lean/ReadmeQuick_lean.ts +50 -0
  79. package/.sdk/src/cmp/lean/ReadmeRef_lean.ts +40 -0
  80. package/.sdk/src/cmp/lean/ReadmeTopHowto_lean.ts +16 -0
  81. package/.sdk/src/cmp/lean/ReadmeTopQuick_lean.ts +23 -0
  82. package/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +19 -0
  83. package/.sdk/src/cmp/lean/Test_lean.ts +261 -0
  84. package/.sdk/src/cmp/lean/utility_lean.ts +129 -0
  85. package/.sdk/tm/dart/LICENSE +22 -0
  86. package/.sdk/tm/dart/Makefile +50 -0
  87. package/.sdk/tm/dart/lib/Context.dart +150 -0
  88. package/.sdk/tm/dart/lib/Control.dart +15 -0
  89. package/.sdk/tm/dart/lib/Operation.dart +31 -0
  90. package/.sdk/tm/dart/lib/Point.dart +51 -0
  91. package/.sdk/tm/dart/lib/Response.dart +32 -0
  92. package/.sdk/tm/dart/lib/Result.dart +39 -0
  93. package/.sdk/tm/dart/lib/Spec.dart +49 -0
  94. package/.sdk/tm/dart/lib/feature/audit/AuditFeature.dart +103 -0
  95. package/.sdk/tm/dart/lib/feature/base/BaseFeature.dart +76 -0
  96. package/.sdk/tm/dart/lib/feature/cache/CacheFeature.dart +152 -0
  97. package/.sdk/tm/dart/lib/feature/clienttrack/ClienttrackFeature.dart +104 -0
  98. package/.sdk/tm/dart/lib/feature/cost/CostFeature.dart +446 -0
  99. package/.sdk/tm/dart/lib/feature/debug/DebugFeature.dart +153 -0
  100. package/.sdk/tm/dart/lib/feature/idempotency/IdempotencyFeature.dart +92 -0
  101. package/.sdk/tm/dart/lib/feature/log/LogFeature.dart +85 -0
  102. package/.sdk/tm/dart/lib/feature/metrics/MetricsFeature.dart +103 -0
  103. package/.sdk/tm/dart/lib/feature/netsim/NetsimFeature.dart +186 -0
  104. package/.sdk/tm/dart/lib/feature/paging/PagingFeature.dart +240 -0
  105. package/.sdk/tm/dart/lib/feature/proxy/ProxyFeature.dart +118 -0
  106. package/.sdk/tm/dart/lib/feature/ratelimit/RatelimitFeature.dart +103 -0
  107. package/.sdk/tm/dart/lib/feature/rbac/RbacFeature.dart +121 -0
  108. package/.sdk/tm/dart/lib/feature/retry/RetryFeature.dart +155 -0
  109. package/.sdk/tm/dart/lib/feature/secrets/SecretsFeature.dart +649 -0
  110. package/.sdk/tm/dart/lib/feature/secrets/plugin/capability.dart +105 -0
  111. package/.sdk/tm/dart/lib/feature/secrets/plugin/catalog.dart +46 -0
  112. package/.sdk/tm/dart/lib/feature/secrets/plugin/config.dart +297 -0
  113. package/.sdk/tm/dart/lib/feature/secrets/plugin/depend.dart +198 -0
  114. package/.sdk/tm/dart/lib/feature/secrets/plugin/env.dart +144 -0
  115. package/.sdk/tm/dart/lib/feature/secrets/plugin/export.dart +58 -0
  116. package/.sdk/tm/dart/lib/feature/secrets/plugin/graph.dart +160 -0
  117. package/.sdk/tm/dart/lib/feature/secrets/plugin/host.dart +1067 -0
  118. package/.sdk/tm/dart/lib/feature/secrets/plugin/order.dart +172 -0
  119. package/.sdk/tm/dart/lib/feature/secrets/plugin/plugin.dart +23 -0
  120. package/.sdk/tm/dart/lib/feature/secrets/plugin/point.dart +117 -0
  121. package/.sdk/tm/dart/lib/feature/secrets/plugin/ref.dart +105 -0
  122. package/.sdk/tm/dart/lib/feature/secrets/plugin/resolve.dart +58 -0
  123. package/.sdk/tm/dart/lib/feature/secrets/plugin/types.dart +201 -0
  124. package/.sdk/tm/dart/lib/feature/secrets/plugin/version.dart +116 -0
  125. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/aws.dart +285 -0
  126. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/azuresecrets.dart +178 -0
  127. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/boru.dart +145 -0
  128. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/crypto.dart +194 -0
  129. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/doppler.dart +101 -0
  130. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/gcpsecrets.dart +143 -0
  131. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/hashicorp.dart +190 -0
  132. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/httpjson.dart +363 -0
  133. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/infisical.dart +149 -0
  134. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/onepassword.dart +146 -0
  135. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/secretspec.dart +116 -0
  136. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/sigv4.dart +237 -0
  137. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/addr.dart +138 -0
  138. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/json.dart +276 -0
  139. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/provider.dart +31 -0
  140. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/providers.dart +243 -0
  141. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/sekreto.dart +730 -0
  142. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/spec.dart +200 -0
  143. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/support.dart +217 -0
  144. package/.sdk/tm/dart/lib/feature/streaming/StreamingFeature.dart +97 -0
  145. package/.sdk/tm/dart/lib/feature/telemetry/TelemetryFeature.dart +136 -0
  146. package/.sdk/tm/dart/lib/feature/test/TestFeature.dart +328 -0
  147. package/.sdk/tm/dart/lib/feature/timeout/TimeoutFeature.dart +104 -0
  148. package/.sdk/tm/dart/lib/utility/CleanUtility.dart +12 -0
  149. package/.sdk/tm/dart/lib/utility/DoneUtility.dart +18 -0
  150. package/.sdk/tm/dart/lib/utility/ErrUtility.dart +46 -0
  151. package/.sdk/tm/dart/lib/utility/FeatureAddUtility.dart +35 -0
  152. package/.sdk/tm/dart/lib/utility/FeatureHookUtility.dart +20 -0
  153. package/.sdk/tm/dart/lib/utility/FeatureInitUtility.dart +9 -0
  154. package/.sdk/tm/dart/lib/utility/FetcherUtility.dart +104 -0
  155. package/.sdk/tm/dart/lib/utility/GraphqlUtility.dart +162 -0
  156. package/.sdk/tm/dart/lib/utility/MakeContextUtility.dart +6 -0
  157. package/.sdk/tm/dart/lib/utility/MakeErrorUtility.dart +71 -0
  158. package/.sdk/tm/dart/lib/utility/MakeFetchDefUtility.dart +42 -0
  159. package/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +233 -0
  160. package/.sdk/tm/dart/lib/utility/MakePointUtility.dart +130 -0
  161. package/.sdk/tm/dart/lib/utility/MakeRequestUtility.dart +66 -0
  162. package/.sdk/tm/dart/lib/utility/MakeResponseUtility.dart +59 -0
  163. package/.sdk/tm/dart/lib/utility/MakeResultUtility.dart +49 -0
  164. package/.sdk/tm/dart/lib/utility/MakeSpecUtility.dart +77 -0
  165. package/.sdk/tm/dart/lib/utility/MakeUrlUtility.dart +51 -0
  166. package/.sdk/tm/dart/lib/utility/ParamUtility.dart +56 -0
  167. package/.sdk/tm/dart/lib/utility/PrepareAuthUtility.dart +46 -0
  168. package/.sdk/tm/dart/lib/utility/PrepareBodyUtility.dart +19 -0
  169. package/.sdk/tm/dart/lib/utility/PrepareHeadersUtility.dart +11 -0
  170. package/.sdk/tm/dart/lib/utility/PrepareMethodUtility.dart +30 -0
  171. package/.sdk/tm/dart/lib/utility/PrepareParamsUtility.dart +23 -0
  172. package/.sdk/tm/dart/lib/utility/PreparePathUtility.dart +9 -0
  173. package/.sdk/tm/dart/lib/utility/PrepareQueryUtility.dart +18 -0
  174. package/.sdk/tm/dart/lib/utility/ResultBasicUtility.dart +29 -0
  175. package/.sdk/tm/dart/lib/utility/ResultBodyUtility.dart +15 -0
  176. package/.sdk/tm/dart/lib/utility/ResultHeadersUtility.dart +18 -0
  177. package/.sdk/tm/dart/lib/utility/StructUtility.dart +127 -0
  178. package/.sdk/tm/dart/lib/utility/TransformRequestUtility.dart +28 -0
  179. package/.sdk/tm/dart/lib/utility/TransformResponseUtility.dart +44 -0
  180. package/.sdk/tm/dart/lib/utility/Utility.dart +239 -0
  181. package/.sdk/tm/dart/lib/utility/voxgig_struct.dart +2462 -0
  182. package/.sdk/tm/dart/src/feature/README.md +3 -0
  183. package/.sdk/tm/dart/src/feature/audit/.gitkeep +0 -0
  184. package/.sdk/tm/dart/src/feature/base/.gitkeep +0 -0
  185. package/.sdk/tm/dart/src/feature/cache/.gitkeep +0 -0
  186. package/.sdk/tm/dart/src/feature/clienttrack/.gitkeep +0 -0
  187. package/.sdk/tm/dart/src/feature/cost/.gitkeep +0 -0
  188. package/.sdk/tm/dart/src/feature/debug/.gitkeep +0 -0
  189. package/.sdk/tm/dart/src/feature/idempotency/.gitkeep +0 -0
  190. package/.sdk/tm/dart/src/feature/log/.gitkeep +0 -0
  191. package/.sdk/tm/dart/src/feature/metrics/.gitkeep +0 -0
  192. package/.sdk/tm/dart/src/feature/netsim/.gitkeep +0 -0
  193. package/.sdk/tm/dart/src/feature/paging/.gitkeep +0 -0
  194. package/.sdk/tm/dart/src/feature/proxy/.gitkeep +0 -0
  195. package/.sdk/tm/dart/src/feature/ratelimit/.gitkeep +0 -0
  196. package/.sdk/tm/dart/src/feature/rbac/.gitkeep +0 -0
  197. package/.sdk/tm/dart/src/feature/retry/.gitkeep +0 -0
  198. package/.sdk/tm/dart/src/feature/secrets/.gitkeep +0 -0
  199. package/.sdk/tm/dart/src/feature/streaming/.gitkeep +0 -0
  200. package/.sdk/tm/dart/src/feature/telemetry/.gitkeep +0 -0
  201. package/.sdk/tm/dart/src/feature/test/.gitkeep +0 -0
  202. package/.sdk/tm/dart/src/feature/timeout/.gitkeep +0 -0
  203. package/.sdk/tm/dart/test/custom_test.dart +65 -0
  204. package/.sdk/tm/dart/test/exists_test.dart +12 -0
  205. package/.sdk/tm/dart/test/feature/harness.dart +347 -0
  206. package/.sdk/tm/dart/test/feature/secrets/secrets_test.dart +1107 -0
  207. package/.sdk/tm/dart/test/feature_test.dart +1193 -0
  208. package/.sdk/tm/dart/test/harness.dart +153 -0
  209. package/.sdk/tm/dart/test/netsim_test.dart +48 -0
  210. package/.sdk/tm/dart/test/omni.dart +520 -0
  211. package/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  212. package/.sdk/tm/dart/test/pipeline_test.dart +608 -0
  213. package/.sdk/tm/dart/test/primary_test.dart +476 -0
  214. package/.sdk/tm/dart/test/sdk-test-control.json +19 -0
  215. package/.sdk/tm/dart/test/struct_test.dart +468 -0
  216. package/.sdk/tm/dart/test/utility.dart +198 -0
  217. package/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  218. package/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  219. package/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  220. package/.sdk/tm/haskell/LICENSE +21 -0
  221. package/.sdk/tm/haskell/Makefile +22 -0
  222. package/.sdk/tm/haskell/VERSION +1 -0
  223. package/.sdk/tm/haskell/src/SdkFeatures.hs +1440 -0
  224. package/.sdk/tm/haskell/src/SdkHelpers.hs +337 -0
  225. package/.sdk/tm/haskell/src/SdkJson.hs +111 -0
  226. package/.sdk/tm/haskell/src/SdkRuntime.hs +1279 -0
  227. package/.sdk/tm/haskell/src/SdkTypes.hs +195 -0
  228. package/.sdk/tm/haskell/src/VoxgigStruct.hs +2299 -0
  229. package/.sdk/tm/haskell/src/Vregex.hs +237 -0
  230. package/.sdk/tm/haskell/src/feature/README.md +5 -0
  231. package/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
  232. package/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
  233. package/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
  234. package/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
  235. package/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
  236. package/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
  237. package/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
  238. package/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
  239. package/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
  240. package/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
  241. package/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
  242. package/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
  243. package/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
  244. package/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
  245. package/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
  246. package/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
  247. package/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
  248. package/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
  249. package/.sdk/tm/haskell/test/Harness.hs +281 -0
  250. package/.sdk/tm/haskell/test/OmniResolver.hs +252 -0
  251. package/.sdk/tm/haskell/test/Runner.hs +49 -0
  252. package/.sdk/tm/haskell/test/StructCorpus.hs +449 -0
  253. package/.sdk/tm/haskell/test/TCustomUtility.hs +38 -0
  254. package/.sdk/tm/haskell/test/TFeature.hs +794 -0
  255. package/.sdk/tm/haskell/test/TNetsim.hs +50 -0
  256. package/.sdk/tm/haskell/test/TPipeline.hs +334 -0
  257. package/.sdk/tm/haskell/test/TPrimaryCorpus.hs +263 -0
  258. package/.sdk/tm/haskell/test/TPrimaryUtility.hs +386 -0
  259. package/.sdk/tm/haskell/test/Testutil.hs +59 -0
  260. package/.sdk/tm/haskell/test/vendor/omni/Omni.hs +1147 -0
  261. package/.sdk/tm/lean/LICENSE +21 -0
  262. package/.sdk/tm/lean/Makefile +32 -0
  263. package/.sdk/tm/lean/VERSION +1 -0
  264. package/.sdk/tm/lean/src/SdkFeature.lean +171 -0
  265. package/.sdk/tm/lean/src/SdkFeatures.lean +787 -0
  266. package/.sdk/tm/lean/src/SdkJson.lean +134 -0
  267. package/.sdk/tm/lean/src/SdkRuntime.lean +374 -0
  268. package/.sdk/tm/lean/src/SdkUtility.lean +809 -0
  269. package/.sdk/tm/lean/src/VoxgigStruct.lean +2880 -0
  270. package/.sdk/tm/lean/src/Vregex.lean +412 -0
  271. package/.sdk/tm/lean/src/feature/README.md +5 -0
  272. package/.sdk/tm/lean/src/feature/audit/.gitkeep +0 -0
  273. package/.sdk/tm/lean/src/feature/base/.gitkeep +0 -0
  274. package/.sdk/tm/lean/src/feature/cache/.gitkeep +0 -0
  275. package/.sdk/tm/lean/src/feature/clienttrack/.gitkeep +0 -0
  276. package/.sdk/tm/lean/src/feature/cost/.gitkeep +0 -0
  277. package/.sdk/tm/lean/src/feature/debug/.gitkeep +0 -0
  278. package/.sdk/tm/lean/src/feature/idempotency/.gitkeep +0 -0
  279. package/.sdk/tm/lean/src/feature/log/.gitkeep +0 -0
  280. package/.sdk/tm/lean/src/feature/metrics/.gitkeep +0 -0
  281. package/.sdk/tm/lean/src/feature/netsim/.gitkeep +0 -0
  282. package/.sdk/tm/lean/src/feature/paging/.gitkeep +0 -0
  283. package/.sdk/tm/lean/src/feature/proxy/.gitkeep +0 -0
  284. package/.sdk/tm/lean/src/feature/ratelimit/.gitkeep +0 -0
  285. package/.sdk/tm/lean/src/feature/rbac/.gitkeep +0 -0
  286. package/.sdk/tm/lean/src/feature/retry/.gitkeep +0 -0
  287. package/.sdk/tm/lean/src/feature/streaming/.gitkeep +0 -0
  288. package/.sdk/tm/lean/src/feature/telemetry/.gitkeep +0 -0
  289. package/.sdk/tm/lean/src/feature/test/.gitkeep +0 -0
  290. package/.sdk/tm/lean/src/feature/timeout/.gitkeep +0 -0
  291. package/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  292. package/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  293. package/.sdk/tm/lean/test/StructCorpus.lean +368 -0
  294. package/.sdk/tm/lean/test/TFeature.lean +281 -0
  295. package/.sdk/tm/lean/test/TPrimaryUtility.lean +227 -0
  296. package/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  297. package/LICENSE +21 -0
  298. package/README.md +104 -0
  299. package/package.json +78 -0
  300. package/sdkgen-package.json +22 -0
@@ -0,0 +1,66 @@
1
+ import 'dart:async';
2
+
3
+ import '../Response.dart';
4
+ import '../Result.dart';
5
+
6
+ import 'ErrUtility.dart';
7
+
8
+ Future<dynamic> makeRequest(dynamic ctx) async {
9
+ // PreRequest feature hook has already provided a result.
10
+ if (null != ctx.out['request']) {
11
+ return ctx.out['request'];
12
+ }
13
+
14
+ final spec = ctx.spec;
15
+ final utility = ctx.utility;
16
+ final fetcher = utility.fetcher;
17
+ final makeFetchDef = utility.makeFetchDef;
18
+
19
+ var response = Response({});
20
+
21
+ final result = Result({});
22
+
23
+ ctx.result = result;
24
+
25
+ if (null == spec) {
26
+ return ctx.error(
27
+ 'request_no_spec', 'Expected context spec property to be defined.');
28
+ }
29
+
30
+ try {
31
+ final fetchdef = makeFetchDef(ctx);
32
+ if (iserr(fetchdef)) {
33
+ throw fetchdef;
34
+ }
35
+
36
+ if (null != ctx.ctrl['explain']) {
37
+ ctx.ctrl['explain']['fetchdef'] = fetchdef;
38
+ }
39
+
40
+ spec.step = 'prerequest';
41
+
42
+ // `dynamic` (not the inferred non-nullable type): the fetcher is injected
43
+ // and may return null at runtime, so the null guard below is real — an
44
+ // inferred non-null type would make it an `unnecessary_null_comparison`.
45
+ final dynamic fetched =
46
+ await Future.value(fetcher(ctx, fetchdef['url'], fetchdef));
47
+
48
+ if (null == fetched) {
49
+ response = Response({
50
+ 'err': ctx.error('request_no_response', 'response: undefined')
51
+ });
52
+ } else if (iserr(fetched)) {
53
+ response = Response({'err': fetched});
54
+ } else {
55
+ response = Response(fetched);
56
+ }
57
+ } catch (err) {
58
+ response.err = err;
59
+ }
60
+
61
+ spec.step = 'postrequest';
62
+
63
+ ctx.response = response;
64
+
65
+ return response;
66
+ }
@@ -0,0 +1,59 @@
1
+ import 'dart:async';
2
+
3
+ Future<dynamic> makeResponse(dynamic ctx) async {
4
+ // PreResponse feature hook has already provided a result.
5
+ if (null != ctx.out['response']) {
6
+ return ctx.out['response'];
7
+ }
8
+
9
+ final utility = ctx.utility;
10
+ final resultBasic = utility.resultBasic;
11
+ final resultHeaders = utility.resultHeaders;
12
+ final resultBody = utility.resultBody;
13
+ final transformResponse = utility.transformResponse;
14
+
15
+ final spec = ctx.spec;
16
+ final result = ctx.result;
17
+ final response = ctx.response;
18
+
19
+ if (null == spec) {
20
+ return ctx.error(
21
+ 'response_no_spec', 'Expected context spec property to be defined.');
22
+ }
23
+
24
+ if (null == response) {
25
+ return ctx.error('response_no_response',
26
+ 'Expected context response property to be defined.');
27
+ }
28
+
29
+ if (null == result) {
30
+ return ctx.error('response_no_result',
31
+ 'Expected context result property to be defined.');
32
+ }
33
+
34
+ spec.step = 'response';
35
+
36
+ try {
37
+ resultBasic(ctx);
38
+ resultHeaders(ctx);
39
+ await Future.value(resultBody(ctx));
40
+
41
+ // GraphQL reports failures as a top-level `errors` array under HTTP
42
+ // 200, so resultBasic's status check never sees them. Lift them here,
43
+ // before the response transform tries to unwrap data that is not there.
44
+ utility.graphqlErrors(ctx);
45
+ transformResponse(ctx);
46
+
47
+ if (null == result.err) {
48
+ result.ok = true;
49
+ }
50
+ } catch (err) {
51
+ result.err = err;
52
+ }
53
+
54
+ if (null != ctx.ctrl['explain']) {
55
+ ctx.ctrl['explain']['result'] = result;
56
+ }
57
+
58
+ return response;
59
+ }
@@ -0,0 +1,49 @@
1
+ dynamic makeResult(dynamic ctx) {
2
+ // PreResult feature hook has already provided a result.
3
+ if (null != ctx.out['result']) {
4
+ return ctx.out['result'];
5
+ }
6
+
7
+ final utility = ctx.utility;
8
+ final transformResponse = utility.transformResponse;
9
+
10
+ final op = ctx.op;
11
+ final entity = ctx.entity;
12
+
13
+ final spec = ctx.spec;
14
+ final result = ctx.result;
15
+
16
+ if (null == spec) {
17
+ return ctx.error(
18
+ 'result_no_spec', 'Expected context spec property to be defined.');
19
+ }
20
+
21
+ if (null == result) {
22
+ return ctx.error(
23
+ 'result_no_result', 'Expected context result property to be defined.');
24
+ }
25
+
26
+ spec.step = 'result';
27
+
28
+ transformResponse(ctx);
29
+
30
+ if ('list' == op.name) {
31
+ final resdata = result.resdata;
32
+ result.resdata = [];
33
+
34
+ if (resdata is List && 0 < resdata.length) {
35
+ for (final entry in resdata) {
36
+ final ent = entity.make();
37
+ ent.data(entry);
38
+ result.resdata.add(ent);
39
+ }
40
+ }
41
+ }
42
+
43
+ if (null != ctx.ctrl['explain']) {
44
+ ctx.ctrl['explain']['result'] = result;
45
+ }
46
+
47
+ // NOTE: returns processed result.
48
+ return result;
49
+ }
@@ -0,0 +1,77 @@
1
+ import 'GraphqlUtility.dart';
2
+ import '../Spec.dart';
3
+
4
+ import 'ErrUtility.dart';
5
+
6
+ // Create request specification.
7
+ dynamic makeSpec(dynamic ctx) {
8
+ if (null != ctx.out['spec']) {
9
+ return ctx.spec = ctx.out['spec'];
10
+ }
11
+
12
+ final point = ctx.point;
13
+ final options = ctx.options;
14
+ final utility = ctx.utility;
15
+
16
+ final prepareMethod = utility.prepareMethod;
17
+ final prepareParams = utility.prepareParams;
18
+ final prepareQuery = utility.prepareQuery;
19
+ final prepareHeaders = utility.prepareHeaders;
20
+ final prepareBody = utility.prepareBody;
21
+ final preparePath = utility.preparePath;
22
+ final prepareAuth = utility.prepareAuth;
23
+
24
+ ctx.spec = Spec({
25
+ 'base': options['base'], // string, URL endpoint base prefix,
26
+ 'prefix': options['prefix'],
27
+ 'parts': point.parts,
28
+ 'suffix': options['suffix'],
29
+ 'step': 'start',
30
+ });
31
+
32
+ ctx.spec.method = prepareMethod(ctx);
33
+
34
+ final allowmethod = (options['allow']?['method'] ?? '').toString();
35
+ if (!allowmethod.contains(ctx.spec.method.toString())) {
36
+ return ctx.error(
37
+ 'spec_method_allow',
38
+ 'Method "' +
39
+ ctx.spec.method.toString() +
40
+ '" not allowed by SDK option allow.method value: "' +
41
+ allowmethod +
42
+ '"');
43
+ }
44
+
45
+ ctx.spec.params = prepareParams(ctx);
46
+ ctx.spec.query = prepareQuery(ctx);
47
+ ctx.spec.headers = prepareHeaders(ctx);
48
+
49
+ if ('graphql' == point.kind) {
50
+ // GraphQL addresses one endpoint: no path parts, no query string, and
51
+ // the body carries the operation. prepareBody is skipped deliberately
52
+ // — it only emits a body for data-input ops, whereas every GraphQL op
53
+ // posts one, including load/list/remove.
54
+ ctx.spec.body = utility.graphqlBody(ctx);
55
+ ctx.spec.path = '';
56
+ // prepareQuery already copied the op's match arguments into the query
57
+ // string. Those same values are bound as operation variables, so
58
+ // leaving them would send /graphql?id=i1.
59
+ ctx.spec.query = <String, dynamic>{};
60
+ ctx.spec.headers['content-type'] = graphqlContentType;
61
+ } else {
62
+ ctx.spec.body = prepareBody(ctx);
63
+ ctx.spec.path = preparePath(ctx);
64
+ }
65
+
66
+ if (null != ctx.ctrl['explain']) {
67
+ ctx.ctrl['explain']['spec'] = ctx.spec;
68
+ }
69
+
70
+ final spec = prepareAuth(ctx);
71
+
72
+ if (!iserr(spec)) {
73
+ ctx.spec = spec;
74
+ }
75
+
76
+ return spec;
77
+ }
@@ -0,0 +1,51 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ dynamic makeUrl(dynamic ctx) {
4
+ final spec = ctx.spec;
5
+ final result = ctx.result;
6
+
7
+ if (null == spec) {
8
+ return ctx.error(
9
+ 'url_no_spec', 'Expected context spec property to be defined.');
10
+ }
11
+
12
+ if (null == result) {
13
+ return ctx.error(
14
+ 'url_no_result', 'Expected context result property to be defined.');
15
+ }
16
+
17
+ // TODO: use parts to avoid regexp?
18
+ var url =
19
+ vs.join([spec.base, spec.prefix, spec.path, spec.suffix], '/', true);
20
+ final resmatch = <String, dynamic>{};
21
+
22
+ final params = spec.params;
23
+
24
+ for (final item in vs.items(params)) {
25
+ final key = item[0];
26
+ final val = item[1];
27
+ if (null != val) {
28
+ url = url.replaceFirst(
29
+ RegExp('\\{' + vs.escre(key) + '\\}'), vs.escurl(val.toString()));
30
+ resmatch[key] = val;
31
+ }
32
+ }
33
+
34
+ // Append query string from spec.query. Entity ops populate this via
35
+ // PrepareQueryUtility from the operation's reqmatch; direct() callers
36
+ // pass it as fetchargs.query.
37
+ var qsep = '?';
38
+ for (final item in vs.items(spec.query)) {
39
+ final key = item[0];
40
+ final val = item[1];
41
+ if (null != val) {
42
+ url = url + qsep + vs.escurl(key) + '=' + vs.escurl(val.toString());
43
+ qsep = '&';
44
+ resmatch[key] = val;
45
+ }
46
+ }
47
+
48
+ result.resmatch = resmatch;
49
+
50
+ return url;
51
+ }
@@ -0,0 +1,56 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ /* Find value of a match parameter, possibly using an alias.
4
+ *
5
+ * The match parameter may have an alias key. For example, the parameter
6
+ * `foo_id` may be aliased to `id` in the entity data.
7
+ *
8
+ * This function returns null rather than failing.
9
+ */
10
+ dynamic param(dynamic ctx, dynamic paramdef) {
11
+ final point = ctx.point;
12
+ final spec = ctx.spec;
13
+ final match = ctx.match;
14
+ final reqmatch = ctx.reqmatch;
15
+ final data = ctx.data;
16
+ final reqdata = ctx.reqdata;
17
+
18
+ // TODO: review this search algorithm
19
+
20
+ final key =
21
+ paramdef is String ? paramdef : vs.getprop(paramdef, 'name');
22
+
23
+ final akey = null == point ? null : vs.getprop(point.alias, key);
24
+
25
+ dynamic val = vs.getprop(reqmatch, key);
26
+
27
+ if (null == val) {
28
+ val = vs.getprop(match, key);
29
+ }
30
+
31
+ if (null == val && null != akey) {
32
+ if (null != spec) {
33
+ vs.setprop(spec.alias, akey, key);
34
+ }
35
+
36
+ val = vs.getprop(reqmatch, akey);
37
+ }
38
+
39
+ if (null == val) {
40
+ val = vs.getprop(reqdata, key);
41
+ }
42
+
43
+ if (null == val) {
44
+ val = vs.getprop(data, key);
45
+ }
46
+
47
+ if (null == val && null != akey) {
48
+ val = vs.getprop(reqdata, akey);
49
+
50
+ if (null == val) {
51
+ val = vs.getprop(data, akey);
52
+ }
53
+ }
54
+
55
+ return val;
56
+ }
@@ -0,0 +1,46 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ const HEADER_auth = 'authorization';
4
+
5
+ const OPTION_apikey = 'apikey';
6
+
7
+ const NOTFOUND = '__NOTFOUND__';
8
+
9
+ dynamic prepareAuth(dynamic ctx) {
10
+ final client = ctx.client;
11
+ final spec = ctx.spec;
12
+
13
+ if (null == spec) {
14
+ return ctx.error(
15
+ 'auth_no_spec', 'Expected context spec property to be defined.');
16
+ }
17
+
18
+ final headers = spec.headers;
19
+
20
+ final options = client.options();
21
+
22
+ // Public APIs that need no auth omit the options.auth block entirely.
23
+ if (null == vs.getprop(options, 'auth')) {
24
+ vs.delprop(headers, HEADER_auth);
25
+ return spec;
26
+ }
27
+
28
+ final prefix = vs.getpath(options, 'auth.prefix');
29
+
30
+ final apikey = vs.getprop(options, OPTION_apikey, NOTFOUND);
31
+
32
+ if (NOTFOUND == apikey || null == apikey || '' == apikey) {
33
+ vs.delprop(headers, HEADER_auth);
34
+ } else {
35
+ // A raw credential (empty prefix, e.g. an apiKey scheme) must go in
36
+ // as-is; only a non-empty prefix (Bearer/Basic/OAuth) is space-joined.
37
+ vs.setprop(
38
+ headers,
39
+ HEADER_auth,
40
+ (null != prefix && '' != prefix)
41
+ ? prefix.toString() + ' ' + apikey.toString()
42
+ : apikey);
43
+ }
44
+
45
+ return spec;
46
+ }
@@ -0,0 +1,19 @@
1
+ dynamic prepareBody(dynamic ctx) {
2
+ final op = ctx.op;
3
+
4
+ final utility = ctx.utility;
5
+ final error = utility.makeError;
6
+ final transformRequest = utility.transformRequest;
7
+
8
+ dynamic body;
9
+
10
+ if ('data' == op.input) {
11
+ try {
12
+ body = transformRequest(ctx);
13
+ } catch (err) {
14
+ return error(ctx, err);
15
+ }
16
+ }
17
+
18
+ return body;
19
+ }
@@ -0,0 +1,11 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ dynamic prepareHeaders(dynamic ctx) {
4
+ final client = ctx.client;
5
+
6
+ final options = client.options();
7
+
8
+ final out = vs.clone(vs.getprop(options, 'headers', {}));
9
+
10
+ return out;
11
+ }
@@ -0,0 +1,30 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ dynamic prepareMethod(dynamic ctx) {
4
+ final op = ctx.op;
5
+ final opname = op.name;
6
+
7
+ final methodMap = {
8
+ 'create': 'POST',
9
+ 'update': 'PUT',
10
+ 'load': 'GET',
11
+ 'list': 'GET',
12
+ 'remove': 'DELETE',
13
+ 'patch': 'PATCH',
14
+ };
15
+
16
+ // The API definition is authoritative: a POST-only or PATCH-based API
17
+ // exposes `update` as POST or PATCH, not the PUT the op name implies.
18
+ // Only fall back to the op-name convention when the point has no method.
19
+ // Read the field off the Point object directly: vs.getprop only handles
20
+ // maps and lists, so going through it always missed the point's method and
21
+ // fell back to the op-name convention below. A GraphQL point synthesizes
22
+ // POST for every op, and a POST-only or PATCH-based REST API states its own
23
+ // method too — both were being overridden.
24
+ final method = ctx.point?.method;
25
+ if (method is String && '' != method) {
26
+ return method.toUpperCase();
27
+ }
28
+
29
+ return methodMap[opname];
30
+ }
@@ -0,0 +1,23 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ dynamic prepareParams(dynamic ctx) {
4
+ final utility = ctx.utility;
5
+ final findparam = utility.param;
6
+
7
+ final point = ctx.point;
8
+
9
+ final params = vs.getprop(point.args, 'params') ?? [];
10
+
11
+ final out = <String, dynamic>{};
12
+ for (final pd in params) {
13
+ final val = findparam(ctx, pd);
14
+ if (null != val) {
15
+ out[vs.getprop(pd, 'name').toString()] = val;
16
+ }
17
+ }
18
+
19
+ // TODO: review
20
+ // out = validate(out, point.validate.params)
21
+
22
+ return out;
23
+ }
@@ -0,0 +1,9 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ dynamic preparePath(dynamic ctx) {
4
+ final point = ctx.point;
5
+
6
+ final path = vs.join(point.parts, '/', true);
7
+
8
+ return path;
9
+ }
@@ -0,0 +1,18 @@
1
+ import 'voxgig_struct.dart' as vs;
2
+
3
+ dynamic prepareQuery(dynamic ctx) {
4
+ final point = ctx.point;
5
+ final params = point.params ?? [];
6
+ final reqmatch = ctx.reqmatch ?? {};
7
+
8
+ final out = <String, dynamic>{};
9
+ for (final item in vs.items(reqmatch)) {
10
+ final key = item[0];
11
+ final val = item[1];
12
+ if (null != val && !(params as List).contains(key)) {
13
+ out[key] = val;
14
+ }
15
+ }
16
+
17
+ return out;
18
+ }
@@ -0,0 +1,29 @@
1
+ import 'ErrUtility.dart';
2
+
3
+ dynamic resultBasic(dynamic ctx) {
4
+ final response = ctx.response;
5
+ final result = ctx.result;
6
+
7
+ if (null != result && null != response) {
8
+ result.status = response.status ?? -1;
9
+ result.statusText = response.statusText ?? 'no-status';
10
+
11
+ // TODO: use spec!
12
+ if (result.status is num && 400 <= result.status) {
13
+ final msg = 'request: ' +
14
+ result.status.toString() +
15
+ ': ' +
16
+ result.statusText.toString();
17
+ if (null != result.err) {
18
+ final prevmsg = errmsg(result.err);
19
+ result.err = ctx.error('request_status', prevmsg + ': ' + msg);
20
+ } else {
21
+ result.err = ctx.error('request_status', msg);
22
+ }
23
+ } else if (null != response.err) {
24
+ result.err = response.err;
25
+ }
26
+ }
27
+
28
+ return result;
29
+ }
@@ -0,0 +1,15 @@
1
+ import 'dart:async';
2
+
3
+ Future<dynamic> resultBody(dynamic ctx) async {
4
+ final response = ctx.response;
5
+ final result = ctx.result;
6
+
7
+ if (null != result) {
8
+ if (null != response && null != response.jsonFn && null != response.body) {
9
+ final json = await response.json();
10
+ result.body = json;
11
+ }
12
+ }
13
+
14
+ return result;
15
+ }
@@ -0,0 +1,18 @@
1
+ dynamic resultHeaders(dynamic ctx) {
2
+ final response = ctx.response;
3
+ final result = ctx.result;
4
+
5
+ if (null != result) {
6
+ if (null != response && response.headers is Map) {
7
+ final headers = <String, dynamic>{};
8
+ (response.headers as Map).forEach((k, v) {
9
+ headers[k.toString()] = v;
10
+ });
11
+ result.headers = headers;
12
+ } else {
13
+ result.headers = <String, dynamic>{};
14
+ }
15
+ }
16
+
17
+ return result;
18
+ }