@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.
- package/bin/voxgig-sdkgen +1 -1
- package/package.json +1 -1
- package/project/.sdk/model/feature/audit.aontu +22 -0
- package/project/.sdk/model/feature/cache.aontu +23 -0
- package/project/.sdk/model/feature/clienttrack.aontu +20 -0
- package/project/.sdk/model/feature/debug.aontu +25 -0
- package/project/.sdk/model/feature/feature-index.aontu +20 -1
- package/project/.sdk/model/feature/idempotency.aontu +21 -0
- package/project/.sdk/model/feature/metrics.aontu +20 -0
- package/project/.sdk/model/feature/netsim.aontu +36 -0
- package/project/.sdk/model/feature/paging.aontu +23 -0
- package/project/.sdk/model/feature/proxy.aontu +23 -0
- package/project/.sdk/model/feature/ratelimit.aontu +21 -0
- package/project/.sdk/model/feature/rbac.aontu +24 -0
- package/project/.sdk/model/feature/retry.aontu +23 -0
- package/project/.sdk/model/feature/streaming.aontu +22 -0
- package/project/.sdk/model/feature/telemetry.aontu +21 -0
- package/project/.sdk/model/feature/timeout.aontu +18 -0
- package/project/.sdk/model/target/c.aontu +37 -0
- package/project/.sdk/model/target/clojure.aontu +36 -0
- package/project/.sdk/model/target/cpp.aontu +35 -0
- package/project/.sdk/model/target/csharp.aontu +35 -0
- package/project/.sdk/model/target/dart.aontu +34 -0
- package/project/.sdk/model/target/elixir.aontu +33 -0
- package/project/.sdk/model/target/haskell.aontu +47 -0
- package/project/.sdk/model/target/java.aontu +37 -0
- package/project/.sdk/model/target/kotlin.aontu +37 -0
- package/project/.sdk/model/target/ocaml.aontu +36 -0
- package/project/.sdk/model/target/perl.aontu +37 -0
- package/project/.sdk/model/target/rust.aontu +37 -0
- package/project/.sdk/model/target/scala.aontu +37 -0
- package/project/.sdk/model/target/swift.aontu +35 -0
- package/project/.sdk/model/target/zig.aontu +27 -0
- package/project/.sdk/src/cmp/c/Config_c.ts +109 -0
- package/project/.sdk/src/cmp/c/EntityBase_c.ts +61 -0
- package/project/.sdk/src/cmp/c/EntityOperation_c.ts +41 -0
- package/project/.sdk/src/cmp/c/Entity_c.ts +85 -0
- package/project/.sdk/src/cmp/c/Gitignore_c.ts +29 -0
- package/project/.sdk/src/cmp/c/MainEntity_c.ts +31 -0
- package/project/.sdk/src/cmp/c/Main_c.ts +83 -0
- package/project/.sdk/src/cmp/c/Package_c.ts +17 -0
- package/project/.sdk/src/cmp/c/TestDirect_c.ts +227 -0
- package/project/.sdk/src/cmp/c/TestEntity_c.ts +82 -0
- package/project/.sdk/src/cmp/c/Test_c.ts +51 -0
- package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +265 -0
- package/project/.sdk/src/cmp/c/fragment/EntityCreateOp.fragment.c +27 -0
- package/project/.sdk/src/cmp/c/fragment/EntityListOp.fragment.c +24 -0
- package/project/.sdk/src/cmp/c/fragment/EntityLoadOp.fragment.c +29 -0
- package/project/.sdk/src/cmp/c/fragment/EntityRemoveOp.fragment.c +29 -0
- package/project/.sdk/src/cmp/c/fragment/EntityUpdateOp.fragment.c +29 -0
- package/project/.sdk/src/cmp/c/fragment/Main.fragment.c +220 -0
- package/project/.sdk/src/cmp/c/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/c/utility_c.ts +102 -0
- package/project/.sdk/src/cmp/clojure/Config_clojure.ts +94 -0
- package/project/.sdk/src/cmp/clojure/EntityOperation_clojure.ts +35 -0
- package/project/.sdk/src/cmp/clojure/Entity_clojure.ts +77 -0
- package/project/.sdk/src/cmp/clojure/Gitignore_clojure.ts +28 -0
- package/project/.sdk/src/cmp/clojure/MainEntity_clojure.ts +21 -0
- package/project/.sdk/src/cmp/clojure/Main_clojure.ts +88 -0
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +41 -0
- package/project/.sdk/src/cmp/clojure/Test_clojure.ts +120 -0
- package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +158 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityCreateOp.fragment.clj +14 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityListOp.fragment.clj +17 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityLoadOp.fragment.clj +15 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityRemoveOp.fragment.clj +15 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityUpdateOp.fragment.clj +15 -0
- package/project/.sdk/src/cmp/clojure/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/clojure/utility_clojure.ts +82 -0
- package/project/.sdk/src/cmp/cpp/Config_cpp.ts +136 -0
- package/project/.sdk/src/cmp/cpp/EntityBase_cpp.ts +51 -0
- package/project/.sdk/src/cmp/cpp/EntityOperation_cpp.ts +37 -0
- package/project/.sdk/src/cmp/cpp/Entity_cpp.ts +78 -0
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +27 -0
- package/project/.sdk/src/cmp/cpp/MainEntity_cpp.ts +35 -0
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +84 -0
- package/project/.sdk/src/cmp/cpp/Package_cpp.ts +17 -0
- package/project/.sdk/src/cmp/cpp/TestDirect_cpp.ts +258 -0
- package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +454 -0
- package/project/.sdk/src/cmp/cpp/Test_cpp.ts +36 -0
- package/project/.sdk/src/cmp/cpp/fragment/Entity.fragment.cpp +40 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityCreateOp.fragment.cpp +22 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityListOp.fragment.cpp +21 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityLoadOp.fragment.cpp +25 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityRemoveOp.fragment.cpp +21 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityUpdateOp.fragment.cpp +22 -0
- package/project/.sdk/src/cmp/cpp/fragment/Main.fragment.cpp +43 -0
- package/project/.sdk/src/cmp/cpp/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/cpp/utility_cpp.ts +83 -0
- package/project/.sdk/src/cmp/csharp/Config_csharp.ts +134 -0
- package/project/.sdk/src/cmp/csharp/EntityBase_csharp.ts +39 -0
- package/project/.sdk/src/cmp/csharp/EntityOperation_csharp.ts +41 -0
- package/project/.sdk/src/cmp/csharp/Entity_csharp.ts +85 -0
- package/project/.sdk/src/cmp/csharp/Gitignore_csharp.ts +38 -0
- package/project/.sdk/src/cmp/csharp/MainEntity_csharp.ts +36 -0
- package/project/.sdk/src/cmp/csharp/Main_csharp.ts +91 -0
- package/project/.sdk/src/cmp/csharp/Package_csharp.ts +101 -0
- package/project/.sdk/src/cmp/csharp/SdkError_csharp.ts +42 -0
- package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +560 -0
- package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +618 -0
- package/project/.sdk/src/cmp/csharp/Test_csharp.ts +38 -0
- package/project/.sdk/src/cmp/csharp/fragment/Entity.fragment.cs +28 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +268 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityCreateOp.fragment.cs +37 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityListOp.fragment.cs +35 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityLoadOp.fragment.cs +41 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityRemoveOp.fragment.cs +41 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityUpdateOp.fragment.cs +41 -0
- package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +278 -0
- package/project/.sdk/src/cmp/csharp/fragment/SdkError.fragment.cs +21 -0
- package/project/.sdk/src/cmp/csharp/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/csharp/utility_csharp.ts +143 -0
- package/project/.sdk/src/cmp/dart/Config_dart.ts +99 -0
- package/project/.sdk/src/cmp/dart/EntityBase_dart.ts +34 -0
- package/project/.sdk/src/cmp/dart/EntityOperation_dart.ts +43 -0
- package/project/.sdk/src/cmp/dart/EntityTypes_dart.ts +190 -0
- package/project/.sdk/src/cmp/dart/Entity_dart.ts +79 -0
- package/project/.sdk/src/cmp/dart/Gitignore_dart.ts +34 -0
- package/project/.sdk/src/cmp/dart/MainEntity_dart.ts +33 -0
- package/project/.sdk/src/cmp/dart/Main_dart.ts +105 -0
- package/project/.sdk/src/cmp/dart/Package_dart.ts +81 -0
- package/project/.sdk/src/cmp/dart/SdkError_dart.ts +42 -0
- package/project/.sdk/src/cmp/dart/TestDirect_dart.ts +498 -0
- package/project/.sdk/src/cmp/dart/TestEntity_dart.ts +552 -0
- package/project/.sdk/src/cmp/dart/Test_dart.ts +105 -0
- package/project/.sdk/src/cmp/dart/fragment/Config.fragment.dart +48 -0
- package/project/.sdk/src/cmp/dart/fragment/Direct.test.fragment.dart +25 -0
- package/project/.sdk/src/cmp/dart/fragment/Entity.fragment.dart +31 -0
- package/project/.sdk/src/cmp/dart/fragment/Entity.test.fragment.dart +67 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityBase.fragment.dart +285 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityCreateOp.fragment.dart +90 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityListOp.fragment.dart +90 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityLoadOp.fragment.dart +94 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityRemoveOp.fragment.dart +94 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityUpdateOp.fragment.dart +94 -0
- package/project/.sdk/src/cmp/dart/fragment/Main.fragment.dart +240 -0
- package/project/.sdk/src/cmp/dart/fragment/SdkError.fragment.dart +18 -0
- package/project/.sdk/src/cmp/dart/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/dart/utility_dart.ts +86 -0
- package/project/.sdk/src/cmp/elixir/Config_elixir.ts +101 -0
- package/project/.sdk/src/cmp/elixir/EntityOperation_elixir.ts +27 -0
- package/project/.sdk/src/cmp/elixir/Entity_elixir.ts +54 -0
- package/project/.sdk/src/cmp/elixir/Gitignore_elixir.ts +28 -0
- package/project/.sdk/src/cmp/elixir/MainEntity_elixir.ts +26 -0
- package/project/.sdk/src/cmp/elixir/Main_elixir.ts +124 -0
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +64 -0
- package/project/.sdk/src/cmp/elixir/TestDirect_elixir.ts +95 -0
- package/project/.sdk/src/cmp/elixir/TestEntity_elixir.ts +115 -0
- package/project/.sdk/src/cmp/elixir/Test_elixir.ts +47 -0
- package/project/.sdk/src/cmp/elixir/fragment/Entity.fragment.ex +37 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityCreateOp.fragment.ex +28 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityListOp.fragment.ex +30 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityLoadOp.fragment.ex +32 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityRemoveOp.fragment.ex +32 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityUpdateOp.fragment.ex +30 -0
- package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +218 -0
- package/project/.sdk/src/cmp/elixir/fragment/Pipeline.fragment.ex +62 -0
- package/project/.sdk/src/cmp/elixir/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/elixir/utility_elixir.ts +85 -0
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +62 -0
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +133 -0
- package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +14 -8
- package/project/.sdk/src/cmp/haskell/Config_haskell.ts +115 -0
- package/project/.sdk/src/cmp/haskell/Entity_haskell.ts +13 -0
- package/project/.sdk/src/cmp/haskell/Gitignore_haskell.ts +27 -0
- package/project/.sdk/src/cmp/haskell/Main_haskell.ts +123 -0
- package/project/.sdk/src/cmp/haskell/Package_haskell.ts +58 -0
- package/project/.sdk/src/cmp/haskell/Test_haskell.ts +263 -0
- package/project/.sdk/src/cmp/haskell/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/haskell/utility_haskell.ts +105 -0
- package/project/.sdk/src/cmp/java/Config_java.ts +138 -0
- package/project/.sdk/src/cmp/java/EntityBase_java.ts +50 -0
- package/project/.sdk/src/cmp/java/EntityOperation_java.ts +48 -0
- package/project/.sdk/src/cmp/java/Entity_java.ts +95 -0
- package/project/.sdk/src/cmp/java/Gitignore_java.ts +37 -0
- package/project/.sdk/src/cmp/java/MainEntity_java.ts +41 -0
- package/project/.sdk/src/cmp/java/Main_java.ts +100 -0
- package/project/.sdk/src/cmp/java/Package_java.ts +126 -0
- package/project/.sdk/src/cmp/java/SdkError_java.ts +49 -0
- package/project/.sdk/src/cmp/java/TestDirect_java.ts +509 -0
- package/project/.sdk/src/cmp/java/TestEntity_java.ts +599 -0
- package/project/.sdk/src/cmp/java/Test_java.ts +42 -0
- package/project/.sdk/src/cmp/java/fragment/Entity.fragment.java +35 -0
- package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +235 -0
- package/project/.sdk/src/cmp/java/fragment/EntityCreateOp.fragment.java +42 -0
- package/project/.sdk/src/cmp/java/fragment/EntityListOp.fragment.java +39 -0
- package/project/.sdk/src/cmp/java/fragment/EntityLoadOp.fragment.java +45 -0
- package/project/.sdk/src/cmp/java/fragment/EntityRemoveOp.fragment.java +45 -0
- package/project/.sdk/src/cmp/java/fragment/EntityUpdateOp.fragment.java +45 -0
- package/project/.sdk/src/cmp/java/fragment/Main.fragment.java +34 -0
- package/project/.sdk/src/cmp/java/fragment/SdkError.fragment.java +27 -0
- package/project/.sdk/src/cmp/java/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/java/utility_java.ts +102 -0
- package/project/.sdk/src/cmp/js/Config_js.ts +4 -2
- package/project/.sdk/src/cmp/js/TestEntity_js.ts +1 -0
- package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +32 -1
- package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +81 -0
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +10 -5
- package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +128 -0
- package/project/.sdk/src/cmp/kotlin/EntityBase_kotlin.ts +50 -0
- package/project/.sdk/src/cmp/kotlin/EntityOperation_kotlin.ts +48 -0
- package/project/.sdk/src/cmp/kotlin/Entity_kotlin.ts +93 -0
- package/project/.sdk/src/cmp/kotlin/Gitignore_kotlin.ts +41 -0
- package/project/.sdk/src/cmp/kotlin/MainEntity_kotlin.ts +40 -0
- package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +94 -0
- package/project/.sdk/src/cmp/kotlin/Package_kotlin.ts +110 -0
- package/project/.sdk/src/cmp/kotlin/SdkError_kotlin.ts +48 -0
- package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +479 -0
- package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +567 -0
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +42 -0
- package/project/.sdk/src/cmp/kotlin/fragment/Entity.fragment.kt +28 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +195 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityCreateOp.fragment.kt +37 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityListOp.fragment.kt +34 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityLoadOp.fragment.kt +40 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityRemoveOp.fragment.kt +40 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityUpdateOp.fragment.kt +40 -0
- package/project/.sdk/src/cmp/kotlin/fragment/Main.fragment.kt +28 -0
- package/project/.sdk/src/cmp/kotlin/fragment/SdkError.fragment.kt +24 -0
- package/project/.sdk/src/cmp/kotlin/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/kotlin/utility_kotlin.ts +101 -0
- package/project/.sdk/src/cmp/lua/Entity_lua.ts +7 -9
- package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +55 -0
- package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +137 -0
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +9 -6
- package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +114 -0
- package/project/.sdk/src/cmp/ocaml/EntityOperation_ocaml.ts +63 -0
- package/project/.sdk/src/cmp/ocaml/Entity_ocaml.ts +152 -0
- package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +37 -0
- package/project/.sdk/src/cmp/ocaml/MainEntity_ocaml.ts +28 -0
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +111 -0
- package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +47 -0
- package/project/.sdk/src/cmp/ocaml/SdkError_ocaml.ts +42 -0
- package/project/.sdk/src/cmp/ocaml/TestDirect_ocaml.ts +47 -0
- package/project/.sdk/src/cmp/ocaml/TestEntity_ocaml.ts +130 -0
- package/project/.sdk/src/cmp/ocaml/Test_ocaml.ts +35 -0
- package/project/.sdk/src/cmp/ocaml/fragment/RunOp.fragment.ml +32 -0
- package/project/.sdk/src/cmp/ocaml/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/ocaml/utility_ocaml.ts +129 -0
- package/project/.sdk/src/cmp/perl/Config_perl.ts +127 -0
- package/project/.sdk/src/cmp/perl/EntityOperation_perl.ts +42 -0
- package/project/.sdk/src/cmp/perl/Entity_perl.ts +84 -0
- package/project/.sdk/src/cmp/perl/Gitignore_perl.ts +32 -0
- package/project/.sdk/src/cmp/perl/MainEntity_perl.ts +34 -0
- package/project/.sdk/src/cmp/perl/Main_perl.ts +140 -0
- package/project/.sdk/src/cmp/perl/Package_perl.ts +63 -0
- package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +433 -0
- package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +515 -0
- package/project/.sdk/src/cmp/perl/Test_perl.ts +54 -0
- package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +235 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityCreateOp.fragment.pm +31 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityListOp.fragment.pm +43 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityLoadOp.fragment.pm +34 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityRemoveOp.fragment.pm +32 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityUpdateOp.fragment.pm +32 -0
- package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +263 -0
- package/project/.sdk/src/cmp/perl/fragment/SdkError.fragment.pm +27 -0
- package/project/.sdk/src/cmp/perl/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/perl/utility_perl.ts +30 -0
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +53 -0
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +124 -0
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +13 -6
- package/project/.sdk/src/cmp/py/Entity_py.ts +8 -9
- package/project/.sdk/src/cmp/py/TestEntity_py.ts +48 -0
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +135 -28
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +9 -6
- package/project/.sdk/src/cmp/rb/Entity_rb.ts +8 -9
- package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +4 -1
- package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +50 -0
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +122 -23
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +9 -6
- package/project/.sdk/src/cmp/rust/Config_rust.ts +118 -0
- package/project/.sdk/src/cmp/rust/EntityBase_rust.ts +59 -0
- package/project/.sdk/src/cmp/rust/EntityOperation_rust.ts +44 -0
- package/project/.sdk/src/cmp/rust/Entity_rust.ts +94 -0
- package/project/.sdk/src/cmp/rust/Gitignore_rust.ts +29 -0
- package/project/.sdk/src/cmp/rust/MainEntity_rust.ts +37 -0
- package/project/.sdk/src/cmp/rust/Main_rust.ts +146 -0
- package/project/.sdk/src/cmp/rust/Package_rust.ts +80 -0
- package/project/.sdk/src/cmp/rust/SdkError_rust.ts +42 -0
- package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +448 -0
- package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +635 -0
- package/project/.sdk/src/cmp/rust/Test_rust.ts +51 -0
- package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +288 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityCreateOp.fragment.rs +29 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityListOp.fragment.rs +26 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityLoadOp.fragment.rs +35 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityRemoveOp.fragment.rs +35 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityUpdateOp.fragment.rs +35 -0
- package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +296 -0
- package/project/.sdk/src/cmp/rust/fragment/SdkError.fragment.rs +34 -0
- package/project/.sdk/src/cmp/rust/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/rust/utility_rust.ts +104 -0
- package/project/.sdk/src/cmp/scala/Config_scala.ts +126 -0
- package/project/.sdk/src/cmp/scala/EntityBase_scala.ts +50 -0
- package/project/.sdk/src/cmp/scala/EntityOperation_scala.ts +46 -0
- package/project/.sdk/src/cmp/scala/Entity_scala.ts +87 -0
- package/project/.sdk/src/cmp/scala/Gitignore_scala.ts +31 -0
- package/project/.sdk/src/cmp/scala/MainEntity_scala.ts +40 -0
- package/project/.sdk/src/cmp/scala/Main_scala.ts +93 -0
- package/project/.sdk/src/cmp/scala/Package_scala.ts +22 -0
- package/project/.sdk/src/cmp/scala/TestDirect_scala.ts +233 -0
- package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +397 -0
- package/project/.sdk/src/cmp/scala/Test_scala.ts +93 -0
- package/project/.sdk/src/cmp/scala/fragment/Entity.fragment.scala +24 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +169 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityCreateOp.fragment.scala +32 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityListOp.fragment.scala +28 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityLoadOp.fragment.scala +33 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityRemoveOp.fragment.scala +33 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityUpdateOp.fragment.scala +33 -0
- package/project/.sdk/src/cmp/scala/fragment/Main.fragment.scala +27 -0
- package/project/.sdk/src/cmp/scala/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/scala/utility_scala.ts +99 -0
- package/project/.sdk/src/cmp/swift/Config_swift.ts +127 -0
- package/project/.sdk/src/cmp/swift/EntityBase_swift.ts +38 -0
- package/project/.sdk/src/cmp/swift/EntityOperation_swift.ts +39 -0
- package/project/.sdk/src/cmp/swift/Entity_swift.ts +86 -0
- package/project/.sdk/src/cmp/swift/Gitignore_swift.ts +32 -0
- package/project/.sdk/src/cmp/swift/MainEntity_swift.ts +35 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +94 -0
- package/project/.sdk/src/cmp/swift/Package_swift.ts +66 -0
- package/project/.sdk/src/cmp/swift/SdkError_swift.ts +41 -0
- package/project/.sdk/src/cmp/swift/TestDirect_swift.ts +84 -0
- package/project/.sdk/src/cmp/swift/TestEntity_swift.ts +84 -0
- package/project/.sdk/src/cmp/swift/Test_swift.ts +39 -0
- package/project/.sdk/src/cmp/swift/fragment/Entity.fragment.swift +23 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +202 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityCreateOp.fragment.swift +23 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityListOp.fragment.swift +21 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityLoadOp.fragment.swift +24 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityRemoveOp.fragment.swift +24 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityUpdateOp.fragment.swift +24 -0
- package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +211 -0
- package/project/.sdk/src/cmp/swift/fragment/SdkError.fragment.swift +22 -0
- package/project/.sdk/src/cmp/swift/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/swift/utility_swift.ts +76 -0
- package/project/.sdk/src/cmp/ts/Config_ts.ts +4 -2
- package/project/.sdk/src/cmp/ts/Package_ts.ts +12 -0
- package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +81 -0
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +10 -5
- package/project/.sdk/src/cmp/zig/Config_zig.ts +113 -0
- package/project/.sdk/src/cmp/zig/EntityOperation_zig.ts +39 -0
- package/project/.sdk/src/cmp/zig/Entity_zig.ts +89 -0
- package/project/.sdk/src/cmp/zig/Gitignore_zig.ts +27 -0
- package/project/.sdk/src/cmp/zig/MainEntity_zig.ts +38 -0
- package/project/.sdk/src/cmp/zig/Main_zig.ts +78 -0
- package/project/.sdk/src/cmp/zig/Test_zig.ts +114 -0
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +278 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityCreateOp.fragment.zig +24 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +21 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityLoadOp.fragment.zig +26 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityRemoveOp.fragment.zig +26 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityUpdateOp.fragment.zig +26 -0
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +258 -0
- package/project/.sdk/src/cmp/zig/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/zig/utility_zig.ts +95 -0
- package/project/.sdk/tm/c/LICENSE +22 -0
- package/project/.sdk/tm/c/Makefile +50 -0
- package/project/.sdk/tm/c/VERSION +1 -0
- package/project/.sdk/tm/c/core/context.c +145 -0
- package/project/.sdk/tm/c/core/control.c +19 -0
- package/project/.sdk/tm/c/core/error.c +24 -0
- package/project/.sdk/tm/c/core/helpers.c +228 -0
- package/project/.sdk/tm/c/core/operation.c +34 -0
- package/project/.sdk/tm/c/core/point.c +49 -0
- package/project/.sdk/tm/c/core/response.c +29 -0
- package/project/.sdk/tm/c/core/result.c +60 -0
- package/project/.sdk/tm/c/core/sdk.h +514 -0
- package/project/.sdk/tm/c/core/spec.c +94 -0
- package/project/.sdk/tm/c/core/utility.c +74 -0
- package/project/.sdk/tm/c/feature/audit.c +134 -0
- package/project/.sdk/tm/c/feature/base.c +40 -0
- package/project/.sdk/tm/c/feature/cache.c +262 -0
- package/project/.sdk/tm/c/feature/clienttrack.c +144 -0
- package/project/.sdk/tm/c/feature/debug.c +230 -0
- package/project/.sdk/tm/c/feature/idempotency.c +164 -0
- package/project/.sdk/tm/c/feature/log.c +79 -0
- package/project/.sdk/tm/c/feature/metrics.c +177 -0
- package/project/.sdk/tm/c/feature/netsim.c +211 -0
- package/project/.sdk/tm/c/feature/paging.c +223 -0
- package/project/.sdk/tm/c/feature/proxy.c +249 -0
- package/project/.sdk/tm/c/feature/ratelimit.c +124 -0
- package/project/.sdk/tm/c/feature/rbac.c +167 -0
- package/project/.sdk/tm/c/feature/retry.c +164 -0
- package/project/.sdk/tm/c/feature/streaming.c +147 -0
- package/project/.sdk/tm/c/feature/support.c +115 -0
- package/project/.sdk/tm/c/feature/telemetry.c +205 -0
- package/project/.sdk/tm/c/feature/test.c +385 -0
- package/project/.sdk/tm/c/feature/timeout.c +106 -0
- package/project/.sdk/tm/c/src/feature/README.md +1 -0
- package/project/.sdk/tm/c/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/c/tests/ctest.h +58 -0
- package/project/.sdk/tm/c/tests/feature_harness.h +441 -0
- package/project/.sdk/tm/c/tests/feature_test.c +1210 -0
- package/project/.sdk/tm/c/tests/pipeline_test.c +561 -0
- package/project/.sdk/tm/c/tests/primary_utility_test.c +573 -0
- package/project/.sdk/tm/c/tests/runner.h +274 -0
- package/project/.sdk/tm/c/tests/sdk_pipeline_test.c +89 -0
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +939 -0
- package/project/.sdk/tm/c/utility/clean.c +20 -0
- package/project/.sdk/tm/c/utility/done.c +26 -0
- package/project/.sdk/tm/c/utility/feature_add.c +42 -0
- package/project/.sdk/tm/c/utility/feature_hook.c +22 -0
- package/project/.sdk/tm/c/utility/feature_init.c +22 -0
- package/project/.sdk/tm/c/utility/fetcher.c +78 -0
- package/project/.sdk/tm/c/utility/jsonparse.c +11 -0
- package/project/.sdk/tm/c/utility/make_context.c +7 -0
- package/project/.sdk/tm/c/utility/make_error.c +66 -0
- package/project/.sdk/tm/c/utility/make_fetch_def.c +43 -0
- package/project/.sdk/tm/c/utility/make_options.c +179 -0
- package/project/.sdk/tm/c/utility/make_point.c +109 -0
- package/project/.sdk/tm/c/utility/make_request.c +62 -0
- package/project/.sdk/tm/c/utility/make_response.c +45 -0
- package/project/.sdk/tm/c/utility/make_result.c +61 -0
- package/project/.sdk/tm/c/utility/make_spec.c +60 -0
- package/project/.sdk/tm/c/utility/make_url.c +88 -0
- package/project/.sdk/tm/c/utility/param.c +58 -0
- package/project/.sdk/tm/c/utility/prepare_auth.c +65 -0
- package/project/.sdk/tm/c/utility/prepare_body.c +12 -0
- package/project/.sdk/tm/c/utility/prepare_headers.c +13 -0
- package/project/.sdk/tm/c/utility/prepare_method.c +16 -0
- package/project/.sdk/tm/c/utility/prepare_params.c +30 -0
- package/project/.sdk/tm/c/utility/prepare_path.c +17 -0
- package/project/.sdk/tm/c/utility/prepare_query.c +37 -0
- package/project/.sdk/tm/c/utility/result_basic.c +43 -0
- package/project/.sdk/tm/c/utility/result_body.c +17 -0
- package/project/.sdk/tm/c/utility/result_headers.c +17 -0
- package/project/.sdk/tm/c/utility/struct/inject.c +703 -0
- package/project/.sdk/tm/c/utility/struct/re_util.c +221 -0
- package/project/.sdk/tm/c/utility/struct/regex.c +1103 -0
- package/project/.sdk/tm/c/utility/struct/regex.h +84 -0
- package/project/.sdk/tm/c/utility/struct/transform.c +2224 -0
- package/project/.sdk/tm/c/utility/struct/utility.c +1971 -0
- package/project/.sdk/tm/c/utility/struct/value.c +640 -0
- package/project/.sdk/tm/c/utility/struct/value.h +273 -0
- package/project/.sdk/tm/c/utility/struct/value_io.c +366 -0
- package/project/.sdk/tm/c/utility/struct/value_io.h +31 -0
- package/project/.sdk/tm/c/utility/struct/voxgig_struct.h +216 -0
- package/project/.sdk/tm/c/utility/transform_request.c +21 -0
- package/project/.sdk/tm/c/utility/transform_response.c +36 -0
- package/project/.sdk/tm/clojure/LICENSE +22 -0
- package/project/.sdk/tm/clojure/Makefile +15 -0
- package/project/.sdk/tm/clojure/VERSION +1 -0
- package/project/.sdk/tm/clojure/src/feature/README.md +1 -0
- package/project/.sdk/tm/clojure/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/sdk/client.clj +119 -0
- package/project/.sdk/tm/clojure/src/sdk/core.clj +901 -0
- package/project/.sdk/tm/clojure/src/sdk/features.clj +1027 -0
- package/project/.sdk/tm/clojure/src/voxgig/struct.clj +1734 -0
- package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +596 -0
- package/project/.sdk/tm/clojure/test/sdk/test/netsim.clj +42 -0
- package/project/.sdk/tm/clojure/test/sdk/test/pipeline.clj +314 -0
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +52 -0
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +337 -0
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +39 -0
- package/project/.sdk/tm/clojure/test/sdk/testutil.clj +35 -0
- package/project/.sdk/tm/cpp/LICENSE +22 -0
- package/project/.sdk/tm/cpp/Makefile +36 -0
- package/project/.sdk/tm/cpp/VERSION +1 -0
- package/project/.sdk/tm/cpp/core/sdk.hpp +16 -0
- package/project/.sdk/tm/cpp/core/struct.hpp +225 -0
- package/project/.sdk/tm/cpp/core/types.hpp +1105 -0
- package/project/.sdk/tm/cpp/feature/audit.hpp +107 -0
- package/project/.sdk/tm/cpp/feature/base.hpp +34 -0
- package/project/.sdk/tm/cpp/feature/cache.hpp +189 -0
- package/project/.sdk/tm/cpp/feature/clienttrack.hpp +105 -0
- package/project/.sdk/tm/cpp/feature/debug.hpp +157 -0
- package/project/.sdk/tm/cpp/feature/idempotency.hpp +119 -0
- package/project/.sdk/tm/cpp/feature/log.hpp +90 -0
- package/project/.sdk/tm/cpp/feature/metrics.hpp +103 -0
- package/project/.sdk/tm/cpp/feature/netsim.hpp +152 -0
- package/project/.sdk/tm/cpp/feature/options.hpp +156 -0
- package/project/.sdk/tm/cpp/feature/paging.hpp +156 -0
- package/project/.sdk/tm/cpp/feature/proxy.hpp +145 -0
- package/project/.sdk/tm/cpp/feature/ratelimit.hpp +87 -0
- package/project/.sdk/tm/cpp/feature/rbac.hpp +108 -0
- package/project/.sdk/tm/cpp/feature/retry.hpp +130 -0
- package/project/.sdk/tm/cpp/feature/streaming.hpp +98 -0
- package/project/.sdk/tm/cpp/feature/telemetry.hpp +139 -0
- package/project/.sdk/tm/cpp/feature/test.hpp +289 -0
- package/project/.sdk/tm/cpp/feature/timeout.hpp +88 -0
- package/project/.sdk/tm/cpp/src/feature/README.md +1 -0
- package/project/.sdk/tm/cpp/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/test/custom_utility_test.cpp +57 -0
- package/project/.sdk/tm/cpp/test/exists_test.cpp +16 -0
- package/project/.sdk/tm/cpp/test/feature_test.cpp +911 -0
- package/project/.sdk/tm/cpp/test/harness.hpp +344 -0
- package/project/.sdk/tm/cpp/test/netsim_test.cpp +48 -0
- package/project/.sdk/tm/cpp/test/pipeline_test.cpp +526 -0
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +841 -0
- package/project/.sdk/tm/cpp/test/runner_support.hpp +437 -0
- package/project/.sdk/tm/cpp/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +494 -0
- package/project/.sdk/tm/cpp/test/struct_runner.hpp +314 -0
- package/project/.sdk/tm/cpp/test/testlib.hpp +82 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +1054 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/value.hpp +525 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/value_io.hpp +315 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/voxgig_struct.hpp +3379 -0
- package/project/.sdk/tm/csharp/LICENSE +22 -0
- package/project/.sdk/tm/csharp/Makefile +43 -0
- package/project/.sdk/tm/csharp/VERSION +1 -0
- package/project/.sdk/tm/csharp/core/Context.cs +257 -0
- package/project/.sdk/tm/csharp/core/Control.cs +17 -0
- package/project/.sdk/tm/csharp/core/Helpers.cs +61 -0
- package/project/.sdk/tm/csharp/core/Operation.cs +51 -0
- package/project/.sdk/tm/csharp/core/Point.cs +68 -0
- package/project/.sdk/tm/csharp/core/Response.cs +45 -0
- package/project/.sdk/tm/csharp/core/Result.cs +63 -0
- package/project/.sdk/tm/csharp/core/Spec.cs +81 -0
- package/project/.sdk/tm/csharp/core/Types.cs +21 -0
- package/project/.sdk/tm/csharp/core/Utility.cs +88 -0
- package/project/.sdk/tm/csharp/feature/AuditFeature.cs +116 -0
- package/project/.sdk/tm/csharp/feature/BaseFeature.cs +39 -0
- package/project/.sdk/tm/csharp/feature/CacheFeature.cs +186 -0
- package/project/.sdk/tm/csharp/feature/ClienttrackFeature.cs +103 -0
- package/project/.sdk/tm/csharp/feature/DebugFeature.cs +157 -0
- package/project/.sdk/tm/csharp/feature/FeatureOptions.cs +197 -0
- package/project/.sdk/tm/csharp/feature/IdempotencyFeature.cs +97 -0
- package/project/.sdk/tm/csharp/feature/LogFeature.cs +109 -0
- package/project/.sdk/tm/csharp/feature/MetricsFeature.cs +117 -0
- package/project/.sdk/tm/csharp/feature/NetsimFeature.cs +200 -0
- package/project/.sdk/tm/csharp/feature/PagingFeature.cs +187 -0
- package/project/.sdk/tm/csharp/feature/ProxyFeature.cs +138 -0
- package/project/.sdk/tm/csharp/feature/RatelimitFeature.cs +89 -0
- package/project/.sdk/tm/csharp/feature/RbacFeature.cs +124 -0
- package/project/.sdk/tm/csharp/feature/RetryFeature.cs +174 -0
- package/project/.sdk/tm/csharp/feature/StreamingFeature.cs +93 -0
- package/project/.sdk/tm/csharp/feature/TelemetryFeature.cs +145 -0
- package/project/.sdk/tm/csharp/feature/TestFeature.cs +368 -0
- package/project/.sdk/tm/csharp/feature/TimeoutFeature.cs +69 -0
- package/project/.sdk/tm/csharp/src/feature/README.md +1 -0
- package/project/.sdk/tm/csharp/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/test/CustomUtilityTest.cs +51 -0
- package/project/.sdk/tm/csharp/test/ExistsTest.cs +17 -0
- package/project/.sdk/tm/csharp/test/FeatureTest.cs +1653 -0
- package/project/.sdk/tm/csharp/test/NetsimTest.cs +67 -0
- package/project/.sdk/tm/csharp/test/PipelineTest.cs +605 -0
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +957 -0
- package/project/.sdk/tm/csharp/test/Runner.cs +626 -0
- package/project/.sdk/tm/csharp/test/StructRunner.cs +276 -0
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +1273 -0
- package/project/.sdk/tm/csharp/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/csharp/utility/Clean.cs +11 -0
- package/project/.sdk/tm/csharp/utility/Done.cs +28 -0
- package/project/.sdk/tm/csharp/utility/FeatureAdd.cs +54 -0
- package/project/.sdk/tm/csharp/utility/FeatureHook.cs +35 -0
- package/project/.sdk/tm/csharp/utility/FeatureInit.cs +28 -0
- package/project/.sdk/tm/csharp/utility/Fetcher.cs +181 -0
- package/project/.sdk/tm/csharp/utility/MakeContext.cs +11 -0
- package/project/.sdk/tm/csharp/utility/MakeError.cs +69 -0
- package/project/.sdk/tm/csharp/utility/MakeFetchDef.cs +38 -0
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +203 -0
- package/project/.sdk/tm/csharp/utility/MakePoint.cs +127 -0
- package/project/.sdk/tm/csharp/utility/MakeRequest.cs +87 -0
- package/project/.sdk/tm/csharp/utility/MakeResponse.cs +55 -0
- package/project/.sdk/tm/csharp/utility/MakeResult.cs +64 -0
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +64 -0
- package/project/.sdk/tm/csharp/utility/MakeUrl.cs +54 -0
- package/project/.sdk/tm/csharp/utility/Param.cs +67 -0
- package/project/.sdk/tm/csharp/utility/PrepareAuth.cs +54 -0
- package/project/.sdk/tm/csharp/utility/PrepareBody.cs +19 -0
- package/project/.sdk/tm/csharp/utility/PrepareHeaders.cs +22 -0
- package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +22 -0
- package/project/.sdk/tm/csharp/utility/PrepareParams.cs +38 -0
- package/project/.sdk/tm/csharp/utility/PreparePath.cs +18 -0
- package/project/.sdk/tm/csharp/utility/PrepareQuery.cs +40 -0
- package/project/.sdk/tm/csharp/utility/Register.cs +41 -0
- package/project/.sdk/tm/csharp/utility/ResultBasic.cs +39 -0
- package/project/.sdk/tm/csharp/utility/ResultBody.cs +22 -0
- package/project/.sdk/tm/csharp/utility/ResultHeaders.cs +26 -0
- package/project/.sdk/tm/csharp/utility/TransformRequest.cs +39 -0
- package/project/.sdk/tm/csharp/utility/TransformResponse.cs +53 -0
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +3582 -0
- package/project/.sdk/tm/dart/LICENSE +22 -0
- package/project/.sdk/tm/dart/Makefile +50 -0
- package/project/.sdk/tm/dart/lib/Context.dart +150 -0
- package/project/.sdk/tm/dart/lib/Control.dart +15 -0
- package/project/.sdk/tm/dart/lib/Operation.dart +31 -0
- package/project/.sdk/tm/dart/lib/Point.dart +43 -0
- package/project/.sdk/tm/dart/lib/Response.dart +32 -0
- package/project/.sdk/tm/dart/lib/Result.dart +39 -0
- package/project/.sdk/tm/dart/lib/Spec.dart +49 -0
- package/project/.sdk/tm/dart/lib/feature/audit/AuditFeature.dart +103 -0
- package/project/.sdk/tm/dart/lib/feature/base/BaseFeature.dart +76 -0
- package/project/.sdk/tm/dart/lib/feature/cache/CacheFeature.dart +152 -0
- package/project/.sdk/tm/dart/lib/feature/clienttrack/ClienttrackFeature.dart +104 -0
- package/project/.sdk/tm/dart/lib/feature/debug/DebugFeature.dart +153 -0
- package/project/.sdk/tm/dart/lib/feature/idempotency/IdempotencyFeature.dart +92 -0
- package/project/.sdk/tm/dart/lib/feature/log/LogFeature.dart +85 -0
- package/project/.sdk/tm/dart/lib/feature/metrics/MetricsFeature.dart +103 -0
- package/project/.sdk/tm/dart/lib/feature/netsim/NetsimFeature.dart +186 -0
- package/project/.sdk/tm/dart/lib/feature/paging/PagingFeature.dart +145 -0
- package/project/.sdk/tm/dart/lib/feature/proxy/ProxyFeature.dart +118 -0
- package/project/.sdk/tm/dart/lib/feature/ratelimit/RatelimitFeature.dart +103 -0
- package/project/.sdk/tm/dart/lib/feature/rbac/RbacFeature.dart +121 -0
- package/project/.sdk/tm/dart/lib/feature/retry/RetryFeature.dart +155 -0
- package/project/.sdk/tm/dart/lib/feature/streaming/StreamingFeature.dart +97 -0
- package/project/.sdk/tm/dart/lib/feature/telemetry/TelemetryFeature.dart +136 -0
- package/project/.sdk/tm/dart/lib/feature/test/TestFeature.dart +270 -0
- package/project/.sdk/tm/dart/lib/feature/timeout/TimeoutFeature.dart +104 -0
- package/project/.sdk/tm/dart/lib/utility/CleanUtility.dart +12 -0
- package/project/.sdk/tm/dart/lib/utility/DoneUtility.dart +18 -0
- package/project/.sdk/tm/dart/lib/utility/ErrUtility.dart +46 -0
- package/project/.sdk/tm/dart/lib/utility/FeatureAddUtility.dart +35 -0
- package/project/.sdk/tm/dart/lib/utility/FeatureHookUtility.dart +20 -0
- package/project/.sdk/tm/dart/lib/utility/FeatureInitUtility.dart +9 -0
- package/project/.sdk/tm/dart/lib/utility/FetcherUtility.dart +95 -0
- package/project/.sdk/tm/dart/lib/utility/MakeContextUtility.dart +6 -0
- package/project/.sdk/tm/dart/lib/utility/MakeErrorUtility.dart +67 -0
- package/project/.sdk/tm/dart/lib/utility/MakeFetchDefUtility.dart +42 -0
- package/project/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +147 -0
- package/project/.sdk/tm/dart/lib/utility/MakePointUtility.dart +84 -0
- package/project/.sdk/tm/dart/lib/utility/MakeRequestUtility.dart +63 -0
- package/project/.sdk/tm/dart/lib/utility/MakeResponseUtility.dart +54 -0
- package/project/.sdk/tm/dart/lib/utility/MakeResultUtility.dart +49 -0
- package/project/.sdk/tm/dart/lib/utility/MakeSpecUtility.dart +61 -0
- package/project/.sdk/tm/dart/lib/utility/MakeUrlUtility.dart +51 -0
- package/project/.sdk/tm/dart/lib/utility/ParamUtility.dart +56 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareAuthUtility.dart +46 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareBodyUtility.dart +19 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareHeadersUtility.dart +11 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareMethodUtility.dart +15 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareParamsUtility.dart +23 -0
- package/project/.sdk/tm/dart/lib/utility/PreparePathUtility.dart +9 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareQueryUtility.dart +18 -0
- package/project/.sdk/tm/dart/lib/utility/ResultBasicUtility.dart +29 -0
- package/project/.sdk/tm/dart/lib/utility/ResultBodyUtility.dart +15 -0
- package/project/.sdk/tm/dart/lib/utility/ResultHeadersUtility.dart +18 -0
- package/project/.sdk/tm/dart/lib/utility/StructUtility.dart +127 -0
- package/project/.sdk/tm/dart/lib/utility/TransformRequestUtility.dart +28 -0
- package/project/.sdk/tm/dart/lib/utility/TransformResponseUtility.dart +44 -0
- package/project/.sdk/tm/dart/lib/utility/Utility.dart +230 -0
- package/project/.sdk/tm/dart/lib/utility/voxgig_struct.dart +2456 -0
- package/project/.sdk/tm/dart/src/feature/README.md +3 -0
- package/project/.sdk/tm/dart/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/dart/test/custom_test.dart +65 -0
- package/project/.sdk/tm/dart/test/exists_test.dart +12 -0
- package/project/.sdk/tm/dart/test/feature/harness.dart +329 -0
- package/project/.sdk/tm/dart/test/feature_test.dart +1139 -0
- package/project/.sdk/tm/dart/test/harness.dart +153 -0
- package/project/.sdk/tm/dart/test/netsim_test.dart +48 -0
- package/project/.sdk/tm/dart/test/pipeline_test.dart +608 -0
- package/project/.sdk/tm/dart/test/primary_test.dart +411 -0
- package/project/.sdk/tm/dart/test/runner.dart +406 -0
- package/project/.sdk/tm/dart/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/dart/test/struct_corpus.dart +531 -0
- package/project/.sdk/tm/dart/test/struct_test.dart +41 -0
- package/project/.sdk/tm/dart/test/utility.dart +159 -0
- package/project/.sdk/tm/elixir/LICENSE +21 -0
- package/project/.sdk/tm/elixir/Makefile +15 -0
- package/project/.sdk/tm/elixir/VERSION +1 -0
- package/project/.sdk/tm/elixir/lib/projectname/context.ex +138 -0
- package/project/.sdk/tm/elixir/lib/projectname/core.ex +125 -0
- package/project/.sdk/tm/elixir/lib/projectname/entity_base.ex +155 -0
- package/project/.sdk/tm/elixir/lib/projectname/error.ex +16 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/audit.ex +125 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/cache.ex +170 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/clienttrack.ex +136 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/debug.ex +232 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/idempotency.ex +107 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/log.ex +62 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/metrics.ex +130 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/netsim.ex +213 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/paging.ex +191 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/proxy.ex +142 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/ratelimit.ex +81 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/rbac.ex +139 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/retry.ex +150 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/streaming.ex +107 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/telemetry.ex +172 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/test.ex +285 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/timeout.ex +64 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature.ex +90 -0
- package/project/.sdk/tm/elixir/lib/projectname/helpers.ex +66 -0
- package/project/.sdk/tm/elixir/lib/projectname/json.ex +115 -0
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +1257 -0
- package/project/.sdk/tm/elixir/lib/utility/struct/voxgig_struct.ex +2615 -0
- package/project/.sdk/tm/elixir/src/feature/README.md +3 -0
- package/project/.sdk/tm/elixir/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/test/feature_test.exs +879 -0
- package/project/.sdk/tm/elixir/test/netsim_test.exs +58 -0
- package/project/.sdk/tm/elixir/test/pipeline_test.exs +558 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +133 -0
- package/project/.sdk/tm/elixir/test/stream_test.exs +119 -0
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +18 -0
- package/project/.sdk/tm/elixir/test/support/feature_harness.ex +346 -0
- package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +677 -0
- package/project/.sdk/tm/elixir/test/test_helper.exs +1 -0
- package/project/.sdk/tm/go/core/context.go +10 -0
- package/project/.sdk/tm/go/core/control.go +2 -0
- package/project/.sdk/tm/go/core/result.go +6 -0
- package/project/.sdk/tm/go/core/types.go +1 -0
- package/project/.sdk/tm/go/feature/audit_feature.go +110 -0
- package/project/.sdk/tm/go/feature/base_feature.go +8 -0
- package/project/.sdk/tm/go/feature/cache_feature.go +171 -0
- package/project/.sdk/tm/go/feature/clienttrack_feature.go +100 -0
- package/project/.sdk/tm/go/feature/debug_feature.go +159 -0
- package/project/.sdk/tm/go/feature/feature_options.go +204 -0
- package/project/.sdk/tm/go/feature/idempotency_feature.go +115 -0
- package/project/.sdk/tm/go/feature/metrics_feature.go +112 -0
- package/project/.sdk/tm/go/feature/netsim_feature.go +184 -0
- package/project/.sdk/tm/go/feature/paging_feature.go +173 -0
- package/project/.sdk/tm/go/feature/proxy_feature.go +121 -0
- package/project/.sdk/tm/go/feature/ratelimit_feature.go +88 -0
- package/project/.sdk/tm/go/feature/rbac_feature.go +126 -0
- package/project/.sdk/tm/go/feature/retry_feature.go +165 -0
- package/project/.sdk/tm/go/feature/streaming_feature.go +119 -0
- package/project/.sdk/tm/go/feature/telemetry_feature.go +142 -0
- package/project/.sdk/tm/go/feature/test_feature.go +78 -3
- package/project/.sdk/tm/go/feature/timeout_feature.go +88 -0
- package/project/.sdk/tm/go/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/feature_test.go +1465 -0
- package/project/.sdk/tm/go/test/netsim_test.go +70 -0
- package/project/.sdk/tm/go/test/pipeline_test.go +571 -0
- package/project/.sdk/tm/go/utility/feature_add.go +38 -0
- package/project/.sdk/tm/go/utility/fetcher.go +13 -1
- package/project/.sdk/tm/go/utility/make_error.go +8 -0
- package/project/.sdk/tm/go/utility/make_options.go +62 -0
- package/project/.sdk/tm/go/utility/make_point.go +6 -0
- package/project/.sdk/tm/go-cli/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/LICENSE +21 -0
- package/project/.sdk/tm/haskell/Makefile +22 -0
- package/project/.sdk/tm/haskell/VERSION +1 -0
- package/project/.sdk/tm/haskell/src/SdkFeatures.hs +1278 -0
- package/project/.sdk/tm/haskell/src/SdkHelpers.hs +337 -0
- package/project/.sdk/tm/haskell/src/SdkRuntime.hs +1007 -0
- package/project/.sdk/tm/haskell/src/SdkTypes.hs +186 -0
- package/project/.sdk/tm/haskell/src/VoxgigStruct.hs +2299 -0
- package/project/.sdk/tm/haskell/src/Vregex.hs +237 -0
- package/project/.sdk/tm/haskell/src/feature/README.md +5 -0
- package/project/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/test/Harness.hs +276 -0
- package/project/.sdk/tm/haskell/test/Runner.hs +47 -0
- package/project/.sdk/tm/haskell/test/StructCorpus.hs +449 -0
- package/project/.sdk/tm/haskell/test/TCustomUtility.hs +38 -0
- package/project/.sdk/tm/haskell/test/TFeature.hs +794 -0
- package/project/.sdk/tm/haskell/test/TNetsim.hs +50 -0
- package/project/.sdk/tm/haskell/test/TPipeline.hs +334 -0
- package/project/.sdk/tm/haskell/test/TPrimaryUtility.hs +386 -0
- package/project/.sdk/tm/haskell/test/TestJson.hs +107 -0
- package/project/.sdk/tm/haskell/test/Testutil.hs +59 -0
- package/project/.sdk/tm/java/LICENSE +22 -0
- package/project/.sdk/tm/java/Makefile +44 -0
- package/project/.sdk/tm/java/VERSION +1 -0
- package/project/.sdk/tm/java/core/Context.java +269 -0
- package/project/.sdk/tm/java/core/Control.java +23 -0
- package/project/.sdk/tm/java/core/Entity.java +13 -0
- package/project/.sdk/tm/java/core/Feature.java +45 -0
- package/project/.sdk/tm/java/core/FeaturePlacement.java +13 -0
- package/project/.sdk/tm/java/core/Helpers.java +50 -0
- package/project/.sdk/tm/java/core/Operation.java +47 -0
- package/project/.sdk/tm/java/core/Point.java +90 -0
- package/project/.sdk/tm/java/core/Response.java +48 -0
- package/project/.sdk/tm/java/core/Result.java +64 -0
- package/project/.sdk/tm/java/core/SdkClient.java +280 -0
- package/project/.sdk/tm/java/core/SdkEntity.java +28 -0
- package/project/.sdk/tm/java/core/Spec.java +84 -0
- package/project/.sdk/tm/java/core/Utility.java +128 -0
- package/project/.sdk/tm/java/feature/AuditFeature.java +113 -0
- package/project/.sdk/tm/java/feature/BaseFeature.java +91 -0
- package/project/.sdk/tm/java/feature/CacheFeature.java +184 -0
- package/project/.sdk/tm/java/feature/ClienttrackFeature.java +103 -0
- package/project/.sdk/tm/java/feature/DebugFeature.java +163 -0
- package/project/.sdk/tm/java/feature/FeatureOptions.java +204 -0
- package/project/.sdk/tm/java/feature/IdempotencyFeature.java +115 -0
- package/project/.sdk/tm/java/feature/LogFeature.java +143 -0
- package/project/.sdk/tm/java/feature/MetricsFeature.java +115 -0
- package/project/.sdk/tm/java/feature/NetsimFeature.java +181 -0
- package/project/.sdk/tm/java/feature/PagingFeature.java +178 -0
- package/project/.sdk/tm/java/feature/ProxyFeature.java +122 -0
- package/project/.sdk/tm/java/feature/RatelimitFeature.java +83 -0
- package/project/.sdk/tm/java/feature/RbacFeature.java +132 -0
- package/project/.sdk/tm/java/feature/RetryFeature.java +156 -0
- package/project/.sdk/tm/java/feature/StreamingFeature.java +110 -0
- package/project/.sdk/tm/java/feature/TelemetryFeature.java +146 -0
- package/project/.sdk/tm/java/feature/TestFeature.java +333 -0
- package/project/.sdk/tm/java/feature/TimeoutFeature.java +89 -0
- package/project/.sdk/tm/java/src/feature/README.md +1 -0
- package/project/.sdk/tm/java/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/java/test/CustomUtilityTest.java +59 -0
- package/project/.sdk/tm/java/test/ExistsTest.java +16 -0
- package/project/.sdk/tm/java/test/FeatureHarness.java +448 -0
- package/project/.sdk/tm/java/test/FeatureTest.java +1018 -0
- package/project/.sdk/tm/java/test/NetsimTest.java +59 -0
- package/project/.sdk/tm/java/test/PipelineTest.java +618 -0
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +864 -0
- package/project/.sdk/tm/java/test/RunnerSupport.java +545 -0
- package/project/.sdk/tm/java/test/StructCorpusTest.java +351 -0
- package/project/.sdk/tm/java/test/StructRunner.java +281 -0
- package/project/.sdk/tm/java/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/java/utility/Clean.java +12 -0
- package/project/.sdk/tm/java/utility/Done.java +29 -0
- package/project/.sdk/tm/java/utility/FeatureAdd.java +59 -0
- package/project/.sdk/tm/java/utility/FeatureHookUtil.java +72 -0
- package/project/.sdk/tm/java/utility/FeatureInit.java +35 -0
- package/project/.sdk/tm/java/utility/Fetcher.java +170 -0
- package/project/.sdk/tm/java/utility/Json.java +268 -0
- package/project/.sdk/tm/java/utility/MakeContext.java +14 -0
- package/project/.sdk/tm/java/utility/MakeError.java +81 -0
- package/project/.sdk/tm/java/utility/MakeFetchDef.java +48 -0
- package/project/.sdk/tm/java/utility/MakeOptions.java +168 -0
- package/project/.sdk/tm/java/utility/MakePoint.java +118 -0
- package/project/.sdk/tm/java/utility/MakeRequest.java +83 -0
- package/project/.sdk/tm/java/utility/MakeResponse.java +54 -0
- package/project/.sdk/tm/java/utility/MakeResult.java +68 -0
- package/project/.sdk/tm/java/utility/MakeSpec.java +69 -0
- package/project/.sdk/tm/java/utility/MakeUrl.java +67 -0
- package/project/.sdk/tm/java/utility/Param.java +74 -0
- package/project/.sdk/tm/java/utility/PrepareAuth.java +66 -0
- package/project/.sdk/tm/java/utility/PrepareBody.java +16 -0
- package/project/.sdk/tm/java/utility/PrepareHeaders.java +28 -0
- package/project/.sdk/tm/java/utility/PrepareMethod.java +28 -0
- package/project/.sdk/tm/java/utility/PrepareParams.java +50 -0
- package/project/.sdk/tm/java/utility/PreparePath.java +26 -0
- package/project/.sdk/tm/java/utility/PrepareQuery.java +54 -0
- package/project/.sdk/tm/java/utility/Register.java +41 -0
- package/project/.sdk/tm/java/utility/ResultBasic.java +36 -0
- package/project/.sdk/tm/java/utility/ResultBody.java +23 -0
- package/project/.sdk/tm/java/utility/ResultHeaders.java +36 -0
- package/project/.sdk/tm/java/utility/TransformRequest.java +35 -0
- package/project/.sdk/tm/java/utility/TransformResponse.java +52 -0
- package/project/.sdk/tm/java/utility/struct/Struct.java +3550 -0
- package/project/.sdk/tm/js/src/feature/audit/AuditFeature.js +96 -0
- package/project/.sdk/tm/js/src/feature/cache/CacheFeature.js +150 -0
- package/project/.sdk/tm/js/src/feature/clienttrack/ClienttrackFeature.js +104 -0
- package/project/.sdk/tm/js/src/feature/debug/DebugFeature.js +132 -0
- package/project/.sdk/tm/js/src/feature/idempotency/IdempotencyFeature.js +95 -0
- package/project/.sdk/tm/js/src/feature/metrics/MetricsFeature.js +102 -0
- package/project/.sdk/tm/js/src/feature/netsim/NetsimFeature.js +187 -0
- package/project/.sdk/tm/js/src/feature/paging/PagingFeature.js +139 -0
- package/project/.sdk/tm/js/src/feature/proxy/ProxyFeature.js +110 -0
- package/project/.sdk/tm/js/src/feature/ratelimit/RatelimitFeature.js +106 -0
- package/project/.sdk/tm/js/src/feature/rbac/RbacFeature.js +102 -0
- package/project/.sdk/tm/js/src/feature/retry/RetryFeature.js +158 -0
- package/project/.sdk/tm/js/src/feature/streaming/StreamingFeature.js +96 -0
- package/project/.sdk/tm/js/src/feature/telemetry/TelemetryFeature.js +128 -0
- package/project/.sdk/tm/js/src/feature/test/TestFeature.js +58 -1
- package/project/.sdk/tm/js/src/feature/timeout/TimeoutFeature.js +101 -0
- package/project/.sdk/tm/js/src/utility/FeatureHookUtility.js +4 -1
- package/project/.sdk/tm/js/src/utility/MakeErrorUtility.js +9 -0
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +31 -1
- package/project/.sdk/tm/js/test/feature/harness.js +275 -0
- package/project/.sdk/tm/js/test/feature.test.js +772 -0
- package/project/.sdk/tm/js/test/netsim.test.js +43 -0
- package/project/.sdk/tm/js/test/pipeline.test.js +382 -0
- package/project/.sdk/tm/kotlin/LICENSE +22 -0
- package/project/.sdk/tm/kotlin/Makefile +43 -0
- package/project/.sdk/tm/kotlin/VERSION +1 -0
- package/project/.sdk/tm/kotlin/core/Context.kt +247 -0
- package/project/.sdk/tm/kotlin/core/Control.kt +21 -0
- package/project/.sdk/tm/kotlin/core/Helpers.kt +49 -0
- package/project/.sdk/tm/kotlin/core/Interfaces.kt +88 -0
- package/project/.sdk/tm/kotlin/core/Operation.kt +43 -0
- package/project/.sdk/tm/kotlin/core/Point.kt +83 -0
- package/project/.sdk/tm/kotlin/core/Response.kt +43 -0
- package/project/.sdk/tm/kotlin/core/Result.kt +61 -0
- package/project/.sdk/tm/kotlin/core/SdkClient.kt +266 -0
- package/project/.sdk/tm/kotlin/core/Spec.kt +76 -0
- package/project/.sdk/tm/kotlin/core/Utility.kt +93 -0
- package/project/.sdk/tm/kotlin/feature/AuditFeature.kt +96 -0
- package/project/.sdk/tm/kotlin/feature/BaseFeature.kt +57 -0
- package/project/.sdk/tm/kotlin/feature/CacheFeature.kt +167 -0
- package/project/.sdk/tm/kotlin/feature/ClienttrackFeature.kt +84 -0
- package/project/.sdk/tm/kotlin/feature/DebugFeature.kt +141 -0
- package/project/.sdk/tm/kotlin/feature/FeatureOptions.kt +191 -0
- package/project/.sdk/tm/kotlin/feature/IdempotencyFeature.kt +98 -0
- package/project/.sdk/tm/kotlin/feature/LogFeature.kt +92 -0
- package/project/.sdk/tm/kotlin/feature/MetricsFeature.kt +96 -0
- package/project/.sdk/tm/kotlin/feature/NetsimFeature.kt +162 -0
- package/project/.sdk/tm/kotlin/feature/PagingFeature.kt +143 -0
- package/project/.sdk/tm/kotlin/feature/ProxyFeature.kt +109 -0
- package/project/.sdk/tm/kotlin/feature/RatelimitFeature.kt +77 -0
- package/project/.sdk/tm/kotlin/feature/RbacFeature.kt +100 -0
- package/project/.sdk/tm/kotlin/feature/RetryFeature.kt +140 -0
- package/project/.sdk/tm/kotlin/feature/StreamingFeature.kt +90 -0
- package/project/.sdk/tm/kotlin/feature/TelemetryFeature.kt +118 -0
- package/project/.sdk/tm/kotlin/feature/TestFeature.kt +306 -0
- package/project/.sdk/tm/kotlin/feature/TimeoutFeature.kt +74 -0
- package/project/.sdk/tm/kotlin/src/feature/README.md +1 -0
- package/project/.sdk/tm/kotlin/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/test/CustomUtilityTest.kt +51 -0
- package/project/.sdk/tm/kotlin/test/ExistsTest.kt +15 -0
- package/project/.sdk/tm/kotlin/test/FeatureHarness.kt +380 -0
- package/project/.sdk/tm/kotlin/test/FeatureTest.kt +924 -0
- package/project/.sdk/tm/kotlin/test/NetsimTest.kt +50 -0
- package/project/.sdk/tm/kotlin/test/PipelineTest.kt +556 -0
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +829 -0
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +477 -0
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +297 -0
- package/project/.sdk/tm/kotlin/test/StructRunner.kt +177 -0
- package/project/.sdk/tm/kotlin/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/kotlin/utility/CoreUtil.kt +96 -0
- package/project/.sdk/tm/kotlin/utility/FeatureUtil.kt +121 -0
- package/project/.sdk/tm/kotlin/utility/Fetcher.kt +156 -0
- package/project/.sdk/tm/kotlin/utility/Json.kt +237 -0
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +152 -0
- package/project/.sdk/tm/kotlin/utility/MakePoint.kt +108 -0
- package/project/.sdk/tm/kotlin/utility/MakeReqRes.kt +152 -0
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +142 -0
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +236 -0
- package/project/.sdk/tm/kotlin/utility/Register.kt +39 -0
- package/project/.sdk/tm/kotlin/utility/ResultTransform.kt +109 -0
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +2697 -0
- package/project/.sdk/tm/lua/feature/audit_feature.lua +132 -0
- package/project/.sdk/tm/lua/feature/cache_feature.lua +188 -0
- package/project/.sdk/tm/lua/feature/clienttrack_feature.lua +127 -0
- package/project/.sdk/tm/lua/feature/debug_feature.lua +194 -0
- package/project/.sdk/tm/lua/feature/idempotency_feature.lua +127 -0
- package/project/.sdk/tm/lua/feature/metrics_feature.lua +135 -0
- package/project/.sdk/tm/lua/feature/netsim_feature.lua +205 -0
- package/project/.sdk/tm/lua/feature/paging_feature.lua +180 -0
- package/project/.sdk/tm/lua/feature/proxy_feature.lua +147 -0
- package/project/.sdk/tm/lua/feature/ratelimit_feature.lua +120 -0
- package/project/.sdk/tm/lua/feature/rbac_feature.lua +141 -0
- package/project/.sdk/tm/lua/feature/retry_feature.lua +188 -0
- package/project/.sdk/tm/lua/feature/streaming_feature.lua +143 -0
- package/project/.sdk/tm/lua/feature/telemetry_feature.lua +159 -0
- package/project/.sdk/tm/lua/feature/test_feature.lua +85 -1
- package/project/.sdk/tm/lua/feature/timeout_feature.lua +94 -0
- package/project/.sdk/tm/lua/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/lua/test/feature_test.lua +1244 -0
- package/project/.sdk/tm/lua/test/netsim_test.lua +61 -0
- package/project/.sdk/tm/lua/test/pipeline_test.lua +613 -0
- package/project/.sdk/tm/lua/utility/feature_add.lua +28 -1
- package/project/.sdk/tm/lua/utility/make_error.lua +9 -0
- package/project/.sdk/tm/lua/utility/make_options.lua +58 -0
- package/project/.sdk/tm/lua/utility/make_point.lua +8 -1
- package/project/.sdk/tm/ocaml/LICENSE +21 -0
- package/project/.sdk/tm/ocaml/Makefile +58 -0
- package/project/.sdk/tm/ocaml/VERSION +1 -0
- package/project/.sdk/tm/ocaml/sdk_features.ml +1127 -0
- package/project/.sdk/tm/ocaml/sdk_helpers.ml +110 -0
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +942 -0
- package/project/.sdk/tm/ocaml/sdk_types.ml +259 -0
- package/project/.sdk/tm/ocaml/src/feature/README.md +1 -0
- package/project/.sdk/tm/ocaml/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/test/custom_utility.ml +30 -0
- package/project/.sdk/tm/ocaml/test/harness.ml +198 -0
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +487 -0
- package/project/.sdk/tm/ocaml/test/t_feature.ml +533 -0
- package/project/.sdk/tm/ocaml/test/t_main.ml +5 -0
- package/project/.sdk/tm/ocaml/test/t_pipeline.ml +354 -0
- package/project/.sdk/tm/ocaml/test/testutil.ml +57 -0
- package/project/.sdk/tm/ocaml/utility/voxgig_struct.ml +1858 -0
- package/project/.sdk/tm/ocaml/utility/vregex.ml +254 -0
- package/project/.sdk/tm/perl/LICENSE +22 -0
- package/project/.sdk/tm/perl/Makefile +57 -0
- package/project/.sdk/tm/perl/core/context.pm +138 -0
- package/project/.sdk/tm/perl/core/control.pm +22 -0
- package/project/.sdk/tm/perl/core/error.pm +30 -0
- package/project/.sdk/tm/perl/core/helpers.pm +142 -0
- package/project/.sdk/tm/perl/core/operation.pm +47 -0
- package/project/.sdk/tm/perl/core/response.pm +40 -0
- package/project/.sdk/tm/perl/core/result.pm +45 -0
- package/project/.sdk/tm/perl/core/spec.pm +33 -0
- package/project/.sdk/tm/perl/core/utility_type.pm +32 -0
- package/project/.sdk/tm/perl/feature/audit_feature.pm +128 -0
- package/project/.sdk/tm/perl/feature/base_feature.pm +41 -0
- package/project/.sdk/tm/perl/feature/cache_feature.pm +168 -0
- package/project/.sdk/tm/perl/feature/clienttrack_feature.pm +126 -0
- package/project/.sdk/tm/perl/feature/debug_feature.pm +168 -0
- package/project/.sdk/tm/perl/feature/idempotency_feature.pm +104 -0
- package/project/.sdk/tm/perl/feature/log_feature.pm +77 -0
- package/project/.sdk/tm/perl/feature/metrics_feature.pm +124 -0
- package/project/.sdk/tm/perl/feature/netsim_feature.pm +215 -0
- package/project/.sdk/tm/perl/feature/paging_feature.pm +158 -0
- package/project/.sdk/tm/perl/feature/proxy_feature.pm +128 -0
- package/project/.sdk/tm/perl/feature/ratelimit_feature.pm +126 -0
- package/project/.sdk/tm/perl/feature/rbac_feature.pm +124 -0
- package/project/.sdk/tm/perl/feature/retry_feature.pm +153 -0
- package/project/.sdk/tm/perl/feature/streaming_feature.pm +112 -0
- package/project/.sdk/tm/perl/feature/telemetry_feature.pm +155 -0
- package/project/.sdk/tm/perl/feature/test_feature.pm +314 -0
- package/project/.sdk/tm/perl/feature/timeout_feature.pm +110 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +2897 -0
- package/project/.sdk/tm/perl/src/feature/README.md +3 -0
- package/project/.sdk/tm/perl/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/perl/t/feature.t +1054 -0
- package/project/.sdk/tm/perl/t/netsim.t +55 -0
- package/project/.sdk/tm/perl/t/pipeline.t +632 -0
- package/project/.sdk/tm/perl/t/primary_utility.t +1023 -0
- package/project/.sdk/tm/perl/t/runner.pm +140 -0
- package/project/.sdk/tm/perl/t/sdk-test-control.json +19 -0
- package/project/.sdk/tm/perl/t/stream.t +132 -0
- package/project/.sdk/tm/perl/t/struct_runner.pm +275 -0
- package/project/.sdk/tm/perl/t/struct_utility.t +438 -0
- package/project/.sdk/tm/perl/utility/clean.pm +15 -0
- package/project/.sdk/tm/perl/utility/done.pm +34 -0
- package/project/.sdk/tm/perl/utility/feature_add.pm +47 -0
- package/project/.sdk/tm/perl/utility/feature_hook.pm +25 -0
- package/project/.sdk/tm/perl/utility/feature_init.pm +33 -0
- package/project/.sdk/tm/perl/utility/fetcher.pm +112 -0
- package/project/.sdk/tm/perl/utility/make_context.pm +22 -0
- package/project/.sdk/tm/perl/utility/make_error.pm +74 -0
- package/project/.sdk/tm/perl/utility/make_fetch_def.pm +46 -0
- package/project/.sdk/tm/perl/utility/make_options.pm +123 -0
- package/project/.sdk/tm/perl/utility/make_point.pm +104 -0
- package/project/.sdk/tm/perl/utility/make_request.pm +66 -0
- package/project/.sdk/tm/perl/utility/make_response.pm +38 -0
- package/project/.sdk/tm/perl/utility/make_result.pm +53 -0
- package/project/.sdk/tm/perl/utility/make_spec.pm +71 -0
- package/project/.sdk/tm/perl/utility/make_url.pm +63 -0
- package/project/.sdk/tm/perl/utility/param.pm +65 -0
- package/project/.sdk/tm/perl/utility/prepare_auth.pm +56 -0
- package/project/.sdk/tm/perl/utility/prepare_body.pm +17 -0
- package/project/.sdk/tm/perl/utility/prepare_headers.pm +27 -0
- package/project/.sdk/tm/perl/utility/prepare_method.pm +25 -0
- package/project/.sdk/tm/perl/utility/prepare_params.pm +41 -0
- package/project/.sdk/tm/perl/utility/prepare_path.pm +29 -0
- package/project/.sdk/tm/perl/utility/prepare_query.pm +40 -0
- package/project/.sdk/tm/perl/utility/register.pm +53 -0
- package/project/.sdk/tm/perl/utility/result_basic.pm +38 -0
- package/project/.sdk/tm/perl/utility/result_body.pm +28 -0
- package/project/.sdk/tm/perl/utility/result_headers.pm +32 -0
- package/project/.sdk/tm/perl/utility/transform_request.pm +30 -0
- package/project/.sdk/tm/perl/utility/transform_response.pm +43 -0
- package/project/.sdk/tm/php/core/Result.php +10 -0
- package/project/.sdk/tm/php/feature/AuditFeature.php +125 -0
- package/project/.sdk/tm/php/feature/BaseFeature.php +6 -0
- package/project/.sdk/tm/php/feature/CacheFeature.php +158 -0
- package/project/.sdk/tm/php/feature/ClienttrackFeature.php +126 -0
- package/project/.sdk/tm/php/feature/DebugFeature.php +167 -0
- package/project/.sdk/tm/php/feature/IdempotencyFeature.php +102 -0
- package/project/.sdk/tm/php/feature/MetricsFeature.php +122 -0
- package/project/.sdk/tm/php/feature/NetsimFeature.php +190 -0
- package/project/.sdk/tm/php/feature/PagingFeature.php +153 -0
- package/project/.sdk/tm/php/feature/ProxyFeature.php +136 -0
- package/project/.sdk/tm/php/feature/RatelimitFeature.php +116 -0
- package/project/.sdk/tm/php/feature/RbacFeature.php +133 -0
- package/project/.sdk/tm/php/feature/RetryFeature.php +159 -0
- package/project/.sdk/tm/php/feature/StreamingFeature.php +107 -0
- package/project/.sdk/tm/php/feature/TelemetryFeature.php +156 -0
- package/project/.sdk/tm/php/feature/TestFeature.php +80 -1
- package/project/.sdk/tm/php/feature/TimeoutFeature.php +95 -0
- package/project/.sdk/tm/php/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/php/test/FeatureTest.php +1259 -0
- package/project/.sdk/tm/php/test/NetsimTest.php +53 -0
- package/project/.sdk/tm/php/test/PipelineTest.php +674 -0
- package/project/.sdk/tm/php/utility/FeatureAdd.php +32 -1
- package/project/.sdk/tm/php/utility/MakeError.php +9 -0
- package/project/.sdk/tm/php/utility/MakeOptions.php +46 -0
- package/project/.sdk/tm/php/utility/MakePoint.php +7 -0
- package/project/.sdk/tm/py/core/context.py +4 -0
- package/project/.sdk/tm/py/core/control.py +3 -0
- package/project/.sdk/tm/py/feature/audit_feature.py +98 -0
- package/project/.sdk/tm/py/feature/cache_feature.py +138 -0
- package/project/.sdk/tm/py/feature/clienttrack_feature.py +97 -0
- package/project/.sdk/tm/py/feature/debug_feature.py +134 -0
- package/project/.sdk/tm/py/feature/idempotency_feature.py +89 -0
- package/project/.sdk/tm/py/feature/metrics_feature.py +93 -0
- package/project/.sdk/tm/py/feature/netsim_feature.py +170 -0
- package/project/.sdk/tm/py/feature/paging_feature.py +134 -0
- package/project/.sdk/tm/py/feature/proxy_feature.py +104 -0
- package/project/.sdk/tm/py/feature/ratelimit_feature.py +98 -0
- package/project/.sdk/tm/py/feature/rbac_feature.py +102 -0
- package/project/.sdk/tm/py/feature/retry_feature.py +142 -0
- package/project/.sdk/tm/py/feature/streaming_feature.py +84 -0
- package/project/.sdk/tm/py/feature/telemetry_feature.py +128 -0
- package/project/.sdk/tm/py/feature/test_feature.py +70 -1
- package/project/.sdk/tm/py/feature/timeout_feature.py +78 -0
- package/project/.sdk/tm/py/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/feature_harness.py +336 -0
- package/project/.sdk/tm/py/test/test_feature.py +807 -0
- package/project/.sdk/tm/py/test/test_netsim.py +52 -0
- package/project/.sdk/tm/py/test/test_pipeline.py +606 -0
- package/project/.sdk/tm/py/utility/feature_add.py +25 -1
- package/project/.sdk/tm/py/utility/make_error.py +8 -0
- package/project/.sdk/tm/py/utility/make_options.py +32 -0
- package/project/.sdk/tm/py/utility/make_point.py +8 -2
- package/project/.sdk/tm/py/utility/make_request.py +6 -2
- package/project/.sdk/tm/py/utility/make_response.py +6 -2
- package/project/.sdk/tm/py/utility/make_result.py +6 -2
- package/project/.sdk/tm/py/utility/make_spec.py +6 -2
- package/project/.sdk/tm/rb/core/context.rb +2 -0
- package/project/.sdk/tm/rb/core/control.rb +5 -1
- package/project/.sdk/tm/rb/core/result.rb +2 -1
- package/project/.sdk/tm/rb/feature/audit_feature.rb +103 -0
- package/project/.sdk/tm/rb/feature/base_feature.rb +5 -0
- package/project/.sdk/tm/rb/feature/cache_feature.rb +133 -0
- package/project/.sdk/tm/rb/feature/clienttrack_feature.rb +91 -0
- package/project/.sdk/tm/rb/feature/debug_feature.rb +138 -0
- package/project/.sdk/tm/rb/feature/idempotency_feature.rb +78 -0
- package/project/.sdk/tm/rb/feature/metrics_feature.rb +91 -0
- package/project/.sdk/tm/rb/feature/netsim_feature.rb +167 -0
- package/project/.sdk/tm/rb/feature/paging_feature.rb +120 -0
- package/project/.sdk/tm/rb/feature/proxy_feature.rb +93 -0
- package/project/.sdk/tm/rb/feature/ratelimit_feature.rb +95 -0
- package/project/.sdk/tm/rb/feature/rbac_feature.rb +96 -0
- package/project/.sdk/tm/rb/feature/retry_feature.rb +116 -0
- package/project/.sdk/tm/rb/feature/streaming_feature.rb +85 -0
- package/project/.sdk/tm/rb/feature/telemetry_feature.rb +122 -0
- package/project/.sdk/tm/rb/feature/test_feature.rb +65 -1
- package/project/.sdk/tm/rb/feature/timeout_feature.rb +74 -0
- package/project/.sdk/tm/rb/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/rb/test/feature_test.rb +1031 -0
- package/project/.sdk/tm/rb/test/netsim_test.rb +48 -0
- package/project/.sdk/tm/rb/test/pipeline_test.rb +584 -0
- package/project/.sdk/tm/rb/utility/feature_add.rb +28 -1
- package/project/.sdk/tm/rb/utility/make_error.rb +8 -0
- package/project/.sdk/tm/rb/utility/make_options.rb +35 -0
- package/project/.sdk/tm/rb/utility/make_point.rb +7 -1
- package/project/.sdk/tm/rust/LICENSE +22 -0
- package/project/.sdk/tm/rust/Makefile +41 -0
- package/project/.sdk/tm/rust/VERSION +1 -0
- package/project/.sdk/tm/rust/core/context.rs +320 -0
- package/project/.sdk/tm/rust/core/control.rs +37 -0
- package/project/.sdk/tm/rust/core/helpers.rs +168 -0
- package/project/.sdk/tm/rust/core/mod.rs +18 -0
- package/project/.sdk/tm/rust/core/operation.rs +35 -0
- package/project/.sdk/tm/rust/core/point.rs +68 -0
- package/project/.sdk/tm/rust/core/response.rs +38 -0
- package/project/.sdk/tm/rust/core/result.rs +90 -0
- package/project/.sdk/tm/rust/core/spec.rs +109 -0
- package/project/.sdk/tm/rust/core/types.rs +105 -0
- package/project/.sdk/tm/rust/core/utility_type.rs +184 -0
- package/project/.sdk/tm/rust/feature/audit.rs +138 -0
- package/project/.sdk/tm/rust/feature/base.rs +49 -0
- package/project/.sdk/tm/rust/feature/cache.rs +198 -0
- package/project/.sdk/tm/rust/feature/clienttrack.rs +154 -0
- package/project/.sdk/tm/rust/feature/debug.rs +188 -0
- package/project/.sdk/tm/rust/feature/idempotency.rs +139 -0
- package/project/.sdk/tm/rust/feature/log.rs +114 -0
- package/project/.sdk/tm/rust/feature/metrics.rs +136 -0
- package/project/.sdk/tm/rust/feature/mod.rs +24 -0
- package/project/.sdk/tm/rust/feature/netsim.rs +233 -0
- package/project/.sdk/tm/rust/feature/paging.rs +209 -0
- package/project/.sdk/tm/rust/feature/proxy.rs +165 -0
- package/project/.sdk/tm/rust/feature/ratelimit.rs +116 -0
- package/project/.sdk/tm/rust/feature/rbac.rs +152 -0
- package/project/.sdk/tm/rust/feature/retry.rs +190 -0
- package/project/.sdk/tm/rust/feature/streaming.rs +124 -0
- package/project/.sdk/tm/rust/feature/support.rs +145 -0
- package/project/.sdk/tm/rust/feature/telemetry.rs +185 -0
- package/project/.sdk/tm/rust/feature/test.rs +397 -0
- package/project/.sdk/tm/rust/feature/timeout.rs +103 -0
- package/project/.sdk/tm/rust/src/feature/README.md +1 -0
- package/project/.sdk/tm/rust/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/rust/tests/common/mod.rs +969 -0
- package/project/.sdk/tm/rust/tests/custom_utility_test.rs +69 -0
- package/project/.sdk/tm/rust/tests/feature_test.rs +1864 -0
- package/project/.sdk/tm/rust/tests/netsim_test.rs +78 -0
- package/project/.sdk/tm/rust/tests/pipeline_test.rs +699 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +999 -0
- package/project/.sdk/tm/rust/tests/sdk-test-control.json +19 -0
- package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +424 -0
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +733 -0
- package/project/.sdk/tm/rust/utility/clean.rs +13 -0
- package/project/.sdk/tm/rust/utility/done.rs +31 -0
- package/project/.sdk/tm/rust/utility/feature_add.rs +46 -0
- package/project/.sdk/tm/rust/utility/feature_hook.rs +18 -0
- package/project/.sdk/tm/rust/utility/feature_init.rs +26 -0
- package/project/.sdk/tm/rust/utility/fetcher.rs +142 -0
- package/project/.sdk/tm/rust/utility/jsonparse.rs +211 -0
- package/project/.sdk/tm/rust/utility/make_context.rs +7 -0
- package/project/.sdk/tm/rust/utility/make_error.rs +79 -0
- package/project/.sdk/tm/rust/utility/make_fetch_def.rs +42 -0
- package/project/.sdk/tm/rust/utility/make_options.rs +175 -0
- package/project/.sdk/tm/rust/utility/make_point.rs +116 -0
- package/project/.sdk/tm/rust/utility/make_request.rs +73 -0
- package/project/.sdk/tm/rust/utility/make_response.rs +56 -0
- package/project/.sdk/tm/rust/utility/make_result.rs +64 -0
- package/project/.sdk/tm/rust/utility/make_spec.rs +70 -0
- package/project/.sdk/tm/rust/utility/make_url.rs +83 -0
- package/project/.sdk/tm/rust/utility/mod.rs +36 -0
- package/project/.sdk/tm/rust/utility/param.rs +67 -0
- package/project/.sdk/tm/rust/utility/prepare_auth.rs +65 -0
- package/project/.sdk/tm/rust/utility/prepare_body.rs +14 -0
- package/project/.sdk/tm/rust/utility/prepare_headers.rs +23 -0
- package/project/.sdk/tm/rust/utility/prepare_method.rs +18 -0
- package/project/.sdk/tm/rust/utility/prepare_params.rs +33 -0
- package/project/.sdk/tm/rust/utility/prepare_path.rs +17 -0
- package/project/.sdk/tm/rust/utility/prepare_query.rs +47 -0
- package/project/.sdk/tm/rust/utility/result_basic.rs +35 -0
- package/project/.sdk/tm/rust/utility/result_body.rs +26 -0
- package/project/.sdk/tm/rust/utility/result_headers.rs +24 -0
- package/project/.sdk/tm/rust/utility/transform_request.rs +31 -0
- package/project/.sdk/tm/rust/utility/transform_response.rs +55 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/consts.rs +122 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/major.rs +2688 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/mini.rs +1081 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/mod.rs +70 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/ordered_map.rs +159 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/re.rs +1229 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/value.rs +372 -0
- package/project/.sdk/tm/scala/LICENSE +22 -0
- package/project/.sdk/tm/scala/Makefile +24 -0
- package/project/.sdk/tm/scala/VERSION +1 -0
- package/project/.sdk/tm/scala/core/Context.scala +160 -0
- package/project/.sdk/tm/scala/core/Contracts.scala +76 -0
- package/project/.sdk/tm/scala/core/Control.scala +23 -0
- package/project/.sdk/tm/scala/core/Helpers.scala +38 -0
- package/project/.sdk/tm/scala/core/Operation.scala +37 -0
- package/project/.sdk/tm/scala/core/Point.scala +44 -0
- package/project/.sdk/tm/scala/core/Response.scala +37 -0
- package/project/.sdk/tm/scala/core/Result.scala +42 -0
- package/project/.sdk/tm/scala/core/SdkClient.scala +220 -0
- package/project/.sdk/tm/scala/core/SdkError.scala +15 -0
- package/project/.sdk/tm/scala/core/Spec.scala +39 -0
- package/project/.sdk/tm/scala/core/Types.scala +31 -0
- package/project/.sdk/tm/scala/core/Utility.scala +85 -0
- package/project/.sdk/tm/scala/feature/AuditFeature.scala +101 -0
- package/project/.sdk/tm/scala/feature/BaseFeature.scala +21 -0
- package/project/.sdk/tm/scala/feature/CacheFeature.scala +181 -0
- package/project/.sdk/tm/scala/feature/ClienttrackFeature.scala +93 -0
- package/project/.sdk/tm/scala/feature/DebugFeature.scala +149 -0
- package/project/.sdk/tm/scala/feature/FeatureOptions.scala +111 -0
- package/project/.sdk/tm/scala/feature/IdempotencyFeature.scala +106 -0
- package/project/.sdk/tm/scala/feature/LogFeature.scala +64 -0
- package/project/.sdk/tm/scala/feature/MetricsFeature.scala +105 -0
- package/project/.sdk/tm/scala/feature/NetsimFeature.scala +134 -0
- package/project/.sdk/tm/scala/feature/PagingFeature.scala +170 -0
- package/project/.sdk/tm/scala/feature/ProxyFeature.scala +113 -0
- package/project/.sdk/tm/scala/feature/RatelimitFeature.scala +58 -0
- package/project/.sdk/tm/scala/feature/RbacFeature.scala +90 -0
- package/project/.sdk/tm/scala/feature/RetryFeature.scala +104 -0
- package/project/.sdk/tm/scala/feature/StreamingFeature.scala +98 -0
- package/project/.sdk/tm/scala/feature/TelemetryFeature.scala +129 -0
- package/project/.sdk/tm/scala/feature/TestFeature.scala +253 -0
- package/project/.sdk/tm/scala/feature/TimeoutFeature.scala +57 -0
- package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +766 -0
- package/project/.sdk/tm/scala/sdktest/SdkTestSupport.scala +93 -0
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
- package/project/.sdk/tm/scala/sdktest/sdk-test-control.json +19 -0
- package/project/.sdk/tm/scala/src/feature/README.md +1 -0
- package/project/.sdk/tm/scala/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/scala/utility/FeatureUtils.scala +68 -0
- package/project/.sdk/tm/scala/utility/Fetcher.scala +129 -0
- package/project/.sdk/tm/scala/utility/Json.java +268 -0
- package/project/.sdk/tm/scala/utility/Make.scala +463 -0
- package/project/.sdk/tm/scala/utility/MakeSpec.scala +49 -0
- package/project/.sdk/tm/scala/utility/Misc.scala +68 -0
- package/project/.sdk/tm/scala/utility/Prepare.scala +142 -0
- package/project/.sdk/tm/scala/utility/Register.scala +38 -0
- package/project/.sdk/tm/scala/utility/Results.scala +63 -0
- package/project/.sdk/tm/scala/utility/StructUtility.scala +29 -0
- package/project/.sdk/tm/scala/utility/Transform.scala +52 -0
- package/project/.sdk/tm/scala/utility/struct/Struct.java +3550 -0
- package/project/.sdk/tm/scala/utility/struct/voxgig_struct.scala +1833 -0
- package/project/.sdk/tm/swift/LICENSE +22 -0
- package/project/.sdk/tm/swift/Makefile +41 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +113 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +260 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +111 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/JSON.swift +327 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Merge.swift +55 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +601 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/OrderedDictionary.swift +79 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Path.swift +157 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Select.swift +259 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Transform.swift +462 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +378 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Value.swift +184 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Walk.swift +44 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Context.swift +161 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Control.swift +20 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Operation.swift +27 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Point.swift +37 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Response.swift +29 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Result.swift +41 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Spec.swift +36 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Support.swift +98 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Types.swift +25 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Utility.swift +81 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/AuditFeature.swift +99 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/BaseFeature.swift +60 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/CacheFeature.swift +164 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ClienttrackFeature.swift +95 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/DebugFeature.swift +126 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/FeatureOptions.swift +96 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/IdempotencyFeature.swift +80 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/LogFeature.swift +69 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/MetricsFeature.swift +103 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/NetsimFeature.swift +177 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/PagingFeature.swift +154 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ProxyFeature.swift +122 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RatelimitFeature.swift +79 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RbacFeature.swift +103 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RetryFeature.swift +150 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/StreamingFeature.swift +82 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TelemetryFeature.swift +119 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +257 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TimeoutFeature.swift +83 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Feature.swift +56 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +107 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Make.swift +321 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeError.swift +56 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +151 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +157 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Register.swift +40 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/ResultUtil.swift +107 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/CustomUtilityTest.swift +44 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/ExistsTest.swift +12 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/FeatureTest.swift +1049 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/NetsimTest.swift +50 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PipelineTest.swift +398 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +750 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +237 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +523 -0
- package/project/.sdk/tm/swift/VERSION +1 -0
- package/project/.sdk/tm/swift/src/feature/README.md +6 -0
- package/project/.sdk/tm/swift/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/ts/Makefile +6 -1
- package/project/.sdk/tm/ts/src/feature/audit/AuditFeature.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/cache/CacheFeature.ts +152 -0
- package/project/.sdk/tm/ts/src/feature/clienttrack/ClienttrackFeature.ts +106 -0
- package/project/.sdk/tm/ts/src/feature/debug/DebugFeature.ts +134 -0
- package/project/.sdk/tm/ts/src/feature/idempotency/IdempotencyFeature.ts +97 -0
- package/project/.sdk/tm/ts/src/feature/metrics/MetricsFeature.ts +104 -0
- package/project/.sdk/tm/ts/src/feature/netsim/NetsimFeature.ts +189 -0
- package/project/.sdk/tm/ts/src/feature/paging/PagingFeature.ts +141 -0
- package/project/.sdk/tm/ts/src/feature/proxy/ProxyFeature.ts +112 -0
- package/project/.sdk/tm/ts/src/feature/ratelimit/RatelimitFeature.ts +108 -0
- package/project/.sdk/tm/ts/src/feature/rbac/RbacFeature.ts +104 -0
- package/project/.sdk/tm/ts/src/feature/retry/RetryFeature.ts +160 -0
- package/project/.sdk/tm/ts/src/feature/streaming/StreamingFeature.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/telemetry/TelemetryFeature.ts +130 -0
- package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +58 -1
- package/project/.sdk/tm/ts/src/feature/timeout/TimeoutFeature.ts +103 -0
- package/project/.sdk/tm/ts/src/utility/FeatureHookUtility.ts +4 -1
- package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +9 -0
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +31 -1
- package/project/.sdk/tm/ts/test/feature/harness.ts +293 -0
- package/project/.sdk/tm/ts/test/feature.test.ts +772 -0
- package/project/.sdk/tm/ts/test/netsim.test.ts +43 -0
- package/project/.sdk/tm/ts/test/pipeline.test.ts +382 -0
- package/project/.sdk/tm/zig/LICENSE +21 -0
- package/project/.sdk/tm/zig/Makefile +31 -0
- package/project/.sdk/tm/zig/VERSION +1 -0
- package/project/.sdk/tm/zig/build.zig +58 -0
- package/project/.sdk/tm/zig/build.zig.zon +11 -0
- package/project/.sdk/tm/zig/core/context.zig +258 -0
- package/project/.sdk/tm/zig/core/control.zig +26 -0
- package/project/.sdk/tm/zig/core/error.zig +28 -0
- package/project/.sdk/tm/zig/core/helpers.zig +326 -0
- package/project/.sdk/tm/zig/core/mem.zig +20 -0
- package/project/.sdk/tm/zig/core/operation.zig +34 -0
- package/project/.sdk/tm/zig/core/point.zig +63 -0
- package/project/.sdk/tm/zig/core/response.zig +32 -0
- package/project/.sdk/tm/zig/core/result.zig +73 -0
- package/project/.sdk/tm/zig/core/spec.zig +68 -0
- package/project/.sdk/tm/zig/core/types.zig +101 -0
- package/project/.sdk/tm/zig/core/utility.zig +1115 -0
- package/project/.sdk/tm/zig/feature/audit.zig +131 -0
- package/project/.sdk/tm/zig/feature/base.zig +52 -0
- package/project/.sdk/tm/zig/feature/cache.zig +216 -0
- package/project/.sdk/tm/zig/feature/clienttrack.zig +129 -0
- package/project/.sdk/tm/zig/feature/debug.zig +191 -0
- package/project/.sdk/tm/zig/feature/idempotency.zig +121 -0
- package/project/.sdk/tm/zig/feature/log.zig +93 -0
- package/project/.sdk/tm/zig/feature/metrics.zig +145 -0
- package/project/.sdk/tm/zig/feature/netsim.zig +186 -0
- package/project/.sdk/tm/zig/feature/paging.zig +201 -0
- package/project/.sdk/tm/zig/feature/proxy.zig +180 -0
- package/project/.sdk/tm/zig/feature/ratelimit.zig +123 -0
- package/project/.sdk/tm/zig/feature/rbac.zig +126 -0
- package/project/.sdk/tm/zig/feature/retry.zig +167 -0
- package/project/.sdk/tm/zig/feature/streaming.zig +127 -0
- package/project/.sdk/tm/zig/feature/support.zig +128 -0
- package/project/.sdk/tm/zig/feature/telemetry.zig +165 -0
- package/project/.sdk/tm/zig/feature/test.zig +315 -0
- package/project/.sdk/tm/zig/feature/timeout.zig +105 -0
- package/project/.sdk/tm/zig/root.zig +74 -0
- package/project/.sdk/tm/zig/src/feature/README.md +1 -0
- package/project/.sdk/tm/zig/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/zig/test/feature_test.zig +1045 -0
- package/project/.sdk/tm/zig/test/fh.zig +531 -0
- package/project/.sdk/tm/zig/test/gotcha_test.zig +230 -0
- package/project/.sdk/tm/zig/test/pipeline_test.zig +493 -0
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +346 -0
- package/project/.sdk/tm/zig/test/struct_corpus.zig +1145 -0
- package/project/.sdk/tm/zig/test/struct_runner.zig +226 -0
- package/project/.sdk/tm/zig/utility/jsonparse.zig +13 -0
- package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +779 -0
- package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +4400 -0
|
@@ -0,0 +1,1127 @@
|
|
|
1
|
+
(* ProjectName SDK features + API-agnostic client helpers.
|
|
2
|
+
*
|
|
3
|
+
* The 18 pipeline features (base/test/log + the 15 enterprise features) and
|
|
4
|
+
* the transport they wrap, plus make_client_base / direct / prepare / test.
|
|
5
|
+
* Each feature is built by a constructor that closes over `ref`s for its
|
|
6
|
+
* mutable state and returns a `feature` record whose init/hook closures
|
|
7
|
+
* observe and mutate the shared pipeline state. Transport-wrapping features
|
|
8
|
+
* re-bind the mutable `u_fetcher` field so later inits sit outermost. *)
|
|
9
|
+
|
|
10
|
+
open Voxgig_struct
|
|
11
|
+
open Sdk_types
|
|
12
|
+
open Sdk_helpers
|
|
13
|
+
open Sdk_runtime
|
|
14
|
+
|
|
15
|
+
(* ------------------------------------------------------------------ *)
|
|
16
|
+
(* option readers *)
|
|
17
|
+
(* ------------------------------------------------------------------ *)
|
|
18
|
+
|
|
19
|
+
let opt_num opts key ~default = match getp opts key with Num n -> n | _ -> default
|
|
20
|
+
let opt_int opts key ~default = match getp opts key with Num n -> int_of_float n | _ -> default
|
|
21
|
+
let opt_str opts key ~default = match getp opts key with Str s -> s | _ -> default
|
|
22
|
+
let opt_active opts = getp opts "active" = Bool true
|
|
23
|
+
|
|
24
|
+
let opt_str_list opts key ~default =
|
|
25
|
+
match getp opts key with
|
|
26
|
+
| List r -> List.filter_map (function Str s -> Some s | _ -> None) !r
|
|
27
|
+
| _ -> default
|
|
28
|
+
|
|
29
|
+
let now_of opts =
|
|
30
|
+
match getp opts "now" with
|
|
31
|
+
| Func _ as f -> (match call_vfn f Noval with Num n -> n | _ -> 0.0)
|
|
32
|
+
| _ -> default_now_ms ()
|
|
33
|
+
|
|
34
|
+
let sleep_of opts (ms : float) =
|
|
35
|
+
if ms > 0.0 then
|
|
36
|
+
(match getp opts "sleep" with Func _ as f -> ignore (call_vfn f (Num ms)) | _ -> ())
|
|
37
|
+
|
|
38
|
+
let track_bucket (client : sdk_client) (name : string) (mk : unit -> value) : value =
|
|
39
|
+
match track_get client name with
|
|
40
|
+
| Map _ as m -> m
|
|
41
|
+
| _ -> let m = mk () in track_set client name m; m
|
|
42
|
+
|
|
43
|
+
let bump_num (m : value) (key : string) (by : float) =
|
|
44
|
+
setp m key (Num ((match getp m key with Num n -> n | _ -> 0.) +. by))
|
|
45
|
+
|
|
46
|
+
let string_upper = String.uppercase_ascii
|
|
47
|
+
let string_lower = String.lowercase_ascii
|
|
48
|
+
|
|
49
|
+
let header_ci (headers : value) (name : string) : value =
|
|
50
|
+
let lname = string_lower name in
|
|
51
|
+
let rec go = function
|
|
52
|
+
| [] -> Noval
|
|
53
|
+
| k :: rest -> if string_lower k = lname then getp headers k else go rest
|
|
54
|
+
in
|
|
55
|
+
go (keysof headers)
|
|
56
|
+
|
|
57
|
+
let ends_with s suf =
|
|
58
|
+
let ls = String.length s and lf = String.length suf in
|
|
59
|
+
ls >= lf && String.sub s (ls - lf) lf = suf
|
|
60
|
+
|
|
61
|
+
let strip_lead_dot s =
|
|
62
|
+
if String.length s > 0 && s.[0] = '.' then String.sub s 1 (String.length s - 1) else s
|
|
63
|
+
|
|
64
|
+
let url_host (url : string) : string =
|
|
65
|
+
let n = String.length url in
|
|
66
|
+
let rec find i = if i + 3 > n then None else if String.sub url i 3 = "://" then Some (i + 3) else find (i + 1) in
|
|
67
|
+
match find 0 with
|
|
68
|
+
| Some start ->
|
|
69
|
+
let rec endp j = if j >= n then j else (match url.[j] with '/' | ':' -> j | _ -> endp (j + 1)) in
|
|
70
|
+
let e = endp start in String.sub url start (e - start)
|
|
71
|
+
| None -> url
|
|
72
|
+
|
|
73
|
+
let vstr_of (v : value) : string = match v with Str s -> s | Noval | Null -> "" | _ -> js_string v
|
|
74
|
+
|
|
75
|
+
let rec take_n n l =
|
|
76
|
+
if n <= 0 then ([], l)
|
|
77
|
+
else match l with [] -> ([], []) | x :: xs -> let (a, b) = take_n (n - 1) xs in (x :: a, b)
|
|
78
|
+
|
|
79
|
+
(* ------------------------------------------------------------------ *)
|
|
80
|
+
(* base / log *)
|
|
81
|
+
(* ------------------------------------------------------------------ *)
|
|
82
|
+
|
|
83
|
+
let base_feature () : feature =
|
|
84
|
+
{ f_name = "base"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
85
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) }
|
|
86
|
+
|
|
87
|
+
let log_feature () : feature =
|
|
88
|
+
let f = { f_name = "log"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
89
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
90
|
+
f.f_init <- (fun _ctx opts -> f.f_active <- opt_active opts);
|
|
91
|
+
f
|
|
92
|
+
|
|
93
|
+
(* ------------------------------------------------------------------ *)
|
|
94
|
+
(* retry *)
|
|
95
|
+
(* ------------------------------------------------------------------ *)
|
|
96
|
+
|
|
97
|
+
let retry_feature () : feature =
|
|
98
|
+
let options = ref (empty_map ()) in
|
|
99
|
+
let f = { f_name = "retry"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
100
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
101
|
+
let retry_after res_v =
|
|
102
|
+
match res_v with
|
|
103
|
+
| Map _ ->
|
|
104
|
+
(match getp res_v "headers" with
|
|
105
|
+
| Map _ as h -> (match header_ci h "retry-after" with
|
|
106
|
+
| Noval | Null -> None
|
|
107
|
+
| v -> (try Some (float_of_string (vstr_of v) *. 1000.) with _ -> None))
|
|
108
|
+
| _ -> None)
|
|
109
|
+
| _ -> None
|
|
110
|
+
in
|
|
111
|
+
let statuses () = match getp !options "statuses" with
|
|
112
|
+
| List r -> List.filter_map (function Num n -> Some (int_of_float n) | _ -> None) !r
|
|
113
|
+
| _ -> [408; 425; 429; 500; 502; 503; 504] in
|
|
114
|
+
let retryable res_v err raised =
|
|
115
|
+
if raised <> None || err <> None then true
|
|
116
|
+
else if is_noval res_v then true
|
|
117
|
+
else (match getp res_v "status" with
|
|
118
|
+
| Num n -> List.mem (int_of_float n) (statuses ())
|
|
119
|
+
| _ -> false) in
|
|
120
|
+
let backoff res_v attempt =
|
|
121
|
+
let min_delay = opt_num !options "minDelay" ~default:50. in
|
|
122
|
+
let max_delay = opt_num !options "maxDelay" ~default:2000. in
|
|
123
|
+
let factor = opt_num !options "factor" ~default:2. in
|
|
124
|
+
match retry_after res_v with
|
|
125
|
+
| Some ra -> Float.min max_delay ra
|
|
126
|
+
| None ->
|
|
127
|
+
let base = min_delay *. (factor ** float_of_int attempt) in
|
|
128
|
+
let jitter = if getp !options "jitter" = Bool false then 0. else Random.float 1. *. min_delay in
|
|
129
|
+
Float.min max_delay (base +. jitter) in
|
|
130
|
+
let track ctx =
|
|
131
|
+
let cl = cc ctx in
|
|
132
|
+
let bucket = track_bucket cl "retry" (fun () -> jo [("attempts", Num 0.); ("retries", empty_list ())]) in
|
|
133
|
+
bump_num bucket "attempts" 1. in
|
|
134
|
+
let with_retry ctx url fetchdef inner =
|
|
135
|
+
let retries = opt_int !options "retries" ~default:2 in
|
|
136
|
+
let attempt = ref 0 in
|
|
137
|
+
let result = ref (Noval, None) in
|
|
138
|
+
let running = ref true in
|
|
139
|
+
while !running do
|
|
140
|
+
let res = ref Noval and err = ref None and raised = ref None in
|
|
141
|
+
(try let (r, e) = inner ctx url fetchdef in res := r; err := e
|
|
142
|
+
with e -> raised := Some e);
|
|
143
|
+
if not (retryable !res !err !raised) || !attempt >= retries then begin
|
|
144
|
+
(match !raised with Some e -> raise e | None -> ());
|
|
145
|
+
result := (!res, !err); running := false
|
|
146
|
+
end else begin
|
|
147
|
+
let wait = backoff !res !attempt in
|
|
148
|
+
track ctx;
|
|
149
|
+
sleep_of !options wait;
|
|
150
|
+
incr attempt
|
|
151
|
+
end
|
|
152
|
+
done;
|
|
153
|
+
!result in
|
|
154
|
+
f.f_init <- (fun ctx opts ->
|
|
155
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
156
|
+
f.f_active <- opt_active opts;
|
|
157
|
+
if f.f_active then begin
|
|
158
|
+
let u = cu ctx in
|
|
159
|
+
let inner = u.u_fetcher in
|
|
160
|
+
u.u_fetcher <- (fun fctx url fd -> with_retry fctx url fd inner)
|
|
161
|
+
end);
|
|
162
|
+
f
|
|
163
|
+
|
|
164
|
+
(* ------------------------------------------------------------------ *)
|
|
165
|
+
(* timeout *)
|
|
166
|
+
(* ------------------------------------------------------------------ *)
|
|
167
|
+
|
|
168
|
+
let timeout_feature () : feature =
|
|
169
|
+
let options = ref (empty_map ()) in
|
|
170
|
+
let f = { f_name = "timeout"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
171
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
172
|
+
let track ctx ms =
|
|
173
|
+
let cl = cc ctx in
|
|
174
|
+
let bucket = track_bucket cl "timeout" (fun () -> jo [("count", Num 0.); ("ms", Num ms)]) in
|
|
175
|
+
bump_num bucket "count" 1. in
|
|
176
|
+
let with_timeout ctx url fetchdef inner =
|
|
177
|
+
let ms = opt_num !options "ms" ~default:30000. in
|
|
178
|
+
if ms <= 0. then inner ctx url fetchdef
|
|
179
|
+
else begin
|
|
180
|
+
let fd = match clone fetchdef with Map _ as m -> m | _ -> empty_map () in
|
|
181
|
+
setp fd "timeout" (Num (ms /. 1000.));
|
|
182
|
+
let start = now_of !options in
|
|
183
|
+
let (res, err) = inner ctx url fd in
|
|
184
|
+
let elapsed = now_of !options -. start in
|
|
185
|
+
if elapsed > ms then begin
|
|
186
|
+
track ctx ms;
|
|
187
|
+
(Noval, Some (ctx_make_error ctx "timeout" ("Request exceeded timeout of " ^ string_of_int (int_of_float ms) ^ "ms")))
|
|
188
|
+
end else (res, err)
|
|
189
|
+
end in
|
|
190
|
+
f.f_init <- (fun ctx opts ->
|
|
191
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
192
|
+
f.f_active <- opt_active opts;
|
|
193
|
+
if f.f_active then begin
|
|
194
|
+
let u = cu ctx in
|
|
195
|
+
let inner = u.u_fetcher in
|
|
196
|
+
u.u_fetcher <- (fun fctx url fd -> with_timeout fctx url fd inner)
|
|
197
|
+
end);
|
|
198
|
+
f
|
|
199
|
+
|
|
200
|
+
(* ------------------------------------------------------------------ *)
|
|
201
|
+
(* ratelimit *)
|
|
202
|
+
(* ------------------------------------------------------------------ *)
|
|
203
|
+
|
|
204
|
+
let ratelimit_feature () : feature =
|
|
205
|
+
let options = ref (empty_map ()) in
|
|
206
|
+
let tokens = ref 0. and last = ref 0. in
|
|
207
|
+
let f = { f_name = "ratelimit"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
208
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
209
|
+
let rate () = match getp !options "rate" with Num n when n <> 0. -> n | _ -> 5. in
|
|
210
|
+
let burst () = match getp !options "burst" with Num n -> n | _ -> rate () in
|
|
211
|
+
let track ctx wait_ms =
|
|
212
|
+
let cl = cc ctx in
|
|
213
|
+
let bucket = track_bucket cl "ratelimit" (fun () -> jo [("throttled", Num 0.); ("waitMs", Num 0.)]) in
|
|
214
|
+
bump_num bucket "throttled" 1.; bump_num bucket "waitMs" wait_ms in
|
|
215
|
+
let acquire ctx =
|
|
216
|
+
let r = rate () and b = burst () in
|
|
217
|
+
let now = now_of !options in
|
|
218
|
+
let elapsed = now -. !last in
|
|
219
|
+
last := now;
|
|
220
|
+
tokens := Float.min b (!tokens +. (elapsed /. 1000.) *. r);
|
|
221
|
+
if !tokens >= 1. then tokens := !tokens -. 1.
|
|
222
|
+
else begin
|
|
223
|
+
let needed = 1. -. !tokens in
|
|
224
|
+
let wait_ms = Float.of_int (int_of_float (ceil ((needed /. r) *. 1000.))) in
|
|
225
|
+
track ctx wait_ms;
|
|
226
|
+
sleep_of !options wait_ms;
|
|
227
|
+
last := now_of !options;
|
|
228
|
+
tokens := 0.
|
|
229
|
+
end in
|
|
230
|
+
f.f_init <- (fun ctx opts ->
|
|
231
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
232
|
+
f.f_active <- opt_active opts;
|
|
233
|
+
if f.f_active then begin
|
|
234
|
+
tokens := burst ();
|
|
235
|
+
last := now_of !options;
|
|
236
|
+
let u = cu ctx in
|
|
237
|
+
let inner = u.u_fetcher in
|
|
238
|
+
u.u_fetcher <- (fun fctx url fd -> acquire fctx; inner fctx url fd)
|
|
239
|
+
end);
|
|
240
|
+
f
|
|
241
|
+
|
|
242
|
+
(* ------------------------------------------------------------------ *)
|
|
243
|
+
(* cache *)
|
|
244
|
+
(* ------------------------------------------------------------------ *)
|
|
245
|
+
|
|
246
|
+
let cache_feature () : feature =
|
|
247
|
+
let options = ref (empty_map ()) in
|
|
248
|
+
let store = ref [] in
|
|
249
|
+
let f = { f_name = "cache"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
250
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
251
|
+
let track ctx kind =
|
|
252
|
+
let cl = cc ctx in
|
|
253
|
+
let bucket = track_bucket cl "cache" (fun () -> jo [("hit", Num 0.); ("miss", Num 0.); ("bypass", Num 0.)]) in
|
|
254
|
+
bump_num bucket kind 1. in
|
|
255
|
+
let cacheable res = match res with
|
|
256
|
+
| Map _ -> (match getp res "status" with Num n -> n >= 200. && n < 300. | _ -> false)
|
|
257
|
+
| _ -> false in
|
|
258
|
+
let snapshot res =
|
|
259
|
+
let data = match getp res "json" with Func _ as fn -> (try call_json fn with _ -> Noval) | _ -> Noval in
|
|
260
|
+
let headers = empty_map () in
|
|
261
|
+
(match getp res "headers" with Map _ as h -> List.iter (fun k -> setp headers (string_lower k) (getp h k)) (keysof h) | _ -> ());
|
|
262
|
+
jo [("status", getp res "status"); ("statusText", getp res "statusText"); ("data", data); ("headers", headers)] in
|
|
263
|
+
let replay snap =
|
|
264
|
+
let data = getp snap "data" in
|
|
265
|
+
jo [("status", getp snap "status"); ("statusText", getp snap "statusText");
|
|
266
|
+
("body", Str "not-used"); ("json", json_thunk data);
|
|
267
|
+
("headers", (match clone (getp snap "headers") with Map _ as m -> m | _ -> empty_map ()))] in
|
|
268
|
+
let evict () =
|
|
269
|
+
let mx = opt_int !options "max" ~default:256 in
|
|
270
|
+
while List.length !store >= mx do (match !store with _ :: tl -> store := tl | [] -> ()) done in
|
|
271
|
+
let through ctx url fetchdef inner =
|
|
272
|
+
let meth = match getp fetchdef "method" with Str s -> string_upper s | _ -> "GET" in
|
|
273
|
+
let methods = List.map string_upper (opt_str_list !options "methods" ~default:["GET"]) in
|
|
274
|
+
if not (List.mem meth methods) then inner ctx url fetchdef
|
|
275
|
+
else begin
|
|
276
|
+
let key = meth ^ " " ^ url in
|
|
277
|
+
let now = now_of !options in
|
|
278
|
+
match List.assoc_opt key !store with
|
|
279
|
+
| Some hit when (match getp hit "expiry" with Num e -> e > now | _ -> false) ->
|
|
280
|
+
track ctx "hit"; (replay (getp hit "snapshot"), None)
|
|
281
|
+
| _ ->
|
|
282
|
+
let (res, err) = inner ctx url fetchdef in
|
|
283
|
+
if err = None && cacheable res then begin
|
|
284
|
+
let snap = snapshot res in
|
|
285
|
+
let ttl = opt_num !options "ttl" ~default:5000. in
|
|
286
|
+
evict ();
|
|
287
|
+
store := (List.remove_assoc key !store) @ [(key, jo [("expiry", Num (now +. ttl)); ("snapshot", snap)])];
|
|
288
|
+
track ctx "miss";
|
|
289
|
+
(replay snap, None)
|
|
290
|
+
end else (track ctx "bypass"; (res, err))
|
|
291
|
+
end in
|
|
292
|
+
f.f_init <- (fun ctx opts ->
|
|
293
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
294
|
+
f.f_active <- opt_active opts;
|
|
295
|
+
if f.f_active then begin
|
|
296
|
+
store := [];
|
|
297
|
+
let u = cu ctx in
|
|
298
|
+
let inner = u.u_fetcher in
|
|
299
|
+
u.u_fetcher <- (fun fctx url fd -> through fctx url fd inner)
|
|
300
|
+
end);
|
|
301
|
+
f
|
|
302
|
+
|
|
303
|
+
(* ------------------------------------------------------------------ *)
|
|
304
|
+
(* idempotency *)
|
|
305
|
+
(* ------------------------------------------------------------------ *)
|
|
306
|
+
|
|
307
|
+
let idempotency_feature () : feature =
|
|
308
|
+
let options = ref (empty_map ()) in
|
|
309
|
+
let f = { f_name = "idempotency"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
310
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
311
|
+
let genkey () = match getp !options "keygen" with Func _ as fn -> vstr_of (call_vfn fn Noval) | _ -> random_id16 () in
|
|
312
|
+
let mutating ctx =
|
|
313
|
+
let methods = List.map string_upper (opt_str_list !options "methods" ~default:["POST"; "PUT"; "PATCH"; "DELETE"]) in
|
|
314
|
+
let meth = match ctx.c_spec with Some s -> string_upper s.sp_method | None -> "" in
|
|
315
|
+
if meth <> "" && List.mem meth methods then true
|
|
316
|
+
else List.mem ctx.c_op.op_name (opt_str_list !options "ops" ~default:["create"; "update"; "remove"]) in
|
|
317
|
+
f.f_init <- (fun _ctx opts ->
|
|
318
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
319
|
+
f.f_active <- opt_active opts);
|
|
320
|
+
f.f_hook <- (fun name ctx ->
|
|
321
|
+
if name = "PreRequest" && f.f_active then
|
|
322
|
+
match ctx.c_spec with
|
|
323
|
+
| None -> ()
|
|
324
|
+
| Some spec ->
|
|
325
|
+
if mutating ctx then begin
|
|
326
|
+
let header = opt_str !options "header" ~default:"Idempotency-Key" in
|
|
327
|
+
if is_noval (header_ci spec.sp_headers header) then begin
|
|
328
|
+
let key = genkey () in
|
|
329
|
+
setp spec.sp_headers header (Str key);
|
|
330
|
+
let cl = cc ctx in
|
|
331
|
+
let bucket = track_bucket cl "idempotency" (fun () -> jo [("issued", Num 0.); ("last", Noval)]) in
|
|
332
|
+
bump_num bucket "issued" 1.;
|
|
333
|
+
setp bucket "last" (Str key)
|
|
334
|
+
end
|
|
335
|
+
end);
|
|
336
|
+
f
|
|
337
|
+
|
|
338
|
+
(* ------------------------------------------------------------------ *)
|
|
339
|
+
(* rbac (PrePoint short-circuit) *)
|
|
340
|
+
(* ------------------------------------------------------------------ *)
|
|
341
|
+
|
|
342
|
+
let rbac_feature () : feature =
|
|
343
|
+
let options = ref (empty_map ()) in
|
|
344
|
+
let perms = ref [] in
|
|
345
|
+
let f = { f_name = "rbac"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
346
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
347
|
+
let track ctx required allowed =
|
|
348
|
+
let cl = cc ctx in
|
|
349
|
+
let bucket = track_bucket cl "rbac" (fun () -> jo [("allowed", Num 0.); ("denied", Num 0.); ("last", Noval)]) in
|
|
350
|
+
bump_num bucket (if allowed then "allowed" else "denied") 1.;
|
|
351
|
+
setp bucket "last" (jo [("required", Str required); ("allowed", Bool allowed);
|
|
352
|
+
("op", Str ctx.c_op.op_name)]) in
|
|
353
|
+
let required ctx =
|
|
354
|
+
let rules = match getp !options "rules" with Map _ as m -> m | _ -> empty_map () in
|
|
355
|
+
let entity = match ctx.c_entity with Some e -> e.e_name | None -> (if ctx.c_op.op_entity <> "" then ctx.c_op.op_entity else "") in
|
|
356
|
+
let opname = ctx.c_op.op_name in
|
|
357
|
+
let rule_for k = match getp rules k with Noval | Null -> None | v -> Some (vstr_of v) in
|
|
358
|
+
(match rule_for (entity ^ "." ^ opname) with Some v -> Some v
|
|
359
|
+
| None -> (match rule_for opname with Some v -> Some v
|
|
360
|
+
| None -> (match rule_for "*" with Some v -> Some v | None -> None))) in
|
|
361
|
+
let reject ctx req =
|
|
362
|
+
track ctx req false;
|
|
363
|
+
let opname = if ctx.c_op.op_name <> "" && ctx.c_op.op_name <> "_" then ctx.c_op.op_name else "?" in
|
|
364
|
+
let err = ctx_make_error ctx "rbac_denied"
|
|
365
|
+
("Permission \"" ^ req ^ "\" required for operation \"" ^ opname ^ "\"") in
|
|
366
|
+
Hashtbl.replace ctx.c_out "point" (OErr err) in
|
|
367
|
+
f.f_init <- (fun _ctx opts ->
|
|
368
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
369
|
+
f.f_active <- opt_active opts;
|
|
370
|
+
perms := opt_str_list !options "permissions" ~default:[]);
|
|
371
|
+
f.f_hook <- (fun name ctx ->
|
|
372
|
+
if name = "PrePoint" && f.f_active then
|
|
373
|
+
match required ctx with
|
|
374
|
+
| None -> if getp !options "deny" = Bool true then reject ctx "<default-deny>"
|
|
375
|
+
| Some req ->
|
|
376
|
+
if List.mem "*" !perms || List.mem req !perms then track ctx req true
|
|
377
|
+
else reject ctx req);
|
|
378
|
+
f
|
|
379
|
+
|
|
380
|
+
(* ------------------------------------------------------------------ *)
|
|
381
|
+
(* metrics *)
|
|
382
|
+
(* ------------------------------------------------------------------ *)
|
|
383
|
+
|
|
384
|
+
let metrics_feature () : feature =
|
|
385
|
+
let options = ref (empty_map ()) in
|
|
386
|
+
let f = { f_name = "metrics"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
387
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
388
|
+
let metrics ctx = track_bucket (cc ctx) "metrics"
|
|
389
|
+
(fun () -> jo [("total", jo [("count", Num 0.); ("ok", Num 0.); ("err", Num 0.); ("totalMs", Num 0.); ("maxMs", Num 0.)]);
|
|
390
|
+
("ops", empty_map ())]) in
|
|
391
|
+
let bump b ok dur =
|
|
392
|
+
bump_num b "count" 1.;
|
|
393
|
+
bump_num b (if ok then "ok" else "err") 1.;
|
|
394
|
+
bump_num b "totalMs" dur;
|
|
395
|
+
if dur > (match getp b "maxMs" with Num n -> n | _ -> 0.) then setp b "maxMs" (Num dur) in
|
|
396
|
+
let record ctx ok =
|
|
397
|
+
match scratch_get ctx "metrics_start" with
|
|
398
|
+
| Some (Num start) ->
|
|
399
|
+
scratch_del ctx "metrics_start";
|
|
400
|
+
let dur = Float.max 0. (now_of !options -. start) in
|
|
401
|
+
let m = metrics ctx in
|
|
402
|
+
let key = ctx.c_op.op_entity ^ "." ^ ctx.c_op.op_name in
|
|
403
|
+
let ops = getp m "ops" in
|
|
404
|
+
let opb = match getp ops key with Map _ as b -> b
|
|
405
|
+
| _ -> let b = jo [("count", Num 0.); ("ok", Num 0.); ("err", Num 0.); ("totalMs", Num 0.); ("maxMs", Num 0.)] in setp ops key b; b in
|
|
406
|
+
bump (getp m "total") ok dur; bump opb ok dur
|
|
407
|
+
| _ -> () in
|
|
408
|
+
f.f_init <- (fun ctx opts ->
|
|
409
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
410
|
+
f.f_active <- opt_active opts;
|
|
411
|
+
ignore (metrics ctx));
|
|
412
|
+
f.f_hook <- (fun name ctx ->
|
|
413
|
+
if f.f_active then match name with
|
|
414
|
+
| "PrePoint" -> scratch_set ctx "metrics_start" (Num (now_of !options))
|
|
415
|
+
| "PreDone" ->
|
|
416
|
+
let ok = (match ctx.c_result with Some r -> r.rt_ok && r.rt_err = None | None -> false) in
|
|
417
|
+
record ctx ok
|
|
418
|
+
| "PreUnexpected" -> record ctx false
|
|
419
|
+
| _ -> ());
|
|
420
|
+
f
|
|
421
|
+
|
|
422
|
+
(* ------------------------------------------------------------------ *)
|
|
423
|
+
(* telemetry *)
|
|
424
|
+
(* ------------------------------------------------------------------ *)
|
|
425
|
+
|
|
426
|
+
let telemetry_feature () : feature =
|
|
427
|
+
let options = ref (empty_map ()) in
|
|
428
|
+
let seq = ref 0 in
|
|
429
|
+
let f = { f_name = "telemetry"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
430
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
431
|
+
let telemetry ctx = track_bucket (cc ctx) "telemetry"
|
|
432
|
+
(fun () -> jo [("spans", empty_list ()); ("active", Num 0.)]) in
|
|
433
|
+
let gen_id kind =
|
|
434
|
+
match getp !options "idgen" with
|
|
435
|
+
| Func _ as fn -> vstr_of (call_vfn fn (Str kind))
|
|
436
|
+
| _ ->
|
|
437
|
+
incr seq;
|
|
438
|
+
let n = Printf.sprintf "%04x" !seq in
|
|
439
|
+
let padded = n ^ String.make (max 0 (16 - String.length n)) '0' in
|
|
440
|
+
(if kind = "trace" then "t" else "s") ^ padded in
|
|
441
|
+
let close ctx ok =
|
|
442
|
+
match scratch_get ctx "telemetry_span" with
|
|
443
|
+
| Some (Map _ as span) ->
|
|
444
|
+
scratch_del ctx "telemetry_span";
|
|
445
|
+
let end_ = now_of !options in
|
|
446
|
+
setp span "end" (Num end_);
|
|
447
|
+
setp span "durationMs" (Num (Float.max 0. (end_ -. (match getp span "start" with Num n -> n | _ -> 0.))));
|
|
448
|
+
setp span "ok" (Bool ok);
|
|
449
|
+
let t = telemetry ctx in
|
|
450
|
+
bump_num t "active" (-1.);
|
|
451
|
+
(match getp t "spans" with List r -> r := !r @ [span] | _ -> ());
|
|
452
|
+
(match getp !options "exporter" with Func _ as fn -> (try ignore (call_vfn fn span) with _ -> ()) | _ -> ())
|
|
453
|
+
| _ -> () in
|
|
454
|
+
f.f_init <- (fun ctx opts ->
|
|
455
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
456
|
+
f.f_active <- opt_active opts;
|
|
457
|
+
seq := 0;
|
|
458
|
+
ignore (telemetry ctx));
|
|
459
|
+
f.f_hook <- (fun name ctx ->
|
|
460
|
+
if f.f_active then match name with
|
|
461
|
+
| "PrePoint" ->
|
|
462
|
+
let entity = if ctx.c_op.op_entity <> "" then ctx.c_op.op_entity else "_" in
|
|
463
|
+
let opname = if ctx.c_op.op_name <> "" then ctx.c_op.op_name else "_" in
|
|
464
|
+
let span = jo [("traceId", Str (gen_id "trace")); ("spanId", Str (gen_id "span"));
|
|
465
|
+
("name", Str (entity ^ "." ^ opname)); ("start", Num (now_of !options));
|
|
466
|
+
("end", Noval); ("durationMs", Noval); ("ok", Noval)] in
|
|
467
|
+
scratch_set ctx "telemetry_span" span;
|
|
468
|
+
bump_num (telemetry ctx) "active" 1.
|
|
469
|
+
| "PreRequest" ->
|
|
470
|
+
(match scratch_get ctx "telemetry_span", ctx.c_spec with
|
|
471
|
+
| Some (Map _ as span), Some spec ->
|
|
472
|
+
let hopt = match getp !options "headers" with Map _ as h -> h | _ -> empty_map () in
|
|
473
|
+
let hget k d = match getp hopt k with Str s -> s | _ -> d in
|
|
474
|
+
setp spec.sp_headers (hget "trace" "X-Trace-Id") (getp span "traceId");
|
|
475
|
+
setp spec.sp_headers (hget "span" "X-Span-Id") (getp span "spanId");
|
|
476
|
+
setp spec.sp_headers (hget "parent" "traceparent")
|
|
477
|
+
(Str ("00-" ^ vstr_of (getp span "traceId") ^ "-" ^ vstr_of (getp span "spanId") ^ "-01"))
|
|
478
|
+
| _ -> ())
|
|
479
|
+
| "PreDone" ->
|
|
480
|
+
let ok = (match ctx.c_result with Some r -> r.rt_ok && r.rt_err = None | None -> false) in
|
|
481
|
+
close ctx ok
|
|
482
|
+
| "PreUnexpected" -> close ctx false
|
|
483
|
+
| _ -> ());
|
|
484
|
+
f
|
|
485
|
+
|
|
486
|
+
(* ------------------------------------------------------------------ *)
|
|
487
|
+
(* debug *)
|
|
488
|
+
(* ------------------------------------------------------------------ *)
|
|
489
|
+
|
|
490
|
+
let debug_feature () : feature =
|
|
491
|
+
let options = ref (empty_map ()) in
|
|
492
|
+
let f = { f_name = "debug"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
493
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
494
|
+
let debug ctx = track_bucket (cc ctx) "debug" (fun () -> jo [("entries", empty_list ())]) in
|
|
495
|
+
let redact headers =
|
|
496
|
+
match headers with
|
|
497
|
+
| Map _ ->
|
|
498
|
+
let patterns = opt_str_list !options "redact"
|
|
499
|
+
~default:["authorization"; "cookie"; "set-cookie"; "api-key"; "apikey"; "x-api-key"; "idempotency-key"] in
|
|
500
|
+
let out = empty_map () in
|
|
501
|
+
List.iter (fun k -> if List.mem (string_lower k) patterns then setp out k (Str "<redacted>") else setp out k (getp headers k)) (keysof headers);
|
|
502
|
+
out
|
|
503
|
+
| _ -> empty_map () in
|
|
504
|
+
let finish ctx ok =
|
|
505
|
+
match scratch_get ctx "debug_entry" with
|
|
506
|
+
| Some (Map _ as entry) ->
|
|
507
|
+
scratch_del ctx "debug_entry";
|
|
508
|
+
let result_ok = match ctx.c_result with Some r -> r.rt_ok | None -> true in
|
|
509
|
+
setp entry "ok" (Bool (ok && result_ok));
|
|
510
|
+
setp entry "durationMs" (Num (Float.max 0. (now_of !options -. (match getp entry "start" with Num n -> n | _ -> 0.))));
|
|
511
|
+
(if getp entry "status" = Noval then match ctx.c_result with Some r -> setp entry "status" (vint_of r.rt_status) | None -> ());
|
|
512
|
+
let buf = getp (debug ctx) "entries" in
|
|
513
|
+
(match buf with List r -> r := !r @ [entry] | _ -> ());
|
|
514
|
+
let mx = opt_int !options "max" ~default:100 in
|
|
515
|
+
(match buf with List r -> while List.length !r > mx do (match !r with _ :: tl -> r := tl | [] -> ()) done | _ -> ());
|
|
516
|
+
(match getp !options "onEntry" with Func _ as fn -> (try ignore (call_vfn fn entry) with _ -> ()) | _ -> ())
|
|
517
|
+
| _ -> () in
|
|
518
|
+
f.f_init <- (fun ctx opts ->
|
|
519
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
520
|
+
f.f_active <- opt_active opts;
|
|
521
|
+
ignore (debug ctx));
|
|
522
|
+
f.f_hook <- (fun name ctx ->
|
|
523
|
+
if f.f_active then match name with
|
|
524
|
+
| "PreRequest" ->
|
|
525
|
+
let opname = (if ctx.c_op.op_entity <> "" then ctx.c_op.op_entity else "_") ^ "." ^ (if ctx.c_op.op_name <> "" then ctx.c_op.op_name else "_") in
|
|
526
|
+
let entry = jo [
|
|
527
|
+
("op", Str opname);
|
|
528
|
+
("method", (match ctx.c_spec with Some s -> Str s.sp_method | None -> Noval));
|
|
529
|
+
("url", (match ctx.c_spec with Some s -> Str (if s.sp_url <> "" then s.sp_url else s.sp_path) | None -> Noval));
|
|
530
|
+
("headers", redact (match ctx.c_spec with Some s -> s.sp_headers | None -> Noval));
|
|
531
|
+
("start", Num (now_of !options)); ("status", Noval); ("ok", Noval);
|
|
532
|
+
("durationMs", Noval); ("error", Noval) ] in
|
|
533
|
+
scratch_set ctx "debug_entry" entry
|
|
534
|
+
| "PreResponse" ->
|
|
535
|
+
(match scratch_get ctx "debug_entry" with
|
|
536
|
+
| Some (Map _ as entry) ->
|
|
537
|
+
(match ctx.c_response with Some r -> setp entry "status" (vint_of r.rs_status) | None -> ());
|
|
538
|
+
(match getp entry "url" with (Noval | Str "") -> (match ctx.c_spec with Some s when s.sp_url <> "" -> setp entry "url" (Str s.sp_url) | _ -> ()) | _ -> ())
|
|
539
|
+
| _ -> ())
|
|
540
|
+
| "PreDone" -> finish ctx true
|
|
541
|
+
| "PreUnexpected" ->
|
|
542
|
+
(match scratch_get ctx "debug_entry" with
|
|
543
|
+
| Some (Map _ as entry) ->
|
|
544
|
+
(match ctx.c_ctrl.ctrl_err with Some e -> setp entry "error" (Str e.err_msg) | None -> ())
|
|
545
|
+
| _ -> ());
|
|
546
|
+
finish ctx false
|
|
547
|
+
| _ -> ());
|
|
548
|
+
f
|
|
549
|
+
|
|
550
|
+
(* ------------------------------------------------------------------ *)
|
|
551
|
+
(* audit *)
|
|
552
|
+
(* ------------------------------------------------------------------ *)
|
|
553
|
+
|
|
554
|
+
let audit_feature () : feature =
|
|
555
|
+
let options = ref (empty_map ()) in
|
|
556
|
+
let seq = ref 0 in
|
|
557
|
+
let f = { f_name = "audit"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
558
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
559
|
+
let audit ctx = track_bucket (cc ctx) "audit" (fun () -> jo [("records", empty_list ())]) in
|
|
560
|
+
let emit ctx outcome =
|
|
561
|
+
match scratch_get ctx "audit_seen" with
|
|
562
|
+
| Some (Bool true) -> ()
|
|
563
|
+
| _ ->
|
|
564
|
+
scratch_set ctx "audit_seen" (Bool true);
|
|
565
|
+
incr seq;
|
|
566
|
+
let actor = match ctx.c_ctrl.ctrl_actor with
|
|
567
|
+
| Noval | Null -> (match getp !options "actor" with Noval | Null -> Str "anonymous" | a -> a)
|
|
568
|
+
| a -> a in
|
|
569
|
+
let record = jo [
|
|
570
|
+
("seq", vint_of !seq); ("ts", Num (now_of !options)); ("actor", actor);
|
|
571
|
+
("entity", Str (if ctx.c_op.op_entity <> "" then ctx.c_op.op_entity else "_"));
|
|
572
|
+
("op", Str (if ctx.c_op.op_name <> "" then ctx.c_op.op_name else "_"));
|
|
573
|
+
("outcome", Str outcome);
|
|
574
|
+
("status", (match ctx.c_result with Some r -> vint_of r.rt_status | None -> Noval));
|
|
575
|
+
("correlationId", Str ctx.c_id) ] in
|
|
576
|
+
let records = getp (audit ctx) "records" in
|
|
577
|
+
(match records with List r -> r := !r @ [record] | _ -> ());
|
|
578
|
+
let mx = opt_int !options "max" ~default:1000 in
|
|
579
|
+
(match records with List r -> while List.length !r > mx do (match !r with _ :: tl -> r := tl | [] -> ()) done | _ -> ());
|
|
580
|
+
(match getp !options "sink" with Func _ as fn -> (try ignore (call_vfn fn record) with _ -> ()) | _ -> ()) in
|
|
581
|
+
f.f_init <- (fun ctx opts ->
|
|
582
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
583
|
+
f.f_active <- opt_active opts;
|
|
584
|
+
seq := 0;
|
|
585
|
+
ignore (audit ctx));
|
|
586
|
+
f.f_hook <- (fun name ctx ->
|
|
587
|
+
if f.f_active then match name with
|
|
588
|
+
| "PreDone" ->
|
|
589
|
+
let ok = (match ctx.c_result with Some r -> r.rt_ok && r.rt_err = None | None -> false) in
|
|
590
|
+
emit ctx (if ok then "ok" else "error")
|
|
591
|
+
| "PreUnexpected" -> emit ctx "error"
|
|
592
|
+
| _ -> ());
|
|
593
|
+
f
|
|
594
|
+
|
|
595
|
+
(* ------------------------------------------------------------------ *)
|
|
596
|
+
(* clienttrack *)
|
|
597
|
+
(* ------------------------------------------------------------------ *)
|
|
598
|
+
|
|
599
|
+
let clienttrack_feature () : feature =
|
|
600
|
+
let options = ref (empty_map ()) in
|
|
601
|
+
let session = ref "" and requests = ref 0 in
|
|
602
|
+
let f = { f_name = "clienttrack"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
603
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
604
|
+
let name () = (opt_str !options "clientName" ~default:"ProjectName-SDK") ^ "/" ^ (opt_str !options "clientVersion" ~default:"0.0.1") in
|
|
605
|
+
let gen_id kind =
|
|
606
|
+
match getp !options "idgen" with
|
|
607
|
+
| Func _ as fn -> vstr_of (call_vfn fn (Str kind))
|
|
608
|
+
| _ ->
|
|
609
|
+
let s = (String.sub kind 0 1) ^ "-" ^ random_id16 () in
|
|
610
|
+
if String.length s > 20 then String.sub s 0 20 else s in
|
|
611
|
+
let set_nc headers hname value =
|
|
612
|
+
if is_noval (header_ci headers hname) then setp headers hname (Str value) in
|
|
613
|
+
f.f_init <- (fun _ctx opts ->
|
|
614
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
615
|
+
f.f_active <- opt_active opts;
|
|
616
|
+
requests := 0);
|
|
617
|
+
f.f_hook <- (fun hname ctx ->
|
|
618
|
+
if f.f_active then match hname with
|
|
619
|
+
| "PostConstruct" ->
|
|
620
|
+
session := (match getp !options "sessionId" with Str s -> s | _ -> gen_id "session");
|
|
621
|
+
let cl = cc ctx in
|
|
622
|
+
track_set cl "clienttrack" (jo [("session", Str !session); ("requests", Num 0.); ("clientName", Str (name ()))])
|
|
623
|
+
| "PreRequest" ->
|
|
624
|
+
(match ctx.c_spec with
|
|
625
|
+
| None -> ()
|
|
626
|
+
| Some spec ->
|
|
627
|
+
if !session = "" then session := (match getp !options "sessionId" with Str s -> s | _ -> gen_id "session");
|
|
628
|
+
let hopt = match getp !options "headers" with Map _ as h -> h | _ -> empty_map () in
|
|
629
|
+
let hget k d = match getp hopt k with Str s -> s | _ -> d in
|
|
630
|
+
incr requests;
|
|
631
|
+
let request_id = gen_id "request" in
|
|
632
|
+
set_nc spec.sp_headers (hget "agent" "User-Agent") (name ());
|
|
633
|
+
set_nc spec.sp_headers (hget "client" "X-Client-Id") !session;
|
|
634
|
+
setp spec.sp_headers (hget "request" "X-Request-Id") (Str request_id);
|
|
635
|
+
let cl = cc ctx in
|
|
636
|
+
let bucket = track_bucket cl "clienttrack" (fun () -> jo [("session", Str !session); ("requests", Num 0.); ("clientName", Str (name ()))]) in
|
|
637
|
+
setp bucket "requests" (vint_of !requests);
|
|
638
|
+
setp bucket "lastRequestId" (Str request_id))
|
|
639
|
+
| _ -> ());
|
|
640
|
+
f
|
|
641
|
+
|
|
642
|
+
(* ------------------------------------------------------------------ *)
|
|
643
|
+
(* paging *)
|
|
644
|
+
(* ------------------------------------------------------------------ *)
|
|
645
|
+
|
|
646
|
+
let paging_feature () : feature =
|
|
647
|
+
let options = ref (empty_map ()) in
|
|
648
|
+
let f = { f_name = "paging"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
649
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
650
|
+
let is_list ctx = List.mem ctx.c_op.op_name (opt_str_list !options "ops" ~default:["list"]) in
|
|
651
|
+
let num_of v = match v with
|
|
652
|
+
| Noval | Null -> Noval
|
|
653
|
+
| _ -> (try Num (float_of_string (String.trim (vstr_of v))) with _ -> Noval) in
|
|
654
|
+
let extract_next link =
|
|
655
|
+
match String.index_opt link '<', String.index_opt link '>' with
|
|
656
|
+
| Some i, Some j when j > i ->
|
|
657
|
+
let inner = String.sub link (i + 1) (j - i - 1) in
|
|
658
|
+
let rest = string_lower (String.sub link (j + 1) (String.length link - j - 1)) in
|
|
659
|
+
let contains hay needle =
|
|
660
|
+
let hl = String.length hay and nl = String.length needle in
|
|
661
|
+
let rec go k = if k + nl > hl then false else if String.sub hay k nl = needle then true else go (k + 1) in
|
|
662
|
+
nl = 0 || go 0 in
|
|
663
|
+
if contains rest "rel" && contains rest "next" then Some inner else None
|
|
664
|
+
| _ -> None in
|
|
665
|
+
f.f_init <- (fun _ctx opts ->
|
|
666
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
667
|
+
f.f_active <- opt_active opts);
|
|
668
|
+
f.f_hook <- (fun name ctx ->
|
|
669
|
+
if f.f_active && is_list ctx then match name with
|
|
670
|
+
| "PreRequest" ->
|
|
671
|
+
(match ctx.c_spec with
|
|
672
|
+
| None -> ()
|
|
673
|
+
| Some spec ->
|
|
674
|
+
let q = match spec.sp_query with Map _ as m -> m | _ -> (let m = empty_map () in spec.sp_query <- m; m) in
|
|
675
|
+
let page_param = opt_str !options "pageParam" ~default:"page" in
|
|
676
|
+
let limit_param = opt_str !options "limitParam" ~default:"limit" in
|
|
677
|
+
let cursor_param = opt_str !options "cursorParam" ~default:"cursor" in
|
|
678
|
+
let paging = match ctx.c_ctrl.ctrl_paging with Map _ as m -> m | _ -> empty_map () in
|
|
679
|
+
(match getp paging "cursor" with
|
|
680
|
+
| Noval | Null ->
|
|
681
|
+
(match getp q page_param with
|
|
682
|
+
| Noval ->
|
|
683
|
+
let page = (match getp paging "page" with
|
|
684
|
+
| Noval | Null -> (match getp !options "startPage" with Num n -> Num n | _ -> Num 1.)
|
|
685
|
+
| p -> p) in
|
|
686
|
+
setp q page_param page
|
|
687
|
+
| _ -> ())
|
|
688
|
+
| c -> setp q cursor_param c);
|
|
689
|
+
(match getp !options "limit" with
|
|
690
|
+
| Noval | Null -> ()
|
|
691
|
+
| lim -> (match getp q limit_param with Noval -> setp q limit_param lim | _ -> ())))
|
|
692
|
+
| "PreResult" ->
|
|
693
|
+
(match ctx.c_result with
|
|
694
|
+
| None -> ()
|
|
695
|
+
| Some result ->
|
|
696
|
+
let headers = match result.rt_headers with Map _ as m -> m | _ -> empty_map () in
|
|
697
|
+
let body = result.rt_body in
|
|
698
|
+
let paging = jo [
|
|
699
|
+
("page", num_of (header_ci headers "x-page"));
|
|
700
|
+
("totalCount", num_of (header_ci headers "x-total-count"));
|
|
701
|
+
("nextPage", num_of (header_ci headers "x-next-page"));
|
|
702
|
+
("next", Noval); ("cursor", Noval); ("hasMore", Bool false) ] in
|
|
703
|
+
(match header_ci headers "link" with
|
|
704
|
+
| Noval | Null -> ()
|
|
705
|
+
| l -> (match extract_next (vstr_of l) with Some n -> setp paging "next" (Str n) | None -> ()));
|
|
706
|
+
(match body with
|
|
707
|
+
| Map _ ->
|
|
708
|
+
(match getp body "next" with Noval | Null -> () | n -> if is_nullish (getp paging "next") then setp paging "next" n);
|
|
709
|
+
(match getp body "cursor" with Noval | Null -> () | c -> setp paging "cursor" c);
|
|
710
|
+
(match getp body "nextCursor" with Noval | Null -> () | c -> setp paging "cursor" c);
|
|
711
|
+
(match getp body "hasMore" with Bool b -> setp paging "hasMore" (Bool b) | _ -> ())
|
|
712
|
+
| _ -> ());
|
|
713
|
+
let hm = (getp paging "hasMore" = Bool true)
|
|
714
|
+
|| not (is_nullish (getp paging "next"))
|
|
715
|
+
|| not (is_nullish (getp paging "cursor"))
|
|
716
|
+
|| not (is_nullish (getp paging "nextPage")) in
|
|
717
|
+
setp paging "hasMore" (Bool hm);
|
|
718
|
+
result.rt_paging <- paging;
|
|
719
|
+
track_set (cc ctx) "paging" (jo [("last", paging)]))
|
|
720
|
+
| _ -> ());
|
|
721
|
+
f
|
|
722
|
+
|
|
723
|
+
(* ------------------------------------------------------------------ *)
|
|
724
|
+
(* streaming *)
|
|
725
|
+
(* ------------------------------------------------------------------ *)
|
|
726
|
+
|
|
727
|
+
let streaming_feature () : feature =
|
|
728
|
+
let options = ref (empty_map ()) in
|
|
729
|
+
let f = { f_name = "streaming"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
730
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
731
|
+
let streamable ctx = List.mem ctx.c_op.op_name (opt_str_list !options "ops" ~default:["list"]) in
|
|
732
|
+
let iterate (result : result) : value list =
|
|
733
|
+
let chunk_delay = opt_num !options "chunkDelay" ~default:0. in
|
|
734
|
+
let chunk_size = opt_int !options "chunkSize" ~default:0 in
|
|
735
|
+
let items = match result.rt_resdata with List r -> !r | _ -> [] in
|
|
736
|
+
if chunk_size > 0 then begin
|
|
737
|
+
let rec go acc l = match l with
|
|
738
|
+
| [] -> List.rev acc
|
|
739
|
+
| _ -> let (h, t) = take_n chunk_size l in
|
|
740
|
+
(if chunk_delay > 0. then sleep_of !options chunk_delay);
|
|
741
|
+
go (lst h :: acc) t in
|
|
742
|
+
go [] items
|
|
743
|
+
end else
|
|
744
|
+
List.map (fun item -> (if chunk_delay > 0. then sleep_of !options chunk_delay); item) items in
|
|
745
|
+
f.f_init <- (fun _ctx opts ->
|
|
746
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
747
|
+
f.f_active <- opt_active opts);
|
|
748
|
+
f.f_hook <- (fun name ctx ->
|
|
749
|
+
if name = "PreResult" && f.f_active && streamable ctx then
|
|
750
|
+
match ctx.c_result with
|
|
751
|
+
| None -> ()
|
|
752
|
+
| Some result ->
|
|
753
|
+
result.rt_streaming <- true;
|
|
754
|
+
result.rt_stream <- Some (fun () -> iterate result);
|
|
755
|
+
let bucket = track_bucket (cc ctx) "streaming" (fun () -> jo [("opened", Num 0.)]) in
|
|
756
|
+
bump_num bucket "opened" 1.);
|
|
757
|
+
f
|
|
758
|
+
|
|
759
|
+
(* ------------------------------------------------------------------ *)
|
|
760
|
+
(* proxy *)
|
|
761
|
+
(* ------------------------------------------------------------------ *)
|
|
762
|
+
|
|
763
|
+
let proxy_feature () : feature =
|
|
764
|
+
let options = ref (empty_map ()) in
|
|
765
|
+
let purl = ref Noval and noproxy = ref [] in
|
|
766
|
+
let f = { f_name = "proxy"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
767
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
768
|
+
let env k = match Sys.getenv_opt k with Some v when v <> "" -> Some v | _ -> None in
|
|
769
|
+
let bypass url =
|
|
770
|
+
if !noproxy = [] then false
|
|
771
|
+
else begin
|
|
772
|
+
let host = url_host url in
|
|
773
|
+
List.exists (fun np -> np = "*" || host = np || ends_with host ("." ^ strip_lead_dot np)) !noproxy
|
|
774
|
+
end in
|
|
775
|
+
let track ctx =
|
|
776
|
+
let cl = cc ctx in
|
|
777
|
+
let bucket = track_bucket cl "proxy" (fun () -> jo [("routed", Num 0.); ("url", !purl)]) in
|
|
778
|
+
bump_num bucket "routed" 1. in
|
|
779
|
+
let route ctx url fetchdef =
|
|
780
|
+
if is_nullish !purl || bypass url then fetchdef
|
|
781
|
+
else begin
|
|
782
|
+
let out = match clone fetchdef with Map _ as m -> m | _ -> empty_map () in
|
|
783
|
+
setp out "proxy" !purl;
|
|
784
|
+
setp out "proxies" (jo [("http", !purl); ("https", !purl)]);
|
|
785
|
+
(match getp !options "agent" with
|
|
786
|
+
| Func _ as fn -> let made = call_vfn fn (ja [!purl; Str url]) in setp out "dispatcher" made; setp out "agent" made
|
|
787
|
+
| _ -> ());
|
|
788
|
+
track ctx;
|
|
789
|
+
out
|
|
790
|
+
end in
|
|
791
|
+
f.f_init <- (fun ctx opts ->
|
|
792
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
793
|
+
f.f_active <- opt_active opts;
|
|
794
|
+
if f.f_active then begin
|
|
795
|
+
purl := getp !options "url";
|
|
796
|
+
let np = getp !options "noProxy" in
|
|
797
|
+
let np_list = ref (match np with
|
|
798
|
+
| List r -> List.filter_map (function Str s -> Some s | _ -> None) !r
|
|
799
|
+
| Str s -> List.filter (fun x -> x <> "") (List.map String.trim (String.split_on_char ',' s))
|
|
800
|
+
| _ -> []) in
|
|
801
|
+
(if getp !options "fromEnv" = Bool true then begin
|
|
802
|
+
(if is_nullish !purl then
|
|
803
|
+
match env "HTTPS_PROXY", env "https_proxy", env "HTTP_PROXY", env "http_proxy" with
|
|
804
|
+
| Some v, _, _, _ | _, Some v, _, _ | _, _, Some v, _ | _, _, _, Some v -> purl := Str v
|
|
805
|
+
| _ -> ());
|
|
806
|
+
(if !np_list = [] then match env "NO_PROXY", env "no_proxy" with
|
|
807
|
+
| Some v, _ | _, Some v -> np_list := List.filter (fun x -> x <> "") (List.map String.trim (String.split_on_char ',' v))
|
|
808
|
+
| _ -> ())
|
|
809
|
+
end);
|
|
810
|
+
noproxy := !np_list;
|
|
811
|
+
let u = cu ctx in
|
|
812
|
+
let inner = u.u_fetcher in
|
|
813
|
+
u.u_fetcher <- (fun fctx url fd -> inner fctx url (route fctx url fd))
|
|
814
|
+
end);
|
|
815
|
+
f
|
|
816
|
+
|
|
817
|
+
(* ------------------------------------------------------------------ *)
|
|
818
|
+
(* netsim (feature) *)
|
|
819
|
+
(* ------------------------------------------------------------------ *)
|
|
820
|
+
|
|
821
|
+
let netsim_feature () : feature =
|
|
822
|
+
let options = ref (empty_map ()) in
|
|
823
|
+
let calls = ref 0 and seed = ref 1 in
|
|
824
|
+
let f = { f_name = "netsim"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
825
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
826
|
+
let rand () =
|
|
827
|
+
seed := (!seed * 1103515245 + 12345) land 0x7fffffff;
|
|
828
|
+
float_of_int !seed /. float_of_int 0x7fffffff in
|
|
829
|
+
let pick_latency () =
|
|
830
|
+
match getp !options "latency" with
|
|
831
|
+
| Noval | Null -> 0.
|
|
832
|
+
| Num n -> if n < 0. then 0. else n
|
|
833
|
+
| Map _ as lat ->
|
|
834
|
+
let mn = match getp lat "min" with Num n -> int_of_float n | _ -> 0 in
|
|
835
|
+
let mx = match getp lat "max" with Num n -> int_of_float n | _ -> mn in
|
|
836
|
+
if mx <= mn then float_of_int mn
|
|
837
|
+
else float_of_int (mn + int_of_float (rand () *. float_of_int (mx - mn)))
|
|
838
|
+
| _ -> 0. in
|
|
839
|
+
let track ctx applied =
|
|
840
|
+
let cl = cc ctx in
|
|
841
|
+
let bucket = track_bucket cl "netsim" (fun () -> jo [("calls", Num 0.); ("applied", empty_list ())]) in
|
|
842
|
+
bump_num bucket "calls" 1.;
|
|
843
|
+
(match getp bucket "applied" with List r -> r := !r @ [applied] | _ -> ());
|
|
844
|
+
(match ctx.c_ctrl.ctrl_explain with Map _ -> setp ctx.c_ctrl.ctrl_explain "netsim" bucket | _ -> ()) in
|
|
845
|
+
let respond ctx status data extra =
|
|
846
|
+
ignore ctx;
|
|
847
|
+
let out = jo [("status", vint_of status); ("statusText", Str "OK"); ("json", json_thunk data); ("body", Str "not-used")] in
|
|
848
|
+
(match extra with Map _ -> List.iter (fun k -> setp out k (getp extra k)) (keysof extra) | _ -> ());
|
|
849
|
+
let headers = match getp out "headers" with Map _ as h -> h | _ -> empty_map () in
|
|
850
|
+
let lower = empty_map () in
|
|
851
|
+
List.iter (fun k -> setp lower (string_lower k) (getp headers k)) (keysof headers);
|
|
852
|
+
setp out "headers" lower;
|
|
853
|
+
(out, None) in
|
|
854
|
+
let simulate ctx url fetchdef inner =
|
|
855
|
+
let opts = !options in
|
|
856
|
+
incr calls; let call = !calls in
|
|
857
|
+
let applied = empty_map () in
|
|
858
|
+
if getp opts "offline" = Bool true then begin
|
|
859
|
+
sleep_of opts (pick_latency ()); setp applied "offline" (Bool true); track ctx applied;
|
|
860
|
+
(Noval, Some (ctx_make_error ctx "netsim_offline" ("Simulated network offline (URL was: \"" ^ url ^ "\")")))
|
|
861
|
+
end
|
|
862
|
+
else if call <= opt_int opts "errorTimes" ~default:0 then begin
|
|
863
|
+
sleep_of opts (pick_latency ()); setp applied "error" (Bool true); track ctx applied;
|
|
864
|
+
(Noval, Some (ctx_make_error ctx "netsim_conn" ("Simulated connection error (call " ^ string_of_int call ^ ")")))
|
|
865
|
+
end
|
|
866
|
+
else if call <= opt_int opts "rateLimitTimes" ~default:0 then begin
|
|
867
|
+
sleep_of opts (pick_latency ()); setp applied "rateLimited" (Bool true); track ctx applied;
|
|
868
|
+
let retry_after = match getp opts "retryAfter" with Noval | Null -> 0 | Num n -> int_of_float n | _ -> 0 in
|
|
869
|
+
respond ctx 429 Noval (jo [("statusText", Str "Too Many Requests"); ("headers", jo [("retry-after", Str (string_of_int retry_after))])])
|
|
870
|
+
end
|
|
871
|
+
else begin
|
|
872
|
+
let fail_status = match getp opts "failStatus" with Num n -> int_of_float n | _ -> 503 in
|
|
873
|
+
let fail_every = opt_int opts "failEvery" ~default:0 in
|
|
874
|
+
let fail_rate = opt_num opts "failRate" ~default:0. in
|
|
875
|
+
let fail_by_count = call <= opt_int opts "failTimes" ~default:0 in
|
|
876
|
+
let fail_by_every = fail_every > 0 && call mod fail_every = 0 in
|
|
877
|
+
let fail_by_rate = fail_rate > 0. && rand () < fail_rate in
|
|
878
|
+
if fail_by_count || fail_by_every || fail_by_rate then begin
|
|
879
|
+
sleep_of opts (pick_latency ()); setp applied "failStatus" (vint_of fail_status); track ctx applied;
|
|
880
|
+
respond ctx fail_status Noval (jo [("statusText", Str "Simulated Failure")])
|
|
881
|
+
end else begin
|
|
882
|
+
let latency = pick_latency () in
|
|
883
|
+
setp applied "latency" (Num latency); track ctx applied;
|
|
884
|
+
sleep_of opts latency;
|
|
885
|
+
inner ctx url fetchdef
|
|
886
|
+
end
|
|
887
|
+
end in
|
|
888
|
+
f.f_init <- (fun ctx opts ->
|
|
889
|
+
options := (match to_map opts with Map _ -> opts | _ -> empty_map ());
|
|
890
|
+
f.f_active <- opt_active opts;
|
|
891
|
+
seed := (match getp !options "seed" with Num n when int_of_float n <> 0 -> int_of_float n | _ -> 1);
|
|
892
|
+
if f.f_active then begin
|
|
893
|
+
let u = cu ctx in
|
|
894
|
+
let inner = u.u_fetcher in
|
|
895
|
+
u.u_fetcher <- (fun fctx url fd -> simulate fctx url fd inner)
|
|
896
|
+
end);
|
|
897
|
+
f
|
|
898
|
+
|
|
899
|
+
(* ------------------------------------------------------------------ *)
|
|
900
|
+
(* test feature (in-memory mock transport + optional net simulation) *)
|
|
901
|
+
(* ------------------------------------------------------------------ *)
|
|
902
|
+
|
|
903
|
+
let test_feature () : feature =
|
|
904
|
+
let f = { f_name = "test"; f_version = "0.0.1"; f_active = true; f_options = Noval;
|
|
905
|
+
f_init = (fun _ _ -> ()); f_hook = (fun _ _ -> ()) } in
|
|
906
|
+
let respond status data extra =
|
|
907
|
+
let out = jo [("status", vint_of status); ("statusText", Str "OK"); ("json", json_thunk data); ("body", Str "not-used")] in
|
|
908
|
+
(match extra with Some (Map _ as e) -> List.iter (fun k -> setp out k (getp e k)) (keysof e) | _ -> ());
|
|
909
|
+
(out, None) in
|
|
910
|
+
let build_args ctx (op : operation) args =
|
|
911
|
+
let opname = op.op_name in
|
|
912
|
+
let entname = match ctx.c_entity with Some e -> e.e_name | None -> "_" in
|
|
913
|
+
let points = getpath_s ctx.c_config ("entity." ^ entname ^ ".op." ^ opname ^ ".points") in
|
|
914
|
+
let point = getelem points (Num (-1.0)) in
|
|
915
|
+
let params_path = getpath_s point "args.params" in
|
|
916
|
+
let reqd_params = select params_path (jo [("reqd", Bool true)]) in
|
|
917
|
+
let reqd = transform reqd_params (ja [Str "`$EACH`"; Str ""; Str "`$KEY.name`"]) in
|
|
918
|
+
let qand = ref [] in
|
|
919
|
+
(match args with
|
|
920
|
+
| Map _ ->
|
|
921
|
+
List.iter (fun key ->
|
|
922
|
+
let is_id = key = "id" in
|
|
923
|
+
let selected = select reqd (Str key) in
|
|
924
|
+
let is_reqd = not (isempty selected) in
|
|
925
|
+
if is_id || is_reqd then begin
|
|
926
|
+
let v = (cu ctx).u_param ctx (Str key) in
|
|
927
|
+
let ka = (match op.op_alias with Map _ -> (match getp op.op_alias key with Str s -> Some s | _ -> None) | _ -> None) in
|
|
928
|
+
let qor = ref [jo [(key, v)]] in
|
|
929
|
+
(match ka with Some k -> qor := !qor @ [jo [(k, v)]] | None -> ());
|
|
930
|
+
qand := !qand @ [jo [("`$OR`", ja !qor)]]
|
|
931
|
+
end) (keysof args)
|
|
932
|
+
| _ -> ());
|
|
933
|
+
let q = jo [("`$AND`", ja !qand)] in
|
|
934
|
+
(match ctx.c_ctrl.ctrl_explain with Map _ -> setp ctx.c_ctrl.ctrl_explain "test" (jo [("query", q)]) | _ -> ());
|
|
935
|
+
q in
|
|
936
|
+
let make_mock entity =
|
|
937
|
+
let resolve_match fctx explicit =
|
|
938
|
+
if (match explicit with Map _ -> size explicit > 0 | _ -> false) then explicit
|
|
939
|
+
else begin
|
|
940
|
+
let try_src src = match src with
|
|
941
|
+
| Map _ -> (match getp src "id" with Noval -> None | Str "__UNDEFINED__" -> None | v -> Some v)
|
|
942
|
+
| _ -> None in
|
|
943
|
+
match try_src fctx.c_match with Some v -> jo [("id", v)]
|
|
944
|
+
| None -> (match try_src fctx.c_data with Some v -> jo [("id", v)] | None -> empty_map ())
|
|
945
|
+
end in
|
|
946
|
+
fun fctx _url _fetchdef ->
|
|
947
|
+
let op = fctx.c_op in
|
|
948
|
+
let entmap = match getp entity op.op_entity with Map _ as m -> m | _ -> empty_map () in
|
|
949
|
+
(match op.op_name with
|
|
950
|
+
| "load" ->
|
|
951
|
+
let args = build_args fctx op (resolve_match fctx fctx.c_reqmatch) in
|
|
952
|
+
let ent = getelem (select entmap args) (Num 0.0) in
|
|
953
|
+
if is_nullish ent then respond 404 Noval (Some (jo [("statusText", Str "Not found")]))
|
|
954
|
+
else (ignore (delprop ent (Str "$KEY")); respond 200 (clone ent) None)
|
|
955
|
+
| "list" ->
|
|
956
|
+
let args = build_args fctx op fctx.c_reqmatch in
|
|
957
|
+
let found = select entmap args in
|
|
958
|
+
if is_nullish found then respond 404 Noval (Some (jo [("statusText", Str "Not found")]))
|
|
959
|
+
else begin
|
|
960
|
+
(match found with List r -> List.iter (fun item -> ignore (delprop item (Str "$KEY"))) !r | _ -> ());
|
|
961
|
+
respond 200 (clone found) None
|
|
962
|
+
end
|
|
963
|
+
| "update" ->
|
|
964
|
+
let update_match = empty_map () in
|
|
965
|
+
(match fctx.c_reqdata with Map _ -> (match getp fctx.c_reqdata "id" with Noval -> () | v -> setp update_match "id" v) | _ -> ());
|
|
966
|
+
let update_match = if size update_match > 0 then update_match else resolve_match fctx (empty_map ()) in
|
|
967
|
+
let args = build_args fctx op update_match in
|
|
968
|
+
let ent = ref (getelem (select entmap args) (Num 0.0)) in
|
|
969
|
+
(if is_nullish !ent then match entmap with
|
|
970
|
+
| Map m -> (try (match List.find (fun (_, v) -> match v with Map _ -> true | _ -> false) m.entries with (_, v) -> ent := v) with Not_found -> ())
|
|
971
|
+
| _ -> ());
|
|
972
|
+
if is_nullish !ent then respond 404 Noval (Some (jo [("statusText", Str "Not found")]))
|
|
973
|
+
else begin
|
|
974
|
+
(match !ent with Map _ -> (match fctx.c_reqdata with Map _ -> List.iter (fun k -> setp !ent k (getp fctx.c_reqdata k)) (keysof fctx.c_reqdata) | _ -> ()) | _ -> ());
|
|
975
|
+
ignore (delprop !ent (Str "$KEY"));
|
|
976
|
+
respond 200 (clone !ent) None
|
|
977
|
+
end
|
|
978
|
+
| "remove" ->
|
|
979
|
+
let args = build_args fctx op (resolve_match fctx fctx.c_reqmatch) in
|
|
980
|
+
let ent = getelem (select entmap args) (Num 0.0) in
|
|
981
|
+
(match ent with Map _ -> ignore (delprop entmap (getp ent "id")) | _ -> ());
|
|
982
|
+
respond 200 Noval None
|
|
983
|
+
| "create" ->
|
|
984
|
+
ignore (build_args fctx op fctx.c_reqdata);
|
|
985
|
+
let eid = let v = (cu fctx).u_param fctx (Str "id") in if is_nullish v then Str (random_id16 ()) else v in
|
|
986
|
+
let ent = clone fctx.c_reqdata in
|
|
987
|
+
(match ent with
|
|
988
|
+
| Map _ ->
|
|
989
|
+
setp ent "id" eid;
|
|
990
|
+
(match eid with Str s -> setp entmap s ent | _ -> ());
|
|
991
|
+
ignore (delprop ent (Str "$KEY"));
|
|
992
|
+
respond 200 (clone ent) None
|
|
993
|
+
| _ -> respond 200 ent None)
|
|
994
|
+
| _ -> respond 404 Noval (Some (jo [("statusText", Str "Unknown operation")]))) in
|
|
995
|
+
let make_netsim net inner =
|
|
996
|
+
let netcalls = ref 0 in
|
|
997
|
+
let pick_latency () =
|
|
998
|
+
match getp net "latency" with
|
|
999
|
+
| Noval | Null -> 0.
|
|
1000
|
+
| Num n -> if n < 0. then 0. else n
|
|
1001
|
+
| Map _ as lat ->
|
|
1002
|
+
let mn = match getp lat "min" with Num n -> int_of_float n | _ -> 0 in
|
|
1003
|
+
let mx = match getp lat "max" with Num n -> int_of_float n | _ -> mn in
|
|
1004
|
+
if mx <= mn then float_of_int mn else float_of_int (mn + ((mx - mn) asr 1))
|
|
1005
|
+
| _ -> 0. in
|
|
1006
|
+
let sleep ms = if ms > 0. then (match getp net "sleep" with Func _ as fn -> ignore (call_vfn fn (Num ms)) | _ -> ()) in
|
|
1007
|
+
fun fctx url fetchdef ->
|
|
1008
|
+
incr netcalls; let call = !netcalls in
|
|
1009
|
+
if getp net "offline" = Bool true then
|
|
1010
|
+
(sleep (pick_latency ()); (Noval, Some (ctx_make_error fctx "netsim_offline" ("Simulated network offline (URL was: \"" ^ url ^ "\")"))))
|
|
1011
|
+
else if call <= (match getp net "errorTimes" with Num n -> int_of_float n | _ -> 0) then
|
|
1012
|
+
(sleep (pick_latency ()); (Noval, Some (ctx_make_error fctx "netsim_conn" ("Simulated connection error (call " ^ string_of_int call ^ ")"))))
|
|
1013
|
+
else if call <= (match getp net "failTimes" with Num n -> int_of_float n | _ -> 0) then begin
|
|
1014
|
+
sleep (pick_latency ());
|
|
1015
|
+
let status = match getp net "failStatus" with Num n -> int_of_float n | _ -> 503 in
|
|
1016
|
+
(jo [("status", vint_of status); ("statusText", Str "Simulated Failure"); ("body", Str "not-used"); ("json", json_thunk Noval); ("headers", empty_map ())], None)
|
|
1017
|
+
end
|
|
1018
|
+
else (sleep (pick_latency ()); inner fctx url fetchdef) in
|
|
1019
|
+
f.f_init <- (fun ctx opts ->
|
|
1020
|
+
let entity = match getp opts "entity" with Map _ as m -> m | _ -> empty_map () in
|
|
1021
|
+
(cc ctx).cl_mode <- "test";
|
|
1022
|
+
ignore (walk ~before:(fun key v _parent path ->
|
|
1023
|
+
(if size path = 2 && ismap v && not (is_nullish key) then ignore (setprop v (Str "id") key));
|
|
1024
|
+
v) entity);
|
|
1025
|
+
let mock = make_mock entity in
|
|
1026
|
+
let u = cu ctx in
|
|
1027
|
+
(match getp opts "net" with
|
|
1028
|
+
| Map _ as net -> u.u_fetcher <- make_netsim net mock
|
|
1029
|
+
| _ -> u.u_fetcher <- mock));
|
|
1030
|
+
f
|
|
1031
|
+
|
|
1032
|
+
(* ------------------------------------------------------------------ *)
|
|
1033
|
+
(* client construction + direct + prepare + test *)
|
|
1034
|
+
(* ------------------------------------------------------------------ *)
|
|
1035
|
+
|
|
1036
|
+
let make_client_base ~(config : value) ~(make_feature : string -> feature) (options : value) : sdk_client =
|
|
1037
|
+
let utility = new_utility () in
|
|
1038
|
+
register utility;
|
|
1039
|
+
let client = { cl_mode = "live"; cl_features = []; cl_options = Noval;
|
|
1040
|
+
cl_utility = utility; cl_rootctx = None; cl_track = empty_map () } in
|
|
1041
|
+
let rootopts = if is_noval options then empty_map () else options in
|
|
1042
|
+
let rootctx = utility.u_make_context
|
|
1043
|
+
{ (default_ctxspec ()) with cs_client = Some client; cs_utility = Some utility;
|
|
1044
|
+
cs_config = Some config; cs_options = Some rootopts;
|
|
1045
|
+
cs_shared = Some (empty_map ()) } None in
|
|
1046
|
+
client.cl_rootctx <- Some rootctx;
|
|
1047
|
+
let opts = utility.u_make_options rootctx in
|
|
1048
|
+
client.cl_options <- opts;
|
|
1049
|
+
if getpath_s opts "feature.test.active" = Bool true then client.cl_mode <- "test";
|
|
1050
|
+
rootctx.c_options <- opts;
|
|
1051
|
+
(* Add features in the resolved order (make_options records an explicit
|
|
1052
|
+
array order, else defaults to test-first). Ordering matters: the `test`
|
|
1053
|
+
feature installs the base mock transport and the transport features
|
|
1054
|
+
(retry/cache/netsim/proxy/ratelimit) wrap whatever is current, so `test`
|
|
1055
|
+
must be added before them to sit at the base of the wrapper chain. *)
|
|
1056
|
+
let feature_opts = match to_map (getp opts "feature") with Map _ as m -> m | _ -> empty_map () in
|
|
1057
|
+
let feature_order = match getpath_s opts "__derived__.featureorder" with List r -> !r | _ -> [] in
|
|
1058
|
+
List.iter (fun fname_v ->
|
|
1059
|
+
match fname_v with
|
|
1060
|
+
| Str fname ->
|
|
1061
|
+
(match to_map (getp feature_opts fname) with
|
|
1062
|
+
| Map _ as fopts -> if getp fopts "active" = Bool true then utility.u_feature_add rootctx (make_feature fname)
|
|
1063
|
+
| _ -> ())
|
|
1064
|
+
| _ -> ())
|
|
1065
|
+
feature_order;
|
|
1066
|
+
List.iter (fun ftr -> utility.u_feature_init rootctx ftr) client.cl_features;
|
|
1067
|
+
utility.u_feature_hook rootctx "PostConstruct";
|
|
1068
|
+
client
|
|
1069
|
+
|
|
1070
|
+
let prepare (client : sdk_client) (fetchargs : value) : value =
|
|
1071
|
+
let u = client.cl_utility in
|
|
1072
|
+
let fetchargs = if is_noval fetchargs then empty_map () else fetchargs in
|
|
1073
|
+
let ctrl = match to_map (getp fetchargs "ctrl") with Map _ as m -> m | _ -> empty_map () in
|
|
1074
|
+
let ctx = u.u_make_context { (default_ctxspec ()) with cs_opname = Some "prepare"; cs_ctrl = Some ctrl } client.cl_rootctx in
|
|
1075
|
+
let options = client.cl_options in
|
|
1076
|
+
let path = match getp fetchargs "path" with Str s -> s | _ -> "" in
|
|
1077
|
+
let method_ = match getp fetchargs "method" with Str s -> s | _ -> "GET" in
|
|
1078
|
+
let params = match to_map (getp fetchargs "params") with Map _ as m -> m | _ -> empty_map () in
|
|
1079
|
+
let query = match to_map (getp fetchargs "query") with Map _ as m -> m | _ -> empty_map () in
|
|
1080
|
+
let headers = u.u_prepare_headers ctx in
|
|
1081
|
+
let base = match getp options "base" with Str s -> s | _ -> "" in
|
|
1082
|
+
let prefix = match getp options "prefix" with Str s -> s | _ -> "" in
|
|
1083
|
+
let suffix = match getp options "suffix" with Str s -> s | _ -> "" in
|
|
1084
|
+
let sp = new_spec (jo [("base", Str base); ("prefix", Str prefix); ("suffix", Str suffix);
|
|
1085
|
+
("path", Str path); ("method", Str method_); ("params", params);
|
|
1086
|
+
("query", query); ("headers", headers); ("body", getp fetchargs "body");
|
|
1087
|
+
("step", Str "start")]) in
|
|
1088
|
+
ctx.c_spec <- Some sp;
|
|
1089
|
+
(match getp fetchargs "headers" with Map _ as uh -> List.iter (fun k -> setp sp.sp_headers k (getp uh k)) (keysof uh) | _ -> ());
|
|
1090
|
+
(match u.u_prepare_auth ctx with (_, Some err) -> raise (Sdk_error_exc err) | _ -> ());
|
|
1091
|
+
(match u.u_make_fetch_def ctx with (_, Some err) -> raise (Sdk_error_exc err) | (fd, None) -> fd)
|
|
1092
|
+
|
|
1093
|
+
let direct (client : sdk_client) (fetchargs : value) : value =
|
|
1094
|
+
let u = client.cl_utility in
|
|
1095
|
+
let fetchargs = if is_noval fetchargs then empty_map () else fetchargs in
|
|
1096
|
+
match (try `Ok (prepare client fetchargs) with Sdk_error_exc e -> `Err e) with
|
|
1097
|
+
| `Err e -> jo [("ok", Bool false); ("err", err_to_value e)]
|
|
1098
|
+
| `Ok fetchdef ->
|
|
1099
|
+
let ctrl = match to_map (getp fetchargs "ctrl") with Map _ as m -> m | _ -> empty_map () in
|
|
1100
|
+
let ctx = u.u_make_context { (default_ctxspec ()) with cs_opname = Some "direct"; cs_ctrl = Some ctrl } client.cl_rootctx in
|
|
1101
|
+
let url = match getp fetchdef "url" with Str s -> s | _ -> "" in
|
|
1102
|
+
let (fetched, fetch_err) = u.u_fetcher ctx url fetchdef in
|
|
1103
|
+
(match fetch_err with
|
|
1104
|
+
| Some fe -> jo [("ok", Bool false); ("err", err_to_value fe)]
|
|
1105
|
+
| None ->
|
|
1106
|
+
if is_noval fetched || fetched = Null then
|
|
1107
|
+
jo [("ok", Bool false); ("err", err_to_value (ctx_make_error ctx "direct_no_response" "response: undefined"))]
|
|
1108
|
+
else (match fetched with
|
|
1109
|
+
| Map _ ->
|
|
1110
|
+
let status = to_int (getp fetched "status") in
|
|
1111
|
+
let headers = match getp fetched "headers" with Map _ as m -> m | _ -> empty_map () in
|
|
1112
|
+
let content_length = match getp headers "content-length" with Str s -> s | Num n -> num_to_string n | _ -> "" in
|
|
1113
|
+
let no_body = status = 204 || status = 304 || content_length = "0" in
|
|
1114
|
+
let json_data = if no_body then Noval
|
|
1115
|
+
else (match getp fetched "json" with Func _ as jf -> (try call_json jf with _ -> Noval) | _ -> Noval) in
|
|
1116
|
+
jo [("ok", Bool (status >= 200 && status < 300)); ("status", vint_of status);
|
|
1117
|
+
("headers", headers); ("data", json_data)]
|
|
1118
|
+
| _ -> jo [("ok", Bool false); ("err", err_to_value (ctx_make_error ctx "direct_invalid" "invalid response type"))]))
|
|
1119
|
+
|
|
1120
|
+
let sdk_test ~(config : value) ~(make_feature : string -> feature) (testopts : value) (sdkopts : value) : sdk_client =
|
|
1121
|
+
let sdkopts = match clone (if is_noval sdkopts then empty_map () else sdkopts) with Map _ as m -> m | _ -> empty_map () in
|
|
1122
|
+
let testopts = match clone (if is_noval testopts then empty_map () else testopts) with Map _ as m -> m | _ -> empty_map () in
|
|
1123
|
+
setp testopts "active" (Bool true);
|
|
1124
|
+
ignore (setpath sdkopts (Str "feature.test") testopts);
|
|
1125
|
+
let sdk = make_client_base ~config ~make_feature sdkopts in
|
|
1126
|
+
sdk.cl_mode <- "test";
|
|
1127
|
+
sdk
|