@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,85 @@
1
+ // ignore_for_file: non_constant_identifier_names
2
+
3
+ import '../base/BaseFeature.dart';
4
+
5
+ // Structured operation logging. Dependency-free: log records are written
6
+ // with print (or a caller-supplied `logger` function receiving the record
7
+ // map), one line per hook, mirroring the donor log feature's record shape.
8
+ class LogFeature extends BaseFeature {
9
+ dynamic _client;
10
+ dynamic _logger;
11
+
12
+ LogFeature() {
13
+ version = '0.0.1';
14
+ name = 'log';
15
+ active = true;
16
+ }
17
+
18
+ @override
19
+ dynamic init(dynamic ctx, dynamic opts) {
20
+ _client = ctx.client;
21
+ options = opts is Map ? Map<String, dynamic>.from(opts) : {};
22
+ active = true == options['active'];
23
+
24
+ if (active) {
25
+ var logger = options['logger'];
26
+
27
+ if (null == logger) {
28
+ final level = options['level'] ?? 'info';
29
+ logger = (dynamic record) {
30
+ // ignore: avoid_print
31
+ print('[' +
32
+ level.toString() +
33
+ '] ' +
34
+ (record is Map ? record['hook'].toString() : '') +
35
+ ' ' +
36
+ record.toString());
37
+ };
38
+ }
39
+
40
+ _logger = logger;
41
+ }
42
+ }
43
+
44
+ @override
45
+ dynamic PostConstruct(dynamic ctx) => _loghook('PostConstruct', ctx);
46
+
47
+ @override
48
+ dynamic PostConstructEntity(dynamic ctx) =>
49
+ _loghook('PostConstructEntity', ctx);
50
+
51
+ @override
52
+ dynamic SetData(dynamic ctx) => _loghook('SetData', ctx);
53
+
54
+ @override
55
+ dynamic GetData(dynamic ctx) => _loghook('GetData', ctx);
56
+
57
+ @override
58
+ dynamic GetMatch(dynamic ctx) => _loghook('GetMatch', ctx);
59
+
60
+ @override
61
+ dynamic PrePoint(dynamic ctx) => _loghook('PrePoint', ctx);
62
+
63
+ @override
64
+ dynamic PreSpec(dynamic ctx) => _loghook('PreSpec', ctx);
65
+
66
+ @override
67
+ dynamic PreRequest(dynamic ctx) => _loghook('PreRequest', ctx);
68
+
69
+ @override
70
+ dynamic PreResponse(dynamic ctx) => _loghook('PreResponse', ctx);
71
+
72
+ @override
73
+ dynamic PreResult(dynamic ctx) => _loghook('PreResult', ctx);
74
+
75
+ dynamic _loghook(String hook, dynamic ctx) {
76
+ if (null != _logger) {
77
+ _logger({
78
+ 'hook': hook,
79
+ 'op': null == ctx.op ? null : ctx.op.name,
80
+ 'client': null == _client ? null : 'ProjectName',
81
+ });
82
+ }
83
+ return null;
84
+ }
85
+ }
@@ -0,0 +1,103 @@
1
+ // ignore_for_file: non_constant_identifier_names
2
+
3
+ import '../base/BaseFeature.dart';
4
+
5
+ // Statistics capture. Records per-operation counters and latency for every
6
+ // call: totals plus a breakdown keyed by `<entity>.<op>`. Timing starts at
7
+ // endpoint resolution (PrePoint) and stops when the call returns (PreDone)
8
+ // or throws (PreUnexpected). Aggregates live on the client track
9
+ // (`metrics`). The clock is injectable (`now`) for deterministic tests.
10
+ class MetricsFeature extends BaseFeature {
11
+ dynamic _client;
12
+ final Map<dynamic, dynamic> _starts = {};
13
+
14
+ MetricsFeature() {
15
+ version = '0.0.1';
16
+ name = 'metrics';
17
+ active = true;
18
+ }
19
+
20
+ @override
21
+ dynamic init(dynamic ctx, dynamic opts) {
22
+ _client = ctx.client;
23
+ options = opts is Map ? Map<String, dynamic>.from(opts) : {};
24
+ active = true == options['active'];
25
+ _starts.clear();
26
+
27
+ final track = _client.track;
28
+ if (null == track['metrics']) {
29
+ track['metrics'] = <String, dynamic>{
30
+ 'total': <String, dynamic>{'count': 0, 'ok': 0, 'err': 0, 'totalMs': 0, 'maxMs': 0},
31
+ 'ops': <String, dynamic>{},
32
+ };
33
+ }
34
+ return null;
35
+ }
36
+
37
+ @override
38
+ dynamic PrePoint(dynamic ctx) {
39
+ _starts[ctx] = _now();
40
+ return null;
41
+ }
42
+
43
+ @override
44
+ dynamic PreDone(dynamic ctx) {
45
+ // Classify by the actual result: a 4xx/5xx that flows through still
46
+ // reaches PreDone before the pipeline throws.
47
+ _record(
48
+ ctx,
49
+ null != ctx.result &&
50
+ false != ctx.result.ok &&
51
+ null == ctx.result.err);
52
+ return null;
53
+ }
54
+
55
+ @override
56
+ dynamic PreUnexpected(dynamic ctx) {
57
+ _record(ctx, false);
58
+ return null;
59
+ }
60
+
61
+ void _record(dynamic ctx, bool ok) {
62
+ // Record once per operation. When a non-2xx result reaches PreDone the
63
+ // pipeline then throws, firing PreUnexpected too; the missing start
64
+ // marker makes the second call a no-op.
65
+ if (!_starts.containsKey(ctx)) {
66
+ return;
67
+ }
68
+ final start = _starts[ctx];
69
+ var dur = null == start ? 0 : _now() - start;
70
+ dur = dur < 0 ? 0 : dur;
71
+ _starts.remove(ctx);
72
+
73
+ final m = _client.track['metrics'];
74
+ final key = (null == ctx.op ? '_' : (ctx.op.entity ?? '_')).toString() +
75
+ '.' +
76
+ (null == ctx.op ? '_' : (ctx.op.name ?? '_')).toString();
77
+
78
+ var op = m['ops'][key];
79
+ if (null == op) {
80
+ op = m['ops'][key] = <String, dynamic>{'count': 0, 'ok': 0, 'err': 0, 'totalMs': 0, 'maxMs': 0};
81
+ }
82
+
83
+ _bump(m['total'], ok, dur);
84
+ _bump(op, ok, dur);
85
+ }
86
+
87
+ void _bump(dynamic bucket, bool ok, num dur) {
88
+ bucket['count']++;
89
+ bucket[ok ? 'ok' : 'err']++;
90
+ bucket['totalMs'] += dur;
91
+ if (dur > bucket['maxMs']) {
92
+ bucket['maxMs'] = dur;
93
+ }
94
+ }
95
+
96
+ num _now() {
97
+ final now = options['now'];
98
+ if (now is Function) {
99
+ return now();
100
+ }
101
+ return DateTime.now().millisecondsSinceEpoch;
102
+ }
103
+ }
@@ -0,0 +1,186 @@
1
+ // ignore_for_file: non_constant_identifier_names
2
+
3
+ import 'dart:async';
4
+
5
+ import '../../utility/voxgig_struct.dart' as vs;
6
+
7
+ import '../base/BaseFeature.dart';
8
+
9
+ // Network behaviour simulation. Wraps the active transport (the live
10
+ // dart:io transport or the `test` feature's in-memory mock) and injects
11
+ // realistic network conditions so offline unit tests can exercise slowness,
12
+ // transient failures, rate limiting and outages deterministically.
13
+ //
14
+ // Every injection mode is counter-driven (per client instance) so tests
15
+ // are reproducible without mocking timers. `failRate` adds optional
16
+ // pseudo-random failures via a seeded LCG for coverage-style testing.
17
+ class NetsimFeature extends BaseFeature {
18
+ dynamic _client;
19
+ int _calls = 0;
20
+ int _seed = 1;
21
+
22
+ NetsimFeature() {
23
+ version = '0.0.1';
24
+ name = 'netsim';
25
+ active = true;
26
+ }
27
+
28
+ @override
29
+ dynamic init(dynamic ctx, dynamic opts) {
30
+ _client = ctx.client;
31
+ options = opts is Map ? Map<String, dynamic>.from(opts) : {};
32
+ active = true == options['active'];
33
+ _seed = options['seed'] is num ? (options['seed'] as num).toInt() : 1;
34
+ if (0 == _seed) {
35
+ _seed = 1;
36
+ }
37
+ _calls = 0;
38
+
39
+ if (!active) {
40
+ return null;
41
+ }
42
+
43
+ final self = this;
44
+ final utility = ctx.utility;
45
+ final inner = utility.fetcher;
46
+
47
+ utility.fetcher = (dynamic ctx2, dynamic url, dynamic fetchdef) async {
48
+ return self._simulate(ctx2, url, fetchdef, inner);
49
+ };
50
+ return null;
51
+ }
52
+
53
+ Future<dynamic> _simulate(
54
+ dynamic ctx, dynamic url, dynamic fetchdef, dynamic inner) async {
55
+ final opts = options;
56
+ _calls++;
57
+ final call = _calls;
58
+
59
+ // Record the simulated conditions for test/debug inspection.
60
+ final applied = <String, dynamic>{};
61
+
62
+ // Total outage: every call fails at the transport level.
63
+ if (true == opts['offline']) {
64
+ await _sleep(_pickLatency());
65
+ applied['offline'] = true;
66
+ _track(ctx, applied);
67
+ return ctx.error('netsim_offline',
68
+ 'Simulated network offline (URL was: "' + url.toString() + '")');
69
+ }
70
+
71
+ // Connection-level errors for the first N calls (e.g. ECONNRESET).
72
+ final errorTimes =
73
+ opts['errorTimes'] is num ? (opts['errorTimes'] as num).toInt() : 0;
74
+ if (call <= errorTimes) {
75
+ await _sleep(_pickLatency());
76
+ applied['error'] = true;
77
+ _track(ctx, applied);
78
+ return ctx.error('netsim_conn',
79
+ 'Simulated connection error (call ' + call.toString() + ')');
80
+ }
81
+
82
+ // Rate-limit responses (HTTP 429 + Retry-After) for the first N calls.
83
+ final rateLimitTimes = opts['rateLimitTimes'] is num
84
+ ? (opts['rateLimitTimes'] as num).toInt()
85
+ : 0;
86
+ if (call <= rateLimitTimes) {
87
+ await _sleep(_pickLatency());
88
+ applied['rateLimited'] = true;
89
+ _track(ctx, applied);
90
+ return _respond(ctx, 429, null, {
91
+ 'statusText': 'Too Many Requests',
92
+ 'headers': {
93
+ 'retry-after':
94
+ (null == opts['retryAfter'] ? 0 : opts['retryAfter']).toString()
95
+ },
96
+ });
97
+ }
98
+
99
+ // Retryable failure status for the first N calls, or every Nth call.
100
+ final failStatus = null == opts['failStatus'] ? 503 : opts['failStatus'];
101
+ final failTimes =
102
+ opts['failTimes'] is num ? (opts['failTimes'] as num).toInt() : 0;
103
+ final failEvery =
104
+ opts['failEvery'] is num ? (opts['failEvery'] as num).toInt() : 0;
105
+ final failRate = opts['failRate'] is num ? opts['failRate'] as num : 0;
106
+ final failByCount = call <= failTimes;
107
+ final failByEvery = 0 < failEvery && 0 == call % failEvery;
108
+ final failByRate = 0 < failRate && _rand() < failRate;
109
+ if (failByCount || failByEvery || failByRate) {
110
+ await _sleep(_pickLatency());
111
+ applied['failStatus'] = failStatus;
112
+ _track(ctx, applied);
113
+ return _respond(ctx, failStatus, null, {'statusText': 'Simulated Failure'});
114
+ }
115
+
116
+ // Otherwise: apply latency then delegate to the real transport.
117
+ final latency = _pickLatency();
118
+ applied['latency'] = latency;
119
+ _track(ctx, applied);
120
+ await _sleep(latency);
121
+ return inner(ctx, url, fetchdef);
122
+ }
123
+
124
+ // Latency in ms: a fixed number, or a uniform sample from {min,max}.
125
+ int _pickLatency() {
126
+ final l = options['latency'];
127
+ if (null == l) {
128
+ return 0;
129
+ }
130
+ if (l is num) {
131
+ return l < 0 ? 0 : l.toInt();
132
+ }
133
+ final min = l['min'] is num ? (l['min'] as num).toInt() : 0;
134
+ final max = null == l['max'] ? min : (l['max'] as num).toInt();
135
+ if (max <= min) {
136
+ return min;
137
+ }
138
+ return min + (_rand() * (max - min)).floor();
139
+ }
140
+
141
+ Future<void> _sleep(int ms) {
142
+ if (0 >= ms) {
143
+ return Future.value();
144
+ }
145
+ final sleeper = options['sleep'];
146
+ if (sleeper is Function) {
147
+ return Future.value(sleeper(ms)).then((_x) {});
148
+ }
149
+ return Future.delayed(Duration(milliseconds: ms));
150
+ }
151
+
152
+ // Deterministic 0..1 pseudo-random via a linear congruential generator.
153
+ double _rand() {
154
+ _seed = (_seed * 1103515245 + 12345) & 0x7fffffff;
155
+ return _seed / 0x7fffffff;
156
+ }
157
+
158
+ void _track(dynamic ctx, dynamic applied) {
159
+ final track = _client.track;
160
+ if (null == track['netsim']) {
161
+ track['netsim'] = <String, dynamic>{'calls': 0, 'applied': <dynamic>[]};
162
+ }
163
+ track['netsim']['calls']++;
164
+ track['netsim']['applied'].add(applied);
165
+ if (ctx.ctrl is Map && null != ctx.ctrl['explain']) {
166
+ ctx.ctrl['explain']['netsim'] = track['netsim'];
167
+ }
168
+ }
169
+
170
+ // Build a transport-shaped response (matching the test feature's mock).
171
+ dynamic _respond(dynamic ctx, dynamic status, [dynamic data, dynamic extra]) {
172
+ final out = vs.merge([
173
+ <String, dynamic>{
174
+ 'status': status,
175
+ 'statusText': 'OK',
176
+ 'json': () => data,
177
+ 'body': 'not-used',
178
+ },
179
+ vs.getdef(extra, {}),
180
+ ]);
181
+
182
+ out['headers'] = vs.getprop(out, 'headers', {});
183
+
184
+ return out;
185
+ }
186
+ }
@@ -0,0 +1,240 @@
1
+ // ignore_for_file: non_constant_identifier_names
2
+
3
+ import '../../utility/voxgig_struct.dart' as vs;
4
+
5
+ import '../base/BaseFeature.dart';
6
+
7
+ // Pagination support for list operations. On the way out (PreRequest) it
8
+ // stamps page/limit (or a cursor) into the request query; on the way back
9
+ // (PreResult) it reads the server's pagination signals — a `Link:
10
+ // rel="next"` header, `X-Next-Page`/`X-Total-Count` headers, or `next`/
11
+ // `cursor`/`hasMore` fields in the body — and records them on
12
+ // `ctx.result.paging`. Generated SDKs build auto-iteration on top of this
13
+ // (advance the cursor/page and re-issue the list call until `hasMore` is
14
+ // false). Parameter names and page size are configurable.
15
+ class PagingFeature extends BaseFeature {
16
+ dynamic _client;
17
+
18
+ PagingFeature() {
19
+ version = '0.0.1';
20
+ name = 'paging';
21
+ active = true;
22
+ }
23
+
24
+ @override
25
+ dynamic init(dynamic ctx, dynamic opts) {
26
+ _client = ctx.client;
27
+ options = opts is Map ? Map<String, dynamic>.from(opts) : {};
28
+ active = true == options['active'];
29
+ return null;
30
+ }
31
+
32
+ @override
33
+ dynamic PreRequest(dynamic ctx) {
34
+ if (!_isList(ctx)) {
35
+ return null;
36
+ }
37
+ final spec = ctx.spec;
38
+ if (null == spec) {
39
+ return null;
40
+ }
41
+ spec.query ??= {};
42
+
43
+ final pageParam = options['pageParam'] ?? 'page';
44
+ final limitParam = options['limitParam'] ?? 'limit';
45
+ final cursorParam = options['cursorParam'] ?? 'cursor';
46
+
47
+ // A per-call cursor/page from ctrl takes priority (used by auto-iteration).
48
+ final paging = (ctx.ctrl is Map ? ctx.ctrl['paging'] : null) ?? {};
49
+
50
+ // GraphQL paginates through operation VARIABLES, not the query string.
51
+ // This hook runs after makeSpec, so spec.body already holds the
52
+ // { query, variables } envelope, and before makeFetchDef serialises it.
53
+ if ('graphql' == ctx.point?.kind) {
54
+ _graphqlPreRequest(ctx, paging);
55
+ return null;
56
+ }
57
+
58
+ if (null != paging['cursor']) {
59
+ spec.query[cursorParam] = paging['cursor'];
60
+ } else if (null == spec.query[pageParam]) {
61
+ spec.query[pageParam] =
62
+ null != paging['page'] ? paging['page'] : (options['startPage'] ?? 1);
63
+ }
64
+
65
+ if (null != options['limit'] && null == spec.query[limitParam]) {
66
+ spec.query[limitParam] = options['limit'];
67
+ }
68
+ return null;
69
+ }
70
+
71
+ // Relay pagination: the cursor is the `after` variable (or whatever the
72
+ // model named it), and the page size is `first`.
73
+ void _graphqlPreRequest(dynamic ctx, dynamic paging) {
74
+ final body = ctx.spec.body;
75
+ if (body is! Map) {
76
+ return;
77
+ }
78
+
79
+ var variables = body['variables'];
80
+ if (variables is! Map) {
81
+ variables = <String, dynamic>{};
82
+ body['variables'] = variables;
83
+ }
84
+
85
+ final afterVar = options['afterVar'] ?? 'after';
86
+ final firstVar = options['firstVar'] ?? 'first';
87
+
88
+ // Only bind variables the operation actually declares, or the server
89
+ // rejects the document.
90
+ final declared = <String>{};
91
+ final varlist = vs.getprop(ctx.point?.graphql, 'vars');
92
+ if (varlist is List) {
93
+ for (final v in varlist) {
94
+ final name = vs.getprop(v, 'name');
95
+ if (null != name) {
96
+ declared.add(name.toString());
97
+ }
98
+ }
99
+ }
100
+
101
+ if (null != paging['cursor'] && declared.contains(afterVar)) {
102
+ variables[afterVar] = paging['cursor'];
103
+ }
104
+
105
+ if (null != options['limit'] && null == variables[firstVar] &&
106
+ declared.contains(firstVar)) {
107
+ variables[firstVar] = options['limit'];
108
+ }
109
+ }
110
+
111
+ @override
112
+ dynamic PreResult(dynamic ctx) {
113
+ if (!_isList(ctx)) {
114
+ return null;
115
+ }
116
+ final result = ctx.result;
117
+ if (null == result) {
118
+ return null;
119
+ }
120
+
121
+ final headers = result.headers ?? {};
122
+ final body = result.body;
123
+
124
+ final paging = <String, dynamic>{
125
+ 'page': _num(_header(headers, 'x-page')),
126
+ 'totalCount': _num(_header(headers, 'x-total-count')),
127
+ 'nextPage': _num(_header(headers, 'x-next-page')),
128
+ 'next': null,
129
+ 'cursor': null,
130
+ 'hasMore': false,
131
+ };
132
+
133
+ // Link: <...>; rel="next"
134
+ final link = _header(headers, 'link');
135
+ if (null != link) {
136
+ final m = RegExp(r'<([^>]+)>\s*;\s*rel="?next"?', caseSensitive: false)
137
+ .firstMatch(link.toString());
138
+ if (null != m) {
139
+ paging['next'] = m.group(1);
140
+ }
141
+ }
142
+
143
+ // Set when the response states hasMore outright, rather than leaving it
144
+ // to be inferred from the presence of a cursor.
145
+ var explicitMore = false;
146
+
147
+ // Relay connections carry the cursor in pageInfo, at the path the model
148
+ // recorded for this op.
149
+ final page = vs.getprop(ctx.point?.graphql, 'page');
150
+ if (page is Map && body is Map) {
151
+ // `connpath` locates the connection object inside the response
152
+ // envelope (data.<field>); the cursor/more paths are relative to it.
153
+ var conn = body;
154
+ final connpath = page['connpath'];
155
+ if (connpath is String && '' != connpath) {
156
+ final sub = vs.getpath(body, connpath);
157
+ if (sub is Map) {
158
+ conn = sub;
159
+ }
160
+ }
161
+
162
+ final cursorpath = page['cursor'];
163
+ if (cursorpath is String && '' != cursorpath) {
164
+ final cursor = vs.getpath(conn, cursorpath);
165
+ if (null != cursor) {
166
+ paging['cursor'] = cursor;
167
+ }
168
+ }
169
+
170
+ final morepath = page['more'];
171
+ if (morepath is String && '' != morepath) {
172
+ final more = vs.getpath(conn, morepath);
173
+ if (more is bool) {
174
+ paging['hasMore'] = more;
175
+ explicitMore = true;
176
+ }
177
+ }
178
+ }
179
+
180
+ // Body-level cursors.
181
+ if (body is Map) {
182
+ if (null != body['next']) {
183
+ paging['next'] = paging['next'] ?? body['next'];
184
+ }
185
+ if (null != body['cursor']) {
186
+ paging['cursor'] = body['cursor'];
187
+ }
188
+ if (null != body['nextCursor']) {
189
+ paging['cursor'] = body['nextCursor'];
190
+ }
191
+ if (body['hasMore'] is bool) {
192
+ paging['hasMore'] = body['hasMore'];
193
+ explicitMore = true;
194
+ }
195
+ }
196
+
197
+ // Cursor presence only INFERS another page. When the server stated the
198
+ // answer outright — relay's `hasNextPage: false`, or a body `hasMore` —
199
+ // that wins: a final page normally carries both an end cursor and
200
+ // hasNextPage false, and inferring from the cursor there would send the
201
+ // caller back for a page that does not exist, forever.
202
+ if (!explicitMore) {
203
+ paging['hasMore'] = true == paging['hasMore'] ||
204
+ null != paging['next'] ||
205
+ null != paging['cursor'] ||
206
+ null != paging['nextPage'];
207
+ }
208
+
209
+ result.paging = paging;
210
+
211
+ final track = _client.track;
212
+ track['paging'] = <String, dynamic>{'last': paging};
213
+ return null;
214
+ }
215
+
216
+ bool _isList(dynamic ctx) {
217
+ final ops = options['ops'] ?? ['list'];
218
+ return (ops as List).contains(null == ctx.op ? null : ctx.op.name);
219
+ }
220
+
221
+ dynamic _header(dynamic headers, String name) {
222
+ final lower = name.toLowerCase();
223
+ if (headers is! Map) {
224
+ return null;
225
+ }
226
+ for (final k in headers.keys) {
227
+ if (k.toString().toLowerCase() == lower) {
228
+ return headers[k];
229
+ }
230
+ }
231
+ return null;
232
+ }
233
+
234
+ num? _num(dynamic v) {
235
+ if (null == v) {
236
+ return null;
237
+ }
238
+ return v is num ? v : num.tryParse(v.toString());
239
+ }
240
+ }