@voxgig/sdkgen 0.35.2 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/cmp/Readme.js +5 -5
- package/dist/cmp/Readme.js.map +1 -1
- package/dist/cmp/ReadmeEntity.js +74 -24
- package/dist/cmp/ReadmeEntity.js.map +1 -1
- package/dist/cmp/ReadmeExplanation.d.ts +2 -0
- package/dist/cmp/ReadmeExplanation.js +308 -0
- package/dist/cmp/ReadmeExplanation.js.map +1 -0
- package/dist/cmp/ReadmeHowto.d.ts +2 -0
- package/dist/cmp/ReadmeHowto.js +18 -0
- package/dist/cmp/ReadmeHowto.js.map +1 -0
- package/dist/cmp/ReadmeIntro.js +8 -23
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeModel.js +55 -91
- package/dist/cmp/ReadmeModel.js.map +1 -1
- package/dist/cmp/ReadmeOptions.js +35 -11
- package/dist/cmp/ReadmeOptions.js.map +1 -1
- package/dist/cmp/ReadmeQuick.js +4 -1
- package/dist/cmp/ReadmeQuick.js.map +1 -1
- package/dist/cmp/ReadmeRef.js +1042 -40
- package/dist/cmp/ReadmeRef.js.map +1 -1
- package/dist/cmp/ReadmeTop.d.ts +2 -0
- package/dist/cmp/ReadmeTop.js +171 -0
- package/dist/cmp/ReadmeTop.js.map +1 -0
- package/dist/sdkgen.d.ts +7 -1
- package/dist/sdkgen.js +13 -1
- package/dist/sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/project/.sdk/model/feature/feature-index.jsonic +5 -0
- package/project/.sdk/model/feature/log.jsonic +5 -1
- package/project/.sdk/model/feature/test.jsonic +1 -1
- package/project/.sdk/model/target/lua.jsonic +23 -0
- package/project/.sdk/model/target/php.jsonic +22 -0
- package/project/.sdk/model/target/py.jsonic +23 -0
- package/project/.sdk/model/target/rb.jsonic +23 -0
- package/project/.sdk/src/cmp/go/Main_go.ts +2 -6
- package/project/.sdk/src/cmp/go/ReadmeExplanation_go.ts +42 -0
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +112 -0
- package/project/.sdk/src/cmp/go/ReadmeInstall_go.ts +29 -0
- package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +129 -0
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +163 -0
- package/project/.sdk/src/cmp/go/ReadmeTopHowto_go.ts +24 -0
- package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +67 -0
- package/project/.sdk/src/cmp/go/ReadmeTopTest_go.ts +40 -0
- package/project/.sdk/src/cmp/go/TestDirect_go.ts +46 -2
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +360 -160
- package/project/.sdk/src/cmp/go/Test_go.ts +24 -1
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +1 -1
- package/project/.sdk/src/cmp/lua/Config_lua.ts +112 -0
- package/project/.sdk/src/cmp/lua/EntityOperation_lua.ts +44 -0
- package/project/.sdk/src/cmp/lua/Entity_lua.ts +62 -0
- package/project/.sdk/src/cmp/lua/MainEntity_lua.ts +23 -0
- package/project/.sdk/src/cmp/lua/Main_lua.ts +133 -0
- package/project/.sdk/src/cmp/lua/Package_lua.ts +80 -0
- package/project/.sdk/src/cmp/lua/ReadmeExplanation_lua.ts +42 -0
- package/project/.sdk/src/cmp/lua/ReadmeHowto_lua.ts +100 -0
- package/project/.sdk/src/cmp/lua/ReadmeInstall_lua.ts +26 -0
- package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +129 -0
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +99 -0
- package/project/.sdk/src/cmp/lua/ReadmeTopHowto_lua.ts +24 -0
- package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +55 -0
- package/project/.sdk/src/cmp/lua/ReadmeTopTest_lua.ts +38 -0
- package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +261 -0
- package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +483 -0
- package/project/.sdk/src/cmp/lua/Test_lua.ts +49 -0
- package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +147 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityCreateOp.fragment.lua +27 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityListOp.fragment.lua +24 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityLoadOp.fragment.lua +30 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityRemoveOp.fragment.lua +30 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityUpdateOp.fragment.lua +30 -0
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +256 -0
- package/project/.sdk/src/cmp/lua/fragment/SdkError.fragment.lua +26 -0
- package/project/.sdk/src/cmp/lua/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/lua/utility_lua.ts +84 -0
- package/project/.sdk/src/cmp/php/Config_php.ts +107 -0
- package/project/.sdk/src/cmp/php/EntityOperation_php.ts +44 -0
- package/project/.sdk/src/cmp/php/Entity_php.ts +62 -0
- package/project/.sdk/src/cmp/php/MainEntity_php.ts +24 -0
- package/project/.sdk/src/cmp/php/Main_php.ts +135 -0
- package/project/.sdk/src/cmp/php/Package_php.ts +87 -0
- package/project/.sdk/src/cmp/php/ReadmeExplanation_php.ts +42 -0
- package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +101 -0
- package/project/.sdk/src/cmp/php/ReadmeInstall_php.ts +19 -0
- package/project/.sdk/src/cmp/php/ReadmeModel_php.ts +129 -0
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +100 -0
- package/project/.sdk/src/cmp/php/ReadmeTopHowto_php.ts +24 -0
- package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +56 -0
- package/project/.sdk/src/cmp/php/ReadmeTopTest_php.ts +38 -0
- package/project/.sdk/src/cmp/php/TestDirect_php.ts +270 -0
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +484 -0
- package/project/.sdk/src/cmp/php/Test_php.ts +56 -0
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +146 -0
- package/project/.sdk/src/cmp/php/fragment/EntityCreateOp.fragment.php +26 -0
- package/project/.sdk/src/cmp/php/fragment/EntityListOp.fragment.php +23 -0
- package/project/.sdk/src/cmp/php/fragment/EntityLoadOp.fragment.php +29 -0
- package/project/.sdk/src/cmp/php/fragment/EntityRemoveOp.fragment.php +29 -0
- package/project/.sdk/src/cmp/php/fragment/EntityUpdateOp.fragment.php +29 -0
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +233 -0
- package/project/.sdk/src/cmp/php/fragment/SdkError.fragment.php +24 -0
- package/project/.sdk/src/cmp/php/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/php/utility_php.ts +85 -0
- package/project/.sdk/src/cmp/py/Config_py.ts +93 -0
- package/project/.sdk/src/cmp/py/EntityOperation_py.ts +44 -0
- package/project/.sdk/src/cmp/py/Entity_py.ts +62 -0
- package/project/.sdk/src/cmp/py/MainEntity_py.ts +22 -0
- package/project/.sdk/src/cmp/py/Main_py.ts +156 -0
- package/project/.sdk/src/cmp/py/Package_py.ts +75 -0
- package/project/.sdk/src/cmp/py/ReadmeExplanation_py.ts +41 -0
- package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +98 -0
- package/project/.sdk/src/cmp/py/ReadmeInstall_py.ts +25 -0
- package/project/.sdk/src/cmp/py/ReadmeModel_py.ts +130 -0
- package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +100 -0
- package/project/.sdk/src/cmp/py/ReadmeTopHowto_py.ts +24 -0
- package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +56 -0
- package/project/.sdk/src/cmp/py/ReadmeTopTest_py.ts +38 -0
- package/project/.sdk/src/cmp/py/TestDirect_py.ts +248 -0
- package/project/.sdk/src/cmp/py/TestEntity_py.ts +475 -0
- package/project/.sdk/src/cmp/py/Test_py.ts +55 -0
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +112 -0
- package/project/.sdk/src/cmp/py/fragment/EntityCreateOp.fragment.py +25 -0
- package/project/.sdk/src/cmp/py/fragment/EntityListOp.fragment.py +22 -0
- package/project/.sdk/src/cmp/py/fragment/EntityLoadOp.fragment.py +27 -0
- package/project/.sdk/src/cmp/py/fragment/EntityRemoveOp.fragment.py +27 -0
- package/project/.sdk/src/cmp/py/fragment/EntityUpdateOp.fragment.py +27 -0
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +222 -0
- package/project/.sdk/src/cmp/py/fragment/SdkError.fragment.py +16 -0
- package/project/.sdk/src/cmp/py/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/py/utility_py.ts +84 -0
- package/project/.sdk/src/cmp/rb/Config_rb.ts +101 -0
- package/project/.sdk/src/cmp/rb/EntityOperation_rb.ts +44 -0
- package/project/.sdk/src/cmp/rb/Entity_rb.ts +62 -0
- package/project/.sdk/src/cmp/rb/MainEntity_rb.ts +23 -0
- package/project/.sdk/src/cmp/rb/Main_rb.ts +130 -0
- package/project/.sdk/src/cmp/rb/Package_rb.ts +111 -0
- package/project/.sdk/src/cmp/rb/ReadmeExplanation_rb.ts +42 -0
- package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +98 -0
- package/project/.sdk/src/cmp/rb/ReadmeInstall_rb.ts +31 -0
- package/project/.sdk/src/cmp/rb/ReadmeModel_rb.ts +129 -0
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +99 -0
- package/project/.sdk/src/cmp/rb/ReadmeTopHowto_rb.ts +24 -0
- package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +55 -0
- package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +38 -0
- package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +260 -0
- package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +476 -0
- package/project/.sdk/src/cmp/rb/Test_rb.ts +50 -0
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +116 -0
- package/project/.sdk/src/cmp/rb/fragment/EntityCreateOp.fragment.rb +25 -0
- package/project/.sdk/src/cmp/rb/fragment/EntityListOp.fragment.rb +20 -0
- package/project/.sdk/src/cmp/rb/fragment/EntityLoadOp.fragment.rb +26 -0
- package/project/.sdk/src/cmp/rb/fragment/EntityRemoveOp.fragment.rb +26 -0
- package/project/.sdk/src/cmp/rb/fragment/EntityUpdateOp.fragment.rb +26 -0
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +203 -0
- package/project/.sdk/src/cmp/rb/fragment/SdkError.fragment.rb +16 -0
- package/project/.sdk/src/cmp/rb/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/rb/utility_rb.ts +84 -0
- package/project/.sdk/src/cmp/ts/ReadmeExplanation_ts.ts +34 -0
- package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +123 -0
- package/project/.sdk/src/cmp/ts/ReadmeInstall_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +159 -0
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +69 -54
- package/project/.sdk/src/cmp/ts/ReadmeTopHowto_ts.ts +25 -0
- package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +65 -0
- package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +36 -0
- package/project/.sdk/tm/go/feature/log_feature.go +133 -0
- package/project/.sdk/tm/go/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/lua/LICENSE +22 -0
- package/project/.sdk/tm/lua/Makefile +10 -0
- package/project/.sdk/tm/lua/core/context.lua +208 -0
- package/project/.sdk/tm/lua/core/control.lua +17 -0
- package/project/.sdk/tm/lua/core/error.lua +30 -0
- package/project/.sdk/tm/lua/core/helpers.lua +30 -0
- package/project/.sdk/tm/lua/core/operation.lua +51 -0
- package/project/.sdk/tm/lua/core/response.lua +45 -0
- package/project/.sdk/tm/lua/core/result.lua +58 -0
- package/project/.sdk/tm/lua/core/spec.lua +29 -0
- package/project/.sdk/tm/lua/core/utility_type.lua +90 -0
- package/project/.sdk/tm/lua/feature/base_feature.lua +35 -0
- package/project/.sdk/tm/lua/feature/log_feature.lua +80 -0
- package/project/.sdk/tm/lua/feature/test_feature.lua +202 -0
- package/project/.sdk/tm/lua/src/feature/README.md +3 -0
- package/project/.sdk/tm/lua/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/lua/test/runner.lua +86 -0
- package/project/.sdk/tm/lua/utility/clean.lua +7 -0
- package/project/.sdk/tm/lua/utility/done.lua +19 -0
- package/project/.sdk/tm/lua/utility/feature_add.lua +8 -0
- package/project/.sdk/tm/lua/utility/feature_hook.lua +21 -0
- package/project/.sdk/tm/lua/utility/feature_init.lua +24 -0
- package/project/.sdk/tm/lua/utility/fetcher.lua +96 -0
- package/project/.sdk/tm/lua/utility/make_context.lua +9 -0
- package/project/.sdk/tm/lua/utility/make_error.lua +73 -0
- package/project/.sdk/tm/lua/utility/make_fetch_def.lua +43 -0
- package/project/.sdk/tm/lua/utility/make_options.lua +116 -0
- package/project/.sdk/tm/lua/utility/make_point.lua +92 -0
- package/project/.sdk/tm/lua/utility/make_request.lua +58 -0
- package/project/.sdk/tm/lua/utility/make_response.lua +44 -0
- package/project/.sdk/tm/lua/utility/make_result.lua +51 -0
- package/project/.sdk/tm/lua/utility/make_spec.lua +72 -0
- package/project/.sdk/tm/lua/utility/make_url.lua +46 -0
- package/project/.sdk/tm/lua/utility/param.lua +68 -0
- package/project/.sdk/tm/lua/utility/prepare_auth.lua +39 -0
- package/project/.sdk/tm/lua/utility/prepare_body.lua +14 -0
- package/project/.sdk/tm/lua/utility/prepare_headers.lua +20 -0
- package/project/.sdk/tm/lua/utility/prepare_method.lua +17 -0
- package/project/.sdk/tm/lua/utility/prepare_params.lua +36 -0
- package/project/.sdk/tm/lua/utility/prepare_path.lua +19 -0
- package/project/.sdk/tm/lua/utility/prepare_query.lua +41 -0
- package/project/.sdk/tm/lua/utility/register.lua +71 -0
- package/project/.sdk/tm/lua/utility/result_basic.lua +32 -0
- package/project/.sdk/tm/lua/utility/result_body.lua +17 -0
- package/project/.sdk/tm/lua/utility/result_headers.lua +22 -0
- package/project/.sdk/tm/lua/utility/struct/struct.lua +3417 -0
- package/project/.sdk/tm/lua/utility/transform_request.lua +31 -0
- package/project/.sdk/tm/lua/utility/transform_response.lua +44 -0
- package/project/.sdk/tm/php/LICENSE +22 -0
- package/project/.sdk/tm/php/Makefile +10 -0
- package/project/.sdk/tm/php/core/Context.php +139 -0
- package/project/.sdk/tm/php/core/Control.php +18 -0
- package/project/.sdk/tm/php/core/Error.php +37 -0
- package/project/.sdk/tm/php/core/Helpers.php +25 -0
- package/project/.sdk/tm/php/core/Operation.php +36 -0
- package/project/.sdk/tm/php/core/Response.php +30 -0
- package/project/.sdk/tm/php/core/Result.php +35 -0
- package/project/.sdk/tm/php/core/Spec.php +38 -0
- package/project/.sdk/tm/php/core/UtilityType.php +89 -0
- package/project/.sdk/tm/php/feature/BaseFeature.php +37 -0
- package/project/.sdk/tm/php/feature/LogFeature.php +65 -0
- package/project/.sdk/tm/php/feature/TestFeature.php +193 -0
- package/project/.sdk/tm/php/src/feature/README.md +3 -0
- package/project/.sdk/tm/php/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/php/test/Runner.php +89 -0
- package/project/.sdk/tm/php/utility/Clean.php +12 -0
- package/project/.sdk/tm/php/utility/Done.php +26 -0
- package/project/.sdk/tm/php/utility/FeatureAdd.php +12 -0
- package/project/.sdk/tm/php/utility/FeatureHook.php +23 -0
- package/project/.sdk/tm/php/utility/FeatureInit.php +25 -0
- package/project/.sdk/tm/php/utility/Fetcher.php +101 -0
- package/project/.sdk/tm/php/utility/MakeContext.php +14 -0
- package/project/.sdk/tm/php/utility/MakeError.php +59 -0
- package/project/.sdk/tm/php/utility/MakeFetchDef.php +36 -0
- package/project/.sdk/tm/php/utility/MakeOptions.php +98 -0
- package/project/.sdk/tm/php/utility/MakePoint.php +87 -0
- package/project/.sdk/tm/php/utility/MakeRequest.php +57 -0
- package/project/.sdk/tm/php/utility/MakeResponse.php +43 -0
- package/project/.sdk/tm/php/utility/MakeResult.php +50 -0
- package/project/.sdk/tm/php/utility/MakeSpec.php +64 -0
- package/project/.sdk/tm/php/utility/MakeUrl.php +41 -0
- package/project/.sdk/tm/php/utility/Param.php +66 -0
- package/project/.sdk/tm/php/utility/PrepareAuth.php +33 -0
- package/project/.sdk/tm/php/utility/PrepareBody.php +15 -0
- package/project/.sdk/tm/php/utility/PrepareHeaders.php +18 -0
- package/project/.sdk/tm/php/utility/PrepareMethod.php +21 -0
- package/project/.sdk/tm/php/utility/PrepareParams.php +34 -0
- package/project/.sdk/tm/php/utility/PreparePath.php +20 -0
- package/project/.sdk/tm/php/utility/PrepareQuery.php +32 -0
- package/project/.sdk/tm/php/utility/Register.php +67 -0
- package/project/.sdk/tm/php/utility/ResultBasic.php +29 -0
- package/project/.sdk/tm/php/utility/ResultBody.php +17 -0
- package/project/.sdk/tm/php/utility/ResultHeaders.php +21 -0
- package/project/.sdk/tm/php/utility/TransformRequest.php +27 -0
- package/project/.sdk/tm/php/utility/TransformResponse.php +42 -0
- package/project/.sdk/tm/php/utility/struct/Struct.php +3431 -0
- package/project/.sdk/tm/py/Makefile +10 -0
- package/project/.sdk/tm/py/core/__init__.py +0 -0
- package/project/.sdk/tm/py/core/context.py +199 -0
- package/project/.sdk/tm/py/core/control.py +12 -0
- package/project/.sdk/tm/py/core/error.py +18 -0
- package/project/.sdk/tm/py/core/helpers.py +15 -0
- package/project/.sdk/tm/py/core/operation.py +37 -0
- package/project/.sdk/tm/py/core/response.py +34 -0
- package/project/.sdk/tm/py/core/result.py +44 -0
- package/project/.sdk/tm/py/core/spec.py +23 -0
- package/project/.sdk/tm/py/core/utility_type.py +82 -0
- package/project/.sdk/tm/py/entity/__init__.py +0 -0
- package/project/.sdk/tm/py/feature/__init__.py +0 -0
- package/project/.sdk/tm/py/feature/base_feature.py +61 -0
- package/project/.sdk/tm/py/feature/log_feature.py +84 -0
- package/project/.sdk/tm/py/feature/test_feature.py +164 -0
- package/project/.sdk/tm/py/src/feature/README.md +3 -0
- package/project/.sdk/tm/py/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/__init__.py +0 -0
- package/project/.sdk/tm/py/test/runner.py +77 -0
- package/project/.sdk/tm/py/utility/__init__.py +0 -0
- package/project/.sdk/tm/py/utility/clean.py +5 -0
- package/project/.sdk/tm/py/utility/done.py +14 -0
- package/project/.sdk/tm/py/utility/feature_add.py +6 -0
- package/project/.sdk/tm/py/utility/feature_hook.py +15 -0
- package/project/.sdk/tm/py/utility/feature_init.py +18 -0
- package/project/.sdk/tm/py/utility/fetcher.py +95 -0
- package/project/.sdk/tm/py/utility/make_context.py +7 -0
- package/project/.sdk/tm/py/utility/make_error.py +64 -0
- package/project/.sdk/tm/py/utility/make_fetch_def.py +37 -0
- package/project/.sdk/tm/py/utility/make_options.py +103 -0
- package/project/.sdk/tm/py/utility/make_point.py +74 -0
- package/project/.sdk/tm/py/utility/make_request.py +52 -0
- package/project/.sdk/tm/py/utility/make_response.py +36 -0
- package/project/.sdk/tm/py/utility/make_result.py +41 -0
- package/project/.sdk/tm/py/utility/make_spec.py +68 -0
- package/project/.sdk/tm/py/utility/make_url.py +34 -0
- package/project/.sdk/tm/py/utility/param.py +55 -0
- package/project/.sdk/tm/py/utility/prepare_auth.py +34 -0
- package/project/.sdk/tm/py/utility/prepare_body.py +11 -0
- package/project/.sdk/tm/py/utility/prepare_headers.py +17 -0
- package/project/.sdk/tm/py/utility/prepare_method.py +15 -0
- package/project/.sdk/tm/py/utility/prepare_params.py +28 -0
- package/project/.sdk/tm/py/utility/prepare_path.py +16 -0
- package/project/.sdk/tm/py/utility/prepare_query.py +33 -0
- package/project/.sdk/tm/py/utility/register.py +68 -0
- package/project/.sdk/tm/py/utility/result_basic.py +26 -0
- package/project/.sdk/tm/py/utility/result_body.py +13 -0
- package/project/.sdk/tm/py/utility/result_headers.py +17 -0
- package/project/.sdk/tm/py/utility/transform_request.py +27 -0
- package/project/.sdk/tm/py/utility/transform_response.py +39 -0
- package/project/.sdk/tm/py/utility/voxgig_struct/__init__.py +72 -0
- package/project/.sdk/tm/py/utility/voxgig_struct/voxgig_struct.py +2770 -0
- package/project/.sdk/tm/rb/Gemfile +4 -0
- package/project/.sdk/tm/rb/LICENSE +22 -0
- package/project/.sdk/tm/rb/Makefile +10 -0
- package/project/.sdk/tm/rb/core/context.rb +105 -0
- package/project/.sdk/tm/rb/core/control.rb +11 -0
- package/project/.sdk/tm/rb/core/error.rb +24 -0
- package/project/.sdk/tm/rb/core/helpers.rb +16 -0
- package/project/.sdk/tm/rb/core/operation.rb +26 -0
- package/project/.sdk/tm/rb/core/response.rb +20 -0
- package/project/.sdk/tm/rb/core/result.rb +23 -0
- package/project/.sdk/tm/rb/core/spec.rb +23 -0
- package/project/.sdk/tm/rb/core/utility_type.rb +32 -0
- package/project/.sdk/tm/rb/feature/base_feature.rb +30 -0
- package/project/.sdk/tm/rb/feature/log_feature.rb +50 -0
- package/project/.sdk/tm/rb/feature/test_feature.rb +154 -0
- package/project/.sdk/tm/rb/src/feature/README.md +3 -0
- package/project/.sdk/tm/rb/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/rb/test/runner.rb +65 -0
- package/project/.sdk/tm/rb/utility/clean.rb +4 -0
- package/project/.sdk/tm/rb/utility/done.rb +14 -0
- package/project/.sdk/tm/rb/utility/feature_add.rb +6 -0
- package/project/.sdk/tm/rb/utility/feature_hook.rb +11 -0
- package/project/.sdk/tm/rb/utility/feature_init.rb +16 -0
- package/project/.sdk/tm/rb/utility/fetcher.rb +67 -0
- package/project/.sdk/tm/rb/utility/make_context.rb +7 -0
- package/project/.sdk/tm/rb/utility/make_error.rb +44 -0
- package/project/.sdk/tm/rb/utility/make_fetch_def.rb +24 -0
- package/project/.sdk/tm/rb/utility/make_options.rb +57 -0
- package/project/.sdk/tm/rb/utility/make_point.rb +77 -0
- package/project/.sdk/tm/rb/utility/make_request.rb +44 -0
- package/project/.sdk/tm/rb/utility/make_response.rb +25 -0
- package/project/.sdk/tm/rb/utility/make_result.rb +33 -0
- package/project/.sdk/tm/rb/utility/make_spec.rb +50 -0
- package/project/.sdk/tm/rb/utility/make_url.rb +32 -0
- package/project/.sdk/tm/rb/utility/param.rb +48 -0
- package/project/.sdk/tm/rb/utility/prepare_auth.rb +26 -0
- package/project/.sdk/tm/rb/utility/prepare_body.rb +6 -0
- package/project/.sdk/tm/rb/utility/prepare_headers.rb +11 -0
- package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -0
- package/project/.sdk/tm/rb/utility/prepare_params.rb +25 -0
- package/project/.sdk/tm/rb/utility/prepare_path.rb +13 -0
- package/project/.sdk/tm/rb/utility/prepare_query.rb +22 -0
- package/project/.sdk/tm/rb/utility/register.rb +63 -0
- package/project/.sdk/tm/rb/utility/result_basic.rb +23 -0
- package/project/.sdk/tm/rb/utility/result_body.rb +11 -0
- package/project/.sdk/tm/rb/utility/result_headers.rb +15 -0
- package/project/.sdk/tm/rb/utility/struct/voxgig_struct.rb +2256 -0
- package/project/.sdk/tm/rb/utility/transform_request.rb +15 -0
- package/project/.sdk/tm/rb/utility/transform_response.rb +23 -0
- package/src/cmp/Readme.ts +5 -5
- package/src/cmp/ReadmeEntity.ts +77 -25
- package/src/cmp/ReadmeExplanation.ts +333 -0
- package/src/cmp/ReadmeHowto.ts +28 -0
- package/src/cmp/ReadmeIntro.ts +10 -24
- package/src/cmp/ReadmeModel.ts +57 -88
- package/src/cmp/ReadmeOptions.ts +40 -11
- package/src/cmp/ReadmeQuick.ts +4 -1
- package/src/cmp/ReadmeRef.ts +1057 -40
- package/src/cmp/ReadmeTop.ts +213 -0
- package/src/sdkgen.ts +12 -0
- package/project/.sdk/tm/go/test/exists_test.go +0 -16
package/dist/cmp/ReadmeRef.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReadmeRef = void 0;
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const types_1 = require("../types");
|
|
6
|
-
const
|
|
6
|
+
const OP_SIGNATURES_TS = {
|
|
7
7
|
load: {
|
|
8
8
|
sig: 'load(match: object, ctrl?: object)',
|
|
9
9
|
returns: 'Promise<object>',
|
|
@@ -30,12 +30,154 @@ const OP_SIGNATURES = {
|
|
|
30
30
|
desc: 'Remove the entity matching the given criteria.',
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
|
+
const OP_SIGNATURES_LUA = {
|
|
34
|
+
load: {
|
|
35
|
+
sig: 'load(reqmatch, ctrl) -> any, err',
|
|
36
|
+
returns: 'any, err',
|
|
37
|
+
desc: 'Load a single entity matching the given criteria.',
|
|
38
|
+
},
|
|
39
|
+
list: {
|
|
40
|
+
sig: 'list(reqmatch, ctrl) -> any, err',
|
|
41
|
+
returns: 'any, err',
|
|
42
|
+
desc: 'List entities matching the given criteria. Returns an array.',
|
|
43
|
+
},
|
|
44
|
+
create: {
|
|
45
|
+
sig: 'create(reqdata, ctrl) -> any, err',
|
|
46
|
+
returns: 'any, err',
|
|
47
|
+
desc: 'Create a new entity with the given data.',
|
|
48
|
+
},
|
|
49
|
+
update: {
|
|
50
|
+
sig: 'update(reqdata, ctrl) -> any, err',
|
|
51
|
+
returns: 'any, err',
|
|
52
|
+
desc: 'Update an existing entity. The data must include the entity `id`.',
|
|
53
|
+
},
|
|
54
|
+
remove: {
|
|
55
|
+
sig: 'remove(reqmatch, ctrl) -> any, err',
|
|
56
|
+
returns: 'any, err',
|
|
57
|
+
desc: 'Remove the entity matching the given criteria.',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
const OP_SIGNATURES_RB = {
|
|
61
|
+
load: {
|
|
62
|
+
sig: 'load(reqmatch, ctrl = nil) -> result, err',
|
|
63
|
+
returns: 'result, err',
|
|
64
|
+
desc: 'Load a single entity matching the given criteria.',
|
|
65
|
+
},
|
|
66
|
+
list: {
|
|
67
|
+
sig: 'list(reqmatch, ctrl = nil) -> result, err',
|
|
68
|
+
returns: 'result, err',
|
|
69
|
+
desc: 'List entities matching the given criteria. Returns an array.',
|
|
70
|
+
},
|
|
71
|
+
create: {
|
|
72
|
+
sig: 'create(reqdata, ctrl = nil) -> result, err',
|
|
73
|
+
returns: 'result, err',
|
|
74
|
+
desc: 'Create a new entity with the given data.',
|
|
75
|
+
},
|
|
76
|
+
update: {
|
|
77
|
+
sig: 'update(reqdata, ctrl = nil) -> result, err',
|
|
78
|
+
returns: 'result, err',
|
|
79
|
+
desc: 'Update an existing entity. The data must include the entity `id`.',
|
|
80
|
+
},
|
|
81
|
+
remove: {
|
|
82
|
+
sig: 'remove(reqmatch, ctrl = nil) -> result, err',
|
|
83
|
+
returns: 'result, err',
|
|
84
|
+
desc: 'Remove the entity matching the given criteria.',
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const OP_SIGNATURES_PY = {
|
|
88
|
+
load: {
|
|
89
|
+
sig: 'load(reqmatch, ctrl=None) -> tuple',
|
|
90
|
+
returns: '(result, err)',
|
|
91
|
+
desc: 'Load a single entity matching the given criteria.',
|
|
92
|
+
},
|
|
93
|
+
list: {
|
|
94
|
+
sig: 'list(reqmatch, ctrl=None) -> tuple',
|
|
95
|
+
returns: '(result, err)',
|
|
96
|
+
desc: 'List entities matching the given criteria. Returns an array.',
|
|
97
|
+
},
|
|
98
|
+
create: {
|
|
99
|
+
sig: 'create(reqdata, ctrl=None) -> tuple',
|
|
100
|
+
returns: '(result, err)',
|
|
101
|
+
desc: 'Create a new entity with the given data.',
|
|
102
|
+
},
|
|
103
|
+
update: {
|
|
104
|
+
sig: 'update(reqdata, ctrl=None) -> tuple',
|
|
105
|
+
returns: '(result, err)',
|
|
106
|
+
desc: 'Update an existing entity. The data must include the entity `id`.',
|
|
107
|
+
},
|
|
108
|
+
remove: {
|
|
109
|
+
sig: 'remove(reqmatch, ctrl=None) -> tuple',
|
|
110
|
+
returns: '(result, err)',
|
|
111
|
+
desc: 'Remove the entity matching the given criteria.',
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
const OP_SIGNATURES_PHP = {
|
|
115
|
+
load: {
|
|
116
|
+
sig: 'load(array $reqmatch, ?array $ctrl = null): array',
|
|
117
|
+
returns: 'array [$result, $err]',
|
|
118
|
+
desc: 'Load a single entity matching the given criteria.',
|
|
119
|
+
},
|
|
120
|
+
list: {
|
|
121
|
+
sig: 'list(array $reqmatch, ?array $ctrl = null): array',
|
|
122
|
+
returns: 'array [$result, $err]',
|
|
123
|
+
desc: 'List entities matching the given criteria. Returns an array.',
|
|
124
|
+
},
|
|
125
|
+
create: {
|
|
126
|
+
sig: 'create(array $reqdata, ?array $ctrl = null): array',
|
|
127
|
+
returns: 'array [$result, $err]',
|
|
128
|
+
desc: 'Create a new entity with the given data.',
|
|
129
|
+
},
|
|
130
|
+
update: {
|
|
131
|
+
sig: 'update(array $reqdata, ?array $ctrl = null): array',
|
|
132
|
+
returns: 'array [$result, $err]',
|
|
133
|
+
desc: 'Update an existing entity. The data must include the entity `id`.',
|
|
134
|
+
},
|
|
135
|
+
remove: {
|
|
136
|
+
sig: 'remove(array $reqmatch, ?array $ctrl = null): array',
|
|
137
|
+
returns: 'array [$result, $err]',
|
|
138
|
+
desc: 'Remove the entity matching the given criteria.',
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
const OP_SIGNATURES_GO = {
|
|
142
|
+
load: {
|
|
143
|
+
sig: 'Load(reqmatch, ctrl map[string]any) (any, error)',
|
|
144
|
+
returns: '(any, error)',
|
|
145
|
+
desc: 'Load a single entity matching the given criteria.',
|
|
146
|
+
},
|
|
147
|
+
list: {
|
|
148
|
+
sig: 'List(reqmatch, ctrl map[string]any) (any, error)',
|
|
149
|
+
returns: '(any, error)',
|
|
150
|
+
desc: 'List entities matching the given criteria. Returns an array.',
|
|
151
|
+
},
|
|
152
|
+
create: {
|
|
153
|
+
sig: 'Create(reqdata, ctrl map[string]any) (any, error)',
|
|
154
|
+
returns: '(any, error)',
|
|
155
|
+
desc: 'Create a new entity with the given data.',
|
|
156
|
+
},
|
|
157
|
+
update: {
|
|
158
|
+
sig: 'Update(reqdata, ctrl map[string]any) (any, error)',
|
|
159
|
+
returns: '(any, error)',
|
|
160
|
+
desc: 'Update an existing entity. The data must include the entity `id`.',
|
|
161
|
+
},
|
|
162
|
+
remove: {
|
|
163
|
+
sig: 'Remove(reqmatch, ctrl map[string]any) (any, error)',
|
|
164
|
+
returns: '(any, error)',
|
|
165
|
+
desc: 'Remove the entity matching the given criteria.',
|
|
166
|
+
},
|
|
167
|
+
};
|
|
33
168
|
const ReadmeRef = (0, jostraca_1.cmp)(function ReadmeRef(props) {
|
|
34
169
|
const { target } = props;
|
|
35
170
|
const { model } = props.ctx$;
|
|
36
171
|
const entity = (0, types_1.getModelPath)(model, `main.${types_1.KIT}.entity`);
|
|
37
172
|
const feature = (0, types_1.getModelPath)(model, `main.${types_1.KIT}.feature`);
|
|
38
|
-
const publishedEntities = (0, jostraca_1.each)(entity).filter((e) => e.
|
|
173
|
+
const publishedEntities = (0, jostraca_1.each)(entity).filter((e) => e.active !== false);
|
|
174
|
+
const isGo = target.name === 'go';
|
|
175
|
+
const isLua = target.name === 'lua';
|
|
176
|
+
const isRb = target.name === 'rb';
|
|
177
|
+
const isPhp = target.name === 'php';
|
|
178
|
+
const isPy = target.name === 'py';
|
|
179
|
+
const lang = isGo ? 'go' : isLua ? 'lua' : isRb ? 'rb' : isPhp ? 'php' : isPy ? 'py' : 'ts';
|
|
180
|
+
const OP_SIGNATURES = isGo ? OP_SIGNATURES_GO : isLua ? OP_SIGNATURES_LUA : isRb ? OP_SIGNATURES_RB : isPhp ? OP_SIGNATURES_PHP : isPy ? OP_SIGNATURES_PY : OP_SIGNATURES_TS;
|
|
39
181
|
(0, jostraca_1.File)({ name: 'REFERENCE.md' }, () => {
|
|
40
182
|
(0, jostraca_1.Content)(`# ${model.Name} ${target.title} SDK Reference
|
|
41
183
|
|
|
@@ -46,7 +188,126 @@ Complete API reference for the ${model.Name} ${target.title} SDK.
|
|
|
46
188
|
|
|
47
189
|
### Constructor
|
|
48
190
|
|
|
49
|
-
|
|
191
|
+
`);
|
|
192
|
+
if (isPy) {
|
|
193
|
+
(0, jostraca_1.Content)(`\`\`\`python
|
|
194
|
+
from ${model.name}_sdk import ${model.const.Name}SDK
|
|
195
|
+
|
|
196
|
+
client = ${model.const.Name}SDK(options)
|
|
197
|
+
\`\`\`
|
|
198
|
+
|
|
199
|
+
Create a new SDK client instance.
|
|
200
|
+
|
|
201
|
+
**Parameters:**
|
|
202
|
+
|
|
203
|
+
| Name | Type | Description |
|
|
204
|
+
| --- | --- | --- |
|
|
205
|
+
| \`options\` | \`dict\` | SDK configuration options. |
|
|
206
|
+
| \`options["apikey"]\` | \`str\` | API key for authentication. |
|
|
207
|
+
| \`options["base"]\` | \`str\` | Base URL for API requests. |
|
|
208
|
+
| \`options["prefix"]\` | \`str\` | URL prefix appended after base. |
|
|
209
|
+
| \`options["suffix"]\` | \`str\` | URL suffix appended after path. |
|
|
210
|
+
| \`options["headers"]\` | \`dict\` | Custom headers for all requests. |
|
|
211
|
+
| \`options["feature"]\` | \`dict\` | Feature configuration. |
|
|
212
|
+
| \`options["system"]\` | \`dict\` | System overrides (e.g. custom fetch). |
|
|
213
|
+
|
|
214
|
+
`);
|
|
215
|
+
}
|
|
216
|
+
else if (isPhp) {
|
|
217
|
+
(0, jostraca_1.Content)(`\`\`\`php
|
|
218
|
+
require_once __DIR__ . '/${model.name}_sdk.php';
|
|
219
|
+
|
|
220
|
+
$client = new ${model.const.Name}SDK($options);
|
|
221
|
+
\`\`\`
|
|
222
|
+
|
|
223
|
+
Create a new SDK client instance.
|
|
224
|
+
|
|
225
|
+
**Parameters:**
|
|
226
|
+
|
|
227
|
+
| Name | Type | Description |
|
|
228
|
+
| --- | --- | --- |
|
|
229
|
+
| \`$options\` | \`array\` | SDK configuration options. |
|
|
230
|
+
| \`$options["apikey"]\` | \`string\` | API key for authentication. |
|
|
231
|
+
| \`$options["base"]\` | \`string\` | Base URL for API requests. |
|
|
232
|
+
| \`$options["prefix"]\` | \`string\` | URL prefix appended after base. |
|
|
233
|
+
| \`$options["suffix"]\` | \`string\` | URL suffix appended after path. |
|
|
234
|
+
| \`$options["headers"]\` | \`array\` | Custom headers for all requests. |
|
|
235
|
+
| \`$options["feature"]\` | \`array\` | Feature configuration. |
|
|
236
|
+
| \`$options["system"]\` | \`array\` | System overrides (e.g. custom fetch). |
|
|
237
|
+
|
|
238
|
+
`);
|
|
239
|
+
}
|
|
240
|
+
else if (isRb) {
|
|
241
|
+
(0, jostraca_1.Content)(`\`\`\`ruby
|
|
242
|
+
require_relative '${model.name}_sdk'
|
|
243
|
+
|
|
244
|
+
client = ${model.const.Name}SDK.new(options)
|
|
245
|
+
\`\`\`
|
|
246
|
+
|
|
247
|
+
Create a new SDK client instance.
|
|
248
|
+
|
|
249
|
+
**Parameters:**
|
|
250
|
+
|
|
251
|
+
| Name | Type | Description |
|
|
252
|
+
| --- | --- | --- |
|
|
253
|
+
| \`options\` | \`Hash\` | SDK configuration options. |
|
|
254
|
+
| \`options["apikey"]\` | \`String\` | API key for authentication. |
|
|
255
|
+
| \`options["base"]\` | \`String\` | Base URL for API requests. |
|
|
256
|
+
| \`options["prefix"]\` | \`String\` | URL prefix appended after base. |
|
|
257
|
+
| \`options["suffix"]\` | \`String\` | URL suffix appended after path. |
|
|
258
|
+
| \`options["headers"]\` | \`Hash\` | Custom headers for all requests. |
|
|
259
|
+
| \`options["feature"]\` | \`Hash\` | Feature configuration. |
|
|
260
|
+
| \`options["system"]\` | \`Hash\` | System overrides (e.g. custom fetch). |
|
|
261
|
+
|
|
262
|
+
`);
|
|
263
|
+
}
|
|
264
|
+
else if (isLua) {
|
|
265
|
+
(0, jostraca_1.Content)(`\`\`\`lua
|
|
266
|
+
local sdk = require("${model.name}_sdk")
|
|
267
|
+
local client = sdk.new(options)
|
|
268
|
+
\`\`\`
|
|
269
|
+
|
|
270
|
+
Create a new SDK client instance.
|
|
271
|
+
|
|
272
|
+
**Parameters:**
|
|
273
|
+
|
|
274
|
+
| Name | Type | Description |
|
|
275
|
+
| --- | --- | --- |
|
|
276
|
+
| \`options\` | \`table\` | SDK configuration options. |
|
|
277
|
+
| \`options.apikey\` | \`string\` | API key for authentication. |
|
|
278
|
+
| \`options.base\` | \`string\` | Base URL for API requests. |
|
|
279
|
+
| \`options.prefix\` | \`string\` | URL prefix appended after base. |
|
|
280
|
+
| \`options.suffix\` | \`string\` | URL suffix appended after path. |
|
|
281
|
+
| \`options.headers\` | \`table\` | Custom headers for all requests. |
|
|
282
|
+
| \`options.feature\` | \`table\` | Feature configuration. |
|
|
283
|
+
| \`options.system\` | \`table\` | System overrides (e.g. custom fetch). |
|
|
284
|
+
|
|
285
|
+
`);
|
|
286
|
+
}
|
|
287
|
+
else if (isGo) {
|
|
288
|
+
(0, jostraca_1.Content)(`\`\`\`go
|
|
289
|
+
func New${model.const.Name}SDK(options map[string]any) *${model.const.Name}SDK
|
|
290
|
+
\`\`\`
|
|
291
|
+
|
|
292
|
+
Create a new SDK client instance.
|
|
293
|
+
|
|
294
|
+
**Parameters:**
|
|
295
|
+
|
|
296
|
+
| Name | Type | Description |
|
|
297
|
+
| --- | --- | --- |
|
|
298
|
+
| \`options\` | \`map[string]any\` | SDK configuration options. |
|
|
299
|
+
| \`options["apikey"]\` | \`string\` | API key for authentication. |
|
|
300
|
+
| \`options["base"]\` | \`string\` | Base URL for API requests. |
|
|
301
|
+
| \`options["prefix"]\` | \`string\` | URL prefix appended after base. |
|
|
302
|
+
| \`options["suffix"]\` | \`string\` | URL suffix appended after path. |
|
|
303
|
+
| \`options["headers"]\` | \`map[string]any\` | Custom headers for all requests. |
|
|
304
|
+
| \`options["feature"]\` | \`map[string]any\` | Feature configuration. |
|
|
305
|
+
| \`options["system"]\` | \`map[string]any\` | System overrides (e.g. custom fetch). |
|
|
306
|
+
|
|
307
|
+
`);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
(0, jostraca_1.Content)(`\`\`\`ts
|
|
50
311
|
new ${model.Name}SDK(options?: object)
|
|
51
312
|
\`\`\`
|
|
52
313
|
|
|
@@ -65,10 +326,69 @@ Create a new SDK client instance.
|
|
|
65
326
|
| \`options.feature\` | \`object\` | Feature configuration. |
|
|
66
327
|
| \`options.system\` | \`object\` | System overrides (e.g. custom fetch). |
|
|
67
328
|
|
|
68
|
-
|
|
329
|
+
`);
|
|
330
|
+
}
|
|
331
|
+
(0, jostraca_1.Content)(`
|
|
69
332
|
### Static Methods
|
|
70
333
|
|
|
71
|
-
|
|
334
|
+
`);
|
|
335
|
+
if (isPy) {
|
|
336
|
+
(0, jostraca_1.Content)(`#### \`${model.const.Name}SDK.test(testopts=None, sdkopts=None)\`
|
|
337
|
+
|
|
338
|
+
Create a test client with mock features active. Both arguments may be \`None\`.
|
|
339
|
+
|
|
340
|
+
\`\`\`python
|
|
341
|
+
client = ${model.const.Name}SDK.test()
|
|
342
|
+
\`\`\`
|
|
343
|
+
|
|
344
|
+
`);
|
|
345
|
+
}
|
|
346
|
+
else if (isPhp) {
|
|
347
|
+
(0, jostraca_1.Content)(`#### \`${model.const.Name}SDK::test($testopts = null, $sdkopts = null)\`
|
|
348
|
+
|
|
349
|
+
Create a test client with mock features active. Both arguments may be \`null\`.
|
|
350
|
+
|
|
351
|
+
\`\`\`php
|
|
352
|
+
$client = ${model.const.Name}SDK::test();
|
|
353
|
+
\`\`\`
|
|
354
|
+
|
|
355
|
+
`);
|
|
356
|
+
}
|
|
357
|
+
else if (isRb) {
|
|
358
|
+
(0, jostraca_1.Content)(`#### \`${model.const.Name}SDK.test(testopts = nil, sdkopts = nil)\`
|
|
359
|
+
|
|
360
|
+
Create a test client with mock features active. Both arguments may be \`nil\`.
|
|
361
|
+
|
|
362
|
+
\`\`\`ruby
|
|
363
|
+
client = ${model.const.Name}SDK.test
|
|
364
|
+
\`\`\`
|
|
365
|
+
|
|
366
|
+
`);
|
|
367
|
+
}
|
|
368
|
+
else if (isLua) {
|
|
369
|
+
(0, jostraca_1.Content)(`#### \`sdk.test(testopts, sdkopts)\`
|
|
370
|
+
|
|
371
|
+
Create a test client with mock features active. Both arguments may be \`nil\`.
|
|
372
|
+
|
|
373
|
+
\`\`\`lua
|
|
374
|
+
local client = sdk.test(nil, nil)
|
|
375
|
+
\`\`\`
|
|
376
|
+
|
|
377
|
+
`);
|
|
378
|
+
}
|
|
379
|
+
else if (isGo) {
|
|
380
|
+
(0, jostraca_1.Content)(`#### \`TestSDK(testopts, sdkopts map[string]any) *${model.const.Name}SDK\`
|
|
381
|
+
|
|
382
|
+
Create a test client with mock features active. Both arguments may be \`nil\`.
|
|
383
|
+
|
|
384
|
+
\`\`\`go
|
|
385
|
+
client := sdk.TestSDK(nil, nil)
|
|
386
|
+
\`\`\`
|
|
387
|
+
|
|
388
|
+
`);
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
(0, jostraca_1.Content)(`#### \`${model.Name}SDK.test(testopts?, sdkopts?)\`
|
|
72
392
|
|
|
73
393
|
Create a test client with mock features active.
|
|
74
394
|
|
|
@@ -83,29 +403,242 @@ const client = ${model.Name}SDK.test()
|
|
|
83
403
|
| \`testopts\` | \`object\` | Test feature options. |
|
|
84
404
|
| \`sdkopts\` | \`object\` | Additional SDK options merged with test defaults. |
|
|
85
405
|
|
|
86
|
-
**Returns:** \`${model.Name}SDK\` instance in test mode.
|
|
406
|
+
**Returns:** \`${model.Name}SDK\` instance in test mode.
|
|
407
|
+
|
|
408
|
+
`);
|
|
409
|
+
}
|
|
410
|
+
(0, jostraca_1.Content)(`
|
|
411
|
+
### Instance Methods
|
|
412
|
+
|
|
413
|
+
`);
|
|
414
|
+
// Entity factory methods
|
|
415
|
+
publishedEntities.map((ent) => {
|
|
416
|
+
if (isPy) {
|
|
417
|
+
(0, jostraca_1.Content)(`#### \`${ent.Name}(data=None)\`
|
|
418
|
+
|
|
419
|
+
Create a new \`${ent.Name}Entity\` instance. Pass \`None\` for no initial data.
|
|
420
|
+
|
|
421
|
+
`);
|
|
422
|
+
}
|
|
423
|
+
else if (isPhp) {
|
|
424
|
+
(0, jostraca_1.Content)(`#### \`${ent.Name}($data = null)\`
|
|
425
|
+
|
|
426
|
+
Create a new \`${ent.Name}Entity\` instance. Pass \`null\` for no initial data.
|
|
427
|
+
|
|
428
|
+
`);
|
|
429
|
+
}
|
|
430
|
+
else if (isRb) {
|
|
431
|
+
(0, jostraca_1.Content)(`#### \`${ent.Name}(data = nil)\`
|
|
432
|
+
|
|
433
|
+
Create a new \`${ent.Name}\` entity instance. Pass \`nil\` for no initial data.
|
|
434
|
+
|
|
435
|
+
`);
|
|
436
|
+
}
|
|
437
|
+
else if (isLua) {
|
|
438
|
+
(0, jostraca_1.Content)(`#### \`${ent.Name}(data)\`
|
|
439
|
+
|
|
440
|
+
Create a new \`${ent.Name}\` entity instance. Pass \`nil\` for no initial data.
|
|
441
|
+
|
|
442
|
+
`);
|
|
443
|
+
}
|
|
444
|
+
else if (isGo) {
|
|
445
|
+
(0, jostraca_1.Content)(`#### \`${ent.Name}(data map[string]any) ${model.const.Name}Entity\`
|
|
446
|
+
|
|
447
|
+
Create a new \`${ent.Name}\` entity instance. Pass \`nil\` for no initial data.
|
|
448
|
+
|
|
449
|
+
`);
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
(0, jostraca_1.Content)(`#### \`${ent.Name}(data?: object)\`
|
|
453
|
+
|
|
454
|
+
Create a new \`${ent.Name}\` entity instance.
|
|
455
|
+
|
|
456
|
+
**Parameters:**
|
|
457
|
+
|
|
458
|
+
| Name | Type | Description |
|
|
459
|
+
| --- | --- | --- |
|
|
460
|
+
| \`data\` | \`object\` | Initial entity data. |
|
|
461
|
+
|
|
462
|
+
**Returns:** \`${ent.Name}Entity\` instance.
|
|
463
|
+
|
|
464
|
+
`);
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
if (isPy) {
|
|
468
|
+
(0, jostraca_1.Content)(`#### \`options_map() -> dict\`
|
|
469
|
+
|
|
470
|
+
Return a deep copy of the current SDK options.
|
|
471
|
+
|
|
472
|
+
#### \`get_utility() -> Utility\`
|
|
473
|
+
|
|
474
|
+
Return a copy of the SDK utility object.
|
|
475
|
+
|
|
476
|
+
#### \`direct(fetchargs=None) -> tuple\`
|
|
477
|
+
|
|
478
|
+
Make a direct HTTP request to any API endpoint. Returns \`(result, err)\`.
|
|
479
|
+
|
|
480
|
+
**Parameters:**
|
|
481
|
+
|
|
482
|
+
| Name | Type | Description |
|
|
483
|
+
| --- | --- | --- |
|
|
484
|
+
| \`fetchargs["path"]\` | \`str\` | URL path with optional \`{param}\` placeholders. |
|
|
485
|
+
| \`fetchargs["method"]\` | \`str\` | HTTP method (default: \`"GET"\`). |
|
|
486
|
+
| \`fetchargs["params"]\` | \`dict\` | Path parameter values. |
|
|
487
|
+
| \`fetchargs["query"]\` | \`dict\` | Query string parameters. |
|
|
488
|
+
| \`fetchargs["headers"]\` | \`dict\` | Request headers (merged with defaults). |
|
|
489
|
+
| \`fetchargs["body"]\` | \`any\` | Request body (dicts are JSON-serialized). |
|
|
490
|
+
|
|
491
|
+
**Returns:** \`(result_dict, err)\`
|
|
492
|
+
|
|
493
|
+
#### \`prepare(fetchargs=None) -> tuple\`
|
|
494
|
+
|
|
495
|
+
Prepare a fetch definition without sending. Returns \`(fetchdef, err)\`.
|
|
496
|
+
|
|
497
|
+
`);
|
|
498
|
+
}
|
|
499
|
+
else if (isPhp) {
|
|
500
|
+
(0, jostraca_1.Content)(`#### \`optionsMap(): array\`
|
|
501
|
+
|
|
502
|
+
Return a deep copy of the current SDK options.
|
|
503
|
+
|
|
504
|
+
#### \`getUtility(): ProjectNameUtility\`
|
|
505
|
+
|
|
506
|
+
Return a copy of the SDK utility object.
|
|
507
|
+
|
|
508
|
+
#### \`direct(array $fetchargs = []): array\`
|
|
509
|
+
|
|
510
|
+
Make a direct HTTP request to any API endpoint. Returns \`[$result, $err]\`.
|
|
511
|
+
|
|
512
|
+
**Parameters:**
|
|
513
|
+
|
|
514
|
+
| Name | Type | Description |
|
|
515
|
+
| --- | --- | --- |
|
|
516
|
+
| \`$fetchargs["path"]\` | \`string\` | URL path with optional \`{param}\` placeholders. |
|
|
517
|
+
| \`$fetchargs["method"]\` | \`string\` | HTTP method (default: \`"GET"\`). |
|
|
518
|
+
| \`$fetchargs["params"]\` | \`array\` | Path parameter values for \`{param}\` substitution. |
|
|
519
|
+
| \`$fetchargs["query"]\` | \`array\` | Query string parameters. |
|
|
520
|
+
| \`$fetchargs["headers"]\` | \`array\` | Request headers (merged with defaults). |
|
|
521
|
+
| \`$fetchargs["body"]\` | \`mixed\` | Request body (arrays are JSON-serialized). |
|
|
522
|
+
| \`$fetchargs["ctrl"]\` | \`array\` | Control options. |
|
|
523
|
+
|
|
524
|
+
**Returns:** \`array [$result, $err]\`
|
|
525
|
+
|
|
526
|
+
#### \`prepare(array $fetchargs = []): array\`
|
|
527
|
+
|
|
528
|
+
Prepare a fetch definition without sending the request. Returns \`[$fetchdef, $err]\`.
|
|
529
|
+
|
|
530
|
+
`);
|
|
531
|
+
}
|
|
532
|
+
else if (isRb) {
|
|
533
|
+
(0, jostraca_1.Content)(`#### \`options_map -> Hash\`
|
|
534
|
+
|
|
535
|
+
Return a deep copy of the current SDK options.
|
|
536
|
+
|
|
537
|
+
#### \`get_utility -> Utility\`
|
|
538
|
+
|
|
539
|
+
Return a copy of the SDK utility object.
|
|
540
|
+
|
|
541
|
+
#### \`direct(fetchargs = {}) -> Hash, err\`
|
|
542
|
+
|
|
543
|
+
Make a direct HTTP request to any API endpoint.
|
|
544
|
+
|
|
545
|
+
**Parameters:**
|
|
546
|
+
|
|
547
|
+
| Name | Type | Description |
|
|
548
|
+
| --- | --- | --- |
|
|
549
|
+
| \`fetchargs["path"]\` | \`String\` | URL path with optional \`{param}\` placeholders. |
|
|
550
|
+
| \`fetchargs["method"]\` | \`String\` | HTTP method (default: \`"GET"\`). |
|
|
551
|
+
| \`fetchargs["params"]\` | \`Hash\` | Path parameter values for \`{param}\` substitution. |
|
|
552
|
+
| \`fetchargs["query"]\` | \`Hash\` | Query string parameters. |
|
|
553
|
+
| \`fetchargs["headers"]\` | \`Hash\` | Request headers (merged with defaults). |
|
|
554
|
+
| \`fetchargs["body"]\` | \`any\` | Request body (hashes are JSON-serialized). |
|
|
555
|
+
| \`fetchargs["ctrl"]\` | \`Hash\` | Control options (e.g. \`{ "explain" => true }\`). |
|
|
556
|
+
|
|
557
|
+
**Returns:** \`Hash, err\`
|
|
558
|
+
|
|
559
|
+
#### \`prepare(fetchargs = {}) -> Hash, err\`
|
|
560
|
+
|
|
561
|
+
Prepare a fetch definition without sending the request. Accepts the
|
|
562
|
+
same parameters as \`direct()\`.
|
|
563
|
+
|
|
564
|
+
**Returns:** \`Hash, err\`
|
|
565
|
+
|
|
566
|
+
`);
|
|
567
|
+
}
|
|
568
|
+
else if (isLua) {
|
|
569
|
+
(0, jostraca_1.Content)(`#### \`options_map() -> table\`
|
|
570
|
+
|
|
571
|
+
Return a deep copy of the current SDK options.
|
|
572
|
+
|
|
573
|
+
#### \`get_utility() -> Utility\`
|
|
574
|
+
|
|
575
|
+
Return a copy of the SDK utility object.
|
|
576
|
+
|
|
577
|
+
#### \`direct(fetchargs) -> table, err\`
|
|
578
|
+
|
|
579
|
+
Make a direct HTTP request to any API endpoint.
|
|
580
|
+
|
|
581
|
+
**Parameters:**
|
|
582
|
+
|
|
583
|
+
| Name | Type | Description |
|
|
584
|
+
| --- | --- | --- |
|
|
585
|
+
| \`fetchargs.path\` | \`string\` | URL path with optional \`{param}\` placeholders. |
|
|
586
|
+
| \`fetchargs.method\` | \`string\` | HTTP method (default: \`"GET"\`). |
|
|
587
|
+
| \`fetchargs.params\` | \`table\` | Path parameter values for \`{param}\` substitution. |
|
|
588
|
+
| \`fetchargs.query\` | \`table\` | Query string parameters. |
|
|
589
|
+
| \`fetchargs.headers\` | \`table\` | Request headers (merged with defaults). |
|
|
590
|
+
| \`fetchargs.body\` | \`any\` | Request body (tables are JSON-serialized). |
|
|
591
|
+
| \`fetchargs.ctrl\` | \`table\` | Control options (e.g. \`{ explain = true }\`). |
|
|
592
|
+
|
|
593
|
+
**Returns:** \`table, err\`
|
|
594
|
+
|
|
595
|
+
#### \`prepare(fetchargs) -> table, err\`
|
|
87
596
|
|
|
597
|
+
Prepare a fetch definition without sending the request. Accepts the
|
|
598
|
+
same parameters as \`direct()\`.
|
|
88
599
|
|
|
89
|
-
|
|
600
|
+
**Returns:** \`table, err\`
|
|
90
601
|
|
|
91
602
|
`);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
(0, jostraca_1.Content)(`####
|
|
603
|
+
}
|
|
604
|
+
else if (isGo) {
|
|
605
|
+
(0, jostraca_1.Content)(`#### \`OptionsMap() map[string]any\`
|
|
95
606
|
|
|
96
|
-
|
|
607
|
+
Return a deep copy of the current SDK options.
|
|
608
|
+
|
|
609
|
+
#### \`GetUtility() *Utility\`
|
|
610
|
+
|
|
611
|
+
Return a copy of the SDK utility object.
|
|
612
|
+
|
|
613
|
+
#### \`Direct(fetchargs map[string]any) (map[string]any, error)\`
|
|
614
|
+
|
|
615
|
+
Make a direct HTTP request to any API endpoint.
|
|
97
616
|
|
|
98
617
|
**Parameters:**
|
|
99
618
|
|
|
100
619
|
| Name | Type | Description |
|
|
101
620
|
| --- | --- | --- |
|
|
102
|
-
| \`
|
|
621
|
+
| \`fetchargs["path"]\` | \`string\` | URL path with optional \`{param}\` placeholders. |
|
|
622
|
+
| \`fetchargs["method"]\` | \`string\` | HTTP method (default: \`"GET"\`). |
|
|
623
|
+
| \`fetchargs["params"]\` | \`map[string]any\` | Path parameter values for \`{param}\` substitution. |
|
|
624
|
+
| \`fetchargs["query"]\` | \`map[string]any\` | Query string parameters. |
|
|
625
|
+
| \`fetchargs["headers"]\` | \`map[string]any\` | Request headers (merged with defaults). |
|
|
626
|
+
| \`fetchargs["body"]\` | \`any\` | Request body (maps are JSON-serialized). |
|
|
627
|
+
| \`fetchargs["ctrl"]\` | \`map[string]any\` | Control options (e.g. \`map[string]any{"explain": true}\`). |
|
|
103
628
|
|
|
104
|
-
**Returns:**
|
|
629
|
+
**Returns:** \`(map[string]any, error)\`
|
|
630
|
+
|
|
631
|
+
#### \`Prepare(fetchargs map[string]any) (map[string]any, error)\`
|
|
632
|
+
|
|
633
|
+
Prepare a fetch definition without sending the request. Accepts the
|
|
634
|
+
same parameters as \`Direct()\`.
|
|
635
|
+
|
|
636
|
+
**Returns:** \`(map[string]any, error)\`
|
|
105
637
|
|
|
106
638
|
`);
|
|
107
|
-
}
|
|
108
|
-
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
(0, jostraca_1.Content)(`#### \`options()\`
|
|
109
642
|
|
|
110
643
|
Return a deep copy of the current SDK options.
|
|
111
644
|
|
|
@@ -149,10 +682,11 @@ Alias for \`${model.Name}SDK.test()\`.
|
|
|
149
682
|
**Returns:** \`${model.Name}SDK\` instance in test mode.
|
|
150
683
|
|
|
151
684
|
`);
|
|
685
|
+
}
|
|
152
686
|
// Entity reference sections
|
|
153
687
|
publishedEntities.map((ent) => {
|
|
154
688
|
const opnames = Object.keys(ent.op || {});
|
|
155
|
-
const fields = ent.
|
|
689
|
+
const fields = ent.fields || [];
|
|
156
690
|
(0, jostraca_1.Content)(`
|
|
157
691
|
---
|
|
158
692
|
|
|
@@ -164,11 +698,48 @@ Alias for \`${model.Name}SDK.test()\`.
|
|
|
164
698
|
|
|
165
699
|
`);
|
|
166
700
|
}
|
|
167
|
-
(
|
|
701
|
+
if (isPy) {
|
|
702
|
+
(0, jostraca_1.Content)(`\`\`\`python
|
|
703
|
+
${ent.name} = client.${ent.Name}()
|
|
704
|
+
\`\`\`
|
|
705
|
+
|
|
706
|
+
`);
|
|
707
|
+
}
|
|
708
|
+
else if (isPhp) {
|
|
709
|
+
(0, jostraca_1.Content)(`\`\`\`php
|
|
710
|
+
$${ent.name} = $client->${ent.Name}();
|
|
711
|
+
\`\`\`
|
|
712
|
+
|
|
713
|
+
`);
|
|
714
|
+
}
|
|
715
|
+
else if (isRb) {
|
|
716
|
+
(0, jostraca_1.Content)(`\`\`\`ruby
|
|
717
|
+
${ent.name} = client.${ent.Name}
|
|
718
|
+
\`\`\`
|
|
719
|
+
|
|
720
|
+
`);
|
|
721
|
+
}
|
|
722
|
+
else if (isLua) {
|
|
723
|
+
(0, jostraca_1.Content)(`\`\`\`lua
|
|
724
|
+
local ${ent.name} = client:${ent.Name}(nil)
|
|
725
|
+
\`\`\`
|
|
726
|
+
|
|
727
|
+
`);
|
|
728
|
+
}
|
|
729
|
+
else if (isGo) {
|
|
730
|
+
(0, jostraca_1.Content)(`\`\`\`go
|
|
731
|
+
${ent.name} := client.${ent.Name}(nil)
|
|
732
|
+
\`\`\`
|
|
733
|
+
|
|
734
|
+
`);
|
|
735
|
+
}
|
|
736
|
+
else {
|
|
737
|
+
(0, jostraca_1.Content)(`\`\`\`ts
|
|
168
738
|
const ${ent.name} = client.${ent.Name}()
|
|
169
739
|
\`\`\`
|
|
170
740
|
|
|
171
741
|
`);
|
|
742
|
+
}
|
|
172
743
|
// Field schema
|
|
173
744
|
if (fields.length > 0) {
|
|
174
745
|
(0, jostraca_1.Content)(`### Fields
|
|
@@ -226,37 +797,244 @@ ${info.desc}
|
|
|
226
797
|
|
|
227
798
|
`);
|
|
228
799
|
// Show example
|
|
229
|
-
if (
|
|
230
|
-
(
|
|
231
|
-
|
|
800
|
+
if (isPy) {
|
|
801
|
+
if ('load' === opname || 'remove' === opname) {
|
|
802
|
+
(0, jostraca_1.Content)(`\`\`\`python
|
|
803
|
+
result, err = client.${ent.Name}().${opname}({"id": "${ent.name}_id"})
|
|
804
|
+
\`\`\`
|
|
805
|
+
|
|
806
|
+
`);
|
|
807
|
+
}
|
|
808
|
+
else if ('list' === opname) {
|
|
809
|
+
(0, jostraca_1.Content)(`\`\`\`python
|
|
810
|
+
results, err = client.${ent.Name}().list({})
|
|
811
|
+
\`\`\`
|
|
812
|
+
|
|
813
|
+
`);
|
|
814
|
+
}
|
|
815
|
+
else if ('create' === opname) {
|
|
816
|
+
(0, jostraca_1.Content)(`\`\`\`python
|
|
817
|
+
result, err = client.${ent.Name}().create({
|
|
818
|
+
`);
|
|
819
|
+
(0, jostraca_1.each)(fields, (field) => {
|
|
820
|
+
if ('id' !== field.name && field.req) {
|
|
821
|
+
(0, jostraca_1.Content)(` "${field.name}": # ${field.type || 'value'},
|
|
822
|
+
`);
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
(0, jostraca_1.Content)(`})
|
|
826
|
+
\`\`\`
|
|
827
|
+
|
|
828
|
+
`);
|
|
829
|
+
}
|
|
830
|
+
else if ('update' === opname) {
|
|
831
|
+
(0, jostraca_1.Content)(`\`\`\`python
|
|
832
|
+
result, err = client.${ent.Name}().update({
|
|
833
|
+
"id": "${ent.name}_id",
|
|
834
|
+
# Fields to update
|
|
835
|
+
})
|
|
232
836
|
\`\`\`
|
|
233
837
|
|
|
234
838
|
`);
|
|
839
|
+
}
|
|
235
840
|
}
|
|
236
|
-
else if (
|
|
237
|
-
(
|
|
238
|
-
|
|
841
|
+
else if (isPhp) {
|
|
842
|
+
if ('load' === opname || 'remove' === opname) {
|
|
843
|
+
(0, jostraca_1.Content)(`\`\`\`php
|
|
844
|
+
[$result, $err] = $client->${ent.Name}()->${opname}(["id" => "${ent.name}_id"]);
|
|
845
|
+
\`\`\`
|
|
846
|
+
|
|
847
|
+
`);
|
|
848
|
+
}
|
|
849
|
+
else if ('list' === opname) {
|
|
850
|
+
(0, jostraca_1.Content)(`\`\`\`php
|
|
851
|
+
[$results, $err] = $client->${ent.Name}()->list([]);
|
|
852
|
+
\`\`\`
|
|
853
|
+
|
|
854
|
+
`);
|
|
855
|
+
}
|
|
856
|
+
else if ('create' === opname) {
|
|
857
|
+
(0, jostraca_1.Content)(`\`\`\`php
|
|
858
|
+
[$result, $err] = $client->${ent.Name}()->create([
|
|
859
|
+
`);
|
|
860
|
+
(0, jostraca_1.each)(fields, (field) => {
|
|
861
|
+
if ('id' !== field.name && field.req) {
|
|
862
|
+
(0, jostraca_1.Content)(` "${field.name}" => /* ${field.type || 'value'} */,
|
|
863
|
+
`);
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
(0, jostraca_1.Content)(`]);
|
|
867
|
+
\`\`\`
|
|
868
|
+
|
|
869
|
+
`);
|
|
870
|
+
}
|
|
871
|
+
else if ('update' === opname) {
|
|
872
|
+
(0, jostraca_1.Content)(`\`\`\`php
|
|
873
|
+
[$result, $err] = $client->${ent.Name}()->update([
|
|
874
|
+
"id" => "${ent.name}_id",
|
|
875
|
+
// Fields to update
|
|
876
|
+
]);
|
|
239
877
|
\`\`\`
|
|
240
878
|
|
|
241
879
|
`);
|
|
880
|
+
}
|
|
242
881
|
}
|
|
243
|
-
else if (
|
|
244
|
-
(
|
|
245
|
-
|
|
882
|
+
else if (isRb) {
|
|
883
|
+
if ('load' === opname || 'remove' === opname) {
|
|
884
|
+
(0, jostraca_1.Content)(`\`\`\`ruby
|
|
885
|
+
result, err = client.${ent.Name}.${opname}({ "id" => "${ent.name}_id" })
|
|
886
|
+
\`\`\`
|
|
887
|
+
|
|
888
|
+
`);
|
|
889
|
+
}
|
|
890
|
+
else if ('list' === opname) {
|
|
891
|
+
(0, jostraca_1.Content)(`\`\`\`ruby
|
|
892
|
+
results, err = client.${ent.Name}.list(nil)
|
|
893
|
+
\`\`\`
|
|
894
|
+
|
|
246
895
|
`);
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
896
|
+
}
|
|
897
|
+
else if ('create' === opname) {
|
|
898
|
+
(0, jostraca_1.Content)(`\`\`\`ruby
|
|
899
|
+
result, err = client.${ent.Name}.create({
|
|
250
900
|
`);
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
901
|
+
(0, jostraca_1.each)(fields, (field) => {
|
|
902
|
+
if ('id' !== field.name && field.req) {
|
|
903
|
+
(0, jostraca_1.Content)(` "${field.name}" => # ${field.type || 'value'},
|
|
904
|
+
`);
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
(0, jostraca_1.Content)(`})
|
|
908
|
+
\`\`\`
|
|
909
|
+
|
|
910
|
+
`);
|
|
911
|
+
}
|
|
912
|
+
else if ('update' === opname) {
|
|
913
|
+
(0, jostraca_1.Content)(`\`\`\`ruby
|
|
914
|
+
result, err = client.${ent.Name}.update({
|
|
915
|
+
"id" => "${ent.name}_id",
|
|
916
|
+
# Fields to update
|
|
917
|
+
})
|
|
918
|
+
\`\`\`
|
|
919
|
+
|
|
920
|
+
`);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
else if (isLua) {
|
|
924
|
+
if ('load' === opname || 'remove' === opname) {
|
|
925
|
+
(0, jostraca_1.Content)(`\`\`\`lua
|
|
926
|
+
local result, err = client:${ent.Name}(nil):${opname}({ id = "${ent.name}_id" }, nil)
|
|
927
|
+
\`\`\`
|
|
928
|
+
|
|
929
|
+
`);
|
|
930
|
+
}
|
|
931
|
+
else if ('list' === opname) {
|
|
932
|
+
(0, jostraca_1.Content)(`\`\`\`lua
|
|
933
|
+
local results, err = client:${ent.Name}(nil):list(nil, nil)
|
|
934
|
+
\`\`\`
|
|
935
|
+
|
|
936
|
+
`);
|
|
937
|
+
}
|
|
938
|
+
else if ('create' === opname) {
|
|
939
|
+
(0, jostraca_1.Content)(`\`\`\`lua
|
|
940
|
+
local result, err = client:${ent.Name}(nil):create({
|
|
941
|
+
`);
|
|
942
|
+
(0, jostraca_1.each)(fields, (field) => {
|
|
943
|
+
if ('id' !== field.name && field.req) {
|
|
944
|
+
(0, jostraca_1.Content)(` ${field.name} = --[[ ${field.type || 'value'} ]],
|
|
945
|
+
`);
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
(0, jostraca_1.Content)(`}, nil)
|
|
254
949
|
\`\`\`
|
|
255
950
|
|
|
256
951
|
`);
|
|
952
|
+
}
|
|
953
|
+
else if ('update' === opname) {
|
|
954
|
+
(0, jostraca_1.Content)(`\`\`\`lua
|
|
955
|
+
local result, err = client:${ent.Name}(nil):update({
|
|
956
|
+
id = "${ent.name}_id",
|
|
957
|
+
-- Fields to update
|
|
958
|
+
}, nil)
|
|
959
|
+
\`\`\`
|
|
960
|
+
|
|
961
|
+
`);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
else if (isGo) {
|
|
965
|
+
if ('load' === opname || 'remove' === opname) {
|
|
966
|
+
const goOpName = opname.charAt(0).toUpperCase() + opname.slice(1);
|
|
967
|
+
(0, jostraca_1.Content)(`\`\`\`go
|
|
968
|
+
result, err := client.${ent.Name}(nil).${goOpName}(map[string]any{"id": "${ent.name}_id"}, nil)
|
|
969
|
+
\`\`\`
|
|
970
|
+
|
|
971
|
+
`);
|
|
972
|
+
}
|
|
973
|
+
else if ('list' === opname) {
|
|
974
|
+
(0, jostraca_1.Content)(`\`\`\`go
|
|
975
|
+
results, err := client.${ent.Name}(nil).List(nil, nil)
|
|
976
|
+
\`\`\`
|
|
977
|
+
|
|
978
|
+
`);
|
|
979
|
+
}
|
|
980
|
+
else if ('create' === opname) {
|
|
981
|
+
(0, jostraca_1.Content)(`\`\`\`go
|
|
982
|
+
result, err := client.${ent.Name}(nil).Create(map[string]any{
|
|
983
|
+
`);
|
|
984
|
+
(0, jostraca_1.each)(fields, (field) => {
|
|
985
|
+
if ('id' !== field.name && field.req) {
|
|
986
|
+
(0, jostraca_1.Content)(` "${field.name}": /* ${field.type || 'value'} */,
|
|
987
|
+
`);
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
(0, jostraca_1.Content)(`}, nil)
|
|
991
|
+
\`\`\`
|
|
992
|
+
|
|
993
|
+
`);
|
|
994
|
+
}
|
|
995
|
+
else if ('update' === opname) {
|
|
996
|
+
(0, jostraca_1.Content)(`\`\`\`go
|
|
997
|
+
result, err := client.${ent.Name}(nil).Update(map[string]any{
|
|
998
|
+
"id": "${ent.name}_id",
|
|
999
|
+
// Fields to update
|
|
1000
|
+
}, nil)
|
|
1001
|
+
\`\`\`
|
|
1002
|
+
|
|
1003
|
+
`);
|
|
1004
|
+
}
|
|
257
1005
|
}
|
|
258
|
-
else
|
|
259
|
-
(
|
|
1006
|
+
else {
|
|
1007
|
+
if ('load' === opname || 'remove' === opname) {
|
|
1008
|
+
(0, jostraca_1.Content)(`\`\`\`ts
|
|
1009
|
+
const result = await client.${ent.Name}().${opname}({ id: '${ent.name}_id' })
|
|
1010
|
+
\`\`\`
|
|
1011
|
+
|
|
1012
|
+
`);
|
|
1013
|
+
}
|
|
1014
|
+
else if ('list' === opname) {
|
|
1015
|
+
(0, jostraca_1.Content)(`\`\`\`ts
|
|
1016
|
+
const results = await client.${ent.Name}().${opname}()
|
|
1017
|
+
\`\`\`
|
|
1018
|
+
|
|
1019
|
+
`);
|
|
1020
|
+
}
|
|
1021
|
+
else if ('create' === opname) {
|
|
1022
|
+
(0, jostraca_1.Content)(`\`\`\`ts
|
|
1023
|
+
const result = await client.${ent.Name}().create({
|
|
1024
|
+
`);
|
|
1025
|
+
(0, jostraca_1.each)(fields, (field) => {
|
|
1026
|
+
if ('id' !== field.name && field.req) {
|
|
1027
|
+
(0, jostraca_1.Content)(` ${field.name}: /* ${field.type || 'value'} */,
|
|
1028
|
+
`);
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
(0, jostraca_1.Content)(`})
|
|
1032
|
+
\`\`\`
|
|
1033
|
+
|
|
1034
|
+
`);
|
|
1035
|
+
}
|
|
1036
|
+
else if ('update' === opname) {
|
|
1037
|
+
(0, jostraca_1.Content)(`\`\`\`ts
|
|
260
1038
|
const result = await client.${ent.Name}().update({
|
|
261
1039
|
id: '${ent.name}_id',
|
|
262
1040
|
// Fields to update
|
|
@@ -264,11 +1042,156 @@ const result = await client.${ent.Name}().update({
|
|
|
264
1042
|
\`\`\`
|
|
265
1043
|
|
|
266
1044
|
`);
|
|
1045
|
+
}
|
|
267
1046
|
}
|
|
268
1047
|
});
|
|
269
1048
|
}
|
|
270
1049
|
// Common methods
|
|
271
|
-
(
|
|
1050
|
+
if (isPy) {
|
|
1051
|
+
(0, jostraca_1.Content)(`### Common Methods
|
|
1052
|
+
|
|
1053
|
+
#### \`data_get() -> dict\`
|
|
1054
|
+
|
|
1055
|
+
Get the entity data.
|
|
1056
|
+
|
|
1057
|
+
#### \`data_set(data)\`
|
|
1058
|
+
|
|
1059
|
+
Set the entity data.
|
|
1060
|
+
|
|
1061
|
+
#### \`match_get() -> dict\`
|
|
1062
|
+
|
|
1063
|
+
Get the entity match criteria.
|
|
1064
|
+
|
|
1065
|
+
#### \`match_set(match)\`
|
|
1066
|
+
|
|
1067
|
+
Set the entity match criteria.
|
|
1068
|
+
|
|
1069
|
+
#### \`make() -> Entity\`
|
|
1070
|
+
|
|
1071
|
+
Create a new \`${ent.Name}Entity\` instance with the same options.
|
|
1072
|
+
|
|
1073
|
+
#### \`get_name() -> str\`
|
|
1074
|
+
|
|
1075
|
+
Return the entity name.
|
|
1076
|
+
|
|
1077
|
+
`);
|
|
1078
|
+
}
|
|
1079
|
+
else if (isPhp) {
|
|
1080
|
+
(0, jostraca_1.Content)(`### Common Methods
|
|
1081
|
+
|
|
1082
|
+
#### \`dataGet(): array\`
|
|
1083
|
+
|
|
1084
|
+
Get the entity data. Returns a copy of the current data.
|
|
1085
|
+
|
|
1086
|
+
#### \`dataSet($data): void\`
|
|
1087
|
+
|
|
1088
|
+
Set the entity data.
|
|
1089
|
+
|
|
1090
|
+
#### \`matchGet(): array\`
|
|
1091
|
+
|
|
1092
|
+
Get the entity match criteria.
|
|
1093
|
+
|
|
1094
|
+
#### \`matchSet($match): void\`
|
|
1095
|
+
|
|
1096
|
+
Set the entity match criteria.
|
|
1097
|
+
|
|
1098
|
+
#### \`make(): ${ent.Name}Entity\`
|
|
1099
|
+
|
|
1100
|
+
Create a new \`${ent.Name}Entity\` instance with the same client and
|
|
1101
|
+
options.
|
|
1102
|
+
|
|
1103
|
+
#### \`getName(): string\`
|
|
1104
|
+
|
|
1105
|
+
Return the entity name.
|
|
1106
|
+
|
|
1107
|
+
`);
|
|
1108
|
+
}
|
|
1109
|
+
else if (isRb) {
|
|
1110
|
+
(0, jostraca_1.Content)(`### Common Methods
|
|
1111
|
+
|
|
1112
|
+
#### \`data_get -> Hash\`
|
|
1113
|
+
|
|
1114
|
+
Get the entity data. Returns a copy of the current data.
|
|
1115
|
+
|
|
1116
|
+
#### \`data_set(data)\`
|
|
1117
|
+
|
|
1118
|
+
Set the entity data.
|
|
1119
|
+
|
|
1120
|
+
#### \`match_get -> Hash\`
|
|
1121
|
+
|
|
1122
|
+
Get the entity match criteria.
|
|
1123
|
+
|
|
1124
|
+
#### \`match_set(match)\`
|
|
1125
|
+
|
|
1126
|
+
Set the entity match criteria.
|
|
1127
|
+
|
|
1128
|
+
#### \`make -> Entity\`
|
|
1129
|
+
|
|
1130
|
+
Create a new \`${ent.Name}Entity\` instance with the same client and
|
|
1131
|
+
options.
|
|
1132
|
+
|
|
1133
|
+
#### \`get_name -> String\`
|
|
1134
|
+
|
|
1135
|
+
Return the entity name.
|
|
1136
|
+
|
|
1137
|
+
`);
|
|
1138
|
+
}
|
|
1139
|
+
else if (isLua) {
|
|
1140
|
+
(0, jostraca_1.Content)(`### Common Methods
|
|
1141
|
+
|
|
1142
|
+
#### \`data_get() -> table\`
|
|
1143
|
+
|
|
1144
|
+
Get the entity data. Returns a copy of the current data.
|
|
1145
|
+
|
|
1146
|
+
#### \`data_set(data)\`
|
|
1147
|
+
|
|
1148
|
+
Set the entity data.
|
|
1149
|
+
|
|
1150
|
+
#### \`match_get() -> table\`
|
|
1151
|
+
|
|
1152
|
+
Get the entity match criteria.
|
|
1153
|
+
|
|
1154
|
+
#### \`match_set(match)\`
|
|
1155
|
+
|
|
1156
|
+
Set the entity match criteria.
|
|
1157
|
+
|
|
1158
|
+
#### \`make() -> Entity\`
|
|
1159
|
+
|
|
1160
|
+
Create a new \`${ent.Name}Entity\` instance with the same client and
|
|
1161
|
+
options.
|
|
1162
|
+
|
|
1163
|
+
#### \`get_name() -> string\`
|
|
1164
|
+
|
|
1165
|
+
Return the entity name.
|
|
1166
|
+
|
|
1167
|
+
`);
|
|
1168
|
+
}
|
|
1169
|
+
else if (isGo) {
|
|
1170
|
+
(0, jostraca_1.Content)(`### Common Methods
|
|
1171
|
+
|
|
1172
|
+
#### \`Data(args ...any) any\`
|
|
1173
|
+
|
|
1174
|
+
Get or set the entity data. When called with data, sets the entity's
|
|
1175
|
+
internal data and returns the current data. When called without
|
|
1176
|
+
arguments, returns a copy of the current data.
|
|
1177
|
+
|
|
1178
|
+
#### \`Match(args ...any) any\`
|
|
1179
|
+
|
|
1180
|
+
Get or set the entity match criteria. Works the same as \`Data()\`.
|
|
1181
|
+
|
|
1182
|
+
#### \`Make() Entity\`
|
|
1183
|
+
|
|
1184
|
+
Create a new \`${ent.Name}Entity\` instance with the same client and
|
|
1185
|
+
options.
|
|
1186
|
+
|
|
1187
|
+
#### \`GetName() string\`
|
|
1188
|
+
|
|
1189
|
+
Return the entity name.
|
|
1190
|
+
|
|
1191
|
+
`);
|
|
1192
|
+
}
|
|
1193
|
+
else {
|
|
1194
|
+
(0, jostraca_1.Content)(`### Common Methods
|
|
272
1195
|
|
|
273
1196
|
#### \`data(data?: object)\`
|
|
274
1197
|
|
|
@@ -294,6 +1217,7 @@ Return the parent \`${model.Name}SDK\` instance.
|
|
|
294
1217
|
Return a copy of the entity options.
|
|
295
1218
|
|
|
296
1219
|
`);
|
|
1220
|
+
}
|
|
297
1221
|
});
|
|
298
1222
|
// Features section
|
|
299
1223
|
const activeFeatures = (0, jostraca_1.each)(feature).filter((f) => f.active);
|
|
@@ -314,19 +1238,97 @@ Return a copy of the entity options.
|
|
|
314
1238
|
|
|
315
1239
|
Features are activated via the \`feature\` option:
|
|
316
1240
|
|
|
317
|
-
|
|
1241
|
+
`);
|
|
1242
|
+
if (isPy) {
|
|
1243
|
+
(0, jostraca_1.Content)(`\`\`\`python
|
|
1244
|
+
client = ${model.const.Name}SDK({
|
|
1245
|
+
"feature": {
|
|
1246
|
+
`);
|
|
1247
|
+
activeFeatures.map((f) => {
|
|
1248
|
+
(0, jostraca_1.Content)(` "${f.name}": {"active": True},
|
|
1249
|
+
`);
|
|
1250
|
+
});
|
|
1251
|
+
(0, jostraca_1.Content)(` },
|
|
1252
|
+
})
|
|
1253
|
+
\`\`\`
|
|
1254
|
+
|
|
1255
|
+
`);
|
|
1256
|
+
}
|
|
1257
|
+
else if (isPhp) {
|
|
1258
|
+
(0, jostraca_1.Content)(`\`\`\`php
|
|
1259
|
+
$client = new ${model.const.Name}SDK([
|
|
1260
|
+
"feature" => [
|
|
1261
|
+
`);
|
|
1262
|
+
activeFeatures.map((f) => {
|
|
1263
|
+
(0, jostraca_1.Content)(` "${f.name}" => ["active" => true],
|
|
1264
|
+
`);
|
|
1265
|
+
});
|
|
1266
|
+
(0, jostraca_1.Content)(` ],
|
|
1267
|
+
]);
|
|
1268
|
+
\`\`\`
|
|
1269
|
+
|
|
1270
|
+
`);
|
|
1271
|
+
}
|
|
1272
|
+
else if (isRb) {
|
|
1273
|
+
(0, jostraca_1.Content)(`\`\`\`ruby
|
|
1274
|
+
client = ${model.const.Name}SDK.new({
|
|
1275
|
+
"feature" => {
|
|
1276
|
+
`);
|
|
1277
|
+
activeFeatures.map((f) => {
|
|
1278
|
+
(0, jostraca_1.Content)(` "${f.name}" => { "active" => true },
|
|
1279
|
+
`);
|
|
1280
|
+
});
|
|
1281
|
+
(0, jostraca_1.Content)(` },
|
|
1282
|
+
})
|
|
1283
|
+
\`\`\`
|
|
1284
|
+
|
|
1285
|
+
`);
|
|
1286
|
+
}
|
|
1287
|
+
else if (isLua) {
|
|
1288
|
+
(0, jostraca_1.Content)(`\`\`\`lua
|
|
1289
|
+
local client = sdk.new({
|
|
1290
|
+
feature = {
|
|
1291
|
+
`);
|
|
1292
|
+
activeFeatures.map((f) => {
|
|
1293
|
+
(0, jostraca_1.Content)(` ${f.name} = { active = true },
|
|
1294
|
+
`);
|
|
1295
|
+
});
|
|
1296
|
+
(0, jostraca_1.Content)(` },
|
|
1297
|
+
})
|
|
1298
|
+
\`\`\`
|
|
1299
|
+
|
|
1300
|
+
`);
|
|
1301
|
+
}
|
|
1302
|
+
else if (isGo) {
|
|
1303
|
+
(0, jostraca_1.Content)(`\`\`\`go
|
|
1304
|
+
client := sdk.New${model.const.Name}SDK(map[string]any{
|
|
1305
|
+
"feature": map[string]any{
|
|
1306
|
+
`);
|
|
1307
|
+
activeFeatures.map((f) => {
|
|
1308
|
+
(0, jostraca_1.Content)(` "${f.name}": map[string]any{"active": true},
|
|
1309
|
+
`);
|
|
1310
|
+
});
|
|
1311
|
+
(0, jostraca_1.Content)(` },
|
|
1312
|
+
})
|
|
1313
|
+
\`\`\`
|
|
1314
|
+
|
|
1315
|
+
`);
|
|
1316
|
+
}
|
|
1317
|
+
else {
|
|
1318
|
+
(0, jostraca_1.Content)(`\`\`\`ts
|
|
318
1319
|
const client = new ${model.Name}SDK({
|
|
319
1320
|
feature: {
|
|
320
1321
|
`);
|
|
321
|
-
|
|
322
|
-
|
|
1322
|
+
activeFeatures.map((f) => {
|
|
1323
|
+
(0, jostraca_1.Content)(` ${f.name}: { active: true },
|
|
323
1324
|
`);
|
|
324
|
-
|
|
325
|
-
|
|
1325
|
+
});
|
|
1326
|
+
(0, jostraca_1.Content)(` }
|
|
326
1327
|
})
|
|
327
1328
|
\`\`\`
|
|
328
1329
|
|
|
329
1330
|
`);
|
|
1331
|
+
}
|
|
330
1332
|
}
|
|
331
1333
|
});
|
|
332
1334
|
});
|