diff --git a/.pnp.cjs b/.pnp.cjs index 976729bba64..a7abb7b1bee 100644 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -8355,10 +8355,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@fern-fern/snippet-sdk", [\ - ["npm:0.0.5434", {\ - "packageLocation": "./.yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5434-f14c3d5dcf-dbc9addde9.zip/node_modules/@fern-fern/snippet-sdk/",\ + ["npm:0.0.5492", {\ + "packageLocation": "./.yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5492-72fc6421da-dccf0d1e18.zip/node_modules/@fern-fern/snippet-sdk/",\ "packageDependencies": [\ - ["@fern-fern/snippet-sdk", "npm:0.0.5434"],\ + ["@fern-fern/snippet-sdk", "npm:0.0.5492"],\ ["form-data", "npm:4.0.0"],\ ["js-base64", "npm:3.7.2"],\ ["node-fetch", "virtual:25958c3cdea01727abe9184cd62ebdcb7f32f5bd5b1d13e8a0e1d5080a9e9f7be886906e1af797d4fcc43965772a072bf87bbcb6b0a29bf8dd97020f3fa1ccf2#npm:2.7.0"],\ @@ -9028,7 +9028,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@fern-fern/generator-cli-sdk", "npm:0.0.25"],\ ["@fern-fern/generator-exec-sdk", "npm:0.0.879"],\ ["@fern-fern/ir-sdk", "npm:0.0.3515"],\ - ["@fern-fern/snippet-sdk", "npm:0.0.5434"],\ + ["@fern-fern/snippet-sdk", "npm:0.0.5492"],\ ["@fern-typescript/commons", "workspace:generators/typescript/utils/commons"],\ ["@fern-typescript/contexts", "workspace:generators/typescript/utils/contexts"],\ ["@fern-typescript/endpoint-error-union-generator", "workspace:generators/typescript/sdk/endpoint-error-union-generator"],\ diff --git a/.yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5434-f14c3d5dcf-dbc9addde9.zip b/.yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5492-72fc6421da-dccf0d1e18.zip similarity index 85% rename from .yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5434-f14c3d5dcf-dbc9addde9.zip rename to .yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5492-72fc6421da-dccf0d1e18.zip index eff23848ecc..9e0b904cfe9 100644 Binary files a/.yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5434-f14c3d5dcf-dbc9addde9.zip and b/.yarn/cache/@fern-fern-snippet-sdk-npm-0.0.5492-72fc6421da-dccf0d1e18.zip differ diff --git a/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.13.0-3f49f23698-8.zip b/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.13.0-3f49f23698-8.zip deleted file mode 100644 index 2f1dd185043..00000000000 Binary files a/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.13.0-3f49f23698-8.zip and /dev/null differ diff --git a/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.14.1-e385ba3464-8.zip b/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.14.1-e385ba3464-8.zip deleted file mode 100644 index a2cdc22a135..00000000000 Binary files a/.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.14.1-e385ba3464-8.zip and /dev/null differ diff --git a/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.13.0-834923f1a9-8.zip b/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.13.0-834923f1a9-8.zip deleted file mode 100644 index 4a1e1d8e3fc..00000000000 Binary files a/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.13.0-834923f1a9-8.zip and /dev/null differ diff --git a/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.14.1-3b808993c8-8.zip b/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.14.1-3b808993c8-8.zip deleted file mode 100644 index 6ec597e40f1..00000000000 Binary files a/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.14.1-3b808993c8-8.zip and /dev/null differ diff --git a/generators/python/poetry.lock b/generators/python/poetry.lock index f98f760cc4a..248bcf0dda1 100644 --- a/generators/python/poetry.lock +++ b/generators/python/poetry.lock @@ -1,14 +1,14 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "anyio" -version = "4.3.0" +version = "4.4.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" files = [ - {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, - {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, + {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"}, + {file = "anyio-4.4.0.tar.gz", hash = "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94"}, ] [package.dependencies] @@ -70,13 +70,13 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.6.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, + {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, ] [[package]] @@ -171,13 +171,13 @@ wasmer-compiler-cranelift = ">=1.0.0" [[package]] name = "fern-fern-fdr-sdk" -version = "0.0.5435" +version = "0.0.5496" description = "" optional = false python-versions = ">=3.8,<4.0" files = [ - {file = "fern_fern_fdr_sdk-0.0.5435-py3-none-any.whl", hash = "sha256:7701cf64469a8989dc769f419b6ec341bbd992f43584a4007c85f9fcca785e3b"}, - {file = "fern_fern_fdr_sdk-0.0.5435.tar.gz", hash = "sha256:dd57c2ea1c4c8beb2288d3447f1e9a66b24de9c915fa0e28d9c3f25d317f599a"}, + {file = "fern_fern_fdr_sdk-0.0.5496-py3-none-any.whl", hash = "sha256:0b28e19344c731e6293fad69f53b42ee79202a2a1a6a0d72ba84810caca84659"}, + {file = "fern_fern_fdr_sdk-0.0.5496.tar.gz", hash = "sha256:502a49e2f788b29e2271189d4c9f9e4eadd7c0d85e5ac0077072ee8bee37f1d3"}, ] [package.dependencies] @@ -233,18 +233,18 @@ reference = "fern-prod" [[package]] name = "filelock" -version = "3.14.0" +version = "3.15.1" description = "A platform independent file lock." optional = false python-versions = ">=3.8" files = [ - {file = "filelock-3.14.0-py3-none-any.whl", hash = "sha256:43339835842f110ca7ae60f1e1c160714c5a6afd15a2873419ab185334975c0f"}, - {file = "filelock-3.14.0.tar.gz", hash = "sha256:6ea72da3be9b8c82afd3edcf99f2fffbb5076335a5ae4d03248bb5b6c3eae78a"}, + {file = "filelock-3.15.1-py3-none-any.whl", hash = "sha256:71b3102950e91dfc1bb4209b64be4dc8854f40e5f534428d8684f953ac847fac"}, + {file = "filelock-3.15.1.tar.gz", hash = "sha256:58a2549afdf9e02e10720eaa4d4470f56386d7a6f72edd7d0596337af8ed7ad8"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] typing = ["typing-extensions (>=4.8)"] [[package]] @@ -434,18 +434,15 @@ files = [ [[package]] name = "nodeenv" -version = "1.8.0" +version = "1.9.1" description = "Node.js virtual environment builder" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ - {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, - {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, + {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, + {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, ] -[package.dependencies] -setuptools = "*" - [[package]] name = "ordered-set" version = "4.1.0" @@ -462,13 +459,13 @@ dev = ["black", "mypy", "pytest"] [[package]] name = "packaging" -version = "24.0" +version = "24.1" description = "Core utilities for Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, - {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] @@ -643,17 +640,17 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no [[package]] name = "pytest-only" -version = "2.1.1" +version = "2.1.2" description = "Use @pytest.mark.only to run a single test" optional = false -python-versions = ">=3.7.2,<4" +python-versions = "<4.0,>=3.8" files = [ - {file = "pytest_only-2.1.1-py3-none-any.whl", hash = "sha256:1bb74ae95ac44366da85ccf7da0815f11ae0bb0d07754d0def7f14584ead5988"}, - {file = "pytest_only-2.1.1.tar.gz", hash = "sha256:d417e8d9f962fc772b7e130ab2319fe056f9191ff555fc178f4b66d6a18e248c"}, + {file = "pytest_only-2.1.2-py3-none-any.whl", hash = "sha256:04dffe2aed64a741145ce5ad25b5df3ae4212e01ff885a8821fd2318eb509e91"}, + {file = "pytest_only-2.1.2.tar.gz", hash = "sha256:e341acc083e3bb66debc660b7d5d71ae3b31da5edc2a737280d7304221ab0c29"}, ] [package.dependencies] -pytest = {version = ">=7.1", markers = "python_version >= \"3.7\" and python_version < \"4.0\""} +pytest = ">=3.6.0,<9" [[package]] name = "pyyaml" @@ -750,22 +747,6 @@ pygments = ">=2.6.0,<3.0.0" [package.extras] jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] -[[package]] -name = "setuptools" -version = "69.5.1" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, - {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - [[package]] name = "shellingham" version = "1.5.4" @@ -959,4 +940,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "207d7db20275ca187cd0eac3ecf555c7dfb7ba7fd6121434e1d1cdc985e39d24" +content-hash = "1fcb37227b009d0f5dc48f403e7c84a0732bb61f6a70a1f1149f7e1c13c38e1d" diff --git a/generators/python/pyproject.toml b/generators/python/pyproject.toml index 8a67be507ef..497e3f8729e 100644 --- a/generators/python/pyproject.toml +++ b/generators/python/pyproject.toml @@ -10,7 +10,7 @@ pydantic = "^1.9.2,<=1.10.14" typer = {extras = ["all"], version = "^0.6.1"} fern-fern-generator-exec-sdk = {version = "0.0.846", source = "fern-prod"} ordered-set = "^4.1.0" -fern-fern-fdr-sdk = {version = "0.0.5435", source = "fern-prod"} +fern-fern-fdr-sdk = {version = "0.0.5496", source = "fern-prod"} fern-fern-ir-v39 = "^0.0.3473" [tool.poetry.dev-dependencies] diff --git a/generators/python/src/fern_python/generators/sdk/client_generator/client_generator.py b/generators/python/src/fern_python/generators/sdk/client_generator/client_generator.py index e80cc44596d..65cbb29668b 100644 --- a/generators/python/src/fern_python/generators/sdk/client_generator/client_generator.py +++ b/generators/python/src/fern_python/generators/sdk/client_generator/client_generator.py @@ -2,8 +2,6 @@ from dataclasses import dataclass from typing import List, Optional -import fern.ir.resources as ir_types - from fern_python.codegen import AST, SourceFile from fern_python.codegen.ast.nodes.code_writer.code_writer import CodeWriterFunction from fern_python.generators.sdk.client_generator.endpoint_response_code_writer import ( @@ -11,6 +9,8 @@ ) from fern_python.snippet import SnippetRegistry, SnippetWriter +import fern.ir.resources as ir_types + from ..context.sdk_generator_context import SdkGeneratorContext from .constants import DEFAULT_BODY_PARAMETER_VALUE from .endpoint_function_generator import EndpointFunctionGenerator @@ -93,7 +93,9 @@ def _create_class_declaration(self, *, is_async: bool) -> AST.ClassDeclaration: signature=AST.FunctionSignature( named_parameters=named_parameters, ), - body=AST.CodeWriter(self._get_write_constructor_body(is_async=is_async)), + body=AST.CodeWriter( + self._get_write_constructor_body(is_async=is_async) + ), ), ) @@ -122,23 +124,33 @@ def _create_class_declaration(self, *, is_async: bool) -> AST.ClassDeclaration: for snippet in generated_endpoint_function.snippets or []: if is_async: self._snippet_registry.register_async_client_endpoint_snippet( - endpoint=endpoint, expr=snippet.snippet, example_id=snippet.example_id + endpoint=endpoint, + expr=snippet.snippet, + example_id=snippet.example_id, ) else: self._snippet_registry.register_sync_client_endpoint_snippet( - endpoint=endpoint, expr=snippet.snippet, example_id=snippet.example_id + endpoint=endpoint, + expr=snippet.snippet, + example_id=snippet.example_id, ) return class_declaration - def _get_constructor_parameters(self, *, is_async: bool) -> List[ConstructorParameter]: + def _get_constructor_parameters( + self, *, is_async: bool + ) -> List[ConstructorParameter]: parameters: List[ConstructorParameter] = [] parameters.append( ConstructorParameter( constructor_parameter_name=self._get_client_wrapper_constructor_parameter_name(), private_member_name=self._get_client_wrapper_member_name(), - type_hint=AST.TypeHint(self._context.core_utilities.get_reference_to_client_wrapper(is_async=is_async)), + type_hint=AST.TypeHint( + self._context.core_utilities.get_reference_to_client_wrapper( + is_async=is_async + ) + ), ) ) @@ -152,20 +164,33 @@ def _write_constructor_body(writer: AST.NodeWriter) -> None: constructor_parameters = self._get_constructor_parameters(is_async=is_async) for param in constructor_parameters: if param.private_member_name is not None: - writer.write_line(f"self.{param.private_member_name} = {param.constructor_parameter_name}") + writer.write_line( + f"self.{param.private_member_name} = {param.constructor_parameter_name}" + ) for subpackage_id in self._package.subpackages: subpackage = self._context.ir.subpackages[subpackage_id] if subpackage.has_endpoints_in_tree: - writer.write_node(AST.Expression(f"self.{subpackage.name.snake_case.safe_name} = ")) + writer.write_node( + AST.Expression( + f"self.{subpackage.name.snake_case.safe_name} = " + ) + ) kwargs = [ - (param.constructor_parameter_name, AST.Expression(f"self.{param.private_member_name}")) + ( + param.constructor_parameter_name, + AST.Expression(f"self.{param.private_member_name}"), + ) for param in self._get_constructor_parameters(is_async=is_async) ] writer.write_node( AST.ClassInstantiation( - class_=self._context.get_reference_to_async_subpackage_service(subpackage_id) + class_=self._context.get_reference_to_async_subpackage_service( + subpackage_id + ) if is_async - else self._context.get_reference_to_subpackage_service(subpackage_id), + else self._context.get_reference_to_subpackage_service( + subpackage_id + ), kwargs=kwargs, ) ) diff --git a/generators/python/src/fern_python/generators/sdk/client_generator/generated_root_client.py b/generators/python/src/fern_python/generators/sdk/client_generator/generated_root_client.py index 0b20c29b412..532f5b23dd0 100644 --- a/generators/python/src/fern_python/generators/sdk/client_generator/generated_root_client.py +++ b/generators/python/src/fern_python/generators/sdk/client_generator/generated_root_client.py @@ -1,6 +1,7 @@ from dataclasses import dataclass from typing import List +from fdr import Template from fern_python.codegen import AST from fern_python.generators.sdk.core_utilities.client_wrapper_generator import ( ConstructorParameter, @@ -15,7 +16,7 @@ class RootClient: @dataclass class GeneratedRootClient: - async_instantiation: AST.Expression + async_instantiation_template: Template async_client: RootClient - sync_instantiation: AST.Expression + sync_instantiation_template: Template sync_client: RootClient diff --git a/generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py b/generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py index 17fc476228f..67d2e294814 100644 --- a/generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py +++ b/generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py @@ -2,8 +2,7 @@ from dataclasses import dataclass from typing import List, Optional -import fern.ir.resources as ir_types - +from fdr import GenericTemplate, Template from fern_python.codegen import AST, SourceFile from fern_python.codegen.ast.nodes.code_writer.code_writer import CodeWriterFunction from fern_python.external_dependencies import HttpX @@ -17,6 +16,8 @@ from fern_python.snippet import SnippetRegistry, SnippetWriter from fern_python.source_file_factory.source_file_factory import SourceFileFactory +import fern.ir.resources as ir_types + from ..context.sdk_generator_context import SdkGeneratorContext from ..environment_generators import ( GeneratedEnvironment, @@ -44,10 +45,14 @@ class RootClientGenerator: ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME = "environment" ENVIRONMENT_MEMBER_NAME = "_environment" - ENVIRONMENT_CONSTRUCTOR_PARAMETER_DOCS = "The environment to use for requests from the client." + ENVIRONMENT_CONSTRUCTOR_PARAMETER_DOCS = ( + "The environment to use for requests from the client." + ) BASE_URL_CONSTRUCTOR_PARAMETER_NAME = "base_url" - BASE_URL_CONSTRUCTOR_PARAMETER_DOCS = "The base url to use for requests from the client." + BASE_URL_CONSTRUCTOR_PARAMETER_DOCS = ( + "The base url to use for requests from the client." + ) BASE_URL_MEMBER_NAME = "_base_url" HTTPX_CLIENT_CONSTRUCTOR_PARAMETER_NAME = "httpx_client" @@ -66,6 +71,8 @@ def __init__( generated_environment: Optional[GeneratedEnvironment], class_name: str, async_class_name: str, + auth: Optional[ir_types.ApiAuth], + headers: List[ir_types.HttpHeader], snippet_registry: SnippetRegistry, snippet_writer: SnippetWriter, oauth_scheme: Optional[ir_types.OAuthScheme], @@ -74,6 +81,8 @@ def __init__( self._package = package self._class_name = class_name self._async_class_name = async_class_name + self._auth = auth + self._headers = headers self._is_default_body_parameter_used = False self._environments_config = self._context.ir.environments self._generated_environment = generated_environment @@ -87,17 +96,35 @@ def __init__( ) exclude_auth = self._oauth_scheme is not None - self._constructor_info = client_wrapper_generator._get_constructor_info(exclude_auth=exclude_auth) - self._root_client_constructor_params = self._constructor_info.constructor_parameters - if self._context.ir.environments is not None and self._context.ir.environments.default_environment is None: - environment_constructor_parameter = client_wrapper_generator._get_environment_constructor_parameter() - self._root_client_constructor_params.append(environment_constructor_parameter) + self._constructor_info = client_wrapper_generator._get_constructor_info( + exclude_auth=exclude_auth + ) + self._root_client_constructor_params = ( + self._constructor_info.constructor_parameters + ) + if ( + self._context.ir.environments is not None + and self._context.ir.environments.default_environment is None + ): + environment_constructor_parameter = ( + client_wrapper_generator._get_environment_constructor_parameter() + ) + self._root_client_constructor_params.append( + environment_constructor_parameter + ) elif self._context.ir.environments is None: - base_url_constructor_parameter = client_wrapper_generator._get_base_url_constructor_parameter() + base_url_constructor_parameter = ( + client_wrapper_generator._get_base_url_constructor_parameter() + ) self._root_client_constructor_params.append(base_url_constructor_parameter) - self._timeout_constructor_parameter_name = self._get_timeout_constructor_parameter_name( - [param.constructor_parameter_name for param in self._root_client_constructor_params] + self._timeout_constructor_parameter_name = ( + self._get_timeout_constructor_parameter_name( + [ + param.constructor_parameter_name + for param in self._root_client_constructor_params + ] + ) ) if self._oauth_scheme is not None: @@ -109,7 +136,7 @@ def __init__( constructor_parameter_name="client_id", type_hint=AST.TypeHint.str_(), private_member_name="client_id", - instantiation=AST.Expression(f'client_id="YOUR_CLIENT_ID"'), + instantiation=AST.Expression('client_id="YOUR_CLIENT_ID"'), ) ) if oauth.client_secret_env_var is None: @@ -118,7 +145,9 @@ def __init__( constructor_parameter_name="client_secret", type_hint=AST.TypeHint.str_(), private_member_name="client_secret", - instantiation=AST.Expression(f'client_secret="YOUR_CLIENT_SECRET"'), + instantiation=AST.Expression( + 'client_secret="YOUR_CLIENT_SECRET"' + ), ) ) self._root_client_constructor_params.append( @@ -126,13 +155,17 @@ def __init__( constructor_parameter_name=self.TOKEN_GETTER_PARAM_NAME, private_member_name=self.TOKEN_GETTER_PARAM_NAME, type_hint=AST.TypeHint.optional( - AST.TypeHint.callable(parameters=[], return_type=AST.TypeHint.str_()) + AST.TypeHint.callable( + parameters=[], return_type=AST.TypeHint.str_() + ) ), ) ) def generate(self, source_file: SourceFile) -> GeneratedRootClient: - exported_client_class_name = self._context.get_class_name_for_exported_root_client() + exported_client_class_name = ( + self._context.get_class_name_for_exported_root_client() + ) builder = RootClientGenerator.GeneratedRootClientBuilder( module_path=self._context.get_module_path_in_project( self._context.get_filepath_for_exported_root_client().to_module().path @@ -169,15 +202,22 @@ def generate(self, source_file: SourceFile) -> GeneratedRootClient: named_parameters=[ AST.NamedFunctionParameter( name=RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_NAME, - type_hint=AST.TypeHint.optional(AST.TypeHint.str_()), + type_hint=AST.TypeHint.optional( + AST.TypeHint.str_() + ), docs=RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_DOCS, ), AST.NamedFunctionParameter( name=RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME, - type_hint=AST.TypeHint(self._context.get_reference_to_environments_class()) - if self._environments_config.default_environment is not None + type_hint=AST.TypeHint( + self._context.get_reference_to_environments_class() + ) + if self._environments_config.default_environment + is not None else AST.TypeHint.optional( - AST.TypeHint(self._context.get_reference_to_environments_class()) + AST.TypeHint( + self._context.get_reference_to_environments_class() + ) ), docs="The environment to be used as the base url, can be used in lieu of 'base_url'.", ), @@ -215,7 +255,9 @@ def _create_class_declaration( snippet = SourceFileFactory.create_snippet() snippet.add_expression( - generated_root_client.async_instantiation if is_async else generated_root_client.sync_instantiation + generated_root_client.async_instantiation_template + if is_async + else generated_root_client.sync_instantiation_template ) class_declaration = AST.ClassDeclaration( name=self._async_class_name if is_async else self._class_name, @@ -260,16 +302,22 @@ def _create_class_declaration( for val in generated_endpoint_function.snippets or []: if is_async: self._snippet_registry.register_async_client_endpoint_snippet( - endpoint=endpoint, expr=val.snippet, example_id=val.example_id + endpoint=endpoint, + expr=val.snippet, + example_id=val.example_id, ) else: self._snippet_registry.register_sync_client_endpoint_snippet( - endpoint=endpoint, expr=val.snippet, example_id=val.example_id + endpoint=endpoint, + expr=val.snippet, + example_id=val.example_id, ) return class_declaration - def _get_constructor_parameters(self, *, is_async: bool) -> List[RootClientConstructorParameter]: + def _get_constructor_parameters( + self, *, is_async: bool + ) -> List[RootClientConstructorParameter]: parameters: List[RootClientConstructorParameter] = [] environments_config = self._context.ir.environments @@ -300,17 +348,21 @@ def _get_constructor_parameters(self, *, is_async: bool) -> List[RootClientConst AST.Expression( environments_config.environments.visit( single_base_url=lambda single_base_url_environments: SingleBaseUrlEnvironmentGenerator( - context=self._context, environments=single_base_url_environments + context=self._context, + environments=single_base_url_environments, ).get_reference_to_default_environment(), multiple_base_urls=lambda multiple_base_urls_environments: MultipleBaseUrlsEnvironmentGenerator( - context=self._context, environments=multiple_base_urls_environments + context=self._context, + environments=multiple_base_urls_environments, ).get_reference_to_default_environment(), ) ) if environments_config.default_environment is not None else None ) - environment_docs = f"{RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_DOCS}" + environment_docs = ( + f"{RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_DOCS}" + ) if default_environment is not None: snippet = SourceFileFactory.create_snippet() @@ -318,16 +370,26 @@ def write_default_environment(writer: AST.NodeWriter) -> None: writer.write("Defaults to ") writer.write_node(default_environment) # type: ignore - snippet.add_arbitrary_code(AST.CodeWriter(code_writer=write_default_environment)) + snippet.add_arbitrary_code( + AST.CodeWriter(code_writer=write_default_environment) + ) environment_docs += f" {snippet.to_str()}" parameters.append( RootClientConstructorParameter( constructor_parameter_name=RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME, - type_hint=AST.TypeHint(self._context.get_reference_to_environments_class()) + type_hint=AST.TypeHint( + self._context.get_reference_to_environments_class() + ) if environments_config.default_environment is not None - else AST.TypeHint.optional(AST.TypeHint(self._context.get_reference_to_environments_class())), + else AST.TypeHint.optional( + AST.TypeHint( + self._context.get_reference_to_environments_class() + ) + ), private_member_name=None, - initializer=default_environment if default_environment is not None else None, + initializer=default_environment + if default_environment is not None + else None, exclude_from_wrapper_construction=True, docs=environment_docs, ), @@ -338,17 +400,21 @@ def write_default_environment(writer: AST.NodeWriter) -> None: AST.Expression( environments_config.environments.visit( single_base_url=lambda single_base_url_environments: SingleBaseUrlEnvironmentGenerator( - context=self._context, environments=single_base_url_environments + context=self._context, + environments=single_base_url_environments, ).get_reference_to_default_environment(), multiple_base_urls=lambda multiple_base_urls_environments: MultipleBaseUrlsEnvironmentGenerator( - context=self._context, environments=multiple_base_urls_environments + context=self._context, + environments=multiple_base_urls_environments, ).get_reference_to_default_environment(), ) ) if environments_config.default_environment is not None else None ) - environment_docs = f"{RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_DOCS}" + environment_docs = ( + f"{RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_DOCS}" + ) if default_environment is not None: snippet = SourceFileFactory.create_snippet() @@ -356,16 +422,26 @@ def write_default_environment(writer: AST.NodeWriter) -> None: writer.write("Defaults to ") writer.write_node(default_environment) # type: ignore - snippet.add_arbitrary_code(AST.CodeWriter(code_writer=write_default_environment)) + snippet.add_arbitrary_code( + AST.CodeWriter(code_writer=write_default_environment) + ) environment_docs += f" {snippet.to_str()}" parameters.append( RootClientConstructorParameter( constructor_parameter_name=RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME, - type_hint=AST.TypeHint(self._context.get_reference_to_environments_class()) + type_hint=AST.TypeHint( + self._context.get_reference_to_environments_class() + ) if environments_config.default_environment is not None - else AST.TypeHint.optional(AST.TypeHint(self._context.get_reference_to_environments_class())), + else AST.TypeHint.optional( + AST.TypeHint( + self._context.get_reference_to_environments_class() + ) + ), private_member_name=None, - initializer=default_environment if default_environment is not None else None, + initializer=default_environment + if default_environment is not None + else None, docs=environment_docs, ), ) @@ -375,10 +451,15 @@ def write_default_environment(writer: AST.NodeWriter) -> None: generated_environment=self._generated_environment, ) exclude_auth = self._oauth_scheme is not None - for param in client_wrapper_generator._get_constructor_info(exclude_auth=exclude_auth).constructor_parameters: + for param in client_wrapper_generator._get_constructor_info( + exclude_auth=exclude_auth + ).constructor_parameters: parm_type_hint = param.type_hint add_validation = False - if param.environment_variable is not None and not param.type_hint.is_optional: + if ( + param.environment_variable is not None + and not param.type_hint.is_optional + ): add_validation = True parm_type_hint = AST.TypeHint.optional(parm_type_hint) parameters.append( @@ -388,7 +469,9 @@ def write_default_environment(writer: AST.NodeWriter) -> None: initializer=AST.Expression( AST.FunctionInvocation( function_definition=AST.Reference( - import_=AST.ReferenceImport(module=AST.Module.built_in(("os",))), + import_=AST.ReferenceImport( + module=AST.Module.built_in(("os",)) + ), qualified_name_excluding_import=("getenv",), ), args=[AST.Expression(f'"{param.environment_variable}"')], @@ -424,10 +507,16 @@ def write_default_environment(writer: AST.NodeWriter) -> None: initializer=AST.Expression( AST.FunctionInvocation( function_definition=AST.Reference( - import_=AST.ReferenceImport(module=AST.Module.built_in(("os",))), + import_=AST.ReferenceImport( + module=AST.Module.built_in(("os",)) + ), qualified_name_excluding_import=("getenv",), ), - args=[AST.Expression(f'"{oauth.client_id_env_var.get_as_str()}"')], + args=[ + AST.Expression( + f'"{oauth.client_id_env_var.get_as_str()}"' + ) + ], ) ) if oauth.client_id_env_var is not None @@ -457,10 +546,16 @@ def write_default_environment(writer: AST.NodeWriter) -> None: initializer=AST.Expression( AST.FunctionInvocation( function_definition=AST.Reference( - import_=AST.ReferenceImport(module=AST.Module.built_in(("os",))), + import_=AST.ReferenceImport( + module=AST.Module.built_in(("os",)) + ), qualified_name_excluding_import=("getenv",), ), - args=[AST.Expression(f'"{oauth.client_secret_env_var.get_as_str()}"')], + args=[ + AST.Expression( + f'"{oauth.client_secret_env_var.get_as_str()}"' + ) + ], ) ) if oauth.client_secret_env_var is not None @@ -473,7 +568,8 @@ def write_default_environment(writer: AST.NodeWriter) -> None: ) ) ) - if sec_add_validation and oauth.client_secret_env_var is not None + if sec_add_validation + and oauth.client_secret_env_var is not None else None, ), ) @@ -481,7 +577,9 @@ def write_default_environment(writer: AST.NodeWriter) -> None: RootClientConstructorParameter( constructor_parameter_name=self.TOKEN_GETTER_PARAM_NAME, type_hint=AST.TypeHint.optional( - AST.TypeHint.callable(parameters=[], return_type=AST.TypeHint.str_()) + AST.TypeHint.callable( + parameters=[], return_type=AST.TypeHint.str_() + ) ), initializer=AST.Expression("None"), ), @@ -533,7 +631,9 @@ def write_default_environment(writer: AST.NodeWriter) -> None: def _environment_is_enum(self) -> bool: return self._context.ir.environments is not None - def _get_paramter_validation_writer(self, *, param_name: str, environment_variable: str) -> CodeWriterFunction: + def _get_paramter_validation_writer( + self, *, param_name: str, environment_variable: str + ) -> CodeWriterFunction: def _write_parameter_validation(writer: AST.NodeWriter) -> None: writer.write_line(f"if {param_name} is None:") writer.indent() @@ -552,7 +652,10 @@ def _write_parameter_validation(writer: AST.NodeWriter) -> None: return _write_parameter_validation def _get_write_constructor_body( - self, *, is_async: bool, constructor_parameters: List[RootClientConstructorParameter] + self, + *, + is_async: bool, + constructor_parameters: List[RootClientConstructorParameter], ) -> CodeWriterFunction: def _write_constructor_body(writer: AST.NodeWriter) -> None: timeout_local_variable = "_defaulted_timeout" @@ -560,17 +663,25 @@ def _write_constructor_body(writer: AST.NodeWriter) -> None: writer.write_node( AST.Expression( AST.ConditionalExpression( - left=AST.Expression(f"{self._timeout_constructor_parameter_name}"), + left=AST.Expression( + f"{self._timeout_constructor_parameter_name}" + ), right=AST.ConditionalExpression( - left=AST.Expression(f"{self._context.custom_config.timeout_in_seconds}") - if isinstance(self._context.custom_config.timeout_in_seconds, int) + left=AST.Expression( + f"{self._context.custom_config.timeout_in_seconds}" + ) + if isinstance( + self._context.custom_config.timeout_in_seconds, int + ) else AST.Expression(AST.TypeHint.none()), right=AST.Expression("None"), test=AST.Expression( f"{RootClientGenerator.HTTPX_CLIENT_CONSTRUCTOR_PARAMETER_NAME} is None" ), ), - test=AST.Expression(f"{self._timeout_constructor_parameter_name} is not None"), + test=AST.Expression( + f"{self._timeout_constructor_parameter_name} is not None" + ), ), ), ) @@ -600,11 +711,11 @@ def _write_constructor_body(writer: AST.NodeWriter) -> None: kwargs=[ ( "client_id", - AST.Expression(f"client_id"), + AST.Expression("client_id"), ), ( "client_secret", - AST.Expression(f"client_secret"), + AST.Expression("client_secret"), ), ( "client_wrapper", @@ -630,11 +741,15 @@ def _write_constructor_body(writer: AST.NodeWriter) -> None: ) for param in self._get_constructor_parameters(is_async=is_async): if param.private_member_name is not None: - writer.write_line(f"self.{param.private_member_name} = {param.constructor_parameter_name}") + writer.write_line( + f"self.{param.private_member_name} = {param.constructor_parameter_name}" + ) writer.write(f"self.{self._get_client_wrapper_member_name()} = ") writer.write_node( AST.ClassInstantiation( - self._context.core_utilities.get_reference_to_client_wrapper(is_async=is_async), + self._context.core_utilities.get_reference_to_client_wrapper( + is_async=is_async + ), kwargs=client_wrapper_constructor_kwargs, ) ) @@ -642,26 +757,41 @@ def _write_constructor_body(writer: AST.NodeWriter) -> None: for subpackage_id in self._package.subpackages: subpackage = self._context.ir.subpackages[subpackage_id] if subpackage.has_endpoints_in_tree: - writer.write_node(AST.Expression(f"self.{subpackage.name.snake_case.safe_name} = ")) + writer.write_node( + AST.Expression( + f"self.{subpackage.name.snake_case.safe_name} = " + ) + ) client_wrapper_constructor_kwargs = [ - (param.constructor_parameter_name, AST.Expression(f"self.{param.constructor_parameter_name}")) + ( + param.constructor_parameter_name, + AST.Expression(f"self.{param.constructor_parameter_name}"), + ) for param in self._get_constructor_parameters(is_async=is_async) ] client_wrapper_constructor_kwargs.append( ( "client_wrapper", - AST.Expression(f"self.{self._get_client_wrapper_member_name()}"), + AST.Expression( + f"self.{self._get_client_wrapper_member_name()}" + ), ), ) writer.write_node( AST.ClassInstantiation( - class_=self._context.get_reference_to_async_subpackage_service(subpackage_id) + class_=self._context.get_reference_to_async_subpackage_service( + subpackage_id + ) if is_async - else self._context.get_reference_to_subpackage_service(subpackage_id), + else self._context.get_reference_to_subpackage_service( + subpackage_id + ), kwargs=[ ( "client_wrapper", - AST.Expression(f"self.{self._get_client_wrapper_member_name()}"), + AST.Expression( + f"self.{self._get_client_wrapper_member_name()}" + ), ), ], ) @@ -688,7 +818,9 @@ def _get_client_wrapper_kwargs( client_wrapper_constructor_kwargs.append( ( ClientWrapperGenerator.BASE_URL_PARAMETER_NAME, - AST.Expression(RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_NAME), + AST.Expression( + RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_NAME + ), ) ) elif environments_config.environments.get_as_union().type == "singleBaseUrl": @@ -704,7 +836,9 @@ def _get_client_wrapper_kwargs( client_wrapper_constructor_kwargs.append( ( ClientWrapperGenerator.ENVIRONMENT_PARAMETER_NAME, - AST.Expression(RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME), + AST.Expression( + RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME + ), ) ) @@ -743,7 +877,9 @@ def _get_client_wrapper_kwargs( ), ( "follow_redirects", - AST.Expression(f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME}"), + AST.Expression( + f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME}" + ), ), ], ), @@ -756,7 +892,9 @@ def _get_client_wrapper_kwargs( ), ], ), - test=AST.Expression(f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME} is not None"), + test=AST.Expression( + f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME} is not None" + ), ), ), ), @@ -767,7 +905,9 @@ def _get_client_wrapper_kwargs( ClientWrapperGenerator.HTTPX_CLIENT_MEMBER_NAME, AST.Expression( AST.ConditionalExpression( - left=AST.Expression(f"{RootClientGenerator.HTTPX_CLIENT_CONSTRUCTOR_PARAMETER_NAME}"), + left=AST.Expression( + f"{RootClientGenerator.HTTPX_CLIENT_CONSTRUCTOR_PARAMETER_NAME}" + ), right=AST.ConditionalExpression( left=AST.ClassInstantiation( HttpX.ASYNC_CLIENT if is_async else HttpX.CLIENT, @@ -778,7 +918,9 @@ def _get_client_wrapper_kwargs( ), ( "follow_redirects", - AST.Expression(f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME}"), + AST.Expression( + f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME}" + ), ), ], ), @@ -791,7 +933,9 @@ def _get_client_wrapper_kwargs( ), ], ), - test=AST.Expression(f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME} is not None"), + test=AST.Expression( + f"{self.FOLLOW_REDIRECTS_CONSTRUCTOR_PARAMETER_NAME} is not None" + ), ), test=AST.Expression( f"{RootClientGenerator.HTTPX_CLIENT_CONSTRUCTOR_PARAMETER_NAME} is not None" @@ -816,12 +960,20 @@ def _write_default_param(self, writer: AST.NodeWriter) -> None: writer.write_newline_if_last_line_not() def _write_get_base_url_function(self, writer: AST.NodeWriter) -> None: - writer.write_line(f"if {RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_NAME} is not None:") + writer.write_line( + f"if {RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_NAME} is not None:" + ) with writer.indent(): - writer.write_line(f"return {RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_NAME}") - writer.write_line(f"elif {RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME} is not None:") + writer.write_line( + f"return {RootClientGenerator.BASE_URL_CONSTRUCTOR_PARAMETER_NAME}" + ) + writer.write_line( + f"elif {RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME} is not None:" + ) with writer.indent(): - writer.write_line(f"return {RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME}.value") + writer.write_line( + f"return {RootClientGenerator.ENVIRONMENT_CONSTRUCTOR_PARAMETER_NAME}.value" + ) writer.write("else:") with writer.indent(): writer.write_line( @@ -857,10 +1009,12 @@ def __init__( self._module_path = module_path self._class_name = class_name self._async_class_name = async_class_name - self._consrtructor_parameters = constructor_parameters + self._constructor_parameters = constructor_parameters def build(self) -> GeneratedRootClient: - def client_snippet_writer(class_name: str) -> typing.Tuple[AST.ClassReference, CodeWriterFunction]: + def client_snippet_template( + class_name: str, + ) -> typing.Tuple[AST.ClassReference, Template]: client_class_reference = AST.ClassReference( qualified_name_excluding_import=(), import_=AST.ReferenceImport( @@ -871,29 +1025,52 @@ def client_snippet_writer(class_name: str) -> typing.Tuple[AST.ClassReference, C ), ) - def write_client_snippet(writer: AST.NodeWriter) -> None: - client_instantiation = AST.ClassInstantiation( - class_=client_class_reference, - args=[ - param.instantiation - for param in self._consrtructor_parameters - if param.instantiation is not None - ], + template = Template.factory.generic( + GenericTemplate( + imports=[], + isOptional=True, + templateString="", + templateInputs=[], ) + ) + return client_class_reference, template + # def client_snippet() -> Template: + # client_instantiation = AST.ClassInstantiation( + # class_=client_class_reference, + # args=[ + # param.instantiation + # for param in self._constructor_parameters + # if param.instantiation is not None + # ], + # ) + + # writer.write("client = ") + # writer.write_node(AST.Expression(client_instantiation)) - writer.write("client = ") - writer.write_node(AST.Expression(client_instantiation)) - writer.write_newline_if_last_line_not() + # print( + # "Piyush Debug: AST.Expression(client_instantiation):", + # AST.Expression(client_instantiation), + # ) - return client_class_reference, write_client_snippet + # writer.write_newline_if_last_line_not() - async_class_reference, async_class_snippet_writer = client_snippet_writer(self._async_class_name) - sync_class_reference, sync_class_snippet_writer = client_snippet_writer(self._class_name) + # return client_class_reference, client_snippet + + async_class_reference, async_class_snippet_template = ( + client_snippet_template(self._async_class_name) + ) + sync_class_reference, sync_class_snippet_template = client_snippet_template( + self._class_name + ) return GeneratedRootClient( - async_instantiation=AST.Expression(AST.CodeWriter(async_class_snippet_writer)), + async_instantiation_template=async_class_snippet_template, async_client=RootClient( - class_reference=async_class_reference, parameters=self._consrtructor_parameters + class_reference=async_class_reference, + parameters=self._constructor_parameters, + ), + sync_instantiation_template=sync_class_snippet_template, + sync_client=RootClient( + class_reference=sync_class_reference, + parameters=self._constructor_parameters, ), - sync_instantiation=AST.Expression(AST.CodeWriter(sync_class_snippet_writer)), - sync_client=RootClient(class_reference=sync_class_reference, parameters=self._consrtructor_parameters), ) diff --git a/generators/python/src/fern_python/generators/sdk/sdk_generator.py b/generators/python/src/fern_python/generators/sdk/sdk_generator.py index 0bf1fa6cada..4826e693545 100644 --- a/generators/python/src/fern_python/generators/sdk/sdk_generator.py +++ b/generators/python/src/fern_python/generators/sdk/sdk_generator.py @@ -2,11 +2,6 @@ from typing import Literal, Optional, Sequence, Tuple, Union, cast from uuid import uuid4 -import fern.ir.resources as ir_types -from fern.generator_exec.resources import GeneratorUpdate, LogLevel, LogUpdate -from fern.generator_exec.resources.config import GeneratorConfig -from fern.generator_exec.resources.readme import BadgeType, GenerateReadmeRequest - from fern_python.cli.abstract_generator import AbstractGenerator from fern_python.codegen import AST, Project from fern_python.codegen.filepath import Filepath @@ -25,6 +20,11 @@ from fern_python.source_file_factory import SourceFileFactory from fern_python.utils import build_snippet_writer +import fern.ir.resources as ir_types +from fern.generator_exec.resources import GeneratorUpdate, LogLevel, LogUpdate +from fern.generator_exec.resources.config import GeneratorConfig +from fern.generator_exec.resources.readme import BadgeType, GenerateReadmeRequest + from .client_generator.client_generator import ClientGenerator from .client_generator.generated_root_client import GeneratedRootClient from .client_generator.oauth_token_provider_generator import OAuthTokenProviderGenerator @@ -78,7 +78,10 @@ def run( ) -> None: custom_config = SDKCustomConfig.parse_obj(generator_config.custom_config or {}) - if custom_config.client_filename is not None and not custom_config.client_filename.endswith(".py"): + if ( + custom_config.client_filename is not None + and not custom_config.client_filename.endswith(".py") + ): raise RuntimeError("client_filename must end in .py") if not custom_config.client.filename.endswith(".py"): @@ -89,20 +92,28 @@ def run( for dep, value in custom_config.extra_dependencies.items(): if type(value) is str: - project.add_dependency(dependency=AST.Dependency(name=dep, version=value)) + project.add_dependency( + dependency=AST.Dependency(name=dep, version=value) + ) elif isinstance(value, DependencyCusomConfig): project.add_dependency( - dependency=AST.Dependency(name=dep, version=value.version, optional=value.optional) + dependency=AST.Dependency( + name=dep, version=value.version, optional=value.optional + ) ) project.add_extra(custom_config.extras) for dep, version in custom_config.extra_dev_dependencies.items(): - project.add_dev_dependency(dependency=AST.Dependency(name=dep, version=version)) + project.add_dev_dependency( + dependency=AST.Dependency(name=dep, version=version) + ) # Export from root init if custom_config.additional_init_exports is not None: - project.add_init_exports(path=(), exports=custom_config.additional_init_exports) + project.add_init_exports( + path=(), exports=custom_config.additional_init_exports + ) self._pydantic_model_custom_config = custom_config.pydantic_config @@ -133,7 +144,9 @@ def run( generated_environment: Optional[GeneratedEnvironment] = None base_environment: Optional[ - Union[SingleBaseUrlEnvironmentGenerator, MultipleBaseUrlsEnvironmentGenerator] + Union[ + SingleBaseUrlEnvironmentGenerator, MultipleBaseUrlsEnvironmentGenerator + ] ] = None if ir.environments is not None: base_environment = self._generate_environments_base( @@ -147,7 +160,12 @@ def run( ) maybe_oauth_scheme = next( - (scheme for scheme in context.ir.auth.schemes if scheme.get_as_union().type == "oauth"), None + ( + scheme + for scheme in context.ir.auth.schemes + if scheme.get_as_union().type == "oauth" + ), + None, ) oauth_scheme = ( maybe_oauth_scheme.visit( @@ -156,7 +174,8 @@ def run( header=lambda _: None, oauth=lambda oauth: oauth, ) - if maybe_oauth_scheme is not None and generator_config.generate_oauth_clients + if maybe_oauth_scheme is not None + and generator_config.generate_oauth_clients else None ) if oauth_scheme is not None: @@ -269,7 +288,9 @@ def _generate_environments_base( environments: ir_types.Environments, ) -> Union[SingleBaseUrlEnvironmentGenerator, MultipleBaseUrlsEnvironmentGenerator]: return cast( - Union[SingleBaseUrlEnvironmentGenerator, MultipleBaseUrlsEnvironmentGenerator], + Union[ + SingleBaseUrlEnvironmentGenerator, MultipleBaseUrlsEnvironmentGenerator + ], environments.visit( single_base_url=lambda single_base_url_environments: SingleBaseUrlEnvironmentGenerator( context=context, environments=single_base_url_environments @@ -283,13 +304,17 @@ def _generate_environments_base( def _generate_environments( self, context: SdkGeneratorContext, - environments: Union[SingleBaseUrlEnvironmentGenerator, MultipleBaseUrlsEnvironmentGenerator], + environments: Union[ + SingleBaseUrlEnvironmentGenerator, MultipleBaseUrlsEnvironmentGenerator + ], generator_exec_wrapper: GeneratorExecWrapper, project: Project, ) -> GeneratedEnvironment: filepath = context.get_filepath_for_environments_enum() source_file = SourceFileFactory.create( - project=project, filepath=filepath, generator_exec_wrapper=generator_exec_wrapper + project=project, + filepath=filepath, + generator_exec_wrapper=generator_exec_wrapper, ) generated_environment = environments.generate(source_file=source_file) project.write_source_file(source_file=source_file, filepath=filepath) @@ -307,7 +332,9 @@ def _generate_client_wrapper( file=Filepath.FilepathPart(module_name="client_wrapper"), ) source_file = SourceFileFactory.create( - project=project, filepath=filepath, generator_exec_wrapper=generator_exec_wrapper + project=project, + filepath=filepath, + generator_exec_wrapper=generator_exec_wrapper, ) ClientWrapperGenerator( context=context, @@ -325,7 +352,9 @@ def _generate_oauth_token_provider( ) -> None: filepath = context.get_filepath_for_generated_oauth_token_provider() source_file = SourceFileFactory.create( - project=project, filepath=filepath, generator_exec_wrapper=generator_exec_wrapper + project=project, + filepath=filepath, + generator_exec_wrapper=generator_exec_wrapper, ) OAuthTokenProviderGenerator( context=context, @@ -346,14 +375,19 @@ def _generate_root_client( ) -> GeneratedRootClient: filepath = context.get_filepath_for_generated_root_client() source_file = SourceFileFactory.create( - project=project, filepath=filepath, generator_exec_wrapper=generator_exec_wrapper + project=project, + filepath=filepath, + generator_exec_wrapper=generator_exec_wrapper, ) generated_root_client = RootClientGenerator( context=context, package=ir.root_package, generated_environment=generated_environment, class_name=context.get_class_name_for_generated_root_client(), - async_class_name="Async" + context.get_class_name_for_generated_root_client(), + async_class_name="Async" + + context.get_class_name_for_generated_root_client(), + auth=ir.auth, + headers=ir.headers, snippet_registry=snippet_registry, snippet_writer=snippet_writer, oauth_scheme=oauth_scheme, @@ -374,13 +408,17 @@ def _generate_subpackage_client( ) -> None: filepath = context.get_filepath_for_subpackage_service(subpackage_id) source_file = SourceFileFactory.create( - project=project, filepath=filepath, generator_exec_wrapper=generator_exec_wrapper + project=project, + filepath=filepath, + generator_exec_wrapper=generator_exec_wrapper, ) ClientGenerator( context=context, package=subpackage, class_name=context.get_class_name_of_subpackage_service(subpackage_id), - async_class_name=context.get_class_name_of_async_subpackage_service(subpackage_id), + async_class_name=context.get_class_name_of_async_subpackage_service( + subpackage_id + ), generated_root_client=generated_root_client, snippet_registry=snippet_registry, snippet_writer=snippet_writer, @@ -396,7 +434,9 @@ def _generate_error( ) -> None: filepath = context.get_filepath_for_error(error.name) source_file = SourceFileFactory.create( - project=project, filepath=filepath, generator_exec_wrapper=generator_exec_wrapper + project=project, + filepath=filepath, + generator_exec_wrapper=generator_exec_wrapper, ) ErrorGenerator(context=context, error=error).generate(source_file=source_file) project.write_source_file(source_file=source_file, filepath=filepath) @@ -410,7 +450,9 @@ def _generate_version( directories=(), file=Filepath.FilepathPart(module_name="version"), ) - filepath_nested = project.get_source_file_filepath(filepath, include_src_root=True) + filepath_nested = project.get_source_file_filepath( + filepath, include_src_root=True + ) contents = f""" from importlib import metadata @@ -498,11 +540,17 @@ def _maybe_write_snippet_templates( # API Definition ID doesn't matter right now try: fdr_client.templates.register_batch( - org_id=org_id, api_id=api_name, api_definition_id=uuid4(), snippets=snippets + org_id=org_id, + api_id=api_name, + api_definition_id=uuid4(), + snippets=snippets, ) generator_exec_wrapper.send_update( GeneratorUpdate.factory.log( - LogUpdate(level=LogLevel.DEBUG, message=f"Uploaded snippet templates to FDR.") + LogUpdate( + level=LogLevel.DEBUG, + message="Uploaded snippet templates to FDR.", + ) ) ) except Exception as e: @@ -519,11 +567,19 @@ def _maybe_write_snippet_templates( # Otherwise write them for local project.add_file( context.generator_config.output.snippet_template_filepath, - json.dumps(list(map(lambda template: template.dict(by_alias=True), snippets)), indent=4), + json.dumps( + list( + map(lambda template: template.dict(by_alias=True), snippets) + ), + indent=4, + ), ) generator_exec_wrapper.send_update( GeneratorUpdate.factory.log( - LogUpdate(level=LogLevel.DEBUG, message=f"Wrote snippet templates to disk.") + LogUpdate( + level=LogLevel.DEBUG, + message="Wrote snippet templates to disk.", + ) ) ) @@ -537,7 +593,10 @@ def _maybe_write_snippets( snippets = snippet_registry.snippets() if snippets is None: return - project.add_file(context.generator_config.output.snippet_filepath, snippets.json(indent=4)) + project.add_file( + context.generator_config.output.snippet_filepath, + snippets.json(indent=4), + ) def _write_snippet_tests( self, diff --git a/generators/python/src/fern_python/snippet/snippet_template_factory.py b/generators/python/src/fern_python/snippet/snippet_template_factory.py index 9629a52e0d5..ad31207a11c 100644 --- a/generators/python/src/fern_python/snippet/snippet_template_factory.py +++ b/generators/python/src/fern_python/snippet/snippet_template_factory.py @@ -1,6 +1,5 @@ from typing import Dict, List, Optional, Tuple, Union -import fern.ir.resources as ir_types from fdr import ( DictTemplate, DiscriminatedUnionTemplate, @@ -20,8 +19,6 @@ TemplateInput, VersionedSnippetTemplate, ) -from fern.generator_exec.resources import GeneratorUpdate, LogLevel, LogUpdate - from fern_python.codegen import AST from fern_python.codegen.imports_manager import ImportsManager from fern_python.codegen.project import Project @@ -55,6 +52,9 @@ from fern_python.snippet.snippet_writer import SnippetWriter from fern_python.source_file_factory.source_file_factory import SourceFileFactory +import fern.ir.resources as ir_types +from fern.generator_exec.resources import GeneratorUpdate, LogLevel, LogUpdate + class SnippetTemplateFactory: CLIENT_FIXTURE_NAME = "client" @@ -102,14 +102,15 @@ def _expression_to_snippet_str_and_imports( snippet_without_imports = snippet.to_str(include_imports=False) # For some reason we're appending newlines to snippets, so we need to strip them for tempaltes - return snippet_full.replace(snippet_without_imports, "").strip(), snippet_without_imports.strip() + return snippet_full.replace( + snippet_without_imports, "" + ).strip(), snippet_without_imports.strip() - def _generate_client(self, is_async: Optional[bool] = False) -> str: - return self._expression_to_snippet_str( - self._generated_root_client.async_instantiation - if is_async - else self._generated_root_client.sync_instantiation - ) + def _generate_client(self, is_async: Optional[bool] = False) -> Template: + if is_async: + return self._generated_root_client.async_instantiation_template + else: + return self._generated_root_client.sync_instantiation_template def _get_subpackage_client_accessor( self, @@ -120,13 +121,17 @@ def _get_subpackage_client_accessor( components += [fern_filepath.file] if len(components) == 0: return "" - return ".".join([component.snake_case.safe_name for component in components]) + "." + return ( + ".".join([component.snake_case.safe_name for component in components]) + "." + ) def _is_type_literal(self, type_reference: ir_types.TypeReference) -> bool: return self._context.get_literal_value(reference=type_reference) is not None def _get_breadcrumb_path( - self, wire_or_original_name: Optional[str], name_breadcrumbs: Optional[List[str]] + self, + wire_or_original_name: Optional[str], + name_breadcrumbs: Optional[List[str]], ) -> Union[str, None]: if wire_or_original_name is None and name_breadcrumbs is None: return None @@ -147,12 +152,16 @@ def _get_generic_template( GenericTemplate( imports=[], is_optional=True, - template_string=f"{name}={self.TEMPLATE_SENTINEL}" if name is not None else f"{self.TEMPLATE_SENTINEL}", + template_string=f"{name}={self.TEMPLATE_SENTINEL}" + if name is not None + else f"{self.TEMPLATE_SENTINEL}", template_inputs=[ TemplateInput.factory.payload( PayloadInput( location=location, - path=self._get_breadcrumb_path(wire_or_original_name, name_breadcrumbs), + path=self._get_breadcrumb_path( + wire_or_original_name, name_breadcrumbs + ), ) ) ], @@ -187,7 +196,10 @@ def _get_container_template( delimiter=f",\n{self.TAB_CHAR * child_indentation_level}", inner_template=inner_template, template_input=PayloadInput( - location=location, path=self._get_breadcrumb_path(wire_or_original_name, name_breadcrumbs) + location=location, + path=self._get_breadcrumb_path( + wire_or_original_name, name_breadcrumbs + ), ), ) ) @@ -210,17 +222,30 @@ def _get_container_template( delimiter=f",\n{self.TAB_CHAR * child_indentation_level}", inner_template=inner_template, template_input=PayloadInput( - location=location, path=self._get_breadcrumb_path(wire_or_original_name, name_breadcrumbs) + location=location, + path=self._get_breadcrumb_path( + wire_or_original_name, name_breadcrumbs + ), ), ) ) if inner_template is not None else None if container_union.type == "map": key_template = self.get_type_reference_template( - container_union.key_type, None, "RELATIVE", None, None, child_indentation_level + container_union.key_type, + None, + "RELATIVE", + None, + None, + child_indentation_level, ) value_template = self.get_type_reference_template( - container_union.value_type, None, "RELATIVE", None, None, child_indentation_level + container_union.value_type, + None, + "RELATIVE", + None, + None, + child_indentation_level, ) return ( Template.factory.dict( @@ -235,7 +260,10 @@ def _get_container_template( key_template=key_template, value_template=value_template, template_input=PayloadInput( - location=location, path=self._get_breadcrumb_path(wire_or_original_name, name_breadcrumbs) + location=location, + path=self._get_breadcrumb_path( + wire_or_original_name, name_breadcrumbs + ), ), ) ) @@ -246,13 +274,20 @@ def _get_container_template( if container_union.type == "optional": value = container_union.optional return self.get_type_reference_template( - value, name, location, wire_or_original_name, name_breadcrumbs, indentation_level + value, + name, + location, + wire_or_original_name, + name_breadcrumbs, + indentation_level, ) return None def _convert_enum_value_to_str( - self, type_name: ir_types.DeclaredTypeName, enum_value: ir_types.NameAndWireValue + self, + type_name: ir_types.DeclaredTypeName, + enum_value: ir_types.NameAndWireValue, ) -> Tuple[str, str]: enum_snippet = EnumSnippetGenerator( snippet_writer=self._snippet_writer, @@ -273,7 +308,9 @@ def _get_enum_template( ) -> Template: # TODO: we should also be making it so you can easily grab the right import depending on the enum you use value_map = { - value.name.wire_value: self._convert_enum_value_to_str(type_name=type_name, enum_value=value.name)[1] + value.name.wire_value: self._convert_enum_value_to_str( + type_name=type_name, enum_value=value.name + )[1] for value in values } return Template.factory.enum( @@ -281,10 +318,14 @@ def _get_enum_template( imports=[], is_optional=True, values=value_map, - template_string=f"{name}={self.TEMPLATE_SENTINEL}" if name is not None else f"{self.TEMPLATE_SENTINEL}", + template_string=f"{name}={self.TEMPLATE_SENTINEL}" + if name is not None + else f"{self.TEMPLATE_SENTINEL}", template_input=PayloadInput( location=location, - path=self._get_breadcrumb_path(wire_or_original_name, name_breadcrumbs), + path=self._get_breadcrumb_path( + wire_or_original_name, name_breadcrumbs + ), ), ) ) @@ -300,7 +341,9 @@ def _get_single_union_type_template( indentation_level: int = 0, ) -> Union[Template, None]: child_indentation_level = indentation_level + 1 - example_expression = f"\n{self.TAB_CHAR * child_indentation_level}{self.TEMPLATE_SENTINEL}" + example_expression = ( + f"\n{self.TAB_CHAR * child_indentation_level}{self.TEMPLATE_SENTINEL}" + ) sut_shape = sut.shape.get_as_union() if sut_shape.properties_type == "samePropertiesAsObject": object_properties = self._context.pydantic_generator_context.get_all_properties_including_extensions( @@ -334,7 +377,9 @@ def _get_single_union_type_template( single_union_type=sut, ).generate_snippet_template() if snippet_template is not None: - imports, snippet_template_str = self._expression_to_snippet_str_and_imports(snippet_template) + imports, snippet_template_str = ( + self._expression_to_snippet_str_and_imports(snippet_template) + ) return Template.factory.generic( GenericTemplate( imports=[imports] if imports is not None else [], @@ -363,7 +408,9 @@ def _get_single_union_type_template( child_breadcrumbs.append(wire_or_original_name) if snippet_template is not None: - imports, snippet_template_str = self._expression_to_snippet_str_and_imports(snippet_template) + imports, snippet_template_str = ( + self._expression_to_snippet_str_and_imports(snippet_template) + ) return Template.factory.generic( GenericTemplate( @@ -398,7 +445,9 @@ def _get_single_union_type_template( ).generate_snippet_template() if snippet_template is not None: - imports, snippet_template_str = self._expression_to_snippet_str_and_imports(snippet_template) + imports, snippet_template_str = ( + self._expression_to_snippet_str_and_imports(snippet_template) + ) return Template.factory.generic( GenericTemplate( @@ -443,7 +492,9 @@ def _get_discriminated_union_template( imports=[], is_optional=True, discriminant_field=union_declaration.discriminant.wire_value, - template_string=f"{name}={self.TEMPLATE_SENTINEL}" if name is not None else f"{self.TEMPLATE_SENTINEL}", + template_string=f"{name}={self.TEMPLATE_SENTINEL}" + if name is not None + else f"{self.TEMPLATE_SENTINEL}", members=member_templates, template_input=PayloadInput(location="RELATIVE"), ) @@ -459,7 +510,11 @@ def _get_object_template( name_breadcrumbs: Optional[List[str]], indentation_level: int = 0, ) -> Template: - object_reference = self._snippet_writer.get_class_reference_for_declared_type_name(name=type_name) + object_reference = ( + self._snippet_writer.get_class_reference_for_declared_type_name( + name=type_name + ) + ) object_properties = self._context.pydantic_generator_context.get_all_properties_including_extensions( type_name=type_name.type_id ) @@ -485,7 +540,11 @@ def _get_object_template( object_class_name = type_name.name.pascal_case.safe_name return Template.factory.generic( GenericTemplate( - imports=[self._imports_manager._get_import_as_string(object_reference.import_)] + imports=[ + self._imports_manager._get_import_as_string( + object_reference.import_ + ) + ] if object_reference.import_ is not None else [], is_optional=True, @@ -507,8 +566,10 @@ def _get_named_template( name_breadcrumbs: Optional[List[str]], indentation_level: int = 0, ) -> Union[Template, None]: - type_declaration = self._context.pydantic_generator_context.get_declaration_for_type_id( - type_id=type_name.type_id + type_declaration = ( + self._context.pydantic_generator_context.get_declaration_for_type_id( + type_id=type_name.type_id + ) ) if type_declaration is not None: @@ -616,7 +677,11 @@ def get_type_reference_template_input( name_breadcrumbs=name_breadcrumbs, indentation_level=indentation_level, ) - return self._get_template_input_from_template(template=template) if template is not None else None + return ( + self._get_template_input_from_template(template=template) + if template is not None + else None + ) def _get_template_input_from_template(self, template: Template) -> TemplateInput: return TemplateInput.factory.template(template) @@ -717,27 +782,29 @@ def generate_templates(self) -> List[SnippetRegistryEntry]: top_level_template_inputs.append(ti) if endpoint.request_body is not None: - parameters: List[AST.NamedFunctionParameter] = endpoint.request_body.visit( - inlined_request_body=lambda request: InlinedRequestBodyParameters( - context=self._context, - request_body=request, - endpoint=endpoint, - ).get_parameters(), - reference=lambda request: ReferencedRequestBodyParameters( - endpoint=endpoint, - request_body=request, - context=self._context, - ).get_parameters(), - file_upload=lambda request: FileUploadRequestBodyParameters( - endpoint=endpoint, - request=request, - context=self._context, - ).get_parameters(), - bytes=lambda request: BytesRequestBodyParameters( - endpoint=endpoint, - request=request, - context=self._context, - ).get_parameters(), + parameters: List[AST.NamedFunctionParameter] = ( + endpoint.request_body.visit( + inlined_request_body=lambda request: InlinedRequestBodyParameters( + context=self._context, + request_body=request, + endpoint=endpoint, + ).get_parameters(), + reference=lambda request: ReferencedRequestBodyParameters( + endpoint=endpoint, + request_body=request, + context=self._context, + ).get_parameters(), + file_upload=lambda request: FileUploadRequestBodyParameters( + endpoint=endpoint, + request=request, + context=self._context, + ).get_parameters(), + bytes=lambda request: BytesRequestBodyParameters( + endpoint=endpoint, + request=request, + context=self._context, + ).get_parameters(), + ) ) for parameter in parameters: @@ -760,7 +827,9 @@ def generate_templates(self) -> List[SnippetRegistryEntry]: async_init_expression = AST.Expression( f"await {self.CLIENT_FIXTURE_NAME}.{package_path}{get_endpoint_name(endpoint)}(\n\t{self.TEMPLATE_SENTINEL}\n)" ) - async_init_string_template = self._expression_to_snippet_str(async_init_expression) + async_init_string_template = self._expression_to_snippet_str( + async_init_expression + ) async_function_template = Template.factory.generic( GenericTemplate( imports=[], @@ -795,25 +864,30 @@ def generate_templates(self) -> List[SnippetRegistryEntry]: ) ) - client_instantiation = self._generate_client() - async_client_instantiation = self._generate_client(is_async=True) + client_instantiation_template = self._generate_client() + async_client_instantiation_template = self._generate_client( + is_async=True + ) snippet_templates.append( SnippetRegistryEntry( sdk=sdk, endpoint_id=self._endpoint_to_identifier(endpoint), snippet_template=VersionedSnippetTemplate.factory.v_1( SnippetTemplate( - client_instantiation=client_instantiation, function_invocation=function_template + client_instantiation=client_instantiation_template, + function_invocation=function_template, ) ), additional_templates={ "async": VersionedSnippetTemplate.factory.v_1( SnippetTemplate( - client_instantiation=async_client_instantiation, + client_instantiation=async_client_instantiation_template, function_invocation=async_function_template, ) ) }, ) ) + + print("PIYUSH Snippet templates generated successfully.", snippet_templates) return snippet_templates diff --git a/generators/python/tests/sdk/test_root_client_generator.py b/generators/python/tests/sdk/test_root_client_generator.py index 40206031592..d8fb14f0bd7 100644 --- a/generators/python/tests/sdk/test_root_client_generator.py +++ b/generators/python/tests/sdk/test_root_client_generator.py @@ -66,6 +66,7 @@ def test_generated_root_client_builder() -> None: async_snippet = SourceFileFactory.create_snippet() async_snippet.add_expression(generated_root_client.async_instantiation) + print("DEBUG PIYUSH RUNNING TEST") assert ( async_snippet.to_str() == """from acme.client import AcmeAsync diff --git a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts index 9ed1ad0b83f..85e3942ae1b 100644 --- a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts +++ b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts @@ -354,16 +354,21 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { return ts.factory.createNewExpression(referenceToClient, undefined, [referenceToOptions]); } - public instantiateAsRoot(args: { context: SdkContext; npmPackage: NpmPackage }): ts.Expression { + public instantiateAsRoot(args: { + context: SdkContext; + npmPackage: NpmPackage; + templateSentinel: string | undefined; + }): ts.Expression { const rootSdkClientName = args.context.sdkClientClass.getReferenceToClientClass(this.packageId, { npmPackage: args.npmPackage }); - const optionsProperties = this.getOptionsPropertiesForSnippet(args.context); - return ts.factory.createNewExpression( + + const expression = ts.factory.createNewExpression( rootSdkClientName.getExpression(), undefined, - optionsProperties.length > 0 ? [ts.factory.createObjectLiteralExpression(optionsProperties)] : undefined + args.templateSentinel ? [ts.factory.createStringLiteral(args.templateSentinel)] : [] ); + return expression; } public writeToFile(context: SdkContext): void { @@ -807,92 +812,6 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { * OPTIONS * ***********/ - public getOptionsPropertiesForSnippet(context: SdkContext): ts.ObjectLiteralElementLike[] { - const properties: ts.ObjectLiteralElementLike[] = []; - - const defaultEnvironment = context.environments - .getGeneratedEnvironments() - .getReferenceToDefaultEnvironment(context); - if (!this.requireDefaultEnvironment && defaultEnvironment == null) { - const firstEnvironment = context.environments.getReferenceToFirstEnvironmentEnum(); - const environment = - firstEnvironment != null - ? firstEnvironment.getExpression() - : ts.factory.createStringLiteral("YOUR_BASE_URL"); - properties.push( - ts.factory.createPropertyAssignment( - GeneratedSdkClientClassImpl.ENVIRONMENT_OPTION_PROPERTY_NAME, - environment - ) - ); - } - - if (this.oauthAuthScheme != null && context.generateOAuthClients) { - properties.push( - ts.factory.createPropertyAssignment( - OAuthTokenProviderGenerator.OAUTH_CLIENT_ID_PROPERTY_NAME, - ts.factory.createStringLiteral("YOUR_CLIENT_ID") - ) - ); - properties.push( - ts.factory.createPropertyAssignment( - OAuthTokenProviderGenerator.OAUTH_CLIENT_SECRET_PROPERTY_NAME, - ts.factory.createStringLiteral("YOUR_CLIENT_SECRET") - ) - ); - } - - if (this.bearerAuthScheme != null) { - properties.push( - ts.factory.createPropertyAssignment( - this.getBearerAuthOptionKey(this.bearerAuthScheme), - ts.factory.createStringLiteral(`YOUR_${this.bearerAuthScheme.token.screamingSnakeCase.unsafeName}`) - ) - ); - } - - if (this.basicAuthScheme != null) { - properties.push( - ts.factory.createPropertyAssignment( - this.getBasicAuthUsernameOptionKey(this.basicAuthScheme), - ts.factory.createStringLiteral( - `YOUR_${this.basicAuthScheme.username.screamingSnakeCase.unsafeName}` - ) - ) - ); - properties.push( - ts.factory.createPropertyAssignment( - this.getBasicAuthPasswordOptionKey(this.basicAuthScheme), - ts.factory.createStringLiteral( - `YOUR_${this.basicAuthScheme.password.screamingSnakeCase.unsafeName}` - ) - ) - ); - } - - for (const header of this.authHeaders) { - properties.push( - ts.factory.createPropertyAssignment( - this.getOptionKeyForAuthHeader(header), - ts.factory.createStringLiteral(`YOUR_${header.name.name.screamingSnakeCase.unsafeName}`) - ) - ); - } - - for (const header of this.intermediateRepresentation.headers) { - if (!isLiteralHeader(header, context)) { - properties.push( - ts.factory.createPropertyAssignment( - this.getOptionKeyForNonLiteralHeader(header), - ts.factory.createStringLiteral(`YOUR_${header.name.name.screamingSnakeCase.unsafeName}`) - ) - ); - } - } - - return properties; - } - private generateOptionsInterface(context: SdkContext): OptionalKind { const properties: OptionalKind[] = []; diff --git a/generators/typescript/sdk/generator/package.json b/generators/typescript/sdk/generator/package.json index 9f39e6a13eb..eed9226faa7 100644 --- a/generators/typescript/sdk/generator/package.json +++ b/generators/typescript/sdk/generator/package.json @@ -33,7 +33,7 @@ "@fern-fern/generator-cli-sdk": "^0.0.25", "@fern-fern/generator-exec-sdk": "^0.0.879", "@fern-fern/ir-sdk": "^0.0.3515", - "@fern-fern/snippet-sdk": "^0.0.5434", + "@fern-fern/snippet-sdk": "^0.0.5492", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "@fern-typescript/endpoint-error-union-generator": "workspace:*", diff --git a/generators/typescript/sdk/generator/src/SdkGenerator.ts b/generators/typescript/sdk/generator/src/SdkGenerator.ts index 1c49edb86aa..79dadc68e80 100644 --- a/generators/typescript/sdk/generator/src/SdkGenerator.ts +++ b/generators/typescript/sdk/generator/src/SdkGenerator.ts @@ -352,10 +352,7 @@ export class SdkGenerator { this.FdrClient = this.config.executionEnvironment !== "local" ? new FdrSnippetTemplateClient({ - environment: - this.config.executionEnvironment === "dev" - ? FdrSnippetTemplateEnvironment.Dev - : FdrSnippetTemplateEnvironment.Prod + environment: FdrSnippetTemplateEnvironment.Prod }) : undefined; } @@ -730,7 +727,7 @@ export class SdkGenerator { const context = this.generateSdkContext({ sourceFile, importsManager }, { isForSnippet: true }); const clientInstantiation = context.sdkClientClass .getGeneratedSdkClientClass(rootPackage) - .instantiateAsRoot({ context, npmPackage: this.npmPackage }); + .instantiateAsRoot({ context, npmPackage: this.npmPackage, templateSentinel: undefined }); const clientAssignment = ts.factory.createVariableStatement( undefined, ts.factory.createVariableDeclarationList( @@ -803,11 +800,14 @@ export class SdkGenerator { endpointContext, clientContext, npmPackage: this.npmPackage, + auth: this.intermediateRepresentation.auth, + headers: this.intermediateRepresentation.headers, endpoint, packageId, rootPackageId: rootPackage, retainOriginalCasing: this.config.retainOriginalCasing, - inlineFileProperties: this.config.inlineFileProperties + inlineFileProperties: this.config.inlineFileProperties, + requireDefaultEnvironment: this.config.requireDefaultEnvironment }).generateSnippetTemplate(); if (snippetTemplate != null) { diff --git a/generators/typescript/sdk/generator/src/TemplateGenerator.ts b/generators/typescript/sdk/generator/src/TemplateGenerator.ts index 44655a64a48..bcbdc72614a 100644 --- a/generators/typescript/sdk/generator/src/TemplateGenerator.ts +++ b/generators/typescript/sdk/generator/src/TemplateGenerator.ts @@ -1,9 +1,15 @@ import { + ApiAuth, + AuthScheme, + BasicAuthScheme, + BearerAuthScheme, ContainerType, DeclaredTypeName, EnumTypeDeclaration, ExampleTypeShape, + HeaderAuthScheme, HttpEndpoint, + HttpHeader, Name, NameAndWireValue, ObjectTypeDeclaration, @@ -11,51 +17,65 @@ import { UnionTypeDeclaration } from "@fern-fern/ir-sdk/api"; import { FdrSnippetTemplate } from "@fern-fern/snippet-sdk"; -import { GetReferenceOpts, getTextOfTsNode, ImportsManager, NpmPackage, PackageId } from "@fern-typescript/commons"; +import { GetReferenceOpts, getTextOfTsNode, NpmPackage, PackageId } from "@fern-typescript/commons"; import { GeneratedEnumType, SdkContext } from "@fern-typescript/contexts"; -import { Project, ts } from "ts-morph"; +import { OAuthTokenProviderGenerator } from "@fern-typescript/sdk-client-class-generator/src/oauth-generator/OAuthTokenProviderGenerator"; +import { Project } from "ts-morph"; // Write this in the fern def to share between FE + BE const TEMPLATE_SENTINEL = "$FERN_INPUT"; +const ENVIRONMENT_OPTION_PROPERTY_NAME = "environment"; export class TemplateGenerator { private endpointContext: SdkContext; private clientContext: SdkContext; private opts: GetReferenceOpts; private npmPackage: NpmPackage; + private auth: ApiAuth; + private headers: HttpHeader[]; private endpoint: HttpEndpoint; private packageId: PackageId; private rootPackageId: PackageId; private retainOriginalCasing: boolean; private inlineFileProperties: boolean; + private requireDefaultEnvironment: boolean; constructor({ clientContext, endpointContext, npmPackage, + auth, + headers, endpoint, packageId, rootPackageId, retainOriginalCasing, - inlineFileProperties + inlineFileProperties, + requireDefaultEnvironment }: { clientContext: SdkContext; endpointContext: SdkContext; npmPackage: NpmPackage; + auth: ApiAuth; + headers: HttpHeader[]; endpoint: HttpEndpoint; packageId: PackageId; rootPackageId: PackageId; retainOriginalCasing: boolean; inlineFileProperties: boolean; + requireDefaultEnvironment: boolean; }) { this.endpointContext = endpointContext; this.clientContext = clientContext; this.npmPackage = npmPackage; + this.auth = auth; + this.headers = headers; this.endpoint = endpoint; this.packageId = packageId; this.rootPackageId = rootPackageId; this.retainOriginalCasing = retainOriginalCasing; this.inlineFileProperties = inlineFileProperties; + this.requireDefaultEnvironment = requireDefaultEnvironment; this.opts = { isForSnippet: true }; } @@ -749,10 +769,190 @@ export class TemplateGenerator { }); } + private getBearerAuthOptionKey(bearerAuthScheme: BearerAuthScheme): string { + return bearerAuthScheme.token.camelCase.safeName; + } + + private getBasicAuthUsernameOptionKey(basicAuthScheme: BasicAuthScheme): string { + return basicAuthScheme.username.camelCase.safeName; + } + + private getBasicAuthPasswordOptionKey(basicAuthScheme: BasicAuthScheme): string { + return basicAuthScheme.password.camelCase.safeName; + } + + private getOptionKeyForAuthHeader(header: HeaderAuthScheme): string { + return header.name.name.camelCase.unsafeName; + } + + private generateTopLevelClientInstantiationSnippetTemplateInput( + addEnvironmentPropery: boolean + ): FdrSnippetTemplate.TemplateInput[] { + const topLevelTemplateInputs: FdrSnippetTemplate.TemplateInput[] = []; + + if (addEnvironmentPropery) { + const firstEnvironment = this.clientContext.environments.getReferenceToFirstEnvironmentEnum(); + topLevelTemplateInputs.push( + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${ENVIRONMENT_OPTION_PROPERTY_NAME}: ${ + firstEnvironment != null + ? getTextOfTsNode(firstEnvironment.getExpression()) + : '"YOUR_BASE_URL"' + }`, + isOptional: false, + templateInputs: [] + }) + ) + ); + } + + for (const authScheme of this.auth.schemes) { + AuthScheme._visit(authScheme, { + basic: (basicAuthScheme) => { + topLevelTemplateInputs.push( + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${this.getBasicAuthUsernameOptionKey( + basicAuthScheme + )}: ${TEMPLATE_SENTINEL}`, + isOptional: false, + templateInputs: [ + FdrSnippetTemplate.TemplateInput.payload({ + location: FdrSnippetTemplate.PayloadLocation.Auth, + path: "username" + }) + ] + }) + ), + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${this.getBasicAuthPasswordOptionKey( + basicAuthScheme + )}: ${TEMPLATE_SENTINEL}`, + isOptional: false, + templateInputs: [ + FdrSnippetTemplate.TemplateInput.payload({ + location: FdrSnippetTemplate.PayloadLocation.Auth, + path: "password" + }) + ] + }) + ) + ); + }, + bearer: (bearerAuthScheme) => { + topLevelTemplateInputs.push( + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${this.getBearerAuthOptionKey( + bearerAuthScheme + )}: ${TEMPLATE_SENTINEL}`, + isOptional: false, + templateInputs: [ + FdrSnippetTemplate.TemplateInput.payload({ + location: FdrSnippetTemplate.PayloadLocation.Auth, + path: "token" + }) + ] + }) + ) + ); + }, + // TODO: header & oauth are likely incorrect. payload path needs to be changed. + header: (header) => { + topLevelTemplateInputs.push( + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${this.getOptionKeyForAuthHeader(header)}: ${TEMPLATE_SENTINEL}`, + isOptional: false, + templateInputs: [ + FdrSnippetTemplate.TemplateInput.payload({ + location: FdrSnippetTemplate.PayloadLocation.Auth, + path: "Authorization" + }) + ] + }) + ) + ); + }, + oauth: (oauthScheme) => { + topLevelTemplateInputs.push( + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${OAuthTokenProviderGenerator.OAUTH_CLIENT_ID_PROPERTY_NAME}: ${TEMPLATE_SENTINEL}`, + isOptional: false, + templateInputs: [ + FdrSnippetTemplate.TemplateInput.payload({ + location: FdrSnippetTemplate.PayloadLocation.Auth, + path: "Authorization" // TO CHANGE + }) + ] + }) + ) + ); + topLevelTemplateInputs.push( + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${OAuthTokenProviderGenerator.OAUTH_CLIENT_SECRET_PROPERTY_NAME}: ${TEMPLATE_SENTINEL}`, + isOptional: false, + templateInputs: [ + FdrSnippetTemplate.TemplateInput.payload({ + location: FdrSnippetTemplate.PayloadLocation.Auth, + path: "Authorization" // TO CHANGE + }) + ] + }) + ) + ); + }, + _other: () => { + throw new Error("Unknown auth scheme: " + authScheme.type); + } + }); + } + + for (const header of this.headers) { + topLevelTemplateInputs.push( + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `${header.name.name.camelCase.safeName}: ${TEMPLATE_SENTINEL}`, + isOptional: true, + templateInputs: [ + FdrSnippetTemplate.TemplateInput.payload({ + location: FdrSnippetTemplate.PayloadLocation.Headers, + path: header.name.wireValue + }) + ] + }) + ) + ); + } + + return [ + FdrSnippetTemplate.TemplateInput.template( + FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: `{ ${TEMPLATE_SENTINEL} }`, + isOptional: true, + templateInputs: topLevelTemplateInputs + }) + ) + ]; + } + // Should take in all params, filter out request to put at the back // Then create type reference templates for everything // Then make the request param manual to ensure that it acts like a hash - private generateTopLevelSnippetTemplateInput(): FdrSnippetTemplate.TemplateInput[] { + private generateTopLevelFunctionInvocationSnippetTemplateInput(): FdrSnippetTemplate.TemplateInput[] { const topLevelTemplateInputs: FdrSnippetTemplate.TemplateInput[] = []; // TS params are essentially going to be ordered, if they're not named request then they're going to go in loose (no name) // if they're in the request object then they're named within this hash (this.requestExample) @@ -820,33 +1020,33 @@ export class TemplateGenerator { const project = new Project({ useInMemoryFileSystem: true }); - const clientInstantiationSourceFile = project.createSourceFile("snippet"); - const ciImportsManager = new ImportsManager(); - - const clientInstantiation = this.clientContext.sdkClientClass - .getGeneratedSdkClientClass(this.rootPackageId) - .instantiateAsRoot({ context: this.clientContext, npmPackage: this.npmPackage }); - const clientAssignment = ts.factory.createVariableStatement( - undefined, - ts.factory.createVariableDeclarationList( - [ - ts.factory.createVariableDeclaration( - this.clientContext.sdkInstanceReferenceForSnippet, - undefined, - undefined, - clientInstantiation - ) - ], - ts.NodeFlags.Const - ) - ); + // Create the client instantiation snippet - clientInstantiationSourceFile.addStatements([getTextOfTsNode(clientAssignment)]); - ciImportsManager.writeImportsToSourceFile(clientInstantiationSourceFile); - const clientInstantiationString = clientInstantiationSourceFile.getText(); + const rootSdkClientName = getTextOfTsNode( + this.clientContext.sdkClientClass + .getReferenceToClientClass(this.rootPackageId, { + npmPackage: this.npmPackage + }) + .getEntityName() + ); + + const clientReference = getTextOfTsNode(this.clientContext.sdkInstanceReferenceForSnippet); + + const defaultEnvironment = this.clientContext.environments + .getGeneratedEnvironments() + .getReferenceToDefaultEnvironment(this.clientContext); + const addEnvironmentProperty = !this.requireDefaultEnvironment && defaultEnvironment == null; + + const topLevelClientInstantiationTemplateInputs = + this.generateTopLevelClientInstantiationSnippetTemplateInput(addEnvironmentProperty); + + const clientInstantiationTemplateString = + this.auth.schemes.length > 0 || this.headers.length > 0 || addEnvironmentProperty + ? `const ${clientReference} = new ${rootSdkClientName}(${TEMPLATE_SENTINEL});` + : `const ${clientReference} = new ${rootSdkClientName}();`; // Recurse over the parameters to the function - const topLevelTemplateInputs = this.generateTopLevelSnippetTemplateInput(); + const topLevelFunctionInvocationTemplateInputs = this.generateTopLevelFunctionInvocationSnippetTemplateInput(); // Create the outer function snippet const clientClass = this.clientContext.sdkClientClass.getGeneratedSdkClientClass(this.packageId); @@ -854,21 +1054,27 @@ export class TemplateGenerator { referenceToRootClient: this.clientContext.sdkInstanceReferenceForSnippet }); const endpointClientAccessString = getTextOfTsNode(endpointClientAccess); - const templateString = - topLevelTemplateInputs.length > 0 + const functionInvocationTemplateString = + topLevelFunctionInvocationTemplateInputs.length > 0 ? `await ${endpointClientAccessString}.${this.getEndpointFunctionName( this.endpoint )}(\n\t${TEMPLATE_SENTINEL}\n)` : `await ${endpointClientAccessString}.${this.getEndpointFunctionName(this.endpoint)}()`; return FdrSnippetTemplate.VersionedSnippetTemplate.v1({ - clientInstantiation: clientInstantiationString, + clientInstantiation: FdrSnippetTemplate.Template.generic({ + imports: [], + templateString: clientInstantiationTemplateString, + isOptional: false, + inputDelimiter: ",", + templateInputs: topLevelClientInstantiationTemplateInputs + }), functionInvocation: FdrSnippetTemplate.Template.generic({ imports: [], - templateString, + templateString: functionInvocationTemplateString, isOptional: false, inputDelimiter: ",\n\t", - templateInputs: topLevelTemplateInputs + templateInputs: topLevelFunctionInvocationTemplateInputs }) }); } diff --git a/generators/typescript/utils/contexts/src/sdk-context/sdk-client-class/GeneratedSdkClientClass.ts b/generators/typescript/utils/contexts/src/sdk-context/sdk-client-class/GeneratedSdkClientClass.ts index 385b539974e..661d0378093 100644 --- a/generators/typescript/utils/contexts/src/sdk-context/sdk-client-class/GeneratedSdkClientClass.ts +++ b/generators/typescript/utils/contexts/src/sdk-context/sdk-client-class/GeneratedSdkClientClass.ts @@ -8,7 +8,7 @@ import { GeneratedEndpointImplementation } from "./GeneratedEndpointImplementati export interface GeneratedSdkClientClass extends GeneratedFile { instantiate: (args: { referenceToClient: ts.Expression; referenceToOptions: ts.Expression }) => ts.Expression; accessFromRootClient(args: { referenceToRootClient: ts.Expression }): ts.Expression; - instantiateAsRoot(args: { context: SdkContext; npmPackage?: NpmPackage | undefined }): ts.Expression; + instantiateAsRoot(args: { context: SdkContext; npmPackage?: NpmPackage | undefined, templateSentinel: string | undefined }): ts.Expression; invokeEndpoint(args: { context: SdkContext; endpointId: EndpointId; diff --git a/seed/python-sdk/unions/no-custom-config/snippet-templates.json b/seed/python-sdk/unions/no-custom-config/snippet-templates.json index 3c837c28bab..472531a7003 100644 --- a/seed/python-sdk/unions/no-custom-config/snippet-templates.json +++ b/seed/python-sdk/unions/no-custom-config/snippet-templates.json @@ -11,7 +11,7 @@ "identifierOverride": "endpoint_union.get" }, "snippetTemplate": { - "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, @@ -41,7 +41,7 @@ }, "additionalTemplates": { "async": { - "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, @@ -83,7 +83,7 @@ "identifierOverride": "endpoint_union.update" }, "snippetTemplate": { - "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, @@ -164,7 +164,7 @@ }, "additionalTemplates": { "async": { - "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, diff --git a/seed/python-sdk/unions/no-custom-config/snippet.json b/seed/python-sdk/unions/no-custom-config/snippet.json index 5cfa518b8ca..b7e1928be56 100644 --- a/seed/python-sdk/unions/no-custom-config/snippet.json +++ b/seed/python-sdk/unions/no-custom-config/snippet.json @@ -9,8 +9,8 @@ "identifier_override": "endpoint_union.get" }, "snippet": { - "sync_client": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.get(\n id=\"string\",\n)\n", - "async_client": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.get(\n id=\"string\",\n)\n", + "sync_client": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.get(\n id=\"string\",\n)\n", + "async_client": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.get(\n id=\"string\",\n)\n", "type": "python" } }, @@ -22,8 +22,8 @@ "identifier_override": "endpoint_union.update" }, "snippet": { - "sync_client": "from seed import Shape_Circle\nfrom seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", - "async_client": "from seed import Shape_Circle\nfrom seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", + "sync_client": "from seed import Shape_Circle\nfrom seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", + "async_client": "from seed import Shape_Circle\nfrom seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", "type": "python" } } diff --git a/seed/python-sdk/unions/no-custom-config/src/seed/client.py b/seed/python-sdk/unions/no-custom-config/src/seed/client.py index afb1fe53a25..ecd466496d1 100644 --- a/seed/python-sdk/unions/no-custom-config/src/seed/client.py +++ b/seed/python-sdk/unions/no-custom-config/src/seed/client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import os import typing import httpx @@ -17,6 +18,8 @@ class SeedUnions: base_url : str The base url to use for requests from the client. + client_name : typing.Optional[str] + token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -31,6 +34,8 @@ class SeedUnions: from seed.client import SeedUnions client = SeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) """ @@ -39,6 +44,8 @@ def __init__( self, *, base_url: str, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CO_API_KEY"), timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None @@ -46,6 +53,8 @@ def __init__( _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None self._client_wrapper = SyncClientWrapper( base_url=base_url, + client_name=client_name, + token=token, httpx_client=httpx_client if httpx_client is not None else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -65,6 +74,8 @@ class AsyncSeedUnions: base_url : str The base url to use for requests from the client. + client_name : typing.Optional[str] + token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -79,6 +90,8 @@ class AsyncSeedUnions: from seed.client import AsyncSeedUnions client = AsyncSeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) """ @@ -87,6 +100,8 @@ def __init__( self, *, base_url: str, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CO_API_KEY"), timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None @@ -94,6 +109,8 @@ def __init__( _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None self._client_wrapper = AsyncClientWrapper( base_url=base_url, + client_name=client_name, + token=token, httpx_client=httpx_client if httpx_client is not None else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) diff --git a/seed/python-sdk/unions/no-custom-config/src/seed/core/client_wrapper.py b/seed/python-sdk/unions/no-custom-config/src/seed/core/client_wrapper.py index a12ded4d812..086f919bc2e 100644 --- a/seed/python-sdk/unions/no-custom-config/src/seed/core/client_wrapper.py +++ b/seed/python-sdk/unions/no-custom-config/src/seed/core/client_wrapper.py @@ -8,7 +8,16 @@ class BaseClientWrapper: - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None): + def __init__( + self, + *, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + ): + self._client_name = client_name + self._token = token self._base_url = base_url self._timeout = timeout @@ -18,8 +27,19 @@ def get_headers(self) -> typing.Dict[str, str]: "X-Fern-SDK-Name": "fern_unions", "X-Fern-SDK-Version": "0.0.1", } + if self._client_name is not None: + headers["X-Client-Name"] = self._client_name + token = self._get_token() + if token is not None: + headers["Authorization"] = f"Bearer {token}" return headers + def _get_token(self) -> typing.Optional[str]: + if isinstance(self._token, str) or self._token is None: + return self._token + else: + return self._token() + def get_base_url(self) -> str: return self._base_url @@ -28,8 +48,16 @@ def get_timeout(self) -> typing.Optional[float]: class SyncClientWrapper(BaseClientWrapper): - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client): - super().__init__(base_url=base_url, timeout=timeout) + def __init__( + self, + *, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.Client, + ): + super().__init__(client_name=client_name, token=token, base_url=base_url, timeout=timeout) self.httpx_client = HttpClient( httpx_client=httpx_client, base_headers=self.get_headers(), @@ -39,8 +67,16 @@ def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, htt class AsyncClientWrapper(BaseClientWrapper): - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient): - super().__init__(base_url=base_url, timeout=timeout) + def __init__( + self, + *, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.AsyncClient, + ): + super().__init__(client_name=client_name, token=token, base_url=base_url, timeout=timeout) self.httpx_client = AsyncHttpClient( httpx_client=httpx_client, base_headers=self.get_headers(), diff --git a/seed/python-sdk/unions/no-custom-config/src/seed/union/client.py b/seed/python-sdk/unions/no-custom-config/src/seed/union/client.py index 4edd47080c0..9d7b3b0e859 100644 --- a/seed/python-sdk/unions/no-custom-config/src/seed/union/client.py +++ b/seed/python-sdk/unions/no-custom-config/src/seed/union/client.py @@ -36,6 +36,8 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non from seed.client import SeedUnions client = SeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) client.union.get( @@ -72,6 +74,8 @@ def update(self, *, request: Shape, request_options: typing.Optional[RequestOpti from seed.client import SeedUnions client = SeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) client.union.update( @@ -115,6 +119,8 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] from seed.client import AsyncSeedUnions client = AsyncSeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) await client.union.get( @@ -151,6 +157,8 @@ async def update(self, *, request: Shape, request_options: typing.Optional[Reque from seed.client import AsyncSeedUnions client = AsyncSeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) await client.union.update( diff --git a/seed/python-sdk/unions/no-custom-config/tests/conftest.py b/seed/python-sdk/unions/no-custom-config/tests/conftest.py index 90e183951f4..e72346584f8 100644 --- a/seed/python-sdk/unions/no-custom-config/tests/conftest.py +++ b/seed/python-sdk/unions/no-custom-config/tests/conftest.py @@ -8,9 +8,17 @@ @pytest.fixture def client() -> SeedUnions: - return SeedUnions(base_url=os.getenv("TESTS_BASE_URL", "base_url")) + return SeedUnions( + client_name=os.getenv("ENV_CLIENT_NAME", "client_name"), + token=os.getenv("ENV_TOKEN", "token"), + base_url=os.getenv("TESTS_BASE_URL", "base_url"), + ) @pytest.fixture def async_client() -> AsyncSeedUnions: - return AsyncSeedUnions(base_url=os.getenv("TESTS_BASE_URL", "base_url")) + return AsyncSeedUnions( + client_name=os.getenv("ENV_CLIENT_NAME", "client_name"), + token=os.getenv("ENV_TOKEN", "token"), + base_url=os.getenv("TESTS_BASE_URL", "base_url"), + ) diff --git a/seed/python-sdk/unions/union-utils/snippet-templates.json b/seed/python-sdk/unions/union-utils/snippet-templates.json index 3c837c28bab..472531a7003 100644 --- a/seed/python-sdk/unions/union-utils/snippet-templates.json +++ b/seed/python-sdk/unions/union-utils/snippet-templates.json @@ -11,7 +11,7 @@ "identifierOverride": "endpoint_union.get" }, "snippetTemplate": { - "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, @@ -41,7 +41,7 @@ }, "additionalTemplates": { "async": { - "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, @@ -83,7 +83,7 @@ "identifierOverride": "endpoint_union.update" }, "snippetTemplate": { - "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, @@ -164,7 +164,7 @@ }, "additionalTemplates": { "async": { - "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)", + "clientInstantiation": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)", "functionInvocation": { "imports": [], "isOptional": true, diff --git a/seed/python-sdk/unions/union-utils/snippet.json b/seed/python-sdk/unions/union-utils/snippet.json index 5cfa518b8ca..b7e1928be56 100644 --- a/seed/python-sdk/unions/union-utils/snippet.json +++ b/seed/python-sdk/unions/union-utils/snippet.json @@ -9,8 +9,8 @@ "identifier_override": "endpoint_union.get" }, "snippet": { - "sync_client": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.get(\n id=\"string\",\n)\n", - "async_client": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.get(\n id=\"string\",\n)\n", + "sync_client": "from seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.get(\n id=\"string\",\n)\n", + "async_client": "from seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.get(\n id=\"string\",\n)\n", "type": "python" } }, @@ -22,8 +22,8 @@ "identifier_override": "endpoint_union.update" }, "snippet": { - "sync_client": "from seed import Shape_Circle\nfrom seed.client import SeedUnions\n\nclient = SeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", - "async_client": "from seed import Shape_Circle\nfrom seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", + "sync_client": "from seed import Shape_Circle\nfrom seed.client import SeedUnions\n\nclient = SeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", + "async_client": "from seed import Shape_Circle\nfrom seed.client import AsyncSeedUnions\n\nclient = AsyncSeedUnions(\n client_name=\"YOUR_CLIENT_NAME\",\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nawait client.union.update(\n request=Shape_Circle(\n id=\"string\",\n radius=1.1,\n ),\n)\n", "type": "python" } } diff --git a/seed/python-sdk/unions/union-utils/src/seed/client.py b/seed/python-sdk/unions/union-utils/src/seed/client.py index afb1fe53a25..ecd466496d1 100644 --- a/seed/python-sdk/unions/union-utils/src/seed/client.py +++ b/seed/python-sdk/unions/union-utils/src/seed/client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import os import typing import httpx @@ -17,6 +18,8 @@ class SeedUnions: base_url : str The base url to use for requests from the client. + client_name : typing.Optional[str] + token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -31,6 +34,8 @@ class SeedUnions: from seed.client import SeedUnions client = SeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) """ @@ -39,6 +44,8 @@ def __init__( self, *, base_url: str, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CO_API_KEY"), timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None @@ -46,6 +53,8 @@ def __init__( _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None self._client_wrapper = SyncClientWrapper( base_url=base_url, + client_name=client_name, + token=token, httpx_client=httpx_client if httpx_client is not None else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -65,6 +74,8 @@ class AsyncSeedUnions: base_url : str The base url to use for requests from the client. + client_name : typing.Optional[str] + token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -79,6 +90,8 @@ class AsyncSeedUnions: from seed.client import AsyncSeedUnions client = AsyncSeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) """ @@ -87,6 +100,8 @@ def __init__( self, *, base_url: str, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CO_API_KEY"), timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None @@ -94,6 +109,8 @@ def __init__( _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None self._client_wrapper = AsyncClientWrapper( base_url=base_url, + client_name=client_name, + token=token, httpx_client=httpx_client if httpx_client is not None else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) diff --git a/seed/python-sdk/unions/union-utils/src/seed/core/client_wrapper.py b/seed/python-sdk/unions/union-utils/src/seed/core/client_wrapper.py index a12ded4d812..086f919bc2e 100644 --- a/seed/python-sdk/unions/union-utils/src/seed/core/client_wrapper.py +++ b/seed/python-sdk/unions/union-utils/src/seed/core/client_wrapper.py @@ -8,7 +8,16 @@ class BaseClientWrapper: - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None): + def __init__( + self, + *, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + ): + self._client_name = client_name + self._token = token self._base_url = base_url self._timeout = timeout @@ -18,8 +27,19 @@ def get_headers(self) -> typing.Dict[str, str]: "X-Fern-SDK-Name": "fern_unions", "X-Fern-SDK-Version": "0.0.1", } + if self._client_name is not None: + headers["X-Client-Name"] = self._client_name + token = self._get_token() + if token is not None: + headers["Authorization"] = f"Bearer {token}" return headers + def _get_token(self) -> typing.Optional[str]: + if isinstance(self._token, str) or self._token is None: + return self._token + else: + return self._token() + def get_base_url(self) -> str: return self._base_url @@ -28,8 +48,16 @@ def get_timeout(self) -> typing.Optional[float]: class SyncClientWrapper(BaseClientWrapper): - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client): - super().__init__(base_url=base_url, timeout=timeout) + def __init__( + self, + *, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.Client, + ): + super().__init__(client_name=client_name, token=token, base_url=base_url, timeout=timeout) self.httpx_client = HttpClient( httpx_client=httpx_client, base_headers=self.get_headers(), @@ -39,8 +67,16 @@ def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, htt class AsyncClientWrapper(BaseClientWrapper): - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient): - super().__init__(base_url=base_url, timeout=timeout) + def __init__( + self, + *, + client_name: typing.Optional[str] = None, + token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.AsyncClient, + ): + super().__init__(client_name=client_name, token=token, base_url=base_url, timeout=timeout) self.httpx_client = AsyncHttpClient( httpx_client=httpx_client, base_headers=self.get_headers(), diff --git a/seed/python-sdk/unions/union-utils/src/seed/union/client.py b/seed/python-sdk/unions/union-utils/src/seed/union/client.py index 4edd47080c0..9d7b3b0e859 100644 --- a/seed/python-sdk/unions/union-utils/src/seed/union/client.py +++ b/seed/python-sdk/unions/union-utils/src/seed/union/client.py @@ -36,6 +36,8 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non from seed.client import SeedUnions client = SeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) client.union.get( @@ -72,6 +74,8 @@ def update(self, *, request: Shape, request_options: typing.Optional[RequestOpti from seed.client import SeedUnions client = SeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) client.union.update( @@ -115,6 +119,8 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] from seed.client import AsyncSeedUnions client = AsyncSeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) await client.union.get( @@ -151,6 +157,8 @@ async def update(self, *, request: Shape, request_options: typing.Optional[Reque from seed.client import AsyncSeedUnions client = AsyncSeedUnions( + client_name="YOUR_CLIENT_NAME", + token="YOUR_TOKEN", base_url="https://yourhost.com/path/to/api", ) await client.union.update( diff --git a/seed/python-sdk/unions/union-utils/tests/conftest.py b/seed/python-sdk/unions/union-utils/tests/conftest.py index 90e183951f4..e72346584f8 100644 --- a/seed/python-sdk/unions/union-utils/tests/conftest.py +++ b/seed/python-sdk/unions/union-utils/tests/conftest.py @@ -8,9 +8,17 @@ @pytest.fixture def client() -> SeedUnions: - return SeedUnions(base_url=os.getenv("TESTS_BASE_URL", "base_url")) + return SeedUnions( + client_name=os.getenv("ENV_CLIENT_NAME", "client_name"), + token=os.getenv("ENV_TOKEN", "token"), + base_url=os.getenv("TESTS_BASE_URL", "base_url"), + ) @pytest.fixture def async_client() -> AsyncSeedUnions: - return AsyncSeedUnions(base_url=os.getenv("TESTS_BASE_URL", "base_url")) + return AsyncSeedUnions( + client_name=os.getenv("ENV_CLIENT_NAME", "client_name"), + token=os.getenv("ENV_TOKEN", "token"), + base_url=os.getenv("TESTS_BASE_URL", "base_url"), + ) diff --git a/seed/ts-sdk/api-wide-base-path/README.md b/seed/ts-sdk/api-wide-base-path/README.md index deb6ac5dc83..f706f29e1f3 100644 --- a/seed/ts-sdk/api-wide-base-path/README.md +++ b/seed/ts-sdk/api-wide-base-path/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedApiWideBasePathClient } from "@fern/api-wide-base-path"; -const seedApiWideBasePath = new SeedApiWideBasePathClient({ environment: "YOUR_BASE_URL" }); +const seedApiWideBasePath = new SeedApiWideBasePathClient(); await seedApiWideBasePath.service.post("string", "string", 1); ``` diff --git a/seed/ts-sdk/api-wide-base-path/snippet-templates.json b/seed/ts-sdk/api-wide-base-path/snippet-templates.json index 0edc2aee737..30bd0143f4d 100644 --- a/seed/ts-sdk/api-wide-base-path/snippet-templates.json +++ b/seed/ts-sdk/api-wide-base-path/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.post" }, "snippetTemplate": { - "clientInstantiation": "const seedApiWideBasePath = new SeedApiWideBasePathClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApiWideBasePath = new SeedApiWideBasePathClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApiWideBasePath.service.post(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/api-wide-base-path/snippet.json b/seed/ts-sdk/api-wide-base-path/snippet.json index eafac34fbfb..da8f878db61 100644 --- a/seed/ts-sdk/api-wide-base-path/snippet.json +++ b/seed/ts-sdk/api-wide-base-path/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiWideBasePathClient } from \"@fern/api-wide-base-path\";\n\nconst seedApiWideBasePath = new SeedApiWideBasePathClient({ environment: \"YOUR_BASE_URL\" });\nawait seedApiWideBasePath.service.post(\"string\", \"string\", 1);\n" + "client": "import { SeedApiWideBasePathClient } from \"@fern/api-wide-base-path\";\n\nconst seedApiWideBasePath = new SeedApiWideBasePathClient();\nawait seedApiWideBasePath.service.post(\"string\", \"string\", 1);\n" } } ], diff --git a/seed/ts-sdk/audiences/README.md b/seed/ts-sdk/audiences/README.md index e961decbf69..bcd14dcaae5 100644 --- a/seed/ts-sdk/audiences/README.md +++ b/seed/ts-sdk/audiences/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedAudiencesClient } from "@fern/audiences"; -const seedAudiences = new SeedAudiencesClient({ environment: "YOUR_BASE_URL" }); +const seedAudiences = new SeedAudiencesClient(); await seedAudiences.foo.find({ optionalString: "string", publicProperty: "string", diff --git a/seed/ts-sdk/audiences/snippet-templates.json b/seed/ts-sdk/audiences/snippet-templates.json index 9e7bb06cf4b..c9e9e7ece53 100644 --- a/seed/ts-sdk/audiences/snippet-templates.json +++ b/seed/ts-sdk/audiences/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_folder-a/service.getDirectThread" }, "snippetTemplate": { - "clientInstantiation": "const seedAudiences = new SeedAudiencesClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedAudiences = new SeedAudiencesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedAudiences.folderA.service.getDirectThread()", @@ -35,7 +64,36 @@ "identifierOverride": "endpoint_foo.find" }, "snippetTemplate": { - "clientInstantiation": "const seedAudiences = new SeedAudiencesClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedAudiences = new SeedAudiencesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedAudiences.foo.find(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/audiences/snippet.json b/seed/ts-sdk/audiences/snippet.json index 11ce96e18c5..48109f3b4a0 100644 --- a/seed/ts-sdk/audiences/snippet.json +++ b/seed/ts-sdk/audiences/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedAudiencesClient } from \"@fern/audiences\";\n\nconst seedAudiences = new SeedAudiencesClient({ environment: \"YOUR_BASE_URL\" });\nawait seedAudiences.folderA.service.getDirectThread();\n" + "client": "import { SeedAudiencesClient } from \"@fern/audiences\";\n\nconst seedAudiences = new SeedAudiencesClient();\nawait seedAudiences.folderA.service.getDirectThread();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedAudiencesClient } from \"@fern/audiences\";\n\nconst seedAudiences = new SeedAudiencesClient({ environment: \"YOUR_BASE_URL\" });\nawait seedAudiences.foo.find({\n optionalString: \"string\",\n publicProperty: \"string\",\n privateProperty: 1\n});\n" + "client": "import { SeedAudiencesClient } from \"@fern/audiences\";\n\nconst seedAudiences = new SeedAudiencesClient();\nawait seedAudiences.foo.find({\n optionalString: \"string\",\n publicProperty: \"string\",\n privateProperty: 1\n});\n" } } ], diff --git a/seed/ts-sdk/auth-environment-variables/README.md b/seed/ts-sdk/auth-environment-variables/README.md index c31747b501f..f1b33d45d67 100644 --- a/seed/ts-sdk/auth-environment-variables/README.md +++ b/seed/ts-sdk/auth-environment-variables/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedAuthEnvironmentVariablesClient } from "@fern/auth-environment-variables"; -const seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient({ - environment: "YOUR_BASE_URL", - apiKey: "YOUR_API_KEY", - xAnotherHeader: "YOUR_X_ANOTHER_HEADER", -}); +const seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient(); await seedAuthEnvironmentVariables.service.getWithApiKey(); ``` diff --git a/seed/ts-sdk/auth-environment-variables/snippet-templates.json b/seed/ts-sdk/auth-environment-variables/snippet-templates.json index 85c1ead38a1..4ad43562234 100644 --- a/seed/ts-sdk/auth-environment-variables/snippet-templates.json +++ b/seed/ts-sdk/auth-environment-variables/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_service.getWithApiKey" }, "snippetTemplate": { - "clientInstantiation": "const seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", apiKey: \"YOUR_API_KEY\", xAnotherHeader: \"YOUR_X_ANOTHER_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "apiKey: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xAnotherHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Another-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedAuthEnvironmentVariables.service.getWithApiKey()", @@ -35,7 +96,68 @@ "identifierOverride": "endpoint_service.getWithHeader" }, "snippetTemplate": { - "clientInstantiation": "const seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", apiKey: \"YOUR_API_KEY\", xAnotherHeader: \"YOUR_X_ANOTHER_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "apiKey: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xAnotherHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Another-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedAuthEnvironmentVariables.service.getWithHeader(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/auth-environment-variables/snippet.json b/seed/ts-sdk/auth-environment-variables/snippet.json index 9345eeeb053..f56733a2e9d 100644 --- a/seed/ts-sdk/auth-environment-variables/snippet.json +++ b/seed/ts-sdk/auth-environment-variables/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedAuthEnvironmentVariablesClient } from \"@fern/auth-environment-variables\";\n\nconst seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", apiKey: \"YOUR_API_KEY\", xAnotherHeader: \"YOUR_X_ANOTHER_HEADER\" });\nawait seedAuthEnvironmentVariables.service.getWithApiKey();\n" + "client": "import { SeedAuthEnvironmentVariablesClient } from \"@fern/auth-environment-variables\";\n\nconst seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient();\nawait seedAuthEnvironmentVariables.service.getWithApiKey();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedAuthEnvironmentVariablesClient } from \"@fern/auth-environment-variables\";\n\nconst seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", apiKey: \"YOUR_API_KEY\", xAnotherHeader: \"YOUR_X_ANOTHER_HEADER\" });\nawait seedAuthEnvironmentVariables.service.getWithHeader({\n xEndpointHeader: \"string\"\n});\n" + "client": "import { SeedAuthEnvironmentVariablesClient } from \"@fern/auth-environment-variables\";\n\nconst seedAuthEnvironmentVariables = new SeedAuthEnvironmentVariablesClient();\nawait seedAuthEnvironmentVariables.service.getWithHeader({\n xEndpointHeader: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/basic-auth-environment-variables/README.md b/seed/ts-sdk/basic-auth-environment-variables/README.md index f0eb54423a4..c74c4b039e5 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/README.md +++ b/seed/ts-sdk/basic-auth-environment-variables/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedBasicAuthEnvironmentVariablesClient } from "@fern/basic-auth-environment-variables"; -const seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient({ - environment: "YOUR_BASE_URL", - username: "YOUR_USERNAME", - password: "YOUR_PASSWORD", -}); +const seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient(); await seedBasicAuthEnvironmentVariables.basicAuth.postWithBasicAuth({ key: "value", }); diff --git a/seed/ts-sdk/basic-auth-environment-variables/snippet-templates.json b/seed/ts-sdk/basic-auth-environment-variables/snippet-templates.json index 7f8e9b2e6c6..8c0a31cdefc 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/snippet-templates.json +++ b/seed/ts-sdk/basic-auth-environment-variables/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_basic-auth.getWithBasicAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "username: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "username", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "password: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "password", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedBasicAuthEnvironmentVariables.basicAuth.getWithBasicAuth()", @@ -35,7 +96,68 @@ "identifierOverride": "endpoint_basic-auth.postWithBasicAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "username: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "username", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "password: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "password", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedBasicAuthEnvironmentVariables.basicAuth.postWithBasicAuth(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/basic-auth-environment-variables/snippet.json b/seed/ts-sdk/basic-auth-environment-variables/snippet.json index 1cfea7c6f16..b447a9b5fa5 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/snippet.json +++ b/seed/ts-sdk/basic-auth-environment-variables/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedBasicAuthEnvironmentVariablesClient } from \"@fern/basic-auth-environment-variables\";\n\nconst seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\nawait seedBasicAuthEnvironmentVariables.basicAuth.getWithBasicAuth();\n" + "client": "import { SeedBasicAuthEnvironmentVariablesClient } from \"@fern/basic-auth-environment-variables\";\n\nconst seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient();\nawait seedBasicAuthEnvironmentVariables.basicAuth.getWithBasicAuth();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedBasicAuthEnvironmentVariablesClient } from \"@fern/basic-auth-environment-variables\";\n\nconst seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\nawait seedBasicAuthEnvironmentVariables.basicAuth.postWithBasicAuth({\n \"key\": \"value\"\n});\n" + "client": "import { SeedBasicAuthEnvironmentVariablesClient } from \"@fern/basic-auth-environment-variables\";\n\nconst seedBasicAuthEnvironmentVariables = new SeedBasicAuthEnvironmentVariablesClient();\nawait seedBasicAuthEnvironmentVariables.basicAuth.postWithBasicAuth({\n \"key\": \"value\"\n});\n" } } ], diff --git a/seed/ts-sdk/basic-auth/README.md b/seed/ts-sdk/basic-auth/README.md index 8110fb7ce55..610e22e31a6 100644 --- a/seed/ts-sdk/basic-auth/README.md +++ b/seed/ts-sdk/basic-auth/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedBasicAuthClient } from "@fern/basic-auth"; -const seedBasicAuth = new SeedBasicAuthClient({ - environment: "YOUR_BASE_URL", - username: "YOUR_USERNAME", - password: "YOUR_PASSWORD", -}); +const seedBasicAuth = new SeedBasicAuthClient(); await seedBasicAuth.basicAuth.postWithBasicAuth({ key: "value", }); diff --git a/seed/ts-sdk/basic-auth/snippet-templates.json b/seed/ts-sdk/basic-auth/snippet-templates.json index 5a28a47b60f..b6ab0c61423 100644 --- a/seed/ts-sdk/basic-auth/snippet-templates.json +++ b/seed/ts-sdk/basic-auth/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_basic-auth.getWithBasicAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedBasicAuth = new SeedBasicAuthClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedBasicAuth = new SeedBasicAuthClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "username: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "username", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "password: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "password", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedBasicAuth.basicAuth.getWithBasicAuth()", @@ -35,7 +96,68 @@ "identifierOverride": "endpoint_basic-auth.postWithBasicAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedBasicAuth = new SeedBasicAuthClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedBasicAuth = new SeedBasicAuthClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "username: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "username", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "password: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "password", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedBasicAuth.basicAuth.postWithBasicAuth(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/basic-auth/snippet.json b/seed/ts-sdk/basic-auth/snippet.json index 8089a760357..fe82db71242 100644 --- a/seed/ts-sdk/basic-auth/snippet.json +++ b/seed/ts-sdk/basic-auth/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedBasicAuthClient } from \"@fern/basic-auth\";\n\nconst seedBasicAuth = new SeedBasicAuthClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\nawait seedBasicAuth.basicAuth.getWithBasicAuth();\n" + "client": "import { SeedBasicAuthClient } from \"@fern/basic-auth\";\n\nconst seedBasicAuth = new SeedBasicAuthClient();\nawait seedBasicAuth.basicAuth.getWithBasicAuth();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedBasicAuthClient } from \"@fern/basic-auth\";\n\nconst seedBasicAuth = new SeedBasicAuthClient({ environment: \"YOUR_BASE_URL\", username: \"YOUR_USERNAME\", password: \"YOUR_PASSWORD\" });\nawait seedBasicAuth.basicAuth.postWithBasicAuth({\n \"key\": \"value\"\n});\n" + "client": "import { SeedBasicAuthClient } from \"@fern/basic-auth\";\n\nconst seedBasicAuth = new SeedBasicAuthClient();\nawait seedBasicAuth.basicAuth.postWithBasicAuth({\n \"key\": \"value\"\n});\n" } } ], diff --git a/seed/ts-sdk/bearer-token-environment-variable/README.md b/seed/ts-sdk/bearer-token-environment-variable/README.md index 995d74bb9b7..07bf911524b 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/README.md +++ b/seed/ts-sdk/bearer-token-environment-variable/README.md @@ -18,10 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedBearerTokenEnvironmentVariableClient } from "@fern/bearer-token-environment-variable"; -const seedBearerTokenEnvironmentVariable = new SeedBearerTokenEnvironmentVariableClient({ - environment: "YOUR_BASE_URL", - apiKey: "YOUR_API_KEY", -}); +const seedBearerTokenEnvironmentVariable = new SeedBearerTokenEnvironmentVariableClient(); await seedBearerTokenEnvironmentVariable.service.getWithBearerToken(); ``` diff --git a/seed/ts-sdk/bearer-token-environment-variable/snippet-templates.json b/seed/ts-sdk/bearer-token-environment-variable/snippet-templates.json index 990a7dfeaa6..aab08d9d77c 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/snippet-templates.json +++ b/seed/ts-sdk/bearer-token-environment-variable/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_service.getWithBearerToken" }, "snippetTemplate": { - "clientInstantiation": "const seedBearerTokenEnvironmentVariable = new SeedBearerTokenEnvironmentVariableClient({ environment: \"YOUR_BASE_URL\", apiKey: \"YOUR_API_KEY\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedBearerTokenEnvironmentVariable = new SeedBearerTokenEnvironmentVariableClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "apiKey: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedBearerTokenEnvironmentVariable.service.getWithBearerToken()", diff --git a/seed/ts-sdk/bearer-token-environment-variable/snippet.json b/seed/ts-sdk/bearer-token-environment-variable/snippet.json index eca983e5ba3..23e4adf664c 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/snippet.json +++ b/seed/ts-sdk/bearer-token-environment-variable/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedBearerTokenEnvironmentVariableClient } from \"@fern/bearer-token-environment-variable\";\n\nconst seedBearerTokenEnvironmentVariable = new SeedBearerTokenEnvironmentVariableClient({ environment: \"YOUR_BASE_URL\", apiKey: \"YOUR_API_KEY\" });\nawait seedBearerTokenEnvironmentVariable.service.getWithBearerToken();\n" + "client": "import { SeedBearerTokenEnvironmentVariableClient } from \"@fern/bearer-token-environment-variable\";\n\nconst seedBearerTokenEnvironmentVariable = new SeedBearerTokenEnvironmentVariableClient();\nawait seedBearerTokenEnvironmentVariable.service.getWithBearerToken();\n" } } ], diff --git a/seed/ts-sdk/code-samples/README.md b/seed/ts-sdk/code-samples/README.md index 33f4465f637..674afc5a869 100644 --- a/seed/ts-sdk/code-samples/README.md +++ b/seed/ts-sdk/code-samples/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedCodeSamplesClient } from "@fern/code-samples"; -const seedCodeSamples = new SeedCodeSamplesClient({ environment: "YOUR_BASE_URL" }); +const seedCodeSamples = new SeedCodeSamplesClient(); await seedCodeSamples.service.hello({ numEvents: 5, }); diff --git a/seed/ts-sdk/code-samples/snippet-templates.json b/seed/ts-sdk/code-samples/snippet-templates.json index 06526e2109b..18ce8fb6e19 100644 --- a/seed/ts-sdk/code-samples/snippet-templates.json +++ b/seed/ts-sdk/code-samples/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.hello" }, "snippetTemplate": { - "clientInstantiation": "const seedCodeSamples = new SeedCodeSamplesClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedCodeSamples = new SeedCodeSamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedCodeSamples.service.hello(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/code-samples/snippet.json b/seed/ts-sdk/code-samples/snippet.json index 868b507a9c3..3fa1382453a 100644 --- a/seed/ts-sdk/code-samples/snippet.json +++ b/seed/ts-sdk/code-samples/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedCodeSamplesClient } from \"@fern/code-samples\";\n\nconst seedCodeSamples = new SeedCodeSamplesClient({ environment: \"YOUR_BASE_URL\" });\nawait seedCodeSamples.service.hello({\n numEvents: 5\n});\n" + "client": "import { SeedCodeSamplesClient } from \"@fern/code-samples\";\n\nconst seedCodeSamples = new SeedCodeSamplesClient();\nawait seedCodeSamples.service.hello({\n numEvents: 5\n});\n" } } ], diff --git a/seed/ts-sdk/custom-auth/README.md b/seed/ts-sdk/custom-auth/README.md index b8c9cacb473..68e49a0e154 100644 --- a/seed/ts-sdk/custom-auth/README.md +++ b/seed/ts-sdk/custom-auth/README.md @@ -18,10 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedCustomAuthClient } from "@fern/custom-auth"; -const seedCustomAuth = new SeedCustomAuthClient({ - environment: "YOUR_BASE_URL", - customAuthScheme: "YOUR_CUSTOM_AUTH_SCHEME", -}); +const seedCustomAuth = new SeedCustomAuthClient(); await seedCustomAuth.customAuth.postWithCustomAuth({ key: "value", }); diff --git a/seed/ts-sdk/custom-auth/snippet-templates.json b/seed/ts-sdk/custom-auth/snippet-templates.json index e3a116608d9..e18281b510a 100644 --- a/seed/ts-sdk/custom-auth/snippet-templates.json +++ b/seed/ts-sdk/custom-auth/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_custom-auth.getWithCustomAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedCustomAuth = new SeedCustomAuthClient({ environment: \"YOUR_BASE_URL\", customAuthScheme: \"YOUR_CUSTOM_AUTH_SCHEME\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedCustomAuth = new SeedCustomAuthClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "customAuthScheme: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedCustomAuth.customAuth.getWithCustomAuth()", @@ -35,7 +80,52 @@ "identifierOverride": "endpoint_custom-auth.postWithCustomAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedCustomAuth = new SeedCustomAuthClient({ environment: \"YOUR_BASE_URL\", customAuthScheme: \"YOUR_CUSTOM_AUTH_SCHEME\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedCustomAuth = new SeedCustomAuthClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "customAuthScheme: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedCustomAuth.customAuth.postWithCustomAuth(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/custom-auth/snippet.json b/seed/ts-sdk/custom-auth/snippet.json index 0f8f3f55075..99fb0ad6f18 100644 --- a/seed/ts-sdk/custom-auth/snippet.json +++ b/seed/ts-sdk/custom-auth/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedCustomAuthClient } from \"@fern/custom-auth\";\n\nconst seedCustomAuth = new SeedCustomAuthClient({ environment: \"YOUR_BASE_URL\", customAuthScheme: \"YOUR_CUSTOM_AUTH_SCHEME\" });\nawait seedCustomAuth.customAuth.getWithCustomAuth();\n" + "client": "import { SeedCustomAuthClient } from \"@fern/custom-auth\";\n\nconst seedCustomAuth = new SeedCustomAuthClient();\nawait seedCustomAuth.customAuth.getWithCustomAuth();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedCustomAuthClient } from \"@fern/custom-auth\";\n\nconst seedCustomAuth = new SeedCustomAuthClient({ environment: \"YOUR_BASE_URL\", customAuthScheme: \"YOUR_CUSTOM_AUTH_SCHEME\" });\nawait seedCustomAuth.customAuth.postWithCustomAuth({\n \"key\": \"value\"\n});\n" + "client": "import { SeedCustomAuthClient } from \"@fern/custom-auth\";\n\nconst seedCustomAuth = new SeedCustomAuthClient();\nawait seedCustomAuth.customAuth.postWithCustomAuth({\n \"key\": \"value\"\n});\n" } } ], diff --git a/seed/ts-sdk/enum/README.md b/seed/ts-sdk/enum/README.md index d2170afb5f5..9173fc52c06 100644 --- a/seed/ts-sdk/enum/README.md +++ b/seed/ts-sdk/enum/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedEnumClient, SeedEnum } from "@fern/enum"; -const seedEnum = new SeedEnumClient({ environment: "YOUR_BASE_URL" }); +const seedEnum = new SeedEnumClient(); await seedEnum.inlinedRequest.send({ operand: SeedEnum.Operand.GreaterThan, operandOrColor: SeedEnum.Color.Red, diff --git a/seed/ts-sdk/enum/snippet-templates.json b/seed/ts-sdk/enum/snippet-templates.json index ad8e5ce1910..0a2cb9176dd 100644 --- a/seed/ts-sdk/enum/snippet-templates.json +++ b/seed/ts-sdk/enum/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_inlined-request.send" }, "snippetTemplate": { - "clientInstantiation": "const seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedEnum = new SeedEnumClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedEnum.inlinedRequest.send(\n\t$FERN_INPUT\n)", @@ -86,7 +115,36 @@ "identifierOverride": "endpoint_path-param.send" }, "snippetTemplate": { - "clientInstantiation": "const seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedEnum = new SeedEnumClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedEnum.pathParam.send(\n\t$FERN_INPUT\n)", @@ -161,7 +219,36 @@ "identifierOverride": "endpoint_query-param.send" }, "snippetTemplate": { - "clientInstantiation": "const seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedEnum = new SeedEnumClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedEnum.queryParam.send(\n\t$FERN_INPUT\n)", @@ -236,7 +323,36 @@ "identifierOverride": "endpoint_query-param.sendList" }, "snippetTemplate": { - "clientInstantiation": "const seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedEnum = new SeedEnumClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedEnum.queryParam.sendList(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/enum/snippet.json b/seed/ts-sdk/enum/snippet.json index d5aaec1c588..d0b70fb2441 100644 --- a/seed/ts-sdk/enum/snippet.json +++ b/seed/ts-sdk/enum/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\nawait seedEnum.inlinedRequest.send({\n operand: SeedEnum.Operand.GreaterThan,\n operandOrColor: SeedEnum.Color.Red\n});\n" + "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient();\nawait seedEnum.inlinedRequest.send({\n operand: SeedEnum.Operand.GreaterThan,\n operandOrColor: SeedEnum.Color.Red\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\nawait seedEnum.pathParam.send(SeedEnum.Operand.GreaterThan, SeedEnum.Operand.LessThan, SeedEnum.Color.Red, SeedEnum.Color.Red);\n" + "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient();\nawait seedEnum.pathParam.send(SeedEnum.Operand.GreaterThan, SeedEnum.Operand.LessThan, SeedEnum.Color.Red, SeedEnum.Color.Red);\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\nawait seedEnum.queryParam.send({\n operand: SeedEnum.Operand.GreaterThan,\n operandOrColor: SeedEnum.Color.Red\n});\n" + "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient();\nawait seedEnum.queryParam.send({\n operand: SeedEnum.Operand.GreaterThan,\n operandOrColor: SeedEnum.Color.Red\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient({ environment: \"YOUR_BASE_URL\" });\nawait seedEnum.queryParam.sendList({\n operand: SeedEnum.Operand.GreaterThan,\n maybeOperand: SeedEnum.Operand.GreaterThan,\n operandOrColor: SeedEnum.Color.Red,\n maybeOperandOrColor: SeedEnum.Color.Red\n});\n" + "client": "import { SeedEnumClient, SeedEnum } from \"@fern/enum\";\n\nconst seedEnum = new SeedEnumClient();\nawait seedEnum.queryParam.sendList({\n operand: SeedEnum.Operand.GreaterThan,\n maybeOperand: SeedEnum.Operand.GreaterThan,\n operandOrColor: SeedEnum.Color.Red,\n maybeOperandOrColor: SeedEnum.Color.Red\n});\n" } } ], diff --git a/seed/ts-sdk/error-property/union-utils/README.md b/seed/ts-sdk/error-property/union-utils/README.md index 3e4e222a36d..1d2a9f1e3ac 100644 --- a/seed/ts-sdk/error-property/union-utils/README.md +++ b/seed/ts-sdk/error-property/union-utils/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedErrorPropertyClient } from "@fern/error-property"; -const seedErrorProperty = new SeedErrorPropertyClient({ environment: "YOUR_BASE_URL" }); +const seedErrorProperty = new SeedErrorPropertyClient(); await seedErrorProperty.propertyBasedError.throwError(); ``` diff --git a/seed/ts-sdk/error-property/union-utils/snippet-templates.json b/seed/ts-sdk/error-property/union-utils/snippet-templates.json index f59ec39076e..17f89b8ca3d 100644 --- a/seed/ts-sdk/error-property/union-utils/snippet-templates.json +++ b/seed/ts-sdk/error-property/union-utils/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_property-based-error.ThrowError" }, "snippetTemplate": { - "clientInstantiation": "const seedErrorProperty = new SeedErrorPropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedErrorProperty = new SeedErrorPropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedErrorProperty.propertyBasedError.throwError()", diff --git a/seed/ts-sdk/error-property/union-utils/snippet.json b/seed/ts-sdk/error-property/union-utils/snippet.json index ea0b790414e..6a19e41211f 100644 --- a/seed/ts-sdk/error-property/union-utils/snippet.json +++ b/seed/ts-sdk/error-property/union-utils/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedErrorPropertyClient } from \"@fern/error-property\";\n\nconst seedErrorProperty = new SeedErrorPropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedErrorProperty.propertyBasedError.throwError();\n" + "client": "import { SeedErrorPropertyClient } from \"@fern/error-property\";\n\nconst seedErrorProperty = new SeedErrorPropertyClient();\nawait seedErrorProperty.propertyBasedError.throwError();\n" } } ], diff --git a/seed/ts-sdk/examples/examples-with-api-reference/README.md b/seed/ts-sdk/examples/examples-with-api-reference/README.md index 7bf93934dfe..d3bf23ce1d5 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/README.md +++ b/seed/ts-sdk/examples/examples-with-api-reference/README.md @@ -22,13 +22,9 @@ npm i -s @fern/examples Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedExamplesClient } from "@fern/examples"; -const seedExamples = new SeedExamplesClient({ - environment: environments.SeedExamplesEnvironment.Production, - token: "YOUR_TOKEN", -}); +const seedExamples = new SeedExamplesClient(); await seedExamples.service.createMovie({ id: "movie-c06a4ad7", prequel: "movie-cv9b914f", diff --git a/seed/ts-sdk/examples/examples-with-api-reference/snippet-templates.json b/seed/ts-sdk/examples/examples-with-api-reference/snippet-templates.json index 7241d4e30a2..ad545699365 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/snippet-templates.json +++ b/seed/ts-sdk/examples/examples-with-api-reference/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_.echo" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.echo(\n\t$FERN_INPUT\n)", @@ -63,7 +108,52 @@ "identifierOverride": "endpoint_file/notification/service.getException" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.file.notification.service.getException(\n\t$FERN_INPUT\n)", @@ -116,7 +206,52 @@ "identifierOverride": "endpoint_file/service.getFile" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.file.service.getFile(\n\t$FERN_INPUT\n)", @@ -169,7 +304,52 @@ "identifierOverride": "endpoint_health/service.check" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.health.service.check(\n\t$FERN_INPUT\n)", @@ -222,7 +402,52 @@ "identifierOverride": "endpoint_health/service.ping" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.health.service.ping()", @@ -246,7 +471,52 @@ "identifierOverride": "endpoint_service.getMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.getMovie(\n\t$FERN_INPUT\n)", @@ -299,7 +569,52 @@ "identifierOverride": "endpoint_service.createMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.createMovie(\n\t$FERN_INPUT\n)", @@ -500,7 +815,52 @@ "identifierOverride": "endpoint_service.getMetadata" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.getMetadata(\n\t$FERN_INPUT\n)", @@ -585,7 +945,52 @@ "identifierOverride": "endpoint_service.getResponse" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.getResponse()", diff --git a/seed/ts-sdk/examples/examples-with-api-reference/snippet.json b/seed/ts-sdk/examples/examples-with-api-reference/snippet.json index 2a2884ddbdc..3f8e379604d 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/snippet.json +++ b/seed/ts-sdk/examples/examples-with-api-reference/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.echo(\"Hello world!\\\\n\\\\nwith\\\\n\\\\tnewlines\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.echo(\"Hello world!\\\\n\\\\nwith\\\\n\\\\tnewlines\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.file.notification.service.getException(\"notification-hsy129x\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.file.notification.service.getException(\"notification-hsy129x\");\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.file.service.getFile(\"file.txt\", {\n xFileApiVersion: \"0.0.2\"\n});\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.file.service.getFile(\"file.txt\", {\n xFileApiVersion: \"0.0.2\"\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.health.service.check(\"id-2sdx82h\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.health.service.check(\"id-2sdx82h\");\n" }, "example_identifier": "Example0" }, @@ -53,7 +53,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.health.service.check(\"id-3tey93i\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.health.service.check(\"id-3tey93i\");\n" }, "example_identifier": "Example2" }, @@ -65,7 +65,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.health.service.ping();\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.health.service.ping();\n" }, "example_identifier": "Example0" }, @@ -77,7 +77,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.getMovie(\"movie-c06a4ad7\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.getMovie(\"movie-c06a4ad7\");\n" } }, { @@ -88,7 +88,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.createMovie({\n id: \"movie-c06a4ad7\",\n prequel: \"movie-cv9b914f\",\n title: \"The Boy and the Heron\",\n from: \"Hayao Miyazaki\",\n rating: 8,\n type: \"movie\",\n tag: \"tag-wf9as23d\",\n metadata: {\n \"actors\": [\n \"Christian Bale\",\n \"Florence Pugh\",\n \"Willem Dafoe\"\n ],\n \"releaseDate\": \"2023-12-08\",\n \"ratings\": {\n \"rottenTomatoes\": 97,\n \"imdb\": 7.6\n }\n }\n});\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.createMovie({\n id: \"movie-c06a4ad7\",\n prequel: \"movie-cv9b914f\",\n title: \"The Boy and the Heron\",\n from: \"Hayao Miyazaki\",\n rating: 8,\n type: \"movie\",\n tag: \"tag-wf9as23d\",\n metadata: {\n \"actors\": [\n \"Christian Bale\",\n \"Florence Pugh\",\n \"Willem Dafoe\"\n ],\n \"releaseDate\": \"2023-12-08\",\n \"ratings\": {\n \"rottenTomatoes\": 97,\n \"imdb\": 7.6\n }\n }\n});\n" } }, { @@ -99,7 +99,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.getMetadata({\n xApiVersion: \"0.0.1\",\n shallow: false,\n tag: \"development\"\n});\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.getMetadata({\n xApiVersion: \"0.0.1\",\n shallow: false,\n tag: \"development\"\n});\n" } }, { @@ -110,7 +110,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.getResponse();\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.getResponse();\n" } } ], diff --git a/seed/ts-sdk/examples/retain-original-casing/README.md b/seed/ts-sdk/examples/retain-original-casing/README.md index a170ea7108b..9fd2306cb32 100644 --- a/seed/ts-sdk/examples/retain-original-casing/README.md +++ b/seed/ts-sdk/examples/retain-original-casing/README.md @@ -16,13 +16,9 @@ npm i -s @fern/examples Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedExamplesClient } from "@fern/examples"; -const seedExamples = new SeedExamplesClient({ - environment: environments.SeedExamplesEnvironment.Production, - token: "YOUR_TOKEN", -}); +const seedExamples = new SeedExamplesClient(); await seedExamples.echo("Hello world!\\n\\nwith\\n\\tnewlines"); ``` diff --git a/seed/ts-sdk/examples/retain-original-casing/snippet-templates.json b/seed/ts-sdk/examples/retain-original-casing/snippet-templates.json index f2212bdab8c..fbffde25478 100644 --- a/seed/ts-sdk/examples/retain-original-casing/snippet-templates.json +++ b/seed/ts-sdk/examples/retain-original-casing/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_.echo" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.echo(\n\t$FERN_INPUT\n)", @@ -63,7 +108,52 @@ "identifierOverride": "endpoint_file/notification/service.getException" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.file.notification.service.getException(\n\t$FERN_INPUT\n)", @@ -116,7 +206,52 @@ "identifierOverride": "endpoint_file/service.getFile" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.file.service.getFile(\n\t$FERN_INPUT\n)", @@ -169,7 +304,52 @@ "identifierOverride": "endpoint_health/service.check" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.health.service.check(\n\t$FERN_INPUT\n)", @@ -222,7 +402,52 @@ "identifierOverride": "endpoint_health/service.ping" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.health.service.ping()", @@ -246,7 +471,52 @@ "identifierOverride": "endpoint_service.getMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.getMovie(\n\t$FERN_INPUT\n)", @@ -299,7 +569,52 @@ "identifierOverride": "endpoint_service.createMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.createMovie(\n\t$FERN_INPUT\n)", @@ -500,7 +815,52 @@ "identifierOverride": "endpoint_service.getMetadata" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.getMetadata(\n\t$FERN_INPUT\n)", @@ -585,7 +945,52 @@ "identifierOverride": "endpoint_service.getResponse" }, "snippetTemplate": { - "clientInstantiation": "const seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExamples = new SeedExamplesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedExamplesEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExamples.service.getResponse()", diff --git a/seed/ts-sdk/examples/retain-original-casing/snippet.json b/seed/ts-sdk/examples/retain-original-casing/snippet.json index 81709c0bc53..bec3e6a72ea 100644 --- a/seed/ts-sdk/examples/retain-original-casing/snippet.json +++ b/seed/ts-sdk/examples/retain-original-casing/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.echo(\"Hello world!\\\\n\\\\nwith\\\\n\\\\tnewlines\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.echo(\"Hello world!\\\\n\\\\nwith\\\\n\\\\tnewlines\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.file.notification.service.getException(\"notification-hsy129x\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.file.notification.service.getException(\"notification-hsy129x\");\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.file.service.getFile(\"file.txt\", {\n \"X-File-API-Version\": \"0.0.2\"\n});\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.file.service.getFile(\"file.txt\", {\n \"X-File-API-Version\": \"0.0.2\"\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.health.service.check(\"id-2sdx82h\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.health.service.check(\"id-2sdx82h\");\n" }, "example_identifier": "Example0" }, @@ -53,7 +53,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.health.service.check(\"id-3tey93i\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.health.service.check(\"id-3tey93i\");\n" }, "example_identifier": "Example2" }, @@ -65,7 +65,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.health.service.ping();\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.health.service.ping();\n" }, "example_identifier": "Example0" }, @@ -77,7 +77,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.getMovie(\"movie-c06a4ad7\");\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.getMovie(\"movie-c06a4ad7\");\n" } }, { @@ -88,7 +88,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.createMovie({\n id: \"movie-c06a4ad7\",\n prequel: \"movie-cv9b914f\",\n title: \"The Boy and the Heron\",\n from: \"Hayao Miyazaki\",\n rating: 8,\n type: \"movie\",\n tag: \"tag-wf9as23d\",\n metadata: {\n \"actors\": [\n \"Christian Bale\",\n \"Florence Pugh\",\n \"Willem Dafoe\"\n ],\n \"releaseDate\": \"2023-12-08\",\n \"ratings\": {\n \"rottenTomatoes\": 97,\n \"imdb\": 7.6\n }\n }\n});\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.createMovie({\n id: \"movie-c06a4ad7\",\n prequel: \"movie-cv9b914f\",\n title: \"The Boy and the Heron\",\n from: \"Hayao Miyazaki\",\n rating: 8,\n type: \"movie\",\n tag: \"tag-wf9as23d\",\n metadata: {\n \"actors\": [\n \"Christian Bale\",\n \"Florence Pugh\",\n \"Willem Dafoe\"\n ],\n \"releaseDate\": \"2023-12-08\",\n \"ratings\": {\n \"rottenTomatoes\": 97,\n \"imdb\": 7.6\n }\n }\n});\n" } }, { @@ -99,7 +99,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.getMetadata({\n \"X-API-Version\": \"0.0.1\",\n shallow: false,\n tag: \"development\"\n});\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.getMetadata({\n \"X-API-Version\": \"0.0.1\",\n shallow: false,\n tag: \"development\"\n});\n" } }, { @@ -110,7 +110,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient({ environment: environments.SeedExamplesEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedExamples.service.getResponse();\n" + "client": "import { SeedExamplesClient } from \"@fern/examples\";\n\nconst seedExamples = new SeedExamplesClient();\nawait seedExamples.service.getResponse();\n" } } ], diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/.mock/definition/types/object.yml b/seed/ts-sdk/exhaustive/allow-extra-fields/.mock/definition/types/object.yml index 99fe16dd1b7..b4ac4c13534 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/.mock/definition/types/object.yml +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/.mock/definition/types/object.yml @@ -13,7 +13,6 @@ types: list: optional> set: optional> map: optional> - bigint: optional ObjectWithRequiredField: properties: diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/README.md b/seed/ts-sdk/exhaustive/allow-extra-fields/README.md index 7e86a82f580..2d48e9f3846 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/README.md +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedExhaustiveClient } from "@fern/exhaustive"; -const seedExhaustive = new SeedExhaustiveClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const seedExhaustive = new SeedExhaustiveClient(); await seedExhaustive.endpoints.container.getAndReturnListOfPrimitives(["string"]); ``` diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/snippet-templates.json b/seed/ts-sdk/exhaustive/allow-extra-fields/snippet-templates.json index 0b3e6a10e39..e0df8c41bce 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/snippet-templates.json +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnListOfPrimitives(\n\t$FERN_INPUT\n)", @@ -74,7 +119,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnListOfObjects(\n\t$FERN_INPUT\n)", @@ -150,7 +240,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(\n\t$FERN_INPUT\n)", @@ -213,7 +348,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnSetOfObjects(\n\t$FERN_INPUT\n)", @@ -289,7 +469,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim(\n\t$FERN_INPUT\n)", @@ -365,7 +590,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject(\n\t$FERN_INPUT\n)", @@ -454,7 +724,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnOptional" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnOptional(\n\t$FERN_INPUT\n)", @@ -519,29 +834,74 @@ "identifierOverride": "endpoint_endpoints/enum.getAndReturnEnum" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "values": { - "SUNNY": "SeedExhaustive.WeatherReport.Sunny", - "CLOUDY": "SeedExhaustive.WeatherReport.Cloudy", - "RAINING": "SeedExhaustive.WeatherReport.Raining", - "SNOWING": "SeedExhaustive.WeatherReport.Snowing" + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "SeedExhaustive.WeatherReport.Sunny", + "CLOUDY": "SeedExhaustive.WeatherReport.Cloudy", + "RAINING": "SeedExhaustive.WeatherReport.Raining", + "SNOWING": "SeedExhaustive.WeatherReport.Snowing" }, "templateString": "$FERN_INPUT", "templateInput": { @@ -575,7 +935,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testGet" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testGet(\n\t$FERN_INPUT\n)", @@ -628,7 +1033,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPost" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPost(\n\t$FERN_INPUT\n)", @@ -693,7 +1143,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPut" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPut(\n\t$FERN_INPUT\n)", @@ -786,7 +1281,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPatch" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPatch(\n\t$FERN_INPUT\n)", @@ -1072,22 +1612,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1117,7 +1641,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testDelete" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testDelete(\n\t$FERN_INPUT\n)", @@ -1170,34 +1739,79 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t", + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { "location": "BODY", "path": "string", "type": "payload" @@ -1428,22 +2042,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1473,7 +2071,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithRequiredField(\n\t$FERN_INPUT\n)", @@ -1538,7 +2181,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithMapOfMap" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithMapOfMap(\n\t$FERN_INPUT\n)", @@ -1651,7 +2339,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField(\n\t$FERN_INPUT\n)", @@ -1932,22 +2665,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1982,7 +2699,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\n\t$FERN_INPUT\n)", @@ -2291,22 +3053,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2341,50 +3087,95 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", - "delimiter": ",\n\t\t\t", - "innerTemplate": { - "imports": [], - "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "string", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { "imports": [], "templateString": "nestedObject: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", "isOptional": true, @@ -2627,22 +3418,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2683,7 +3458,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPath" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithPath(\n\t$FERN_INPUT\n)", @@ -2736,7 +3556,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithQuery(\n\t$FERN_INPUT\n)", @@ -2805,7 +3670,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithAllowMultipleQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithAllowMultipleQuery(\n\t$FERN_INPUT\n)", @@ -2874,7 +3784,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPathAndQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithPathAndQuery(\n\t$FERN_INPUT\n)", @@ -2955,7 +3910,52 @@ "identifierOverride": "endpoint_endpoints/params.modifyWithPath" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.modifyWithPath(\n\t$FERN_INPUT\n)", @@ -3035,7 +4035,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnString" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnString(\n\t$FERN_INPUT\n)", @@ -3087,7 +4132,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnInt" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnInt(\n\t$FERN_INPUT\n)", @@ -3139,7 +4229,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnLong" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnLong(\n\t$FERN_INPUT\n)", @@ -3191,7 +4326,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDouble" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDouble(\n\t$FERN_INPUT\n)", @@ -3243,7 +4423,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBool" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBool(\n\t$FERN_INPUT\n)", @@ -3295,7 +4520,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDatetime" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDatetime(\n\t$FERN_INPUT\n)", @@ -3347,28 +4617,231 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDate" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/uuid", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/base64", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippetTemplate": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3384,25 +4857,9 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/primitive/uuid", - "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" - }, - "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [ @@ -3446,33 +4903,42 @@ "type": "typescript" }, "endpointId": { - "path": "/primitive/base64", + "path": "/union", "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3488,22 +4954,6 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/union", - "method": "POST", - "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" - }, - "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.union.getAndReturnUnion(\n\t$FERN_INPUT\n)", @@ -3660,7 +5110,52 @@ "identifierOverride": "endpoint_inlined-requests.postWithObjectBodyandResponse" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.inlinedRequests.postWithObjectBodyandResponse(\n\t$FERN_INPUT\n)", @@ -3950,22 +5445,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -3995,7 +5474,52 @@ "identifierOverride": "endpoint_no-auth.postWithNoAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noAuth.postWithNoAuth(\n\t$FERN_INPUT\n)", @@ -4047,7 +5571,52 @@ "identifierOverride": "endpoint_no-req-body.getWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noReqBody.getWithNoRequestBody()", @@ -4071,7 +5640,52 @@ "identifierOverride": "endpoint_no-req-body.postWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noReqBody.postWithNoRequestBody()", @@ -4095,7 +5709,52 @@ "identifierOverride": "endpoint_req-with-headers.getWithCustomHeader" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.reqWithHeaders.getWithCustomHeader(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json b/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json index 0323bee80a5..4bc7e8b14ed 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient, SeedExhaustive } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.enum.getAndReturnEnum(SeedExhaustive.WeatherReport.Sunny);\n" + "client": "import { SeedExhaustiveClient, SeedExhaustive } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.enum.getAndReturnEnum(SeedExhaustive.WeatherReport.Sunny);\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testGet(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testGet(\"string\");\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testDelete(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testDelete(\"string\");\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n }]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n }]);\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithPath(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithPath(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.modifyWithPath(\"string\", \"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.modifyWithPath(\"string\", \"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnString(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnString(\"string\");\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnInt(1);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnInt(1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnLong(1000000);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnLong(1000000);\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDouble(1.1);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDouble(1.1);\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnBool(true);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnBool(true);\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.union.getAndReturnUnion({\n animal: \"dog\",\n name: \"string\",\n likesToWoof: true\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.union.getAndReturnUnion({\n animal: \"dog\",\n name: \"string\",\n likesToWoof: true\n});\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -393,7 +393,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" } }, { @@ -404,7 +404,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noReqBody.getWithNoRequestBody();\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noReqBody.getWithNoRequestBody();\n" } }, { @@ -415,7 +415,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noReqBody.postWithNoRequestBody();\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noReqBody.postWithNoRequestBody();\n" } }, { @@ -426,7 +426,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/httpMethods/client/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/httpMethods/client/Client.ts index 165766018b4..7d1ef983314 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/httpMethods/client/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/httpMethods/client/Client.ts @@ -231,8 +231,7 @@ export class HttpMethods { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async testPatch( diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts index 4737f6163df..42d50886358 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts @@ -43,8 +43,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async getAndReturnWithOptionalField( @@ -264,8 +263,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -350,8 +348,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -436,8 +433,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }]) */ diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/Client.ts index 9b1bb296ae4..3a0cdbae927 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/Client.ts @@ -50,8 +50,7 @@ export class InlinedRequests { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts index b9933caa432..65b501a19b7 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts @@ -23,8 +23,7 @@ import * as SeedExhaustive from "../../../../index"; * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * } */ diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts index 691cc9d6e29..fa6da43453c 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -15,5 +15,4 @@ export interface ObjectWithOptionalField { list?: string[]; set?: Set; map?: Record; - bigint?: string; } diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts index ec3ca233d7d..69f147a2c7e 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -22,7 +22,6 @@ export const ObjectWithOptionalField: core.serialization.ObjectSchema< list: core.serialization.list(core.serialization.string()).optional(), set: core.serialization.set(core.serialization.string()).optional(), map: core.serialization.record(core.serialization.number(), core.serialization.string()).optional(), - bigint: core.serialization.string().optional(), }); export declare namespace ObjectWithOptionalField { @@ -39,6 +38,5 @@ export declare namespace ObjectWithOptionalField { list?: string[] | null; set?: string[] | null; map?: Record | null; - bigint?: string | null; } } diff --git a/seed/ts-sdk/exhaustive/bundle/.mock/definition/types/object.yml b/seed/ts-sdk/exhaustive/bundle/.mock/definition/types/object.yml index 99fe16dd1b7..b4ac4c13534 100644 --- a/seed/ts-sdk/exhaustive/bundle/.mock/definition/types/object.yml +++ b/seed/ts-sdk/exhaustive/bundle/.mock/definition/types/object.yml @@ -13,7 +13,6 @@ types: list: optional> set: optional> map: optional> - bigint: optional ObjectWithRequiredField: properties: diff --git a/seed/ts-sdk/exhaustive/bundle/README.md b/seed/ts-sdk/exhaustive/bundle/README.md index 3480c30aa7b..4776f599624 100644 --- a/seed/ts-sdk/exhaustive/bundle/README.md +++ b/seed/ts-sdk/exhaustive/bundle/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { FiddleClient } from "@fern/exhaustive"; -const fiddle = new FiddleClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const fiddle = new FiddleClient(); await fiddle.endpoints.container.getAndReturnListOfPrimitives(["string"]); ``` diff --git a/seed/ts-sdk/exhaustive/bundle/snippet-templates.json b/seed/ts-sdk/exhaustive/bundle/snippet-templates.json index a33cf661f2a..3edef4e0d8c 100644 --- a/seed/ts-sdk/exhaustive/bundle/snippet-templates.json +++ b/seed/ts-sdk/exhaustive/bundle/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnListOfPrimitives(\n\t$FERN_INPUT\n)", @@ -74,7 +119,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnListOfObjects(\n\t$FERN_INPUT\n)", @@ -150,7 +240,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnSetOfPrimitives(\n\t$FERN_INPUT\n)", @@ -213,7 +348,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnSetOfObjects(\n\t$FERN_INPUT\n)", @@ -289,7 +469,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnMapPrimToPrim(\n\t$FERN_INPUT\n)", @@ -365,7 +590,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnMapOfPrimToObject(\n\t$FERN_INPUT\n)", @@ -454,7 +724,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnOptional" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnOptional(\n\t$FERN_INPUT\n)", @@ -519,29 +834,74 @@ "identifierOverride": "endpoint_endpoints/enum.getAndReturnEnum" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "values": { - "SUNNY": "Fiddle.WeatherReport.Sunny", - "CLOUDY": "Fiddle.WeatherReport.Cloudy", - "RAINING": "Fiddle.WeatherReport.Raining", - "SNOWING": "Fiddle.WeatherReport.Snowing" + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "Fiddle.WeatherReport.Sunny", + "CLOUDY": "Fiddle.WeatherReport.Cloudy", + "RAINING": "Fiddle.WeatherReport.Raining", + "SNOWING": "Fiddle.WeatherReport.Snowing" }, "templateString": "$FERN_INPUT", "templateInput": { @@ -575,7 +935,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testGet" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testGet(\n\t$FERN_INPUT\n)", @@ -628,7 +1033,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPost" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPost(\n\t$FERN_INPUT\n)", @@ -693,7 +1143,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPut" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPut(\n\t$FERN_INPUT\n)", @@ -786,7 +1281,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPatch" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPatch(\n\t$FERN_INPUT\n)", @@ -1072,22 +1612,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1117,7 +1641,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testDelete" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testDelete(\n\t$FERN_INPUT\n)", @@ -1170,34 +1739,79 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t", + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { "location": "BODY", "path": "string", "type": "payload" @@ -1428,22 +2042,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1473,7 +2071,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnWithRequiredField(\n\t$FERN_INPUT\n)", @@ -1538,7 +2181,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithMapOfMap" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnWithMapOfMap(\n\t$FERN_INPUT\n)", @@ -1651,7 +2339,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithOptionalField(\n\t$FERN_INPUT\n)", @@ -1932,22 +2665,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1982,7 +2699,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\n\t$FERN_INPUT\n)", @@ -2291,22 +3053,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2341,50 +3087,95 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", - "delimiter": ",\n\t\t\t", - "innerTemplate": { - "imports": [], - "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "string", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { "imports": [], "templateString": "nestedObject: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", "isOptional": true, @@ -2627,22 +3418,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2683,7 +3458,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPath" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithPath(\n\t$FERN_INPUT\n)", @@ -2736,7 +3556,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithQuery(\n\t$FERN_INPUT\n)", @@ -2805,7 +3670,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithAllowMultipleQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithAllowMultipleQuery(\n\t$FERN_INPUT\n)", @@ -2874,7 +3784,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPathAndQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithPathAndQuery(\n\t$FERN_INPUT\n)", @@ -2955,7 +3910,52 @@ "identifierOverride": "endpoint_endpoints/params.modifyWithPath" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.modifyWithPath(\n\t$FERN_INPUT\n)", @@ -3035,7 +4035,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnString" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnString(\n\t$FERN_INPUT\n)", @@ -3087,7 +4132,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnInt" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnInt(\n\t$FERN_INPUT\n)", @@ -3139,7 +4229,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnLong" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnLong(\n\t$FERN_INPUT\n)", @@ -3191,7 +4326,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDouble" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnDouble(\n\t$FERN_INPUT\n)", @@ -3243,7 +4423,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBool" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnBool(\n\t$FERN_INPUT\n)", @@ -3295,7 +4520,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDatetime" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnDatetime(\n\t$FERN_INPUT\n)", @@ -3347,28 +4617,231 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDate" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/uuid", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/base64", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippetTemplate": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3384,25 +4857,9 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/primitive/uuid", - "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" - }, - "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "templateString": "await fiddle.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [ @@ -3446,33 +4903,42 @@ "type": "typescript" }, "endpointId": { - "path": "/primitive/base64", + "path": "/union", "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3488,22 +4954,6 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/union", - "method": "POST", - "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" - }, - "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.union.getAndReturnUnion(\n\t$FERN_INPUT\n)", @@ -3660,7 +5110,52 @@ "identifierOverride": "endpoint_inlined-requests.postWithObjectBodyandResponse" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.inlinedRequests.postWithObjectBodyandResponse(\n\t$FERN_INPUT\n)", @@ -3950,22 +5445,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -3995,7 +5474,52 @@ "identifierOverride": "endpoint_no-auth.postWithNoAuth" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noAuth.postWithNoAuth(\n\t$FERN_INPUT\n)", @@ -4047,7 +5571,52 @@ "identifierOverride": "endpoint_no-req-body.getWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noReqBody.getWithNoRequestBody()", @@ -4071,7 +5640,52 @@ "identifierOverride": "endpoint_no-req-body.postWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noReqBody.postWithNoRequestBody()", @@ -4095,7 +5709,52 @@ "identifierOverride": "endpoint_req-with-headers.getWithCustomHeader" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.reqWithHeaders.getWithCustomHeader(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/exhaustive/bundle/snippet.json b/seed/ts-sdk/exhaustive/bundle/snippet.json index 2f9ae4462f5..4d6aab0f5cd 100644 --- a/seed/ts-sdk/exhaustive/bundle/snippet.json +++ b/seed/ts-sdk/exhaustive/bundle/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.enum.getAndReturnEnum(Fiddle.WeatherReport.Sunny);\n" + "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.enum.getAndReturnEnum(Fiddle.WeatherReport.Sunny);\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testGet(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testGet(\"string\");\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testDelete(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testDelete(\"string\");\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n }]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n }]);\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithPath(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithPath(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.modifyWithPath(\"string\", \"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.modifyWithPath(\"string\", \"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnString(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnString(\"string\");\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnInt(1);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnInt(1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnLong(1000000);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnLong(1000000);\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDouble(1.1);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDouble(1.1);\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnBool(true);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnBool(true);\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.union.getAndReturnUnion(Fiddle.Animal.dog({\n name: \"string\",\n likesToWoof: true\n}));\n" + "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.union.getAndReturnUnion(Fiddle.Animal.dog({\n name: \"string\",\n likesToWoof: true\n}));\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -393,7 +393,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" } }, { @@ -404,7 +404,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noReqBody.getWithNoRequestBody();\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noReqBody.getWithNoRequestBody();\n" } }, { @@ -415,7 +415,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noReqBody.postWithNoRequestBody();\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noReqBody.postWithNoRequestBody();\n" } }, { @@ -426,7 +426,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/Client.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/Client.ts index 2e3973629bc..22582df2bea 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/Client.ts @@ -190,8 +190,7 @@ export class HttpMethods { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async testPatch( diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/Client.ts index de8570a7aa6..402de33f192 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/Client.ts @@ -42,8 +42,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async getAndReturnWithOptionalField( @@ -228,8 +227,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -304,8 +302,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -380,8 +377,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }]) */ diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/Client.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/Client.ts index e453870a5de..18e0ef68879 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/Client.ts @@ -47,8 +47,7 @@ export class InlinedRequests { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts index cf03925bdc8..4a49e06663b 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts @@ -23,8 +23,7 @@ import * as Fiddle from "../../../../index"; * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * } */ diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts index 691cc9d6e29..fa6da43453c 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -15,5 +15,4 @@ export interface ObjectWithOptionalField { list?: string[]; set?: Set; map?: Record; - bigint?: string; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/bundle/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts index c5fcd42689f..878c65db219 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -22,7 +22,6 @@ export const ObjectWithOptionalField: core.serialization.ObjectSchema< list: core.serialization.list(core.serialization.string()).optional(), set: core.serialization.set(core.serialization.string()).optional(), map: core.serialization.record(core.serialization.number(), core.serialization.string()).optional(), - bigint: core.serialization.string().optional(), }); export declare namespace ObjectWithOptionalField { @@ -39,6 +38,5 @@ export declare namespace ObjectWithOptionalField { list?: string[] | null; set?: string[] | null; map?: Record | null; - bigint?: string | null; } } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/.mock/definition/types/object.yml b/seed/ts-sdk/exhaustive/custom-package-json/.mock/definition/types/object.yml index 99fe16dd1b7..b4ac4c13534 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/.mock/definition/types/object.yml +++ b/seed/ts-sdk/exhaustive/custom-package-json/.mock/definition/types/object.yml @@ -13,7 +13,6 @@ types: list: optional> set: optional> map: optional> - bigint: optional ObjectWithRequiredField: properties: diff --git a/seed/ts-sdk/exhaustive/custom-package-json/README.md b/seed/ts-sdk/exhaustive/custom-package-json/README.md index 3480c30aa7b..4776f599624 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/README.md +++ b/seed/ts-sdk/exhaustive/custom-package-json/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { FiddleClient } from "@fern/exhaustive"; -const fiddle = new FiddleClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const fiddle = new FiddleClient(); await fiddle.endpoints.container.getAndReturnListOfPrimitives(["string"]); ``` diff --git a/seed/ts-sdk/exhaustive/custom-package-json/snippet-templates.json b/seed/ts-sdk/exhaustive/custom-package-json/snippet-templates.json index a33cf661f2a..3edef4e0d8c 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/snippet-templates.json +++ b/seed/ts-sdk/exhaustive/custom-package-json/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnListOfPrimitives(\n\t$FERN_INPUT\n)", @@ -74,7 +119,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnListOfObjects(\n\t$FERN_INPUT\n)", @@ -150,7 +240,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnSetOfPrimitives(\n\t$FERN_INPUT\n)", @@ -213,7 +348,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnSetOfObjects(\n\t$FERN_INPUT\n)", @@ -289,7 +469,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnMapPrimToPrim(\n\t$FERN_INPUT\n)", @@ -365,7 +590,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnMapOfPrimToObject(\n\t$FERN_INPUT\n)", @@ -454,7 +724,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnOptional" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnOptional(\n\t$FERN_INPUT\n)", @@ -519,29 +834,74 @@ "identifierOverride": "endpoint_endpoints/enum.getAndReturnEnum" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "values": { - "SUNNY": "Fiddle.WeatherReport.Sunny", - "CLOUDY": "Fiddle.WeatherReport.Cloudy", - "RAINING": "Fiddle.WeatherReport.Raining", - "SNOWING": "Fiddle.WeatherReport.Snowing" + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "Fiddle.WeatherReport.Sunny", + "CLOUDY": "Fiddle.WeatherReport.Cloudy", + "RAINING": "Fiddle.WeatherReport.Raining", + "SNOWING": "Fiddle.WeatherReport.Snowing" }, "templateString": "$FERN_INPUT", "templateInput": { @@ -575,7 +935,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testGet" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testGet(\n\t$FERN_INPUT\n)", @@ -628,7 +1033,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPost" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPost(\n\t$FERN_INPUT\n)", @@ -693,7 +1143,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPut" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPut(\n\t$FERN_INPUT\n)", @@ -786,7 +1281,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPatch" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPatch(\n\t$FERN_INPUT\n)", @@ -1072,22 +1612,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1117,7 +1641,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testDelete" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testDelete(\n\t$FERN_INPUT\n)", @@ -1170,34 +1739,79 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t", + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { "location": "BODY", "path": "string", "type": "payload" @@ -1428,22 +2042,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1473,7 +2071,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnWithRequiredField(\n\t$FERN_INPUT\n)", @@ -1538,7 +2181,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithMapOfMap" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnWithMapOfMap(\n\t$FERN_INPUT\n)", @@ -1651,7 +2339,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithOptionalField(\n\t$FERN_INPUT\n)", @@ -1932,22 +2665,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1982,7 +2699,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\n\t$FERN_INPUT\n)", @@ -2291,22 +3053,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2341,50 +3087,95 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", - "delimiter": ",\n\t\t\t", - "innerTemplate": { - "imports": [], - "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "string", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { "imports": [], "templateString": "nestedObject: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", "isOptional": true, @@ -2627,22 +3418,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2683,7 +3458,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPath" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithPath(\n\t$FERN_INPUT\n)", @@ -2736,7 +3556,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithQuery(\n\t$FERN_INPUT\n)", @@ -2805,7 +3670,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithAllowMultipleQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithAllowMultipleQuery(\n\t$FERN_INPUT\n)", @@ -2874,7 +3784,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPathAndQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithPathAndQuery(\n\t$FERN_INPUT\n)", @@ -2955,7 +3910,52 @@ "identifierOverride": "endpoint_endpoints/params.modifyWithPath" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.modifyWithPath(\n\t$FERN_INPUT\n)", @@ -3035,7 +4035,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnString" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnString(\n\t$FERN_INPUT\n)", @@ -3087,7 +4132,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnInt" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnInt(\n\t$FERN_INPUT\n)", @@ -3139,7 +4229,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnLong" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnLong(\n\t$FERN_INPUT\n)", @@ -3191,7 +4326,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDouble" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnDouble(\n\t$FERN_INPUT\n)", @@ -3243,7 +4423,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBool" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnBool(\n\t$FERN_INPUT\n)", @@ -3295,7 +4520,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDatetime" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnDatetime(\n\t$FERN_INPUT\n)", @@ -3347,28 +4617,231 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDate" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/uuid", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/base64", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippetTemplate": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3384,25 +4857,9 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/primitive/uuid", - "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" - }, - "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "templateString": "await fiddle.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [ @@ -3446,33 +4903,42 @@ "type": "typescript" }, "endpointId": { - "path": "/primitive/base64", + "path": "/union", "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3488,22 +4954,6 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/union", - "method": "POST", - "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" - }, - "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.union.getAndReturnUnion(\n\t$FERN_INPUT\n)", @@ -3660,7 +5110,52 @@ "identifierOverride": "endpoint_inlined-requests.postWithObjectBodyandResponse" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.inlinedRequests.postWithObjectBodyandResponse(\n\t$FERN_INPUT\n)", @@ -3950,22 +5445,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -3995,7 +5474,52 @@ "identifierOverride": "endpoint_no-auth.postWithNoAuth" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noAuth.postWithNoAuth(\n\t$FERN_INPUT\n)", @@ -4047,7 +5571,52 @@ "identifierOverride": "endpoint_no-req-body.getWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noReqBody.getWithNoRequestBody()", @@ -4071,7 +5640,52 @@ "identifierOverride": "endpoint_no-req-body.postWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noReqBody.postWithNoRequestBody()", @@ -4095,7 +5709,52 @@ "identifierOverride": "endpoint_req-with-headers.getWithCustomHeader" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.reqWithHeaders.getWithCustomHeader(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/exhaustive/custom-package-json/snippet.json b/seed/ts-sdk/exhaustive/custom-package-json/snippet.json index 2f9ae4462f5..4d6aab0f5cd 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/snippet.json +++ b/seed/ts-sdk/exhaustive/custom-package-json/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.enum.getAndReturnEnum(Fiddle.WeatherReport.Sunny);\n" + "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.enum.getAndReturnEnum(Fiddle.WeatherReport.Sunny);\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testGet(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testGet(\"string\");\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testDelete(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testDelete(\"string\");\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n }]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n }]);\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithPath(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithPath(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.modifyWithPath(\"string\", \"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.modifyWithPath(\"string\", \"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnString(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnString(\"string\");\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnInt(1);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnInt(1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnLong(1000000);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnLong(1000000);\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDouble(1.1);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDouble(1.1);\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnBool(true);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnBool(true);\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.union.getAndReturnUnion(Fiddle.Animal.dog({\n name: \"string\",\n likesToWoof: true\n}));\n" + "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.union.getAndReturnUnion(Fiddle.Animal.dog({\n name: \"string\",\n likesToWoof: true\n}));\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -393,7 +393,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" } }, { @@ -404,7 +404,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noReqBody.getWithNoRequestBody();\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noReqBody.getWithNoRequestBody();\n" } }, { @@ -415,7 +415,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noReqBody.postWithNoRequestBody();\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noReqBody.postWithNoRequestBody();\n" } }, { @@ -426,7 +426,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/Client.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/Client.ts index 2e3973629bc..22582df2bea 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/Client.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/Client.ts @@ -190,8 +190,7 @@ export class HttpMethods { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async testPatch( diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/Client.ts index de8570a7aa6..402de33f192 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/Client.ts @@ -42,8 +42,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async getAndReturnWithOptionalField( @@ -228,8 +227,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -304,8 +302,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -380,8 +377,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }]) */ diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/Client.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/Client.ts index e453870a5de..18e0ef68879 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/Client.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/Client.ts @@ -47,8 +47,7 @@ export class InlinedRequests { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts index cf03925bdc8..4a49e06663b 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts @@ -23,8 +23,7 @@ import * as Fiddle from "../../../../index"; * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * } */ diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts index 691cc9d6e29..fa6da43453c 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -15,5 +15,4 @@ export interface ObjectWithOptionalField { list?: string[]; set?: Set; map?: Record; - bigint?: string; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts index c5fcd42689f..878c65db219 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -22,7 +22,6 @@ export const ObjectWithOptionalField: core.serialization.ObjectSchema< list: core.serialization.list(core.serialization.string()).optional(), set: core.serialization.set(core.serialization.string()).optional(), map: core.serialization.record(core.serialization.number(), core.serialization.string()).optional(), - bigint: core.serialization.string().optional(), }); export declare namespace ObjectWithOptionalField { @@ -39,6 +38,5 @@ export declare namespace ObjectWithOptionalField { list?: string[] | null; set?: string[] | null; map?: Record | null; - bigint?: string | null; } } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/.mock/definition/types/object.yml b/seed/ts-sdk/exhaustive/dev-dependencies/.mock/definition/types/object.yml index 99fe16dd1b7..b4ac4c13534 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/.mock/definition/types/object.yml +++ b/seed/ts-sdk/exhaustive/dev-dependencies/.mock/definition/types/object.yml @@ -13,7 +13,6 @@ types: list: optional> set: optional> map: optional> - bigint: optional ObjectWithRequiredField: properties: diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/README.md b/seed/ts-sdk/exhaustive/dev-dependencies/README.md index 3480c30aa7b..4776f599624 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/README.md +++ b/seed/ts-sdk/exhaustive/dev-dependencies/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { FiddleClient } from "@fern/exhaustive"; -const fiddle = new FiddleClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const fiddle = new FiddleClient(); await fiddle.endpoints.container.getAndReturnListOfPrimitives(["string"]); ``` diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/snippet-templates.json b/seed/ts-sdk/exhaustive/dev-dependencies/snippet-templates.json index a33cf661f2a..3edef4e0d8c 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/snippet-templates.json +++ b/seed/ts-sdk/exhaustive/dev-dependencies/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnListOfPrimitives(\n\t$FERN_INPUT\n)", @@ -74,7 +119,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnListOfObjects(\n\t$FERN_INPUT\n)", @@ -150,7 +240,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnSetOfPrimitives(\n\t$FERN_INPUT\n)", @@ -213,7 +348,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnSetOfObjects(\n\t$FERN_INPUT\n)", @@ -289,7 +469,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnMapPrimToPrim(\n\t$FERN_INPUT\n)", @@ -365,7 +590,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnMapOfPrimToObject(\n\t$FERN_INPUT\n)", @@ -454,7 +724,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnOptional" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.container.getAndReturnOptional(\n\t$FERN_INPUT\n)", @@ -519,29 +834,74 @@ "identifierOverride": "endpoint_endpoints/enum.getAndReturnEnum" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "values": { - "SUNNY": "Fiddle.WeatherReport.Sunny", - "CLOUDY": "Fiddle.WeatherReport.Cloudy", - "RAINING": "Fiddle.WeatherReport.Raining", - "SNOWING": "Fiddle.WeatherReport.Snowing" + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "Fiddle.WeatherReport.Sunny", + "CLOUDY": "Fiddle.WeatherReport.Cloudy", + "RAINING": "Fiddle.WeatherReport.Raining", + "SNOWING": "Fiddle.WeatherReport.Snowing" }, "templateString": "$FERN_INPUT", "templateInput": { @@ -575,7 +935,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testGet" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testGet(\n\t$FERN_INPUT\n)", @@ -628,7 +1033,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPost" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPost(\n\t$FERN_INPUT\n)", @@ -693,7 +1143,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPut" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPut(\n\t$FERN_INPUT\n)", @@ -786,7 +1281,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPatch" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testPatch(\n\t$FERN_INPUT\n)", @@ -1072,22 +1612,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1117,7 +1641,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testDelete" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.httpMethods.testDelete(\n\t$FERN_INPUT\n)", @@ -1170,34 +1739,79 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t", + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { "location": "BODY", "path": "string", "type": "payload" @@ -1428,22 +2042,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1473,7 +2071,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnWithRequiredField(\n\t$FERN_INPUT\n)", @@ -1538,7 +2181,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithMapOfMap" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnWithMapOfMap(\n\t$FERN_INPUT\n)", @@ -1651,7 +2339,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithOptionalField(\n\t$FERN_INPUT\n)", @@ -1932,22 +2665,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1982,7 +2699,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\n\t$FERN_INPUT\n)", @@ -2291,22 +3053,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2341,50 +3087,95 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", - "delimiter": ",\n\t\t\t", - "innerTemplate": { - "imports": [], - "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "string", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { "imports": [], "templateString": "nestedObject: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", "isOptional": true, @@ -2627,22 +3418,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2683,7 +3458,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPath" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithPath(\n\t$FERN_INPUT\n)", @@ -2736,7 +3556,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithQuery(\n\t$FERN_INPUT\n)", @@ -2805,7 +3670,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithAllowMultipleQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithAllowMultipleQuery(\n\t$FERN_INPUT\n)", @@ -2874,7 +3784,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPathAndQuery" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.getWithPathAndQuery(\n\t$FERN_INPUT\n)", @@ -2955,7 +3910,52 @@ "identifierOverride": "endpoint_endpoints/params.modifyWithPath" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.params.modifyWithPath(\n\t$FERN_INPUT\n)", @@ -3035,7 +4035,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnString" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnString(\n\t$FERN_INPUT\n)", @@ -3087,7 +4132,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnInt" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnInt(\n\t$FERN_INPUT\n)", @@ -3139,7 +4229,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnLong" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnLong(\n\t$FERN_INPUT\n)", @@ -3191,7 +4326,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDouble" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnDouble(\n\t$FERN_INPUT\n)", @@ -3243,7 +4423,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBool" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnBool(\n\t$FERN_INPUT\n)", @@ -3295,7 +4520,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDatetime" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.primitive.getAndReturnDatetime(\n\t$FERN_INPUT\n)", @@ -3347,28 +4617,231 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDate" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/uuid", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await fiddle.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/base64", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippetTemplate": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3384,25 +4857,9 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/primitive/uuid", - "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" - }, - "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "templateString": "await fiddle.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [ @@ -3446,33 +4903,42 @@ "type": "typescript" }, "endpointId": { - "path": "/primitive/base64", + "path": "/union", "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await fiddle.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3488,22 +4954,6 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/union", - "method": "POST", - "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" - }, - "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], "templateString": "await fiddle.endpoints.union.getAndReturnUnion(\n\t$FERN_INPUT\n)", @@ -3660,7 +5110,52 @@ "identifierOverride": "endpoint_inlined-requests.postWithObjectBodyandResponse" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.inlinedRequests.postWithObjectBodyandResponse(\n\t$FERN_INPUT\n)", @@ -3950,22 +5445,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -3995,7 +5474,52 @@ "identifierOverride": "endpoint_no-auth.postWithNoAuth" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noAuth.postWithNoAuth(\n\t$FERN_INPUT\n)", @@ -4047,7 +5571,52 @@ "identifierOverride": "endpoint_no-req-body.getWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noReqBody.getWithNoRequestBody()", @@ -4071,7 +5640,52 @@ "identifierOverride": "endpoint_no-req-body.postWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.noReqBody.postWithNoRequestBody()", @@ -4095,7 +5709,52 @@ "identifierOverride": "endpoint_req-with-headers.getWithCustomHeader" }, "snippetTemplate": { - "clientInstantiation": "const fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const fiddle = new FiddleClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await fiddle.reqWithHeaders.getWithCustomHeader(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/snippet.json b/seed/ts-sdk/exhaustive/dev-dependencies/snippet.json index 2f9ae4462f5..4d6aab0f5cd 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/snippet.json +++ b/seed/ts-sdk/exhaustive/dev-dependencies/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.enum.getAndReturnEnum(Fiddle.WeatherReport.Sunny);\n" + "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.enum.getAndReturnEnum(Fiddle.WeatherReport.Sunny);\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testGet(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testGet(\"string\");\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.httpMethods.testDelete(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.httpMethods.testDelete(\"string\");\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n }]);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n }]);\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithPath(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithPath(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.params.modifyWithPath(\"string\", \"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.params.modifyWithPath(\"string\", \"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnString(\"string\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnString(\"string\");\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnInt(1);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnInt(1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnLong(1000000);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnLong(1000000);\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDouble(1.1);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDouble(1.1);\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnBool(true);\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnBool(true);\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.endpoints.union.getAndReturnUnion(Fiddle.Animal.dog({\n name: \"string\",\n likesToWoof: true\n}));\n" + "client": "import { FiddleClient, Fiddle } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.endpoints.union.getAndReturnUnion(Fiddle.Animal.dog({\n name: \"string\",\n likesToWoof: true\n}));\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -393,7 +393,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" } }, { @@ -404,7 +404,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noReqBody.getWithNoRequestBody();\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noReqBody.getWithNoRequestBody();\n" } }, { @@ -415,7 +415,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.noReqBody.postWithNoRequestBody();\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.noReqBody.postWithNoRequestBody();\n" } }, { @@ -426,7 +426,7 @@ }, "snippet": { "type": "typescript", - "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait fiddle.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" + "client": "import { FiddleClient } from \"@fern/exhaustive\";\n\nconst fiddle = new FiddleClient();\nawait fiddle.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/Client.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/Client.ts index 2e3973629bc..22582df2bea 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/Client.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/Client.ts @@ -190,8 +190,7 @@ export class HttpMethods { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async testPatch( diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/Client.ts index de8570a7aa6..402de33f192 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/Client.ts @@ -42,8 +42,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async getAndReturnWithOptionalField( @@ -228,8 +227,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -304,8 +302,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -380,8 +377,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }]) */ diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/Client.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/Client.ts index e453870a5de..18e0ef68879 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/Client.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/Client.ts @@ -47,8 +47,7 @@ export class InlinedRequests { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts index cf03925bdc8..4a49e06663b 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts @@ -23,8 +23,7 @@ import * as Fiddle from "../../../../index"; * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * } */ diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts index 691cc9d6e29..fa6da43453c 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -15,5 +15,4 @@ export interface ObjectWithOptionalField { list?: string[]; set?: Set; map?: Record; - bigint?: string; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts index c5fcd42689f..878c65db219 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -22,7 +22,6 @@ export const ObjectWithOptionalField: core.serialization.ObjectSchema< list: core.serialization.list(core.serialization.string()).optional(), set: core.serialization.set(core.serialization.string()).optional(), map: core.serialization.record(core.serialization.number(), core.serialization.string()).optional(), - bigint: core.serialization.string().optional(), }); export declare namespace ObjectWithOptionalField { @@ -39,6 +38,5 @@ export declare namespace ObjectWithOptionalField { list?: string[] | null; set?: string[] | null; map?: Record | null; - bigint?: string | null; } } diff --git a/seed/ts-sdk/exhaustive/no-custom-config/.mock/definition/types/object.yml b/seed/ts-sdk/exhaustive/no-custom-config/.mock/definition/types/object.yml index 99fe16dd1b7..b4ac4c13534 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/.mock/definition/types/object.yml +++ b/seed/ts-sdk/exhaustive/no-custom-config/.mock/definition/types/object.yml @@ -13,7 +13,6 @@ types: list: optional> set: optional> map: optional> - bigint: optional ObjectWithRequiredField: properties: diff --git a/seed/ts-sdk/exhaustive/no-custom-config/README.md b/seed/ts-sdk/exhaustive/no-custom-config/README.md index 7e86a82f580..2d48e9f3846 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/README.md +++ b/seed/ts-sdk/exhaustive/no-custom-config/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedExhaustiveClient } from "@fern/exhaustive"; -const seedExhaustive = new SeedExhaustiveClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const seedExhaustive = new SeedExhaustiveClient(); await seedExhaustive.endpoints.container.getAndReturnListOfPrimitives(["string"]); ``` diff --git a/seed/ts-sdk/exhaustive/no-custom-config/snippet-templates.json b/seed/ts-sdk/exhaustive/no-custom-config/snippet-templates.json index 0b3e6a10e39..e0df8c41bce 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/exhaustive/no-custom-config/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnListOfPrimitives(\n\t$FERN_INPUT\n)", @@ -74,7 +119,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnListOfObjects(\n\t$FERN_INPUT\n)", @@ -150,7 +240,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(\n\t$FERN_INPUT\n)", @@ -213,7 +348,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnSetOfObjects(\n\t$FERN_INPUT\n)", @@ -289,7 +469,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim(\n\t$FERN_INPUT\n)", @@ -365,7 +590,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject(\n\t$FERN_INPUT\n)", @@ -454,7 +724,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnOptional" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnOptional(\n\t$FERN_INPUT\n)", @@ -519,29 +834,74 @@ "identifierOverride": "endpoint_endpoints/enum.getAndReturnEnum" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "values": { - "SUNNY": "SeedExhaustive.WeatherReport.Sunny", - "CLOUDY": "SeedExhaustive.WeatherReport.Cloudy", - "RAINING": "SeedExhaustive.WeatherReport.Raining", - "SNOWING": "SeedExhaustive.WeatherReport.Snowing" + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "SeedExhaustive.WeatherReport.Sunny", + "CLOUDY": "SeedExhaustive.WeatherReport.Cloudy", + "RAINING": "SeedExhaustive.WeatherReport.Raining", + "SNOWING": "SeedExhaustive.WeatherReport.Snowing" }, "templateString": "$FERN_INPUT", "templateInput": { @@ -575,7 +935,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testGet" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testGet(\n\t$FERN_INPUT\n)", @@ -628,7 +1033,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPost" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPost(\n\t$FERN_INPUT\n)", @@ -693,7 +1143,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPut" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPut(\n\t$FERN_INPUT\n)", @@ -786,7 +1281,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPatch" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPatch(\n\t$FERN_INPUT\n)", @@ -1072,22 +1612,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1117,7 +1641,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testDelete" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testDelete(\n\t$FERN_INPUT\n)", @@ -1170,34 +1739,79 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t", + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { "location": "BODY", "path": "string", "type": "payload" @@ -1428,22 +2042,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1473,7 +2071,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithRequiredField(\n\t$FERN_INPUT\n)", @@ -1538,7 +2181,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithMapOfMap" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithMapOfMap(\n\t$FERN_INPUT\n)", @@ -1651,7 +2339,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField(\n\t$FERN_INPUT\n)", @@ -1932,22 +2665,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1982,7 +2699,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\n\t$FERN_INPUT\n)", @@ -2291,22 +3053,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2341,50 +3087,95 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", - "delimiter": ",\n\t\t\t", - "innerTemplate": { - "imports": [], - "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "string", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { "imports": [], "templateString": "nestedObject: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", "isOptional": true, @@ -2627,22 +3418,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2683,7 +3458,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPath" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithPath(\n\t$FERN_INPUT\n)", @@ -2736,7 +3556,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithQuery(\n\t$FERN_INPUT\n)", @@ -2805,7 +3670,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithAllowMultipleQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithAllowMultipleQuery(\n\t$FERN_INPUT\n)", @@ -2874,7 +3784,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPathAndQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithPathAndQuery(\n\t$FERN_INPUT\n)", @@ -2955,7 +3910,52 @@ "identifierOverride": "endpoint_endpoints/params.modifyWithPath" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.modifyWithPath(\n\t$FERN_INPUT\n)", @@ -3035,7 +4035,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnString" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnString(\n\t$FERN_INPUT\n)", @@ -3087,7 +4132,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnInt" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnInt(\n\t$FERN_INPUT\n)", @@ -3139,7 +4229,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnLong" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnLong(\n\t$FERN_INPUT\n)", @@ -3191,7 +4326,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDouble" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDouble(\n\t$FERN_INPUT\n)", @@ -3243,7 +4423,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBool" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBool(\n\t$FERN_INPUT\n)", @@ -3295,7 +4520,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDatetime" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDatetime(\n\t$FERN_INPUT\n)", @@ -3347,28 +4617,231 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDate" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/uuid", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/base64", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippetTemplate": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3384,25 +4857,9 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/primitive/uuid", - "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" - }, - "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [ @@ -3446,33 +4903,42 @@ "type": "typescript" }, "endpointId": { - "path": "/primitive/base64", + "path": "/union", "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3488,22 +4954,6 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/union", - "method": "POST", - "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" - }, - "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.union.getAndReturnUnion(\n\t$FERN_INPUT\n)", @@ -3660,7 +5110,52 @@ "identifierOverride": "endpoint_inlined-requests.postWithObjectBodyandResponse" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.inlinedRequests.postWithObjectBodyandResponse(\n\t$FERN_INPUT\n)", @@ -3950,22 +5445,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -3995,7 +5474,52 @@ "identifierOverride": "endpoint_no-auth.postWithNoAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noAuth.postWithNoAuth(\n\t$FERN_INPUT\n)", @@ -4047,7 +5571,52 @@ "identifierOverride": "endpoint_no-req-body.getWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noReqBody.getWithNoRequestBody()", @@ -4071,7 +5640,52 @@ "identifierOverride": "endpoint_no-req-body.postWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noReqBody.postWithNoRequestBody()", @@ -4095,7 +5709,52 @@ "identifierOverride": "endpoint_req-with-headers.getWithCustomHeader" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.reqWithHeaders.getWithCustomHeader(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/exhaustive/no-custom-config/snippet.json b/seed/ts-sdk/exhaustive/no-custom-config/snippet.json index 0323bee80a5..4bc7e8b14ed 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/snippet.json +++ b/seed/ts-sdk/exhaustive/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient, SeedExhaustive } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.enum.getAndReturnEnum(SeedExhaustive.WeatherReport.Sunny);\n" + "client": "import { SeedExhaustiveClient, SeedExhaustive } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.enum.getAndReturnEnum(SeedExhaustive.WeatherReport.Sunny);\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testGet(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testGet(\"string\");\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testDelete(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testDelete(\"string\");\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n }]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n }]);\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithPath(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithPath(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.modifyWithPath(\"string\", \"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.modifyWithPath(\"string\", \"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnString(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnString(\"string\");\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnInt(1);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnInt(1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnLong(1000000);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnLong(1000000);\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDouble(1.1);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDouble(1.1);\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnBool(true);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnBool(true);\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.union.getAndReturnUnion({\n animal: \"dog\",\n name: \"string\",\n likesToWoof: true\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.union.getAndReturnUnion({\n animal: \"dog\",\n name: \"string\",\n likesToWoof: true\n});\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n nestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -393,7 +393,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" } }, { @@ -404,7 +404,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noReqBody.getWithNoRequestBody();\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noReqBody.getWithNoRequestBody();\n" } }, { @@ -415,7 +415,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noReqBody.postWithNoRequestBody();\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noReqBody.postWithNoRequestBody();\n" } }, { @@ -426,7 +426,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.reqWithHeaders.getWithCustomHeader({\n xTestServiceHeader: \"string\",\n xTestEndpointHeader: \"string\",\n body: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/httpMethods/client/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/httpMethods/client/Client.ts index 754b23b3d6b..b89eac7ae6b 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/httpMethods/client/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/httpMethods/client/Client.ts @@ -227,8 +227,7 @@ export class HttpMethods { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async testPatch( diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts index ce7d58e9c15..e06161a14ec 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts @@ -43,8 +43,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async getAndReturnWithOptionalField( @@ -256,8 +255,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -340,8 +338,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -424,8 +421,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }]) */ diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/Client.ts index 309952f1526..78afddbc2df 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/Client.ts @@ -50,8 +50,7 @@ export class InlinedRequests { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts index b9933caa432..65b501a19b7 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts @@ -23,8 +23,7 @@ import * as SeedExhaustive from "../../../../index"; * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * } */ diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts index 691cc9d6e29..fa6da43453c 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -15,5 +15,4 @@ export interface ObjectWithOptionalField { list?: string[]; set?: Set; map?: Record; - bigint?: string; } diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts index ec3ca233d7d..69f147a2c7e 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -22,7 +22,6 @@ export const ObjectWithOptionalField: core.serialization.ObjectSchema< list: core.serialization.list(core.serialization.string()).optional(), set: core.serialization.set(core.serialization.string()).optional(), map: core.serialization.record(core.serialization.number(), core.serialization.string()).optional(), - bigint: core.serialization.string().optional(), }); export declare namespace ObjectWithOptionalField { @@ -39,6 +38,5 @@ export declare namespace ObjectWithOptionalField { list?: string[] | null; set?: string[] | null; map?: Record | null; - bigint?: string | null; } } diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/.mock/definition/types/object.yml b/seed/ts-sdk/exhaustive/retain-original-casing/.mock/definition/types/object.yml index 99fe16dd1b7..b4ac4c13534 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/.mock/definition/types/object.yml +++ b/seed/ts-sdk/exhaustive/retain-original-casing/.mock/definition/types/object.yml @@ -13,7 +13,6 @@ types: list: optional> set: optional> map: optional> - bigint: optional ObjectWithRequiredField: properties: diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/README.md b/seed/ts-sdk/exhaustive/retain-original-casing/README.md index 7e86a82f580..2d48e9f3846 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/README.md +++ b/seed/ts-sdk/exhaustive/retain-original-casing/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedExhaustiveClient } from "@fern/exhaustive"; -const seedExhaustive = new SeedExhaustiveClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const seedExhaustive = new SeedExhaustiveClient(); await seedExhaustive.endpoints.container.getAndReturnListOfPrimitives(["string"]); ``` diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/snippet-templates.json b/seed/ts-sdk/exhaustive/retain-original-casing/snippet-templates.json index c70fb810265..f025bd98406 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/snippet-templates.json +++ b/seed/ts-sdk/exhaustive/retain-original-casing/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnListOfPrimitives(\n\t$FERN_INPUT\n)", @@ -74,7 +119,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnListOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnListOfObjects(\n\t$FERN_INPUT\n)", @@ -150,7 +240,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfPrimitives" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(\n\t$FERN_INPUT\n)", @@ -213,7 +348,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnSetOfObjects" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnSetOfObjects(\n\t$FERN_INPUT\n)", @@ -289,7 +469,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapPrimToPrim" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim(\n\t$FERN_INPUT\n)", @@ -365,7 +590,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnMapOfPrimToObject" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject(\n\t$FERN_INPUT\n)", @@ -454,7 +724,52 @@ "identifierOverride": "endpoint_endpoints/container.getAndReturnOptional" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.container.getAndReturnOptional(\n\t$FERN_INPUT\n)", @@ -519,29 +834,74 @@ "identifierOverride": "endpoint_endpoints/enum.getAndReturnEnum" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "values": { - "SUNNY": "SeedExhaustive.WeatherReport.Sunny", - "CLOUDY": "SeedExhaustive.WeatherReport.Cloudy", - "RAINING": "SeedExhaustive.WeatherReport.Raining", - "SNOWING": "SeedExhaustive.WeatherReport.Snowing" + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.enum.getAndReturnEnum(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "SeedExhaustive.WeatherReport.Sunny", + "CLOUDY": "SeedExhaustive.WeatherReport.Cloudy", + "RAINING": "SeedExhaustive.WeatherReport.Raining", + "SNOWING": "SeedExhaustive.WeatherReport.Snowing" }, "templateString": "$FERN_INPUT", "templateInput": { @@ -575,7 +935,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testGet" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testGet(\n\t$FERN_INPUT\n)", @@ -628,7 +1033,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPost" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPost(\n\t$FERN_INPUT\n)", @@ -693,7 +1143,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPut" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPut(\n\t$FERN_INPUT\n)", @@ -786,7 +1281,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testPatch" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testPatch(\n\t$FERN_INPUT\n)", @@ -1072,22 +1612,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1117,7 +1641,52 @@ "identifierOverride": "endpoint_endpoints/http-methods.testDelete" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.httpMethods.testDelete(\n\t$FERN_INPUT\n)", @@ -1170,34 +1739,79 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t", + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithOptionalField(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { "location": "BODY", "path": "string", "type": "payload" @@ -1428,22 +2042,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1473,7 +2071,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithRequiredField(\n\t$FERN_INPUT\n)", @@ -1538,7 +2181,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnWithMapOfMap" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnWithMapOfMap(\n\t$FERN_INPUT\n)", @@ -1651,7 +2339,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithOptionalField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField(\n\t$FERN_INPUT\n)", @@ -1932,22 +2665,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -1982,7 +2699,52 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredField" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\n\t$FERN_INPUT\n)", @@ -2291,22 +3053,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2341,50 +3087,95 @@ "identifierOverride": "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "isOptional": true, - "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", - "delimiter": ",\n\t\t\t", - "innerTemplate": { - "imports": [], - "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "string: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "string", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t$FERN_INPUT\n\t\t]", + "delimiter": ",\n\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "string: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "string", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { "imports": [], "templateString": "NestedObject: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", "isOptional": true, @@ -2627,22 +3418,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "RELATIVE", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -2683,7 +3458,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPath" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithPath(\n\t$FERN_INPUT\n)", @@ -2736,7 +3556,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithQuery(\n\t$FERN_INPUT\n)", @@ -2805,7 +3670,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithAllowMultipleQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithAllowMultipleQuery(\n\t$FERN_INPUT\n)", @@ -2874,7 +3784,52 @@ "identifierOverride": "endpoint_endpoints/params.getWithPathAndQuery" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.getWithPathAndQuery(\n\t$FERN_INPUT\n)", @@ -2955,7 +3910,52 @@ "identifierOverride": "endpoint_endpoints/params.modifyWithPath" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.params.modifyWithPath(\n\t$FERN_INPUT\n)", @@ -3035,7 +4035,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnString" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnString(\n\t$FERN_INPUT\n)", @@ -3087,7 +4132,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnInt" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnInt(\n\t$FERN_INPUT\n)", @@ -3139,7 +4229,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnLong" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnLong(\n\t$FERN_INPUT\n)", @@ -3191,7 +4326,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDouble" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDouble(\n\t$FERN_INPUT\n)", @@ -3243,7 +4423,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBool" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBool(\n\t$FERN_INPUT\n)", @@ -3295,7 +4520,52 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDatetime" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDatetime(\n\t$FERN_INPUT\n)", @@ -3347,28 +4617,231 @@ "identifierOverride": "endpoint_endpoints/primitive.getAndReturnDate" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/uuid", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/exhaustive", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/primitive/base64", + "method": "POST", + "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + }, + "snippetTemplate": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnDate(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3384,25 +4857,9 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/primitive/uuid", - "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnUUID" - }, - "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnUuid(\n\t$FERN_INPUT\n)", + "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [ @@ -3446,33 +4903,42 @@ "type": "typescript" }, "endpointId": { - "path": "/primitive/base64", + "path": "/union", "method": "POST", - "identifierOverride": "endpoint_endpoints/primitive.getAndReturnBase64" + "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedExhaustive.endpoints.primitive.getAndReturnBase64(\n\t$FERN_INPUT\n)", + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", + "inputDelimiter": ",", "templateInputs": [ { "value": { "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "templateString": "{ $FERN_INPUT }", "isOptional": true, - "inputDelimiter": ",\n\t\t", "templateInputs": [ { "value": { "imports": [], - "templateString": "$FERN_INPUT", - "isOptional": true, + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, "templateInputs": [ { - "location": "BODY", + "location": "AUTH", + "path": "token", "type": "payload" } ], @@ -3488,22 +4954,6 @@ ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/exhaustive", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/union", - "method": "POST", - "identifierOverride": "endpoint_endpoints/union.getAndReturnUnion" - }, - "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.endpoints.union.getAndReturnUnion(\n\t$FERN_INPUT\n)", @@ -3660,7 +5110,52 @@ "identifierOverride": "endpoint_inlined-requests.postWithObjectBodyandResponse" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.inlinedRequests.postWithObjectBodyandResponse(\n\t$FERN_INPUT\n)", @@ -3950,22 +5445,6 @@ "type": "dict" }, "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bigint: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "NestedObject.bigint", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" } ], "type": "generic" @@ -3995,7 +5474,52 @@ "identifierOverride": "endpoint_no-auth.postWithNoAuth" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noAuth.postWithNoAuth(\n\t$FERN_INPUT\n)", @@ -4047,7 +5571,52 @@ "identifierOverride": "endpoint_no-req-body.getWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noReqBody.getWithNoRequestBody()", @@ -4071,7 +5640,52 @@ "identifierOverride": "endpoint_no-req-body.postWithNoRequestBody" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.noReqBody.postWithNoRequestBody()", @@ -4095,7 +5709,52 @@ "identifierOverride": "endpoint_req-with-headers.getWithCustomHeader" }, "snippetTemplate": { - "clientInstantiation": "const seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExhaustive = new SeedExhaustiveClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExhaustive.reqWithHeaders.getWithCustomHeader(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json b/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json index da2cdf8e2e9..3fc9af6c55a 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json +++ b/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnListOfPrimitives([\"string\"]);\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnListOfObjects([{\n string: \"string\"\n }]);\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnSetOfPrimitives(new Set([\"string\"]));\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnSetOfObjects(new Set([{\n string: \"string\"\n }]));\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnMapPrimToPrim({\n \"string\": \"string\"\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnMapOfPrimToObject({\n \"string\": {\n string: \"string\"\n }\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.container.getAndReturnOptional({\n string: \"string\"\n});\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient, SeedExhaustive } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.enum.getAndReturnEnum(SeedExhaustive.WeatherReport.Sunny);\n" + "client": "import { SeedExhaustiveClient, SeedExhaustive } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.enum.getAndReturnEnum(SeedExhaustive.WeatherReport.Sunny);\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testGet(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testGet(\"string\");\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPost({\n string: \"string\"\n});\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPut(\"string\", {\n string: \"string\"\n});\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testPatch(\"string\", {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.httpMethods.testDelete(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.httpMethods.testDelete(\"string\");\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithOptionalField({\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithRequiredField({\n string: \"string\"\n});\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnWithMapOfMap({\n map: {\n \"string\": {\n \"string\": \"string\"\n }\n }\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithOptionalField({\n string: \"string\",\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredField(\"string\", {\n string: \"string\",\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n }]);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.object.getAndReturnNestedWithRequiredFieldAsList([{\n string: \"string\",\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n }]);\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithPath(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithPath(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithQuery({\n query: \"string\",\n number: 1\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithAllowMultipleQuery({\n query: \"string\",\n numer: 1\n});\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.getWithPathAndQuery(\"string\", {\n query: \"string\"\n});\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.params.modifyWithPath(\"string\", \"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.params.modifyWithPath(\"string\", \"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnString(\"string\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnString(\"string\");\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnInt(1);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnInt(1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnLong(1000000);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnLong(1000000);\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDouble(1.1);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDouble(1.1);\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnBool(true);\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnBool(true);\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDatetime(new Date(\"2024-01-15T09:30:00.000Z\"));\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnDate(\"2023-01-15\");\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnUuid(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\");\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.primitive.getAndReturnBase64(\"SGVsbG8gd29ybGQh\");\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.endpoints.union.getAndReturnUnion({\n animal: \"dog\",\n name: \"string\",\n likesToWoof: true\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.endpoints.union.getAndReturnUnion({\n animal: \"dog\",\n name: \"string\",\n likesToWoof: true\n});\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n },\n bigint: \"123456789123456789\"\n }\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.inlinedRequests.postWithObjectBodyandResponse({\n string: \"string\",\n integer: 1,\n NestedObject: {\n string: \"string\",\n integer: 1,\n long: 1000000,\n double: 1.1,\n bool: true,\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n date: \"2023-01-15\",\n uuid: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n base64: \"SGVsbG8gd29ybGQh\",\n list: [\"string\"],\n set: new Set([\"string\"]),\n map: {\n 1: \"string\"\n }\n }\n});\n" } }, { @@ -393,7 +393,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noAuth.postWithNoAuth({\n \"key\": \"value\"\n});\n" } }, { @@ -404,7 +404,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noReqBody.getWithNoRequestBody();\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noReqBody.getWithNoRequestBody();\n" } }, { @@ -415,7 +415,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.noReqBody.postWithNoRequestBody();\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.noReqBody.postWithNoRequestBody();\n" } }, { @@ -426,7 +426,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedExhaustive.reqWithHeaders.getWithCustomHeader({\n \"X-TEST-SERVICE-HEADER\": \"string\",\n \"X-TEST-ENDPOINT-HEADER\": \"string\",\n body: \"string\"\n});\n" + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst seedExhaustive = new SeedExhaustiveClient();\nawait seedExhaustive.reqWithHeaders.getWithCustomHeader({\n \"X-TEST-SERVICE-HEADER\": \"string\",\n \"X-TEST-ENDPOINT-HEADER\": \"string\",\n body: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/httpMethods/client/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/httpMethods/client/Client.ts index 754b23b3d6b..b89eac7ae6b 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/httpMethods/client/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/httpMethods/client/Client.ts @@ -227,8 +227,7 @@ export class HttpMethods { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async testPatch( diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts index e9a313d2fe2..dd4f6a8cfaf 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts @@ -43,8 +43,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * }) */ public async getAndReturnWithOptionalField( @@ -256,8 +255,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -340,8 +338,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ @@ -424,8 +421,7 @@ export class Object_ { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }]) */ diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/Client.ts index 63dc0130173..f1b10c2806d 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/Client.ts @@ -50,8 +50,7 @@ export class InlinedRequests { * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * }) */ diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts index 2037b22cdf1..73808423c53 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/inlinedRequests/client/requests/PostWithObjectBody.ts @@ -23,8 +23,7 @@ import * as SeedExhaustive from "../../../../index"; * set: new Set(["string"]), * map: { * 1: "string" - * }, - * bigint: "123456789123456789" + * } * } * } */ diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts index 691cc9d6e29..fa6da43453c 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -15,5 +15,4 @@ export interface ObjectWithOptionalField { list?: string[]; set?: Set; map?: Record; - bigint?: string; } diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts index ec3ca233d7d..69f147a2c7e 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/serialization/resources/types/resources/object/types/ObjectWithOptionalField.ts @@ -22,7 +22,6 @@ export const ObjectWithOptionalField: core.serialization.ObjectSchema< list: core.serialization.list(core.serialization.string()).optional(), set: core.serialization.set(core.serialization.string()).optional(), map: core.serialization.record(core.serialization.number(), core.serialization.string()).optional(), - bigint: core.serialization.string().optional(), }); export declare namespace ObjectWithOptionalField { @@ -39,6 +38,5 @@ export declare namespace ObjectWithOptionalField { list?: string[] | null; set?: string[] | null; map?: Record | null; - bigint?: string | null; } } diff --git a/seed/ts-sdk/exhaustive/with-audiences/.mock/definition/types/object.yml b/seed/ts-sdk/exhaustive/with-audiences/.mock/definition/types/object.yml index 99fe16dd1b7..b4ac4c13534 100644 --- a/seed/ts-sdk/exhaustive/with-audiences/.mock/definition/types/object.yml +++ b/seed/ts-sdk/exhaustive/with-audiences/.mock/definition/types/object.yml @@ -13,7 +13,6 @@ types: list: optional> set: optional> map: optional> - bigint: optional ObjectWithRequiredField: properties: diff --git a/seed/ts-sdk/extra-properties/README.md b/seed/ts-sdk/extra-properties/README.md index 8a0c6f21cfa..d528d4ce609 100644 --- a/seed/ts-sdk/extra-properties/README.md +++ b/seed/ts-sdk/extra-properties/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedExtraPropertiesClient } from "@fern/extra-properties"; -const seedExtraProperties = new SeedExtraPropertiesClient({ environment: "YOUR_BASE_URL" }); +const seedExtraProperties = new SeedExtraPropertiesClient(); await seedExtraProperties.user.createUser({ type: "CreateUserRequest", version: "v1", diff --git a/seed/ts-sdk/extra-properties/snippet-templates.json b/seed/ts-sdk/extra-properties/snippet-templates.json index 35bafebdd97..40dc034d80c 100644 --- a/seed/ts-sdk/extra-properties/snippet-templates.json +++ b/seed/ts-sdk/extra-properties/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_user.createUser" }, "snippetTemplate": { - "clientInstantiation": "const seedExtraProperties = new SeedExtraPropertiesClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedExtraProperties = new SeedExtraPropertiesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedExtraProperties.user.createUser(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/extra-properties/snippet.json b/seed/ts-sdk/extra-properties/snippet.json index 76635a60b01..5c00119304d 100644 --- a/seed/ts-sdk/extra-properties/snippet.json +++ b/seed/ts-sdk/extra-properties/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedExtraPropertiesClient } from \"@fern/extra-properties\";\n\nconst seedExtraProperties = new SeedExtraPropertiesClient({ environment: \"YOUR_BASE_URL\" });\nawait seedExtraProperties.user.createUser({\n type: \"CreateUserRequest\",\n version: \"v1\",\n name: \"string\"\n});\n" + "client": "import { SeedExtraPropertiesClient } from \"@fern/extra-properties\";\n\nconst seedExtraProperties = new SeedExtraPropertiesClient();\nawait seedExtraProperties.user.createUser({\n type: \"CreateUserRequest\",\n version: \"v1\",\n name: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/file-download/file-download-reponse-headers/README.md b/seed/ts-sdk/file-download/file-download-reponse-headers/README.md index 065ac54df2d..5a7656a2a03 100644 --- a/seed/ts-sdk/file-download/file-download-reponse-headers/README.md +++ b/seed/ts-sdk/file-download/file-download-reponse-headers/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedFileDownloadClient } from "@fern/file-download"; -const seedFileDownload = new SeedFileDownloadClient({ environment: "YOUR_BASE_URL" }); +const seedFileDownload = new SeedFileDownloadClient(); await seedFileDownload.service.downloadFile(); ``` diff --git a/seed/ts-sdk/file-download/file-download-reponse-headers/snippet-templates.json b/seed/ts-sdk/file-download/file-download-reponse-headers/snippet-templates.json index 4832c68d3b5..5a06ebf2821 100644 --- a/seed/ts-sdk/file-download/file-download-reponse-headers/snippet-templates.json +++ b/seed/ts-sdk/file-download/file-download-reponse-headers/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.downloadFile" }, "snippetTemplate": { - "clientInstantiation": "const seedFileDownload = new SeedFileDownloadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileDownload = new SeedFileDownloadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileDownload.service.downloadFile()", diff --git a/seed/ts-sdk/file-download/file-download-reponse-headers/snippet.json b/seed/ts-sdk/file-download/file-download-reponse-headers/snippet.json index 1023bf515de..4b278f306e0 100644 --- a/seed/ts-sdk/file-download/file-download-reponse-headers/snippet.json +++ b/seed/ts-sdk/file-download/file-download-reponse-headers/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileDownloadClient } from \"@fern/file-download\";\n\nconst seedFileDownload = new SeedFileDownloadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileDownload.service.downloadFile();\n" + "client": "import { SeedFileDownloadClient } from \"@fern/file-download\";\n\nconst seedFileDownload = new SeedFileDownloadClient();\nawait seedFileDownload.service.downloadFile();\n" } } ], diff --git a/seed/ts-sdk/file-download/no-custom-config/README.md b/seed/ts-sdk/file-download/no-custom-config/README.md index 065ac54df2d..5a7656a2a03 100644 --- a/seed/ts-sdk/file-download/no-custom-config/README.md +++ b/seed/ts-sdk/file-download/no-custom-config/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedFileDownloadClient } from "@fern/file-download"; -const seedFileDownload = new SeedFileDownloadClient({ environment: "YOUR_BASE_URL" }); +const seedFileDownload = new SeedFileDownloadClient(); await seedFileDownload.service.downloadFile(); ``` diff --git a/seed/ts-sdk/file-download/no-custom-config/snippet-templates.json b/seed/ts-sdk/file-download/no-custom-config/snippet-templates.json index 4832c68d3b5..5a06ebf2821 100644 --- a/seed/ts-sdk/file-download/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/file-download/no-custom-config/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.downloadFile" }, "snippetTemplate": { - "clientInstantiation": "const seedFileDownload = new SeedFileDownloadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileDownload = new SeedFileDownloadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileDownload.service.downloadFile()", diff --git a/seed/ts-sdk/file-download/no-custom-config/snippet.json b/seed/ts-sdk/file-download/no-custom-config/snippet.json index 1023bf515de..4b278f306e0 100644 --- a/seed/ts-sdk/file-download/no-custom-config/snippet.json +++ b/seed/ts-sdk/file-download/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileDownloadClient } from \"@fern/file-download\";\n\nconst seedFileDownload = new SeedFileDownloadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileDownload.service.downloadFile();\n" + "client": "import { SeedFileDownloadClient } from \"@fern/file-download\";\n\nconst seedFileDownload = new SeedFileDownloadClient();\nawait seedFileDownload.service.downloadFile();\n" } } ], diff --git a/seed/ts-sdk/file-upload/no-custom-config/README.md b/seed/ts-sdk/file-upload/no-custom-config/README.md index 5fdbbd3324a..29b204739d7 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/README.md +++ b/seed/ts-sdk/file-upload/no-custom-config/README.md @@ -19,7 +19,7 @@ Instantiate and use the client with the following: import { SeedFileUploadClient } from "@fern/file-upload"; import * as fs from "fs"; -const seedFileUpload = new SeedFileUploadClient({ environment: "YOUR_BASE_URL" }); +const seedFileUpload = new SeedFileUploadClient(); await seedFileUpload.service.post( fs.createReadStream("/path/to/your/file"), [fs.createReadStream("/path/to/your/file")], diff --git a/seed/ts-sdk/file-upload/no-custom-config/snippet-templates.json b/seed/ts-sdk/file-upload/no-custom-config/snippet-templates.json index ad327e3e7c7..c2a4c61b066 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/file-upload/no-custom-config/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.post" }, "snippetTemplate": { - "clientInstantiation": "const seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileUpload = new SeedFileUploadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileUpload.service.post(\n\t$FERN_INPUT\n)", @@ -245,7 +274,36 @@ "identifierOverride": "endpoint_service.justFile" }, "snippetTemplate": { - "clientInstantiation": "const seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileUpload = new SeedFileUploadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileUpload.service.justFile(\n\t$FERN_INPUT\n)", @@ -300,7 +358,36 @@ "identifierOverride": "endpoint_service.justFileWithQueryParams" }, "snippetTemplate": { - "clientInstantiation": "const seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileUpload = new SeedFileUploadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileUpload.service.justFileWithQueryParams(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/file-upload/no-custom-config/snippet.json b/seed/ts-sdk/file-upload/no-custom-config/snippet.json index 68dac6793fa..a3139d63472 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/snippet.json +++ b/seed/ts-sdk/file-upload/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileUpload.service.post(fs.createReadStream(\"/path/to/your/file\"), [fs.createReadStream(\"/path/to/your/file\")], fs.createReadStream(\"/path/to/your/file\"), [fs.createReadStream(\"/path/to/your/file\")], {});\n" + "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient();\nawait seedFileUpload.service.post(fs.createReadStream(\"/path/to/your/file\"), [fs.createReadStream(\"/path/to/your/file\")], fs.createReadStream(\"/path/to/your/file\"), [fs.createReadStream(\"/path/to/your/file\")], {});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileUpload.service.justFile(fs.createReadStream(\"/path/to/your/file\"));\n" + "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient();\nawait seedFileUpload.service.justFile(fs.createReadStream(\"/path/to/your/file\"));\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileUpload.service.justFileWithQueryParams(fs.createReadStream(\"/path/to/your/file\"), {\n maybeString: \"string\",\n integer: 1,\n maybeInteger: 1,\n listOfStrings: \"string\",\n optionalListOfStrings: \"string\"\n});\n" + "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient();\nawait seedFileUpload.service.justFileWithQueryParams(fs.createReadStream(\"/path/to/your/file\"), {\n maybeString: \"string\",\n integer: 1,\n maybeInteger: 1,\n listOfStrings: \"string\",\n optionalListOfStrings: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/file-upload/wrap-file-properties/README.md b/seed/ts-sdk/file-upload/wrap-file-properties/README.md index 7a931b17e7f..840761a5e91 100644 --- a/seed/ts-sdk/file-upload/wrap-file-properties/README.md +++ b/seed/ts-sdk/file-upload/wrap-file-properties/README.md @@ -19,7 +19,7 @@ Instantiate and use the client with the following: import { SeedFileUploadClient } from "@fern/file-upload"; import * as fs from "fs"; -const seedFileUpload = new SeedFileUploadClient({ environment: "YOUR_BASE_URL" }); +const seedFileUpload = new SeedFileUploadClient(); await seedFileUpload.service.post({ file: fs.createReadStream("/path/to/your/file"), fileList: [fs.createReadStream("/path/to/your/file")], diff --git a/seed/ts-sdk/file-upload/wrap-file-properties/snippet-templates.json b/seed/ts-sdk/file-upload/wrap-file-properties/snippet-templates.json index 27e1b6052d5..cdb9a3da3cd 100644 --- a/seed/ts-sdk/file-upload/wrap-file-properties/snippet-templates.json +++ b/seed/ts-sdk/file-upload/wrap-file-properties/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.post" }, "snippetTemplate": { - "clientInstantiation": "const seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileUpload = new SeedFileUploadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileUpload.service.post(\n\t$FERN_INPUT\n)", @@ -245,7 +274,36 @@ "identifierOverride": "endpoint_service.justFile" }, "snippetTemplate": { - "clientInstantiation": "const seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileUpload = new SeedFileUploadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileUpload.service.justFile(\n\t$FERN_INPUT\n)", @@ -300,7 +358,36 @@ "identifierOverride": "endpoint_service.justFileWithQueryParams" }, "snippetTemplate": { - "clientInstantiation": "const seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedFileUpload = new SeedFileUploadClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedFileUpload.service.justFileWithQueryParams(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/file-upload/wrap-file-properties/snippet.json b/seed/ts-sdk/file-upload/wrap-file-properties/snippet.json index f74ad558fb1..cc6c994891c 100644 --- a/seed/ts-sdk/file-upload/wrap-file-properties/snippet.json +++ b/seed/ts-sdk/file-upload/wrap-file-properties/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileUpload.service.post({\n file: fs.createReadStream(\"/path/to/your/file\"),\n fileList: [fs.createReadStream(\"/path/to/your/file\")]\n});\n" + "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient();\nawait seedFileUpload.service.post({\n file: fs.createReadStream(\"/path/to/your/file\"),\n fileList: [fs.createReadStream(\"/path/to/your/file\")]\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileUpload.service.justFile({\n file: fs.createReadStream(\"/path/to/your/file\")\n});\n" + "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient();\nawait seedFileUpload.service.justFile({\n file: fs.createReadStream(\"/path/to/your/file\")\n});\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient({ environment: \"YOUR_BASE_URL\" });\nawait seedFileUpload.service.justFileWithQueryParams({\n file: fs.createReadStream(\"/path/to/your/file\"),\n maybeString: \"string\",\n integer: 1,\n maybeInteger: 1,\n listOfStrings: \"string\",\n optionalListOfStrings: \"string\"\n});\n" + "client": "import { SeedFileUploadClient } from \"@fern/file-upload\";\nimport * as fs from \"fs\";\n\nconst seedFileUpload = new SeedFileUploadClient();\nawait seedFileUpload.service.justFileWithQueryParams({\n file: fs.createReadStream(\"/path/to/your/file\"),\n maybeString: \"string\",\n integer: 1,\n maybeInteger: 1,\n listOfStrings: \"string\",\n optionalListOfStrings: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/folders/README.md b/seed/ts-sdk/folders/README.md index d9f0e250210..bef38b858d4 100644 --- a/seed/ts-sdk/folders/README.md +++ b/seed/ts-sdk/folders/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedApiClient } from "@fern/folders"; -const seedApi = new SeedApiClient({ environment: "YOUR_BASE_URL" }); +const seedApi = new SeedApiClient(); await seedApi.foo(); ``` diff --git a/seed/ts-sdk/folders/snippet-templates.json b/seed/ts-sdk/folders/snippet-templates.json index 920df153af6..02a6ac62ea7 100644 --- a/seed/ts-sdk/folders/snippet-templates.json +++ b/seed/ts-sdk/folders/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_.foo" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.foo()", @@ -35,7 +64,36 @@ "identifierOverride": "endpoint_a/b.foo" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.a.b.foo()", @@ -59,7 +117,36 @@ "identifierOverride": "endpoint_a/c.foo" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.a.c.foo()", @@ -83,7 +170,36 @@ "identifierOverride": "endpoint_folder.foo" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.folder.foo()", @@ -107,7 +223,36 @@ "identifierOverride": "endpoint_folder/service.endpoint" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.folder.service.endpoint()", @@ -131,7 +276,36 @@ "identifierOverride": "endpoint_folder/service.unknownRequest" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.folder.service.unknownRequest(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/folders/snippet.json b/seed/ts-sdk/folders/snippet.json index 463d1988de0..efff4ee5409 100644 --- a/seed/ts-sdk/folders/snippet.json +++ b/seed/ts-sdk/folders/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait seedApi.foo();\n" + "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.foo();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait seedApi.a.b.foo();\n" + "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.a.b.foo();\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait seedApi.a.c.foo();\n" + "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.a.c.foo();\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait seedApi.folder.foo();\n" + "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.folder.foo();\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait seedApi.folder.service.endpoint();\n" + "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.folder.service.endpoint();\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\" });\nawait seedApi.folder.service.unknownRequest({\n \"key\": \"value\"\n});\n" + "client": "import { SeedApiClient } from \"@fern/folders\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.folder.service.unknownRequest({\n \"key\": \"value\"\n});\n" } } ], diff --git a/seed/ts-sdk/idempotency-headers/README.md b/seed/ts-sdk/idempotency-headers/README.md index a31ba27e79a..fbb7ad7cbf8 100644 --- a/seed/ts-sdk/idempotency-headers/README.md +++ b/seed/ts-sdk/idempotency-headers/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedIdempotencyHeadersClient, SeedIdempotencyHeaders } from "@fern/idempotency-headers"; -const seedIdempotencyHeaders = new SeedIdempotencyHeadersClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const seedIdempotencyHeaders = new SeedIdempotencyHeadersClient(); await seedIdempotencyHeaders.payment.create({ amount: 1, currency: SeedIdempotencyHeaders.Currency.Usd, diff --git a/seed/ts-sdk/idempotency-headers/snippet-templates.json b/seed/ts-sdk/idempotency-headers/snippet-templates.json index ee38c568261..51b564aa8ac 100644 --- a/seed/ts-sdk/idempotency-headers/snippet-templates.json +++ b/seed/ts-sdk/idempotency-headers/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_payment.create" }, "snippetTemplate": { - "clientInstantiation": "const seedIdempotencyHeaders = new SeedIdempotencyHeadersClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedIdempotencyHeaders = new SeedIdempotencyHeadersClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedIdempotencyHeaders.payment.create(\n\t$FERN_INPUT\n)", @@ -82,7 +127,52 @@ "identifierOverride": "endpoint_payment.delete" }, "snippetTemplate": { - "clientInstantiation": "const seedIdempotencyHeaders = new SeedIdempotencyHeadersClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedIdempotencyHeaders = new SeedIdempotencyHeadersClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedIdempotencyHeaders.payment.delete(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/idempotency-headers/snippet.json b/seed/ts-sdk/idempotency-headers/snippet.json index 336a6135b15..2009f3ca350 100644 --- a/seed/ts-sdk/idempotency-headers/snippet.json +++ b/seed/ts-sdk/idempotency-headers/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedIdempotencyHeadersClient, SeedIdempotencyHeaders } from \"@fern/idempotency-headers\";\n\nconst seedIdempotencyHeaders = new SeedIdempotencyHeadersClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedIdempotencyHeaders.payment.create({\n amount: 1,\n currency: SeedIdempotencyHeaders.Currency.Usd\n});\n" + "client": "import { SeedIdempotencyHeadersClient, SeedIdempotencyHeaders } from \"@fern/idempotency-headers\";\n\nconst seedIdempotencyHeaders = new SeedIdempotencyHeadersClient();\nawait seedIdempotencyHeaders.payment.create({\n amount: 1,\n currency: SeedIdempotencyHeaders.Currency.Usd\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedIdempotencyHeadersClient } from \"@fern/idempotency-headers\";\n\nconst seedIdempotencyHeaders = new SeedIdempotencyHeadersClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedIdempotencyHeaders.payment.delete(\"string\");\n" + "client": "import { SeedIdempotencyHeadersClient } from \"@fern/idempotency-headers\";\n\nconst seedIdempotencyHeaders = new SeedIdempotencyHeadersClient();\nawait seedIdempotencyHeaders.payment.delete(\"string\");\n" } } ], diff --git a/seed/ts-sdk/imdb/README.md b/seed/ts-sdk/imdb/README.md index d86170bf6d6..d44bc80a73b 100644 --- a/seed/ts-sdk/imdb/README.md +++ b/seed/ts-sdk/imdb/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedApiClient } from "@fern/imdb"; -const seedApi = new SeedApiClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const seedApi = new SeedApiClient(); await seedApi.imdb.createMovie({ title: "string", rating: 1.1, diff --git a/seed/ts-sdk/imdb/snippet-templates.json b/seed/ts-sdk/imdb/snippet-templates.json index cfadecd1414..2648b7c4e97 100644 --- a/seed/ts-sdk/imdb/snippet-templates.json +++ b/seed/ts-sdk/imdb/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_imdb.createMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.imdb.createMovie(\n\t$FERN_INPUT\n)", @@ -92,7 +137,52 @@ "identifierOverride": "endpoint_imdb.getMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedApi = new SeedApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedApi.imdb.getMovie(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/imdb/snippet.json b/seed/ts-sdk/imdb/snippet.json index 0302717c60f..e2b44f9f469 100644 --- a/seed/ts-sdk/imdb/snippet.json +++ b/seed/ts-sdk/imdb/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/imdb\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedApi.imdb.createMovie({\n title: \"string\",\n rating: 1.1\n});\n" + "client": "import { SeedApiClient } from \"@fern/imdb\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.imdb.createMovie({\n title: \"string\",\n rating: 1.1\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedApiClient } from \"@fern/imdb\";\n\nconst seedApi = new SeedApiClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedApi.imdb.getMovie(\"string\");\n" + "client": "import { SeedApiClient } from \"@fern/imdb\";\n\nconst seedApi = new SeedApiClient();\nawait seedApi.imdb.getMovie(\"string\");\n" } } ], diff --git a/seed/ts-sdk/literal/README.md b/seed/ts-sdk/literal/README.md index 2b6e37cd073..e74b239d1bc 100644 --- a/seed/ts-sdk/literal/README.md +++ b/seed/ts-sdk/literal/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedLiteralClient } from "@fern/literal"; -const seedLiteral = new SeedLiteralClient({ environment: "YOUR_BASE_URL" }); +const seedLiteral = new SeedLiteralClient(); await seedLiteral.headers.send({ endpointVersion: "02-12-2024", async: true, diff --git a/seed/ts-sdk/literal/snippet-templates.json b/seed/ts-sdk/literal/snippet-templates.json index ac7a2a788bf..ff68c810d3a 100644 --- a/seed/ts-sdk/literal/snippet-templates.json +++ b/seed/ts-sdk/literal/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_headers.send" }, "snippetTemplate": { - "clientInstantiation": "const seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedLiteral = new SeedLiteralClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "version: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Version", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "auditLogging: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Enable-Audit-Logging", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedLiteral.headers.send(\n\t$FERN_INPUT\n)", @@ -64,7 +125,68 @@ "identifierOverride": "endpoint_inlined.send" }, "snippetTemplate": { - "clientInstantiation": "const seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedLiteral = new SeedLiteralClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "version: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Version", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "auditLogging: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Enable-Audit-Logging", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedLiteral.inlined.send(\n\t$FERN_INPUT\n)", @@ -133,7 +255,68 @@ "identifierOverride": "endpoint_path.send" }, "snippetTemplate": { - "clientInstantiation": "const seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedLiteral = new SeedLiteralClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "version: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Version", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "auditLogging: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Enable-Audit-Logging", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedLiteral.path.send()", @@ -157,7 +340,68 @@ "identifierOverride": "endpoint_query.send" }, "snippetTemplate": { - "clientInstantiation": "const seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedLiteral = new SeedLiteralClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "version: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Version", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "auditLogging: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Enable-Audit-Logging", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedLiteral.query.send(\n\t$FERN_INPUT\n)", @@ -210,7 +454,68 @@ "identifierOverride": "endpoint_reference.send" }, "snippetTemplate": { - "clientInstantiation": "const seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedLiteral = new SeedLiteralClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "version: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Version", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "auditLogging: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-API-Enable-Audit-Logging", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedLiteral.reference.send(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/literal/snippet.json b/seed/ts-sdk/literal/snippet.json index db18ab4f73b..c6d9246f6e7 100644 --- a/seed/ts-sdk/literal/snippet.json +++ b/seed/ts-sdk/literal/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\nawait seedLiteral.headers.send({\n endpointVersion: \"02-12-2024\",\n async: true,\n query: \"What is the weather today\"\n});\n" + "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient();\nawait seedLiteral.headers.send({\n endpointVersion: \"02-12-2024\",\n async: true,\n query: \"What is the weather today\"\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\nawait seedLiteral.inlined.send({\n temperature: 10.1,\n prompt: \"You are a helpful assistant\",\n stream: false,\n query: \"What is the weather today\"\n});\n" + "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient();\nawait seedLiteral.inlined.send({\n temperature: 10.1,\n prompt: \"You are a helpful assistant\",\n stream: false,\n query: \"What is the weather today\"\n});\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\nawait seedLiteral.path.send(\"123\");\n" + "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient();\nawait seedLiteral.path.send(\"123\");\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\nawait seedLiteral.query.send({\n prompt: \"You are a helpful assistant\",\n stream: false,\n query: \"What is the weather today\"\n});\n" + "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient();\nawait seedLiteral.query.send({\n prompt: \"You are a helpful assistant\",\n stream: false,\n query: \"What is the weather today\"\n});\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient({ environment: \"YOUR_BASE_URL\" });\nawait seedLiteral.reference.send({\n prompt: \"You are a helpful assistant\",\n stream: false,\n query: \"What is the weather today\"\n});\n" + "client": "import { SeedLiteralClient } from \"@fern/literal\";\n\nconst seedLiteral = new SeedLiteralClient();\nawait seedLiteral.reference.send({\n prompt: \"You are a helpful assistant\",\n stream: false,\n query: \"What is the weather today\"\n});\n" } } ], diff --git a/seed/ts-sdk/mixed-case/no-custom-config/README.md b/seed/ts-sdk/mixed-case/no-custom-config/README.md index 21b7333b686..0a5a03d391f 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/README.md +++ b/seed/ts-sdk/mixed-case/no-custom-config/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedMixedCaseClient } from "@fern/mixed-case"; -const seedMixedCase = new SeedMixedCaseClient({ environment: "YOUR_BASE_URL" }); +const seedMixedCase = new SeedMixedCaseClient(); await seedMixedCase.service.getResource("rsc-xyz"); ``` diff --git a/seed/ts-sdk/mixed-case/no-custom-config/snippet-templates.json b/seed/ts-sdk/mixed-case/no-custom-config/snippet-templates.json index 5006feba424..368ba8faed5 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/mixed-case/no-custom-config/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.getResource" }, "snippetTemplate": { - "clientInstantiation": "const seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMixedCase = new SeedMixedCaseClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMixedCase.service.getResource(\n\t$FERN_INPUT\n)", @@ -64,7 +93,36 @@ "identifierOverride": "endpoint_service.listResources" }, "snippetTemplate": { - "clientInstantiation": "const seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMixedCase = new SeedMixedCaseClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMixedCase.service.listResources(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/mixed-case/no-custom-config/snippet.json b/seed/ts-sdk/mixed-case/no-custom-config/snippet.json index a7bfee72940..94531d3ad38 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/snippet.json +++ b/seed/ts-sdk/mixed-case/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\nawait seedMixedCase.service.getResource(\"rsc-xyz\");\n" + "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient();\nawait seedMixedCase.service.getResource(\"rsc-xyz\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\nawait seedMixedCase.service.listResources({\n pageLimit: 10,\n beforeDate: \"2023-01-01\"\n});\n" + "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient();\nawait seedMixedCase.service.listResources({\n pageLimit: 10,\n beforeDate: \"2023-01-01\"\n});\n" }, "example_identifier": "One" } diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/README.md b/seed/ts-sdk/mixed-case/retain-original-casing/README.md index 21b7333b686..0a5a03d391f 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/README.md +++ b/seed/ts-sdk/mixed-case/retain-original-casing/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedMixedCaseClient } from "@fern/mixed-case"; -const seedMixedCase = new SeedMixedCaseClient({ environment: "YOUR_BASE_URL" }); +const seedMixedCase = new SeedMixedCaseClient(); await seedMixedCase.service.getResource("rsc-xyz"); ``` diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/snippet-templates.json b/seed/ts-sdk/mixed-case/retain-original-casing/snippet-templates.json index 339054af6a4..ede3ca3e07b 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/snippet-templates.json +++ b/seed/ts-sdk/mixed-case/retain-original-casing/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.getResource" }, "snippetTemplate": { - "clientInstantiation": "const seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMixedCase = new SeedMixedCaseClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMixedCase.service.getResource(\n\t$FERN_INPUT\n)", @@ -64,7 +93,36 @@ "identifierOverride": "endpoint_service.listResources" }, "snippetTemplate": { - "clientInstantiation": "const seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMixedCase = new SeedMixedCaseClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMixedCase.service.listResources(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/snippet.json b/seed/ts-sdk/mixed-case/retain-original-casing/snippet.json index 81a4b81d824..a766632c236 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/snippet.json +++ b/seed/ts-sdk/mixed-case/retain-original-casing/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\nawait seedMixedCase.service.getResource(\"rsc-xyz\");\n" + "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient();\nawait seedMixedCase.service.getResource(\"rsc-xyz\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient({ environment: \"YOUR_BASE_URL\" });\nawait seedMixedCase.service.listResources({\n page_limit: 10,\n beforeDate: \"2023-01-01\"\n});\n" + "client": "import { SeedMixedCaseClient } from \"@fern/mixed-case\";\n\nconst seedMixedCase = new SeedMixedCaseClient();\nawait seedMixedCase.service.listResources({\n page_limit: 10,\n beforeDate: \"2023-01-01\"\n});\n" }, "example_identifier": "One" } diff --git a/seed/ts-sdk/multi-line-docs/README.md b/seed/ts-sdk/multi-line-docs/README.md index c85da55c38d..06b3c1356ae 100644 --- a/seed/ts-sdk/multi-line-docs/README.md +++ b/seed/ts-sdk/multi-line-docs/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedMultiLineDocsClient } from "@fern/multi-line-docs"; -const seedMultiLineDocs = new SeedMultiLineDocsClient({ environment: "YOUR_BASE_URL" }); +const seedMultiLineDocs = new SeedMultiLineDocsClient(); await seedMultiLineDocs.user.createUser({ name: "string", age: 1, diff --git a/seed/ts-sdk/multi-line-docs/snippet-templates.json b/seed/ts-sdk/multi-line-docs/snippet-templates.json index 47aa3de7ad2..300aeec823a 100644 --- a/seed/ts-sdk/multi-line-docs/snippet-templates.json +++ b/seed/ts-sdk/multi-line-docs/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_user.getUser" }, "snippetTemplate": { - "clientInstantiation": "const seedMultiLineDocs = new SeedMultiLineDocsClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMultiLineDocs = new SeedMultiLineDocsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMultiLineDocs.user.getUser(\n\t$FERN_INPUT\n)", @@ -64,7 +93,36 @@ "identifierOverride": "endpoint_user.createUser" }, "snippetTemplate": { - "clientInstantiation": "const seedMultiLineDocs = new SeedMultiLineDocsClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMultiLineDocs = new SeedMultiLineDocsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMultiLineDocs.user.createUser(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/multi-line-docs/snippet.json b/seed/ts-sdk/multi-line-docs/snippet.json index 9bc90925c44..19182b8001c 100644 --- a/seed/ts-sdk/multi-line-docs/snippet.json +++ b/seed/ts-sdk/multi-line-docs/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedMultiLineDocsClient } from \"@fern/multi-line-docs\";\n\nconst seedMultiLineDocs = new SeedMultiLineDocsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedMultiLineDocs.user.getUser(\"string\");\n" + "client": "import { SeedMultiLineDocsClient } from \"@fern/multi-line-docs\";\n\nconst seedMultiLineDocs = new SeedMultiLineDocsClient();\nawait seedMultiLineDocs.user.getUser(\"string\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedMultiLineDocsClient } from \"@fern/multi-line-docs\";\n\nconst seedMultiLineDocs = new SeedMultiLineDocsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedMultiLineDocs.user.createUser({\n name: \"string\",\n age: 1\n});\n" + "client": "import { SeedMultiLineDocsClient } from \"@fern/multi-line-docs\";\n\nconst seedMultiLineDocs = new SeedMultiLineDocsClient();\nawait seedMultiLineDocs.user.createUser({\n name: \"string\",\n age: 1\n});\n" } } ], diff --git a/seed/ts-sdk/multi-url-environment/README.md b/seed/ts-sdk/multi-url-environment/README.md index ec2d76f4ffb..c47151692ed 100644 --- a/seed/ts-sdk/multi-url-environment/README.md +++ b/seed/ts-sdk/multi-url-environment/README.md @@ -16,10 +16,9 @@ npm i -s @fern/multi-url-environment Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedMultiUrlEnvironmentClient } from "@fern/multi-url-environment"; -const seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient({ token: "YOUR_TOKEN" }); +const seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient(); await seedMultiUrlEnvironment.ec2.bootInstance({ size: "string", }); diff --git a/seed/ts-sdk/multi-url-environment/snippet-templates.json b/seed/ts-sdk/multi-url-environment/snippet-templates.json index 80b0fedaa42..1ce07857e84 100644 --- a/seed/ts-sdk/multi-url-environment/snippet-templates.json +++ b/seed/ts-sdk/multi-url-environment/snippet-templates.json @@ -11,7 +11,42 @@ "identifierOverride": "endpoint_ec2.bootInstance" }, "snippetTemplate": { - "clientInstantiation": "const seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient({ token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMultiUrlEnvironment.ec2.bootInstance(\n\t$FERN_INPUT\n)", @@ -64,7 +99,42 @@ "identifierOverride": "endpoint_s3.getPresignedUrl" }, "snippetTemplate": { - "clientInstantiation": "const seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient({ token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedMultiUrlEnvironment.s3.getPresignedUrl(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/multi-url-environment/snippet.json b/seed/ts-sdk/multi-url-environment/snippet.json index afc85469e9a..5617d10cd5c 100644 --- a/seed/ts-sdk/multi-url-environment/snippet.json +++ b/seed/ts-sdk/multi-url-environment/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedMultiUrlEnvironmentClient } from \"@fern/multi-url-environment\";\n\nconst seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient({ token: \"YOUR_TOKEN\" });\nawait seedMultiUrlEnvironment.ec2.bootInstance({\n size: \"string\"\n});\n" + "client": "import { SeedMultiUrlEnvironmentClient } from \"@fern/multi-url-environment\";\n\nconst seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient();\nawait seedMultiUrlEnvironment.ec2.bootInstance({\n size: \"string\"\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedMultiUrlEnvironmentClient } from \"@fern/multi-url-environment\";\n\nconst seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient({ token: \"YOUR_TOKEN\" });\nawait seedMultiUrlEnvironment.s3.getPresignedUrl({\n s3Key: \"string\"\n});\n" + "client": "import { SeedMultiUrlEnvironmentClient } from \"@fern/multi-url-environment\";\n\nconst seedMultiUrlEnvironment = new SeedMultiUrlEnvironmentClient();\nawait seedMultiUrlEnvironment.s3.getPresignedUrl({\n s3Key: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/no-environment/README.md b/seed/ts-sdk/no-environment/README.md index e66069e223e..d8406a0bd9e 100644 --- a/seed/ts-sdk/no-environment/README.md +++ b/seed/ts-sdk/no-environment/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedNoEnvironmentClient } from "@fern/no-environment"; -const seedNoEnvironment = new SeedNoEnvironmentClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const seedNoEnvironment = new SeedNoEnvironmentClient(); await seedNoEnvironment.dummy.getDummy(); ``` diff --git a/seed/ts-sdk/no-environment/snippet-templates.json b/seed/ts-sdk/no-environment/snippet-templates.json index 538b2c58e61..544eb7631a4 100644 --- a/seed/ts-sdk/no-environment/snippet-templates.json +++ b/seed/ts-sdk/no-environment/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_dummy.getDummy" }, "snippetTemplate": { - "clientInstantiation": "const seedNoEnvironment = new SeedNoEnvironmentClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedNoEnvironment = new SeedNoEnvironmentClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedNoEnvironment.dummy.getDummy()", diff --git a/seed/ts-sdk/no-environment/snippet.json b/seed/ts-sdk/no-environment/snippet.json index c8e83d3406a..d390e68377f 100644 --- a/seed/ts-sdk/no-environment/snippet.json +++ b/seed/ts-sdk/no-environment/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedNoEnvironmentClient } from \"@fern/no-environment\";\n\nconst seedNoEnvironment = new SeedNoEnvironmentClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedNoEnvironment.dummy.getDummy();\n" + "client": "import { SeedNoEnvironmentClient } from \"@fern/no-environment\";\n\nconst seedNoEnvironment = new SeedNoEnvironmentClient();\nawait seedNoEnvironment.dummy.getDummy();\n" } } ], diff --git a/seed/ts-sdk/oauth-client-credentials-default/README.md b/seed/ts-sdk/oauth-client-credentials-default/README.md index b55560b509c..5e48b4a2dc3 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/README.md +++ b/seed/ts-sdk/oauth-client-credentials-default/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedOauthClientCredentialsDefaultClient } from "@fern/oauth-client-credentials-default"; -const seedOauthClientCredentialsDefault = new SeedOauthClientCredentialsDefaultClient({ - environment: "YOUR_BASE_URL", - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", -}); +const seedOauthClientCredentialsDefault = new SeedOauthClientCredentialsDefaultClient(); await seedOauthClientCredentialsDefault.auth.getToken({ clientId: "string", clientSecret: "string", diff --git a/seed/ts-sdk/oauth-client-credentials-default/snippet-templates.json b/seed/ts-sdk/oauth-client-credentials-default/snippet-templates.json index e13288f0dc7..413d3dcf20f 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/snippet-templates.json +++ b/seed/ts-sdk/oauth-client-credentials-default/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_auth.getToken" }, "snippetTemplate": { - "clientInstantiation": "const seedOauthClientCredentialsDefault = new SeedOauthClientCredentialsDefaultClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedOauthClientCredentialsDefault = new SeedOauthClientCredentialsDefaultClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientId: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientSecret: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedOauthClientCredentialsDefault.auth.getToken(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/oauth-client-credentials-default/snippet.json b/seed/ts-sdk/oauth-client-credentials-default/snippet.json index d9524b5ebe6..7376dbd1d5b 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/snippet.json +++ b/seed/ts-sdk/oauth-client-credentials-default/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedOauthClientCredentialsDefaultClient } from \"@fern/oauth-client-credentials-default\";\n\nconst seedOauthClientCredentialsDefault = new SeedOauthClientCredentialsDefaultClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\nawait seedOauthClientCredentialsDefault.auth.getToken({\n clientId: \"string\",\n clientSecret: \"string\",\n grantType: \"client_credentials\"\n});\n" + "client": "import { SeedOauthClientCredentialsDefaultClient } from \"@fern/oauth-client-credentials-default\";\n\nconst seedOauthClientCredentialsDefault = new SeedOauthClientCredentialsDefaultClient();\nawait seedOauthClientCredentialsDefault.auth.getToken({\n clientId: \"string\",\n clientSecret: \"string\",\n grantType: \"client_credentials\"\n});\n" } } ], diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/README.md b/seed/ts-sdk/oauth-client-credentials-environment-variables/README.md index 6105313cb7b..eec238ca59b 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/README.md +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedOauthClientCredentialsEnvironmentVariablesClient } from "@fern/oauth-client-credentials-environment-variables"; -const seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient({ - environment: "YOUR_BASE_URL", - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", -}); +const seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient(); await seedOauthClientCredentialsEnvironmentVariables.auth.getTokenWithClientCredentials({ clientId: "string", clientSecret: "string", diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet-templates.json b/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet-templates.json index b89fdcfc49d..0dc979ca0d3 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet-templates.json +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_auth.getTokenWithClientCredentials" }, "snippetTemplate": { - "clientInstantiation": "const seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientId: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientSecret: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedOauthClientCredentialsEnvironmentVariables.auth.getTokenWithClientCredentials(\n\t$FERN_INPUT\n)", @@ -96,7 +157,68 @@ "identifierOverride": "endpoint_auth.refreshToken" }, "snippetTemplate": { - "clientInstantiation": "const seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientId: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientSecret: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedOauthClientCredentialsEnvironmentVariables.auth.refreshToken(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet.json b/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet.json index d0a44173475..f98633d606c 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet.json +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedOauthClientCredentialsEnvironmentVariablesClient } from \"@fern/oauth-client-credentials-environment-variables\";\n\nconst seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\nawait seedOauthClientCredentialsEnvironmentVariables.auth.getTokenWithClientCredentials({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" + "client": "import { SeedOauthClientCredentialsEnvironmentVariablesClient } from \"@fern/oauth-client-credentials-environment-variables\";\n\nconst seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient();\nawait seedOauthClientCredentialsEnvironmentVariables.auth.getTokenWithClientCredentials({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedOauthClientCredentialsEnvironmentVariablesClient } from \"@fern/oauth-client-credentials-environment-variables\";\n\nconst seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\nawait seedOauthClientCredentialsEnvironmentVariables.auth.refreshToken({\n clientId: \"string\",\n clientSecret: \"string\",\n refreshToken: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"refresh_token\",\n scope: \"string\"\n});\n" + "client": "import { SeedOauthClientCredentialsEnvironmentVariablesClient } from \"@fern/oauth-client-credentials-environment-variables\";\n\nconst seedOauthClientCredentialsEnvironmentVariables = new SeedOauthClientCredentialsEnvironmentVariablesClient();\nawait seedOauthClientCredentialsEnvironmentVariables.auth.refreshToken({\n clientId: \"string\",\n clientSecret: \"string\",\n refreshToken: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"refresh_token\",\n scope: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/README.md b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/README.md index 7db37a41fbd..dbb57a67b88 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/README.md +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedOauthClientCredentialsClient } from "@fern/oauth-client-credentials-nested-root"; -const seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ - environment: "YOUR_BASE_URL", - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", -}); +const seedOauthClientCredentials = new SeedOauthClientCredentialsClient(); await seedOauthClientCredentials.auth.getToken({ clientId: "string", clientSecret: "string", diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet-templates.json b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet-templates.json index 8a1297a3548..e2e660bd010 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet-templates.json +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_auth.getToken" }, "snippetTemplate": { - "clientInstantiation": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientId: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientSecret: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedOauthClientCredentials.auth.getToken(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet.json b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet.json index 524f8eea29f..e693fd6c42b 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet.json +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials-nested-root\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\nawait seedOauthClientCredentials.auth.getToken({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" + "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials-nested-root\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient();\nawait seedOauthClientCredentials.auth.getToken({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/README.md b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/README.md index 7db37a41fbd..dbb57a67b88 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/README.md +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedOauthClientCredentialsClient } from "@fern/oauth-client-credentials-nested-root"; -const seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ - environment: "YOUR_BASE_URL", - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", -}); +const seedOauthClientCredentials = new SeedOauthClientCredentialsClient(); await seedOauthClientCredentials.auth.getToken({ clientId: "string", clientSecret: "string", diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet-templates.json b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet-templates.json index 8a1297a3548..e2e660bd010 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_auth.getToken" }, "snippetTemplate": { - "clientInstantiation": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientId: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientSecret: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedOauthClientCredentials.auth.getToken(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet.json b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet.json index 524f8eea29f..e693fd6c42b 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet.json +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials-nested-root\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\nawait seedOauthClientCredentials.auth.getToken({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" + "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials-nested-root\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient();\nawait seedOauthClientCredentials.auth.getToken({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/oauth-client-credentials/README.md b/seed/ts-sdk/oauth-client-credentials/README.md index 246aec796bc..f30efb39f03 100644 --- a/seed/ts-sdk/oauth-client-credentials/README.md +++ b/seed/ts-sdk/oauth-client-credentials/README.md @@ -18,11 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedOauthClientCredentialsClient } from "@fern/oauth-client-credentials"; -const seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ - environment: "YOUR_BASE_URL", - clientId: "YOUR_CLIENT_ID", - clientSecret: "YOUR_CLIENT_SECRET", -}); +const seedOauthClientCredentials = new SeedOauthClientCredentialsClient(); await seedOauthClientCredentials.auth.getTokenWithClientCredentials({ clientId: "string", clientSecret: "string", diff --git a/seed/ts-sdk/oauth-client-credentials/snippet-templates.json b/seed/ts-sdk/oauth-client-credentials/snippet-templates.json index cec56244eb8..f307f4ea64c 100644 --- a/seed/ts-sdk/oauth-client-credentials/snippet-templates.json +++ b/seed/ts-sdk/oauth-client-credentials/snippet-templates.json @@ -11,7 +11,68 @@ "identifierOverride": "endpoint_auth.getTokenWithClientCredentials" }, "snippetTemplate": { - "clientInstantiation": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientId: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientSecret: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedOauthClientCredentials.auth.getTokenWithClientCredentials(\n\t$FERN_INPUT\n)", @@ -96,7 +157,68 @@ "identifierOverride": "endpoint_auth.refreshToken" }, "snippetTemplate": { - "clientInstantiation": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedOauthClientCredentials = new SeedOauthClientCredentialsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientId: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "clientSecret: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "Authorization", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedOauthClientCredentials.auth.refreshToken(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/oauth-client-credentials/snippet.json b/seed/ts-sdk/oauth-client-credentials/snippet.json index fe587187e78..b69a8ad44f1 100644 --- a/seed/ts-sdk/oauth-client-credentials/snippet.json +++ b/seed/ts-sdk/oauth-client-credentials/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\nawait seedOauthClientCredentials.auth.getTokenWithClientCredentials({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" + "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient();\nawait seedOauthClientCredentials.auth.getTokenWithClientCredentials({\n clientId: \"string\",\n clientSecret: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"client_credentials\",\n scope: \"string\"\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient({ environment: \"YOUR_BASE_URL\", clientId: \"YOUR_CLIENT_ID\", clientSecret: \"YOUR_CLIENT_SECRET\" });\nawait seedOauthClientCredentials.auth.refreshToken({\n clientId: \"string\",\n clientSecret: \"string\",\n refreshToken: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"refresh_token\",\n scope: \"string\"\n});\n" + "client": "import { SeedOauthClientCredentialsClient } from \"@fern/oauth-client-credentials\";\n\nconst seedOauthClientCredentials = new SeedOauthClientCredentialsClient();\nawait seedOauthClientCredentials.auth.refreshToken({\n clientId: \"string\",\n clientSecret: \"string\",\n refreshToken: \"string\",\n audience: \"https://api.example.com\",\n grantType: \"refresh_token\",\n scope: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/optional/README.md b/seed/ts-sdk/optional/README.md index 428ecb5549c..b492dac591e 100644 --- a/seed/ts-sdk/optional/README.md +++ b/seed/ts-sdk/optional/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedObjectsWithImportsClient } from "@fern/optional"; -const seedObjectsWithImports = new SeedObjectsWithImportsClient({ environment: "YOUR_BASE_URL" }); +const seedObjectsWithImports = new SeedObjectsWithImportsClient(); await seedObjectsWithImports.optional.sendOptionalBody({ string: { key: "value", diff --git a/seed/ts-sdk/optional/snippet-templates.json b/seed/ts-sdk/optional/snippet-templates.json index 43874ceea17..5f7e842da04 100644 --- a/seed/ts-sdk/optional/snippet-templates.json +++ b/seed/ts-sdk/optional/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_optional.sendOptionalBody" }, "snippetTemplate": { - "clientInstantiation": "const seedObjectsWithImports = new SeedObjectsWithImportsClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedObjectsWithImports = new SeedObjectsWithImportsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedObjectsWithImports.optional.sendOptionalBody(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/optional/snippet.json b/seed/ts-sdk/optional/snippet.json index 4035ef9df22..d6a69a5223f 100644 --- a/seed/ts-sdk/optional/snippet.json +++ b/seed/ts-sdk/optional/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedObjectsWithImportsClient } from \"@fern/optional\";\n\nconst seedObjectsWithImports = new SeedObjectsWithImportsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedObjectsWithImports.optional.sendOptionalBody({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + "client": "import { SeedObjectsWithImportsClient } from \"@fern/optional\";\n\nconst seedObjectsWithImports = new SeedObjectsWithImportsClient();\nawait seedObjectsWithImports.optional.sendOptionalBody({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" } } ], diff --git a/seed/ts-sdk/package-yml/README.md b/seed/ts-sdk/package-yml/README.md index 7b760e5ff6e..94086f9c8ba 100644 --- a/seed/ts-sdk/package-yml/README.md +++ b/seed/ts-sdk/package-yml/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedPackageYmlClient } from "@fern/package-yml"; -const seedPackageYml = new SeedPackageYmlClient({ environment: "YOUR_BASE_URL" }); +const seedPackageYml = new SeedPackageYmlClient(); await seedPackageYml.echo("Hello world!"); ``` diff --git a/seed/ts-sdk/package-yml/snippet-templates.json b/seed/ts-sdk/package-yml/snippet-templates.json index cb91a754701..55e48e8b99b 100644 --- a/seed/ts-sdk/package-yml/snippet-templates.json +++ b/seed/ts-sdk/package-yml/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_.echo" }, "snippetTemplate": { - "clientInstantiation": "const seedPackageYml = new SeedPackageYmlClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPackageYml = new SeedPackageYmlClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPackageYml.echo(\n\t$FERN_INPUT\n)", @@ -91,7 +120,36 @@ "identifierOverride": "endpoint_service.nop" }, "snippetTemplate": { - "clientInstantiation": "const seedPackageYml = new SeedPackageYmlClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPackageYml = new SeedPackageYmlClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPackageYml.service.nop(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/package-yml/snippet.json b/seed/ts-sdk/package-yml/snippet.json index b9ad0e9abaf..e01809f3e61 100644 --- a/seed/ts-sdk/package-yml/snippet.json +++ b/seed/ts-sdk/package-yml/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPackageYmlClient } from \"@fern/package-yml\";\n\nconst seedPackageYml = new SeedPackageYmlClient({ environment: \"YOUR_BASE_URL\" });\nawait seedPackageYml.echo(\"Hello world!\");\n" + "client": "import { SeedPackageYmlClient } from \"@fern/package-yml\";\n\nconst seedPackageYml = new SeedPackageYmlClient();\nawait seedPackageYml.echo(\"Hello world!\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPackageYmlClient } from \"@fern/package-yml\";\n\nconst seedPackageYml = new SeedPackageYmlClient({ environment: \"YOUR_BASE_URL\" });\nawait seedPackageYml.service.nop(\"id-219xca8\");\n" + "client": "import { SeedPackageYmlClient } from \"@fern/package-yml\";\n\nconst seedPackageYml = new SeedPackageYmlClient();\nawait seedPackageYml.service.nop(\"id-219xca8\");\n" } } ], diff --git a/seed/ts-sdk/pagination/README.md b/seed/ts-sdk/pagination/README.md index 0256d177f4a..578ed7abed7 100644 --- a/seed/ts-sdk/pagination/README.md +++ b/seed/ts-sdk/pagination/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedPaginationClient, SeedPagination } from "@fern/pagination"; -const seedPagination = new SeedPaginationClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" }); +const seedPagination = new SeedPaginationClient(); await seedPagination.users.listWithCursorPagination({ page: 1, perPage: 1, diff --git a/seed/ts-sdk/pagination/snippet-templates.json b/seed/ts-sdk/pagination/snippet-templates.json index f2882775617..c0f22d29679 100644 --- a/seed/ts-sdk/pagination/snippet-templates.json +++ b/seed/ts-sdk/pagination/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_users.listWithCursorPagination" }, "snippetTemplate": { - "clientInstantiation": "const seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPagination = new SeedPaginationClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPagination.users.listWithCursorPagination(\n\t$FERN_INPUT\n)", @@ -114,7 +159,52 @@ "identifierOverride": "endpoint_users.listWithOffsetPagination" }, "snippetTemplate": { - "clientInstantiation": "const seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPagination = new SeedPaginationClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPagination.users.listWithOffsetPagination(\n\t$FERN_INPUT\n)", @@ -217,7 +307,52 @@ "identifierOverride": "endpoint_users.listWithExtendedResults" }, "snippetTemplate": { - "clientInstantiation": "const seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPagination = new SeedPaginationClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPagination.users.listWithExtendedResults(\n\t$FERN_INPUT\n)", @@ -270,7 +405,52 @@ "identifierOverride": "endpoint_users.listUsernames" }, "snippetTemplate": { - "clientInstantiation": "const seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPagination = new SeedPaginationClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPagination.users.listUsernames(\n\t$FERN_INPUT\n)", @@ -323,7 +503,52 @@ "identifierOverride": "endpoint_users.listWithGlobalConfig" }, "snippetTemplate": { - "clientInstantiation": "const seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPagination = new SeedPaginationClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPagination.users.listWithGlobalConfig(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/pagination/snippet.json b/seed/ts-sdk/pagination/snippet.json index d22027459b9..a76973cfbd3 100644 --- a/seed/ts-sdk/pagination/snippet.json +++ b/seed/ts-sdk/pagination/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPaginationClient, SeedPagination } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedPagination.users.listWithCursorPagination({\n page: 1,\n perPage: 1,\n order: SeedPagination.Order.Asc,\n startingAfter: \"string\"\n});\n" + "client": "import { SeedPaginationClient, SeedPagination } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient();\nawait seedPagination.users.listWithCursorPagination({\n page: 1,\n perPage: 1,\n order: SeedPagination.Order.Asc,\n startingAfter: \"string\"\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPaginationClient, SeedPagination } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedPagination.users.listWithOffsetPagination({\n page: 1,\n perPage: 1,\n order: SeedPagination.Order.Asc,\n startingAfter: \"string\"\n});\n" + "client": "import { SeedPaginationClient, SeedPagination } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient();\nawait seedPagination.users.listWithOffsetPagination({\n page: 1,\n perPage: 1,\n order: SeedPagination.Order.Asc,\n startingAfter: \"string\"\n});\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPaginationClient } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedPagination.users.listWithExtendedResults({\n cursor: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"\n});\n" + "client": "import { SeedPaginationClient } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient();\nawait seedPagination.users.listWithExtendedResults({\n cursor: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPaginationClient } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedPagination.users.listUsernames({\n startingAfter: \"string\"\n});\n" + "client": "import { SeedPaginationClient } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient();\nawait seedPagination.users.listUsernames({\n startingAfter: \"string\"\n});\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPaginationClient } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait seedPagination.users.listWithGlobalConfig({\n offset: 1\n});\n" + "client": "import { SeedPaginationClient } from \"@fern/pagination\";\n\nconst seedPagination = new SeedPaginationClient();\nawait seedPagination.users.listWithGlobalConfig({\n offset: 1\n});\n" } } ], diff --git a/seed/ts-sdk/plain-text/README.md b/seed/ts-sdk/plain-text/README.md index 3b1fc5ad738..cde8f1437c5 100644 --- a/seed/ts-sdk/plain-text/README.md +++ b/seed/ts-sdk/plain-text/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedPlainTextClient } from "@fern/plain-text"; -const seedPlainText = new SeedPlainTextClient({ environment: "YOUR_BASE_URL" }); +const seedPlainText = new SeedPlainTextClient(); await seedPlainText.service.getText(); ``` diff --git a/seed/ts-sdk/plain-text/snippet-templates.json b/seed/ts-sdk/plain-text/snippet-templates.json index 808c80b0864..18b2c995ebd 100644 --- a/seed/ts-sdk/plain-text/snippet-templates.json +++ b/seed/ts-sdk/plain-text/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.getText" }, "snippetTemplate": { - "clientInstantiation": "const seedPlainText = new SeedPlainTextClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedPlainText = new SeedPlainTextClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedPlainText.service.getText()", diff --git a/seed/ts-sdk/plain-text/snippet.json b/seed/ts-sdk/plain-text/snippet.json index 9f90075ca73..6c55b69b8ab 100644 --- a/seed/ts-sdk/plain-text/snippet.json +++ b/seed/ts-sdk/plain-text/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedPlainTextClient } from \"@fern/plain-text\";\n\nconst seedPlainText = new SeedPlainTextClient({ environment: \"YOUR_BASE_URL\" });\nawait seedPlainText.service.getText();\n" + "client": "import { SeedPlainTextClient } from \"@fern/plain-text\";\n\nconst seedPlainText = new SeedPlainTextClient();\nawait seedPlainText.service.getText();\n" } } ], diff --git a/seed/ts-sdk/query-parameters/no-custom-config/README.md b/seed/ts-sdk/query-parameters/no-custom-config/README.md index 76118be83bb..f5ea30d28cc 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/README.md +++ b/seed/ts-sdk/query-parameters/no-custom-config/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedQueryParametersClient } from "@fern/query-parameters"; -const seedQueryParameters = new SeedQueryParametersClient({ environment: "YOUR_BASE_URL" }); +const seedQueryParameters = new SeedQueryParametersClient(); await seedQueryParameters.user.getUsername({ limit: 1, id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diff --git a/seed/ts-sdk/query-parameters/no-custom-config/snippet-templates.json b/seed/ts-sdk/query-parameters/no-custom-config/snippet-templates.json index 08afe8d7da7..88443915cc2 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/query-parameters/no-custom-config/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_user.getUsername" }, "snippetTemplate": { - "clientInstantiation": "const seedQueryParameters = new SeedQueryParametersClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedQueryParameters = new SeedQueryParametersClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedQueryParameters.user.getUsername(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/query-parameters/no-custom-config/snippet.json b/seed/ts-sdk/query-parameters/no-custom-config/snippet.json index 6bc645bbf9c..fe8e037a4ae 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/snippet.json +++ b/seed/ts-sdk/query-parameters/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedQueryParametersClient } from \"@fern/query-parameters\";\n\nconst seedQueryParameters = new SeedQueryParametersClient({ environment: \"YOUR_BASE_URL\" });\nawait seedQueryParameters.user.getUsername({\n limit: 1,\n id: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n date: \"2023-01-15\",\n deadline: new Date(\"2024-01-15T09:30:00.000Z\"),\n bytes: \"SGVsbG8gd29ybGQh\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n },\n userList: [{\n name: \"string\",\n tags: [\"string\"]\n }],\n keyValue: {\n \"string\": \"string\"\n },\n optionalString: \"string\",\n nestedUser: {\n name: \"string\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n }\n },\n optionalUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n excludeUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n filter: \"string\"\n});\n" + "client": "import { SeedQueryParametersClient } from \"@fern/query-parameters\";\n\nconst seedQueryParameters = new SeedQueryParametersClient();\nawait seedQueryParameters.user.getUsername({\n limit: 1,\n id: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n date: \"2023-01-15\",\n deadline: new Date(\"2024-01-15T09:30:00.000Z\"),\n bytes: \"SGVsbG8gd29ybGQh\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n },\n userList: [{\n name: \"string\",\n tags: [\"string\"]\n }],\n keyValue: {\n \"string\": \"string\"\n },\n optionalString: \"string\",\n nestedUser: {\n name: \"string\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n }\n },\n optionalUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n excludeUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n filter: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/query-parameters/no-serde-layer-query/README.md b/seed/ts-sdk/query-parameters/no-serde-layer-query/README.md index 76118be83bb..f5ea30d28cc 100644 --- a/seed/ts-sdk/query-parameters/no-serde-layer-query/README.md +++ b/seed/ts-sdk/query-parameters/no-serde-layer-query/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedQueryParametersClient } from "@fern/query-parameters"; -const seedQueryParameters = new SeedQueryParametersClient({ environment: "YOUR_BASE_URL" }); +const seedQueryParameters = new SeedQueryParametersClient(); await seedQueryParameters.user.getUsername({ limit: 1, id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diff --git a/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet-templates.json b/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet-templates.json index 08afe8d7da7..88443915cc2 100644 --- a/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet-templates.json +++ b/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_user.getUsername" }, "snippetTemplate": { - "clientInstantiation": "const seedQueryParameters = new SeedQueryParametersClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedQueryParameters = new SeedQueryParametersClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedQueryParameters.user.getUsername(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet.json b/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet.json index 6bc645bbf9c..fe8e037a4ae 100644 --- a/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet.json +++ b/seed/ts-sdk/query-parameters/no-serde-layer-query/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedQueryParametersClient } from \"@fern/query-parameters\";\n\nconst seedQueryParameters = new SeedQueryParametersClient({ environment: \"YOUR_BASE_URL\" });\nawait seedQueryParameters.user.getUsername({\n limit: 1,\n id: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n date: \"2023-01-15\",\n deadline: new Date(\"2024-01-15T09:30:00.000Z\"),\n bytes: \"SGVsbG8gd29ybGQh\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n },\n userList: [{\n name: \"string\",\n tags: [\"string\"]\n }],\n keyValue: {\n \"string\": \"string\"\n },\n optionalString: \"string\",\n nestedUser: {\n name: \"string\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n }\n },\n optionalUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n excludeUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n filter: \"string\"\n});\n" + "client": "import { SeedQueryParametersClient } from \"@fern/query-parameters\";\n\nconst seedQueryParameters = new SeedQueryParametersClient();\nawait seedQueryParameters.user.getUsername({\n limit: 1,\n id: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n date: \"2023-01-15\",\n deadline: new Date(\"2024-01-15T09:30:00.000Z\"),\n bytes: \"SGVsbG8gd29ybGQh\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n },\n userList: [{\n name: \"string\",\n tags: [\"string\"]\n }],\n keyValue: {\n \"string\": \"string\"\n },\n optionalString: \"string\",\n nestedUser: {\n name: \"string\",\n user: {\n name: \"string\",\n tags: [\"string\"]\n }\n },\n optionalUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n excludeUser: {\n name: \"string\",\n tags: [\"string\"]\n },\n filter: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/reserved-keywords/README.md b/seed/ts-sdk/reserved-keywords/README.md index aca93de8ea1..d6956c3a471 100644 --- a/seed/ts-sdk/reserved-keywords/README.md +++ b/seed/ts-sdk/reserved-keywords/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedNurseryApiClient } from "@fern/reserved-keywords"; -const seedNurseryApi = new SeedNurseryApiClient({ environment: "YOUR_BASE_URL" }); +const seedNurseryApi = new SeedNurseryApiClient(); await seedNurseryApi.package.test({ for: "string", }); diff --git a/seed/ts-sdk/reserved-keywords/snippet-templates.json b/seed/ts-sdk/reserved-keywords/snippet-templates.json index 09aee15270c..5c09d7edda1 100644 --- a/seed/ts-sdk/reserved-keywords/snippet-templates.json +++ b/seed/ts-sdk/reserved-keywords/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_package.test" }, "snippetTemplate": { - "clientInstantiation": "const seedNurseryApi = new SeedNurseryApiClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedNurseryApi = new SeedNurseryApiClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedNurseryApi.package.test(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/reserved-keywords/snippet.json b/seed/ts-sdk/reserved-keywords/snippet.json index 0ad5b6c3837..983b7f76827 100644 --- a/seed/ts-sdk/reserved-keywords/snippet.json +++ b/seed/ts-sdk/reserved-keywords/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedNurseryApiClient } from \"@fern/reserved-keywords\";\n\nconst seedNurseryApi = new SeedNurseryApiClient({ environment: \"YOUR_BASE_URL\" });\nawait seedNurseryApi.package.test({\n for: \"string\"\n});\n" + "client": "import { SeedNurseryApiClient } from \"@fern/reserved-keywords\";\n\nconst seedNurseryApi = new SeedNurseryApiClient();\nawait seedNurseryApi.package.test({\n for: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/response-property/README.md b/seed/ts-sdk/response-property/README.md index 620d5769e16..48d7c7e1af5 100644 --- a/seed/ts-sdk/response-property/README.md +++ b/seed/ts-sdk/response-property/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedResponsePropertyClient } from "@fern/response-property"; -const seedResponseProperty = new SeedResponsePropertyClient({ environment: "YOUR_BASE_URL" }); +const seedResponseProperty = new SeedResponsePropertyClient(); await seedResponseProperty.service.getMovie("string"); ``` diff --git a/seed/ts-sdk/response-property/snippet-templates.json b/seed/ts-sdk/response-property/snippet-templates.json index 300b6740996..7e962ee9b3c 100644 --- a/seed/ts-sdk/response-property/snippet-templates.json +++ b/seed/ts-sdk/response-property/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.getMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedResponseProperty = new SeedResponsePropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedResponseProperty.service.getMovie(\n\t$FERN_INPUT\n)", @@ -63,7 +92,36 @@ "identifierOverride": "endpoint_service.getMovieDocs" }, "snippetTemplate": { - "clientInstantiation": "const seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedResponseProperty = new SeedResponsePropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedResponseProperty.service.getMovieDocs(\n\t$FERN_INPUT\n)", @@ -115,7 +173,36 @@ "identifierOverride": "endpoint_service.getMovieName" }, "snippetTemplate": { - "clientInstantiation": "const seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedResponseProperty = new SeedResponsePropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedResponseProperty.service.getMovieName(\n\t$FERN_INPUT\n)", @@ -167,7 +254,36 @@ "identifierOverride": "endpoint_service.getMovieMetadata" }, "snippetTemplate": { - "clientInstantiation": "const seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedResponseProperty = new SeedResponsePropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedResponseProperty.service.getMovieMetadata(\n\t$FERN_INPUT\n)", @@ -219,7 +335,36 @@ "identifierOverride": "endpoint_service.getOptionalMovie" }, "snippetTemplate": { - "clientInstantiation": "const seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedResponseProperty = new SeedResponsePropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedResponseProperty.service.getOptionalMovie(\n\t$FERN_INPUT\n)", @@ -271,7 +416,36 @@ "identifierOverride": "endpoint_service.getOptionalMovieDocs" }, "snippetTemplate": { - "clientInstantiation": "const seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedResponseProperty = new SeedResponsePropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedResponseProperty.service.getOptionalMovieDocs(\n\t$FERN_INPUT\n)", @@ -323,7 +497,36 @@ "identifierOverride": "endpoint_service.getOptionalMovieName" }, "snippetTemplate": { - "clientInstantiation": "const seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedResponseProperty = new SeedResponsePropertyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedResponseProperty.service.getOptionalMovieName(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/response-property/snippet.json b/seed/ts-sdk/response-property/snippet.json index cb85abf8d59..aac715d64df 100644 --- a/seed/ts-sdk/response-property/snippet.json +++ b/seed/ts-sdk/response-property/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedResponseProperty.service.getMovie(\"string\");\n" + "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient();\nawait seedResponseProperty.service.getMovie(\"string\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedResponseProperty.service.getMovieDocs(\"string\");\n" + "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient();\nawait seedResponseProperty.service.getMovieDocs(\"string\");\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedResponseProperty.service.getMovieName(\"string\");\n" + "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient();\nawait seedResponseProperty.service.getMovieName(\"string\");\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedResponseProperty.service.getMovieMetadata(\"string\");\n" + "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient();\nawait seedResponseProperty.service.getMovieMetadata(\"string\");\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedResponseProperty.service.getOptionalMovie(\"string\");\n" + "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient();\nawait seedResponseProperty.service.getOptionalMovie(\"string\");\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedResponseProperty.service.getOptionalMovieDocs(\"string\");\n" + "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient();\nawait seedResponseProperty.service.getOptionalMovieDocs(\"string\");\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedResponseProperty.service.getOptionalMovieName(\"string\");\n" + "client": "import { SeedResponsePropertyClient } from \"@fern/response-property\";\n\nconst seedResponseProperty = new SeedResponsePropertyClient();\nawait seedResponseProperty.service.getOptionalMovieName(\"string\");\n" } } ], diff --git a/seed/ts-sdk/server-sent-events/snippet-templates.json b/seed/ts-sdk/server-sent-events/snippet-templates.json index 892609c6156..6b098a60032 100644 --- a/seed/ts-sdk/server-sent-events/snippet-templates.json +++ b/seed/ts-sdk/server-sent-events/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_completions.stream" }, "snippetTemplate": { - "clientInstantiation": "const seedServerSentEvents = new SeedServerSentEventsClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedServerSentEvents = new SeedServerSentEventsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedServerSentEvents.completions.stream(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/single-url-environment-default/README.md b/seed/ts-sdk/single-url-environment-default/README.md index d9abe160fe6..8b38dc7ef07 100644 --- a/seed/ts-sdk/single-url-environment-default/README.md +++ b/seed/ts-sdk/single-url-environment-default/README.md @@ -16,10 +16,9 @@ npm i -s @fern/single-url-environment-default Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedSingleUrlEnvironmentDefaultClient } from "@fern/single-url-environment-default"; -const seedSingleUrlEnvironmentDefault = new SeedSingleUrlEnvironmentDefaultClient({ token: "YOUR_TOKEN" }); +const seedSingleUrlEnvironmentDefault = new SeedSingleUrlEnvironmentDefaultClient(); await seedSingleUrlEnvironmentDefault.dummy.getDummy(); ``` diff --git a/seed/ts-sdk/single-url-environment-default/snippet-templates.json b/seed/ts-sdk/single-url-environment-default/snippet-templates.json index 0f15942a72a..f1dac9f84ff 100644 --- a/seed/ts-sdk/single-url-environment-default/snippet-templates.json +++ b/seed/ts-sdk/single-url-environment-default/snippet-templates.json @@ -11,7 +11,42 @@ "identifierOverride": "endpoint_dummy.getDummy" }, "snippetTemplate": { - "clientInstantiation": "const seedSingleUrlEnvironmentDefault = new SeedSingleUrlEnvironmentDefaultClient({ token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedSingleUrlEnvironmentDefault = new SeedSingleUrlEnvironmentDefaultClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedSingleUrlEnvironmentDefault.dummy.getDummy()", diff --git a/seed/ts-sdk/single-url-environment-default/snippet.json b/seed/ts-sdk/single-url-environment-default/snippet.json index a89090fe31d..74faf101509 100644 --- a/seed/ts-sdk/single-url-environment-default/snippet.json +++ b/seed/ts-sdk/single-url-environment-default/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedSingleUrlEnvironmentDefaultClient } from \"@fern/single-url-environment-default\";\n\nconst seedSingleUrlEnvironmentDefault = new SeedSingleUrlEnvironmentDefaultClient({ token: \"YOUR_TOKEN\" });\nawait seedSingleUrlEnvironmentDefault.dummy.getDummy();\n" + "client": "import { SeedSingleUrlEnvironmentDefaultClient } from \"@fern/single-url-environment-default\";\n\nconst seedSingleUrlEnvironmentDefault = new SeedSingleUrlEnvironmentDefaultClient();\nawait seedSingleUrlEnvironmentDefault.dummy.getDummy();\n" } } ], diff --git a/seed/ts-sdk/single-url-environment-no-default/README.md b/seed/ts-sdk/single-url-environment-no-default/README.md index 5a2241eadbd..4aad318f3fc 100644 --- a/seed/ts-sdk/single-url-environment-no-default/README.md +++ b/seed/ts-sdk/single-url-environment-no-default/README.md @@ -16,13 +16,9 @@ npm i -s @fern/single-url-environment-no-default Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedSingleUrlEnvironmentNoDefaultClient } from "@fern/single-url-environment-no-default"; -const seedSingleUrlEnvironmentNoDefault = new SeedSingleUrlEnvironmentNoDefaultClient({ - environment: environments.SeedSingleUrlEnvironmentNoDefaultEnvironment.Production, - token: "YOUR_TOKEN", -}); +const seedSingleUrlEnvironmentNoDefault = new SeedSingleUrlEnvironmentNoDefaultClient(); await seedSingleUrlEnvironmentNoDefault.dummy.getDummy(); ``` diff --git a/seed/ts-sdk/single-url-environment-no-default/snippet-templates.json b/seed/ts-sdk/single-url-environment-no-default/snippet-templates.json index 2490972f650..a088c486eed 100644 --- a/seed/ts-sdk/single-url-environment-no-default/snippet-templates.json +++ b/seed/ts-sdk/single-url-environment-no-default/snippet-templates.json @@ -11,7 +11,52 @@ "identifierOverride": "endpoint_dummy.getDummy" }, "snippetTemplate": { - "clientInstantiation": "const seedSingleUrlEnvironmentNoDefault = new SeedSingleUrlEnvironmentNoDefaultClient({ environment: environments.SeedSingleUrlEnvironmentNoDefaultEnvironment.Production, token: \"YOUR_TOKEN\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedSingleUrlEnvironmentNoDefault = new SeedSingleUrlEnvironmentNoDefaultClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: environments.SeedSingleUrlEnvironmentNoDefaultEnvironment.Production", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedSingleUrlEnvironmentNoDefault.dummy.getDummy()", diff --git a/seed/ts-sdk/single-url-environment-no-default/snippet.json b/seed/ts-sdk/single-url-environment-no-default/snippet.json index 36b5ebde216..1c82d1a4a5a 100644 --- a/seed/ts-sdk/single-url-environment-no-default/snippet.json +++ b/seed/ts-sdk/single-url-environment-no-default/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedSingleUrlEnvironmentNoDefaultClient } from \"@fern/single-url-environment-no-default\";\n\nconst seedSingleUrlEnvironmentNoDefault = new SeedSingleUrlEnvironmentNoDefaultClient({ environment: environments.SeedSingleUrlEnvironmentNoDefaultEnvironment.Production, token: \"YOUR_TOKEN\" });\nawait seedSingleUrlEnvironmentNoDefault.dummy.getDummy();\n" + "client": "import { SeedSingleUrlEnvironmentNoDefaultClient } from \"@fern/single-url-environment-no-default\";\n\nconst seedSingleUrlEnvironmentNoDefault = new SeedSingleUrlEnvironmentNoDefaultClient();\nawait seedSingleUrlEnvironmentNoDefault.dummy.getDummy();\n" } } ], diff --git a/seed/ts-sdk/streaming/allow-custom-fetcher/snippet-templates.json b/seed/ts-sdk/streaming/allow-custom-fetcher/snippet-templates.json index 74f24d6df2e..d9ed3bc7b32 100644 --- a/seed/ts-sdk/streaming/allow-custom-fetcher/snippet-templates.json +++ b/seed/ts-sdk/streaming/allow-custom-fetcher/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_dummy.generate-stream" }, "snippetTemplate": { - "clientInstantiation": "const seedStreaming = new SeedStreamingClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedStreaming = new SeedStreamingClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedStreaming.dummy.generateStream(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/streaming/no-custom-config/snippet-templates.json b/seed/ts-sdk/streaming/no-custom-config/snippet-templates.json index 74f24d6df2e..d9ed3bc7b32 100644 --- a/seed/ts-sdk/streaming/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/streaming/no-custom-config/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_dummy.generate-stream" }, "snippetTemplate": { - "clientInstantiation": "const seedStreaming = new SeedStreamingClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedStreaming = new SeedStreamingClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedStreaming.dummy.generateStream(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/trace/exhaustive/README.md b/seed/ts-sdk/trace/exhaustive/README.md index c7a9841c380..df1072148eb 100644 --- a/seed/ts-sdk/trace/exhaustive/README.md +++ b/seed/ts-sdk/trace/exhaustive/README.md @@ -16,10 +16,9 @@ npm i -s @fern/trace Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedTraceClient, SeedTrace } from "@fern/trace"; -const seedTrace = new SeedTraceClient({ token: "YOUR_TOKEN", xRandomHeader: "YOUR_X_RANDOM_HEADER" }); +const seedTrace = new SeedTraceClient(); await seedTrace.admin.updateTestSubmissionStatus( SeedTrace.SubmissionId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), SeedTrace.TestSubmissionStatus.stopped() diff --git a/seed/ts-sdk/trace/exhaustive/snippet-templates.json b/seed/ts-sdk/trace/exhaustive/snippet-templates.json index 4db303c4a07..47b52a25cd6 100644 --- a/seed/ts-sdk/trace/exhaustive/snippet-templates.json +++ b/seed/ts-sdk/trace/exhaustive/snippet-templates.json @@ -11,7 +11,58 @@ "identifierOverride": "endpoint_v2.test" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.test()", @@ -35,7 +86,58 @@ "identifierOverride": "endpoint_admin.updateTestSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateTestSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -3465,7 +3567,58 @@ "identifierOverride": "endpoint_admin.sendTestSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendTestSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -4729,7 +4882,58 @@ "identifierOverride": "endpoint_admin.updateWorkspaceSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateWorkspaceSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -5399,7 +5603,58 @@ "identifierOverride": "endpoint_admin.sendWorkspaceSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendWorkspaceSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -5960,7 +6215,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCase" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCase(\n\t$FERN_INPUT\n)", @@ -14565,7 +14871,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCaseV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCaseV2(\n\t$FERN_INPUT\n)", @@ -18475,7 +18832,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspace" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspace(\n\t$FERN_INPUT\n)", @@ -22506,7 +22914,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspaceV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspaceV2(\n\t$FERN_INPUT\n)", @@ -26400,7 +26859,58 @@ "identifierOverride": "endpoint_homepage.getHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.getHomepageProblems()", @@ -26424,7 +26934,58 @@ "identifierOverride": "endpoint_homepage.setHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.setHomepageProblems(\n\t$FERN_INPUT\n)", @@ -26487,7 +27048,58 @@ "identifierOverride": "endpoint_migration.getAttemptedMigrations" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.migration.getAttemptedMigrations(\n\t$FERN_INPUT\n)", @@ -26540,7 +27152,58 @@ "identifierOverride": "endpoint_playlist.createPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.createPlaylist(\n\t$FERN_INPUT\n)", @@ -26692,7 +27355,58 @@ "identifierOverride": "endpoint_playlist.getPlaylists" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylists(\n\t$FERN_INPUT\n)", @@ -26837,7 +27551,58 @@ "identifierOverride": "endpoint_playlist.getPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylist(\n\t$FERN_INPUT\n)", @@ -26906,7 +27671,58 @@ "identifierOverride": "endpoint_playlist.updatePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.updatePlaylist(\n\t$FERN_INPUT\n)", @@ -27042,7 +27858,58 @@ "identifierOverride": "endpoint_playlist.deletePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.deletePlaylist(\n\t$FERN_INPUT\n)", @@ -27111,7 +27978,58 @@ "identifierOverride": "endpoint_problem.createProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.createProblem(\n\t$FERN_INPUT\n)", @@ -37392,7 +38310,58 @@ "identifierOverride": "endpoint_problem.updateProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.updateProblem(\n\t$FERN_INPUT\n)", @@ -47701,7 +48670,58 @@ "identifierOverride": "endpoint_problem.deleteProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.deleteProblem(\n\t$FERN_INPUT\n)", @@ -47754,7 +48774,58 @@ "identifierOverride": "endpoint_problem.getDefaultStarterFiles" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.getDefaultStarterFiles(\n\t$FERN_INPUT\n)", @@ -66672,7 +67743,58 @@ "identifierOverride": "endpoint_submission.createExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.createExecutionSession(\n\t$FERN_INPUT\n)", @@ -66728,7 +67850,58 @@ "identifierOverride": "endpoint_submission.getExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSession(\n\t$FERN_INPUT\n)", @@ -66781,7 +67954,58 @@ "identifierOverride": "endpoint_submission.stopExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.stopExecutionSession(\n\t$FERN_INPUT\n)", @@ -66834,7 +68058,58 @@ "identifierOverride": "endpoint_submission.getExecutionSessionsState" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSessionsState()", @@ -66858,7 +68133,58 @@ "identifierOverride": "endpoint_sysprop.setNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.setNumWarmInstances(\n\t$FERN_INPUT\n)", @@ -66930,7 +68256,58 @@ "identifierOverride": "endpoint_sysprop.getNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.getNumWarmInstances()", @@ -66954,7 +68331,58 @@ "identifierOverride": "endpoint_v2/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLightweightProblems()", @@ -66978,7 +68406,58 @@ "identifierOverride": "endpoint_v2/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblems()", @@ -67002,7 +68481,58 @@ "identifierOverride": "endpoint_v2/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67055,7 +68585,58 @@ "identifierOverride": "endpoint_v2/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblemVersion(\n\t$FERN_INPUT\n)", @@ -67124,7 +68705,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLightweightProblems()", @@ -67148,7 +68780,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblems()", @@ -67172,7 +68855,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67225,7 +68959,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblemVersion(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/trace/exhaustive/snippet.json b/seed/ts-sdk/trace/exhaustive/snippet.json index e0befb6e832..cfbc4f6fd98 100644 --- a/seed/ts-sdk/trace/exhaustive/snippet.json +++ b/seed/ts-sdk/trace/exhaustive/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.test();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.test();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateTestSubmissionStatus(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), SeedTrace.TestSubmissionStatus.stopped());\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateTestSubmissionStatus(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), SeedTrace.TestSubmissionStatus.stopped());\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendTestSubmissionUpdate(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: SeedTrace.TestSubmissionUpdateInfo.running(SeedTrace.RunningSubmissionState.QueueingSubmission)\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendTestSubmissionUpdate(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: SeedTrace.TestSubmissionUpdateInfo.running(SeedTrace.RunningSubmissionState.QueueingSubmission)\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), SeedTrace.WorkspaceSubmissionStatus.stopped());\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), SeedTrace.WorkspaceSubmissionStatus.stopped());\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: SeedTrace.WorkspaceSubmissionUpdateInfo.running(SeedTrace.RunningSubmissionState.QueueingSubmission)\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: SeedTrace.WorkspaceSubmissionUpdateInfo.running(SeedTrace.RunningSubmissionState.QueueingSubmission)\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCase(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCase(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCaseV2(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), SeedTrace.TestCaseId(\"string\"), [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n file: {},\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCaseV2(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), SeedTrace.TestCaseId(\"string\"), [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n file: {},\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspace(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), {\n workspaceRunDetails: {\n exceptionV2: SeedTrace.ExceptionV2.generic({}),\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspace(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), {\n workspaceRunDetails: {\n exceptionV2: SeedTrace.ExceptionV2.generic({}),\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspaceV2(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n file: {},\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspaceV2(SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"), [{\n submissionId: SeedTrace.SubmissionId(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"),\n lineNumber: 1,\n file: {},\n returnValue: SeedTrace.DebugVariableValue.integerValue(1),\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.getHomepageProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.getHomepageProblems();\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.setHomepageProblems([SeedTrace.ProblemId(\"string\")]);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.setHomepageProblems([SeedTrace.ProblemId(\"string\")]);\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.migration.getAttemptedMigrations({\n adminKeyHeader: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.migration.getAttemptedMigrations({\n adminKeyHeader: \"string\"\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [SeedTrace.ProblemId(\"string\")]\n }\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [SeedTrace.ProblemId(\"string\")]\n }\n});\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylist(1, SeedTrace.PlaylistId(\"string\"));\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylist(1, SeedTrace.PlaylistId(\"string\"));\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.updatePlaylist(1, SeedTrace.PlaylistId(\"string\"), {\n name: \"string\",\n problems: [SeedTrace.ProblemId(\"string\")]\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.updatePlaylist(1, SeedTrace.PlaylistId(\"string\"), {\n name: \"string\",\n problems: [SeedTrace.ProblemId(\"string\")]\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.deletePlaylist(1, SeedTrace.PlaylistId(\"string\"));\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.deletePlaylist(1, SeedTrace.PlaylistId(\"string\"));\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [SeedTrace.ProblemDescriptionBoard.html(\"string\")]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: SeedTrace.VariableType.integerType(),\n name: \"string\"\n }],\n outputType: SeedTrace.VariableType.integerType(),\n testcases: [{\n testCase: {\n id: \"string\",\n params: [SeedTrace.VariableValue.integerValue(1)]\n },\n expectedResult: SeedTrace.VariableValue.integerValue(1)\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [SeedTrace.ProblemDescriptionBoard.html(\"string\")]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: SeedTrace.VariableType.integerType(),\n name: \"string\"\n }],\n outputType: SeedTrace.VariableType.integerType(),\n testcases: [{\n testCase: {\n id: \"string\",\n params: [SeedTrace.VariableValue.integerValue(1)]\n },\n expectedResult: SeedTrace.VariableValue.integerValue(1)\n }],\n methodName: \"string\"\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.updateProblem(SeedTrace.ProblemId(\"string\"), {\n problemName: \"string\",\n problemDescription: {\n boards: [SeedTrace.ProblemDescriptionBoard.html(\"string\")]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: SeedTrace.VariableType.integerType(),\n name: \"string\"\n }],\n outputType: SeedTrace.VariableType.integerType(),\n testcases: [{\n testCase: {\n id: \"string\",\n params: [SeedTrace.VariableValue.integerValue(1)]\n },\n expectedResult: SeedTrace.VariableValue.integerValue(1)\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.updateProblem(SeedTrace.ProblemId(\"string\"), {\n problemName: \"string\",\n problemDescription: {\n boards: [SeedTrace.ProblemDescriptionBoard.html(\"string\")]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: SeedTrace.VariableType.integerType(),\n name: \"string\"\n }],\n outputType: SeedTrace.VariableType.integerType(),\n testcases: [{\n testCase: {\n id: \"string\",\n params: [SeedTrace.VariableValue.integerValue(1)]\n },\n expectedResult: SeedTrace.VariableValue.integerValue(1)\n }],\n methodName: \"string\"\n});\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.deleteProblem(SeedTrace.ProblemId(\"string\"));\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.deleteProblem(SeedTrace.ProblemId(\"string\"));\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: SeedTrace.VariableType.integerType(),\n name: \"string\"\n }],\n outputType: SeedTrace.VariableType.integerType(),\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: SeedTrace.VariableType.integerType(),\n name: \"string\"\n }],\n outputType: SeedTrace.VariableType.integerType(),\n methodName: \"string\"\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSession(\"string\");\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSessionsState();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSessionsState();\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.getNumWarmInstances();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.getNumWarmInstances();\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLightweightProblems();\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblems();\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLatestProblem(SeedTrace.ProblemId(\"string\"));\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLatestProblem(SeedTrace.ProblemId(\"string\"));\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblemVersion(SeedTrace.ProblemId(\"string\"), 1);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblemVersion(SeedTrace.ProblemId(\"string\"), 1);\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblems();\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLatestProblem(SeedTrace.ProblemId(\"string\"));\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLatestProblem(SeedTrace.ProblemId(\"string\"));\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblemVersion(SeedTrace.ProblemId(\"string\"), 1);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblemVersion(SeedTrace.ProblemId(\"string\"), 1);\n" } } ], diff --git a/seed/ts-sdk/trace/no-custom-config/README.md b/seed/ts-sdk/trace/no-custom-config/README.md index b411bc1a404..0f8c645d51e 100644 --- a/seed/ts-sdk/trace/no-custom-config/README.md +++ b/seed/ts-sdk/trace/no-custom-config/README.md @@ -16,10 +16,9 @@ npm i -s @fern/trace Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedTraceClient } from "@fern/trace"; -const seedTrace = new SeedTraceClient({ token: "YOUR_TOKEN", xRandomHeader: "YOUR_X_RANDOM_HEADER" }); +const seedTrace = new SeedTraceClient(); await seedTrace.admin.updateTestSubmissionStatus("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { type: "stopped", }); diff --git a/seed/ts-sdk/trace/no-custom-config/snippet-templates.json b/seed/ts-sdk/trace/no-custom-config/snippet-templates.json index 4db303c4a07..47b52a25cd6 100644 --- a/seed/ts-sdk/trace/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/trace/no-custom-config/snippet-templates.json @@ -11,7 +11,58 @@ "identifierOverride": "endpoint_v2.test" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.test()", @@ -35,7 +86,58 @@ "identifierOverride": "endpoint_admin.updateTestSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateTestSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -3465,7 +3567,58 @@ "identifierOverride": "endpoint_admin.sendTestSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendTestSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -4729,7 +4882,58 @@ "identifierOverride": "endpoint_admin.updateWorkspaceSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateWorkspaceSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -5399,7 +5603,58 @@ "identifierOverride": "endpoint_admin.sendWorkspaceSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendWorkspaceSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -5960,7 +6215,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCase" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCase(\n\t$FERN_INPUT\n)", @@ -14565,7 +14871,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCaseV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCaseV2(\n\t$FERN_INPUT\n)", @@ -18475,7 +18832,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspace" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspace(\n\t$FERN_INPUT\n)", @@ -22506,7 +22914,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspaceV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspaceV2(\n\t$FERN_INPUT\n)", @@ -26400,7 +26859,58 @@ "identifierOverride": "endpoint_homepage.getHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.getHomepageProblems()", @@ -26424,7 +26934,58 @@ "identifierOverride": "endpoint_homepage.setHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.setHomepageProblems(\n\t$FERN_INPUT\n)", @@ -26487,7 +27048,58 @@ "identifierOverride": "endpoint_migration.getAttemptedMigrations" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.migration.getAttemptedMigrations(\n\t$FERN_INPUT\n)", @@ -26540,7 +27152,58 @@ "identifierOverride": "endpoint_playlist.createPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.createPlaylist(\n\t$FERN_INPUT\n)", @@ -26692,7 +27355,58 @@ "identifierOverride": "endpoint_playlist.getPlaylists" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylists(\n\t$FERN_INPUT\n)", @@ -26837,7 +27551,58 @@ "identifierOverride": "endpoint_playlist.getPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylist(\n\t$FERN_INPUT\n)", @@ -26906,7 +27671,58 @@ "identifierOverride": "endpoint_playlist.updatePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.updatePlaylist(\n\t$FERN_INPUT\n)", @@ -27042,7 +27858,58 @@ "identifierOverride": "endpoint_playlist.deletePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.deletePlaylist(\n\t$FERN_INPUT\n)", @@ -27111,7 +27978,58 @@ "identifierOverride": "endpoint_problem.createProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.createProblem(\n\t$FERN_INPUT\n)", @@ -37392,7 +38310,58 @@ "identifierOverride": "endpoint_problem.updateProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.updateProblem(\n\t$FERN_INPUT\n)", @@ -47701,7 +48670,58 @@ "identifierOverride": "endpoint_problem.deleteProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.deleteProblem(\n\t$FERN_INPUT\n)", @@ -47754,7 +48774,58 @@ "identifierOverride": "endpoint_problem.getDefaultStarterFiles" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.getDefaultStarterFiles(\n\t$FERN_INPUT\n)", @@ -66672,7 +67743,58 @@ "identifierOverride": "endpoint_submission.createExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.createExecutionSession(\n\t$FERN_INPUT\n)", @@ -66728,7 +67850,58 @@ "identifierOverride": "endpoint_submission.getExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSession(\n\t$FERN_INPUT\n)", @@ -66781,7 +67954,58 @@ "identifierOverride": "endpoint_submission.stopExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.stopExecutionSession(\n\t$FERN_INPUT\n)", @@ -66834,7 +68058,58 @@ "identifierOverride": "endpoint_submission.getExecutionSessionsState" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSessionsState()", @@ -66858,7 +68133,58 @@ "identifierOverride": "endpoint_sysprop.setNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.setNumWarmInstances(\n\t$FERN_INPUT\n)", @@ -66930,7 +68256,58 @@ "identifierOverride": "endpoint_sysprop.getNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.getNumWarmInstances()", @@ -66954,7 +68331,58 @@ "identifierOverride": "endpoint_v2/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLightweightProblems()", @@ -66978,7 +68406,58 @@ "identifierOverride": "endpoint_v2/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblems()", @@ -67002,7 +68481,58 @@ "identifierOverride": "endpoint_v2/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67055,7 +68585,58 @@ "identifierOverride": "endpoint_v2/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblemVersion(\n\t$FERN_INPUT\n)", @@ -67124,7 +68705,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLightweightProblems()", @@ -67148,7 +68780,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblems()", @@ -67172,7 +68855,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67225,7 +68959,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblemVersion(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/trace/no-custom-config/snippet.json b/seed/ts-sdk/trace/no-custom-config/snippet.json index 191f9c0cd8d..76494485d2f 100644 --- a/seed/ts-sdk/trace/no-custom-config/snippet.json +++ b/seed/ts-sdk/trace/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.test();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.test();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateTestSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateTestSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendTestSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendTestSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCase(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCase(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCaseV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCaseV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspace(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n workspaceRunDetails: {\n exceptionV2: {\n type: \"generic\"\n },\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspace(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n workspaceRunDetails: {\n exceptionV2: {\n type: \"generic\"\n },\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspaceV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspaceV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.getHomepageProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.getHomepageProblems();\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.setHomepageProblems([\"string\"]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.setHomepageProblems([\"string\"]);\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.migration.getAttemptedMigrations({\n adminKeyHeader: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.migration.getAttemptedMigrations({\n adminKeyHeader: \"string\"\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [\"string\"]\n }\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [\"string\"]\n }\n});\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylist(1, \"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylist(1, \"string\");\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.updatePlaylist(1, \"string\", {\n name: \"string\",\n problems: [\"string\"]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.updatePlaylist(1, \"string\", {\n name: \"string\",\n problems: [\"string\"]\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.deletePlaylist(1, \"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.deletePlaylist(1, \"string\");\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.updateProblem(\"string\", {\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.updateProblem(\"string\", {\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.deleteProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.deleteProblem(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n methodName: \"string\"\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSession(\"string\");\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSessionsState();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSessionsState();\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.getNumWarmInstances();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.getNumWarmInstances();\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLightweightProblems();\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblems();\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLatestProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLatestProblem(\"string\");\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblemVersion(\"string\", 1);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblemVersion(\"string\", 1);\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblems();\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLatestProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLatestProblem(\"string\");\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblemVersion(\"string\", 1);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblemVersion(\"string\", 1);\n" } } ], diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/README.md b/seed/ts-sdk/trace/no-zurg-no-throwing/README.md index b411bc1a404..0f8c645d51e 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/README.md +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/README.md @@ -16,10 +16,9 @@ npm i -s @fern/trace Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedTraceClient } from "@fern/trace"; -const seedTrace = new SeedTraceClient({ token: "YOUR_TOKEN", xRandomHeader: "YOUR_X_RANDOM_HEADER" }); +const seedTrace = new SeedTraceClient(); await seedTrace.admin.updateTestSubmissionStatus("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { type: "stopped", }); diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/snippet-templates.json b/seed/ts-sdk/trace/no-zurg-no-throwing/snippet-templates.json index 4db303c4a07..47b52a25cd6 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/snippet-templates.json +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/snippet-templates.json @@ -11,7 +11,58 @@ "identifierOverride": "endpoint_v2.test" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.test()", @@ -35,7 +86,58 @@ "identifierOverride": "endpoint_admin.updateTestSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateTestSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -3465,7 +3567,58 @@ "identifierOverride": "endpoint_admin.sendTestSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendTestSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -4729,7 +4882,58 @@ "identifierOverride": "endpoint_admin.updateWorkspaceSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateWorkspaceSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -5399,7 +5603,58 @@ "identifierOverride": "endpoint_admin.sendWorkspaceSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendWorkspaceSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -5960,7 +6215,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCase" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCase(\n\t$FERN_INPUT\n)", @@ -14565,7 +14871,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCaseV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCaseV2(\n\t$FERN_INPUT\n)", @@ -18475,7 +18832,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspace" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspace(\n\t$FERN_INPUT\n)", @@ -22506,7 +22914,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspaceV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspaceV2(\n\t$FERN_INPUT\n)", @@ -26400,7 +26859,58 @@ "identifierOverride": "endpoint_homepage.getHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.getHomepageProblems()", @@ -26424,7 +26934,58 @@ "identifierOverride": "endpoint_homepage.setHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.setHomepageProblems(\n\t$FERN_INPUT\n)", @@ -26487,7 +27048,58 @@ "identifierOverride": "endpoint_migration.getAttemptedMigrations" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.migration.getAttemptedMigrations(\n\t$FERN_INPUT\n)", @@ -26540,7 +27152,58 @@ "identifierOverride": "endpoint_playlist.createPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.createPlaylist(\n\t$FERN_INPUT\n)", @@ -26692,7 +27355,58 @@ "identifierOverride": "endpoint_playlist.getPlaylists" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylists(\n\t$FERN_INPUT\n)", @@ -26837,7 +27551,58 @@ "identifierOverride": "endpoint_playlist.getPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylist(\n\t$FERN_INPUT\n)", @@ -26906,7 +27671,58 @@ "identifierOverride": "endpoint_playlist.updatePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.updatePlaylist(\n\t$FERN_INPUT\n)", @@ -27042,7 +27858,58 @@ "identifierOverride": "endpoint_playlist.deletePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.deletePlaylist(\n\t$FERN_INPUT\n)", @@ -27111,7 +27978,58 @@ "identifierOverride": "endpoint_problem.createProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.createProblem(\n\t$FERN_INPUT\n)", @@ -37392,7 +38310,58 @@ "identifierOverride": "endpoint_problem.updateProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.updateProblem(\n\t$FERN_INPUT\n)", @@ -47701,7 +48670,58 @@ "identifierOverride": "endpoint_problem.deleteProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.deleteProblem(\n\t$FERN_INPUT\n)", @@ -47754,7 +48774,58 @@ "identifierOverride": "endpoint_problem.getDefaultStarterFiles" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.getDefaultStarterFiles(\n\t$FERN_INPUT\n)", @@ -66672,7 +67743,58 @@ "identifierOverride": "endpoint_submission.createExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.createExecutionSession(\n\t$FERN_INPUT\n)", @@ -66728,7 +67850,58 @@ "identifierOverride": "endpoint_submission.getExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSession(\n\t$FERN_INPUT\n)", @@ -66781,7 +67954,58 @@ "identifierOverride": "endpoint_submission.stopExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.stopExecutionSession(\n\t$FERN_INPUT\n)", @@ -66834,7 +68058,58 @@ "identifierOverride": "endpoint_submission.getExecutionSessionsState" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSessionsState()", @@ -66858,7 +68133,58 @@ "identifierOverride": "endpoint_sysprop.setNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.setNumWarmInstances(\n\t$FERN_INPUT\n)", @@ -66930,7 +68256,58 @@ "identifierOverride": "endpoint_sysprop.getNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.getNumWarmInstances()", @@ -66954,7 +68331,58 @@ "identifierOverride": "endpoint_v2/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLightweightProblems()", @@ -66978,7 +68406,58 @@ "identifierOverride": "endpoint_v2/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblems()", @@ -67002,7 +68481,58 @@ "identifierOverride": "endpoint_v2/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67055,7 +68585,58 @@ "identifierOverride": "endpoint_v2/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblemVersion(\n\t$FERN_INPUT\n)", @@ -67124,7 +68705,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLightweightProblems()", @@ -67148,7 +68780,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblems()", @@ -67172,7 +68855,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67225,7 +68959,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblemVersion(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/snippet.json b/seed/ts-sdk/trace/no-zurg-no-throwing/snippet.json index bbb18198962..1e9082b1404 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/snippet.json +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.test();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.test();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateTestSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateTestSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendTestSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendTestSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCase(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCase(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCaseV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCaseV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspace(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n workspaceRunDetails: {\n exceptionV2: {\n type: \"generic\"\n },\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspace(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n workspaceRunDetails: {\n exceptionV2: {\n type: \"generic\"\n },\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspaceV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspaceV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.getHomepageProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.getHomepageProblems();\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.setHomepageProblems([\"string\"]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.setHomepageProblems([\"string\"]);\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.migration.getAttemptedMigrations({\n \"admin-key-header\": \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.migration.getAttemptedMigrations({\n \"admin-key-header\": \"string\"\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [\"string\"]\n }\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [\"string\"]\n }\n});\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylist(1, \"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylist(1, \"string\");\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.updatePlaylist(1, \"string\", {\n name: \"string\",\n problems: [\"string\"]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.updatePlaylist(1, \"string\", {\n name: \"string\",\n problems: [\"string\"]\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.deletePlaylist(1, \"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.deletePlaylist(1, \"string\");\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.updateProblem(\"string\", {\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.updateProblem(\"string\", {\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.deleteProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.deleteProblem(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n methodName: \"string\"\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSession(\"string\");\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSessionsState();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSessionsState();\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.getNumWarmInstances();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.getNumWarmInstances();\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLightweightProblems();\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblems();\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLatestProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLatestProblem(\"string\");\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblemVersion(\"string\", 1);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblemVersion(\"string\", 1);\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblems();\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLatestProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLatestProblem(\"string\");\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblemVersion(\"string\", 1);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblemVersion(\"string\", 1);\n" } } ], diff --git a/seed/ts-sdk/trace/no-zurg-trace/README.md b/seed/ts-sdk/trace/no-zurg-trace/README.md index b411bc1a404..0f8c645d51e 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/README.md +++ b/seed/ts-sdk/trace/no-zurg-trace/README.md @@ -16,10 +16,9 @@ npm i -s @fern/trace Instantiate and use the client with the following: ```typescript -import * as environments from "../src/environments"; import { SeedTraceClient } from "@fern/trace"; -const seedTrace = new SeedTraceClient({ token: "YOUR_TOKEN", xRandomHeader: "YOUR_X_RANDOM_HEADER" }); +const seedTrace = new SeedTraceClient(); await seedTrace.admin.updateTestSubmissionStatus("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { type: "stopped", }); diff --git a/seed/ts-sdk/trace/no-zurg-trace/snippet-templates.json b/seed/ts-sdk/trace/no-zurg-trace/snippet-templates.json index 4db303c4a07..47b52a25cd6 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/snippet-templates.json +++ b/seed/ts-sdk/trace/no-zurg-trace/snippet-templates.json @@ -11,7 +11,58 @@ "identifierOverride": "endpoint_v2.test" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.test()", @@ -35,7 +86,58 @@ "identifierOverride": "endpoint_admin.updateTestSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateTestSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -3465,7 +3567,58 @@ "identifierOverride": "endpoint_admin.sendTestSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendTestSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -4729,7 +4882,58 @@ "identifierOverride": "endpoint_admin.updateWorkspaceSubmissionStatus" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.updateWorkspaceSubmissionStatus(\n\t$FERN_INPUT\n)", @@ -5399,7 +5603,58 @@ "identifierOverride": "endpoint_admin.sendWorkspaceSubmissionUpdate" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.sendWorkspaceSubmissionUpdate(\n\t$FERN_INPUT\n)", @@ -5960,7 +6215,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCase" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCase(\n\t$FERN_INPUT\n)", @@ -14565,7 +14871,58 @@ "identifierOverride": "endpoint_admin.storeTracedTestCaseV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedTestCaseV2(\n\t$FERN_INPUT\n)", @@ -18475,7 +18832,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspace" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspace(\n\t$FERN_INPUT\n)", @@ -22506,7 +22914,58 @@ "identifierOverride": "endpoint_admin.storeTracedWorkspaceV2" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.admin.storeTracedWorkspaceV2(\n\t$FERN_INPUT\n)", @@ -26400,7 +26859,58 @@ "identifierOverride": "endpoint_homepage.getHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.getHomepageProblems()", @@ -26424,7 +26934,58 @@ "identifierOverride": "endpoint_homepage.setHomepageProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.homepage.setHomepageProblems(\n\t$FERN_INPUT\n)", @@ -26487,7 +27048,58 @@ "identifierOverride": "endpoint_migration.getAttemptedMigrations" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.migration.getAttemptedMigrations(\n\t$FERN_INPUT\n)", @@ -26540,7 +27152,58 @@ "identifierOverride": "endpoint_playlist.createPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.createPlaylist(\n\t$FERN_INPUT\n)", @@ -26692,7 +27355,58 @@ "identifierOverride": "endpoint_playlist.getPlaylists" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylists(\n\t$FERN_INPUT\n)", @@ -26837,7 +27551,58 @@ "identifierOverride": "endpoint_playlist.getPlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.getPlaylist(\n\t$FERN_INPUT\n)", @@ -26906,7 +27671,58 @@ "identifierOverride": "endpoint_playlist.updatePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.updatePlaylist(\n\t$FERN_INPUT\n)", @@ -27042,7 +27858,58 @@ "identifierOverride": "endpoint_playlist.deletePlaylist" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.playlist.deletePlaylist(\n\t$FERN_INPUT\n)", @@ -27111,7 +27978,58 @@ "identifierOverride": "endpoint_problem.createProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.createProblem(\n\t$FERN_INPUT\n)", @@ -37392,7 +38310,58 @@ "identifierOverride": "endpoint_problem.updateProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.updateProblem(\n\t$FERN_INPUT\n)", @@ -47701,7 +48670,58 @@ "identifierOverride": "endpoint_problem.deleteProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.deleteProblem(\n\t$FERN_INPUT\n)", @@ -47754,7 +48774,58 @@ "identifierOverride": "endpoint_problem.getDefaultStarterFiles" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.problem.getDefaultStarterFiles(\n\t$FERN_INPUT\n)", @@ -66672,7 +67743,58 @@ "identifierOverride": "endpoint_submission.createExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.createExecutionSession(\n\t$FERN_INPUT\n)", @@ -66728,7 +67850,58 @@ "identifierOverride": "endpoint_submission.getExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSession(\n\t$FERN_INPUT\n)", @@ -66781,7 +67954,58 @@ "identifierOverride": "endpoint_submission.stopExecutionSession" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.stopExecutionSession(\n\t$FERN_INPUT\n)", @@ -66834,7 +68058,58 @@ "identifierOverride": "endpoint_submission.getExecutionSessionsState" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.submission.getExecutionSessionsState()", @@ -66858,7 +68133,58 @@ "identifierOverride": "endpoint_sysprop.setNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.setNumWarmInstances(\n\t$FERN_INPUT\n)", @@ -66930,7 +68256,58 @@ "identifierOverride": "endpoint_sysprop.getNumWarmInstances" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.sysprop.getNumWarmInstances()", @@ -66954,7 +68331,58 @@ "identifierOverride": "endpoint_v2/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLightweightProblems()", @@ -66978,7 +68406,58 @@ "identifierOverride": "endpoint_v2/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblems()", @@ -67002,7 +68481,58 @@ "identifierOverride": "endpoint_v2/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67055,7 +68585,58 @@ "identifierOverride": "endpoint_v2/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.problem.getProblemVersion(\n\t$FERN_INPUT\n)", @@ -67124,7 +68705,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLightweightProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLightweightProblems()", @@ -67148,7 +68780,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblems" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblems()", @@ -67172,7 +68855,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getLatestProblem" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getLatestProblem(\n\t$FERN_INPUT\n)", @@ -67225,7 +68959,58 @@ "identifierOverride": "endpoint_v2/v3/problem.getProblemVersion" }, "snippetTemplate": { - "clientInstantiation": "const seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedTrace = new SeedTraceClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "token: $FERN_INPUT", + "isOptional": false, + "templateInputs": [ + { + "location": "AUTH", + "path": "token", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "xRandomHeader: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "HEADERS", + "path": "X-Random-Header", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedTrace.v2.v3.problem.getProblemVersion(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/trace/no-zurg-trace/snippet.json b/seed/ts-sdk/trace/no-zurg-trace/snippet.json index bbb18198962..1e9082b1404 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/snippet.json +++ b/seed/ts-sdk/trace/no-zurg-trace/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.test();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.test();\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateTestSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateTestSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" } }, { @@ -30,7 +30,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendTestSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendTestSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" } }, { @@ -41,7 +41,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.updateWorkspaceSubmissionStatus(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n type: \"stopped\"\n});\n" } }, { @@ -52,7 +52,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.sendWorkspaceSubmissionUpdate(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n updateTime: new Date(\"2024-01-15T09:30:00.000Z\"),\n updateInfo: {\n type: \"running\",\n value: SeedTrace.RunningSubmissionState.QueueingSubmission\n }\n});\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCase(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCase(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", {\n result: {\n result: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -74,7 +74,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedTestCaseV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedTestCaseV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", \"string\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspace(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n workspaceRunDetails: {\n exceptionV2: {\n type: \"generic\"\n },\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspace(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", {\n workspaceRunDetails: {\n exceptionV2: {\n type: \"generic\"\n },\n exception: {},\n stdout: \"string\"\n },\n traceResponses: [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]\n});\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.admin.storeTracedWorkspaceV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.admin.storeTracedWorkspaceV2(\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\", [{\n submissionId: \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n lineNumber: 1,\n file: {},\n returnValue: {\n type: \"integerValue\",\n value: 1\n },\n expressionLocation: {},\n stack: {},\n stdout: \"string\"\n }]);\n" } }, { @@ -107,7 +107,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.getHomepageProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.getHomepageProblems();\n" } }, { @@ -118,7 +118,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.homepage.setHomepageProblems([\"string\"]);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.homepage.setHomepageProblems([\"string\"]);\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.migration.getAttemptedMigrations({\n \"admin-key-header\": \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.migration.getAttemptedMigrations({\n \"admin-key-header\": \"string\"\n});\n" } }, { @@ -140,7 +140,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [\"string\"]\n }\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.createPlaylist(1, {\n datetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n optionalDatetime: new Date(\"2024-01-15T09:30:00.000Z\"),\n body: {\n name: \"string\",\n problems: [\"string\"]\n }\n});\n" } }, { @@ -151,7 +151,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylists(1, {\n limit: 1,\n otherField: \"string\",\n multiLineDocs: \"string\",\n optionalMultipleField: \"string\",\n multipleField: \"string\"\n});\n" } }, { @@ -162,7 +162,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.getPlaylist(1, \"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.getPlaylist(1, \"string\");\n" } }, { @@ -173,7 +173,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.updatePlaylist(1, \"string\", {\n name: \"string\",\n problems: [\"string\"]\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.updatePlaylist(1, \"string\", {\n name: \"string\",\n problems: [\"string\"]\n});\n" } }, { @@ -184,7 +184,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.playlist.deletePlaylist(1, \"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.playlist.deletePlaylist(1, \"string\");\n" } }, { @@ -195,7 +195,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.createProblem({\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" } }, { @@ -206,7 +206,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.updateProblem(\"string\", {\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.updateProblem(\"string\", {\n problemName: \"string\",\n problemDescription: {\n boards: [{\n type: \"html\",\n value: \"string\"\n }]\n },\n files: {\n [SeedTrace.Language.Java]: {\n solutionFile: {\n filename: \"string\",\n contents: \"string\"\n },\n readOnlyFiles: [{\n filename: \"string\",\n contents: \"string\"\n }]\n }\n },\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n testcases: [{\n testCase: {\n id: \"string\",\n params: [{\n type: \"integerValue\",\n value: 1\n }]\n },\n expectedResult: {\n type: \"integerValue\",\n value: 1\n }\n }],\n methodName: \"string\"\n});\n" } }, { @@ -217,7 +217,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.deleteProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.deleteProblem(\"string\");\n" } }, { @@ -228,7 +228,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n methodName: \"string\"\n});\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.problem.getDefaultStarterFiles({\n inputParams: [{\n variableType: {\n type: \"integerType\"\n },\n name: \"string\"\n }],\n outputType: {\n type: \"integerType\"\n },\n methodName: \"string\"\n});\n" } }, { @@ -239,7 +239,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.createExecutionSession(SeedTrace.Language.Java);\n" } }, { @@ -250,7 +250,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSession(\"string\");\n" } }, { @@ -261,7 +261,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.stopExecutionSession(\"string\");\n" } }, { @@ -272,7 +272,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.submission.getExecutionSessionsState();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.submission.getExecutionSessionsState();\n" } }, { @@ -283,7 +283,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" + "client": "import { SeedTraceClient, SeedTrace } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.setNumWarmInstances(SeedTrace.Language.Java, 1);\n" } }, { @@ -294,7 +294,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.sysprop.getNumWarmInstances();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.sysprop.getNumWarmInstances();\n" } }, { @@ -305,7 +305,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLightweightProblems();\n" } }, { @@ -316,7 +316,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblems();\n" } }, { @@ -327,7 +327,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getLatestProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getLatestProblem(\"string\");\n" } }, { @@ -338,7 +338,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.problem.getProblemVersion(\"string\", 1);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.problem.getProblemVersion(\"string\", 1);\n" } }, { @@ -349,7 +349,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLightweightProblems();\n" } }, { @@ -360,7 +360,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblems();\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblems();\n" } }, { @@ -371,7 +371,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getLatestProblem(\"string\");\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getLatestProblem(\"string\");\n" } }, { @@ -382,7 +382,7 @@ }, "snippet": { "type": "typescript", - "client": "import * as environments from \"../src/environments\";\nimport { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient({ token: \"YOUR_TOKEN\", xRandomHeader: \"YOUR_X_RANDOM_HEADER\" });\nawait seedTrace.v2.v3.problem.getProblemVersion(\"string\", 1);\n" + "client": "import { SeedTraceClient } from \"@fern/trace\";\n\nconst seedTrace = new SeedTraceClient();\nawait seedTrace.v2.v3.problem.getProblemVersion(\"string\", 1);\n" } } ], diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/.mock/definition/union.yml b/seed/ts-sdk/undiscriminated-unions/no-custom-config/.mock/definition/union.yml index 44368fd8b72..422556917c6 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/.mock/definition/union.yml +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/.mock/definition/union.yml @@ -7,18 +7,6 @@ service: method: POST request: MyUnion response: MyUnion - - getMetadata: - path: "/metadata" - method: GET - response: Metadata - examples: - - response: - body: - name: exampleName - value: exampleValue - default: exampleDefault - types: MyUnion: @@ -32,27 +20,3 @@ types: - list - list> - set - - Metadata: - docs: | - Undiscriminated unions can act as a map key - as long as all of their values are valid keys - (i.e. do they have a valid string representation). - type: map - examples: - - value: - name: exampleName - value: exampleValue - default: exampleDefault - - - Key: - discriminated: false - union: - - KeyType - - literal<"default"> - - KeyType: - enum: - - name - - value \ No newline at end of file diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/README.md b/seed/ts-sdk/undiscriminated-unions/no-custom-config/README.md index 6924c37868a..999984e66ac 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/README.md +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedUndiscriminatedUnionsClient } from "@fern/undiscriminated-unions"; -const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: "YOUR_BASE_URL" }); +const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient(); await seedUndiscriminatedUnions.union.get("string"); ``` diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/package.json b/seed/ts-sdk/undiscriminated-unions/no-custom-config/package.json index 25a932a7194..0fb19964297 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/package.json +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/package.json @@ -12,14 +12,12 @@ "test": "jest" }, "dependencies": { - "url-join": "4.0.1", "form-data": "4.0.0", "formdata-node": "^6.0.3", "node-fetch": "2.7.0", "qs": "6.11.2" }, "devDependencies": { - "@types/url-join": "4.0.1", "@types/qs": "6.9.8", "@types/node-fetch": "2.6.9", "jest": "29.7.0", diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet-templates.json b/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet-templates.json index e091a308bb5..7d5c4c91126 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet-templates.json @@ -11,34 +11,39 @@ "identifierOverride": "endpoint_union.get" }, "snippetTemplate": { - "clientInstantiation": "const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedUndiscriminatedUnions.union.get()", + "templateString": "const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", - "templateInputs": [], + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/undiscriminated-unions", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/metadata", - "method": "GET", - "identifierOverride": "endpoint_union.getMetadata" - }, - "snippetTemplate": { - "clientInstantiation": "const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\n", "functionInvocation": { "imports": [], - "templateString": "await seedUndiscriminatedUnions.union.getMetadata()", + "templateString": "await seedUndiscriminatedUnions.union.get()", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [], diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet.json b/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet.json index 67c126e9602..5604a51d751 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet.json +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/snippet.json @@ -8,18 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedUndiscriminatedUnionsClient } from \"@fern/undiscriminated-unions\";\n\nconst seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUndiscriminatedUnions.union.get(\"string\");\n" - } - }, - { - "id": { - "path": "/metadata", - "method": "GET", - "identifier_override": "endpoint_union.getMetadata" - }, - "snippet": { - "type": "typescript", - "client": "import { SeedUndiscriminatedUnionsClient } from \"@fern/undiscriminated-unions\";\n\nconst seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUndiscriminatedUnions.union.getMetadata();\n" + "client": "import { SeedUndiscriminatedUnionsClient } from \"@fern/undiscriminated-unions\";\n\nconst seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient();\nawait seedUndiscriminatedUnions.union.get(\"string\");\n" } } ], diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/client/Client.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/client/Client.ts index 6aea4f1d697..06637f78fdb 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/client/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/client/Client.ts @@ -6,7 +6,6 @@ import * as core from "../../../../core"; import * as SeedUndiscriminatedUnions from "../../../index"; import * as serializers from "../../../../serialization/index"; import * as errors from "../../../../errors/index"; -import urlJoin from "url-join"; export declare namespace Union { interface Options { @@ -80,57 +79,4 @@ export class Union { }); } } - - /** - * @param {Union.RequestOptions} requestOptions - Request-specific configuration. - * - * @example - * await seedUndiscriminatedUnions.union.getMetadata() - */ - public async getMetadata(requestOptions?: Union.RequestOptions): Promise { - const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "/metadata"), - method: "GET", - headers: { - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "@fern/undiscriminated-unions", - "X-Fern-SDK-Version": "0.0.1", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return await serializers.Metadata.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.SeedUndiscriminatedUnionsError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.SeedUndiscriminatedUnionsError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.SeedUndiscriminatedUnionsTimeoutError(); - case "unknown": - throw new errors.SeedUndiscriminatedUnionsError({ - message: _response.error.errorMessage, - }); - } - } } diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/Key.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/Key.ts deleted file mode 100644 index 352bea9e9a2..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/Key.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedUndiscriminatedUnions from "../../../index"; - -export type Key = SeedUndiscriminatedUnions.KeyType | "default"; diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts deleted file mode 100644 index 90f84c1ff15..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type KeyType = "name" | "value"; - -export const KeyType = { - Name: "name", - Value: "value", -} as const; diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/Metadata.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/Metadata.ts deleted file mode 100644 index b22a34a5a0d..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/Metadata.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedUndiscriminatedUnions from "../../../index"; - -/** - * Undiscriminated unions can act as a map key - * as long as all of their values are valid keys - * (i.e. do they have a valid string representation). - * - * @example - * { - * [SeedUndiscriminatedUnions.KeyType.Name]: "exampleName", - * [SeedUndiscriminatedUnions.KeyType.Value]: "exampleValue", - * "default": "exampleDefault" - * } - */ -export type Metadata = Record; diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/index.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/index.ts index d71bf6cd2ad..06b1bb70fb9 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/index.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/index.ts @@ -1,4 +1 @@ export * from "./MyUnion"; -export * from "./Metadata"; -export * from "./Key"; -export * from "./KeyType"; diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/Key.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/Key.ts deleted file mode 100644 index edcaa756cf2..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/Key.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as SeedUndiscriminatedUnions from "../../../../api/index"; -import * as core from "../../../../core"; -import { KeyType } from "./KeyType"; - -export const Key: core.serialization.Schema = - core.serialization.undiscriminatedUnion([KeyType, core.serialization.stringLiteral("default")]); - -export declare namespace Key { - type Raw = KeyType.Raw | "default"; -} diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/KeyType.ts deleted file mode 100644 index c1e24cdafaa..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/KeyType.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as SeedUndiscriminatedUnions from "../../../../api/index"; -import * as core from "../../../../core"; - -export const KeyType: core.serialization.Schema = - core.serialization.enum_(["name", "value"]); - -export declare namespace KeyType { - type Raw = "name" | "value"; -} diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/Metadata.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/Metadata.ts deleted file mode 100644 index 7281791a226..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/Metadata.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as SeedUndiscriminatedUnions from "../../../../api/index"; -import * as core from "../../../../core"; -import { Key } from "./Key"; - -export const Metadata: core.serialization.Schema = - core.serialization.record(Key, core.serialization.string()); - -export declare namespace Metadata { - type Raw = Record; -} diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/index.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/index.ts index d71bf6cd2ad..06b1bb70fb9 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/index.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/serialization/resources/union/types/index.ts @@ -1,4 +1 @@ export * from "./MyUnion"; -export * from "./Metadata"; -export * from "./Key"; -export * from "./KeyType"; diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/.mock/definition/union.yml b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/.mock/definition/union.yml index 44368fd8b72..422556917c6 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/.mock/definition/union.yml +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/.mock/definition/union.yml @@ -7,18 +7,6 @@ service: method: POST request: MyUnion response: MyUnion - - getMetadata: - path: "/metadata" - method: GET - response: Metadata - examples: - - response: - body: - name: exampleName - value: exampleValue - default: exampleDefault - types: MyUnion: @@ -32,27 +20,3 @@ types: - list - list> - set - - Metadata: - docs: | - Undiscriminated unions can act as a map key - as long as all of their values are valid keys - (i.e. do they have a valid string representation). - type: map - examples: - - value: - name: exampleName - value: exampleValue - default: exampleDefault - - - Key: - discriminated: false - union: - - KeyType - - literal<"default"> - - KeyType: - enum: - - name - - value \ No newline at end of file diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/README.md b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/README.md index 6924c37868a..999984e66ac 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/README.md +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedUndiscriminatedUnionsClient } from "@fern/undiscriminated-unions"; -const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: "YOUR_BASE_URL" }); +const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient(); await seedUndiscriminatedUnions.union.get("string"); ``` diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/package.json b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/package.json index 25a932a7194..0fb19964297 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/package.json +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/package.json @@ -12,14 +12,12 @@ "test": "jest" }, "dependencies": { - "url-join": "4.0.1", "form-data": "4.0.0", "formdata-node": "^6.0.3", "node-fetch": "2.7.0", "qs": "6.11.2" }, "devDependencies": { - "@types/url-join": "4.0.1", "@types/qs": "6.9.8", "@types/node-fetch": "2.6.9", "jest": "29.7.0", diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet-templates.json b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet-templates.json index e091a308bb5..7d5c4c91126 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet-templates.json +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet-templates.json @@ -11,34 +11,39 @@ "identifierOverride": "endpoint_union.get" }, "snippetTemplate": { - "clientInstantiation": "const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\n", - "functionInvocation": { + "clientInstantiation": { "imports": [], - "templateString": "await seedUndiscriminatedUnions.union.get()", + "templateString": "const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient($FERN_INPUT);", "isOptional": false, - "inputDelimiter": ",\n\t", - "templateInputs": [], + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], "type": "generic" }, - "type": "v1" - } - }, - { - "sdk": { - "package": "@fern/undiscriminated-unions", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/metadata", - "method": "GET", - "identifierOverride": "endpoint_union.getMetadata" - }, - "snippetTemplate": { - "clientInstantiation": "const seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\n", "functionInvocation": { "imports": [], - "templateString": "await seedUndiscriminatedUnions.union.getMetadata()", + "templateString": "await seedUndiscriminatedUnions.union.get()", "isOptional": false, "inputDelimiter": ",\n\t", "templateInputs": [], diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet.json b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet.json index 67c126e9602..5604a51d751 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet.json +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/snippet.json @@ -8,18 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedUndiscriminatedUnionsClient } from \"@fern/undiscriminated-unions\";\n\nconst seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUndiscriminatedUnions.union.get(\"string\");\n" - } - }, - { - "id": { - "path": "/metadata", - "method": "GET", - "identifier_override": "endpoint_union.getMetadata" - }, - "snippet": { - "type": "typescript", - "client": "import { SeedUndiscriminatedUnionsClient } from \"@fern/undiscriminated-unions\";\n\nconst seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUndiscriminatedUnions.union.getMetadata();\n" + "client": "import { SeedUndiscriminatedUnionsClient } from \"@fern/undiscriminated-unions\";\n\nconst seedUndiscriminatedUnions = new SeedUndiscriminatedUnionsClient();\nawait seedUndiscriminatedUnions.union.get(\"string\");\n" } } ], diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/client/Client.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/client/Client.ts index 1d628b8eb0d..30ae3dca66d 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/client/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/client/Client.ts @@ -6,7 +6,6 @@ import * as core from "../../../../core"; import * as SeedUndiscriminatedUnions from "../../../index"; import * as serializers from "../../../../serialization/index"; import * as errors from "../../../../errors/index"; -import urlJoin from "url-join"; export declare namespace Union { interface Options { @@ -81,58 +80,4 @@ export class Union { }); } } - - /** - * @param {Union.RequestOptions} requestOptions - Request-specific configuration. - * - * @example - * await seedUndiscriminatedUnions.union.getMetadata() - */ - public async getMetadata(requestOptions?: Union.RequestOptions): Promise { - const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "/metadata"), - method: "GET", - headers: { - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "@fern/undiscriminated-unions", - "X-Fern-SDK-Version": "0.0.1", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return await serializers.Metadata.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.SeedUndiscriminatedUnionsError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.SeedUndiscriminatedUnionsError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.SeedUndiscriminatedUnionsTimeoutError(); - case "unknown": - throw new errors.SeedUndiscriminatedUnionsError({ - message: _response.error.errorMessage, - }); - } - } } diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/Key.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/Key.ts deleted file mode 100644 index 352bea9e9a2..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/Key.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedUndiscriminatedUnions from "../../../index"; - -export type Key = SeedUndiscriminatedUnions.KeyType | "default"; diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts deleted file mode 100644 index 90f84c1ff15..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type KeyType = "name" | "value"; - -export const KeyType = { - Name: "name", - Value: "value", -} as const; diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/Metadata.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/Metadata.ts deleted file mode 100644 index b22a34a5a0d..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/Metadata.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedUndiscriminatedUnions from "../../../index"; - -/** - * Undiscriminated unions can act as a map key - * as long as all of their values are valid keys - * (i.e. do they have a valid string representation). - * - * @example - * { - * [SeedUndiscriminatedUnions.KeyType.Name]: "exampleName", - * [SeedUndiscriminatedUnions.KeyType.Value]: "exampleValue", - * "default": "exampleDefault" - * } - */ -export type Metadata = Record; diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/index.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/index.ts index d71bf6cd2ad..06b1bb70fb9 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/index.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/index.ts @@ -1,4 +1 @@ export * from "./MyUnion"; -export * from "./Metadata"; -export * from "./Key"; -export * from "./KeyType"; diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/Key.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/Key.ts deleted file mode 100644 index edcaa756cf2..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/Key.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as SeedUndiscriminatedUnions from "../../../../api/index"; -import * as core from "../../../../core"; -import { KeyType } from "./KeyType"; - -export const Key: core.serialization.Schema = - core.serialization.undiscriminatedUnion([KeyType, core.serialization.stringLiteral("default")]); - -export declare namespace Key { - type Raw = KeyType.Raw | "default"; -} diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/KeyType.ts deleted file mode 100644 index c1e24cdafaa..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/KeyType.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as SeedUndiscriminatedUnions from "../../../../api/index"; -import * as core from "../../../../core"; - -export const KeyType: core.serialization.Schema = - core.serialization.enum_(["name", "value"]); - -export declare namespace KeyType { - type Raw = "name" | "value"; -} diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/Metadata.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/Metadata.ts deleted file mode 100644 index 7281791a226..00000000000 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/Metadata.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as SeedUndiscriminatedUnions from "../../../../api/index"; -import * as core from "../../../../core"; -import { Key } from "./Key"; - -export const Metadata: core.serialization.Schema = - core.serialization.record(Key, core.serialization.string()); - -export declare namespace Metadata { - type Raw = Record; -} diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/index.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/index.ts index d71bf6cd2ad..06b1bb70fb9 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/index.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/serialization/resources/union/types/index.ts @@ -1,4 +1 @@ export * from "./MyUnion"; -export * from "./Metadata"; -export * from "./Key"; -export * from "./KeyType"; diff --git a/seed/ts-sdk/unions/README.md b/seed/ts-sdk/unions/README.md index a907d112ada..99377dc4e67 100644 --- a/seed/ts-sdk/unions/README.md +++ b/seed/ts-sdk/unions/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedUnionsClient } from "@fern/unions"; -const seedUnions = new SeedUnionsClient({ environment: "YOUR_BASE_URL" }); +const seedUnions = new SeedUnionsClient(); await seedUnions.union.get("string"); ``` diff --git a/seed/ts-sdk/unions/snippet-templates.json b/seed/ts-sdk/unions/snippet-templates.json index f44b6ec6890..e9fa9269855 100644 --- a/seed/ts-sdk/unions/snippet-templates.json +++ b/seed/ts-sdk/unions/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_union.get" }, "snippetTemplate": { - "clientInstantiation": "const seedUnions = new SeedUnionsClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedUnions = new SeedUnionsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedUnions.union.get(\n\t$FERN_INPUT\n)", @@ -64,7 +93,36 @@ "identifierOverride": "endpoint_union.update" }, "snippetTemplate": { - "clientInstantiation": "const seedUnions = new SeedUnionsClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedUnions = new SeedUnionsClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedUnions.union.update(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/unions/snippet.json b/seed/ts-sdk/unions/snippet.json index 62a234b6dbc..4e5a4795953 100644 --- a/seed/ts-sdk/unions/snippet.json +++ b/seed/ts-sdk/unions/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedUnionsClient } from \"@fern/unions\";\n\nconst seedUnions = new SeedUnionsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUnions.union.get(\"string\");\n" + "client": "import { SeedUnionsClient } from \"@fern/unions\";\n\nconst seedUnions = new SeedUnionsClient();\nawait seedUnions.union.get(\"string\");\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedUnionsClient } from \"@fern/unions\";\n\nconst seedUnions = new SeedUnionsClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUnions.union.update({\n type: \"circle\",\n id: \"string\",\n radius: 1.1\n});\n" + "client": "import { SeedUnionsClient } from \"@fern/unions\";\n\nconst seedUnions = new SeedUnionsClient();\nawait seedUnions.union.update({\n type: \"circle\",\n id: \"string\",\n radius: 1.1\n});\n" } } ], diff --git a/seed/ts-sdk/unknown/no-custom-config/README.md b/seed/ts-sdk/unknown/no-custom-config/README.md index 7df28aae7d1..73a7d592c10 100644 --- a/seed/ts-sdk/unknown/no-custom-config/README.md +++ b/seed/ts-sdk/unknown/no-custom-config/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedUnknownAsAnyClient } from "@fern/unknown"; -const seedUnknownAsAny = new SeedUnknownAsAnyClient({ environment: "YOUR_BASE_URL" }); +const seedUnknownAsAny = new SeedUnknownAsAnyClient(); await seedUnknownAsAny.unknown.post({ key: "value", }); diff --git a/seed/ts-sdk/unknown/no-custom-config/snippet-templates.json b/seed/ts-sdk/unknown/no-custom-config/snippet-templates.json index 3e6e87d8abd..df213fa90d1 100644 --- a/seed/ts-sdk/unknown/no-custom-config/snippet-templates.json +++ b/seed/ts-sdk/unknown/no-custom-config/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_unknown.post" }, "snippetTemplate": { - "clientInstantiation": "const seedUnknownAsAny = new SeedUnknownAsAnyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedUnknownAsAny = new SeedUnknownAsAnyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedUnknownAsAny.unknown.post(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/unknown/no-custom-config/snippet.json b/seed/ts-sdk/unknown/no-custom-config/snippet.json index de65866859e..108d5219017 100644 --- a/seed/ts-sdk/unknown/no-custom-config/snippet.json +++ b/seed/ts-sdk/unknown/no-custom-config/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedUnknownAsAnyClient } from \"@fern/unknown\";\n\nconst seedUnknownAsAny = new SeedUnknownAsAnyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUnknownAsAny.unknown.post({\n \"key\": \"value\"\n});\n" + "client": "import { SeedUnknownAsAnyClient } from \"@fern/unknown\";\n\nconst seedUnknownAsAny = new SeedUnknownAsAnyClient();\nawait seedUnknownAsAny.unknown.post({\n \"key\": \"value\"\n});\n" } } ], diff --git a/seed/ts-sdk/unknown/unknown-as-any/README.md b/seed/ts-sdk/unknown/unknown-as-any/README.md index 7df28aae7d1..73a7d592c10 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/README.md +++ b/seed/ts-sdk/unknown/unknown-as-any/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedUnknownAsAnyClient } from "@fern/unknown"; -const seedUnknownAsAny = new SeedUnknownAsAnyClient({ environment: "YOUR_BASE_URL" }); +const seedUnknownAsAny = new SeedUnknownAsAnyClient(); await seedUnknownAsAny.unknown.post({ key: "value", }); diff --git a/seed/ts-sdk/unknown/unknown-as-any/snippet-templates.json b/seed/ts-sdk/unknown/unknown-as-any/snippet-templates.json index 3e6e87d8abd..df213fa90d1 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/snippet-templates.json +++ b/seed/ts-sdk/unknown/unknown-as-any/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_unknown.post" }, "snippetTemplate": { - "clientInstantiation": "const seedUnknownAsAny = new SeedUnknownAsAnyClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedUnknownAsAny = new SeedUnknownAsAnyClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedUnknownAsAny.unknown.post(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/unknown/unknown-as-any/snippet.json b/seed/ts-sdk/unknown/unknown-as-any/snippet.json index de65866859e..108d5219017 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/snippet.json +++ b/seed/ts-sdk/unknown/unknown-as-any/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedUnknownAsAnyClient } from \"@fern/unknown\";\n\nconst seedUnknownAsAny = new SeedUnknownAsAnyClient({ environment: \"YOUR_BASE_URL\" });\nawait seedUnknownAsAny.unknown.post({\n \"key\": \"value\"\n});\n" + "client": "import { SeedUnknownAsAnyClient } from \"@fern/unknown\";\n\nconst seedUnknownAsAny = new SeedUnknownAsAnyClient();\nawait seedUnknownAsAny.unknown.post({\n \"key\": \"value\"\n});\n" } } ], diff --git a/seed/ts-sdk/validation/README.md b/seed/ts-sdk/validation/README.md index 6e6d7f4deff..45c48c88444 100644 --- a/seed/ts-sdk/validation/README.md +++ b/seed/ts-sdk/validation/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedValidationClient } from "@fern/validation"; -const seedValidation = new SeedValidationClient({ environment: "YOUR_BASE_URL" }); +const seedValidation = new SeedValidationClient(); await seedValidation.create({ decimal: 1.1, even: 1, diff --git a/seed/ts-sdk/validation/snippet-templates.json b/seed/ts-sdk/validation/snippet-templates.json index 3a08ad07dda..8c3ff3a1aef 100644 --- a/seed/ts-sdk/validation/snippet-templates.json +++ b/seed/ts-sdk/validation/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_.create" }, "snippetTemplate": { - "clientInstantiation": "const seedValidation = new SeedValidationClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedValidation = new SeedValidationClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedValidation.create(\n\t$FERN_INPUT\n)", @@ -96,7 +125,36 @@ "identifierOverride": "endpoint_.get" }, "snippetTemplate": { - "clientInstantiation": "const seedValidation = new SeedValidationClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedValidation = new SeedValidationClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedValidation.get(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/validation/snippet.json b/seed/ts-sdk/validation/snippet.json index 0b4ab3252e0..695ec822cab 100644 --- a/seed/ts-sdk/validation/snippet.json +++ b/seed/ts-sdk/validation/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedValidationClient } from \"@fern/validation\";\n\nconst seedValidation = new SeedValidationClient({ environment: \"YOUR_BASE_URL\" });\nawait seedValidation.create({\n decimal: 1.1,\n even: 1,\n name: \"string\"\n});\n" + "client": "import { SeedValidationClient } from \"@fern/validation\";\n\nconst seedValidation = new SeedValidationClient();\nawait seedValidation.create({\n decimal: 1.1,\n even: 1,\n name: \"string\"\n});\n" } }, { @@ -19,7 +19,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedValidationClient } from \"@fern/validation\";\n\nconst seedValidation = new SeedValidationClient({ environment: \"YOUR_BASE_URL\" });\nawait seedValidation.get({\n decimal: 1.1,\n even: 1,\n name: \"string\"\n});\n" + "client": "import { SeedValidationClient } from \"@fern/validation\";\n\nconst seedValidation = new SeedValidationClient();\nawait seedValidation.get({\n decimal: 1.1,\n even: 1,\n name: \"string\"\n});\n" } } ], diff --git a/seed/ts-sdk/variables/README.md b/seed/ts-sdk/variables/README.md index 32566590a3d..594d7d19287 100644 --- a/seed/ts-sdk/variables/README.md +++ b/seed/ts-sdk/variables/README.md @@ -18,7 +18,7 @@ Instantiate and use the client with the following: ```typescript import { SeedVariablesClient } from "@fern/variables"; -const seedVariables = new SeedVariablesClient({ environment: "YOUR_BASE_URL" }); +const seedVariables = new SeedVariablesClient(); await seedVariables.service.post(); ``` diff --git a/seed/ts-sdk/variables/snippet-templates.json b/seed/ts-sdk/variables/snippet-templates.json index f84b084bb6c..13dafe8db03 100644 --- a/seed/ts-sdk/variables/snippet-templates.json +++ b/seed/ts-sdk/variables/snippet-templates.json @@ -11,7 +11,36 @@ "identifierOverride": "endpoint_service.post" }, "snippetTemplate": { - "clientInstantiation": "const seedVariables = new SeedVariablesClient({ environment: \"YOUR_BASE_URL\" });\n", + "clientInstantiation": { + "imports": [], + "templateString": "const seedVariables = new SeedVariablesClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, "functionInvocation": { "imports": [], "templateString": "await seedVariables.service.post(\n\t$FERN_INPUT\n)", diff --git a/seed/ts-sdk/variables/snippet.json b/seed/ts-sdk/variables/snippet.json index b14fb7ab221..1cfddc6c5ef 100644 --- a/seed/ts-sdk/variables/snippet.json +++ b/seed/ts-sdk/variables/snippet.json @@ -8,7 +8,7 @@ }, "snippet": { "type": "typescript", - "client": "import { SeedVariablesClient } from \"@fern/variables\";\n\nconst seedVariables = new SeedVariablesClient({ environment: \"YOUR_BASE_URL\" });\nawait seedVariables.service.post();\n" + "client": "import { SeedVariablesClient } from \"@fern/variables\";\n\nconst seedVariables = new SeedVariablesClient();\nawait seedVariables.service.post();\n" } } ], diff --git a/yarn.lock b/yarn.lock index 92a9729307c..c20371159c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5140,16 +5140,16 @@ __metadata: languageName: node linkType: hard -"@fern-fern/snippet-sdk@npm:^0.0.5434": - version: 0.0.5434 - resolution: "@fern-fern/snippet-sdk@npm:0.0.5434" +"@fern-fern/snippet-sdk@npm:^0.0.5492": + version: 0.0.5492 + resolution: "@fern-fern/snippet-sdk@npm:0.0.5492" dependencies: form-data: 4.0.0 js-base64: 3.7.2 node-fetch: 2.7.0 qs: 6.11.2 url-join: 4.0.1 - checksum: dbc9addde93c22fc959e23461e2f544bc90c5384589df23dbe7010b6b521400bb58194bd4a6ecae949a7c4c5ed6b92383ac5345cb4b41e0f88a052a293ff67cb + checksum: dccf0d1e185e1d1d08ddca901cd6343ae7145f6d24a1893075ecdc3ec58269ab96f0e72f149eaf66a767cd128664acd1ae2c3095f86fd46d418565ff220d4420 languageName: node linkType: hard @@ -5785,7 +5785,7 @@ __metadata: "@fern-fern/generator-cli-sdk": ^0.0.25 "@fern-fern/generator-exec-sdk": ^0.0.879 "@fern-fern/ir-sdk": ^0.0.3515 - "@fern-fern/snippet-sdk": ^0.0.5434 + "@fern-fern/snippet-sdk": ^0.0.5492 "@fern-typescript/commons": "workspace:*" "@fern-typescript/contexts": "workspace:*" "@fern-typescript/endpoint-error-union-generator": "workspace:*"