@azure-tools/typespec-ts 0.55.0-dev.1 → 0.55.0-dev.3
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/README.md +96 -24
- package/dist/src/context-manager.d.ts +75 -0
- package/dist/src/context-manager.d.ts.map +1 -0
- package/dist/src/context-manager.js +59 -0
- package/dist/src/context-manager.js.map +1 -0
- package/dist/src/framework/hooks/binder.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.js +6 -7
- package/dist/src/framework/hooks/binder.js.map +1 -1
- package/dist/src/framework/hooks/sdk-types.d.ts +26 -0
- package/dist/src/framework/hooks/sdk-types.d.ts.map +1 -0
- package/dist/src/framework/hooks/sdk-types.js +157 -0
- package/dist/src/framework/hooks/sdk-types.js.map +1 -0
- package/dist/src/framework/hooks/use-dependencies.d.ts +4 -0
- package/dist/src/framework/hooks/use-dependencies.d.ts.map +1 -0
- package/dist/src/framework/hooks/use-dependencies.js +13 -0
- package/dist/src/framework/hooks/use-dependencies.js.map +1 -0
- package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
- package/dist/src/framework/load-static-helpers.js +7 -8
- package/dist/src/framework/load-static-helpers.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +40 -40
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.js +30 -31
- package/dist/src/lib.js.map +1 -1
- package/dist/src/meta-tree.d.ts +7 -0
- package/dist/src/meta-tree.d.ts.map +1 -0
- package/dist/src/meta-tree.js +2 -0
- package/dist/src/meta-tree.js.map +1 -0
- package/dist/src/modular/build-classical-client.d.ts +6 -0
- package/dist/src/modular/build-classical-client.d.ts.map +1 -0
- package/dist/src/modular/build-classical-client.js +345 -0
- package/dist/src/modular/build-classical-client.js.map +1 -0
- package/dist/src/modular/build-classical-operation-groups.d.ts +6 -0
- package/dist/src/modular/build-classical-operation-groups.d.ts.map +1 -0
- package/dist/src/modular/build-classical-operation-groups.js +48 -0
- package/dist/src/modular/build-classical-operation-groups.js.map +1 -0
- package/dist/src/modular/build-client-context.d.ts +13 -0
- package/dist/src/modular/build-client-context.d.ts.map +1 -0
- package/dist/src/modular/build-client-context.js +246 -0
- package/dist/src/modular/build-client-context.js.map +1 -0
- package/dist/src/modular/build-modular-options.d.ts +6 -0
- package/dist/src/modular/build-modular-options.d.ts.map +1 -0
- package/dist/src/modular/build-modular-options.js +14 -0
- package/dist/src/modular/build-modular-options.js.map +1 -0
- package/dist/src/modular/build-operations.d.ts +21 -0
- package/dist/src/modular/build-operations.d.ts.map +1 -0
- package/dist/src/modular/build-operations.js +172 -0
- package/dist/src/modular/build-operations.js.map +1 -0
- package/dist/src/modular/build-project-files.d.ts +4 -0
- package/dist/src/modular/build-project-files.d.ts.map +1 -0
- package/dist/src/modular/build-project-files.js +91 -0
- package/dist/src/modular/build-project-files.js.map +1 -0
- package/dist/src/modular/build-restore-poller.d.ts +5 -0
- package/dist/src/modular/build-restore-poller.d.ts.map +1 -0
- package/dist/src/modular/build-restore-poller.js +216 -0
- package/dist/src/modular/build-restore-poller.js.map +1 -0
- package/dist/src/modular/build-root-index.d.ts +13 -0
- package/dist/src/modular/build-root-index.d.ts.map +1 -0
- package/dist/src/modular/build-root-index.js +278 -0
- package/dist/src/modular/build-root-index.js.map +1 -0
- package/dist/src/modular/build-subpath-index.d.ts +16 -0
- package/dist/src/modular/build-subpath-index.d.ts.map +1 -0
- package/dist/src/modular/build-subpath-index.js +119 -0
- package/dist/src/modular/build-subpath-index.js.map +1 -0
- package/dist/src/modular/emit-logger-file.d.ts +3 -0
- package/dist/src/modular/emit-logger-file.d.ts.map +1 -0
- package/dist/src/modular/emit-logger-file.js +18 -0
- package/dist/src/modular/emit-logger-file.js.map +1 -0
- package/dist/src/modular/emit-models-options.d.ts +5 -0
- package/dist/src/modular/emit-models-options.d.ts.map +1 -0
- package/dist/src/modular/emit-models-options.js +35 -0
- package/dist/src/modular/emit-models-options.js.map +1 -0
- package/dist/src/modular/emit-models.d.ts +23 -0
- package/dist/src/modular/emit-models.d.ts.map +1 -0
- package/dist/src/modular/emit-models.js +849 -0
- package/dist/src/modular/emit-models.js.map +1 -0
- package/dist/src/modular/emit-samples.d.ts +7 -0
- package/dist/src/modular/emit-samples.d.ts.map +1 -0
- package/dist/src/modular/emit-samples.js +499 -0
- package/dist/src/modular/emit-samples.js.map +1 -0
- package/dist/src/modular/emit-tests.d.ts +7 -0
- package/dist/src/modular/emit-tests.d.ts.map +1 -0
- package/dist/src/modular/emit-tests.js +155 -0
- package/dist/src/modular/emit-tests.js.map +1 -0
- package/dist/src/modular/helpers/classical-operation-helpers.d.ts +7 -0
- package/dist/src/modular/helpers/classical-operation-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/classical-operation-helpers.js +258 -0
- package/dist/src/modular/helpers/classical-operation-helpers.js.map +1 -0
- package/dist/src/modular/helpers/client-helpers.d.ts +34 -0
- package/dist/src/modular/helpers/client-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/client-helpers.js +259 -0
- package/dist/src/modular/helpers/client-helpers.js.map +1 -0
- package/dist/src/modular/helpers/client-option-helpers.d.ts +43 -0
- package/dist/src/modular/helpers/client-option-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/client-option-helpers.js +103 -0
- package/dist/src/modular/helpers/client-option-helpers.js.map +1 -0
- package/dist/src/modular/helpers/docs-helpers.d.ts +3 -0
- package/dist/src/modular/helpers/docs-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/docs-helpers.js +10 -0
- package/dist/src/modular/helpers/docs-helpers.js.map +1 -0
- package/dist/src/modular/helpers/example-value-helpers.d.ts +83 -0
- package/dist/src/modular/helpers/example-value-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/example-value-helpers.js +639 -0
- package/dist/src/modular/helpers/example-value-helpers.js.map +1 -0
- package/dist/src/modular/helpers/naming-helpers.d.ts +22 -0
- package/dist/src/modular/helpers/naming-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/naming-helpers.js +59 -0
- package/dist/src/modular/helpers/naming-helpers.js.map +1 -0
- package/dist/src/modular/helpers/operation-helpers.d.ts +105 -0
- package/dist/src/modular/helpers/operation-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/operation-helpers.js +2328 -0
- package/dist/src/modular/helpers/operation-helpers.js.map +1 -0
- package/dist/src/modular/helpers/type-helpers.d.ts +22 -0
- package/dist/src/modular/helpers/type-helpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/type-helpers.js +94 -0
- package/dist/src/modular/helpers/type-helpers.js.map +1 -0
- package/dist/src/modular/serialization/build-deserializer-function.d.ts +7 -0
- package/dist/src/modular/serialization/build-deserializer-function.d.ts.map +1 -0
- package/dist/src/modular/serialization/build-deserializer-function.js +401 -0
- package/dist/src/modular/serialization/build-deserializer-function.js.map +1 -0
- package/dist/src/modular/serialization/build-serializer-function.d.ts +7 -0
- package/dist/src/modular/serialization/build-serializer-function.d.ts.map +1 -0
- package/dist/src/modular/serialization/build-serializer-function.js +442 -0
- package/dist/src/modular/serialization/build-serializer-function.js.map +1 -0
- package/dist/src/modular/serialization/build-xml-serializer-function.d.ts +44 -0
- package/dist/src/modular/serialization/build-xml-serializer-function.d.ts.map +1 -0
- package/dist/src/modular/serialization/build-xml-serializer-function.js +729 -0
- package/dist/src/modular/serialization/build-xml-serializer-function.js.map +1 -0
- package/dist/src/modular/serialization/serialize-utils.d.ts +37 -0
- package/dist/src/modular/serialization/serialize-utils.d.ts.map +1 -0
- package/dist/src/modular/serialization/serialize-utils.js +145 -0
- package/dist/src/modular/serialization/serialize-utils.js.map +1 -0
- package/dist/src/modular/type-expressions/get-credential-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-credential-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.js.map +1 -1
- package/dist/src/rlc-common/build-client-definitions.d.ts +6 -0
- package/dist/src/rlc-common/build-client-definitions.d.ts.map +1 -0
- package/dist/src/rlc-common/build-client-definitions.js +157 -0
- package/dist/src/rlc-common/build-client-definitions.js.map +1 -0
- package/dist/src/rlc-common/build-client.d.ts +9 -0
- package/dist/src/rlc-common/build-client.d.ts.map +1 -0
- package/dist/src/rlc-common/build-client.js +391 -0
- package/dist/src/rlc-common/build-client.js.map +1 -0
- package/dist/src/rlc-common/build-index-file.d.ts +6 -0
- package/dist/src/rlc-common/build-index-file.d.ts.map +1 -0
- package/dist/src/rlc-common/build-index-file.js +241 -0
- package/dist/src/rlc-common/build-index-file.js.map +1 -0
- package/dist/src/rlc-common/build-is-unexpected-helper.d.ts +6 -0
- package/dist/src/rlc-common/build-is-unexpected-helper.d.ts.map +1 -0
- package/dist/src/rlc-common/build-is-unexpected-helper.js +223 -0
- package/dist/src/rlc-common/build-is-unexpected-helper.js.map +1 -0
- package/dist/src/rlc-common/build-logger.d.ts +6 -0
- package/dist/src/rlc-common/build-logger.d.ts.map +1 -0
- package/dist/src/rlc-common/build-logger.js +31 -0
- package/dist/src/rlc-common/build-logger.js.map +1 -0
- package/dist/src/rlc-common/build-method-shortcuts.d.ts +5 -0
- package/dist/src/rlc-common/build-method-shortcuts.d.ts.map +1 -0
- package/dist/src/rlc-common/build-method-shortcuts.js +54 -0
- package/dist/src/rlc-common/build-method-shortcuts.js.map +1 -0
- package/dist/src/rlc-common/build-object-types.d.ts +29 -0
- package/dist/src/rlc-common/build-object-types.d.ts.map +1 -0
- package/dist/src/rlc-common/build-object-types.js +412 -0
- package/dist/src/rlc-common/build-object-types.js.map +1 -0
- package/dist/src/rlc-common/build-paginate-helper.d.ts +6 -0
- package/dist/src/rlc-common/build-paginate-helper.d.ts.map +1 -0
- package/dist/src/rlc-common/build-paginate-helper.js +27 -0
- package/dist/src/rlc-common/build-paginate-helper.js.map +1 -0
- package/dist/src/rlc-common/build-parameter-types.d.ts +14 -0
- package/dist/src/rlc-common/build-parameter-types.d.ts.map +1 -0
- package/dist/src/rlc-common/build-parameter-types.js +391 -0
- package/dist/src/rlc-common/build-parameter-types.js.map +1 -0
- package/dist/src/rlc-common/build-polling-helper.d.ts +6 -0
- package/dist/src/rlc-common/build-polling-helper.d.ts.map +1 -0
- package/dist/src/rlc-common/build-polling-helper.js +61 -0
- package/dist/src/rlc-common/build-polling-helper.js.map +1 -0
- package/dist/src/rlc-common/build-response-types.d.ts +6 -0
- package/dist/src/rlc-common/build-response-types.d.ts.map +1 -0
- package/dist/src/rlc-common/build-response-types.js +143 -0
- package/dist/src/rlc-common/build-response-types.js.map +1 -0
- package/dist/src/rlc-common/build-samples.d.ts +3 -0
- package/dist/src/rlc-common/build-samples.d.ts.map +1 -0
- package/dist/src/rlc-common/build-samples.js +30 -0
- package/dist/src/rlc-common/build-samples.js.map +1 -0
- package/dist/src/rlc-common/build-schema-type.d.ts +20 -0
- package/dist/src/rlc-common/build-schema-type.d.ts.map +1 -0
- package/dist/src/rlc-common/build-schema-type.js +71 -0
- package/dist/src/rlc-common/build-schema-type.js.map +1 -0
- package/dist/src/rlc-common/build-serialize-helper.d.ts +6 -0
- package/dist/src/rlc-common/build-serialize-helper.d.ts.map +1 -0
- package/dist/src/rlc-common/build-serialize-helper.js +36 -0
- package/dist/src/rlc-common/build-serialize-helper.js.map +1 -0
- package/dist/src/rlc-common/build-top-level-index-file.d.ts +6 -0
- package/dist/src/rlc-common/build-top-level-index-file.d.ts.map +1 -0
- package/dist/src/rlc-common/build-top-level-index-file.js +48 -0
- package/dist/src/rlc-common/build-top-level-index-file.js.map +1 -0
- package/dist/src/rlc-common/helpers/api-version-util.d.ts +17 -0
- package/dist/src/rlc-common/helpers/api-version-util.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/api-version-util.js +43 -0
- package/dist/src/rlc-common/helpers/api-version-util.js.map +1 -0
- package/dist/src/rlc-common/helpers/imports-util.d.ts +18 -0
- package/dist/src/rlc-common/helpers/imports-util.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/imports-util.js +164 -0
- package/dist/src/rlc-common/helpers/imports-util.js.map +1 -0
- package/dist/src/rlc-common/helpers/name-constructors.d.ts +42 -0
- package/dist/src/rlc-common/helpers/name-constructors.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/name-constructors.js +61 -0
- package/dist/src/rlc-common/helpers/name-constructors.js.map +1 -0
- package/dist/src/rlc-common/helpers/name-utils.d.ts +37 -0
- package/dist/src/rlc-common/helpers/name-utils.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/name-utils.js +240 -0
- package/dist/src/rlc-common/helpers/name-utils.js.map +1 -0
- package/dist/src/rlc-common/helpers/operation-helpers.d.ts +16 -0
- package/dist/src/rlc-common/helpers/operation-helpers.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/operation-helpers.js +104 -0
- package/dist/src/rlc-common/helpers/operation-helpers.js.map +1 -0
- package/dist/src/rlc-common/helpers/package-util.d.ts +7 -0
- package/dist/src/rlc-common/helpers/package-util.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/package-util.js +10 -0
- package/dist/src/rlc-common/helpers/package-util.js.map +1 -0
- package/dist/src/rlc-common/helpers/path-utils.d.ts +2 -0
- package/dist/src/rlc-common/helpers/path-utils.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/path-utils.js +9 -0
- package/dist/src/rlc-common/helpers/path-utils.js.map +1 -0
- package/dist/src/rlc-common/helpers/schema-helpers.d.ts +10 -0
- package/dist/src/rlc-common/helpers/schema-helpers.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/schema-helpers.js +37 -0
- package/dist/src/rlc-common/helpers/schema-helpers.js.map +1 -0
- package/dist/src/rlc-common/helpers/shortcut-methods.d.ts +4 -0
- package/dist/src/rlc-common/helpers/shortcut-methods.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/shortcut-methods.js +49 -0
- package/dist/src/rlc-common/helpers/shortcut-methods.js.map +1 -0
- package/dist/src/rlc-common/helpers/type-util.d.ts +32 -0
- package/dist/src/rlc-common/helpers/type-util.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/type-util.js +162 -0
- package/dist/src/rlc-common/helpers/type-util.js.map +1 -0
- package/dist/src/rlc-common/helpers/value-generation-util.d.ts +12 -0
- package/dist/src/rlc-common/helpers/value-generation-util.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/value-generation-util.js +161 -0
- package/dist/src/rlc-common/helpers/value-generation-util.js.map +1 -0
- package/dist/src/rlc-common/index.d.ts +39 -39
- package/dist/src/rlc-common/index.d.ts.map +1 -1
- package/dist/src/rlc-common/index.js +39 -39
- package/dist/src/rlc-common/index.js.map +1 -1
- package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts +6 -0
- package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-api-extractor-config.js +55 -0
- package/dist/src/rlc-common/metadata/build-api-extractor-config.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-changelog-file.d.ts +6 -0
- package/dist/src/rlc-common/metadata/build-changelog-file.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-changelog-file.js +25 -0
- package/dist/src/rlc-common/metadata/build-changelog-file.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts +6 -0
- package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-es-lint-config.js +79 -0
- package/dist/src/rlc-common/metadata/build-es-lint-config.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-license-file.d.ts +5 -0
- package/dist/src/rlc-common/metadata/build-license-file.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-license-file.js +32 -0
- package/dist/src/rlc-common/metadata/build-license-file.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-package-file.d.ts +25 -0
- package/dist/src/rlc-common/metadata/build-package-file.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-package-file.js +197 -0
- package/dist/src/rlc-common/metadata/build-package-file.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-readme-file.d.ts +11 -0
- package/dist/src/rlc-common/metadata/build-readme-file.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-readme-file.js +418 -0
- package/dist/src/rlc-common/metadata/build-readme-file.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-rollup-config.d.ts +6 -0
- package/dist/src/rlc-common/metadata/build-rollup-config.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-rollup-config.js +140 -0
- package/dist/src/rlc-common/metadata/build-rollup-config.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts +6 -0
- package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-sample-env-file.js +15 -0
- package/dist/src/rlc-common/metadata/build-sample-env-file.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-test-config.d.ts +16 -0
- package/dist/src/rlc-common/metadata/build-test-config.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-test-config.js +54 -0
- package/dist/src/rlc-common/metadata/build-test-config.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-ts-config.d.ts +61 -0
- package/dist/src/rlc-common/metadata/build-ts-config.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-ts-config.js +170 -0
- package/dist/src/rlc-common/metadata/build-ts-config.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-vitest-config.d.ts +6 -0
- package/dist/src/rlc-common/metadata/build-vitest-config.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-vitest-config.js +26 -0
- package/dist/src/rlc-common/metadata/build-vitest-config.js.map +1 -0
- package/dist/src/rlc-common/metadata/build-warp-config.d.ts +20 -0
- package/dist/src/rlc-common/metadata/build-warp-config.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/build-warp-config.js +76 -0
- package/dist/src/rlc-common/metadata/build-warp-config.js.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts +51 -0
- package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/azure-package-common.js +121 -0
- package/dist/src/rlc-common/metadata/package-json/azure-package-common.js.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts +242 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js +171 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.d.ts +8 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.js +101 -0
- package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.js.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.d.ts +57 -0
- package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.js +53 -0
- package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.js.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/package-common.d.ts +64 -0
- package/dist/src/rlc-common/metadata/package-json/package-common.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/package-json/package-common.js +180 -0
- package/dist/src/rlc-common/metadata/package-json/package-common.js.map +1 -0
- package/dist/src/rlc-common/static/paginate-content.d.ts +2 -0
- package/dist/src/rlc-common/static/paginate-content.d.ts.map +1 -0
- package/dist/src/rlc-common/static/paginate-content.js +345 -0
- package/dist/src/rlc-common/static/paginate-content.js.map +1 -0
- package/dist/src/rlc-common/static/polling-content.d.ts +2 -0
- package/dist/src/rlc-common/static/polling-content.d.ts.map +1 -0
- package/dist/src/rlc-common/static/polling-content.js +225 -0
- package/dist/src/rlc-common/static/polling-content.js.map +1 -0
- package/dist/src/rlc-common/static/sample-template.d.ts +2 -0
- package/dist/src/rlc-common/static/sample-template.d.ts.map +1 -0
- package/dist/src/rlc-common/static/sample-template.js +56 -0
- package/dist/src/rlc-common/static/sample-template.js.map +1 -0
- package/dist/src/rlc-common/static/serialize-helper.d.ts +6 -0
- package/dist/src/rlc-common/static/serialize-helper.d.ts.map +1 -0
- package/dist/src/rlc-common/static/serialize-helper.js +31 -0
- package/dist/src/rlc-common/static/serialize-helper.js.map +1 -0
- package/dist/src/rlc-common/test/build-karma-config.d.ts +6 -0
- package/dist/src/rlc-common/test/build-karma-config.d.ts.map +1 -0
- package/dist/src/rlc-common/test/build-karma-config.js +11 -0
- package/dist/src/rlc-common/test/build-karma-config.js.map +1 -0
- package/dist/src/rlc-common/test/build-recorded-client.d.ts +6 -0
- package/dist/src/rlc-common/test/build-recorded-client.d.ts.map +1 -0
- package/dist/src/rlc-common/test/build-recorded-client.js +17 -0
- package/dist/src/rlc-common/test/build-recorded-client.js.map +1 -0
- package/dist/src/rlc-common/test/build-sample-test.d.ts +6 -0
- package/dist/src/rlc-common/test/build-sample-test.d.ts.map +1 -0
- package/dist/src/rlc-common/test/build-sample-test.js +14 -0
- package/dist/src/rlc-common/test/build-sample-test.js.map +1 -0
- package/dist/src/rlc-common/test/build-snippets.d.ts +6 -0
- package/dist/src/rlc-common/test/build-snippets.d.ts.map +1 -0
- package/dist/src/rlc-common/test/build-snippets.js +26 -0
- package/dist/src/rlc-common/test/build-snippets.js.map +1 -0
- package/dist/src/rlc-common/transform-sample-groups.d.ts +9 -0
- package/dist/src/rlc-common/transform-sample-groups.d.ts.map +1 -0
- package/dist/src/rlc-common/transform-sample-groups.js +313 -0
- package/dist/src/rlc-common/transform-sample-groups.js.map +1 -0
- package/dist/src/transform/transform-api-version-info.d.ts +6 -0
- package/dist/src/transform/transform-api-version-info.d.ts.map +1 -0
- package/dist/src/transform/transform-api-version-info.js +78 -0
- package/dist/src/transform/transform-api-version-info.js.map +1 -0
- package/dist/src/transform/transform-helper-function-details.d.ts +5 -0
- package/dist/src/transform/transform-helper-function-details.d.ts.map +1 -0
- package/dist/src/transform/transform-helper-function-details.js +74 -0
- package/dist/src/transform/transform-helper-function-details.js.map +1 -0
- package/dist/src/transform/transform-parameters.d.ts +14 -0
- package/dist/src/transform/transform-parameters.d.ts.map +1 -0
- package/dist/src/transform/transform-parameters.js +201 -0
- package/dist/src/transform/transform-parameters.js.map +1 -0
- package/dist/src/transform/transform-paths.d.ts +5 -0
- package/dist/src/transform/transform-paths.d.ts.map +1 -0
- package/dist/src/transform/transform-paths.js +102 -0
- package/dist/src/transform/transform-paths.js.map +1 -0
- package/dist/src/transform/transform-responses.d.ts +5 -0
- package/dist/src/transform/transform-responses.d.ts.map +1 -0
- package/dist/src/transform/transform-responses.js +171 -0
- package/dist/src/transform/transform-responses.js.map +1 -0
- package/dist/src/transform/transform-schemas.d.ts +4 -0
- package/dist/src/transform/transform-schemas.d.ts.map +1 -0
- package/dist/src/transform/transform-schemas.js +191 -0
- package/dist/src/transform/transform-schemas.js.map +1 -0
- package/dist/src/transform/transform-telemetry-info.d.ts +4 -0
- package/dist/src/transform/transform-telemetry-info.d.ts.map +1 -0
- package/dist/src/transform/transform-telemetry-info.js +22 -0
- package/dist/src/transform/transform-telemetry-info.js.map +1 -0
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +12 -13
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transfrom-rlc-options.d.ts +14 -0
- package/dist/src/transform/transfrom-rlc-options.d.ts.map +1 -0
- package/dist/src/transform/transfrom-rlc-options.js +369 -0
- package/dist/src/transform/transfrom-rlc-options.js.map +1 -0
- package/dist/src/utils/client-utils.d.ts +10 -0
- package/dist/src/utils/client-utils.d.ts.map +1 -0
- package/dist/src/utils/client-utils.js +124 -0
- package/dist/src/utils/client-utils.js.map +1 -0
- package/dist/src/utils/credential-utils.d.ts +15 -0
- package/dist/src/utils/credential-utils.d.ts.map +1 -0
- package/dist/src/utils/credential-utils.js +68 -0
- package/dist/src/utils/credential-utils.js.map +1 -0
- package/dist/src/utils/cross-language-def.d.ts +6 -0
- package/dist/src/utils/cross-language-def.d.ts.map +1 -0
- package/dist/src/utils/cross-language-def.js +59 -0
- package/dist/src/utils/cross-language-def.js.map +1 -0
- package/dist/src/utils/emit-util.d.ts +5 -0
- package/dist/src/utils/emit-util.d.ts.map +1 -0
- package/dist/src/utils/emit-util.js +70 -0
- package/dist/src/utils/emit-util.js.map +1 -0
- package/dist/src/utils/file-system-utils.d.ts +5 -0
- package/dist/src/utils/file-system-utils.d.ts.map +1 -0
- package/dist/src/utils/file-system-utils.js +58 -0
- package/dist/src/utils/file-system-utils.js.map +1 -0
- package/dist/src/utils/import-helper.d.ts +10 -0
- package/dist/src/utils/import-helper.d.ts.map +1 -0
- package/dist/src/utils/import-helper.js +51 -0
- package/dist/src/utils/import-helper.js.map +1 -0
- package/dist/src/utils/interfaces.d.ts +1 -1
- package/dist/src/utils/interfaces.d.ts.map +1 -1
- package/dist/src/utils/media-types.d.ts +28 -0
- package/dist/src/utils/media-types.d.ts.map +1 -0
- package/dist/src/utils/media-types.js +124 -0
- package/dist/src/utils/media-types.js.map +1 -0
- package/dist/src/utils/model-utils.d.ts +60 -0
- package/dist/src/utils/model-utils.d.ts.map +1 -0
- package/dist/src/utils/model-utils.js +1480 -0
- package/dist/src/utils/model-utils.js.map +1 -0
- package/dist/src/utils/namespace-utils.d.ts +6 -0
- package/dist/src/utils/namespace-utils.d.ts.map +1 -0
- package/dist/src/utils/namespace-utils.js +69 -0
- package/dist/src/utils/namespace-utils.js.map +1 -0
- package/dist/src/utils/operation-util.d.ts +97 -0
- package/dist/src/utils/operation-util.d.ts.map +1 -0
- package/dist/src/utils/operation-util.js +547 -0
- package/dist/src/utils/operation-util.js.map +1 -0
- package/dist/src/utils/parameter-utils.d.ts +9 -0
- package/dist/src/utils/parameter-utils.d.ts.map +1 -0
- package/dist/src/utils/parameter-utils.js +147 -0
- package/dist/src/utils/parameter-utils.js.map +1 -0
- package/dist/src/utils/resolve-project-root.d.ts.map +1 -1
- package/dist/src/utils/resolve-project-root.js +1 -3
- package/dist/src/utils/resolve-project-root.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -32
- package/src/context-manager.ts +101 -0
- package/src/framework/hooks/binder.ts +6 -7
- package/src/framework/hooks/sdk-types.ts +218 -0
- package/src/framework/hooks/use-dependencies.ts +16 -0
- package/src/framework/load-static-helpers.ts +7 -8
- package/src/index.ts +46 -41
- package/src/lib.ts +31 -31
- package/src/modular/build-classical-client.ts +434 -0
- package/src/modular/build-classical-operation-groups.ts +69 -0
- package/src/modular/build-client-context.ts +325 -0
- package/src/modular/build-operations.ts +248 -0
- package/src/modular/build-project-files.ts +118 -0
- package/src/modular/build-restore-poller.ts +242 -0
- package/src/modular/build-root-index.ts +406 -0
- package/src/modular/build-subpath-index.ts +152 -0
- package/src/modular/emit-logger-file.ts +23 -0
- package/src/modular/emit-models-options.ts +56 -0
- package/src/modular/emit-models.ts +1080 -0
- package/src/modular/emit-samples.ts +674 -0
- package/src/modular/emit-tests.ts +198 -0
- package/src/modular/helpers/classical-operation-helpers.ts +375 -0
- package/src/modular/helpers/client-helpers.ts +362 -0
- package/src/modular/helpers/example-value-helpers.ts +851 -0
- package/src/modular/helpers/naming-helpers.ts +84 -0
- package/src/modular/helpers/operation-helpers.ts +3035 -0
- package/src/modular/helpers/type-helpers.ts +134 -0
- package/src/modular/serialization/build-deserializer-function.ts +564 -0
- package/src/modular/serialization/build-serializer-function.ts +614 -0
- package/src/modular/serialization/build-xml-serializer-function.ts +951 -0
- package/src/modular/serialization/serialize-utils.ts +217 -0
- package/src/modular/type-expressions/get-credential-expression.ts +1 -1
- package/src/modular/type-expressions/get-model-expression.ts +1 -1
- package/src/rlc-common/build-client-definitions.ts +235 -0
- package/src/rlc-common/build-client.ts +490 -0
- package/src/rlc-common/build-index-file.ts +344 -0
- package/src/rlc-common/build-is-unexpected-helper.ts +248 -0
- package/src/rlc-common/build-logger.ts +43 -0
- package/src/rlc-common/build-method-shortcuts.ts +71 -0
- package/src/rlc-common/build-object-types.ts +603 -0
- package/src/rlc-common/build-paginate-helper.ts +31 -0
- package/src/rlc-common/build-parameter-types.ts +554 -0
- package/src/rlc-common/build-polling-helper.ts +83 -0
- package/src/rlc-common/build-response-types.ts +180 -0
- package/src/rlc-common/build-samples.ts +32 -0
- package/src/rlc-common/build-schema-type.ts +89 -0
- package/src/rlc-common/build-serialize-helper.ts +49 -0
- package/src/rlc-common/build-top-level-index-file.ts +58 -0
- package/src/rlc-common/helpers/name-constructors.ts +110 -0
- package/src/rlc-common/helpers/operation-helpers.ts +138 -0
- package/src/rlc-common/helpers/path-utils.ts +8 -0
- package/src/rlc-common/helpers/shortcut-methods.ts +58 -0
- package/src/rlc-common/helpers/value-generation-util.ts +234 -0
- package/src/rlc-common/index.ts +39 -39
- package/src/rlc-common/metadata/build-package-file.ts +242 -0
- package/src/rlc-common/metadata/build-readme-file.ts +515 -0
- package/src/rlc-common/metadata/build-rollup-config.ts +147 -0
- package/src/rlc-common/metadata/package-json/azure-package-common.ts +152 -0
- package/src/rlc-common/metadata/package-json/build-azure-monorepo-package.ts +199 -0
- package/src/rlc-common/metadata/package-json/build-azure-standalone-package.ts +123 -0
- package/src/rlc-common/metadata/package-json/build-flavorless-package.ts +68 -0
- package/src/rlc-common/test/build-snippets.ts +29 -0
- package/src/rlc-common/transform-sample-groups.ts +407 -0
- package/src/transform/transform-api-version-info.ts +103 -0
- package/src/transform/transform-helper-function-details.ts +88 -0
- package/src/transform/transform-parameters.ts +321 -0
- package/src/transform/transform-paths.ts +157 -0
- package/src/transform/transform-responses.ts +237 -0
- package/src/transform/transform-schemas.ts +212 -0
- package/src/transform/transform-telemetry-info.ts +33 -0
- package/src/transform/transform.ts +12 -13
- package/src/transform/transfrom-rlc-options.ts +461 -0
- package/src/utils/cross-language-def.ts +66 -0
- package/src/utils/emit-util.ts +91 -0
- package/src/utils/file-system-utils.ts +68 -0
- package/src/utils/import-helper.ts +59 -0
- package/src/utils/interfaces.ts +1 -1
- package/src/utils/model-utils.ts +1727 -0
- package/src/utils/operation-util.ts +763 -0
- package/src/utils/parameter-utils.ts +192 -0
- package/src/utils/resolve-project-root.ts +1 -3
- package/static/static-helpers/serialization/serializers.ts +1 -0
- package/dist/src/contextManager.d.ts +0 -75
- package/dist/src/contextManager.d.ts.map +0 -1
- package/dist/src/contextManager.js +0 -59
- package/dist/src/contextManager.js.map +0 -1
- package/dist/src/framework/hooks/sdkTypes.d.ts +0 -26
- package/dist/src/framework/hooks/sdkTypes.d.ts.map +0 -1
- package/dist/src/framework/hooks/sdkTypes.js +0 -157
- package/dist/src/framework/hooks/sdkTypes.js.map +0 -1
- package/dist/src/framework/hooks/useDependencies.d.ts +0 -4
- package/dist/src/framework/hooks/useDependencies.d.ts.map +0 -1
- package/dist/src/framework/hooks/useDependencies.js +0 -13
- package/dist/src/framework/hooks/useDependencies.js.map +0 -1
- package/dist/src/metaTree.d.ts +0 -7
- package/dist/src/metaTree.d.ts.map +0 -1
- package/dist/src/metaTree.js +0 -2
- package/dist/src/metaTree.js.map +0 -1
- package/dist/src/modular/buildClassicalClient.d.ts +0 -6
- package/dist/src/modular/buildClassicalClient.d.ts.map +0 -1
- package/dist/src/modular/buildClassicalClient.js +0 -345
- package/dist/src/modular/buildClassicalClient.js.map +0 -1
- package/dist/src/modular/buildClassicalOperationGroups.d.ts +0 -6
- package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +0 -1
- package/dist/src/modular/buildClassicalOperationGroups.js +0 -48
- package/dist/src/modular/buildClassicalOperationGroups.js.map +0 -1
- package/dist/src/modular/buildClientContext.d.ts +0 -13
- package/dist/src/modular/buildClientContext.d.ts.map +0 -1
- package/dist/src/modular/buildClientContext.js +0 -246
- package/dist/src/modular/buildClientContext.js.map +0 -1
- package/dist/src/modular/buildModularOptions.d.ts +0 -6
- package/dist/src/modular/buildModularOptions.d.ts.map +0 -1
- package/dist/src/modular/buildModularOptions.js +0 -14
- package/dist/src/modular/buildModularOptions.js.map +0 -1
- package/dist/src/modular/buildOperations.d.ts +0 -21
- package/dist/src/modular/buildOperations.d.ts.map +0 -1
- package/dist/src/modular/buildOperations.js +0 -172
- package/dist/src/modular/buildOperations.js.map +0 -1
- package/dist/src/modular/buildProjectFiles.d.ts +0 -4
- package/dist/src/modular/buildProjectFiles.d.ts.map +0 -1
- package/dist/src/modular/buildProjectFiles.js +0 -91
- package/dist/src/modular/buildProjectFiles.js.map +0 -1
- package/dist/src/modular/buildRestorePoller.d.ts +0 -5
- package/dist/src/modular/buildRestorePoller.d.ts.map +0 -1
- package/dist/src/modular/buildRestorePoller.js +0 -216
- package/dist/src/modular/buildRestorePoller.js.map +0 -1
- package/dist/src/modular/buildRootIndex.d.ts +0 -13
- package/dist/src/modular/buildRootIndex.d.ts.map +0 -1
- package/dist/src/modular/buildRootIndex.js +0 -279
- package/dist/src/modular/buildRootIndex.js.map +0 -1
- package/dist/src/modular/buildSubpathIndex.d.ts +0 -16
- package/dist/src/modular/buildSubpathIndex.d.ts.map +0 -1
- package/dist/src/modular/buildSubpathIndex.js +0 -119
- package/dist/src/modular/buildSubpathIndex.js.map +0 -1
- package/dist/src/modular/emitLoggerFile.d.ts +0 -3
- package/dist/src/modular/emitLoggerFile.d.ts.map +0 -1
- package/dist/src/modular/emitLoggerFile.js +0 -18
- package/dist/src/modular/emitLoggerFile.js.map +0 -1
- package/dist/src/modular/emitModels.d.ts +0 -23
- package/dist/src/modular/emitModels.d.ts.map +0 -1
- package/dist/src/modular/emitModels.js +0 -850
- package/dist/src/modular/emitModels.js.map +0 -1
- package/dist/src/modular/emitModelsOptions.d.ts +0 -5
- package/dist/src/modular/emitModelsOptions.d.ts.map +0 -1
- package/dist/src/modular/emitModelsOptions.js +0 -35
- package/dist/src/modular/emitModelsOptions.js.map +0 -1
- package/dist/src/modular/emitSamples.d.ts +0 -7
- package/dist/src/modular/emitSamples.d.ts.map +0 -1
- package/dist/src/modular/emitSamples.js +0 -500
- package/dist/src/modular/emitSamples.js.map +0 -1
- package/dist/src/modular/emitTests.d.ts +0 -7
- package/dist/src/modular/emitTests.d.ts.map +0 -1
- package/dist/src/modular/emitTests.js +0 -155
- package/dist/src/modular/emitTests.js.map +0 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +0 -7
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js +0 -258
- package/dist/src/modular/helpers/classicalOperationHelpers.js.map +0 -1
- package/dist/src/modular/helpers/clientHelpers.d.ts +0 -34
- package/dist/src/modular/helpers/clientHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/clientHelpers.js +0 -259
- package/dist/src/modular/helpers/clientHelpers.js.map +0 -1
- package/dist/src/modular/helpers/clientOptionHelpers.d.ts +0 -43
- package/dist/src/modular/helpers/clientOptionHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/clientOptionHelpers.js +0 -103
- package/dist/src/modular/helpers/clientOptionHelpers.js.map +0 -1
- package/dist/src/modular/helpers/docsHelpers.d.ts +0 -3
- package/dist/src/modular/helpers/docsHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/docsHelpers.js +0 -10
- package/dist/src/modular/helpers/docsHelpers.js.map +0 -1
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts +0 -83
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/exampleValueHelpers.js +0 -639
- package/dist/src/modular/helpers/exampleValueHelpers.js.map +0 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts +0 -22
- package/dist/src/modular/helpers/namingHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/namingHelpers.js +0 -59
- package/dist/src/modular/helpers/namingHelpers.js.map +0 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +0 -105
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/operationHelpers.js +0 -2328
- package/dist/src/modular/helpers/operationHelpers.js.map +0 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts +0 -22
- package/dist/src/modular/helpers/typeHelpers.d.ts.map +0 -1
- package/dist/src/modular/helpers/typeHelpers.js +0 -94
- package/dist/src/modular/helpers/typeHelpers.js.map +0 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts +0 -7
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts.map +0 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js +0 -401
- package/dist/src/modular/serialization/buildDeserializerFunction.js.map +0 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts +0 -7
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +0 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js +0 -444
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +0 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts +0 -44
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts.map +0 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js +0 -729
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +0 -1
- package/dist/src/modular/serialization/serializeUtils.d.ts +0 -37
- package/dist/src/modular/serialization/serializeUtils.d.ts.map +0 -1
- package/dist/src/modular/serialization/serializeUtils.js +0 -145
- package/dist/src/modular/serialization/serializeUtils.js.map +0 -1
- package/dist/src/rlc-common/buildClient.d.ts +0 -9
- package/dist/src/rlc-common/buildClient.d.ts.map +0 -1
- package/dist/src/rlc-common/buildClient.js +0 -391
- package/dist/src/rlc-common/buildClient.js.map +0 -1
- package/dist/src/rlc-common/buildClientDefinitions.d.ts +0 -6
- package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +0 -1
- package/dist/src/rlc-common/buildClientDefinitions.js +0 -157
- package/dist/src/rlc-common/buildClientDefinitions.js.map +0 -1
- package/dist/src/rlc-common/buildIndexFile.d.ts +0 -6
- package/dist/src/rlc-common/buildIndexFile.d.ts.map +0 -1
- package/dist/src/rlc-common/buildIndexFile.js +0 -241
- package/dist/src/rlc-common/buildIndexFile.js.map +0 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts +0 -6
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +0 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js +0 -223
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +0 -1
- package/dist/src/rlc-common/buildLogger.d.ts +0 -6
- package/dist/src/rlc-common/buildLogger.d.ts.map +0 -1
- package/dist/src/rlc-common/buildLogger.js +0 -31
- package/dist/src/rlc-common/buildLogger.js.map +0 -1
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts +0 -5
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +0 -1
- package/dist/src/rlc-common/buildMethodShortcuts.js +0 -54
- package/dist/src/rlc-common/buildMethodShortcuts.js.map +0 -1
- package/dist/src/rlc-common/buildObjectTypes.d.ts +0 -29
- package/dist/src/rlc-common/buildObjectTypes.d.ts.map +0 -1
- package/dist/src/rlc-common/buildObjectTypes.js +0 -412
- package/dist/src/rlc-common/buildObjectTypes.js.map +0 -1
- package/dist/src/rlc-common/buildPaginateHelper.d.ts +0 -6
- package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +0 -1
- package/dist/src/rlc-common/buildPaginateHelper.js +0 -27
- package/dist/src/rlc-common/buildPaginateHelper.js.map +0 -1
- package/dist/src/rlc-common/buildParameterTypes.d.ts +0 -14
- package/dist/src/rlc-common/buildParameterTypes.d.ts.map +0 -1
- package/dist/src/rlc-common/buildParameterTypes.js +0 -391
- package/dist/src/rlc-common/buildParameterTypes.js.map +0 -1
- package/dist/src/rlc-common/buildPollingHelper.d.ts +0 -6
- package/dist/src/rlc-common/buildPollingHelper.d.ts.map +0 -1
- package/dist/src/rlc-common/buildPollingHelper.js +0 -61
- package/dist/src/rlc-common/buildPollingHelper.js.map +0 -1
- package/dist/src/rlc-common/buildResponseTypes.d.ts +0 -6
- package/dist/src/rlc-common/buildResponseTypes.d.ts.map +0 -1
- package/dist/src/rlc-common/buildResponseTypes.js +0 -143
- package/dist/src/rlc-common/buildResponseTypes.js.map +0 -1
- package/dist/src/rlc-common/buildSamples.d.ts +0 -3
- package/dist/src/rlc-common/buildSamples.d.ts.map +0 -1
- package/dist/src/rlc-common/buildSamples.js +0 -30
- package/dist/src/rlc-common/buildSamples.js.map +0 -1
- package/dist/src/rlc-common/buildSchemaType.d.ts +0 -20
- package/dist/src/rlc-common/buildSchemaType.d.ts.map +0 -1
- package/dist/src/rlc-common/buildSchemaType.js +0 -71
- package/dist/src/rlc-common/buildSchemaType.js.map +0 -1
- package/dist/src/rlc-common/buildSerializeHelper.d.ts +0 -6
- package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +0 -1
- package/dist/src/rlc-common/buildSerializeHelper.js +0 -36
- package/dist/src/rlc-common/buildSerializeHelper.js.map +0 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts +0 -6
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +0 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.js +0 -48
- package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +0 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts +0 -17
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.js +0 -43
- package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +0 -1
- package/dist/src/rlc-common/helpers/importsUtil.d.ts +0 -18
- package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/importsUtil.js +0 -164
- package/dist/src/rlc-common/helpers/importsUtil.js.map +0 -1
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts +0 -42
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/nameConstructors.js +0 -61
- package/dist/src/rlc-common/helpers/nameConstructors.js.map +0 -1
- package/dist/src/rlc-common/helpers/nameUtils.d.ts +0 -37
- package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/nameUtils.js +0 -240
- package/dist/src/rlc-common/helpers/nameUtils.js.map +0 -1
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts +0 -16
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/operationHelpers.js +0 -104
- package/dist/src/rlc-common/helpers/operationHelpers.js.map +0 -1
- package/dist/src/rlc-common/helpers/packageUtil.d.ts +0 -7
- package/dist/src/rlc-common/helpers/packageUtil.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/packageUtil.js +0 -10
- package/dist/src/rlc-common/helpers/packageUtil.js.map +0 -1
- package/dist/src/rlc-common/helpers/pathUtils.d.ts +0 -2
- package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/pathUtils.js +0 -10
- package/dist/src/rlc-common/helpers/pathUtils.js.map +0 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts +0 -10
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.js +0 -37
- package/dist/src/rlc-common/helpers/schemaHelpers.js.map +0 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +0 -4
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.js +0 -49
- package/dist/src/rlc-common/helpers/shortcutMethods.js.map +0 -1
- package/dist/src/rlc-common/helpers/typeUtil.d.ts +0 -32
- package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/typeUtil.js +0 -162
- package/dist/src/rlc-common/helpers/typeUtil.js.map +0 -1
- package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts +0 -12
- package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js +0 -161
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts +0 -6
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +0 -55
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts +0 -6
- package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildChangelogFile.js +0 -25
- package/dist/src/rlc-common/metadata/buildChangelogFile.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts +0 -6
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.js +0 -79
- package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts +0 -5
- package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildLicenseFile.js +0 -32
- package/dist/src/rlc-common/metadata/buildLicenseFile.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts +0 -25
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.js +0 -197
- package/dist/src/rlc-common/metadata/buildPackageFile.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts +0 -11
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.js +0 -418
- package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts +0 -6
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.js +0 -140
- package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts +0 -6
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +0 -15
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildTestConfig.d.ts +0 -16
- package/dist/src/rlc-common/metadata/buildTestConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildTestConfig.js +0 -54
- package/dist/src/rlc-common/metadata/buildTestConfig.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts +0 -61
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.js +0 -170
- package/dist/src/rlc-common/metadata/buildTsConfig.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts +0 -6
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.js +0 -26
- package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +0 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts +0 -20
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.js +0 -76
- package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +0 -51
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +0 -121
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts +0 -242
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +0 -171
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts +0 -8
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +0 -101
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts +0 -57
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +0 -53
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts +0 -64
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +0 -180
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +0 -1
- package/dist/src/rlc-common/static/paginateContent.d.ts +0 -2
- package/dist/src/rlc-common/static/paginateContent.d.ts.map +0 -1
- package/dist/src/rlc-common/static/paginateContent.js +0 -345
- package/dist/src/rlc-common/static/paginateContent.js.map +0 -1
- package/dist/src/rlc-common/static/pollingContent.d.ts +0 -2
- package/dist/src/rlc-common/static/pollingContent.d.ts.map +0 -1
- package/dist/src/rlc-common/static/pollingContent.js +0 -225
- package/dist/src/rlc-common/static/pollingContent.js.map +0 -1
- package/dist/src/rlc-common/static/sampleTemplate.d.ts +0 -2
- package/dist/src/rlc-common/static/sampleTemplate.d.ts.map +0 -1
- package/dist/src/rlc-common/static/sampleTemplate.js +0 -56
- package/dist/src/rlc-common/static/sampleTemplate.js.map +0 -1
- package/dist/src/rlc-common/static/serializeHelper.d.ts +0 -6
- package/dist/src/rlc-common/static/serializeHelper.d.ts.map +0 -1
- package/dist/src/rlc-common/static/serializeHelper.js +0 -31
- package/dist/src/rlc-common/static/serializeHelper.js.map +0 -1
- package/dist/src/rlc-common/test/buildKarmaConfig.d.ts +0 -6
- package/dist/src/rlc-common/test/buildKarmaConfig.d.ts.map +0 -1
- package/dist/src/rlc-common/test/buildKarmaConfig.js +0 -11
- package/dist/src/rlc-common/test/buildKarmaConfig.js.map +0 -1
- package/dist/src/rlc-common/test/buildRecordedClient.d.ts +0 -6
- package/dist/src/rlc-common/test/buildRecordedClient.d.ts.map +0 -1
- package/dist/src/rlc-common/test/buildRecordedClient.js +0 -17
- package/dist/src/rlc-common/test/buildRecordedClient.js.map +0 -1
- package/dist/src/rlc-common/test/buildSampleTest.d.ts +0 -6
- package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +0 -1
- package/dist/src/rlc-common/test/buildSampleTest.js +0 -14
- package/dist/src/rlc-common/test/buildSampleTest.js.map +0 -1
- package/dist/src/rlc-common/test/buildSnippets.d.ts +0 -6
- package/dist/src/rlc-common/test/buildSnippets.d.ts.map +0 -1
- package/dist/src/rlc-common/test/buildSnippets.js +0 -26
- package/dist/src/rlc-common/test/buildSnippets.js.map +0 -1
- package/dist/src/rlc-common/transformSampleGroups.d.ts +0 -9
- package/dist/src/rlc-common/transformSampleGroups.d.ts.map +0 -1
- package/dist/src/rlc-common/transformSampleGroups.js +0 -313
- package/dist/src/rlc-common/transformSampleGroups.js.map +0 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts +0 -6
- package/dist/src/transform/transformApiVersionInfo.d.ts.map +0 -1
- package/dist/src/transform/transformApiVersionInfo.js +0 -78
- package/dist/src/transform/transformApiVersionInfo.js.map +0 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts +0 -5
- package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +0 -1
- package/dist/src/transform/transformHelperFunctionDetails.js +0 -74
- package/dist/src/transform/transformHelperFunctionDetails.js.map +0 -1
- package/dist/src/transform/transformParameters.d.ts +0 -14
- package/dist/src/transform/transformParameters.d.ts.map +0 -1
- package/dist/src/transform/transformParameters.js +0 -201
- package/dist/src/transform/transformParameters.js.map +0 -1
- package/dist/src/transform/transformPaths.d.ts +0 -5
- package/dist/src/transform/transformPaths.d.ts.map +0 -1
- package/dist/src/transform/transformPaths.js +0 -102
- package/dist/src/transform/transformPaths.js.map +0 -1
- package/dist/src/transform/transformResponses.d.ts +0 -5
- package/dist/src/transform/transformResponses.d.ts.map +0 -1
- package/dist/src/transform/transformResponses.js +0 -171
- package/dist/src/transform/transformResponses.js.map +0 -1
- package/dist/src/transform/transformSchemas.d.ts +0 -4
- package/dist/src/transform/transformSchemas.d.ts.map +0 -1
- package/dist/src/transform/transformSchemas.js +0 -191
- package/dist/src/transform/transformSchemas.js.map +0 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts +0 -4
- package/dist/src/transform/transformTelemetryInfo.d.ts.map +0 -1
- package/dist/src/transform/transformTelemetryInfo.js +0 -22
- package/dist/src/transform/transformTelemetryInfo.js.map +0 -1
- package/dist/src/transform/transfromRLCOptions.d.ts +0 -14
- package/dist/src/transform/transfromRLCOptions.d.ts.map +0 -1
- package/dist/src/transform/transfromRLCOptions.js +0 -369
- package/dist/src/transform/transfromRLCOptions.js.map +0 -1
- package/dist/src/utils/clientUtils.d.ts +0 -10
- package/dist/src/utils/clientUtils.d.ts.map +0 -1
- package/dist/src/utils/clientUtils.js +0 -124
- package/dist/src/utils/clientUtils.js.map +0 -1
- package/dist/src/utils/credentialUtils.d.ts +0 -15
- package/dist/src/utils/credentialUtils.d.ts.map +0 -1
- package/dist/src/utils/credentialUtils.js +0 -68
- package/dist/src/utils/credentialUtils.js.map +0 -1
- package/dist/src/utils/crossLanguageDef.d.ts +0 -6
- package/dist/src/utils/crossLanguageDef.d.ts.map +0 -1
- package/dist/src/utils/crossLanguageDef.js +0 -59
- package/dist/src/utils/crossLanguageDef.js.map +0 -1
- package/dist/src/utils/dirname.d.ts +0 -9
- package/dist/src/utils/dirname.d.ts.map +0 -1
- package/dist/src/utils/dirname.js +0 -12
- package/dist/src/utils/dirname.js.map +0 -1
- package/dist/src/utils/emitUtil.d.ts +0 -5
- package/dist/src/utils/emitUtil.d.ts.map +0 -1
- package/dist/src/utils/emitUtil.js +0 -71
- package/dist/src/utils/emitUtil.js.map +0 -1
- package/dist/src/utils/fileSystemUtils.d.ts +0 -5
- package/dist/src/utils/fileSystemUtils.d.ts.map +0 -1
- package/dist/src/utils/fileSystemUtils.js +0 -59
- package/dist/src/utils/fileSystemUtils.js.map +0 -1
- package/dist/src/utils/importHelper.d.ts +0 -10
- package/dist/src/utils/importHelper.d.ts.map +0 -1
- package/dist/src/utils/importHelper.js +0 -51
- package/dist/src/utils/importHelper.js.map +0 -1
- package/dist/src/utils/mediaTypes.d.ts +0 -28
- package/dist/src/utils/mediaTypes.d.ts.map +0 -1
- package/dist/src/utils/mediaTypes.js +0 -124
- package/dist/src/utils/mediaTypes.js.map +0 -1
- package/dist/src/utils/modelUtils.d.ts +0 -60
- package/dist/src/utils/modelUtils.d.ts.map +0 -1
- package/dist/src/utils/modelUtils.js +0 -1488
- package/dist/src/utils/modelUtils.js.map +0 -1
- package/dist/src/utils/namespaceUtils.d.ts +0 -6
- package/dist/src/utils/namespaceUtils.d.ts.map +0 -1
- package/dist/src/utils/namespaceUtils.js +0 -69
- package/dist/src/utils/namespaceUtils.js.map +0 -1
- package/dist/src/utils/operationUtil.d.ts +0 -97
- package/dist/src/utils/operationUtil.d.ts.map +0 -1
- package/dist/src/utils/operationUtil.js +0 -547
- package/dist/src/utils/operationUtil.js.map +0 -1
- package/dist/src/utils/parameterUtils.d.ts +0 -9
- package/dist/src/utils/parameterUtils.d.ts.map +0 -1
- package/dist/src/utils/parameterUtils.js +0 -147
- package/dist/src/utils/parameterUtils.js.map +0 -1
- package/src/contextManager.ts +0 -101
- package/src/framework/hooks/sdkTypes.ts +0 -218
- package/src/framework/hooks/useDependencies.ts +0 -16
- package/src/modular/buildClassicalClient.ts +0 -434
- package/src/modular/buildClassicalOperationGroups.ts +0 -69
- package/src/modular/buildClientContext.ts +0 -325
- package/src/modular/buildOperations.ts +0 -248
- package/src/modular/buildProjectFiles.ts +0 -111
- package/src/modular/buildRestorePoller.ts +0 -242
- package/src/modular/buildRootIndex.ts +0 -407
- package/src/modular/buildSubpathIndex.ts +0 -152
- package/src/modular/emitLoggerFile.ts +0 -23
- package/src/modular/emitModels.ts +0 -1081
- package/src/modular/emitModelsOptions.ts +0 -56
- package/src/modular/emitSamples.ts +0 -675
- package/src/modular/emitTests.ts +0 -194
- package/src/modular/helpers/classicalOperationHelpers.ts +0 -375
- package/src/modular/helpers/clientHelpers.ts +0 -362
- package/src/modular/helpers/exampleValueHelpers.ts +0 -851
- package/src/modular/helpers/namingHelpers.ts +0 -84
- package/src/modular/helpers/operationHelpers.ts +0 -3035
- package/src/modular/helpers/typeHelpers.ts +0 -131
- package/src/modular/serialization/buildDeserializerFunction.ts +0 -564
- package/src/modular/serialization/buildSerializerFunction.ts +0 -616
- package/src/modular/serialization/buildXmlSerializerFunction.ts +0 -951
- package/src/modular/serialization/serializeUtils.ts +0 -217
- package/src/rlc-common/buildClient.ts +0 -490
- package/src/rlc-common/buildClientDefinitions.ts +0 -235
- package/src/rlc-common/buildIndexFile.ts +0 -344
- package/src/rlc-common/buildIsUnexpectedHelper.ts +0 -248
- package/src/rlc-common/buildLogger.ts +0 -43
- package/src/rlc-common/buildMethodShortcuts.ts +0 -71
- package/src/rlc-common/buildObjectTypes.ts +0 -603
- package/src/rlc-common/buildPaginateHelper.ts +0 -31
- package/src/rlc-common/buildParameterTypes.ts +0 -554
- package/src/rlc-common/buildPollingHelper.ts +0 -83
- package/src/rlc-common/buildResponseTypes.ts +0 -180
- package/src/rlc-common/buildSamples.ts +0 -32
- package/src/rlc-common/buildSchemaType.ts +0 -89
- package/src/rlc-common/buildSerializeHelper.ts +0 -49
- package/src/rlc-common/buildTopLevelIndexFile.ts +0 -58
- package/src/rlc-common/helpers/nameConstructors.ts +0 -110
- package/src/rlc-common/helpers/operationHelpers.ts +0 -138
- package/src/rlc-common/helpers/pathUtils.ts +0 -10
- package/src/rlc-common/helpers/shortcutMethods.ts +0 -58
- package/src/rlc-common/helpers/valueGenerationUtil.ts +0 -234
- package/src/rlc-common/metadata/buildPackageFile.ts +0 -242
- package/src/rlc-common/metadata/buildReadmeFile.ts +0 -515
- package/src/rlc-common/metadata/buildRollupConfig.ts +0 -147
- package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +0 -152
- package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +0 -199
- package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +0 -123
- package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +0 -68
- package/src/rlc-common/test/buildSnippets.ts +0 -29
- package/src/rlc-common/transformSampleGroups.ts +0 -407
- package/src/transform/transformApiVersionInfo.ts +0 -103
- package/src/transform/transformHelperFunctionDetails.ts +0 -88
- package/src/transform/transformParameters.ts +0 -321
- package/src/transform/transformPaths.ts +0 -157
- package/src/transform/transformResponses.ts +0 -237
- package/src/transform/transformSchemas.ts +0 -212
- package/src/transform/transformTelemetryInfo.ts +0 -33
- package/src/transform/transfromRLCOptions.ts +0 -461
- package/src/utils/crossLanguageDef.ts +0 -66
- package/src/utils/dirname.ts +0 -12
- package/src/utils/emitUtil.ts +0 -92
- package/src/utils/fileSystemUtils.ts +0 -69
- package/src/utils/importHelper.ts +0 -59
- package/src/utils/modelUtils.ts +0 -1737
- package/src/utils/operationUtil.ts +0 -763
- package/src/utils/parameterUtils.ts +0 -192
- /package/src/{metaTree.ts → meta-tree.ts} +0 -0
- /package/src/modular/{buildModularOptions.ts → build-modular-options.ts} +0 -0
- /package/src/modular/helpers/{clientOptionHelpers.ts → client-option-helpers.ts} +0 -0
- /package/src/modular/helpers/{docsHelpers.ts → docs-helpers.ts} +0 -0
- /package/src/rlc-common/helpers/{apiVersionUtil.ts → api-version-util.ts} +0 -0
- /package/src/rlc-common/helpers/{importsUtil.ts → imports-util.ts} +0 -0
- /package/src/rlc-common/helpers/{nameUtils.ts → name-utils.ts} +0 -0
- /package/src/rlc-common/helpers/{packageUtil.ts → package-util.ts} +0 -0
- /package/src/rlc-common/helpers/{schemaHelpers.ts → schema-helpers.ts} +0 -0
- /package/src/rlc-common/helpers/{typeUtil.ts → type-util.ts} +0 -0
- /package/src/rlc-common/metadata/{buildApiExtractorConfig.ts → build-api-extractor-config.ts} +0 -0
- /package/src/rlc-common/metadata/{buildChangelogFile.ts → build-changelog-file.ts} +0 -0
- /package/src/rlc-common/metadata/{buildESLintConfig.ts → build-es-lint-config.ts} +0 -0
- /package/src/rlc-common/metadata/{buildLicenseFile.ts → build-license-file.ts} +0 -0
- /package/src/rlc-common/metadata/{buildSampleEnvFile.ts → build-sample-env-file.ts} +0 -0
- /package/src/rlc-common/metadata/{buildTestConfig.ts → build-test-config.ts} +0 -0
- /package/src/rlc-common/metadata/{buildTsConfig.ts → build-ts-config.ts} +0 -0
- /package/src/rlc-common/metadata/{buildVitestConfig.ts → build-vitest-config.ts} +0 -0
- /package/src/rlc-common/metadata/{buildWarpConfig.ts → build-warp-config.ts} +0 -0
- /package/src/rlc-common/metadata/{packageJson/packageCommon.ts → package-json/package-common.ts} +0 -0
- /package/src/rlc-common/static/{paginateContent.ts → paginate-content.ts} +0 -0
- /package/src/rlc-common/static/{pollingContent.ts → polling-content.ts} +0 -0
- /package/src/rlc-common/static/{sampleTemplate.ts → sample-template.ts} +0 -0
- /package/src/rlc-common/static/{serializeHelper.ts → serialize-helper.ts} +0 -0
- /package/src/rlc-common/test/{buildKarmaConfig.ts → build-karma-config.ts} +0 -0
- /package/src/rlc-common/test/{buildRecordedClient.ts → build-recorded-client.ts} +0 -0
- /package/src/rlc-common/test/{buildSampleTest.ts → build-sample-test.ts} +0 -0
- /package/src/utils/{clientUtils.ts → client-utils.ts} +0 -0
- /package/src/utils/{credentialUtils.ts → credential-utils.ts} +0 -0
- /package/src/utils/{mediaTypes.ts → media-types.ts} +0 -0
- /package/src/utils/{namespaceUtils.ts → namespace-utils.ts} +0 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { NameType, isAzurePackage, normalizeName } from "../rlc-common/index.js";
|
|
2
|
+
import { buildGetClientCredentialParam, buildGetClientEndpointParam, buildGetClientOptionsParam, getClientParameterName, getClientParameters, getClientParametersDeclaration, } from "./helpers/client-helpers.js";
|
|
3
|
+
import { NoTarget } from "@typespec/compiler";
|
|
4
|
+
import { useContext } from "../context-manager.js";
|
|
5
|
+
import { useDependencies } from "../framework/hooks/use-dependencies.js";
|
|
6
|
+
import { resolveReference } from "../framework/reference.js";
|
|
7
|
+
import { refkey } from "../framework/refkey.js";
|
|
8
|
+
import { reportDiagnostic } from "../lib.js";
|
|
9
|
+
import { getModularClientOptions } from "../utils/client-utils.js";
|
|
10
|
+
import { buildEnumTypes, getApiVersionEnum } from "./emit-models.js";
|
|
11
|
+
import { getDocsFromDescription } from "./helpers/docs-helpers.js";
|
|
12
|
+
import { getClassicalClientName, getClientName } from "./helpers/naming-helpers.js";
|
|
13
|
+
import { CloudSettingHelpers } from "./static-helpers-metadata.js";
|
|
14
|
+
import { getTypeExpression } from "./type-expressions/get-type-expression.js";
|
|
15
|
+
/**
|
|
16
|
+
* This function gets the path of the file containing the modular client context
|
|
17
|
+
*/
|
|
18
|
+
export function getClientContextPath(clientMap, emitterOptions) {
|
|
19
|
+
const [_, client] = clientMap;
|
|
20
|
+
const { subfolder } = getModularClientOptions(clientMap);
|
|
21
|
+
const name = getClientName(client);
|
|
22
|
+
const srcPath = emitterOptions.modularOptions.sourceRoot;
|
|
23
|
+
const contentPath = `${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}api/${normalizeName(name, NameType.File)}Context.ts`;
|
|
24
|
+
return contentPath;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This function creates the file containing the modular client context
|
|
28
|
+
*/
|
|
29
|
+
export function buildClientContext(dpgContext, clientMap, emitterOptions) {
|
|
30
|
+
const project = useContext("outputProject");
|
|
31
|
+
const dependencies = useDependencies();
|
|
32
|
+
const [hierarchy, client] = clientMap;
|
|
33
|
+
const name = getClientName(client);
|
|
34
|
+
const { rlcClientName } = getModularClientOptions(clientMap);
|
|
35
|
+
const requiredParams = getClientParametersDeclaration(client, dpgContext, {
|
|
36
|
+
onClientOnly: false,
|
|
37
|
+
requiredOnly: true,
|
|
38
|
+
apiVersionAsRequired: true,
|
|
39
|
+
});
|
|
40
|
+
const clientContextFile = project.createSourceFile(getClientContextPath(clientMap, emitterOptions));
|
|
41
|
+
// Get all client parameters (both required and optional) for the interface
|
|
42
|
+
const requiredInterfaceProperties = getClientParameters(client, dpgContext, {
|
|
43
|
+
onClientOnly: false,
|
|
44
|
+
requiredOnly: true,
|
|
45
|
+
})
|
|
46
|
+
.filter((p) => {
|
|
47
|
+
const clientParamName = getClientParameterName(p);
|
|
48
|
+
return clientParamName !== "endpointParam" && clientParamName !== "credential";
|
|
49
|
+
})
|
|
50
|
+
.map((p) => {
|
|
51
|
+
return {
|
|
52
|
+
name: getClientParameterName(p),
|
|
53
|
+
type: getTypeExpression(dpgContext, p.type),
|
|
54
|
+
hasQuestionToken: false,
|
|
55
|
+
docs: getDocsWithKnownVersion(dpgContext, p),
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
// Collect names of required properties to avoid duplicates
|
|
59
|
+
const requiredPropertyNames = new Set(requiredInterfaceProperties.map((p) => p.name));
|
|
60
|
+
const optionalInterfaceProperties = getClientParameters(client, dpgContext, {
|
|
61
|
+
onClientOnly: false,
|
|
62
|
+
optionalOnly: true,
|
|
63
|
+
})
|
|
64
|
+
.filter((p) => {
|
|
65
|
+
const clientParamName = getClientParameterName(p);
|
|
66
|
+
return (clientParamName !== "endpointParam" &&
|
|
67
|
+
clientParamName !== "credential" &&
|
|
68
|
+
clientParamName !== "endpoint" &&
|
|
69
|
+
!requiredPropertyNames.has(clientParamName) // Avoid duplicating required properties
|
|
70
|
+
);
|
|
71
|
+
})
|
|
72
|
+
.map((p) => {
|
|
73
|
+
return {
|
|
74
|
+
name: getClientParameterName(p),
|
|
75
|
+
type: getTypeExpression(dpgContext, p.type),
|
|
76
|
+
hasQuestionToken: true,
|
|
77
|
+
docs: getDocsWithKnownVersion(dpgContext, p),
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
clientContextFile.addInterface({
|
|
81
|
+
isExported: true,
|
|
82
|
+
name: `${rlcClientName}`,
|
|
83
|
+
extends: [resolveReference(dependencies.Client)],
|
|
84
|
+
docs: getDocsFromDescription(client.doc),
|
|
85
|
+
properties: [...requiredInterfaceProperties, ...optionalInterfaceProperties],
|
|
86
|
+
});
|
|
87
|
+
const propertiesInOptions = getClientParameters(client, dpgContext, {
|
|
88
|
+
optionalOnly: true,
|
|
89
|
+
})
|
|
90
|
+
.filter((p) => getClientParameterName(p) !== "endpoint")
|
|
91
|
+
.map((p) => {
|
|
92
|
+
return {
|
|
93
|
+
name: getClientParameterName(p),
|
|
94
|
+
type: p.name.toLowerCase() === "apiversion" ? "string" : getTypeExpression(dpgContext, p.type),
|
|
95
|
+
hasQuestionToken: true,
|
|
96
|
+
docs: getDocsWithKnownVersion(dpgContext, p),
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
if (dpgContext.arm) {
|
|
100
|
+
propertiesInOptions.push({
|
|
101
|
+
name: "cloudSetting",
|
|
102
|
+
type: `${resolveReference(CloudSettingHelpers.AzureSupportedClouds)}`,
|
|
103
|
+
hasQuestionToken: true,
|
|
104
|
+
docs: [`Specifies the Azure cloud environment for the client.`],
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
// check if we have duplication options
|
|
108
|
+
const existingOptionNames = new Set();
|
|
109
|
+
for (const property of propertiesInOptions) {
|
|
110
|
+
if (existingOptionNames.has(property.name)) {
|
|
111
|
+
reportDiagnostic(dpgContext.program, {
|
|
112
|
+
code: "parameter-name-conflict",
|
|
113
|
+
format: { parameterName: property.name },
|
|
114
|
+
target: NoTarget,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
existingOptionNames.add(property.name);
|
|
118
|
+
}
|
|
119
|
+
clientContextFile.addInterface({
|
|
120
|
+
name: `${getClassicalClientName(client)}OptionalParams`,
|
|
121
|
+
isExported: true,
|
|
122
|
+
extends: [resolveReference(dependencies.ClientOptions)],
|
|
123
|
+
properties: propertiesInOptions,
|
|
124
|
+
docs: ["Optional parameters for the client."],
|
|
125
|
+
});
|
|
126
|
+
// TODO use binder here
|
|
127
|
+
// (for now) now logger for unbranded pkgs
|
|
128
|
+
if (isAzurePackage(emitterOptions)) {
|
|
129
|
+
clientContextFile.addImportDeclaration({
|
|
130
|
+
moduleSpecifier: "../".repeat(hierarchy.length + 1) + "logger.js",
|
|
131
|
+
namedImports: ["logger"],
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
const factoryFunction = clientContextFile.addFunction({
|
|
135
|
+
docs: getDocsFromDescription(client.doc),
|
|
136
|
+
name: `create${name}`,
|
|
137
|
+
returnType: `${rlcClientName}`,
|
|
138
|
+
parameters: getClientParametersDeclaration(client, dpgContext, {
|
|
139
|
+
onClientOnly: false,
|
|
140
|
+
requiredOnly: true,
|
|
141
|
+
}),
|
|
142
|
+
isExported: true,
|
|
143
|
+
});
|
|
144
|
+
const { endpointParamName: endpointParam, assignedOptionalParams } = buildGetClientEndpointParam(factoryFunction, dpgContext, client);
|
|
145
|
+
const credentialParam = buildGetClientCredentialParam(client, emitterOptions);
|
|
146
|
+
// Get api version param early so we can use its name when building options
|
|
147
|
+
const apiVersionParam = getClientParameters(client, dpgContext).find((x) => x.isApiVersionParam);
|
|
148
|
+
const apiVersionParamName = apiVersionParam ? getClientParameterName(apiVersionParam) : undefined;
|
|
149
|
+
const optionsParam = buildGetClientOptionsParam(factoryFunction, emitterOptions, endpointParam, apiVersionParamName);
|
|
150
|
+
factoryFunction.addStatements(`const clientContext = ${resolveReference(dependencies.getClient)}(${endpointParam}, ${credentialParam}, ${optionsParam});`);
|
|
151
|
+
const { customHttpAuthHeaderName, customHttpAuthSharedKeyPrefix } = emitterOptions.options;
|
|
152
|
+
if (customHttpAuthHeaderName && customHttpAuthSharedKeyPrefix) {
|
|
153
|
+
factoryFunction.addStatements(`
|
|
154
|
+
if(${resolveReference(dependencies.isKeyCredential)}(credential)) {
|
|
155
|
+
clientContext.pipeline.addPolicy({
|
|
156
|
+
name: "customKeyCredentialPolicy",
|
|
157
|
+
sendRequest(request, next) {
|
|
158
|
+
request.headers.set("${customHttpAuthHeaderName}", "${customHttpAuthSharedKeyPrefix} " + credential.key);
|
|
159
|
+
return next(request);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
`);
|
|
164
|
+
}
|
|
165
|
+
let apiVersionStatement = ``;
|
|
166
|
+
const endpointParameter = getClientParameters(client, dpgContext, {
|
|
167
|
+
onClientOnly: false,
|
|
168
|
+
requiredOnly: true,
|
|
169
|
+
skipEndpointTemplate: true,
|
|
170
|
+
}).find((x) => x.kind === "endpoint");
|
|
171
|
+
if (apiVersionParam) {
|
|
172
|
+
const templateArguments = endpointParameter && endpointParameter.type.kind === "endpoint"
|
|
173
|
+
? endpointParameter.type.templateArguments
|
|
174
|
+
: endpointParameter && endpointParameter.type.kind === "union"
|
|
175
|
+
? endpointParameter.type.variantTypes[0]?.templateArguments
|
|
176
|
+
: [];
|
|
177
|
+
const apiVersionInEndpoint = templateArguments && templateArguments.find((p) => p.isApiVersionParam);
|
|
178
|
+
if (!apiVersionInEndpoint && apiVersionParam.clientDefaultValue) {
|
|
179
|
+
apiVersionStatement += `const ${apiVersionParamName} = options.${apiVersionParamName};`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else if (isAzurePackage(emitterOptions)) {
|
|
183
|
+
apiVersionStatement += `
|
|
184
|
+
if (options.apiVersion) {
|
|
185
|
+
logger.warning("This client does not support client api-version, please change it at the operation level");
|
|
186
|
+
}`;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
apiVersionStatement += `
|
|
190
|
+
if (options.apiVersion) {
|
|
191
|
+
console.warn("This client does not support client api-version, please change it at the operation level");
|
|
192
|
+
}`;
|
|
193
|
+
}
|
|
194
|
+
factoryFunction.addStatements(apiVersionStatement);
|
|
195
|
+
const contextRequiredParam = requiredParams.filter((p) => p.name !== "endpointParam" && p.name !== "credential" && p.name !== "options");
|
|
196
|
+
// Collect names of required parameters to avoid duplicates
|
|
197
|
+
const requiredParamNames = new Set(contextRequiredParam.map((p) => p.name));
|
|
198
|
+
// Also include optional parameters from clientInitialization that should be passed through
|
|
199
|
+
const contextOptionalParams = getClientParameters(client, dpgContext, {
|
|
200
|
+
optionalOnly: true,
|
|
201
|
+
onClientOnly: false,
|
|
202
|
+
}).filter((p) => {
|
|
203
|
+
const clientParamName = getClientParameterName(p);
|
|
204
|
+
return (clientParamName !== "endpointParam" &&
|
|
205
|
+
clientParamName !== "credential" &&
|
|
206
|
+
clientParamName !== "endpoint" &&
|
|
207
|
+
!requiredParamNames.has(clientParamName) // Avoid duplicating required parameters
|
|
208
|
+
);
|
|
209
|
+
});
|
|
210
|
+
// Build context params, checking if param was already assigned as a required param
|
|
211
|
+
const allContextParams = [
|
|
212
|
+
...contextRequiredParam.map((p) => p.name),
|
|
213
|
+
...contextOptionalParams.map((p) => {
|
|
214
|
+
const clientParamName = getClientParameterName(p);
|
|
215
|
+
// If this param was already assigned (e.g., as a required param or in endpoint building), use the value directly
|
|
216
|
+
// Otherwise, get it from options
|
|
217
|
+
if (requiredParamNames.has(clientParamName) ||
|
|
218
|
+
(assignedOptionalParams && assignedOptionalParams.has(clientParamName))) {
|
|
219
|
+
return clientParamName;
|
|
220
|
+
}
|
|
221
|
+
return `${clientParamName}: options.${clientParamName}`;
|
|
222
|
+
}),
|
|
223
|
+
];
|
|
224
|
+
if (allContextParams.length) {
|
|
225
|
+
factoryFunction.addStatements(`return { ...clientContext, ${allContextParams.join(", ")}} as ${rlcClientName};`);
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
factoryFunction.addStatements(`return clientContext;`);
|
|
229
|
+
}
|
|
230
|
+
clientContextFile.fixMissingImports({}, { importModuleSpecifierEnding: "js" });
|
|
231
|
+
clientContextFile.fixUnusedIdentifiers();
|
|
232
|
+
return clientContextFile;
|
|
233
|
+
}
|
|
234
|
+
function getDocsWithKnownVersion(dpgContext, param) {
|
|
235
|
+
const docs = getDocsFromDescription(param.doc);
|
|
236
|
+
if (param.name.toLowerCase() !== "apiversion") {
|
|
237
|
+
return docs;
|
|
238
|
+
}
|
|
239
|
+
const apiVersionEnum = getApiVersionEnum(dpgContext);
|
|
240
|
+
if (apiVersionEnum) {
|
|
241
|
+
const [_, knownValuesEnum] = buildEnumTypes(dpgContext, apiVersionEnum, true);
|
|
242
|
+
docs.push(`Known values of {@link ${resolveReference(refkey(knownValuesEnum.name, "knownValues"))}} that the service accepts.`);
|
|
243
|
+
}
|
|
244
|
+
return docs;
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=build-client-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-client-context.js","sourceRoot":"","sources":["../../../src/modular/build-client-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AAWrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EA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0B,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,6BAA6B,CACrH,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SdkContext } from "../utils/interfaces.js";
|
|
2
|
+
import { ModularEmitterOptions } from "./interfaces.js";
|
|
3
|
+
export declare function transformModularEmitterOptions(dpgContext: SdkContext, modularSourcesRoot: string, options?: {
|
|
4
|
+
casing: "snake" | "camel";
|
|
5
|
+
}): ModularEmitterOptions;
|
|
6
|
+
//# sourceMappingURL=build-modular-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-modular-options.d.ts","sourceRoot":"","sources":["../../../src/modular/build-modular-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,MAAM,EAC1B,OAAO,GAAE;IAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAA;CAAwB,GAC3D,qBAAqB,CAYvB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
let CASING = "snake";
|
|
2
|
+
export function transformModularEmitterOptions(dpgContext, modularSourcesRoot, options = { casing: "snake" }) {
|
|
3
|
+
CASING = options.casing ?? CASING;
|
|
4
|
+
const emitterOptions = {
|
|
5
|
+
options: dpgContext.rlcOptions ?? {},
|
|
6
|
+
modularOptions: {
|
|
7
|
+
sourceRoot: modularSourcesRoot,
|
|
8
|
+
compatibilityMode: !!dpgContext.rlcOptions?.compatibilityMode,
|
|
9
|
+
experimentalExtensibleEnums: !!dpgContext.rlcOptions?.experimentalExtensibleEnums,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
return emitterOptions;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=build-modular-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-modular-options.js","sourceRoot":"","sources":["../../../src/modular/build-modular-options.ts"],"names":[],"mappings":"AAGA,IAAI,MAAM,GAAsB,OAAO,CAAC;AAExC,MAAM,UAAU,8BAA8B,CAC5C,UAAsB,EACtB,kBAA0B,EAC1B,UAAyC,EAAE,MAAM,EAAE,OAAO,EAAE;IAE5D,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC;IAClC,MAAM,cAAc,GAA0B;QAC5C,OAAO,EAAE,UAAU,CAAC,UAAU,IAAI,EAAE;QACpC,cAAc,EAAE;YACd,UAAU,EAAE,kBAAkB;YAC9B,iBAAiB,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,EAAE,iBAAiB;YAC7D,2BAA2B,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,EAAE,2BAA2B;SAClF;KACF,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SourceFile } from "ts-morph";
|
|
2
|
+
import { ModularEmitterOptions } from "./interfaces.js";
|
|
3
|
+
import { SdkClientType, SdkServiceOperation } from "@azure-tools/typespec-client-generator-core";
|
|
4
|
+
import { SdkContext } from "../utils/interfaces.js";
|
|
5
|
+
import { ServiceOperation } from "../utils/operation-util.js";
|
|
6
|
+
import { OperationPathAndDeserDetails } from "./interfaces.js";
|
|
7
|
+
/**
|
|
8
|
+
* This function creates a file under /api for each operation group.
|
|
9
|
+
* If there is no operation group in the TypeSpec program, we create a single
|
|
10
|
+
* file called operations.ts where all operations are generated.
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildOperationFiles(dpgContext: SdkContext, clientMap: [string[], SdkClientType<SdkServiceOperation>], emitterOptions: ModularEmitterOptions): SourceFile[];
|
|
13
|
+
/**
|
|
14
|
+
* This function generates the interfaces for each operation options
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildOperationOptions(context: SdkContext, method: [string[], ServiceOperation], sourceFile: SourceFile): void;
|
|
17
|
+
/**
|
|
18
|
+
* This function creates a map of operation file path to operation names.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildLroDeserDetailMap(context: SdkContext, client: SdkClientType<SdkServiceOperation>): Map<string, OperationPathAndDeserDetails[]>;
|
|
21
|
+
//# sourceMappingURL=build-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-operations.d.ts","sourceRoot":"","sources":["../../../src/modular/build-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,UAAU,EAAiB,MAAM,UAAU,CAAC;AAapF,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EACL,aAAa,EAEb,mBAAmB,EACpB,MAAM,6CAA6C,CAAC;AAOrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAGL,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAG/D;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,EACzD,cAAc,EAAE,qBAAqB,gBAmEtC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,gBAAgB,CAAC,EACpC,UAAU,EAAE,UAAU,QAyEvB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,+CA+C3C"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { StructureKind } from "ts-morph";
|
|
2
|
+
import { NameType, normalizeName } from "../rlc-common/index.js";
|
|
3
|
+
import { getDeserializeExceptionHeadersPrivateFunction, getDeserializeHeadersPrivateFunction, getDeserializePrivateFunction, getExpectedStatuses, getOperationFunction, getOperationOptionsName, getSendPrivateFunction, isLroAndPagingOperation, isLroOnlyOperation, } from "./helpers/operation-helpers.js";
|
|
4
|
+
import { useContext } from "../context-manager.js";
|
|
5
|
+
import { addDeclaration } from "../framework/declaration.js";
|
|
6
|
+
import { useDependencies } from "../framework/hooks/use-dependencies.js";
|
|
7
|
+
import { resolveReference } from "../framework/reference.js";
|
|
8
|
+
import { refkey } from "../framework/refkey.js";
|
|
9
|
+
import { getModularClientOptions, isRLCMultiEndpoint } from "../utils/client-utils.js";
|
|
10
|
+
import { getMethodHierarchiesMap, hasDualFormatSupport, } from "../utils/operation-util.js";
|
|
11
|
+
import { getDocsFromDescription } from "./helpers/docs-helpers.js";
|
|
12
|
+
import { getOperationName } from "./helpers/naming-helpers.js";
|
|
13
|
+
import { getTypeExpression } from "./type-expressions/get-type-expression.js";
|
|
14
|
+
/**
|
|
15
|
+
* This function creates a file under /api for each operation group.
|
|
16
|
+
* If there is no operation group in the TypeSpec program, we create a single
|
|
17
|
+
* file called operations.ts where all operations are generated.
|
|
18
|
+
*/
|
|
19
|
+
export function buildOperationFiles(dpgContext, clientMap, emitterOptions) {
|
|
20
|
+
const project = useContext("outputProject");
|
|
21
|
+
const [_, client] = clientMap;
|
|
22
|
+
const operationFiles = new Set();
|
|
23
|
+
const { subfolder, rlcClientName } = getModularClientOptions(clientMap);
|
|
24
|
+
const isMultiEndpoint = isRLCMultiEndpoint(dpgContext);
|
|
25
|
+
const clientType = isMultiEndpoint ? `Client.${rlcClientName}` : "Client";
|
|
26
|
+
const methodMap = getMethodHierarchiesMap(dpgContext, client);
|
|
27
|
+
for (const [prefixKey, operations] of methodMap) {
|
|
28
|
+
const prefixes = prefixKey.split("/");
|
|
29
|
+
const operationFileName = prefixes.length > 0 && prefixKey !== ""
|
|
30
|
+
? `${prefixes
|
|
31
|
+
.map((hierarchy) => {
|
|
32
|
+
return normalizeName(hierarchy, NameType.File);
|
|
33
|
+
})
|
|
34
|
+
.join("/")}/operations`
|
|
35
|
+
: // When the program has no operation groups defined all operations are put
|
|
36
|
+
// into a nameless operation group. We'll call this operations.
|
|
37
|
+
"operations";
|
|
38
|
+
const srcPath = emitterOptions.modularOptions.sourceRoot;
|
|
39
|
+
const filepath = `${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}api/${operationFileName}.ts`;
|
|
40
|
+
const operationGroupFile = project.createSourceFile(filepath);
|
|
41
|
+
operations.forEach((op) => {
|
|
42
|
+
const operationDeclaration = getOperationFunction(dpgContext, [prefixes, op], clientType);
|
|
43
|
+
const sendOperationDeclaration = getSendPrivateFunction(dpgContext, [prefixes, op], clientType, client);
|
|
44
|
+
const deserializeOperationDeclaration = getDeserializePrivateFunction(dpgContext, [
|
|
45
|
+
prefixes,
|
|
46
|
+
op,
|
|
47
|
+
]);
|
|
48
|
+
const deserializeHeadersDeclaration = getDeserializeHeadersPrivateFunction(dpgContext, op);
|
|
49
|
+
const deserializeExceptionHeadersDeclaration = getDeserializeExceptionHeadersPrivateFunction(dpgContext, op);
|
|
50
|
+
const functionsToAdd = [sendOperationDeclaration, deserializeOperationDeclaration];
|
|
51
|
+
if (deserializeHeadersDeclaration) {
|
|
52
|
+
functionsToAdd.push(deserializeHeadersDeclaration);
|
|
53
|
+
}
|
|
54
|
+
if (deserializeExceptionHeadersDeclaration) {
|
|
55
|
+
functionsToAdd.push(deserializeExceptionHeadersDeclaration);
|
|
56
|
+
}
|
|
57
|
+
operationGroupFile.addFunctions(functionsToAdd);
|
|
58
|
+
addDeclaration(operationGroupFile, operationDeclaration, refkey(op, "api"));
|
|
59
|
+
});
|
|
60
|
+
const indexPathPrefix = "../".repeat(prefixKey === "" ? 0 : prefixes.length) || "./";
|
|
61
|
+
operationGroupFile.addImportDeclaration({
|
|
62
|
+
namedImports: [`${rlcClientName} as Client`],
|
|
63
|
+
moduleSpecifier: `${indexPathPrefix}index.js`,
|
|
64
|
+
});
|
|
65
|
+
operationGroupFile.fixUnusedIdentifiers();
|
|
66
|
+
operationFiles.add(operationGroupFile);
|
|
67
|
+
}
|
|
68
|
+
return Array.from(operationFiles);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* This function generates the interfaces for each operation options
|
|
72
|
+
*/
|
|
73
|
+
export function buildOperationOptions(context, method, sourceFile) {
|
|
74
|
+
const dependencies = useDependencies();
|
|
75
|
+
const operation = method[1];
|
|
76
|
+
const optionalParameters = operation.parameters
|
|
77
|
+
.filter((p) => p.onClient === false &&
|
|
78
|
+
!(p.isGeneratedName && (p.name === "contentType" || p.name !== "accept")))
|
|
79
|
+
.filter((p) => p.optional || p.clientDefaultValue);
|
|
80
|
+
const options = [...optionalParameters];
|
|
81
|
+
const name = getOperationOptionsName(method, true);
|
|
82
|
+
const lroOptions = {
|
|
83
|
+
name: "updateIntervalInMs",
|
|
84
|
+
type: "number",
|
|
85
|
+
hasQuestionToken: true,
|
|
86
|
+
docs: ["Delay to wait until next poll, in milliseconds."],
|
|
87
|
+
};
|
|
88
|
+
// Check if this operation supports both JSON and XML content types
|
|
89
|
+
const bodyContentTypes = operation.operation.bodyParam?.contentTypes ?? [];
|
|
90
|
+
const isDualFormat = hasDualFormatSupport(bodyContentTypes);
|
|
91
|
+
// Content type option for dual-format operations
|
|
92
|
+
const contentTypeOption = {
|
|
93
|
+
name: "contentType",
|
|
94
|
+
type: "string",
|
|
95
|
+
hasQuestionToken: true,
|
|
96
|
+
docs: [
|
|
97
|
+
'The content type for the request body. Defaults to "application/json". Use "application/xml" for XML serialization.',
|
|
98
|
+
],
|
|
99
|
+
};
|
|
100
|
+
// handle optional body parameter
|
|
101
|
+
// if (operation.operation.bodyParam?.optional === true) {
|
|
102
|
+
// options.push(operation.operation.bodyParam);
|
|
103
|
+
// }
|
|
104
|
+
const operationOptionsReference = resolveReference(dependencies.OperationOptions);
|
|
105
|
+
// Build the additional options array
|
|
106
|
+
const additionalOptions = [];
|
|
107
|
+
if (isLroOnlyOperation(operation) || isLroAndPagingOperation(operation)) {
|
|
108
|
+
additionalOptions.push(lroOptions);
|
|
109
|
+
}
|
|
110
|
+
if (isDualFormat) {
|
|
111
|
+
additionalOptions.push(contentTypeOption);
|
|
112
|
+
}
|
|
113
|
+
const operationOptionsInterface = {
|
|
114
|
+
kind: StructureKind.Interface,
|
|
115
|
+
name,
|
|
116
|
+
isExported: true,
|
|
117
|
+
extends: [operationOptionsReference],
|
|
118
|
+
properties: additionalOptions.concat(options.map((p) => {
|
|
119
|
+
return {
|
|
120
|
+
docs: getDocsFromDescription(p.doc),
|
|
121
|
+
hasQuestionToken: true,
|
|
122
|
+
type: getTypeExpression(context, p.type, { isOptional: true }),
|
|
123
|
+
name: normalizeName(p.name, NameType.Parameter),
|
|
124
|
+
};
|
|
125
|
+
})),
|
|
126
|
+
docs: [`Optional parameters.`],
|
|
127
|
+
};
|
|
128
|
+
addDeclaration(sourceFile, operationOptionsInterface, refkey(method[1], "operationOptions"));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* This function creates a map of operation file path to operation names.
|
|
132
|
+
*/
|
|
133
|
+
export function buildLroDeserDetailMap(context, client) {
|
|
134
|
+
const map = new Map();
|
|
135
|
+
const existingNames = new Set();
|
|
136
|
+
const methodMap = getMethodHierarchiesMap(context, client);
|
|
137
|
+
for (const [prefixKey, operations] of methodMap) {
|
|
138
|
+
const prefixes = prefixKey.split("/");
|
|
139
|
+
const lroOperations = operations.filter((o) => isLroOnlyOperation(o));
|
|
140
|
+
// skip this operation group if it has no LRO operations
|
|
141
|
+
if (lroOperations.length === 0) {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
const operationFileName = prefixes.length > 0 && prefixKey !== ""
|
|
145
|
+
? `${prefixes
|
|
146
|
+
.map((hierarchy) => {
|
|
147
|
+
return normalizeName(hierarchy, NameType.File);
|
|
148
|
+
})
|
|
149
|
+
.join("/")}/operations`
|
|
150
|
+
: // When the program has no operation groups defined all operations are put
|
|
151
|
+
// into a nameless operation group. We'll call this operations.
|
|
152
|
+
"operations";
|
|
153
|
+
map.set(`./api/${operationFileName}.js`, lroOperations.map((o) => {
|
|
154
|
+
const { name } = getOperationName(o);
|
|
155
|
+
const deserName = `_${name}Deserialize`;
|
|
156
|
+
let renamedDeserName = undefined;
|
|
157
|
+
if (existingNames.has(deserName)) {
|
|
158
|
+
const newName = `${name}Deserialize${normalizeName(operationFileName.split("/").slice(0, -1).join("_"), NameType.Interface)}`;
|
|
159
|
+
renamedDeserName = `_${newName}`;
|
|
160
|
+
}
|
|
161
|
+
existingNames.add(deserName);
|
|
162
|
+
return {
|
|
163
|
+
path: `${o.operation.verb.toUpperCase()} ${o.operation.path}`,
|
|
164
|
+
expectedStatusesExpression: getExpectedStatuses(o),
|
|
165
|
+
deserName,
|
|
166
|
+
renamedDeserName,
|
|
167
|
+
};
|
|
168
|
+
}));
|
|
169
|
+
}
|
|
170
|
+
return map;
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=build-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-operations.js","sourceRoot":"","sources":["../../../src/modular/build-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,aAAa,EAAE,MAAM,UAAU,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,6CAA6C,EAC7C,oCAAoC,EACpC,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAQxC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,w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-files.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AA4ExD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,qBAAqB,OAW1F"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { NameType } from "../rlc-common/index.js";
|
|
2
|
+
import { getRelativePathFromDirectory, joinPaths } from "@typespec/compiler";
|
|
3
|
+
import { useContext } from "../context-manager.js";
|
|
4
|
+
import { getClientHierarchyMap, getModularClientOptions } from "../utils/client-utils.js";
|
|
5
|
+
import { getMethodHierarchiesMap } from "../utils/operation-util.js";
|
|
6
|
+
import { getClassicalLayerPrefix } from "./helpers/naming-helpers.js";
|
|
7
|
+
/**
|
|
8
|
+
* Computes the relative path prefix (e.g. `./src` or `./src/generated`) from
|
|
9
|
+
* the project root to the modular sources directory. This prefix is used when
|
|
10
|
+
* building export map entries so that they always point to the correct folder
|
|
11
|
+
* even when the generated code lives under `src/generated` instead of `src`.
|
|
12
|
+
*/
|
|
13
|
+
function getSourceRootPrefix(emitterOptions, context) {
|
|
14
|
+
const sourceRoot = emitterOptions.modularOptions.sourceRoot.replace(/\\/g, "/");
|
|
15
|
+
const rootDir = (context.generationPathDetail?.rootDir ?? "").replace(/\\/g, "/");
|
|
16
|
+
if (rootDir && sourceRoot.startsWith(rootDir)) {
|
|
17
|
+
const relativePath = getRelativePathFromDirectory(rootDir, sourceRoot, false).replace(/\\/g, "/");
|
|
18
|
+
return `./${relativePath}`;
|
|
19
|
+
}
|
|
20
|
+
return "./src";
|
|
21
|
+
}
|
|
22
|
+
function buildExportsForMultiClient(context, emitterOptions, packageInfo) {
|
|
23
|
+
const srcPrefix = getSourceRootPrefix(emitterOptions, context);
|
|
24
|
+
const clientMap = getClientHierarchyMap(context);
|
|
25
|
+
let hasTopLevelClient = false;
|
|
26
|
+
for (const [hierarchy, client] of clientMap) {
|
|
27
|
+
const methodMap = getMethodHierarchiesMap(context, client);
|
|
28
|
+
if (hierarchy.length === 0) {
|
|
29
|
+
hasTopLevelClient = true;
|
|
30
|
+
}
|
|
31
|
+
const { subfolder } = getModularClientOptions([hierarchy, client]);
|
|
32
|
+
if (subfolder !== "" && methodMap.size > 0) {
|
|
33
|
+
packageInfo.exports[`./${subfolder}`] = `${srcPrefix}/${subfolder}/index.ts`;
|
|
34
|
+
packageInfo.exports[`./${subfolder}/api`] = `${srcPrefix}/${subfolder}/api/index.ts`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!hasTopLevelClient) {
|
|
38
|
+
delete packageInfo.exports["./api"];
|
|
39
|
+
}
|
|
40
|
+
if (emitterOptions.options.hierarchyClient) {
|
|
41
|
+
// TODO: support api subpath exports for multi-service. Skip for now. https://github.com/Azure/autorest.typescript/issues/3717
|
|
42
|
+
if (!emitterOptions.options.isMultiService) {
|
|
43
|
+
for (const flattenedClient of clientMap) {
|
|
44
|
+
const { subfolder } = getModularClientOptions(flattenedClient);
|
|
45
|
+
const client = flattenedClient[1];
|
|
46
|
+
const methodMap = getMethodHierarchiesMap(context, client);
|
|
47
|
+
for (const [prefixKey, _] of methodMap) {
|
|
48
|
+
const prefixes = prefixKey.split("/");
|
|
49
|
+
if (prefixKey === "") {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const subApiPath = `api/${getClassicalLayerPrefix(prefixes, NameType.File, "/")}`;
|
|
53
|
+
packageInfo.exports[`./${subfolder ? subfolder + "/" : ""}${subApiPath}`] =
|
|
54
|
+
`${srcPrefix}/${subfolder ? subfolder + "/" : ""}${subApiPath}/index.ts`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
delete packageInfo.exports["./models"];
|
|
59
|
+
const modelSubpaths = getModelSubpaths(emitterOptions);
|
|
60
|
+
for (const modelSubpath of modelSubpaths) {
|
|
61
|
+
packageInfo.exports[`./${modelSubpath.replace("/index.ts", "")}`] =
|
|
62
|
+
`${srcPrefix}/${modelSubpath}`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return packageInfo.exports;
|
|
66
|
+
}
|
|
67
|
+
export function getModuleExports(context, emitterOptions) {
|
|
68
|
+
const srcPrefix = getSourceRootPrefix(emitterOptions, context);
|
|
69
|
+
const exports = {
|
|
70
|
+
exports: {
|
|
71
|
+
".": `${srcPrefix}/index.ts`,
|
|
72
|
+
"./models": `${srcPrefix}/models/index.ts`,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
exports["exports"]["./api"] = `${srcPrefix}/api/index.ts`;
|
|
76
|
+
return buildExportsForMultiClient(context, emitterOptions, exports);
|
|
77
|
+
}
|
|
78
|
+
function getModelSubpaths(emitterOptions) {
|
|
79
|
+
const outputProject = useContext("outputProject");
|
|
80
|
+
const modelFiles = outputProject.getSourceFiles(joinPaths(emitterOptions.modularOptions.sourceRoot.replace(/\\/g, "/"), `models/**/*.ts`));
|
|
81
|
+
const subpath = new Set();
|
|
82
|
+
for (const modelFile of modelFiles) {
|
|
83
|
+
const filepath = modelFile.getFilePath().replace(/\\/g, "/");
|
|
84
|
+
if (!filepath.endsWith("index.ts")) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
subpath.add(getRelativePathFromDirectory(emitterOptions.modularOptions.sourceRoot.replace(/\\/g, "/"), filepath, false));
|
|
88
|
+
}
|
|
89
|
+
return Array.from(subpath);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=build-project-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-project-files.js","sourceRoot":"","sources":["../../../src/modular/build-project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,4BAA4B,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,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,GAAG,CAAC,EAAE,gBAAgB,CAAC,CAC1F,CAAC;IACF,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC7D,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YACnC,SAAS;QACX,CAAC;QACD,OAAO,CAAC,GAAG,CACT,4BAA4B,CAC1B,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAC5D,QAAQ,EACR,KAAK,CACN,CACF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SdkClientType, SdkServiceOperation } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import { SdkContext } from "../utils/interfaces.js";
|
|
3
|
+
import { ModularEmitterOptions } from "./interfaces.js";
|
|
4
|
+
export declare function buildRestorePoller(context: SdkContext, clientMap: [string[], SdkClientType<SdkServiceOperation>], emitterOptions: ModularEmitterOptions): void;
|
|
5
|
+
//# sourceMappingURL=build-restore-poller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-restore-poller.d.ts","sourceRoot":"","sources":["../../../src/modular/build-restore-poller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAQjG,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,EACzD,cAAc,EAAE,qBAAqB,QAsLtC"}
|