diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml deleted file mode 100644 index 58627ca..0000000 --- a/.mock/definition/api.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: fern -auth: bearer -environments: - Production: https://api.buildwithfern.com -default-environment: Production -error-discrimination: - strategy: property - property-name: error -audiences: - - external \ No newline at end of file diff --git a/.mock/definition/commons.yml b/.mock/definition/commons.yml deleted file mode 100644 index cb5eea0..0000000 --- a/.mock/definition/commons.yml +++ /dev/null @@ -1,16 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json - -types: - ApiDefinitionId: uuid - - OrgId: - type: string - docs: Human readable org id (e.g. fern) - - ApiId: - type: string - docs: Human readable api identifier (e.g. venus) - - DocsConfigId: - type: string - docs: The ID of a particular docs config. diff --git a/.mock/definition/snippets.yml b/.mock/definition/snippets.yml deleted file mode 100644 index 730c571..0000000 --- a/.mock/definition/snippets.yml +++ /dev/null @@ -1,290 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json - -imports: - commons: commons.yml - -service: - auth: true - base-path: /snippets - endpoints: - get: - path: "" - docs: Get snippet by endpoint method and path - display-name: Get snippet for endpoint - availability: pre-release - audiences: - - external - - fiddle - method: POST - request: - name: GetSnippetRequest - body: - properties: - orgId: - type: optional - docs: | - If the same API is defined across multiple organization, - you must specify an organization ID. - apiId: - type: optional - docs: | - If you have more than one API, you must specify its ID. - sdks: - type: optional> - docs: | - The SDKs for which to load snippets. If unspecified, - snippets for the latest published SDKs will be returned. - loadLevel: - type: optional - docs: | - The level of detail to load for the snippet. If unspecified, - the full snippet will be returned. - endpoint: EndpointIdentifier - response: list - examples: - - request: - endpoint: - method: GET - path: /v1/search - response: - body: - - type: python - sdk: - package: vellum-ai - version: 1.2.1 - sync_client: | - import Vellum from vellum.client - - client = Vellum(api_key="YOUR_API_KEY") - client.search(query="Find documents written in the last 5 days") - async_client: | - import VellumAsync from vellum.client - - client = VellumAsync(api_key="YOUR_API_KEY") - await client.search(query="Find documents written in the last 5 days") - - type: typescript - sdk: - package: vellum-ai - version: 1.2.1 - client: | - import { VellumClient } from "vellum-ai"; - - const vellum = VellumClient({ - apiKey="YOUR_API_KEY" - }) - vellum.search({ - query: "Find documents written in the last 5 days" - }) - - load: - path: /load - display-name: Load all snippets - method: POST - availability: pre-release - audiences: - - external - - fiddle - request: - name: ListSnippetsRequest - query-parameters: - page: optional - body: - properties: - orgId: - type: optional - docs: | - If the same API is defined across multiple organization, - you must specify an organization ID. - apiId: - type: optional - docs: | - If you have more than one API, you must specify its ID. - sdks: - type: optional> - docs: | - The SDKs for which to load snippets. If unspecified, - snippets for the latest published SDKs will be returned. - loadLevel: - type: optional - docs: | - The level of detail to load for the snippet. If unspecified, - the full snippet will be returned. - response: SnippetsPage - examples: - - query-parameters: - page: 1 - request: - orgId: vellum - apiId: vellum-ai - sdks: - - type: python - package: vellum-ai - version: 1.2.1 - response: - body: - next: 2 - snippets: - /v1/search: - GET: - - type: python - sdk: - package: vellum-ai - version: 1.2.1 - sync_client: | - import Vellum from vellum.client - - client = Vellum(api_key="YOUR_API_KEY") - client.search(query="Find documents written in the last 5 days") - async_client: | - import Vellum from vellum.client - - client = Vellum(api_key="YOUR_API_KEY") - client.search(query="Find documents written in the last 5 days") - - type: typescript - sdk: - package: vellum-ai - version: 1.2.1 - client: | - import { VellumClient } from "vellum-ai"; - - const vellum = VellumClient({ - apiKey="YOUR_API_KEY" - }) - vellum.search({ - query: "Find documents written in the last 5 days" - }) - v1/document-indexes: - POST: - - type: python - sdk: - package: vellum-ai - version: 1.2.1 - sync_client: | - import Vellum from vellum.client - - client = Vellum(api_key="YOUR_API_KEY") - client.document_indexes.create(name="meeting-reports", status="ACTIVE") - async_client: | - import VellumAsync from vellum.client - - client = VellumAsync(api_key="YOUR_API_KEY") - await client.document_indexes.create(name="meeting-reports", status="ACTIVE") - - type: typescript - sdk: - package: vellum-ai - version: 1.2.1 - client: | - import { VellumClient } from "vellum-ai"; - - const vellum = VellumClient({ - apiKey="YOUR_API_KEY" - }) - vellum.documentIndexes.create({ - name: "meeting-reports", - status: "ACTIVE" - }) - -types: - SnippetLoadLevel: - enum: - - value: full - docs: | - The full snippet including client instantiation and method call. - - value: endpoint - docs: | - Only returns the part of the snippet for the endpoint call. In - other words, the client instantiation is not included. - - EndpointIdentifier: - properties: - path: EndpointPath - method: EndpointMethod - - EndpointPath: - type: string - docs: The relative path for an endpont (e.g. `/users/{userId}`) - - EndpointMethod: - enum: - - PUT - - POST - - GET - - PATCH - - DELETE - - SDK: - union: - typescript: TypeScriptSDK - python: PythonSDK - go: GoSDK - java: JavaSDK - - TypeScriptSDK: - properties: - package: string - version: string - - PythonSDK: - properties: - package: string - version: string - - GoSDK: - properties: - githubRepo: string - version: string - - JavaSDK: - properties: - group: - type: string - docs: The maven repository group (e.g. `com.stripe.java`) - artifact: - type: string - docs: The artifact (e.g. `stripe-java`) - version: string - - ####### Load Snippets ####### - - SnippetsPage: - properties: - next: - type: optional - docs: If present, pass this into the `page` query parameter to load the next page. - snippets: - type: map - docs: | - The snippets are returned as a map of endpoint path (e.g. `/api/users`) - to a map of endpoint method (e.g. `POST`) to snippets. - - SnippetsByEndpointMethod: - type: map> - - Snippet: - union: - typescript: TypeScriptSnippet - python: PythonSnippet - java: JavaSnippet - go: GoSnippet - - TypeScriptSnippet: - properties: - sdk: TypeScriptSDK - client: string - - PythonSnippet: - properties: - sdk: PythonSDK - async_client: string - sync_client: string - - GoSnippet: - properties: - sdk: GoSDK - client: string - - JavaSnippet: - properties: - sdk: JavaSDK - async_client: string - sync_client: string \ No newline at end of file diff --git a/.mock/fern.config.json b/.mock/fern.config.json deleted file mode 100644 index d31dbbb..0000000 --- a/.mock/fern.config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "organization" : "fern", - "version" : "0.0.86" -} \ No newline at end of file diff --git a/.mock/generators.yml b/.mock/generators.yml deleted file mode 100644 index 3066355..0000000 --- a/.mock/generators.yml +++ /dev/null @@ -1,31 +0,0 @@ -groups: - node-sdk: - audiences: - - external - generators: - - name: fernapi/fern-typescript-node-sdk - version: 0.9.2 - output: - location: npm - package-name: '@fern-api/node-sdk' - token: ${NPM_TOKEN} - github: - repository: fern-api/node-sdk - license: MIT - config: - namespaceExport: Fern - python-sdk: - audiences: - - external - generators: - - name: fernapi/fern-python-sdk - version: 0.12.1 - output: - location: pypi - package-name: fern-api - # token: ${PYPI_TOKEN} - github: - repository: fern-api/python-sdk - license: MIT - config: - client_class_name: Fern diff --git a/pyproject.toml b/pyproject.toml index aa37da4..c89b003 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fern-api" -version = "0.0.86" +version = "0.0.87" description = "" readme = "README.md" authors = [] diff --git a/src/fern/core/client_wrapper.py b/src/fern/core/client_wrapper.py index 2230e1e..349e5cb 100644 --- a/src/fern/core/client_wrapper.py +++ b/src/fern/core/client_wrapper.py @@ -16,7 +16,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "fern-api", - "X-Fern-SDK-Version": "0.0.86", + "X-Fern-SDK-Version": "0.0.87", } headers["Authorization"] = f"Bearer {self._get_token()}" return headers