diff --git a/.bumpversion.toml b/.bumpversion.toml
index 05364b111..21b676b32 100644
--- a/.bumpversion.toml
+++ b/.bumpversion.toml
@@ -93,4 +93,30 @@ replace = 'lance-namespace-urllib3-client=={new_version}'
[[tool.bumpversion.files]]
filename = "java/lance-namespace-core/pom.xml"
search = "{current_version}"
-replace = "{new_version}"
\ No newline at end of file
+replace = "{new_version}"
+
+# TypeScript workspace and package versions
+[[tool.bumpversion.files]]
+filename = "typescript/Makefile"
+search = "VERSION = {current_version}"
+replace = "VERSION = {new_version}"
+
+[[tool.bumpversion.files]]
+filename = "typescript/package.json"
+search = '"version": "{current_version}"'
+replace = '"version": "{new_version}"'
+
+[[tool.bumpversion.files]]
+filename = "typescript/lance-namespace/package.json"
+search = '"version": "{current_version}"'
+replace = '"version": "{new_version}"'
+
+[[tool.bumpversion.files]]
+filename = "typescript/lance-namespace-fetch-client/package.json"
+search = '"version": "{current_version}"'
+replace = '"version": "{new_version}"'
+
+[[tool.bumpversion.files]]
+filename = "typescript/lance-namespace-rest/package.json"
+search = '"version": "{current_version}"'
+replace = '"version": "{new_version}"'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1841478cf..0bc913c03 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -53,9 +53,17 @@ jobs:
java-version: 17
cache: "maven"
+ - name: Set up Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+
- name: Install uv
uses: astral-sh/setup-uv@v4
+ - name: Enable corepack
+ run: corepack enable
+
- name: Install dependencies
run: uv sync --all-packages
@@ -217,9 +225,9 @@ jobs:
echo "3. Publish the release to:" >> $GITHUB_STEP_SUMMARY
if [ "${{ inputs.release_channel }}" == "stable" ]; then
echo " - Create the official release" >> $GITHUB_STEP_SUMMARY
- echo " - Trigger automatic publishing to Maven Central, PyPI, and crates.io" >> $GITHUB_STEP_SUMMARY
+ echo " - Trigger automatic publishing to Maven Central, PyPI, crates.io, and npm" >> $GITHUB_STEP_SUMMARY
else
echo " - Create a preview/beta release" >> $GITHUB_STEP_SUMMARY
- echo " - Trigger automatic publishing to Maven Central, PyPI, and crates.io (as pre-release version)" >> $GITHUB_STEP_SUMMARY
+ echo " - Trigger automatic publishing to Maven Central, PyPI, crates.io, and npm (as pre-release version)" >> $GITHUB_STEP_SUMMARY
fi
fi
diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml
index 98d294d59..f35da1340 100644
--- a/.github/workflows/spec.yml
+++ b/.github/workflows/spec.yml
@@ -44,8 +44,14 @@ jobs:
distribution: temurin
java-version: 17
cache: "maven"
+ - name: Set up Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
- name: Install uv
uses: astral-sh/setup-uv@v4
+ - name: Enable corepack
+ run: corepack enable
- name: Install dependencies
run: uv sync --all-packages
- name: Codegen
diff --git a/.github/workflows/typescript-publish.yml b/.github/workflows/typescript-publish.yml
new file mode 100644
index 000000000..a0e1c35ec
--- /dev/null
+++ b/.github/workflows/typescript-publish.yml
@@ -0,0 +1,81 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: TypeScript Publish
+
+on:
+ release:
+ types:
+ - released
+ pull_request:
+ paths:
+ - .github/workflows/typescript-publish.yml
+ workflow_dispatch:
+ inputs:
+ mode:
+ description: "Release mode"
+ required: true
+ type: choice
+ default: dry_run
+ options:
+ - dry_run
+ - release
+ ref:
+ description: "The branch, tag or SHA to checkout"
+ required: false
+ type: string
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.release.tag_name || inputs.ref || '' }}
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
+
+ - name: Set up pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: 10
+ run_install: false
+
+ - name: Set up Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ registry-url: https://registry.npmjs.org/
+ cache: pnpm
+ cache-dependency-path: typescript/pnpm-lock.yaml
+
+ - name: Build TypeScript modules
+ working-directory: typescript
+ run: make build
+
+ - name: Dry run publish
+ if: |
+ github.event_name == 'pull_request' ||
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'dry_run')
+ working-directory: typescript
+ run: make publish PUBLISH_FLAGS="--dry-run --no-git-checks --access public"
+
+ - name: Publish to npm
+ if: |
+ (github.event_name == 'release' && github.event.action == 'released') ||
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'release')
+ working-directory: typescript
+ run: make publish PUBLISH_FLAGS="--no-git-checks --access public"
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml
new file mode 100644
index 000000000..e4df05395
--- /dev/null
+++ b/.github/workflows/typescript.yml
@@ -0,0 +1,72 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: TypeScript
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ types:
+ - opened
+ - synchronize
+ - ready_for_review
+ - reopened
+ paths:
+ - docs/src/rest.yaml
+ - typescript/**
+ - Makefile
+ - .github/workflows/typescript.yml
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+ linux-build:
+ runs-on: ubuntu-24.04
+ timeout-minutes: 60
+ steps:
+ - name: Checkout lance-namespace repo
+ uses: actions/checkout@v4
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
+ - name: Set up pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: 10
+ run_install: false
+ - name: Set up Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: pnpm
+ cache-dependency-path: typescript/pnpm-lock.yaml
+ - name: Regenerate TypeScript code
+ run: make gen-typescript
+ - name: Check no difference in TypeScript codegen
+ run: |
+ output=$(git diff)
+ if [ -z "$output" ]; then
+ echo "There is no difference in TypeScript codegen"
+ else
+ echo "Detected difference in TypeScript codegen"
+ echo "$output"
+ exit 1
+ fi
+ - name: Lint TypeScript modules
+ run: make -C typescript lint
+ - name: Test TypeScript modules
+ run: make -C typescript test
+ - name: Build TypeScript modules
+ run: make build-typescript
diff --git a/.gitignore b/.gitignore
index f01b9263b..a322b129e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,6 +57,7 @@ dist/
cmake-build-*
.vscode
.DS_Store
+node_modules/
python/lance/_*.cpp
@@ -117,4 +118,4 @@ env.bak/
venv.bak/
# Docs
-docs/site
\ No newline at end of file
+docs/site
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1a86e217b..fc2cc7c51 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -107,6 +107,9 @@ This repository currently contains the following components:
| Java Apache Client | Java | java/lance-namespace-apache-client | Generated Java Apache HTTP client for Lance REST Namespace |
| Java SpringBoot Server| Java | java/lance-namespace-springboot-server | Generated Java SpringBoot server for Lance REST Namespace |
| Rust Reqwest Client | Rust | rust/lance-namespace-reqwest-client | Generated Rust reqwest client for Lance REST Namespace |
+| TypeScript Core | TypeScript | typescript/lance-namespace | Core LanceNamespace interface and connect functionality |
+| TypeScript REST Impl | TypeScript | typescript/lance-namespace-rest | REST namespace implementation for TypeScript core interface |
+| TypeScript Fetch Client | TypeScript | typescript/lance-namespace-fetch-client | Generated TypeScript fetch client for Lance REST Namespace |
## Install uv
@@ -138,11 +141,15 @@ You can also run `make -` to only run the command in the spec
- `make gen-python`: codegen and lint all Python modules
- `make build-rust`: build all Rust modules
+- `make gen-typescript`: codegen TypeScript fetch client module
+- `make build-typescript`: build all TypeScript modules
You can also run `make --` inside a language folder to run the command against a specific module, for example:
- `make gen-rust-reqwest-client`: codegen and lint the Rust reqwest client module
- `make build-java-springboot-server`: build the Java Spring Boot server module
+- `make gen-fetch-client` (inside `typescript`): codegen TypeScript fetch client module
+- `make build` (inside `typescript`): build TypeScript fetch client and core module
## Documentation
@@ -200,5 +207,5 @@ This section describes the CI/CD workflows for automated version management, rel
- Go to the [Releases page](../../releases) to review the draft
- Edit release notes if needed
- Click "Publish release" to:
- - For stable releases: Trigger automatic publishing for Java, Python, Rust
- - For preview releases: Create a beta release (not published)
+ - For stable releases: Trigger automatic publishing for Java, Python, Rust, and TypeScript (npm)
+ - For preview releases: Create a beta release and trigger preview package publishing
diff --git a/Makefile b/Makefile
index 50e0cf08e..573c97804 100644
--- a/Makefile
+++ b/Makefile
@@ -18,14 +18,26 @@ lint:
clean-rust:
cd rust; make clean
+.PHONY: clean-typescript
+clean-typescript:
+ cd typescript; make clean
+
.PHONY: sync gen-rust
gen-rust:
cd rust; make gen
+.PHONY: gen-typescript
+gen-typescript:
+ cd typescript; make gen
+
.PHONY: build-rust
build-rust:
cd rust; make build
+.PHONY: build-typescript
+build-typescript:
+ cd typescript; make build
+
.PHONY: clean-python
clean-python:
cd python; make clean
@@ -63,10 +75,10 @@ sync:
uv sync --all-packages
.PHONY: clean
-clean: clean-rust clean-python clean-java
+clean: clean-rust clean-python clean-java clean-typescript
.PHONY: gen
-gen: lint gen-rust gen-python gen-java
+gen: lint gen-rust gen-python gen-java gen-typescript
.PHONY: build
-build: lint build-docs build-rust build-python build-java
+build: lint build-docs build-rust build-python build-java build-typescript
diff --git a/README.md b/README.md
index a52996bea..0d4918497 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,7 @@ that compute engines can integrate against:
| Python | `lance-namespace` | Core interface and connect functionality |
| Java | `org.lance:lance-namespace-core` | Core interface for Spark, Flink, Kafka, Trino, Presto |
| Rust | `lance-namespace` | Core interface (in [lance-format/lance](https://github.com/lance-format/lance)) |
+| TypeScript | `@lance/lance-namespace` | Core interface and connect functionality for TypeScript |
## Resources
diff --git a/typescript/Makefile b/typescript/Makefile
new file mode 100644
index 000000000..58c3a8c76
--- /dev/null
+++ b/typescript/Makefile
@@ -0,0 +1,76 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+VERSION = 0.5.2
+PUBLISH_FLAGS ?= --no-git-checks --access public
+
+.PHONY: clean-fetch-client
+clean-fetch-client:
+ rm -rf lance-namespace-fetch-client/**
+
+.PHONY: gen-fetch-client
+gen-fetch-client: clean-fetch-client
+ uv run openapi-generator-cli generate \
+ -i ../docs/src/rest.yaml \
+ -g typescript-fetch \
+ -o lance-namespace-fetch-client \
+ --additional-properties=npmName=@lance/namespace-fetch-client,npmVersion=$(VERSION),supportsES6=true,typescriptThreePlus=true,modelPropertyNaming=original,stringEnums=true
+ rm -rf lance-namespace-fetch-client/.openapi-generator
+ rm -f lance-namespace-fetch-client/.openapi-generator-ignore
+ rm -f lance-namespace-fetch-client/git_push.sh
+ node scripts/patch-fetch-client.mjs $(VERSION)
+
+.PHONY: build-fetch-client
+build-fetch-client: gen-fetch-client
+ pnpm install --frozen-lockfile=false
+ pnpm --filter @lance/namespace-fetch-client run build
+
+.PHONY: clean
+clean: clean-fetch-client
+ rm -rf lance-namespace/dist
+ rm -rf lance-namespace-rest/dist
+
+.PHONY: gen
+gen: gen-fetch-client
+
+.PHONY: build
+build: gen
+ pnpm install --frozen-lockfile=false
+ pnpm --filter @lance/namespace-fetch-client run build
+ pnpm --filter @lance/lance-namespace run build
+ pnpm --filter @lance/lance-namespace-rest run build
+ pnpm --filter @lance/namespace-fetch-client run test
+ pnpm --filter @lance/lance-namespace run test
+ pnpm --filter @lance/lance-namespace-rest run test
+
+.PHONY: test
+test:
+ pnpm install --frozen-lockfile=false
+ pnpm --filter @lance/namespace-fetch-client run test
+ pnpm --filter @lance/lance-namespace run test
+ pnpm --filter @lance/lance-namespace-rest run test
+
+.PHONY: lint
+lint:
+ pnpm install --frozen-lockfile=false
+ pnpm --filter @lance/namespace-fetch-client run build
+ pnpm --filter @lance/lance-namespace run build
+ pnpm --filter @lance/namespace-fetch-client run lint
+ pnpm --filter @lance/lance-namespace run lint
+ pnpm --filter @lance/lance-namespace-rest run lint
+
+.PHONY: publish
+publish:
+ pnpm install --frozen-lockfile=false
+ pnpm --filter @lance/namespace-fetch-client publish $(PUBLISH_FLAGS)
+ pnpm --filter @lance/lance-namespace publish $(PUBLISH_FLAGS)
+ pnpm --filter @lance/lance-namespace-rest publish $(PUBLISH_FLAGS)
diff --git a/typescript/README.md b/typescript/README.md
new file mode 100644
index 000000000..29e9ef666
--- /dev/null
+++ b/typescript/README.md
@@ -0,0 +1,105 @@
+# TypeScript Modules
+
+This folder contains the TypeScript modules for Lance Namespace:
+
+- `@lance/namespace-fetch-client`: generated fetch client from `docs/src/rest.yaml`
+- `@lance/lance-namespace`: hand-written core interface, error model, and class-path registry
+- `@lance/lance-namespace-rest`: REST implementation package for `@lance/lance-namespace`
+
+## Build
+
+```bash
+cd typescript
+make build
+```
+
+## Test
+
+```bash
+cd typescript
+make test
+```
+
+## Regenerate OpenAPI client
+
+```bash
+cd typescript
+make gen-fetch-client
+```
+
+After regeneration, always run:
+
+```bash
+cd typescript
+make build
+```
+
+For codegen reproducibility checks:
+
+```bash
+make clean-typescript
+make gen-typescript
+git diff --exit-code
+```
+
+## Usage
+
+```ts
+import {
+ connect,
+ registerNamespaceImpl,
+ LanceNamespace,
+ type ListNamespacesRequest,
+} from "@lance/lance-namespace";
+
+const ns = await connect("rest", {
+ uri: "http://localhost:2333",
+ "headers.X-Request-ID": "req-1",
+});
+
+const listRequest: ListNamespacesRequest = { id: [] };
+const listResp = await ns.listNamespaces(listRequest);
+console.log(listResp.namespaces);
+
+class MockNamespace extends LanceNamespace {
+ namespaceId(): string {
+ return "MockNamespace";
+ }
+}
+
+registerNamespaceImpl("mock", "my-namespace-package#MockNamespace");
+const mock = await connect("mock", {});
+console.log(mock.namespaceId());
+```
+
+### Error handling
+
+```ts
+import {
+ ErrorCode,
+ LanceNamespaceError,
+} from "@lance/lance-namespace";
+
+try {
+ await ns.describeTable({ id: ["ns", "missing"] });
+} catch (error) {
+ if (error instanceof LanceNamespaceError) {
+ if (error.code === ErrorCode.TABLE_NOT_FOUND) {
+ console.log("table not found");
+ } else {
+ console.log(`namespace error: ${error.message}`);
+ }
+ } else {
+ throw error;
+ }
+}
+```
+
+## Release notes for maintainers
+
+- Versions are managed through `.bumpversion.toml`.
+- Keep `typescript/Makefile` `VERSION` aligned with workspace version.
+- The publish workflow is `.github/workflows/typescript-publish.yml`.
+- Release channel is aligned with repo tags:
+ - stable tag (`vX.Y.Z`) publishes stable npm packages.
+ - preview tag (`vX.Y.Z-beta.N`) publishes prerelease npm packages.
diff --git a/typescript/lance-namespace-fetch-client/.gitignore b/typescript/lance-namespace-fetch-client/.gitignore
new file mode 100644
index 000000000..149b57654
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/.gitignore
@@ -0,0 +1,4 @@
+wwwroot/*.js
+node_modules
+typings
+dist
diff --git a/typescript/lance-namespace-fetch-client/.npmignore b/typescript/lance-namespace-fetch-client/.npmignore
new file mode 100644
index 000000000..42061c01a
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/.npmignore
@@ -0,0 +1 @@
+README.md
\ No newline at end of file
diff --git a/typescript/lance-namespace-fetch-client/README.md b/typescript/lance-namespace-fetch-client/README.md
new file mode 100644
index 000000000..f1e1ad88b
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/README.md
@@ -0,0 +1,46 @@
+## @lance/namespace-fetch-client@0.5.2
+
+This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
+
+Environment
+* Node.js
+* Webpack
+* Browserify
+
+Language level
+* ES5 - you must have a Promises/A+ library installed
+* ES6
+
+Module system
+* CommonJS
+* ES6 module system
+
+It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
+
+### Building
+
+To build and compile the typescript sources to javascript use:
+```
+npm install
+npm run build
+```
+
+### Publishing
+
+First build the package then run `npm publish`
+
+### Consuming
+
+navigate to the folder of your consuming project and run one of the following commands.
+
+_published:_
+
+```
+npm install @lance/namespace-fetch-client@0.5.2 --save
+```
+
+_unPublished (not recommended):_
+
+```
+npm install PATH_TO_GENERATED_PACKAGE --save
+```
diff --git a/typescript/lance-namespace-fetch-client/package.json b/typescript/lance-namespace-fetch-client/package.json
new file mode 100644
index 000000000..6512f36c7
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "@lance/namespace-fetch-client",
+ "version": "0.5.2",
+ "description": "OpenAPI client for @lance/namespace-fetch-client",
+ "author": "OpenAPI-Generator",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/lance-format/lance-namespace"
+ },
+ "main": "./dist/index.js",
+ "typings": "./dist/index.d.ts",
+ "module": "./dist/esm/index.js",
+ "sideEffects": false,
+ "scripts": {
+ "build": "tsc && tsc -p tsconfig.esm.json",
+ "lint": "tsc --noEmit && tsc -p tsconfig.esm.json --noEmit",
+ "test": "vitest run"
+ },
+ "devDependencies": {
+ "typescript": "^5.8.3",
+ "vitest": "^2.1.9"
+ },
+ "license": "Apache-2.0"
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/DataApi.ts b/typescript/lance-namespace-fetch-client/src/apis/DataApi.ts
new file mode 100644
index 000000000..404166eea
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/DataApi.ts
@@ -0,0 +1,858 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AlterTableAddColumnsRequest,
+ AlterTableAddColumnsResponse,
+ AnalyzeTableQueryPlanRequest,
+ CountTableRowsRequest,
+ CreateTableResponse,
+ DeleteFromTableRequest,
+ DeleteFromTableResponse,
+ ErrorResponse,
+ ExplainTableQueryPlanRequest,
+ InsertIntoTableResponse,
+ MergeInsertIntoTableResponse,
+ QueryTableRequest,
+ UpdateTableRequest,
+ UpdateTableResponse,
+} from '../models/index';
+import {
+ AlterTableAddColumnsRequestFromJSON,
+ AlterTableAddColumnsRequestToJSON,
+ AlterTableAddColumnsResponseFromJSON,
+ AlterTableAddColumnsResponseToJSON,
+ AnalyzeTableQueryPlanRequestFromJSON,
+ AnalyzeTableQueryPlanRequestToJSON,
+ CountTableRowsRequestFromJSON,
+ CountTableRowsRequestToJSON,
+ CreateTableResponseFromJSON,
+ CreateTableResponseToJSON,
+ DeleteFromTableRequestFromJSON,
+ DeleteFromTableRequestToJSON,
+ DeleteFromTableResponseFromJSON,
+ DeleteFromTableResponseToJSON,
+ ErrorResponseFromJSON,
+ ErrorResponseToJSON,
+ ExplainTableQueryPlanRequestFromJSON,
+ ExplainTableQueryPlanRequestToJSON,
+ InsertIntoTableResponseFromJSON,
+ InsertIntoTableResponseToJSON,
+ MergeInsertIntoTableResponseFromJSON,
+ MergeInsertIntoTableResponseToJSON,
+ QueryTableRequestFromJSON,
+ QueryTableRequestToJSON,
+ UpdateTableRequestFromJSON,
+ UpdateTableRequestToJSON,
+ UpdateTableResponseFromJSON,
+ UpdateTableResponseToJSON,
+} from '../models/index';
+
+export interface AlterTableAddColumnsOperationRequest {
+ id: string;
+ alterTableAddColumnsRequest: AlterTableAddColumnsRequest;
+ delimiter?: string;
+}
+
+export interface AnalyzeTableQueryPlanOperationRequest {
+ id: string;
+ analyzeTableQueryPlanRequest: AnalyzeTableQueryPlanRequest;
+ delimiter?: string;
+}
+
+export interface CountTableRowsOperationRequest {
+ id: string;
+ countTableRowsRequest: CountTableRowsRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableRequest {
+ id: string;
+ body: Blob;
+ delimiter?: string;
+ mode?: string;
+}
+
+export interface DeleteFromTableOperationRequest {
+ id: string;
+ deleteFromTableRequest: DeleteFromTableRequest;
+ delimiter?: string;
+}
+
+export interface ExplainTableQueryPlanOperationRequest {
+ id: string;
+ explainTableQueryPlanRequest: ExplainTableQueryPlanRequest;
+ delimiter?: string;
+}
+
+export interface InsertIntoTableRequest {
+ id: string;
+ body: Blob;
+ delimiter?: string;
+ mode?: string;
+}
+
+export interface MergeInsertIntoTableRequest {
+ id: string;
+ on: string;
+ body: Blob;
+ delimiter?: string;
+ whenMatchedUpdateAll?: boolean;
+ whenMatchedUpdateAllFilt?: string;
+ whenNotMatchedInsertAll?: boolean;
+ whenNotMatchedBySourceDelete?: boolean;
+ whenNotMatchedBySourceDeleteFilt?: string;
+ timeout?: string;
+ useIndex?: boolean;
+}
+
+export interface QueryTableOperationRequest {
+ id: string;
+ queryTableRequest: QueryTableRequest;
+ delimiter?: string;
+}
+
+export interface UpdateTableOperationRequest {
+ id: string;
+ updateTableRequest: UpdateTableRequest;
+ delimiter?: string;
+}
+
+/**
+ *
+ */
+export class DataApi extends runtime.BaseAPI {
+
+ /**
+ * Add new columns to table `id` using SQL expressions or default values.
+ * Add new columns to table schema
+ */
+ async alterTableAddColumnsRaw(requestParameters: AlterTableAddColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTableAddColumns().'
+ );
+ }
+
+ if (requestParameters['alterTableAddColumnsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTableAddColumnsRequest',
+ 'Required parameter "alterTableAddColumnsRequest" was null or undefined when calling alterTableAddColumns().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/add_columns`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTableAddColumnsRequestToJSON(requestParameters['alterTableAddColumnsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTableAddColumnsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Add new columns to table `id` using SQL expressions or default values.
+ * Add new columns to table schema
+ */
+ async alterTableAddColumns(requestParameters: AlterTableAddColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTableAddColumnsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Analyze the query execution plan for a query against table `id`. Returns detailed statistics and analysis of the query execution plan. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `AnalyzeTableQueryPlanResponse` JSON object.
+ * Analyze query execution plan
+ */
+ async analyzeTableQueryPlanRaw(requestParameters: AnalyzeTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling analyzeTableQueryPlan().'
+ );
+ }
+
+ if (requestParameters['analyzeTableQueryPlanRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'analyzeTableQueryPlanRequest',
+ 'Required parameter "analyzeTableQueryPlanRequest" was null or undefined when calling analyzeTableQueryPlan().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/analyze_plan`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AnalyzeTableQueryPlanRequestToJSON(requestParameters['analyzeTableQueryPlanRequest']),
+ }, initOverrides);
+
+ if (this.isJsonMime(response.headers.get('content-type'))) {
+ return new runtime.JSONApiResponse(response);
+ } else {
+ return new runtime.TextApiResponse(response) as any;
+ }
+ }
+
+ /**
+ * Analyze the query execution plan for a query against table `id`. Returns detailed statistics and analysis of the query execution plan. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `AnalyzeTableQueryPlanResponse` JSON object.
+ * Analyze query execution plan
+ */
+ async analyzeTableQueryPlan(requestParameters: AnalyzeTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.analyzeTableQueryPlanRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Count the number of rows in table `id` REST NAMESPACE ONLY REST namespace returns the response as a plain integer instead of the `CountTableRowsResponse` JSON object.
+ * Count rows in a table
+ */
+ async countTableRowsRaw(requestParameters: CountTableRowsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling countTableRows().'
+ );
+ }
+
+ if (requestParameters['countTableRowsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'countTableRowsRequest',
+ 'Required parameter "countTableRowsRequest" was null or undefined when calling countTableRows().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/count_rows`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CountTableRowsRequestToJSON(requestParameters['countTableRowsRequest']),
+ }, initOverrides);
+
+ if (this.isJsonMime(response.headers.get('content-type'))) {
+ return new runtime.JSONApiResponse(response);
+ } else {
+ return new runtime.TextApiResponse(response) as any;
+ }
+ }
+
+ /**
+ * Count the number of rows in table `id` REST NAMESPACE ONLY REST namespace returns the response as a plain integer instead of the `CountTableRowsResponse` JSON object.
+ * Count rows in a table
+ */
+ async countTableRows(requestParameters: CountTableRowsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.countTableRowsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create table `id` in the namespace with the given data in Arrow IPC stream. The schema of the Arrow IPC stream is used as the table schema. If the stream is empty, the API creates a new empty table. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `CreateTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Create a table with the given name
+ */
+ async createTableRaw(requestParameters: CreateTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTable().'
+ );
+ }
+
+ if (requestParameters['body'] == null) {
+ throw new runtime.RequiredError(
+ 'body',
+ 'Required parameter "body" was null or undefined when calling createTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['mode'] != null) {
+ queryParameters['mode'] = requestParameters['mode'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/vnd.apache.arrow.stream';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['body'] as any,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create table `id` in the namespace with the given data in Arrow IPC stream. The schema of the Arrow IPC stream is used as the table schema. If the stream is empty, the API creates a new empty table. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `CreateTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Create a table with the given name
+ */
+ async createTable(requestParameters: CreateTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete rows from table `id`.
+ * Delete rows from a table
+ */
+ async deleteFromTableRaw(requestParameters: DeleteFromTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling deleteFromTable().'
+ );
+ }
+
+ if (requestParameters['deleteFromTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'deleteFromTableRequest',
+ 'Required parameter "deleteFromTableRequest" was null or undefined when calling deleteFromTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/delete`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeleteFromTableRequestToJSON(requestParameters['deleteFromTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteFromTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Delete rows from table `id`.
+ * Delete rows from a table
+ */
+ async deleteFromTable(requestParameters: DeleteFromTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.deleteFromTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get the query execution plan for a query against table `id`. Returns a human-readable explanation of how the query will be executed. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `ExplainTableQueryPlanResponse` JSON object.
+ * Get query execution plan explanation
+ */
+ async explainTableQueryPlanRaw(requestParameters: ExplainTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling explainTableQueryPlan().'
+ );
+ }
+
+ if (requestParameters['explainTableQueryPlanRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'explainTableQueryPlanRequest',
+ 'Required parameter "explainTableQueryPlanRequest" was null or undefined when calling explainTableQueryPlan().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/explain_plan`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: ExplainTableQueryPlanRequestToJSON(requestParameters['explainTableQueryPlanRequest']),
+ }, initOverrides);
+
+ if (this.isJsonMime(response.headers.get('content-type'))) {
+ return new runtime.JSONApiResponse(response);
+ } else {
+ return new runtime.TextApiResponse(response) as any;
+ }
+ }
+
+ /**
+ * Get the query execution plan for a query against table `id`. Returns a human-readable explanation of how the query will be executed. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `ExplainTableQueryPlanResponse` JSON object.
+ * Get query execution plan explanation
+ */
+ async explainTableQueryPlan(requestParameters: ExplainTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.explainTableQueryPlanRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Insert new records into table `id`. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `InsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Insert records into a table
+ */
+ async insertIntoTableRaw(requestParameters: InsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling insertIntoTable().'
+ );
+ }
+
+ if (requestParameters['body'] == null) {
+ throw new runtime.RequiredError(
+ 'body',
+ 'Required parameter "body" was null or undefined when calling insertIntoTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['mode'] != null) {
+ queryParameters['mode'] = requestParameters['mode'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/vnd.apache.arrow.stream';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/insert`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['body'] as any,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => InsertIntoTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Insert new records into table `id`. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `InsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Insert records into a table
+ */
+ async insertIntoTable(requestParameters: InsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.insertIntoTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Performs a merge insert (upsert) operation on table `id`. This operation updates existing rows based on a matching column and inserts new rows that don\'t match. It returns the number of rows inserted and updated. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `MergeInsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `on`: pass through query parameter of the same name - `when_matched_update_all`: pass through query parameter of the same name - `when_matched_update_all_filt`: pass through query parameter of the same name - `when_not_matched_insert_all`: pass through query parameter of the same name - `when_not_matched_by_source_delete`: pass through query parameter of the same name - `when_not_matched_by_source_delete_filt`: pass through query parameter of the same name
+ * Merge insert (upsert) records into a table
+ */
+ async mergeInsertIntoTableRaw(requestParameters: MergeInsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling mergeInsertIntoTable().'
+ );
+ }
+
+ if (requestParameters['on'] == null) {
+ throw new runtime.RequiredError(
+ 'on',
+ 'Required parameter "on" was null or undefined when calling mergeInsertIntoTable().'
+ );
+ }
+
+ if (requestParameters['body'] == null) {
+ throw new runtime.RequiredError(
+ 'body',
+ 'Required parameter "body" was null or undefined when calling mergeInsertIntoTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['on'] != null) {
+ queryParameters['on'] = requestParameters['on'];
+ }
+
+ if (requestParameters['whenMatchedUpdateAll'] != null) {
+ queryParameters['when_matched_update_all'] = requestParameters['whenMatchedUpdateAll'];
+ }
+
+ if (requestParameters['whenMatchedUpdateAllFilt'] != null) {
+ queryParameters['when_matched_update_all_filt'] = requestParameters['whenMatchedUpdateAllFilt'];
+ }
+
+ if (requestParameters['whenNotMatchedInsertAll'] != null) {
+ queryParameters['when_not_matched_insert_all'] = requestParameters['whenNotMatchedInsertAll'];
+ }
+
+ if (requestParameters['whenNotMatchedBySourceDelete'] != null) {
+ queryParameters['when_not_matched_by_source_delete'] = requestParameters['whenNotMatchedBySourceDelete'];
+ }
+
+ if (requestParameters['whenNotMatchedBySourceDeleteFilt'] != null) {
+ queryParameters['when_not_matched_by_source_delete_filt'] = requestParameters['whenNotMatchedBySourceDeleteFilt'];
+ }
+
+ if (requestParameters['timeout'] != null) {
+ queryParameters['timeout'] = requestParameters['timeout'];
+ }
+
+ if (requestParameters['useIndex'] != null) {
+ queryParameters['use_index'] = requestParameters['useIndex'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/vnd.apache.arrow.stream';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/merge_insert`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['body'] as any,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => MergeInsertIntoTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Performs a merge insert (upsert) operation on table `id`. This operation updates existing rows based on a matching column and inserts new rows that don\'t match. It returns the number of rows inserted and updated. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `MergeInsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `on`: pass through query parameter of the same name - `when_matched_update_all`: pass through query parameter of the same name - `when_matched_update_all_filt`: pass through query parameter of the same name - `when_not_matched_insert_all`: pass through query parameter of the same name - `when_not_matched_by_source_delete`: pass through query parameter of the same name - `when_not_matched_by_source_delete_filt`: pass through query parameter of the same name
+ * Merge insert (upsert) records into a table
+ */
+ async mergeInsertIntoTable(requestParameters: MergeInsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.mergeInsertIntoTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Query table `id` with vector search, full text search and optional SQL filtering. Returns results in Arrow IPC file or stream format. REST NAMESPACE ONLY REST namespace returns the response as Arrow IPC file binary data instead of the `QueryTableResponse` JSON object.
+ * Query a table
+ */
+ async queryTableRaw(requestParameters: QueryTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling queryTable().'
+ );
+ }
+
+ if (requestParameters['queryTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'queryTableRequest',
+ 'Required parameter "queryTableRequest" was null or undefined when calling queryTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/query`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: QueryTableRequestToJSON(requestParameters['queryTableRequest']),
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * Query table `id` with vector search, full text search and optional SQL filtering. Returns results in Arrow IPC file or stream format. REST NAMESPACE ONLY REST namespace returns the response as Arrow IPC file binary data instead of the `QueryTableResponse` JSON object.
+ * Query a table
+ */
+ async queryTable(requestParameters: QueryTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.queryTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update existing rows in table `id`.
+ * Update rows in a table
+ */
+ async updateTableRaw(requestParameters: UpdateTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling updateTable().'
+ );
+ }
+
+ if (requestParameters['updateTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'updateTableRequest',
+ 'Required parameter "updateTableRequest" was null or undefined when calling updateTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: UpdateTableRequestToJSON(requestParameters['updateTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Update existing rows in table `id`.
+ * Update rows in a table
+ */
+ async updateTable(requestParameters: UpdateTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/IndexApi.ts b/typescript/lance-namespace-fetch-client/src/apis/IndexApi.ts
new file mode 100644
index 000000000..a6f24e04e
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/IndexApi.ts
@@ -0,0 +1,419 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ CreateTableIndexRequest,
+ CreateTableIndexResponse,
+ CreateTableScalarIndexResponse,
+ DescribeTableIndexStatsRequest,
+ DescribeTableIndexStatsResponse,
+ DropTableIndexResponse,
+ ErrorResponse,
+ ListTableIndicesRequest,
+ ListTableIndicesResponse,
+} from '../models/index';
+import {
+ CreateTableIndexRequestFromJSON,
+ CreateTableIndexRequestToJSON,
+ CreateTableIndexResponseFromJSON,
+ CreateTableIndexResponseToJSON,
+ CreateTableScalarIndexResponseFromJSON,
+ CreateTableScalarIndexResponseToJSON,
+ DescribeTableIndexStatsRequestFromJSON,
+ DescribeTableIndexStatsRequestToJSON,
+ DescribeTableIndexStatsResponseFromJSON,
+ DescribeTableIndexStatsResponseToJSON,
+ DropTableIndexResponseFromJSON,
+ DropTableIndexResponseToJSON,
+ ErrorResponseFromJSON,
+ ErrorResponseToJSON,
+ ListTableIndicesRequestFromJSON,
+ ListTableIndicesRequestToJSON,
+ ListTableIndicesResponseFromJSON,
+ ListTableIndicesResponseToJSON,
+} from '../models/index';
+
+export interface CreateTableIndexOperationRequest {
+ id: string;
+ createTableIndexRequest: CreateTableIndexRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableScalarIndexRequest {
+ id: string;
+ createTableIndexRequest: CreateTableIndexRequest;
+ delimiter?: string;
+}
+
+export interface DescribeTableIndexStatsOperationRequest {
+ id: string;
+ indexName: string;
+ describeTableIndexStatsRequest: DescribeTableIndexStatsRequest;
+ delimiter?: string;
+}
+
+export interface DropTableIndexRequest {
+ id: string;
+ indexName: string;
+ delimiter?: string;
+}
+
+export interface ListTableIndicesOperationRequest {
+ id: string;
+ listTableIndicesRequest: ListTableIndicesRequest;
+ delimiter?: string;
+}
+
+/**
+ *
+ */
+export class IndexApi extends runtime.BaseAPI {
+
+ /**
+ * Create an index on a table column for faster search operations. Supports vector indexes (IVF_FLAT, IVF_HNSW_SQ, IVF_PQ, etc.) and scalar indexes (BTREE, BITMAP, FTS, etc.). Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create an index on a table
+ */
+ async createTableIndexRaw(requestParameters: CreateTableIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableIndex().'
+ );
+ }
+
+ if (requestParameters['createTableIndexRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableIndexRequest',
+ 'Required parameter "createTableIndexRequest" was null or undefined when calling createTableIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create_index`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableIndexRequestToJSON(requestParameters['createTableIndexRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create an index on a table column for faster search operations. Supports vector indexes (IVF_FLAT, IVF_HNSW_SQ, IVF_PQ, etc.) and scalar indexes (BTREE, BITMAP, FTS, etc.). Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create an index on a table
+ */
+ async createTableIndex(requestParameters: CreateTableIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create a scalar index on a table column for faster filtering operations. Supports scalar indexes (BTREE, BITMAP, LABEL_LIST, FTS, etc.). This is an alias for CreateTableIndex specifically for scalar indexes. Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create a scalar index on a table
+ */
+ async createTableScalarIndexRaw(requestParameters: CreateTableScalarIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableScalarIndex().'
+ );
+ }
+
+ if (requestParameters['createTableIndexRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableIndexRequest',
+ 'Required parameter "createTableIndexRequest" was null or undefined when calling createTableScalarIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create_scalar_index`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableIndexRequestToJSON(requestParameters['createTableIndexRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableScalarIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a scalar index on a table column for faster filtering operations. Supports scalar indexes (BTREE, BITMAP, LABEL_LIST, FTS, etc.). This is an alias for CreateTableIndex specifically for scalar indexes. Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create a scalar index on a table
+ */
+ async createTableScalarIndex(requestParameters: CreateTableScalarIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableScalarIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get statistics for a specific index on a table. Returns information about the index type, distance type (for vector indices), and row counts.
+ * Get table index statistics
+ */
+ async describeTableIndexStatsRaw(requestParameters: DescribeTableIndexStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ if (requestParameters['indexName'] == null) {
+ throw new runtime.RequiredError(
+ 'indexName',
+ 'Required parameter "indexName" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ if (requestParameters['describeTableIndexStatsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTableIndexStatsRequest',
+ 'Required parameter "describeTableIndexStatsRequest" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/{index_name}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"index_name"}}`, encodeURIComponent(String(requestParameters['indexName']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTableIndexStatsRequestToJSON(requestParameters['describeTableIndexStatsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTableIndexStatsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get statistics for a specific index on a table. Returns information about the index type, distance type (for vector indices), and row counts.
+ * Get table index statistics
+ */
+ async describeTableIndexStats(requestParameters: DescribeTableIndexStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTableIndexStatsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Drop the specified index from table `id`. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableIndexRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `index_name`: pass through path parameter of the same name
+ * Drop a specific index
+ */
+ async dropTableIndexRaw(requestParameters: DropTableIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling dropTableIndex().'
+ );
+ }
+
+ if (requestParameters['indexName'] == null) {
+ throw new runtime.RequiredError(
+ 'indexName',
+ 'Required parameter "indexName" was null or undefined when calling dropTableIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/{index_name}/drop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"index_name"}}`, encodeURIComponent(String(requestParameters['indexName']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DropTableIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Drop the specified index from table `id`. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableIndexRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `index_name`: pass through path parameter of the same name
+ * Drop a specific index
+ */
+ async dropTableIndex(requestParameters: DropTableIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.dropTableIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all indices created on a table. Returns information about each index including name, columns, status, and UUID.
+ * List indexes on a table
+ */
+ async listTableIndicesRaw(requestParameters: ListTableIndicesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableIndices().'
+ );
+ }
+
+ if (requestParameters['listTableIndicesRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'listTableIndicesRequest',
+ 'Required parameter "listTableIndicesRequest" was null or undefined when calling listTableIndices().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: ListTableIndicesRequestToJSON(requestParameters['listTableIndicesRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableIndicesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all indices created on a table. Returns information about each index including name, columns, status, and UUID.
+ * List indexes on a table
+ */
+ async listTableIndices(requestParameters: ListTableIndicesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableIndicesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/MetadataApi.ts b/typescript/lance-namespace-fetch-client/src/apis/MetadataApi.ts
new file mode 100644
index 000000000..a572e264b
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/MetadataApi.ts
@@ -0,0 +1,2802 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AlterTableAlterColumnsRequest,
+ AlterTableAlterColumnsResponse,
+ AlterTableDropColumnsRequest,
+ AlterTableDropColumnsResponse,
+ AlterTransactionRequest,
+ AlterTransactionResponse,
+ BatchCreateTableVersionsRequest,
+ BatchCreateTableVersionsResponse,
+ BatchDeleteTableVersionsRequest,
+ BatchDeleteTableVersionsResponse,
+ CreateEmptyTableRequest,
+ CreateEmptyTableResponse,
+ CreateNamespaceRequest,
+ CreateNamespaceResponse,
+ CreateTableIndexRequest,
+ CreateTableIndexResponse,
+ CreateTableScalarIndexResponse,
+ CreateTableTagRequest,
+ CreateTableTagResponse,
+ CreateTableVersionRequest,
+ CreateTableVersionResponse,
+ DeclareTableRequest,
+ DeclareTableResponse,
+ DeleteTableTagRequest,
+ DeleteTableTagResponse,
+ DeregisterTableRequest,
+ DeregisterTableResponse,
+ DescribeNamespaceRequest,
+ DescribeNamespaceResponse,
+ DescribeTableIndexStatsRequest,
+ DescribeTableIndexStatsResponse,
+ DescribeTableRequest,
+ DescribeTableResponse,
+ DescribeTableVersionRequest,
+ DescribeTableVersionResponse,
+ DescribeTransactionRequest,
+ DescribeTransactionResponse,
+ DropNamespaceRequest,
+ DropNamespaceResponse,
+ DropTableIndexResponse,
+ DropTableResponse,
+ ErrorResponse,
+ GetTableStatsRequest,
+ GetTableStatsResponse,
+ GetTableTagVersionRequest,
+ GetTableTagVersionResponse,
+ ListNamespacesResponse,
+ ListTableIndicesRequest,
+ ListTableIndicesResponse,
+ ListTableTagsResponse,
+ ListTableVersionsResponse,
+ ListTablesResponse,
+ NamespaceExistsRequest,
+ RegisterTableRequest,
+ RegisterTableResponse,
+ RenameTableRequest,
+ RenameTableResponse,
+ RestoreTableRequest,
+ RestoreTableResponse,
+ TableExistsRequest,
+ UpdateTableTagRequest,
+ UpdateTableTagResponse,
+} from '../models/index';
+import {
+ AlterTableAlterColumnsRequestFromJSON,
+ AlterTableAlterColumnsRequestToJSON,
+ AlterTableAlterColumnsResponseFromJSON,
+ AlterTableAlterColumnsResponseToJSON,
+ AlterTableDropColumnsRequestFromJSON,
+ AlterTableDropColumnsRequestToJSON,
+ AlterTableDropColumnsResponseFromJSON,
+ AlterTableDropColumnsResponseToJSON,
+ AlterTransactionRequestFromJSON,
+ AlterTransactionRequestToJSON,
+ AlterTransactionResponseFromJSON,
+ AlterTransactionResponseToJSON,
+ BatchCreateTableVersionsRequestFromJSON,
+ BatchCreateTableVersionsRequestToJSON,
+ BatchCreateTableVersionsResponseFromJSON,
+ BatchCreateTableVersionsResponseToJSON,
+ BatchDeleteTableVersionsRequestFromJSON,
+ BatchDeleteTableVersionsRequestToJSON,
+ BatchDeleteTableVersionsResponseFromJSON,
+ BatchDeleteTableVersionsResponseToJSON,
+ CreateEmptyTableRequestFromJSON,
+ CreateEmptyTableRequestToJSON,
+ CreateEmptyTableResponseFromJSON,
+ CreateEmptyTableResponseToJSON,
+ CreateNamespaceRequestFromJSON,
+ CreateNamespaceRequestToJSON,
+ CreateNamespaceResponseFromJSON,
+ CreateNamespaceResponseToJSON,
+ CreateTableIndexRequestFromJSON,
+ CreateTableIndexRequestToJSON,
+ CreateTableIndexResponseFromJSON,
+ CreateTableIndexResponseToJSON,
+ CreateTableScalarIndexResponseFromJSON,
+ CreateTableScalarIndexResponseToJSON,
+ CreateTableTagRequestFromJSON,
+ CreateTableTagRequestToJSON,
+ CreateTableTagResponseFromJSON,
+ CreateTableTagResponseToJSON,
+ CreateTableVersionRequestFromJSON,
+ CreateTableVersionRequestToJSON,
+ CreateTableVersionResponseFromJSON,
+ CreateTableVersionResponseToJSON,
+ DeclareTableRequestFromJSON,
+ DeclareTableRequestToJSON,
+ DeclareTableResponseFromJSON,
+ DeclareTableResponseToJSON,
+ DeleteTableTagRequestFromJSON,
+ DeleteTableTagRequestToJSON,
+ DeleteTableTagResponseFromJSON,
+ DeleteTableTagResponseToJSON,
+ DeregisterTableRequestFromJSON,
+ DeregisterTableRequestToJSON,
+ DeregisterTableResponseFromJSON,
+ DeregisterTableResponseToJSON,
+ DescribeNamespaceRequestFromJSON,
+ DescribeNamespaceRequestToJSON,
+ DescribeNamespaceResponseFromJSON,
+ DescribeNamespaceResponseToJSON,
+ DescribeTableIndexStatsRequestFromJSON,
+ DescribeTableIndexStatsRequestToJSON,
+ DescribeTableIndexStatsResponseFromJSON,
+ DescribeTableIndexStatsResponseToJSON,
+ DescribeTableRequestFromJSON,
+ DescribeTableRequestToJSON,
+ DescribeTableResponseFromJSON,
+ DescribeTableResponseToJSON,
+ DescribeTableVersionRequestFromJSON,
+ DescribeTableVersionRequestToJSON,
+ DescribeTableVersionResponseFromJSON,
+ DescribeTableVersionResponseToJSON,
+ DescribeTransactionRequestFromJSON,
+ DescribeTransactionRequestToJSON,
+ DescribeTransactionResponseFromJSON,
+ DescribeTransactionResponseToJSON,
+ DropNamespaceRequestFromJSON,
+ DropNamespaceRequestToJSON,
+ DropNamespaceResponseFromJSON,
+ DropNamespaceResponseToJSON,
+ DropTableIndexResponseFromJSON,
+ DropTableIndexResponseToJSON,
+ DropTableResponseFromJSON,
+ DropTableResponseToJSON,
+ ErrorResponseFromJSON,
+ ErrorResponseToJSON,
+ GetTableStatsRequestFromJSON,
+ GetTableStatsRequestToJSON,
+ GetTableStatsResponseFromJSON,
+ GetTableStatsResponseToJSON,
+ GetTableTagVersionRequestFromJSON,
+ GetTableTagVersionRequestToJSON,
+ GetTableTagVersionResponseFromJSON,
+ GetTableTagVersionResponseToJSON,
+ ListNamespacesResponseFromJSON,
+ ListNamespacesResponseToJSON,
+ ListTableIndicesRequestFromJSON,
+ ListTableIndicesRequestToJSON,
+ ListTableIndicesResponseFromJSON,
+ ListTableIndicesResponseToJSON,
+ ListTableTagsResponseFromJSON,
+ ListTableTagsResponseToJSON,
+ ListTableVersionsResponseFromJSON,
+ ListTableVersionsResponseToJSON,
+ ListTablesResponseFromJSON,
+ ListTablesResponseToJSON,
+ NamespaceExistsRequestFromJSON,
+ NamespaceExistsRequestToJSON,
+ RegisterTableRequestFromJSON,
+ RegisterTableRequestToJSON,
+ RegisterTableResponseFromJSON,
+ RegisterTableResponseToJSON,
+ RenameTableRequestFromJSON,
+ RenameTableRequestToJSON,
+ RenameTableResponseFromJSON,
+ RenameTableResponseToJSON,
+ RestoreTableRequestFromJSON,
+ RestoreTableRequestToJSON,
+ RestoreTableResponseFromJSON,
+ RestoreTableResponseToJSON,
+ TableExistsRequestFromJSON,
+ TableExistsRequestToJSON,
+ UpdateTableTagRequestFromJSON,
+ UpdateTableTagRequestToJSON,
+ UpdateTableTagResponseFromJSON,
+ UpdateTableTagResponseToJSON,
+} from '../models/index';
+
+export interface AlterTableAlterColumnsOperationRequest {
+ id: string;
+ alterTableAlterColumnsRequest: AlterTableAlterColumnsRequest;
+ delimiter?: string;
+}
+
+export interface AlterTableDropColumnsOperationRequest {
+ id: string;
+ alterTableDropColumnsRequest: AlterTableDropColumnsRequest;
+ delimiter?: string;
+}
+
+export interface AlterTransactionOperationRequest {
+ id: string;
+ alterTransactionRequest: AlterTransactionRequest;
+ delimiter?: string;
+}
+
+export interface BatchCreateTableVersionsOperationRequest {
+ batchCreateTableVersionsRequest: BatchCreateTableVersionsRequest;
+ delimiter?: string;
+}
+
+export interface BatchDeleteTableVersionsOperationRequest {
+ id: string;
+ batchDeleteTableVersionsRequest: BatchDeleteTableVersionsRequest;
+ delimiter?: string;
+}
+
+export interface CreateEmptyTableOperationRequest {
+ id: string;
+ createEmptyTableRequest: CreateEmptyTableRequest;
+ delimiter?: string;
+}
+
+export interface CreateNamespaceOperationRequest {
+ id: string;
+ createNamespaceRequest: CreateNamespaceRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableIndexOperationRequest {
+ id: string;
+ createTableIndexRequest: CreateTableIndexRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableScalarIndexRequest {
+ id: string;
+ createTableIndexRequest: CreateTableIndexRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableTagOperationRequest {
+ id: string;
+ createTableTagRequest: CreateTableTagRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableVersionOperationRequest {
+ id: string;
+ createTableVersionRequest: CreateTableVersionRequest;
+ delimiter?: string;
+}
+
+export interface DeclareTableOperationRequest {
+ id: string;
+ declareTableRequest: DeclareTableRequest;
+ delimiter?: string;
+}
+
+export interface DeleteTableTagOperationRequest {
+ id: string;
+ deleteTableTagRequest: DeleteTableTagRequest;
+ delimiter?: string;
+}
+
+export interface DeregisterTableOperationRequest {
+ id: string;
+ deregisterTableRequest: DeregisterTableRequest;
+ delimiter?: string;
+}
+
+export interface DescribeNamespaceOperationRequest {
+ id: string;
+ describeNamespaceRequest: DescribeNamespaceRequest;
+ delimiter?: string;
+}
+
+export interface DescribeTableOperationRequest {
+ id: string;
+ describeTableRequest: DescribeTableRequest;
+ delimiter?: string;
+ withTableUri?: boolean;
+ loadDetailedMetadata?: boolean;
+}
+
+export interface DescribeTableIndexStatsOperationRequest {
+ id: string;
+ indexName: string;
+ describeTableIndexStatsRequest: DescribeTableIndexStatsRequest;
+ delimiter?: string;
+}
+
+export interface DescribeTableVersionOperationRequest {
+ id: string;
+ describeTableVersionRequest: DescribeTableVersionRequest;
+ delimiter?: string;
+}
+
+export interface DescribeTransactionOperationRequest {
+ id: string;
+ describeTransactionRequest: DescribeTransactionRequest;
+ delimiter?: string;
+}
+
+export interface DropNamespaceOperationRequest {
+ id: string;
+ dropNamespaceRequest: DropNamespaceRequest;
+ delimiter?: string;
+}
+
+export interface DropTableRequest {
+ id: string;
+ delimiter?: string;
+}
+
+export interface DropTableIndexRequest {
+ id: string;
+ indexName: string;
+ delimiter?: string;
+}
+
+export interface GetTableStatsOperationRequest {
+ id: string;
+ getTableStatsRequest: GetTableStatsRequest;
+ delimiter?: string;
+}
+
+export interface GetTableTagVersionOperationRequest {
+ id: string;
+ getTableTagVersionRequest: GetTableTagVersionRequest;
+ delimiter?: string;
+}
+
+export interface ListNamespacesRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface ListTableIndicesOperationRequest {
+ id: string;
+ listTableIndicesRequest: ListTableIndicesRequest;
+ delimiter?: string;
+}
+
+export interface ListTableTagsRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface ListTableVersionsRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+ descending?: boolean;
+}
+
+export interface ListTablesRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface NamespaceExistsOperationRequest {
+ id: string;
+ namespaceExistsRequest: NamespaceExistsRequest;
+ delimiter?: string;
+}
+
+export interface RegisterTableOperationRequest {
+ id: string;
+ registerTableRequest: RegisterTableRequest;
+ delimiter?: string;
+}
+
+export interface RenameTableOperationRequest {
+ id: string;
+ renameTableRequest: RenameTableRequest;
+ delimiter?: string;
+}
+
+export interface RestoreTableOperationRequest {
+ id: string;
+ restoreTableRequest: RestoreTableRequest;
+ delimiter?: string;
+}
+
+export interface TableExistsOperationRequest {
+ id: string;
+ tableExistsRequest: TableExistsRequest;
+ delimiter?: string;
+}
+
+export interface UpdateTableSchemaMetadataRequest {
+ id: string;
+ requestBody: { [key: string]: string; };
+ delimiter?: string;
+}
+
+export interface UpdateTableTagOperationRequest {
+ id: string;
+ updateTableTagRequest: UpdateTableTagRequest;
+ delimiter?: string;
+}
+
+/**
+ *
+ */
+export class MetadataApi extends runtime.BaseAPI {
+
+ /**
+ * Modify existing columns in table `id`, such as renaming or changing data types.
+ * Modify existing columns
+ */
+ async alterTableAlterColumnsRaw(requestParameters: AlterTableAlterColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTableAlterColumns().'
+ );
+ }
+
+ if (requestParameters['alterTableAlterColumnsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTableAlterColumnsRequest',
+ 'Required parameter "alterTableAlterColumnsRequest" was null or undefined when calling alterTableAlterColumns().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/alter_columns`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTableAlterColumnsRequestToJSON(requestParameters['alterTableAlterColumnsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTableAlterColumnsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Modify existing columns in table `id`, such as renaming or changing data types.
+ * Modify existing columns
+ */
+ async alterTableAlterColumns(requestParameters: AlterTableAlterColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTableAlterColumnsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Remove specified columns from table `id`.
+ * Remove columns from table
+ */
+ async alterTableDropColumnsRaw(requestParameters: AlterTableDropColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTableDropColumns().'
+ );
+ }
+
+ if (requestParameters['alterTableDropColumnsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTableDropColumnsRequest',
+ 'Required parameter "alterTableDropColumnsRequest" was null or undefined when calling alterTableDropColumns().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/drop_columns`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTableDropColumnsRequestToJSON(requestParameters['alterTableDropColumnsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTableDropColumnsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Remove specified columns from table `id`.
+ * Remove columns from table
+ */
+ async alterTableDropColumns(requestParameters: AlterTableDropColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTableDropColumnsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Alter a transaction with a list of actions such as setting status or properties. The server should either succeed and apply all actions, or fail and apply no action.
+ * Alter information of a transaction.
+ */
+ async alterTransactionRaw(requestParameters: AlterTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTransaction().'
+ );
+ }
+
+ if (requestParameters['alterTransactionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTransactionRequest',
+ 'Required parameter "alterTransactionRequest" was null or undefined when calling alterTransaction().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/transaction/{id}/alter`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTransactionRequestToJSON(requestParameters['alterTransactionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTransactionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Alter a transaction with a list of actions such as setting status or properties. The server should either succeed and apply all actions, or fail and apply no action.
+ * Alter information of a transaction.
+ */
+ async alterTransaction(requestParameters: AlterTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTransactionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Atomically create new version entries for multiple tables. This operation is atomic: either all table versions are created successfully, or none are created. If any version creation fails (e.g., due to conflict), the entire batch operation fails. Each entry in the request specifies the table identifier and version details. This supports `put_if_not_exists` semantics for each version entry.
+ * Atomically create versions for multiple tables
+ */
+ async batchCreateTableVersionsRaw(requestParameters: BatchCreateTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['batchCreateTableVersionsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'batchCreateTableVersionsRequest',
+ 'Required parameter "batchCreateTableVersionsRequest" was null or undefined when calling batchCreateTableVersions().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/version/batch-create`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BatchCreateTableVersionsRequestToJSON(requestParameters['batchCreateTableVersionsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BatchCreateTableVersionsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Atomically create new version entries for multiple tables. This operation is atomic: either all table versions are created successfully, or none are created. If any version creation fails (e.g., due to conflict), the entire batch operation fails. Each entry in the request specifies the table identifier and version details. This supports `put_if_not_exists` semantics for each version entry.
+ * Atomically create versions for multiple tables
+ */
+ async batchCreateTableVersions(requestParameters: BatchCreateTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.batchCreateTableVersionsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete version metadata records for table `id`. This operation deletes version tracking records, NOT the actual table data. It supports deleting ranges of versions for efficient bulk cleanup. Special range values: - `start_version: 0` with `end_version: -1` means delete ALL version records
+ * Delete table version records
+ */
+ async batchDeleteTableVersionsRaw(requestParameters: BatchDeleteTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling batchDeleteTableVersions().'
+ );
+ }
+
+ if (requestParameters['batchDeleteTableVersionsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'batchDeleteTableVersionsRequest',
+ 'Required parameter "batchDeleteTableVersionsRequest" was null or undefined when calling batchDeleteTableVersions().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/delete`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BatchDeleteTableVersionsRequestToJSON(requestParameters['batchDeleteTableVersionsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BatchDeleteTableVersionsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Delete version metadata records for table `id`. This operation deletes version tracking records, NOT the actual table data. It supports deleting ranges of versions for efficient bulk cleanup. Special range values: - `start_version: 0` with `end_version: -1` means delete ALL version records
+ * Delete table version records
+ */
+ async batchDeleteTableVersions(requestParameters: BatchDeleteTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.batchDeleteTableVersionsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create an empty table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files. **Deprecated**: Use `DeclareTable` instead.
+ * Create an empty table
+ * @deprecated
+ */
+ async createEmptyTableRaw(requestParameters: CreateEmptyTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createEmptyTable().'
+ );
+ }
+
+ if (requestParameters['createEmptyTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createEmptyTableRequest',
+ 'Required parameter "createEmptyTableRequest" was null or undefined when calling createEmptyTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create-empty`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateEmptyTableRequestToJSON(requestParameters['createEmptyTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateEmptyTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create an empty table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files. **Deprecated**: Use `DeclareTable` instead.
+ * Create an empty table
+ * @deprecated
+ */
+ async createEmptyTable(requestParameters: CreateEmptyTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createEmptyTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create new namespace `id`. During the creation process, the implementation may modify user-provided `properties`, such as adding additional properties like `created_at` to user-provided properties, omitting any specific property, or performing actions based on any property value.
+ * Create a new namespace
+ */
+ async createNamespaceRaw(requestParameters: CreateNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createNamespace().'
+ );
+ }
+
+ if (requestParameters['createNamespaceRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createNamespaceRequest',
+ 'Required parameter "createNamespaceRequest" was null or undefined when calling createNamespace().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateNamespaceRequestToJSON(requestParameters['createNamespaceRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateNamespaceResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create new namespace `id`. During the creation process, the implementation may modify user-provided `properties`, such as adding additional properties like `created_at` to user-provided properties, omitting any specific property, or performing actions based on any property value.
+ * Create a new namespace
+ */
+ async createNamespace(requestParameters: CreateNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createNamespaceRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create an index on a table column for faster search operations. Supports vector indexes (IVF_FLAT, IVF_HNSW_SQ, IVF_PQ, etc.) and scalar indexes (BTREE, BITMAP, FTS, etc.). Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create an index on a table
+ */
+ async createTableIndexRaw(requestParameters: CreateTableIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableIndex().'
+ );
+ }
+
+ if (requestParameters['createTableIndexRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableIndexRequest',
+ 'Required parameter "createTableIndexRequest" was null or undefined when calling createTableIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create_index`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableIndexRequestToJSON(requestParameters['createTableIndexRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create an index on a table column for faster search operations. Supports vector indexes (IVF_FLAT, IVF_HNSW_SQ, IVF_PQ, etc.) and scalar indexes (BTREE, BITMAP, FTS, etc.). Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create an index on a table
+ */
+ async createTableIndex(requestParameters: CreateTableIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create a scalar index on a table column for faster filtering operations. Supports scalar indexes (BTREE, BITMAP, LABEL_LIST, FTS, etc.). This is an alias for CreateTableIndex specifically for scalar indexes. Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create a scalar index on a table
+ */
+ async createTableScalarIndexRaw(requestParameters: CreateTableScalarIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableScalarIndex().'
+ );
+ }
+
+ if (requestParameters['createTableIndexRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableIndexRequest',
+ 'Required parameter "createTableIndexRequest" was null or undefined when calling createTableScalarIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create_scalar_index`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableIndexRequestToJSON(requestParameters['createTableIndexRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableScalarIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a scalar index on a table column for faster filtering operations. Supports scalar indexes (BTREE, BITMAP, LABEL_LIST, FTS, etc.). This is an alias for CreateTableIndex specifically for scalar indexes. Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create a scalar index on a table
+ */
+ async createTableScalarIndex(requestParameters: CreateTableScalarIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableScalarIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create a new tag for table `id` that points to a specific version.
+ * Create a new tag
+ */
+ async createTableTagRaw(requestParameters: CreateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableTag().'
+ );
+ }
+
+ if (requestParameters['createTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableTagRequest',
+ 'Required parameter "createTableTagRequest" was null or undefined when calling createTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableTagRequestToJSON(requestParameters['createTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a new tag for table `id` that points to a specific version.
+ * Create a new tag
+ */
+ async createTableTag(requestParameters: CreateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create a new version entry for table `id`. This operation supports `put_if_not_exists` semantics. The operation will fail with 409 Conflict if the version already exists.
+ * Create a new table version
+ */
+ async createTableVersionRaw(requestParameters: CreateTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableVersion().'
+ );
+ }
+
+ if (requestParameters['createTableVersionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableVersionRequest',
+ 'Required parameter "createTableVersionRequest" was null or undefined when calling createTableVersion().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableVersionRequestToJSON(requestParameters['createTableVersionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableVersionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a new version entry for table `id`. This operation supports `put_if_not_exists` semantics. The operation will fail with 409 Conflict if the version already exists.
+ * Create a new table version
+ */
+ async createTableVersion(requestParameters: CreateTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableVersionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Declare a table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files.
+ * Declare a table
+ */
+ async declareTableRaw(requestParameters: DeclareTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling declareTable().'
+ );
+ }
+
+ if (requestParameters['declareTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'declareTableRequest',
+ 'Required parameter "declareTableRequest" was null or undefined when calling declareTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/declare`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeclareTableRequestToJSON(requestParameters['declareTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeclareTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Declare a table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files.
+ * Declare a table
+ */
+ async declareTable(requestParameters: DeclareTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.declareTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete an existing tag from table `id`.
+ * Delete a tag
+ */
+ async deleteTableTagRaw(requestParameters: DeleteTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling deleteTableTag().'
+ );
+ }
+
+ if (requestParameters['deleteTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'deleteTableTagRequest',
+ 'Required parameter "deleteTableTagRequest" was null or undefined when calling deleteTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/delete`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeleteTableTagRequestToJSON(requestParameters['deleteTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Delete an existing tag from table `id`.
+ * Delete a tag
+ */
+ async deleteTableTag(requestParameters: DeleteTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.deleteTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Deregister table `id` from its namespace.
+ * Deregister a table
+ */
+ async deregisterTableRaw(requestParameters: DeregisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling deregisterTable().'
+ );
+ }
+
+ if (requestParameters['deregisterTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'deregisterTableRequest',
+ 'Required parameter "deregisterTableRequest" was null or undefined when calling deregisterTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/deregister`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeregisterTableRequestToJSON(requestParameters['deregisterTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeregisterTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Deregister table `id` from its namespace.
+ * Deregister a table
+ */
+ async deregisterTable(requestParameters: DeregisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.deregisterTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Describe the detailed information for namespace `id`.
+ * Describe a namespace
+ */
+ async describeNamespaceRaw(requestParameters: DescribeNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeNamespace().'
+ );
+ }
+
+ if (requestParameters['describeNamespaceRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeNamespaceRequest',
+ 'Required parameter "describeNamespaceRequest" was null or undefined when calling describeNamespace().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeNamespaceRequestToJSON(requestParameters['describeNamespaceRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeNamespaceResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Describe the detailed information for namespace `id`.
+ * Describe a namespace
+ */
+ async describeNamespace(requestParameters: DescribeNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeNamespaceRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Describe the detailed information for table `id`. REST NAMESPACE ONLY REST namespace passes `with_table_uri` and `load_detailed_metadata` as query parameters instead of in the request body.
+ * Describe information of a table
+ */
+ async describeTableRaw(requestParameters: DescribeTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTable().'
+ );
+ }
+
+ if (requestParameters['describeTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTableRequest',
+ 'Required parameter "describeTableRequest" was null or undefined when calling describeTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['withTableUri'] != null) {
+ queryParameters['with_table_uri'] = requestParameters['withTableUri'];
+ }
+
+ if (requestParameters['loadDetailedMetadata'] != null) {
+ queryParameters['load_detailed_metadata'] = requestParameters['loadDetailedMetadata'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTableRequestToJSON(requestParameters['describeTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Describe the detailed information for table `id`. REST NAMESPACE ONLY REST namespace passes `with_table_uri` and `load_detailed_metadata` as query parameters instead of in the request body.
+ * Describe information of a table
+ */
+ async describeTable(requestParameters: DescribeTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get statistics for a specific index on a table. Returns information about the index type, distance type (for vector indices), and row counts.
+ * Get table index statistics
+ */
+ async describeTableIndexStatsRaw(requestParameters: DescribeTableIndexStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ if (requestParameters['indexName'] == null) {
+ throw new runtime.RequiredError(
+ 'indexName',
+ 'Required parameter "indexName" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ if (requestParameters['describeTableIndexStatsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTableIndexStatsRequest',
+ 'Required parameter "describeTableIndexStatsRequest" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/{index_name}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"index_name"}}`, encodeURIComponent(String(requestParameters['indexName']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTableIndexStatsRequestToJSON(requestParameters['describeTableIndexStatsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTableIndexStatsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get statistics for a specific index on a table. Returns information about the index type, distance type (for vector indices), and row counts.
+ * Get table index statistics
+ */
+ async describeTableIndexStats(requestParameters: DescribeTableIndexStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTableIndexStatsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Describe the detailed information for a specific version of table `id`. Returns the manifest path and metadata for the specified version.
+ * Describe a specific table version
+ */
+ async describeTableVersionRaw(requestParameters: DescribeTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTableVersion().'
+ );
+ }
+
+ if (requestParameters['describeTableVersionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTableVersionRequest',
+ 'Required parameter "describeTableVersionRequest" was null or undefined when calling describeTableVersion().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTableVersionRequestToJSON(requestParameters['describeTableVersionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTableVersionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Describe the detailed information for a specific version of table `id`. Returns the manifest path and metadata for the specified version.
+ * Describe a specific table version
+ */
+ async describeTableVersion(requestParameters: DescribeTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTableVersionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Return a detailed information for a given transaction
+ * Describe information about a transaction
+ */
+ async describeTransactionRaw(requestParameters: DescribeTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTransaction().'
+ );
+ }
+
+ if (requestParameters['describeTransactionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTransactionRequest',
+ 'Required parameter "describeTransactionRequest" was null or undefined when calling describeTransaction().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/transaction/{id}/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTransactionRequestToJSON(requestParameters['describeTransactionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTransactionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Return a detailed information for a given transaction
+ * Describe information about a transaction
+ */
+ async describeTransaction(requestParameters: DescribeTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTransactionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Drop namespace `id` from its parent namespace.
+ * Drop a namespace
+ */
+ async dropNamespaceRaw(requestParameters: DropNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling dropNamespace().'
+ );
+ }
+
+ if (requestParameters['dropNamespaceRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'dropNamespaceRequest',
+ 'Required parameter "dropNamespaceRequest" was null or undefined when calling dropNamespace().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/drop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DropNamespaceRequestToJSON(requestParameters['dropNamespaceRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DropNamespaceResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Drop namespace `id` from its parent namespace.
+ * Drop a namespace
+ */
+ async dropNamespace(requestParameters: DropNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.dropNamespaceRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Drop table `id` and delete its data. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableRequest` information is passed in the following way: - `id`: pass through path parameter of the same name
+ * Drop a table
+ */
+ async dropTableRaw(requestParameters: DropTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling dropTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/drop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DropTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Drop table `id` and delete its data. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableRequest` information is passed in the following way: - `id`: pass through path parameter of the same name
+ * Drop a table
+ */
+ async dropTable(requestParameters: DropTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.dropTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Drop the specified index from table `id`. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableIndexRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `index_name`: pass through path parameter of the same name
+ * Drop a specific index
+ */
+ async dropTableIndexRaw(requestParameters: DropTableIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling dropTableIndex().'
+ );
+ }
+
+ if (requestParameters['indexName'] == null) {
+ throw new runtime.RequiredError(
+ 'indexName',
+ 'Required parameter "indexName" was null or undefined when calling dropTableIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/{index_name}/drop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"index_name"}}`, encodeURIComponent(String(requestParameters['indexName']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DropTableIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Drop the specified index from table `id`. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableIndexRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `index_name`: pass through path parameter of the same name
+ * Drop a specific index
+ */
+ async dropTableIndex(requestParameters: DropTableIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.dropTableIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get statistics for table `id`, including row counts, data sizes, and column statistics.
+ * Get table statistics
+ */
+ async getTableStatsRaw(requestParameters: GetTableStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling getTableStats().'
+ );
+ }
+
+ if (requestParameters['getTableStatsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'getTableStatsRequest',
+ 'Required parameter "getTableStatsRequest" was null or undefined when calling getTableStats().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: GetTableStatsRequestToJSON(requestParameters['getTableStatsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTableStatsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get statistics for table `id`, including row counts, data sizes, and column statistics.
+ * Get table statistics
+ */
+ async getTableStats(requestParameters: GetTableStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getTableStatsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get the version number that a specific tag points to for table `id`.
+ * Get version for a specific tag
+ */
+ async getTableTagVersionRaw(requestParameters: GetTableTagVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling getTableTagVersion().'
+ );
+ }
+
+ if (requestParameters['getTableTagVersionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'getTableTagVersionRequest',
+ 'Required parameter "getTableTagVersionRequest" was null or undefined when calling getTableTagVersion().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/version`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: GetTableTagVersionRequestToJSON(requestParameters['getTableTagVersionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTableTagVersionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get the version number that a specific tag points to for table `id`.
+ * Get version for a specific tag
+ */
+ async getTableTagVersion(requestParameters: GetTableTagVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getTableTagVersionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all child namespace names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListNamespacesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List namespaces
+ */
+ async listNamespacesRaw(requestParameters: ListNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listNamespaces().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListNamespacesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all child namespace names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListNamespacesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List namespaces
+ */
+ async listNamespaces(requestParameters: ListNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listNamespacesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all indices created on a table. Returns information about each index including name, columns, status, and UUID.
+ * List indexes on a table
+ */
+ async listTableIndicesRaw(requestParameters: ListTableIndicesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableIndices().'
+ );
+ }
+
+ if (requestParameters['listTableIndicesRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'listTableIndicesRequest',
+ 'Required parameter "listTableIndicesRequest" was null or undefined when calling listTableIndices().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: ListTableIndicesRequestToJSON(requestParameters['listTableIndicesRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableIndicesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all indices created on a table. Returns information about each index including name, columns, status, and UUID.
+ * List indexes on a table
+ */
+ async listTableIndices(requestParameters: ListTableIndicesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableIndicesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all tags that have been created for table `id`. Returns a map of tag names to their corresponding version numbers and metadata. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableTagsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List all tags for a table
+ */
+ async listTableTagsRaw(requestParameters: ListTableTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableTags().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableTagsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all tags that have been created for table `id`. Returns a map of tag names to their corresponding version numbers and metadata. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableTagsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List all tags for a table
+ */
+ async listTableTags(requestParameters: ListTableTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableTagsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all versions (commits) of table `id` with their metadata. Use `descending=true` to guarantee versions are returned in descending order (latest to oldest). Otherwise, the ordering is implementation-defined. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableVersionsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name - `descending`: pass through query parameter of the same name
+ * List all versions of a table
+ */
+ async listTableVersionsRaw(requestParameters: ListTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableVersions().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ if (requestParameters['descending'] != null) {
+ queryParameters['descending'] = requestParameters['descending'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableVersionsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all versions (commits) of table `id` with their metadata. Use `descending=true` to guarantee versions are returned in descending order (latest to oldest). Otherwise, the ordering is implementation-defined. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableVersionsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name - `descending`: pass through query parameter of the same name
+ * List all versions of a table
+ */
+ async listTableVersions(requestParameters: ListTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableVersionsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all child table names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListTablesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List tables in a namespace
+ */
+ async listTablesRaw(requestParameters: ListTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTables().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/table/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTablesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all child table names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListTablesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List tables in a namespace
+ */
+ async listTables(requestParameters: ListTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTablesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Check if namespace `id` exists. This operation must behave exactly like the DescribeNamespace API, except it does not contain a response body.
+ * Check if a namespace exists
+ */
+ async namespaceExistsRaw(requestParameters: NamespaceExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling namespaceExists().'
+ );
+ }
+
+ if (requestParameters['namespaceExistsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'namespaceExistsRequest',
+ 'Required parameter "namespaceExistsRequest" was null or undefined when calling namespaceExists().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/exists`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: NamespaceExistsRequestToJSON(requestParameters['namespaceExistsRequest']),
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Check if namespace `id` exists. This operation must behave exactly like the DescribeNamespace API, except it does not contain a response body.
+ * Check if a namespace exists
+ */
+ async namespaceExists(requestParameters: NamespaceExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.namespaceExistsRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Register an existing table at a given storage location as `id`.
+ * Register a table to a namespace
+ */
+ async registerTableRaw(requestParameters: RegisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling registerTable().'
+ );
+ }
+
+ if (requestParameters['registerTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'registerTableRequest',
+ 'Required parameter "registerTableRequest" was null or undefined when calling registerTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/register`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: RegisterTableRequestToJSON(requestParameters['registerTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RegisterTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Register an existing table at a given storage location as `id`.
+ * Register a table to a namespace
+ */
+ async registerTable(requestParameters: RegisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.registerTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Rename table `id` to a new name.
+ * Rename a table
+ */
+ async renameTableRaw(requestParameters: RenameTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling renameTable().'
+ );
+ }
+
+ if (requestParameters['renameTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'renameTableRequest',
+ 'Required parameter "renameTableRequest" was null or undefined when calling renameTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/rename`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: RenameTableRequestToJSON(requestParameters['renameTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RenameTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Rename table `id` to a new name.
+ * Rename a table
+ */
+ async renameTable(requestParameters: RenameTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.renameTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Restore table `id` to a specific version.
+ * Restore table to a specific version
+ */
+ async restoreTableRaw(requestParameters: RestoreTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling restoreTable().'
+ );
+ }
+
+ if (requestParameters['restoreTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'restoreTableRequest',
+ 'Required parameter "restoreTableRequest" was null or undefined when calling restoreTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/restore`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: RestoreTableRequestToJSON(requestParameters['restoreTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RestoreTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Restore table `id` to a specific version.
+ * Restore table to a specific version
+ */
+ async restoreTable(requestParameters: RestoreTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.restoreTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Check if table `id` exists. This operation should behave exactly like DescribeTable, except it does not contain a response body. For DirectoryNamespace implementation, a table exists if either: - The table has Lance data versions (regular table created with CreateTable) - A `.lance-reserved` file exists in the table directory (declared table created with DeclareTable)
+ * Check if a table exists
+ */
+ async tableExistsRaw(requestParameters: TableExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling tableExists().'
+ );
+ }
+
+ if (requestParameters['tableExistsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'tableExistsRequest',
+ 'Required parameter "tableExistsRequest" was null or undefined when calling tableExists().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/exists`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: TableExistsRequestToJSON(requestParameters['tableExistsRequest']),
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Check if table `id` exists. This operation should behave exactly like DescribeTable, except it does not contain a response body. For DirectoryNamespace implementation, a table exists if either: - The table has Lance data versions (regular table created with CreateTable) - A `.lance-reserved` file exists in the table directory (declared table created with DeclareTable)
+ * Check if a table exists
+ */
+ async tableExists(requestParameters: TableExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.tableExistsRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Replace the schema metadata for table `id` with the provided key-value pairs. REST NAMESPACE ONLY REST namespace uses a direct object (map of string to string) as both request and response body instead of the wrapped `UpdateTableSchemaMetadataRequest` and `UpdateTableSchemaMetadataResponse`.
+ * Update table schema metadata
+ */
+ async updateTableSchemaMetadataRaw(requestParameters: UpdateTableSchemaMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling updateTableSchemaMetadata().'
+ );
+ }
+
+ if (requestParameters['requestBody'] == null) {
+ throw new runtime.RequiredError(
+ 'requestBody',
+ 'Required parameter "requestBody" was null or undefined when calling updateTableSchemaMetadata().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/schema_metadata/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['requestBody'],
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response);
+ }
+
+ /**
+ * Replace the schema metadata for table `id` with the provided key-value pairs. REST NAMESPACE ONLY REST namespace uses a direct object (map of string to string) as both request and response body instead of the wrapped `UpdateTableSchemaMetadataRequest` and `UpdateTableSchemaMetadataResponse`.
+ * Update table schema metadata
+ */
+ async updateTableSchemaMetadata(requestParameters: UpdateTableSchemaMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: string; }> {
+ const response = await this.updateTableSchemaMetadataRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update an existing tag for table `id` to point to a different version.
+ * Update a tag to point to a different version
+ */
+ async updateTableTagRaw(requestParameters: UpdateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling updateTableTag().'
+ );
+ }
+
+ if (requestParameters['updateTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'updateTableTagRequest',
+ 'Required parameter "updateTableTagRequest" was null or undefined when calling updateTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: UpdateTableTagRequestToJSON(requestParameters['updateTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Update an existing tag for table `id` to point to a different version.
+ * Update a tag to point to a different version
+ */
+ async updateTableTag(requestParameters: UpdateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/NamespaceApi.ts b/typescript/lance-namespace-fetch-client/src/apis/NamespaceApi.ts
new file mode 100644
index 000000000..bb347e4fe
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/NamespaceApi.ts
@@ -0,0 +1,486 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ CreateNamespaceRequest,
+ CreateNamespaceResponse,
+ DescribeNamespaceRequest,
+ DescribeNamespaceResponse,
+ DropNamespaceRequest,
+ DropNamespaceResponse,
+ ErrorResponse,
+ ListNamespacesResponse,
+ ListTablesResponse,
+ NamespaceExistsRequest,
+} from '../models/index';
+import {
+ CreateNamespaceRequestFromJSON,
+ CreateNamespaceRequestToJSON,
+ CreateNamespaceResponseFromJSON,
+ CreateNamespaceResponseToJSON,
+ DescribeNamespaceRequestFromJSON,
+ DescribeNamespaceRequestToJSON,
+ DescribeNamespaceResponseFromJSON,
+ DescribeNamespaceResponseToJSON,
+ DropNamespaceRequestFromJSON,
+ DropNamespaceRequestToJSON,
+ DropNamespaceResponseFromJSON,
+ DropNamespaceResponseToJSON,
+ ErrorResponseFromJSON,
+ ErrorResponseToJSON,
+ ListNamespacesResponseFromJSON,
+ ListNamespacesResponseToJSON,
+ ListTablesResponseFromJSON,
+ ListTablesResponseToJSON,
+ NamespaceExistsRequestFromJSON,
+ NamespaceExistsRequestToJSON,
+} from '../models/index';
+
+export interface CreateNamespaceOperationRequest {
+ id: string;
+ createNamespaceRequest: CreateNamespaceRequest;
+ delimiter?: string;
+}
+
+export interface DescribeNamespaceOperationRequest {
+ id: string;
+ describeNamespaceRequest: DescribeNamespaceRequest;
+ delimiter?: string;
+}
+
+export interface DropNamespaceOperationRequest {
+ id: string;
+ dropNamespaceRequest: DropNamespaceRequest;
+ delimiter?: string;
+}
+
+export interface ListNamespacesRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface ListTablesRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface NamespaceExistsOperationRequest {
+ id: string;
+ namespaceExistsRequest: NamespaceExistsRequest;
+ delimiter?: string;
+}
+
+/**
+ *
+ */
+export class NamespaceApi extends runtime.BaseAPI {
+
+ /**
+ * Create new namespace `id`. During the creation process, the implementation may modify user-provided `properties`, such as adding additional properties like `created_at` to user-provided properties, omitting any specific property, or performing actions based on any property value.
+ * Create a new namespace
+ */
+ async createNamespaceRaw(requestParameters: CreateNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createNamespace().'
+ );
+ }
+
+ if (requestParameters['createNamespaceRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createNamespaceRequest',
+ 'Required parameter "createNamespaceRequest" was null or undefined when calling createNamespace().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateNamespaceRequestToJSON(requestParameters['createNamespaceRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateNamespaceResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create new namespace `id`. During the creation process, the implementation may modify user-provided `properties`, such as adding additional properties like `created_at` to user-provided properties, omitting any specific property, or performing actions based on any property value.
+ * Create a new namespace
+ */
+ async createNamespace(requestParameters: CreateNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createNamespaceRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Describe the detailed information for namespace `id`.
+ * Describe a namespace
+ */
+ async describeNamespaceRaw(requestParameters: DescribeNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeNamespace().'
+ );
+ }
+
+ if (requestParameters['describeNamespaceRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeNamespaceRequest',
+ 'Required parameter "describeNamespaceRequest" was null or undefined when calling describeNamespace().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeNamespaceRequestToJSON(requestParameters['describeNamespaceRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeNamespaceResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Describe the detailed information for namespace `id`.
+ * Describe a namespace
+ */
+ async describeNamespace(requestParameters: DescribeNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeNamespaceRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Drop namespace `id` from its parent namespace.
+ * Drop a namespace
+ */
+ async dropNamespaceRaw(requestParameters: DropNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling dropNamespace().'
+ );
+ }
+
+ if (requestParameters['dropNamespaceRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'dropNamespaceRequest',
+ 'Required parameter "dropNamespaceRequest" was null or undefined when calling dropNamespace().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/drop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DropNamespaceRequestToJSON(requestParameters['dropNamespaceRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DropNamespaceResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Drop namespace `id` from its parent namespace.
+ * Drop a namespace
+ */
+ async dropNamespace(requestParameters: DropNamespaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.dropNamespaceRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all child namespace names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListNamespacesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List namespaces
+ */
+ async listNamespacesRaw(requestParameters: ListNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listNamespaces().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListNamespacesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all child namespace names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListNamespacesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List namespaces
+ */
+ async listNamespaces(requestParameters: ListNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listNamespacesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all child table names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListTablesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List tables in a namespace
+ */
+ async listTablesRaw(requestParameters: ListTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTables().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/table/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTablesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all child table names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListTablesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List tables in a namespace
+ */
+ async listTables(requestParameters: ListTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTablesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Check if namespace `id` exists. This operation must behave exactly like the DescribeNamespace API, except it does not contain a response body.
+ * Check if a namespace exists
+ */
+ async namespaceExistsRaw(requestParameters: NamespaceExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling namespaceExists().'
+ );
+ }
+
+ if (requestParameters['namespaceExistsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'namespaceExistsRequest',
+ 'Required parameter "namespaceExistsRequest" was null or undefined when calling namespaceExists().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/exists`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: NamespaceExistsRequestToJSON(requestParameters['namespaceExistsRequest']),
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Check if namespace `id` exists. This operation must behave exactly like the DescribeNamespace API, except it does not contain a response body.
+ * Check if a namespace exists
+ */
+ async namespaceExists(requestParameters: NamespaceExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.namespaceExistsRaw(requestParameters, initOverrides);
+ }
+
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/TableApi.ts b/typescript/lance-namespace-fetch-client/src/apis/TableApi.ts
new file mode 100644
index 000000000..57bbe8f0d
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/TableApi.ts
@@ -0,0 +1,3155 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AlterTableAddColumnsRequest,
+ AlterTableAddColumnsResponse,
+ AlterTableAlterColumnsRequest,
+ AlterTableAlterColumnsResponse,
+ AlterTableDropColumnsRequest,
+ AlterTableDropColumnsResponse,
+ AnalyzeTableQueryPlanRequest,
+ BatchCreateTableVersionsRequest,
+ BatchCreateTableVersionsResponse,
+ BatchDeleteTableVersionsRequest,
+ BatchDeleteTableVersionsResponse,
+ CountTableRowsRequest,
+ CreateEmptyTableRequest,
+ CreateEmptyTableResponse,
+ CreateTableIndexRequest,
+ CreateTableIndexResponse,
+ CreateTableResponse,
+ CreateTableScalarIndexResponse,
+ CreateTableTagRequest,
+ CreateTableTagResponse,
+ CreateTableVersionRequest,
+ CreateTableVersionResponse,
+ DeclareTableRequest,
+ DeclareTableResponse,
+ DeleteFromTableRequest,
+ DeleteFromTableResponse,
+ DeleteTableTagRequest,
+ DeleteTableTagResponse,
+ DeregisterTableRequest,
+ DeregisterTableResponse,
+ DescribeTableIndexStatsRequest,
+ DescribeTableIndexStatsResponse,
+ DescribeTableRequest,
+ DescribeTableResponse,
+ DescribeTableVersionRequest,
+ DescribeTableVersionResponse,
+ DropTableIndexResponse,
+ DropTableResponse,
+ ErrorResponse,
+ ExplainTableQueryPlanRequest,
+ GetTableStatsRequest,
+ GetTableStatsResponse,
+ GetTableTagVersionRequest,
+ GetTableTagVersionResponse,
+ InsertIntoTableResponse,
+ ListTableIndicesRequest,
+ ListTableIndicesResponse,
+ ListTableTagsResponse,
+ ListTableVersionsResponse,
+ ListTablesResponse,
+ MergeInsertIntoTableResponse,
+ QueryTableRequest,
+ RegisterTableRequest,
+ RegisterTableResponse,
+ RenameTableRequest,
+ RenameTableResponse,
+ RestoreTableRequest,
+ RestoreTableResponse,
+ TableExistsRequest,
+ UpdateTableRequest,
+ UpdateTableResponse,
+ UpdateTableTagRequest,
+ UpdateTableTagResponse,
+} from '../models/index';
+import {
+ AlterTableAddColumnsRequestFromJSON,
+ AlterTableAddColumnsRequestToJSON,
+ AlterTableAddColumnsResponseFromJSON,
+ AlterTableAddColumnsResponseToJSON,
+ AlterTableAlterColumnsRequestFromJSON,
+ AlterTableAlterColumnsRequestToJSON,
+ AlterTableAlterColumnsResponseFromJSON,
+ AlterTableAlterColumnsResponseToJSON,
+ AlterTableDropColumnsRequestFromJSON,
+ AlterTableDropColumnsRequestToJSON,
+ AlterTableDropColumnsResponseFromJSON,
+ AlterTableDropColumnsResponseToJSON,
+ AnalyzeTableQueryPlanRequestFromJSON,
+ AnalyzeTableQueryPlanRequestToJSON,
+ BatchCreateTableVersionsRequestFromJSON,
+ BatchCreateTableVersionsRequestToJSON,
+ BatchCreateTableVersionsResponseFromJSON,
+ BatchCreateTableVersionsResponseToJSON,
+ BatchDeleteTableVersionsRequestFromJSON,
+ BatchDeleteTableVersionsRequestToJSON,
+ BatchDeleteTableVersionsResponseFromJSON,
+ BatchDeleteTableVersionsResponseToJSON,
+ CountTableRowsRequestFromJSON,
+ CountTableRowsRequestToJSON,
+ CreateEmptyTableRequestFromJSON,
+ CreateEmptyTableRequestToJSON,
+ CreateEmptyTableResponseFromJSON,
+ CreateEmptyTableResponseToJSON,
+ CreateTableIndexRequestFromJSON,
+ CreateTableIndexRequestToJSON,
+ CreateTableIndexResponseFromJSON,
+ CreateTableIndexResponseToJSON,
+ CreateTableResponseFromJSON,
+ CreateTableResponseToJSON,
+ CreateTableScalarIndexResponseFromJSON,
+ CreateTableScalarIndexResponseToJSON,
+ CreateTableTagRequestFromJSON,
+ CreateTableTagRequestToJSON,
+ CreateTableTagResponseFromJSON,
+ CreateTableTagResponseToJSON,
+ CreateTableVersionRequestFromJSON,
+ CreateTableVersionRequestToJSON,
+ CreateTableVersionResponseFromJSON,
+ CreateTableVersionResponseToJSON,
+ DeclareTableRequestFromJSON,
+ DeclareTableRequestToJSON,
+ DeclareTableResponseFromJSON,
+ DeclareTableResponseToJSON,
+ DeleteFromTableRequestFromJSON,
+ DeleteFromTableRequestToJSON,
+ DeleteFromTableResponseFromJSON,
+ DeleteFromTableResponseToJSON,
+ DeleteTableTagRequestFromJSON,
+ DeleteTableTagRequestToJSON,
+ DeleteTableTagResponseFromJSON,
+ DeleteTableTagResponseToJSON,
+ DeregisterTableRequestFromJSON,
+ DeregisterTableRequestToJSON,
+ DeregisterTableResponseFromJSON,
+ DeregisterTableResponseToJSON,
+ DescribeTableIndexStatsRequestFromJSON,
+ DescribeTableIndexStatsRequestToJSON,
+ DescribeTableIndexStatsResponseFromJSON,
+ DescribeTableIndexStatsResponseToJSON,
+ DescribeTableRequestFromJSON,
+ DescribeTableRequestToJSON,
+ DescribeTableResponseFromJSON,
+ DescribeTableResponseToJSON,
+ DescribeTableVersionRequestFromJSON,
+ DescribeTableVersionRequestToJSON,
+ DescribeTableVersionResponseFromJSON,
+ DescribeTableVersionResponseToJSON,
+ DropTableIndexResponseFromJSON,
+ DropTableIndexResponseToJSON,
+ DropTableResponseFromJSON,
+ DropTableResponseToJSON,
+ ErrorResponseFromJSON,
+ ErrorResponseToJSON,
+ ExplainTableQueryPlanRequestFromJSON,
+ ExplainTableQueryPlanRequestToJSON,
+ GetTableStatsRequestFromJSON,
+ GetTableStatsRequestToJSON,
+ GetTableStatsResponseFromJSON,
+ GetTableStatsResponseToJSON,
+ GetTableTagVersionRequestFromJSON,
+ GetTableTagVersionRequestToJSON,
+ GetTableTagVersionResponseFromJSON,
+ GetTableTagVersionResponseToJSON,
+ InsertIntoTableResponseFromJSON,
+ InsertIntoTableResponseToJSON,
+ ListTableIndicesRequestFromJSON,
+ ListTableIndicesRequestToJSON,
+ ListTableIndicesResponseFromJSON,
+ ListTableIndicesResponseToJSON,
+ ListTableTagsResponseFromJSON,
+ ListTableTagsResponseToJSON,
+ ListTableVersionsResponseFromJSON,
+ ListTableVersionsResponseToJSON,
+ ListTablesResponseFromJSON,
+ ListTablesResponseToJSON,
+ MergeInsertIntoTableResponseFromJSON,
+ MergeInsertIntoTableResponseToJSON,
+ QueryTableRequestFromJSON,
+ QueryTableRequestToJSON,
+ RegisterTableRequestFromJSON,
+ RegisterTableRequestToJSON,
+ RegisterTableResponseFromJSON,
+ RegisterTableResponseToJSON,
+ RenameTableRequestFromJSON,
+ RenameTableRequestToJSON,
+ RenameTableResponseFromJSON,
+ RenameTableResponseToJSON,
+ RestoreTableRequestFromJSON,
+ RestoreTableRequestToJSON,
+ RestoreTableResponseFromJSON,
+ RestoreTableResponseToJSON,
+ TableExistsRequestFromJSON,
+ TableExistsRequestToJSON,
+ UpdateTableRequestFromJSON,
+ UpdateTableRequestToJSON,
+ UpdateTableResponseFromJSON,
+ UpdateTableResponseToJSON,
+ UpdateTableTagRequestFromJSON,
+ UpdateTableTagRequestToJSON,
+ UpdateTableTagResponseFromJSON,
+ UpdateTableTagResponseToJSON,
+} from '../models/index';
+
+export interface AlterTableAddColumnsOperationRequest {
+ id: string;
+ alterTableAddColumnsRequest: AlterTableAddColumnsRequest;
+ delimiter?: string;
+}
+
+export interface AlterTableAlterColumnsOperationRequest {
+ id: string;
+ alterTableAlterColumnsRequest: AlterTableAlterColumnsRequest;
+ delimiter?: string;
+}
+
+export interface AlterTableDropColumnsOperationRequest {
+ id: string;
+ alterTableDropColumnsRequest: AlterTableDropColumnsRequest;
+ delimiter?: string;
+}
+
+export interface AnalyzeTableQueryPlanOperationRequest {
+ id: string;
+ analyzeTableQueryPlanRequest: AnalyzeTableQueryPlanRequest;
+ delimiter?: string;
+}
+
+export interface BatchCreateTableVersionsOperationRequest {
+ batchCreateTableVersionsRequest: BatchCreateTableVersionsRequest;
+ delimiter?: string;
+}
+
+export interface BatchDeleteTableVersionsOperationRequest {
+ id: string;
+ batchDeleteTableVersionsRequest: BatchDeleteTableVersionsRequest;
+ delimiter?: string;
+}
+
+export interface CountTableRowsOperationRequest {
+ id: string;
+ countTableRowsRequest: CountTableRowsRequest;
+ delimiter?: string;
+}
+
+export interface CreateEmptyTableOperationRequest {
+ id: string;
+ createEmptyTableRequest: CreateEmptyTableRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableRequest {
+ id: string;
+ body: Blob;
+ delimiter?: string;
+ mode?: string;
+}
+
+export interface CreateTableIndexOperationRequest {
+ id: string;
+ createTableIndexRequest: CreateTableIndexRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableScalarIndexRequest {
+ id: string;
+ createTableIndexRequest: CreateTableIndexRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableTagOperationRequest {
+ id: string;
+ createTableTagRequest: CreateTableTagRequest;
+ delimiter?: string;
+}
+
+export interface CreateTableVersionOperationRequest {
+ id: string;
+ createTableVersionRequest: CreateTableVersionRequest;
+ delimiter?: string;
+}
+
+export interface DeclareTableOperationRequest {
+ id: string;
+ declareTableRequest: DeclareTableRequest;
+ delimiter?: string;
+}
+
+export interface DeleteFromTableOperationRequest {
+ id: string;
+ deleteFromTableRequest: DeleteFromTableRequest;
+ delimiter?: string;
+}
+
+export interface DeleteTableTagOperationRequest {
+ id: string;
+ deleteTableTagRequest: DeleteTableTagRequest;
+ delimiter?: string;
+}
+
+export interface DeregisterTableOperationRequest {
+ id: string;
+ deregisterTableRequest: DeregisterTableRequest;
+ delimiter?: string;
+}
+
+export interface DescribeTableOperationRequest {
+ id: string;
+ describeTableRequest: DescribeTableRequest;
+ delimiter?: string;
+ withTableUri?: boolean;
+ loadDetailedMetadata?: boolean;
+}
+
+export interface DescribeTableIndexStatsOperationRequest {
+ id: string;
+ indexName: string;
+ describeTableIndexStatsRequest: DescribeTableIndexStatsRequest;
+ delimiter?: string;
+}
+
+export interface DescribeTableVersionOperationRequest {
+ id: string;
+ describeTableVersionRequest: DescribeTableVersionRequest;
+ delimiter?: string;
+}
+
+export interface DropTableRequest {
+ id: string;
+ delimiter?: string;
+}
+
+export interface DropTableIndexRequest {
+ id: string;
+ indexName: string;
+ delimiter?: string;
+}
+
+export interface ExplainTableQueryPlanOperationRequest {
+ id: string;
+ explainTableQueryPlanRequest: ExplainTableQueryPlanRequest;
+ delimiter?: string;
+}
+
+export interface GetTableStatsOperationRequest {
+ id: string;
+ getTableStatsRequest: GetTableStatsRequest;
+ delimiter?: string;
+}
+
+export interface GetTableTagVersionOperationRequest {
+ id: string;
+ getTableTagVersionRequest: GetTableTagVersionRequest;
+ delimiter?: string;
+}
+
+export interface InsertIntoTableRequest {
+ id: string;
+ body: Blob;
+ delimiter?: string;
+ mode?: string;
+}
+
+export interface ListAllTablesRequest {
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface ListTableIndicesOperationRequest {
+ id: string;
+ listTableIndicesRequest: ListTableIndicesRequest;
+ delimiter?: string;
+}
+
+export interface ListTableTagsRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface ListTableVersionsRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+ descending?: boolean;
+}
+
+export interface ListTablesRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface MergeInsertIntoTableRequest {
+ id: string;
+ on: string;
+ body: Blob;
+ delimiter?: string;
+ whenMatchedUpdateAll?: boolean;
+ whenMatchedUpdateAllFilt?: string;
+ whenNotMatchedInsertAll?: boolean;
+ whenNotMatchedBySourceDelete?: boolean;
+ whenNotMatchedBySourceDeleteFilt?: string;
+ timeout?: string;
+ useIndex?: boolean;
+}
+
+export interface QueryTableOperationRequest {
+ id: string;
+ queryTableRequest: QueryTableRequest;
+ delimiter?: string;
+}
+
+export interface RegisterTableOperationRequest {
+ id: string;
+ registerTableRequest: RegisterTableRequest;
+ delimiter?: string;
+}
+
+export interface RenameTableOperationRequest {
+ id: string;
+ renameTableRequest: RenameTableRequest;
+ delimiter?: string;
+}
+
+export interface RestoreTableOperationRequest {
+ id: string;
+ restoreTableRequest: RestoreTableRequest;
+ delimiter?: string;
+}
+
+export interface TableExistsOperationRequest {
+ id: string;
+ tableExistsRequest: TableExistsRequest;
+ delimiter?: string;
+}
+
+export interface UpdateTableOperationRequest {
+ id: string;
+ updateTableRequest: UpdateTableRequest;
+ delimiter?: string;
+}
+
+export interface UpdateTableSchemaMetadataRequest {
+ id: string;
+ requestBody: { [key: string]: string; };
+ delimiter?: string;
+}
+
+export interface UpdateTableTagOperationRequest {
+ id: string;
+ updateTableTagRequest: UpdateTableTagRequest;
+ delimiter?: string;
+}
+
+/**
+ *
+ */
+export class TableApi extends runtime.BaseAPI {
+
+ /**
+ * Add new columns to table `id` using SQL expressions or default values.
+ * Add new columns to table schema
+ */
+ async alterTableAddColumnsRaw(requestParameters: AlterTableAddColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTableAddColumns().'
+ );
+ }
+
+ if (requestParameters['alterTableAddColumnsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTableAddColumnsRequest',
+ 'Required parameter "alterTableAddColumnsRequest" was null or undefined when calling alterTableAddColumns().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/add_columns`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTableAddColumnsRequestToJSON(requestParameters['alterTableAddColumnsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTableAddColumnsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Add new columns to table `id` using SQL expressions or default values.
+ * Add new columns to table schema
+ */
+ async alterTableAddColumns(requestParameters: AlterTableAddColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTableAddColumnsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Modify existing columns in table `id`, such as renaming or changing data types.
+ * Modify existing columns
+ */
+ async alterTableAlterColumnsRaw(requestParameters: AlterTableAlterColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTableAlterColumns().'
+ );
+ }
+
+ if (requestParameters['alterTableAlterColumnsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTableAlterColumnsRequest',
+ 'Required parameter "alterTableAlterColumnsRequest" was null or undefined when calling alterTableAlterColumns().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/alter_columns`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTableAlterColumnsRequestToJSON(requestParameters['alterTableAlterColumnsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTableAlterColumnsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Modify existing columns in table `id`, such as renaming or changing data types.
+ * Modify existing columns
+ */
+ async alterTableAlterColumns(requestParameters: AlterTableAlterColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTableAlterColumnsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Remove specified columns from table `id`.
+ * Remove columns from table
+ */
+ async alterTableDropColumnsRaw(requestParameters: AlterTableDropColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTableDropColumns().'
+ );
+ }
+
+ if (requestParameters['alterTableDropColumnsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTableDropColumnsRequest',
+ 'Required parameter "alterTableDropColumnsRequest" was null or undefined when calling alterTableDropColumns().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/drop_columns`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTableDropColumnsRequestToJSON(requestParameters['alterTableDropColumnsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTableDropColumnsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Remove specified columns from table `id`.
+ * Remove columns from table
+ */
+ async alterTableDropColumns(requestParameters: AlterTableDropColumnsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTableDropColumnsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Analyze the query execution plan for a query against table `id`. Returns detailed statistics and analysis of the query execution plan. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `AnalyzeTableQueryPlanResponse` JSON object.
+ * Analyze query execution plan
+ */
+ async analyzeTableQueryPlanRaw(requestParameters: AnalyzeTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling analyzeTableQueryPlan().'
+ );
+ }
+
+ if (requestParameters['analyzeTableQueryPlanRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'analyzeTableQueryPlanRequest',
+ 'Required parameter "analyzeTableQueryPlanRequest" was null or undefined when calling analyzeTableQueryPlan().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/analyze_plan`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AnalyzeTableQueryPlanRequestToJSON(requestParameters['analyzeTableQueryPlanRequest']),
+ }, initOverrides);
+
+ if (this.isJsonMime(response.headers.get('content-type'))) {
+ return new runtime.JSONApiResponse(response);
+ } else {
+ return new runtime.TextApiResponse(response) as any;
+ }
+ }
+
+ /**
+ * Analyze the query execution plan for a query against table `id`. Returns detailed statistics and analysis of the query execution plan. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `AnalyzeTableQueryPlanResponse` JSON object.
+ * Analyze query execution plan
+ */
+ async analyzeTableQueryPlan(requestParameters: AnalyzeTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.analyzeTableQueryPlanRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Atomically create new version entries for multiple tables. This operation is atomic: either all table versions are created successfully, or none are created. If any version creation fails (e.g., due to conflict), the entire batch operation fails. Each entry in the request specifies the table identifier and version details. This supports `put_if_not_exists` semantics for each version entry.
+ * Atomically create versions for multiple tables
+ */
+ async batchCreateTableVersionsRaw(requestParameters: BatchCreateTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['batchCreateTableVersionsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'batchCreateTableVersionsRequest',
+ 'Required parameter "batchCreateTableVersionsRequest" was null or undefined when calling batchCreateTableVersions().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/version/batch-create`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BatchCreateTableVersionsRequestToJSON(requestParameters['batchCreateTableVersionsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BatchCreateTableVersionsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Atomically create new version entries for multiple tables. This operation is atomic: either all table versions are created successfully, or none are created. If any version creation fails (e.g., due to conflict), the entire batch operation fails. Each entry in the request specifies the table identifier and version details. This supports `put_if_not_exists` semantics for each version entry.
+ * Atomically create versions for multiple tables
+ */
+ async batchCreateTableVersions(requestParameters: BatchCreateTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.batchCreateTableVersionsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete version metadata records for table `id`. This operation deletes version tracking records, NOT the actual table data. It supports deleting ranges of versions for efficient bulk cleanup. Special range values: - `start_version: 0` with `end_version: -1` means delete ALL version records
+ * Delete table version records
+ */
+ async batchDeleteTableVersionsRaw(requestParameters: BatchDeleteTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling batchDeleteTableVersions().'
+ );
+ }
+
+ if (requestParameters['batchDeleteTableVersionsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'batchDeleteTableVersionsRequest',
+ 'Required parameter "batchDeleteTableVersionsRequest" was null or undefined when calling batchDeleteTableVersions().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/delete`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BatchDeleteTableVersionsRequestToJSON(requestParameters['batchDeleteTableVersionsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BatchDeleteTableVersionsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Delete version metadata records for table `id`. This operation deletes version tracking records, NOT the actual table data. It supports deleting ranges of versions for efficient bulk cleanup. Special range values: - `start_version: 0` with `end_version: -1` means delete ALL version records
+ * Delete table version records
+ */
+ async batchDeleteTableVersions(requestParameters: BatchDeleteTableVersionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.batchDeleteTableVersionsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Count the number of rows in table `id` REST NAMESPACE ONLY REST namespace returns the response as a plain integer instead of the `CountTableRowsResponse` JSON object.
+ * Count rows in a table
+ */
+ async countTableRowsRaw(requestParameters: CountTableRowsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling countTableRows().'
+ );
+ }
+
+ if (requestParameters['countTableRowsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'countTableRowsRequest',
+ 'Required parameter "countTableRowsRequest" was null or undefined when calling countTableRows().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/count_rows`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CountTableRowsRequestToJSON(requestParameters['countTableRowsRequest']),
+ }, initOverrides);
+
+ if (this.isJsonMime(response.headers.get('content-type'))) {
+ return new runtime.JSONApiResponse(response);
+ } else {
+ return new runtime.TextApiResponse(response) as any;
+ }
+ }
+
+ /**
+ * Count the number of rows in table `id` REST NAMESPACE ONLY REST namespace returns the response as a plain integer instead of the `CountTableRowsResponse` JSON object.
+ * Count rows in a table
+ */
+ async countTableRows(requestParameters: CountTableRowsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.countTableRowsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create an empty table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files. **Deprecated**: Use `DeclareTable` instead.
+ * Create an empty table
+ * @deprecated
+ */
+ async createEmptyTableRaw(requestParameters: CreateEmptyTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createEmptyTable().'
+ );
+ }
+
+ if (requestParameters['createEmptyTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createEmptyTableRequest',
+ 'Required parameter "createEmptyTableRequest" was null or undefined when calling createEmptyTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create-empty`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateEmptyTableRequestToJSON(requestParameters['createEmptyTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateEmptyTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create an empty table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files. **Deprecated**: Use `DeclareTable` instead.
+ * Create an empty table
+ * @deprecated
+ */
+ async createEmptyTable(requestParameters: CreateEmptyTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createEmptyTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create table `id` in the namespace with the given data in Arrow IPC stream. The schema of the Arrow IPC stream is used as the table schema. If the stream is empty, the API creates a new empty table. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `CreateTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Create a table with the given name
+ */
+ async createTableRaw(requestParameters: CreateTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTable().'
+ );
+ }
+
+ if (requestParameters['body'] == null) {
+ throw new runtime.RequiredError(
+ 'body',
+ 'Required parameter "body" was null or undefined when calling createTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['mode'] != null) {
+ queryParameters['mode'] = requestParameters['mode'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/vnd.apache.arrow.stream';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['body'] as any,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create table `id` in the namespace with the given data in Arrow IPC stream. The schema of the Arrow IPC stream is used as the table schema. If the stream is empty, the API creates a new empty table. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `CreateTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Create a table with the given name
+ */
+ async createTable(requestParameters: CreateTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create an index on a table column for faster search operations. Supports vector indexes (IVF_FLAT, IVF_HNSW_SQ, IVF_PQ, etc.) and scalar indexes (BTREE, BITMAP, FTS, etc.). Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create an index on a table
+ */
+ async createTableIndexRaw(requestParameters: CreateTableIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableIndex().'
+ );
+ }
+
+ if (requestParameters['createTableIndexRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableIndexRequest',
+ 'Required parameter "createTableIndexRequest" was null or undefined when calling createTableIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create_index`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableIndexRequestToJSON(requestParameters['createTableIndexRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create an index on a table column for faster search operations. Supports vector indexes (IVF_FLAT, IVF_HNSW_SQ, IVF_PQ, etc.) and scalar indexes (BTREE, BITMAP, FTS, etc.). Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create an index on a table
+ */
+ async createTableIndex(requestParameters: CreateTableIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create a scalar index on a table column for faster filtering operations. Supports scalar indexes (BTREE, BITMAP, LABEL_LIST, FTS, etc.). This is an alias for CreateTableIndex specifically for scalar indexes. Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create a scalar index on a table
+ */
+ async createTableScalarIndexRaw(requestParameters: CreateTableScalarIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableScalarIndex().'
+ );
+ }
+
+ if (requestParameters['createTableIndexRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableIndexRequest',
+ 'Required parameter "createTableIndexRequest" was null or undefined when calling createTableScalarIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/create_scalar_index`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableIndexRequestToJSON(requestParameters['createTableIndexRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableScalarIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a scalar index on a table column for faster filtering operations. Supports scalar indexes (BTREE, BITMAP, LABEL_LIST, FTS, etc.). This is an alias for CreateTableIndex specifically for scalar indexes. Index creation is handled asynchronously. Use the `ListTableIndices` and `DescribeTableIndexStats` operations to monitor index creation progress.
+ * Create a scalar index on a table
+ */
+ async createTableScalarIndex(requestParameters: CreateTableScalarIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableScalarIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create a new tag for table `id` that points to a specific version.
+ * Create a new tag
+ */
+ async createTableTagRaw(requestParameters: CreateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableTag().'
+ );
+ }
+
+ if (requestParameters['createTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableTagRequest',
+ 'Required parameter "createTableTagRequest" was null or undefined when calling createTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableTagRequestToJSON(requestParameters['createTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a new tag for table `id` that points to a specific version.
+ * Create a new tag
+ */
+ async createTableTag(requestParameters: CreateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Create a new version entry for table `id`. This operation supports `put_if_not_exists` semantics. The operation will fail with 409 Conflict if the version already exists.
+ * Create a new table version
+ */
+ async createTableVersionRaw(requestParameters: CreateTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableVersion().'
+ );
+ }
+
+ if (requestParameters['createTableVersionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableVersionRequest',
+ 'Required parameter "createTableVersionRequest" was null or undefined when calling createTableVersion().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableVersionRequestToJSON(requestParameters['createTableVersionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableVersionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a new version entry for table `id`. This operation supports `put_if_not_exists` semantics. The operation will fail with 409 Conflict if the version already exists.
+ * Create a new table version
+ */
+ async createTableVersion(requestParameters: CreateTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableVersionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Declare a table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files.
+ * Declare a table
+ */
+ async declareTableRaw(requestParameters: DeclareTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling declareTable().'
+ );
+ }
+
+ if (requestParameters['declareTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'declareTableRequest',
+ 'Required parameter "declareTableRequest" was null or undefined when calling declareTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/declare`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeclareTableRequestToJSON(requestParameters['declareTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeclareTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Declare a table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control. For DirectoryNamespace implementation, this creates a `.lance-reserved` file in the table directory to mark the table\'s existence without creating actual Lance data files.
+ * Declare a table
+ */
+ async declareTable(requestParameters: DeclareTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.declareTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete rows from table `id`.
+ * Delete rows from a table
+ */
+ async deleteFromTableRaw(requestParameters: DeleteFromTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling deleteFromTable().'
+ );
+ }
+
+ if (requestParameters['deleteFromTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'deleteFromTableRequest',
+ 'Required parameter "deleteFromTableRequest" was null or undefined when calling deleteFromTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/delete`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeleteFromTableRequestToJSON(requestParameters['deleteFromTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteFromTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Delete rows from table `id`.
+ * Delete rows from a table
+ */
+ async deleteFromTable(requestParameters: DeleteFromTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.deleteFromTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete an existing tag from table `id`.
+ * Delete a tag
+ */
+ async deleteTableTagRaw(requestParameters: DeleteTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling deleteTableTag().'
+ );
+ }
+
+ if (requestParameters['deleteTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'deleteTableTagRequest',
+ 'Required parameter "deleteTableTagRequest" was null or undefined when calling deleteTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/delete`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeleteTableTagRequestToJSON(requestParameters['deleteTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Delete an existing tag from table `id`.
+ * Delete a tag
+ */
+ async deleteTableTag(requestParameters: DeleteTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.deleteTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Deregister table `id` from its namespace.
+ * Deregister a table
+ */
+ async deregisterTableRaw(requestParameters: DeregisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling deregisterTable().'
+ );
+ }
+
+ if (requestParameters['deregisterTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'deregisterTableRequest',
+ 'Required parameter "deregisterTableRequest" was null or undefined when calling deregisterTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/deregister`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeregisterTableRequestToJSON(requestParameters['deregisterTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeregisterTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Deregister table `id` from its namespace.
+ * Deregister a table
+ */
+ async deregisterTable(requestParameters: DeregisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.deregisterTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Describe the detailed information for table `id`. REST NAMESPACE ONLY REST namespace passes `with_table_uri` and `load_detailed_metadata` as query parameters instead of in the request body.
+ * Describe information of a table
+ */
+ async describeTableRaw(requestParameters: DescribeTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTable().'
+ );
+ }
+
+ if (requestParameters['describeTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTableRequest',
+ 'Required parameter "describeTableRequest" was null or undefined when calling describeTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['withTableUri'] != null) {
+ queryParameters['with_table_uri'] = requestParameters['withTableUri'];
+ }
+
+ if (requestParameters['loadDetailedMetadata'] != null) {
+ queryParameters['load_detailed_metadata'] = requestParameters['loadDetailedMetadata'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTableRequestToJSON(requestParameters['describeTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Describe the detailed information for table `id`. REST NAMESPACE ONLY REST namespace passes `with_table_uri` and `load_detailed_metadata` as query parameters instead of in the request body.
+ * Describe information of a table
+ */
+ async describeTable(requestParameters: DescribeTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get statistics for a specific index on a table. Returns information about the index type, distance type (for vector indices), and row counts.
+ * Get table index statistics
+ */
+ async describeTableIndexStatsRaw(requestParameters: DescribeTableIndexStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ if (requestParameters['indexName'] == null) {
+ throw new runtime.RequiredError(
+ 'indexName',
+ 'Required parameter "indexName" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ if (requestParameters['describeTableIndexStatsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTableIndexStatsRequest',
+ 'Required parameter "describeTableIndexStatsRequest" was null or undefined when calling describeTableIndexStats().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/{index_name}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"index_name"}}`, encodeURIComponent(String(requestParameters['indexName']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTableIndexStatsRequestToJSON(requestParameters['describeTableIndexStatsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTableIndexStatsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get statistics for a specific index on a table. Returns information about the index type, distance type (for vector indices), and row counts.
+ * Get table index statistics
+ */
+ async describeTableIndexStats(requestParameters: DescribeTableIndexStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTableIndexStatsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Describe the detailed information for a specific version of table `id`. Returns the manifest path and metadata for the specified version.
+ * Describe a specific table version
+ */
+ async describeTableVersionRaw(requestParameters: DescribeTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTableVersion().'
+ );
+ }
+
+ if (requestParameters['describeTableVersionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTableVersionRequest',
+ 'Required parameter "describeTableVersionRequest" was null or undefined when calling describeTableVersion().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTableVersionRequestToJSON(requestParameters['describeTableVersionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTableVersionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Describe the detailed information for a specific version of table `id`. Returns the manifest path and metadata for the specified version.
+ * Describe a specific table version
+ */
+ async describeTableVersion(requestParameters: DescribeTableVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTableVersionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Drop table `id` and delete its data. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableRequest` information is passed in the following way: - `id`: pass through path parameter of the same name
+ * Drop a table
+ */
+ async dropTableRaw(requestParameters: DropTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling dropTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/drop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DropTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Drop table `id` and delete its data. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableRequest` information is passed in the following way: - `id`: pass through path parameter of the same name
+ * Drop a table
+ */
+ async dropTable(requestParameters: DropTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.dropTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Drop the specified index from table `id`. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableIndexRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `index_name`: pass through path parameter of the same name
+ * Drop a specific index
+ */
+ async dropTableIndexRaw(requestParameters: DropTableIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling dropTableIndex().'
+ );
+ }
+
+ if (requestParameters['indexName'] == null) {
+ throw new runtime.RequiredError(
+ 'indexName',
+ 'Required parameter "indexName" was null or undefined when calling dropTableIndex().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/{index_name}/drop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"index_name"}}`, encodeURIComponent(String(requestParameters['indexName']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DropTableIndexResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Drop the specified index from table `id`. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `DropTableIndexRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `index_name`: pass through path parameter of the same name
+ * Drop a specific index
+ */
+ async dropTableIndex(requestParameters: DropTableIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.dropTableIndexRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get the query execution plan for a query against table `id`. Returns a human-readable explanation of how the query will be executed. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `ExplainTableQueryPlanResponse` JSON object.
+ * Get query execution plan explanation
+ */
+ async explainTableQueryPlanRaw(requestParameters: ExplainTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling explainTableQueryPlan().'
+ );
+ }
+
+ if (requestParameters['explainTableQueryPlanRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'explainTableQueryPlanRequest',
+ 'Required parameter "explainTableQueryPlanRequest" was null or undefined when calling explainTableQueryPlan().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/explain_plan`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: ExplainTableQueryPlanRequestToJSON(requestParameters['explainTableQueryPlanRequest']),
+ }, initOverrides);
+
+ if (this.isJsonMime(response.headers.get('content-type'))) {
+ return new runtime.JSONApiResponse(response);
+ } else {
+ return new runtime.TextApiResponse(response) as any;
+ }
+ }
+
+ /**
+ * Get the query execution plan for a query against table `id`. Returns a human-readable explanation of how the query will be executed. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the `ExplainTableQueryPlanResponse` JSON object.
+ * Get query execution plan explanation
+ */
+ async explainTableQueryPlan(requestParameters: ExplainTableQueryPlanOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.explainTableQueryPlanRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get statistics for table `id`, including row counts, data sizes, and column statistics.
+ * Get table statistics
+ */
+ async getTableStatsRaw(requestParameters: GetTableStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling getTableStats().'
+ );
+ }
+
+ if (requestParameters['getTableStatsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'getTableStatsRequest',
+ 'Required parameter "getTableStatsRequest" was null or undefined when calling getTableStats().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: GetTableStatsRequestToJSON(requestParameters['getTableStatsRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTableStatsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get statistics for table `id`, including row counts, data sizes, and column statistics.
+ * Get table statistics
+ */
+ async getTableStats(requestParameters: GetTableStatsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getTableStatsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get the version number that a specific tag points to for table `id`.
+ * Get version for a specific tag
+ */
+ async getTableTagVersionRaw(requestParameters: GetTableTagVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling getTableTagVersion().'
+ );
+ }
+
+ if (requestParameters['getTableTagVersionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'getTableTagVersionRequest',
+ 'Required parameter "getTableTagVersionRequest" was null or undefined when calling getTableTagVersion().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/version`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: GetTableTagVersionRequestToJSON(requestParameters['getTableTagVersionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTableTagVersionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get the version number that a specific tag points to for table `id`.
+ * Get version for a specific tag
+ */
+ async getTableTagVersion(requestParameters: GetTableTagVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getTableTagVersionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Insert new records into table `id`. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `InsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Insert records into a table
+ */
+ async insertIntoTableRaw(requestParameters: InsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling insertIntoTable().'
+ );
+ }
+
+ if (requestParameters['body'] == null) {
+ throw new runtime.RequiredError(
+ 'body',
+ 'Required parameter "body" was null or undefined when calling insertIntoTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['mode'] != null) {
+ queryParameters['mode'] = requestParameters['mode'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/vnd.apache.arrow.stream';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/insert`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['body'] as any,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => InsertIntoTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Insert new records into table `id`. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `InsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `mode`: pass through query parameter of the same name
+ * Insert records into a table
+ */
+ async insertIntoTable(requestParameters: InsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.insertIntoTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all tables across all namespaces. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListAllTablesRequest` information in the following way: - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name - `delimiter`: pass through query parameter of the same name
+ * List all tables
+ */
+ async listAllTablesRaw(requestParameters: ListAllTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTablesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all tables across all namespaces. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListAllTablesRequest` information in the following way: - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name - `delimiter`: pass through query parameter of the same name
+ * List all tables
+ */
+ async listAllTables(requestParameters: ListAllTablesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAllTablesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all indices created on a table. Returns information about each index including name, columns, status, and UUID.
+ * List indexes on a table
+ */
+ async listTableIndicesRaw(requestParameters: ListTableIndicesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableIndices().'
+ );
+ }
+
+ if (requestParameters['listTableIndicesRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'listTableIndicesRequest',
+ 'Required parameter "listTableIndicesRequest" was null or undefined when calling listTableIndices().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/index/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: ListTableIndicesRequestToJSON(requestParameters['listTableIndicesRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableIndicesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all indices created on a table. Returns information about each index including name, columns, status, and UUID.
+ * List indexes on a table
+ */
+ async listTableIndices(requestParameters: ListTableIndicesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableIndicesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all tags that have been created for table `id`. Returns a map of tag names to their corresponding version numbers and metadata. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableTagsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List all tags for a table
+ */
+ async listTableTagsRaw(requestParameters: ListTableTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableTags().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableTagsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all tags that have been created for table `id`. Returns a map of tag names to their corresponding version numbers and metadata. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableTagsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List all tags for a table
+ */
+ async listTableTags(requestParameters: ListTableTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableTagsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all versions (commits) of table `id` with their metadata. Use `descending=true` to guarantee versions are returned in descending order (latest to oldest). Otherwise, the ordering is implementation-defined. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableVersionsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name - `descending`: pass through query parameter of the same name
+ * List all versions of a table
+ */
+ async listTableVersionsRaw(requestParameters: ListTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableVersions().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ if (requestParameters['descending'] != null) {
+ queryParameters['descending'] = requestParameters['descending'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/version/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableVersionsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all versions (commits) of table `id` with their metadata. Use `descending=true` to guarantee versions are returned in descending order (latest to oldest). Otherwise, the ordering is implementation-defined. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableVersionsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name - `descending`: pass through query parameter of the same name
+ * List all versions of a table
+ */
+ async listTableVersions(requestParameters: ListTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableVersionsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all child table names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListTablesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List tables in a namespace
+ */
+ async listTablesRaw(requestParameters: ListTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTables().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/namespace/{id}/table/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTablesResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all child table names of the parent namespace `id`. REST NAMESPACE ONLY REST namespace uses GET to perform this operation without a request body. It passes in the `ListTablesRequest` information in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List tables in a namespace
+ */
+ async listTables(requestParameters: ListTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTablesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Performs a merge insert (upsert) operation on table `id`. This operation updates existing rows based on a matching column and inserts new rows that don\'t match. It returns the number of rows inserted and updated. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `MergeInsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `on`: pass through query parameter of the same name - `when_matched_update_all`: pass through query parameter of the same name - `when_matched_update_all_filt`: pass through query parameter of the same name - `when_not_matched_insert_all`: pass through query parameter of the same name - `when_not_matched_by_source_delete`: pass through query parameter of the same name - `when_not_matched_by_source_delete_filt`: pass through query parameter of the same name
+ * Merge insert (upsert) records into a table
+ */
+ async mergeInsertIntoTableRaw(requestParameters: MergeInsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling mergeInsertIntoTable().'
+ );
+ }
+
+ if (requestParameters['on'] == null) {
+ throw new runtime.RequiredError(
+ 'on',
+ 'Required parameter "on" was null or undefined when calling mergeInsertIntoTable().'
+ );
+ }
+
+ if (requestParameters['body'] == null) {
+ throw new runtime.RequiredError(
+ 'body',
+ 'Required parameter "body" was null or undefined when calling mergeInsertIntoTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['on'] != null) {
+ queryParameters['on'] = requestParameters['on'];
+ }
+
+ if (requestParameters['whenMatchedUpdateAll'] != null) {
+ queryParameters['when_matched_update_all'] = requestParameters['whenMatchedUpdateAll'];
+ }
+
+ if (requestParameters['whenMatchedUpdateAllFilt'] != null) {
+ queryParameters['when_matched_update_all_filt'] = requestParameters['whenMatchedUpdateAllFilt'];
+ }
+
+ if (requestParameters['whenNotMatchedInsertAll'] != null) {
+ queryParameters['when_not_matched_insert_all'] = requestParameters['whenNotMatchedInsertAll'];
+ }
+
+ if (requestParameters['whenNotMatchedBySourceDelete'] != null) {
+ queryParameters['when_not_matched_by_source_delete'] = requestParameters['whenNotMatchedBySourceDelete'];
+ }
+
+ if (requestParameters['whenNotMatchedBySourceDeleteFilt'] != null) {
+ queryParameters['when_not_matched_by_source_delete_filt'] = requestParameters['whenNotMatchedBySourceDeleteFilt'];
+ }
+
+ if (requestParameters['timeout'] != null) {
+ queryParameters['timeout'] = requestParameters['timeout'];
+ }
+
+ if (requestParameters['useIndex'] != null) {
+ queryParameters['use_index'] = requestParameters['useIndex'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/vnd.apache.arrow.stream';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/merge_insert`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['body'] as any,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => MergeInsertIntoTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Performs a merge insert (upsert) operation on table `id`. This operation updates existing rows based on a matching column and inserts new rows that don\'t match. It returns the number of rows inserted and updated. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the `MergeInsertIntoTableRequest` information in the following way: - `id`: pass through path parameter of the same name - `on`: pass through query parameter of the same name - `when_matched_update_all`: pass through query parameter of the same name - `when_matched_update_all_filt`: pass through query parameter of the same name - `when_not_matched_insert_all`: pass through query parameter of the same name - `when_not_matched_by_source_delete`: pass through query parameter of the same name - `when_not_matched_by_source_delete_filt`: pass through query parameter of the same name
+ * Merge insert (upsert) records into a table
+ */
+ async mergeInsertIntoTable(requestParameters: MergeInsertIntoTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.mergeInsertIntoTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Query table `id` with vector search, full text search and optional SQL filtering. Returns results in Arrow IPC file or stream format. REST NAMESPACE ONLY REST namespace returns the response as Arrow IPC file binary data instead of the `QueryTableResponse` JSON object.
+ * Query a table
+ */
+ async queryTableRaw(requestParameters: QueryTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling queryTable().'
+ );
+ }
+
+ if (requestParameters['queryTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'queryTableRequest',
+ 'Required parameter "queryTableRequest" was null or undefined when calling queryTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/query`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: QueryTableRequestToJSON(requestParameters['queryTableRequest']),
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * Query table `id` with vector search, full text search and optional SQL filtering. Returns results in Arrow IPC file or stream format. REST NAMESPACE ONLY REST namespace returns the response as Arrow IPC file binary data instead of the `QueryTableResponse` JSON object.
+ * Query a table
+ */
+ async queryTable(requestParameters: QueryTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.queryTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Register an existing table at a given storage location as `id`.
+ * Register a table to a namespace
+ */
+ async registerTableRaw(requestParameters: RegisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling registerTable().'
+ );
+ }
+
+ if (requestParameters['registerTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'registerTableRequest',
+ 'Required parameter "registerTableRequest" was null or undefined when calling registerTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/register`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: RegisterTableRequestToJSON(requestParameters['registerTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RegisterTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Register an existing table at a given storage location as `id`.
+ * Register a table to a namespace
+ */
+ async registerTable(requestParameters: RegisterTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.registerTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Rename table `id` to a new name.
+ * Rename a table
+ */
+ async renameTableRaw(requestParameters: RenameTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling renameTable().'
+ );
+ }
+
+ if (requestParameters['renameTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'renameTableRequest',
+ 'Required parameter "renameTableRequest" was null or undefined when calling renameTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/rename`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: RenameTableRequestToJSON(requestParameters['renameTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RenameTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Rename table `id` to a new name.
+ * Rename a table
+ */
+ async renameTable(requestParameters: RenameTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.renameTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Restore table `id` to a specific version.
+ * Restore table to a specific version
+ */
+ async restoreTableRaw(requestParameters: RestoreTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling restoreTable().'
+ );
+ }
+
+ if (requestParameters['restoreTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'restoreTableRequest',
+ 'Required parameter "restoreTableRequest" was null or undefined when calling restoreTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/restore`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: RestoreTableRequestToJSON(requestParameters['restoreTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RestoreTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Restore table `id` to a specific version.
+ * Restore table to a specific version
+ */
+ async restoreTable(requestParameters: RestoreTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.restoreTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Check if table `id` exists. This operation should behave exactly like DescribeTable, except it does not contain a response body. For DirectoryNamespace implementation, a table exists if either: - The table has Lance data versions (regular table created with CreateTable) - A `.lance-reserved` file exists in the table directory (declared table created with DeclareTable)
+ * Check if a table exists
+ */
+ async tableExistsRaw(requestParameters: TableExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling tableExists().'
+ );
+ }
+
+ if (requestParameters['tableExistsRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'tableExistsRequest',
+ 'Required parameter "tableExistsRequest" was null or undefined when calling tableExists().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/exists`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: TableExistsRequestToJSON(requestParameters['tableExistsRequest']),
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Check if table `id` exists. This operation should behave exactly like DescribeTable, except it does not contain a response body. For DirectoryNamespace implementation, a table exists if either: - The table has Lance data versions (regular table created with CreateTable) - A `.lance-reserved` file exists in the table directory (declared table created with DeclareTable)
+ * Check if a table exists
+ */
+ async tableExists(requestParameters: TableExistsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.tableExistsRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Update existing rows in table `id`.
+ * Update rows in a table
+ */
+ async updateTableRaw(requestParameters: UpdateTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling updateTable().'
+ );
+ }
+
+ if (requestParameters['updateTableRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'updateTableRequest',
+ 'Required parameter "updateTableRequest" was null or undefined when calling updateTable().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: UpdateTableRequestToJSON(requestParameters['updateTableRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateTableResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Update existing rows in table `id`.
+ * Update rows in a table
+ */
+ async updateTable(requestParameters: UpdateTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateTableRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Replace the schema metadata for table `id` with the provided key-value pairs. REST NAMESPACE ONLY REST namespace uses a direct object (map of string to string) as both request and response body instead of the wrapped `UpdateTableSchemaMetadataRequest` and `UpdateTableSchemaMetadataResponse`.
+ * Update table schema metadata
+ */
+ async updateTableSchemaMetadataRaw(requestParameters: UpdateTableSchemaMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling updateTableSchemaMetadata().'
+ );
+ }
+
+ if (requestParameters['requestBody'] == null) {
+ throw new runtime.RequiredError(
+ 'requestBody',
+ 'Required parameter "requestBody" was null or undefined when calling updateTableSchemaMetadata().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/schema_metadata/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters['requestBody'],
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response);
+ }
+
+ /**
+ * Replace the schema metadata for table `id` with the provided key-value pairs. REST NAMESPACE ONLY REST namespace uses a direct object (map of string to string) as both request and response body instead of the wrapped `UpdateTableSchemaMetadataRequest` and `UpdateTableSchemaMetadataResponse`.
+ * Update table schema metadata
+ */
+ async updateTableSchemaMetadata(requestParameters: UpdateTableSchemaMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: string; }> {
+ const response = await this.updateTableSchemaMetadataRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update an existing tag for table `id` to point to a different version.
+ * Update a tag to point to a different version
+ */
+ async updateTableTagRaw(requestParameters: UpdateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling updateTableTag().'
+ );
+ }
+
+ if (requestParameters['updateTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'updateTableTagRequest',
+ 'Required parameter "updateTableTagRequest" was null or undefined when calling updateTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: UpdateTableTagRequestToJSON(requestParameters['updateTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Update an existing tag for table `id` to point to a different version.
+ * Update a tag to point to a different version
+ */
+ async updateTableTag(requestParameters: UpdateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/TagApi.ts b/typescript/lance-namespace-fetch-client/src/apis/TagApi.ts
new file mode 100644
index 000000000..95cde89eb
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/TagApi.ts
@@ -0,0 +1,416 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ CreateTableTagRequest,
+ CreateTableTagResponse,
+ DeleteTableTagRequest,
+ DeleteTableTagResponse,
+ ErrorResponse,
+ GetTableTagVersionRequest,
+ GetTableTagVersionResponse,
+ ListTableTagsResponse,
+ UpdateTableTagRequest,
+ UpdateTableTagResponse,
+} from '../models/index';
+import {
+ CreateTableTagRequestFromJSON,
+ CreateTableTagRequestToJSON,
+ CreateTableTagResponseFromJSON,
+ CreateTableTagResponseToJSON,
+ DeleteTableTagRequestFromJSON,
+ DeleteTableTagRequestToJSON,
+ DeleteTableTagResponseFromJSON,
+ DeleteTableTagResponseToJSON,
+ ErrorResponseFromJSON,
+ ErrorResponseToJSON,
+ GetTableTagVersionRequestFromJSON,
+ GetTableTagVersionRequestToJSON,
+ GetTableTagVersionResponseFromJSON,
+ GetTableTagVersionResponseToJSON,
+ ListTableTagsResponseFromJSON,
+ ListTableTagsResponseToJSON,
+ UpdateTableTagRequestFromJSON,
+ UpdateTableTagRequestToJSON,
+ UpdateTableTagResponseFromJSON,
+ UpdateTableTagResponseToJSON,
+} from '../models/index';
+
+export interface CreateTableTagOperationRequest {
+ id: string;
+ createTableTagRequest: CreateTableTagRequest;
+ delimiter?: string;
+}
+
+export interface DeleteTableTagOperationRequest {
+ id: string;
+ deleteTableTagRequest: DeleteTableTagRequest;
+ delimiter?: string;
+}
+
+export interface GetTableTagVersionOperationRequest {
+ id: string;
+ getTableTagVersionRequest: GetTableTagVersionRequest;
+ delimiter?: string;
+}
+
+export interface ListTableTagsRequest {
+ id: string;
+ delimiter?: string;
+ pageToken?: string;
+ limit?: number;
+}
+
+export interface UpdateTableTagOperationRequest {
+ id: string;
+ updateTableTagRequest: UpdateTableTagRequest;
+ delimiter?: string;
+}
+
+/**
+ *
+ */
+export class TagApi extends runtime.BaseAPI {
+
+ /**
+ * Create a new tag for table `id` that points to a specific version.
+ * Create a new tag
+ */
+ async createTableTagRaw(requestParameters: CreateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling createTableTag().'
+ );
+ }
+
+ if (requestParameters['createTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'createTableTagRequest',
+ 'Required parameter "createTableTagRequest" was null or undefined when calling createTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/create`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CreateTableTagRequestToJSON(requestParameters['createTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Create a new tag for table `id` that points to a specific version.
+ * Create a new tag
+ */
+ async createTableTag(requestParameters: CreateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.createTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete an existing tag from table `id`.
+ * Delete a tag
+ */
+ async deleteTableTagRaw(requestParameters: DeleteTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling deleteTableTag().'
+ );
+ }
+
+ if (requestParameters['deleteTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'deleteTableTagRequest',
+ 'Required parameter "deleteTableTagRequest" was null or undefined when calling deleteTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/delete`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DeleteTableTagRequestToJSON(requestParameters['deleteTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Delete an existing tag from table `id`.
+ * Delete a tag
+ */
+ async deleteTableTag(requestParameters: DeleteTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.deleteTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get the version number that a specific tag points to for table `id`.
+ * Get version for a specific tag
+ */
+ async getTableTagVersionRaw(requestParameters: GetTableTagVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling getTableTagVersion().'
+ );
+ }
+
+ if (requestParameters['getTableTagVersionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'getTableTagVersionRequest',
+ 'Required parameter "getTableTagVersionRequest" was null or undefined when calling getTableTagVersion().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/version`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: GetTableTagVersionRequestToJSON(requestParameters['getTableTagVersionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTableTagVersionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Get the version number that a specific tag points to for table `id`.
+ * Get version for a specific tag
+ */
+ async getTableTagVersion(requestParameters: GetTableTagVersionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getTableTagVersionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all tags that have been created for table `id`. Returns a map of tag names to their corresponding version numbers and metadata. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableTagsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List all tags for a table
+ */
+ async listTableTagsRaw(requestParameters: ListTableTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling listTableTags().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ if (requestParameters['pageToken'] != null) {
+ queryParameters['page_token'] = requestParameters['pageToken'];
+ }
+
+ if (requestParameters['limit'] != null) {
+ queryParameters['limit'] = requestParameters['limit'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/list`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTableTagsResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * List all tags that have been created for table `id`. Returns a map of tag names to their corresponding version numbers and metadata. REST NAMESPACE ONLY REST namespace does not use a request body for this operation. The `ListTableTagsRequest` information is passed in the following way: - `id`: pass through path parameter of the same name - `page_token`: pass through query parameter of the same name - `limit`: pass through query parameter of the same name
+ * List all tags for a table
+ */
+ async listTableTags(requestParameters: ListTableTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTableTagsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update an existing tag for table `id` to point to a different version.
+ * Update a tag to point to a different version
+ */
+ async updateTableTagRaw(requestParameters: UpdateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling updateTableTag().'
+ );
+ }
+
+ if (requestParameters['updateTableTagRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'updateTableTagRequest',
+ 'Required parameter "updateTableTagRequest" was null or undefined when calling updateTableTag().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/table/{id}/tags/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: UpdateTableTagRequestToJSON(requestParameters['updateTableTagRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateTableTagResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Update an existing tag for table `id` to point to a different version.
+ * Update a tag to point to a different version
+ */
+ async updateTableTag(requestParameters: UpdateTableTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateTableTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/TransactionApi.ts b/typescript/lance-namespace-fetch-client/src/apis/TransactionApi.ts
new file mode 100644
index 000000000..13c8f864e
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/TransactionApi.ts
@@ -0,0 +1,186 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AlterTransactionRequest,
+ AlterTransactionResponse,
+ DescribeTransactionRequest,
+ DescribeTransactionResponse,
+ ErrorResponse,
+} from '../models/index';
+import {
+ AlterTransactionRequestFromJSON,
+ AlterTransactionRequestToJSON,
+ AlterTransactionResponseFromJSON,
+ AlterTransactionResponseToJSON,
+ DescribeTransactionRequestFromJSON,
+ DescribeTransactionRequestToJSON,
+ DescribeTransactionResponseFromJSON,
+ DescribeTransactionResponseToJSON,
+ ErrorResponseFromJSON,
+ ErrorResponseToJSON,
+} from '../models/index';
+
+export interface AlterTransactionOperationRequest {
+ id: string;
+ alterTransactionRequest: AlterTransactionRequest;
+ delimiter?: string;
+}
+
+export interface DescribeTransactionOperationRequest {
+ id: string;
+ describeTransactionRequest: DescribeTransactionRequest;
+ delimiter?: string;
+}
+
+/**
+ *
+ */
+export class TransactionApi extends runtime.BaseAPI {
+
+ /**
+ * Alter a transaction with a list of actions such as setting status or properties. The server should either succeed and apply all actions, or fail and apply no action.
+ * Alter information of a transaction.
+ */
+ async alterTransactionRaw(requestParameters: AlterTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling alterTransaction().'
+ );
+ }
+
+ if (requestParameters['alterTransactionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'alterTransactionRequest',
+ 'Required parameter "alterTransactionRequest" was null or undefined when calling alterTransaction().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/transaction/{id}/alter`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AlterTransactionRequestToJSON(requestParameters['alterTransactionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AlterTransactionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Alter a transaction with a list of actions such as setting status or properties. The server should either succeed and apply all actions, or fail and apply no action.
+ * Alter information of a transaction.
+ */
+ async alterTransaction(requestParameters: AlterTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.alterTransactionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Return a detailed information for a given transaction
+ * Describe information about a transaction
+ */
+ async describeTransactionRaw(requestParameters: DescribeTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters['id'] == null) {
+ throw new runtime.RequiredError(
+ 'id',
+ 'Required parameter "id" was null or undefined when calling describeTransaction().'
+ );
+ }
+
+ if (requestParameters['describeTransactionRequest'] == null) {
+ throw new runtime.RequiredError(
+ 'describeTransactionRequest',
+ 'Required parameter "describeTransactionRequest" was null or undefined when calling describeTransaction().'
+ );
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters['delimiter'] != null) {
+ queryParameters['delimiter'] = requestParameters['delimiter'];
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
+ }
+
+ if (this.configuration && this.configuration.apiKey) {
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("BearerAuth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/transaction/{id}/describe`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: DescribeTransactionRequestToJSON(requestParameters['describeTransactionRequest']),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DescribeTransactionResponseFromJSON(jsonValue));
+ }
+
+ /**
+ * Return a detailed information for a given transaction
+ * Describe information about a transaction
+ */
+ async describeTransaction(requestParameters: DescribeTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.describeTransactionRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/typescript/lance-namespace-fetch-client/src/apis/index.ts b/typescript/lance-namespace-fetch-client/src/apis/index.ts
new file mode 100644
index 000000000..f4b5454a4
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/apis/index.ts
@@ -0,0 +1,9 @@
+/* tslint:disable */
+/* eslint-disable */
+export { DataApi } from "./DataApi";
+export { IndexApi } from "./IndexApi";
+export { MetadataApi } from "./MetadataApi";
+export { NamespaceApi } from "./NamespaceApi";
+export { TableApi } from "./TableApi";
+export { TagApi } from "./TagApi";
+export { TransactionApi } from "./TransactionApi";
diff --git a/typescript/lance-namespace-fetch-client/src/index.ts b/typescript/lance-namespace-fetch-client/src/index.ts
new file mode 100644
index 000000000..f3f4f9f3c
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/index.ts
@@ -0,0 +1,5 @@
+/* tslint:disable */
+/* eslint-disable */
+export * from "./runtime";
+export { DataApi, IndexApi, MetadataApi, NamespaceApi, TableApi, TagApi, TransactionApi } from "./apis/index";
+export * from "./models/index";
diff --git a/typescript/lance-namespace-fetch-client/src/models/AddVirtualColumnEntry.ts b/typescript/lance-namespace-fetch-client/src/models/AddVirtualColumnEntry.ts
new file mode 100644
index 000000000..eff41ce5e
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AddVirtualColumnEntry.ts
@@ -0,0 +1,111 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AddVirtualColumnEntry
+ */
+export interface AddVirtualColumnEntry {
+ /**
+ * List of input column names for the virtual column
+ * @type {Array}
+ * @memberof AddVirtualColumnEntry
+ */
+ input_columns: Array;
+ /**
+ * Data type of the virtual column using JSON representation
+ * @type {object}
+ * @memberof AddVirtualColumnEntry
+ */
+ data_type: object;
+ /**
+ * Docker image to use for the UDF
+ * @type {string}
+ * @memberof AddVirtualColumnEntry
+ */
+ image: string;
+ /**
+ * Base64 encoded pickled UDF
+ * @type {string}
+ * @memberof AddVirtualColumnEntry
+ */
+ udf: string;
+ /**
+ * Name of the UDF
+ * @type {string}
+ * @memberof AddVirtualColumnEntry
+ */
+ udf_name: string;
+ /**
+ * Version of the UDF
+ * @type {string}
+ * @memberof AddVirtualColumnEntry
+ */
+ udf_version: string;
+}
+
+/**
+ * Check if a given object implements the AddVirtualColumnEntry interface.
+ */
+export function instanceOfAddVirtualColumnEntry(value: object): value is AddVirtualColumnEntry {
+ if (!('input_columns' in value) || value['input_columns'] === undefined) return false;
+ if (!('data_type' in value) || value['data_type'] === undefined) return false;
+ if (!('image' in value) || value['image'] === undefined) return false;
+ if (!('udf' in value) || value['udf'] === undefined) return false;
+ if (!('udf_name' in value) || value['udf_name'] === undefined) return false;
+ if (!('udf_version' in value) || value['udf_version'] === undefined) return false;
+ return true;
+}
+
+export function AddVirtualColumnEntryFromJSON(json: any): AddVirtualColumnEntry {
+ return AddVirtualColumnEntryFromJSONTyped(json, false);
+}
+
+export function AddVirtualColumnEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddVirtualColumnEntry {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'input_columns': json['input_columns'],
+ 'data_type': json['data_type'],
+ 'image': json['image'],
+ 'udf': json['udf'],
+ 'udf_name': json['udf_name'],
+ 'udf_version': json['udf_version'],
+ };
+}
+
+export function AddVirtualColumnEntryToJSON(json: any): AddVirtualColumnEntry {
+ return AddVirtualColumnEntryToJSONTyped(json, false);
+}
+
+export function AddVirtualColumnEntryToJSONTyped(value?: AddVirtualColumnEntry | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'input_columns': value['input_columns'],
+ 'data_type': value['data_type'],
+ 'image': value['image'],
+ 'udf': value['udf'],
+ 'udf_name': value['udf_name'],
+ 'udf_version': value['udf_version'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterColumnsEntry.ts b/typescript/lance-namespace-fetch-client/src/models/AlterColumnsEntry.ts
new file mode 100644
index 000000000..cd74427cc
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterColumnsEntry.ts
@@ -0,0 +1,107 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+import type { AlterVirtualColumnEntry } from './AlterVirtualColumnEntry';
+import {
+ AlterVirtualColumnEntryFromJSON,
+ AlterVirtualColumnEntryFromJSONTyped,
+ AlterVirtualColumnEntryToJSON,
+ AlterVirtualColumnEntryToJSONTyped,
+} from './AlterVirtualColumnEntry';
+
+/**
+ *
+ * @export
+ * @interface AlterColumnsEntry
+ */
+export interface AlterColumnsEntry {
+ /**
+ * Column path to alter
+ * @type {string}
+ * @memberof AlterColumnsEntry
+ */
+ path: string;
+ /**
+ * New data type for the column using JSON representation (optional)
+ * @type {object}
+ * @memberof AlterColumnsEntry
+ */
+ data_type: object;
+ /**
+ * New name for the column (optional)
+ * @type {string}
+ * @memberof AlterColumnsEntry
+ */
+ rename?: string;
+ /**
+ * Whether the column should be nullable (optional)
+ * @type {boolean}
+ * @memberof AlterColumnsEntry
+ */
+ nullable?: boolean;
+ /**
+ * Virtual column alterations (optional)
+ * @type {AlterVirtualColumnEntry}
+ * @memberof AlterColumnsEntry
+ */
+ virtual_column?: AlterVirtualColumnEntry;
+}
+
+/**
+ * Check if a given object implements the AlterColumnsEntry interface.
+ */
+export function instanceOfAlterColumnsEntry(value: object): value is AlterColumnsEntry {
+ if (!('path' in value) || value['path'] === undefined) return false;
+ if (!('data_type' in value) || value['data_type'] === undefined) return false;
+ return true;
+}
+
+export function AlterColumnsEntryFromJSON(json: any): AlterColumnsEntry {
+ return AlterColumnsEntryFromJSONTyped(json, false);
+}
+
+export function AlterColumnsEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterColumnsEntry {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'path': json['path'],
+ 'data_type': json['data_type'],
+ 'rename': json['rename'] == null ? undefined : json['rename'],
+ 'nullable': json['nullable'] == null ? undefined : json['nullable'],
+ 'virtual_column': json['virtual_column'] == null ? undefined : AlterVirtualColumnEntryFromJSON(json['virtual_column']),
+ };
+}
+
+export function AlterColumnsEntryToJSON(json: any): AlterColumnsEntry {
+ return AlterColumnsEntryToJSONTyped(json, false);
+}
+
+export function AlterColumnsEntryToJSONTyped(value?: AlterColumnsEntry | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'path': value['path'],
+ 'data_type': value['data_type'],
+ 'rename': value['rename'],
+ 'nullable': value['nullable'],
+ 'virtual_column': AlterVirtualColumnEntryToJSON(value['virtual_column']),
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTableAddColumnsRequest.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTableAddColumnsRequest.ts
new file mode 100644
index 000000000..d9b3a1047
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTableAddColumnsRequest.ts
@@ -0,0 +1,112 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+import type { NewColumnTransform } from './NewColumnTransform';
+import {
+ NewColumnTransformFromJSON,
+ NewColumnTransformFromJSONTyped,
+ NewColumnTransformToJSON,
+ NewColumnTransformToJSONTyped,
+} from './NewColumnTransform';
+import type { Identity } from './Identity';
+import {
+ IdentityFromJSON,
+ IdentityFromJSONTyped,
+ IdentityToJSON,
+ IdentityToJSONTyped,
+} from './Identity';
+
+/**
+ *
+ * @export
+ * @interface AlterTableAddColumnsRequest
+ */
+export interface AlterTableAddColumnsRequest {
+ /**
+ *
+ * @type {Identity}
+ * @memberof AlterTableAddColumnsRequest
+ */
+ identity?: Identity;
+ /**
+ * Arbitrary context for a request as key-value pairs.
+ * How to use the context is custom to the specific implementation.
+ *
+ * REST NAMESPACE ONLY
+ * Context entries are passed via HTTP headers using the naming convention
+ * `x-lance-ctx-: `. For example, a context entry
+ * `{"trace_id": "abc123"}` would be sent as the header `x-lance-ctx-trace_id: abc123`.
+ *
+ * @type {{ [key: string]: string; }}
+ * @memberof AlterTableAddColumnsRequest
+ */
+ context?: { [key: string]: string; };
+ /**
+ *
+ * @type {Array}
+ * @memberof AlterTableAddColumnsRequest
+ */
+ id?: Array;
+ /**
+ * List of new columns to add
+ * @type {Array}
+ * @memberof AlterTableAddColumnsRequest
+ */
+ new_columns: Array;
+}
+
+/**
+ * Check if a given object implements the AlterTableAddColumnsRequest interface.
+ */
+export function instanceOfAlterTableAddColumnsRequest(value: object): value is AlterTableAddColumnsRequest {
+ if (!('new_columns' in value) || value['new_columns'] === undefined) return false;
+ return true;
+}
+
+export function AlterTableAddColumnsRequestFromJSON(json: any): AlterTableAddColumnsRequest {
+ return AlterTableAddColumnsRequestFromJSONTyped(json, false);
+}
+
+export function AlterTableAddColumnsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTableAddColumnsRequest {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'identity': json['identity'] == null ? undefined : IdentityFromJSON(json['identity']),
+ 'context': json['context'] == null ? undefined : json['context'],
+ 'id': json['id'] == null ? undefined : json['id'],
+ 'new_columns': ((json['new_columns'] as Array).map(NewColumnTransformFromJSON)),
+ };
+}
+
+export function AlterTableAddColumnsRequestToJSON(json: any): AlterTableAddColumnsRequest {
+ return AlterTableAddColumnsRequestToJSONTyped(json, false);
+}
+
+export function AlterTableAddColumnsRequestToJSONTyped(value?: AlterTableAddColumnsRequest | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'identity': IdentityToJSON(value['identity']),
+ 'context': value['context'],
+ 'id': value['id'],
+ 'new_columns': ((value['new_columns'] as Array).map(NewColumnTransformToJSON)),
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTableAddColumnsResponse.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTableAddColumnsResponse.ts
new file mode 100644
index 000000000..7f3324969
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTableAddColumnsResponse.ts
@@ -0,0 +1,74 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterTableAddColumnsResponse
+ */
+export interface AlterTableAddColumnsResponse {
+ /**
+ * Optional transaction identifier
+ * @type {string}
+ * @memberof AlterTableAddColumnsResponse
+ */
+ transaction_id?: string;
+ /**
+ * Version of the table after adding columns
+ * @type {number}
+ * @memberof AlterTableAddColumnsResponse
+ */
+ version: number;
+}
+
+/**
+ * Check if a given object implements the AlterTableAddColumnsResponse interface.
+ */
+export function instanceOfAlterTableAddColumnsResponse(value: object): value is AlterTableAddColumnsResponse {
+ if (!('version' in value) || value['version'] === undefined) return false;
+ return true;
+}
+
+export function AlterTableAddColumnsResponseFromJSON(json: any): AlterTableAddColumnsResponse {
+ return AlterTableAddColumnsResponseFromJSONTyped(json, false);
+}
+
+export function AlterTableAddColumnsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTableAddColumnsResponse {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'transaction_id': json['transaction_id'] == null ? undefined : json['transaction_id'],
+ 'version': json['version'],
+ };
+}
+
+export function AlterTableAddColumnsResponseToJSON(json: any): AlterTableAddColumnsResponse {
+ return AlterTableAddColumnsResponseToJSONTyped(json, false);
+}
+
+export function AlterTableAddColumnsResponseToJSONTyped(value?: AlterTableAddColumnsResponse | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'transaction_id': value['transaction_id'],
+ 'version': value['version'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTableAlterColumnsRequest.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTableAlterColumnsRequest.ts
new file mode 100644
index 000000000..d2cad2ff1
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTableAlterColumnsRequest.ts
@@ -0,0 +1,112 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+import type { Identity } from './Identity';
+import {
+ IdentityFromJSON,
+ IdentityFromJSONTyped,
+ IdentityToJSON,
+ IdentityToJSONTyped,
+} from './Identity';
+import type { AlterColumnsEntry } from './AlterColumnsEntry';
+import {
+ AlterColumnsEntryFromJSON,
+ AlterColumnsEntryFromJSONTyped,
+ AlterColumnsEntryToJSON,
+ AlterColumnsEntryToJSONTyped,
+} from './AlterColumnsEntry';
+
+/**
+ *
+ * @export
+ * @interface AlterTableAlterColumnsRequest
+ */
+export interface AlterTableAlterColumnsRequest {
+ /**
+ *
+ * @type {Identity}
+ * @memberof AlterTableAlterColumnsRequest
+ */
+ identity?: Identity;
+ /**
+ * Arbitrary context for a request as key-value pairs.
+ * How to use the context is custom to the specific implementation.
+ *
+ * REST NAMESPACE ONLY
+ * Context entries are passed via HTTP headers using the naming convention
+ * `x-lance-ctx-: `. For example, a context entry
+ * `{"trace_id": "abc123"}` would be sent as the header `x-lance-ctx-trace_id: abc123`.
+ *
+ * @type {{ [key: string]: string; }}
+ * @memberof AlterTableAlterColumnsRequest
+ */
+ context?: { [key: string]: string; };
+ /**
+ *
+ * @type {Array}
+ * @memberof AlterTableAlterColumnsRequest
+ */
+ id?: Array;
+ /**
+ * List of column alterations to perform
+ * @type {Array}
+ * @memberof AlterTableAlterColumnsRequest
+ */
+ alterations: Array;
+}
+
+/**
+ * Check if a given object implements the AlterTableAlterColumnsRequest interface.
+ */
+export function instanceOfAlterTableAlterColumnsRequest(value: object): value is AlterTableAlterColumnsRequest {
+ if (!('alterations' in value) || value['alterations'] === undefined) return false;
+ return true;
+}
+
+export function AlterTableAlterColumnsRequestFromJSON(json: any): AlterTableAlterColumnsRequest {
+ return AlterTableAlterColumnsRequestFromJSONTyped(json, false);
+}
+
+export function AlterTableAlterColumnsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTableAlterColumnsRequest {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'identity': json['identity'] == null ? undefined : IdentityFromJSON(json['identity']),
+ 'context': json['context'] == null ? undefined : json['context'],
+ 'id': json['id'] == null ? undefined : json['id'],
+ 'alterations': ((json['alterations'] as Array).map(AlterColumnsEntryFromJSON)),
+ };
+}
+
+export function AlterTableAlterColumnsRequestToJSON(json: any): AlterTableAlterColumnsRequest {
+ return AlterTableAlterColumnsRequestToJSONTyped(json, false);
+}
+
+export function AlterTableAlterColumnsRequestToJSONTyped(value?: AlterTableAlterColumnsRequest | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'identity': IdentityToJSON(value['identity']),
+ 'context': value['context'],
+ 'id': value['id'],
+ 'alterations': ((value['alterations'] as Array).map(AlterColumnsEntryToJSON)),
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTableAlterColumnsResponse.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTableAlterColumnsResponse.ts
new file mode 100644
index 000000000..2bded56f7
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTableAlterColumnsResponse.ts
@@ -0,0 +1,74 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterTableAlterColumnsResponse
+ */
+export interface AlterTableAlterColumnsResponse {
+ /**
+ * Optional transaction identifier
+ * @type {string}
+ * @memberof AlterTableAlterColumnsResponse
+ */
+ transaction_id?: string;
+ /**
+ * Version of the table after altering columns
+ * @type {number}
+ * @memberof AlterTableAlterColumnsResponse
+ */
+ version: number;
+}
+
+/**
+ * Check if a given object implements the AlterTableAlterColumnsResponse interface.
+ */
+export function instanceOfAlterTableAlterColumnsResponse(value: object): value is AlterTableAlterColumnsResponse {
+ if (!('version' in value) || value['version'] === undefined) return false;
+ return true;
+}
+
+export function AlterTableAlterColumnsResponseFromJSON(json: any): AlterTableAlterColumnsResponse {
+ return AlterTableAlterColumnsResponseFromJSONTyped(json, false);
+}
+
+export function AlterTableAlterColumnsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTableAlterColumnsResponse {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'transaction_id': json['transaction_id'] == null ? undefined : json['transaction_id'],
+ 'version': json['version'],
+ };
+}
+
+export function AlterTableAlterColumnsResponseToJSON(json: any): AlterTableAlterColumnsResponse {
+ return AlterTableAlterColumnsResponseToJSONTyped(json, false);
+}
+
+export function AlterTableAlterColumnsResponseToJSONTyped(value?: AlterTableAlterColumnsResponse | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'transaction_id': value['transaction_id'],
+ 'version': value['version'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTableDropColumnsRequest.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTableDropColumnsRequest.ts
new file mode 100644
index 000000000..e40488fcb
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTableDropColumnsRequest.ts
@@ -0,0 +1,105 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+import type { Identity } from './Identity';
+import {
+ IdentityFromJSON,
+ IdentityFromJSONTyped,
+ IdentityToJSON,
+ IdentityToJSONTyped,
+} from './Identity';
+
+/**
+ *
+ * @export
+ * @interface AlterTableDropColumnsRequest
+ */
+export interface AlterTableDropColumnsRequest {
+ /**
+ *
+ * @type {Identity}
+ * @memberof AlterTableDropColumnsRequest
+ */
+ identity?: Identity;
+ /**
+ * Arbitrary context for a request as key-value pairs.
+ * How to use the context is custom to the specific implementation.
+ *
+ * REST NAMESPACE ONLY
+ * Context entries are passed via HTTP headers using the naming convention
+ * `x-lance-ctx-: `. For example, a context entry
+ * `{"trace_id": "abc123"}` would be sent as the header `x-lance-ctx-trace_id: abc123`.
+ *
+ * @type {{ [key: string]: string; }}
+ * @memberof AlterTableDropColumnsRequest
+ */
+ context?: { [key: string]: string; };
+ /**
+ *
+ * @type {Array}
+ * @memberof AlterTableDropColumnsRequest
+ */
+ id?: Array;
+ /**
+ * Names of columns to drop
+ * @type {Array}
+ * @memberof AlterTableDropColumnsRequest
+ */
+ columns: Array;
+}
+
+/**
+ * Check if a given object implements the AlterTableDropColumnsRequest interface.
+ */
+export function instanceOfAlterTableDropColumnsRequest(value: object): value is AlterTableDropColumnsRequest {
+ if (!('columns' in value) || value['columns'] === undefined) return false;
+ return true;
+}
+
+export function AlterTableDropColumnsRequestFromJSON(json: any): AlterTableDropColumnsRequest {
+ return AlterTableDropColumnsRequestFromJSONTyped(json, false);
+}
+
+export function AlterTableDropColumnsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTableDropColumnsRequest {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'identity': json['identity'] == null ? undefined : IdentityFromJSON(json['identity']),
+ 'context': json['context'] == null ? undefined : json['context'],
+ 'id': json['id'] == null ? undefined : json['id'],
+ 'columns': json['columns'],
+ };
+}
+
+export function AlterTableDropColumnsRequestToJSON(json: any): AlterTableDropColumnsRequest {
+ return AlterTableDropColumnsRequestToJSONTyped(json, false);
+}
+
+export function AlterTableDropColumnsRequestToJSONTyped(value?: AlterTableDropColumnsRequest | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'identity': IdentityToJSON(value['identity']),
+ 'context': value['context'],
+ 'id': value['id'],
+ 'columns': value['columns'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTableDropColumnsResponse.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTableDropColumnsResponse.ts
new file mode 100644
index 000000000..037ed6b57
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTableDropColumnsResponse.ts
@@ -0,0 +1,74 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterTableDropColumnsResponse
+ */
+export interface AlterTableDropColumnsResponse {
+ /**
+ * Optional transaction identifier
+ * @type {string}
+ * @memberof AlterTableDropColumnsResponse
+ */
+ transaction_id?: string;
+ /**
+ * Version of the table after dropping columns
+ * @type {number}
+ * @memberof AlterTableDropColumnsResponse
+ */
+ version: number;
+}
+
+/**
+ * Check if a given object implements the AlterTableDropColumnsResponse interface.
+ */
+export function instanceOfAlterTableDropColumnsResponse(value: object): value is AlterTableDropColumnsResponse {
+ if (!('version' in value) || value['version'] === undefined) return false;
+ return true;
+}
+
+export function AlterTableDropColumnsResponseFromJSON(json: any): AlterTableDropColumnsResponse {
+ return AlterTableDropColumnsResponseFromJSONTyped(json, false);
+}
+
+export function AlterTableDropColumnsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTableDropColumnsResponse {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'transaction_id': json['transaction_id'] == null ? undefined : json['transaction_id'],
+ 'version': json['version'],
+ };
+}
+
+export function AlterTableDropColumnsResponseToJSON(json: any): AlterTableDropColumnsResponse {
+ return AlterTableDropColumnsResponseToJSONTyped(json, false);
+}
+
+export function AlterTableDropColumnsResponseToJSONTyped(value?: AlterTableDropColumnsResponse | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'transaction_id': value['transaction_id'],
+ 'version': value['version'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTransactionAction.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionAction.ts
new file mode 100644
index 000000000..a46e7c46a
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionAction.ts
@@ -0,0 +1,108 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+import type { AlterTransactionUnsetProperty } from './AlterTransactionUnsetProperty';
+import {
+ AlterTransactionUnsetPropertyFromJSON,
+ AlterTransactionUnsetPropertyFromJSONTyped,
+ AlterTransactionUnsetPropertyToJSON,
+ AlterTransactionUnsetPropertyToJSONTyped,
+} from './AlterTransactionUnsetProperty';
+import type { AlterTransactionSetProperty } from './AlterTransactionSetProperty';
+import {
+ AlterTransactionSetPropertyFromJSON,
+ AlterTransactionSetPropertyFromJSONTyped,
+ AlterTransactionSetPropertyToJSON,
+ AlterTransactionSetPropertyToJSONTyped,
+} from './AlterTransactionSetProperty';
+import type { AlterTransactionSetStatus } from './AlterTransactionSetStatus';
+import {
+ AlterTransactionSetStatusFromJSON,
+ AlterTransactionSetStatusFromJSONTyped,
+ AlterTransactionSetStatusToJSON,
+ AlterTransactionSetStatusToJSONTyped,
+} from './AlterTransactionSetStatus';
+
+/**
+ * A single action that could be performed to alter a transaction.
+ * This action holds the model definition for all types of specific actions models,
+ * this is to minimize difference and compatibility issue across codegen in different languages.
+ * When used, only one of the actions should be non-null for each action.
+ * If you would like to perform multiple actions, set a list of actions in the AlterTransactionRequest.
+ *
+ * @export
+ * @interface AlterTransactionAction
+ */
+export interface AlterTransactionAction {
+ /**
+ *
+ * @type {AlterTransactionSetStatus}
+ * @memberof AlterTransactionAction
+ */
+ setStatusAction?: AlterTransactionSetStatus;
+ /**
+ *
+ * @type {AlterTransactionSetProperty}
+ * @memberof AlterTransactionAction
+ */
+ setPropertyAction?: AlterTransactionSetProperty;
+ /**
+ *
+ * @type {AlterTransactionUnsetProperty}
+ * @memberof AlterTransactionAction
+ */
+ unsetPropertyAction?: AlterTransactionUnsetProperty;
+}
+
+/**
+ * Check if a given object implements the AlterTransactionAction interface.
+ */
+export function instanceOfAlterTransactionAction(value: object): value is AlterTransactionAction {
+ return true;
+}
+
+export function AlterTransactionActionFromJSON(json: any): AlterTransactionAction {
+ return AlterTransactionActionFromJSONTyped(json, false);
+}
+
+export function AlterTransactionActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTransactionAction {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'setStatusAction': json['setStatusAction'] == null ? undefined : AlterTransactionSetStatusFromJSON(json['setStatusAction']),
+ 'setPropertyAction': json['setPropertyAction'] == null ? undefined : AlterTransactionSetPropertyFromJSON(json['setPropertyAction']),
+ 'unsetPropertyAction': json['unsetPropertyAction'] == null ? undefined : AlterTransactionUnsetPropertyFromJSON(json['unsetPropertyAction']),
+ };
+}
+
+export function AlterTransactionActionToJSON(json: any): AlterTransactionAction {
+ return AlterTransactionActionToJSONTyped(json, false);
+}
+
+export function AlterTransactionActionToJSONTyped(value?: AlterTransactionAction | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'setStatusAction': AlterTransactionSetStatusToJSON(value['setStatusAction']),
+ 'setPropertyAction': AlterTransactionSetPropertyToJSON(value['setPropertyAction']),
+ 'unsetPropertyAction': AlterTransactionUnsetPropertyToJSON(value['unsetPropertyAction']),
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTransactionRequest.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionRequest.ts
new file mode 100644
index 000000000..f7692cba2
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionRequest.ts
@@ -0,0 +1,114 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+import type { AlterTransactionAction } from './AlterTransactionAction';
+import {
+ AlterTransactionActionFromJSON,
+ AlterTransactionActionFromJSONTyped,
+ AlterTransactionActionToJSON,
+ AlterTransactionActionToJSONTyped,
+} from './AlterTransactionAction';
+import type { Identity } from './Identity';
+import {
+ IdentityFromJSON,
+ IdentityFromJSONTyped,
+ IdentityToJSON,
+ IdentityToJSONTyped,
+} from './Identity';
+
+/**
+ * Alter a transaction with a list of actions.
+ * The server should either succeed and apply all actions, or fail and apply no action.
+ *
+ * @export
+ * @interface AlterTransactionRequest
+ */
+export interface AlterTransactionRequest {
+ /**
+ *
+ * @type {Identity}
+ * @memberof AlterTransactionRequest
+ */
+ identity?: Identity;
+ /**
+ * Arbitrary context for a request as key-value pairs.
+ * How to use the context is custom to the specific implementation.
+ *
+ * REST NAMESPACE ONLY
+ * Context entries are passed via HTTP headers using the naming convention
+ * `x-lance-ctx-: `. For example, a context entry
+ * `{"trace_id": "abc123"}` would be sent as the header `x-lance-ctx-trace_id: abc123`.
+ *
+ * @type {{ [key: string]: string; }}
+ * @memberof AlterTransactionRequest
+ */
+ context?: { [key: string]: string; };
+ /**
+ *
+ * @type {Array}
+ * @memberof AlterTransactionRequest
+ */
+ id?: Array;
+ /**
+ *
+ * @type {Array}
+ * @memberof AlterTransactionRequest
+ */
+ actions: Array;
+}
+
+/**
+ * Check if a given object implements the AlterTransactionRequest interface.
+ */
+export function instanceOfAlterTransactionRequest(value: object): value is AlterTransactionRequest {
+ if (!('actions' in value) || value['actions'] === undefined) return false;
+ return true;
+}
+
+export function AlterTransactionRequestFromJSON(json: any): AlterTransactionRequest {
+ return AlterTransactionRequestFromJSONTyped(json, false);
+}
+
+export function AlterTransactionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTransactionRequest {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'identity': json['identity'] == null ? undefined : IdentityFromJSON(json['identity']),
+ 'context': json['context'] == null ? undefined : json['context'],
+ 'id': json['id'] == null ? undefined : json['id'],
+ 'actions': ((json['actions'] as Array).map(AlterTransactionActionFromJSON)),
+ };
+}
+
+export function AlterTransactionRequestToJSON(json: any): AlterTransactionRequest {
+ return AlterTransactionRequestToJSONTyped(json, false);
+}
+
+export function AlterTransactionRequestToJSONTyped(value?: AlterTransactionRequest | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'identity': IdentityToJSON(value['identity']),
+ 'context': value['context'],
+ 'id': value['id'],
+ 'actions': ((value['actions'] as Array).map(AlterTransactionActionToJSON)),
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTransactionResponse.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionResponse.ts
new file mode 100644
index 000000000..57568dabd
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionResponse.ts
@@ -0,0 +1,81 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterTransactionResponse
+ */
+export interface AlterTransactionResponse {
+ /**
+ * The status of a transaction.
+ * Case insensitive, supports both PascalCase and snake_case. Valid values are:
+ * - Queued: the transaction is queued and not yet started
+ * - Running: the transaction is currently running
+ * - Succeeded: the transaction has completed successfully
+ * - Failed: the transaction has failed
+ * - Canceled: the transaction was canceled
+ *
+ * @type {string}
+ * @memberof AlterTransactionResponse
+ */
+ status: string;
+ /**
+ *
+ * @type {{ [key: string]: string; }}
+ * @memberof AlterTransactionResponse
+ */
+ properties?: { [key: string]: string; };
+}
+
+/**
+ * Check if a given object implements the AlterTransactionResponse interface.
+ */
+export function instanceOfAlterTransactionResponse(value: object): value is AlterTransactionResponse {
+ if (!('status' in value) || value['status'] === undefined) return false;
+ return true;
+}
+
+export function AlterTransactionResponseFromJSON(json: any): AlterTransactionResponse {
+ return AlterTransactionResponseFromJSONTyped(json, false);
+}
+
+export function AlterTransactionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTransactionResponse {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'status': json['status'],
+ 'properties': json['properties'] == null ? undefined : json['properties'],
+ };
+}
+
+export function AlterTransactionResponseToJSON(json: any): AlterTransactionResponse {
+ return AlterTransactionResponseToJSONTyped(json, false);
+}
+
+export function AlterTransactionResponseToJSONTyped(value?: AlterTransactionResponse | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'status': value['status'],
+ 'properties': value['properties'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTransactionSetProperty.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionSetProperty.ts
new file mode 100644
index 000000000..f2b827a0e
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionSetProperty.ts
@@ -0,0 +1,86 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterTransactionSetProperty
+ */
+export interface AlterTransactionSetProperty {
+ /**
+ *
+ * @type {string}
+ * @memberof AlterTransactionSetProperty
+ */
+ key?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof AlterTransactionSetProperty
+ */
+ value?: string;
+ /**
+ * The behavior if the property key already exists.
+ * Case insensitive, supports both PascalCase and snake_case. Valid values are:
+ * - Overwrite (default): overwrite the existing value with the provided value
+ * - Fail: fail the entire operation
+ * - Skip: keep the existing value and skip setting the provided value
+ *
+ * @type {string}
+ * @memberof AlterTransactionSetProperty
+ */
+ mode?: string;
+}
+
+/**
+ * Check if a given object implements the AlterTransactionSetProperty interface.
+ */
+export function instanceOfAlterTransactionSetProperty(value: object): value is AlterTransactionSetProperty {
+ return true;
+}
+
+export function AlterTransactionSetPropertyFromJSON(json: any): AlterTransactionSetProperty {
+ return AlterTransactionSetPropertyFromJSONTyped(json, false);
+}
+
+export function AlterTransactionSetPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTransactionSetProperty {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'key': json['key'] == null ? undefined : json['key'],
+ 'value': json['value'] == null ? undefined : json['value'],
+ 'mode': json['mode'] == null ? undefined : json['mode'],
+ };
+}
+
+export function AlterTransactionSetPropertyToJSON(json: any): AlterTransactionSetProperty {
+ return AlterTransactionSetPropertyToJSONTyped(json, false);
+}
+
+export function AlterTransactionSetPropertyToJSONTyped(value?: AlterTransactionSetProperty | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'key': value['key'],
+ 'value': value['value'],
+ 'mode': value['mode'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTransactionSetStatus.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionSetStatus.ts
new file mode 100644
index 000000000..61d88e577
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionSetStatus.ts
@@ -0,0 +1,72 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterTransactionSetStatus
+ */
+export interface AlterTransactionSetStatus {
+ /**
+ * The status of a transaction.
+ * Case insensitive, supports both PascalCase and snake_case. Valid values are:
+ * - Queued: the transaction is queued and not yet started
+ * - Running: the transaction is currently running
+ * - Succeeded: the transaction has completed successfully
+ * - Failed: the transaction has failed
+ * - Canceled: the transaction was canceled
+ *
+ * @type {string}
+ * @memberof AlterTransactionSetStatus
+ */
+ status?: string;
+}
+
+/**
+ * Check if a given object implements the AlterTransactionSetStatus interface.
+ */
+export function instanceOfAlterTransactionSetStatus(value: object): value is AlterTransactionSetStatus {
+ return true;
+}
+
+export function AlterTransactionSetStatusFromJSON(json: any): AlterTransactionSetStatus {
+ return AlterTransactionSetStatusFromJSONTyped(json, false);
+}
+
+export function AlterTransactionSetStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTransactionSetStatus {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'status': json['status'] == null ? undefined : json['status'],
+ };
+}
+
+export function AlterTransactionSetStatusToJSON(json: any): AlterTransactionSetStatus {
+ return AlterTransactionSetStatusToJSONTyped(json, false);
+}
+
+export function AlterTransactionSetStatusToJSONTyped(value?: AlterTransactionSetStatus | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'status': value['status'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterTransactionUnsetProperty.ts b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionUnsetProperty.ts
new file mode 100644
index 000000000..80f92489f
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterTransactionUnsetProperty.ts
@@ -0,0 +1,77 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterTransactionUnsetProperty
+ */
+export interface AlterTransactionUnsetProperty {
+ /**
+ *
+ * @type {string}
+ * @memberof AlterTransactionUnsetProperty
+ */
+ key?: string;
+ /**
+ * The behavior if the property key to unset does not exist.
+ * Case insensitive, supports both PascalCase and snake_case. Valid values are:
+ * - Skip (default): skip the property to unset
+ * - Fail: fail the entire operation
+ *
+ * @type {string}
+ * @memberof AlterTransactionUnsetProperty
+ */
+ mode?: string;
+}
+
+/**
+ * Check if a given object implements the AlterTransactionUnsetProperty interface.
+ */
+export function instanceOfAlterTransactionUnsetProperty(value: object): value is AlterTransactionUnsetProperty {
+ return true;
+}
+
+export function AlterTransactionUnsetPropertyFromJSON(json: any): AlterTransactionUnsetProperty {
+ return AlterTransactionUnsetPropertyFromJSONTyped(json, false);
+}
+
+export function AlterTransactionUnsetPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterTransactionUnsetProperty {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'key': json['key'] == null ? undefined : json['key'],
+ 'mode': json['mode'] == null ? undefined : json['mode'],
+ };
+}
+
+export function AlterTransactionUnsetPropertyToJSON(json: any): AlterTransactionUnsetProperty {
+ return AlterTransactionUnsetPropertyToJSONTyped(json, false);
+}
+
+export function AlterTransactionUnsetPropertyToJSONTyped(value?: AlterTransactionUnsetProperty | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'key': value['key'],
+ 'mode': value['mode'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AlterVirtualColumnEntry.ts b/typescript/lance-namespace-fetch-client/src/models/AlterVirtualColumnEntry.ts
new file mode 100644
index 000000000..1e4a6abfd
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AlterVirtualColumnEntry.ts
@@ -0,0 +1,97 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AlterVirtualColumnEntry
+ */
+export interface AlterVirtualColumnEntry {
+ /**
+ * List of input column names for the virtual column (optional)
+ * @type {Array}
+ * @memberof AlterVirtualColumnEntry
+ */
+ input_columns?: Array;
+ /**
+ * Docker image to use for the UDF (optional)
+ * @type {string}
+ * @memberof AlterVirtualColumnEntry
+ */
+ image?: string;
+ /**
+ * Base64 encoded pickled UDF (optional)
+ * @type {string}
+ * @memberof AlterVirtualColumnEntry
+ */
+ udf?: string;
+ /**
+ * Name of the UDF (optional)
+ * @type {string}
+ * @memberof AlterVirtualColumnEntry
+ */
+ udf_name?: string;
+ /**
+ * Version of the UDF (optional)
+ * @type {string}
+ * @memberof AlterVirtualColumnEntry
+ */
+ udf_version?: string;
+}
+
+/**
+ * Check if a given object implements the AlterVirtualColumnEntry interface.
+ */
+export function instanceOfAlterVirtualColumnEntry(value: object): value is AlterVirtualColumnEntry {
+ return true;
+}
+
+export function AlterVirtualColumnEntryFromJSON(json: any): AlterVirtualColumnEntry {
+ return AlterVirtualColumnEntryFromJSONTyped(json, false);
+}
+
+export function AlterVirtualColumnEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterVirtualColumnEntry {
+ if (json == null) {
+ return json;
+ }
+ return {
+
+ 'input_columns': json['input_columns'] == null ? undefined : json['input_columns'],
+ 'image': json['image'] == null ? undefined : json['image'],
+ 'udf': json['udf'] == null ? undefined : json['udf'],
+ 'udf_name': json['udf_name'] == null ? undefined : json['udf_name'],
+ 'udf_version': json['udf_version'] == null ? undefined : json['udf_version'],
+ };
+}
+
+export function AlterVirtualColumnEntryToJSON(json: any): AlterVirtualColumnEntry {
+ return AlterVirtualColumnEntryToJSONTyped(json, false);
+}
+
+export function AlterVirtualColumnEntryToJSONTyped(value?: AlterVirtualColumnEntry | null, ignoreDiscriminator: boolean = false): any {
+ if (value == null) {
+ return value;
+ }
+
+ return {
+
+ 'input_columns': value['input_columns'],
+ 'image': value['image'],
+ 'udf': value['udf'],
+ 'udf_name': value['udf_name'],
+ 'udf_version': value['udf_version'],
+ };
+}
+
diff --git a/typescript/lance-namespace-fetch-client/src/models/AnalyzeTableQueryPlanRequest.ts b/typescript/lance-namespace-fetch-client/src/models/AnalyzeTableQueryPlanRequest.ts
new file mode 100644
index 000000000..6ed748a1a
--- /dev/null
+++ b/typescript/lance-namespace-fetch-client/src/models/AnalyzeTableQueryPlanRequest.ts
@@ -0,0 +1,263 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Lance Namespace Specification
+ * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { mapValues } from '../runtime';
+import type { QueryTableRequestFullTextQuery } from './QueryTableRequestFullTextQuery';
+import {
+ QueryTableRequestFullTextQueryFromJSON,
+ QueryTableRequestFullTextQueryFromJSONTyped,
+ QueryTableRequestFullTextQueryToJSON,
+ QueryTableRequestFullTextQueryToJSONTyped,
+} from './QueryTableRequestFullTextQuery';
+import type { QueryTableRequestColumns } from './QueryTableRequestColumns';
+import {
+ QueryTableRequestColumnsFromJSON,
+ QueryTableRequestColumnsFromJSONTyped,
+ QueryTableRequestColumnsToJSON,
+ QueryTableRequestColumnsToJSONTyped,
+} from './QueryTableRequestColumns';
+import type { Identity } from './Identity';
+import {
+ IdentityFromJSON,
+ IdentityFromJSONTyped,
+ IdentityToJSON,
+ IdentityToJSONTyped,
+} from './Identity';
+import type { QueryTableRequestVector } from './QueryTableRequestVector';
+import {
+ QueryTableRequestVectorFromJSON,
+ QueryTableRequestVectorFromJSONTyped,
+ QueryTableRequestVectorToJSON,
+ QueryTableRequestVectorToJSONTyped,
+} from './QueryTableRequestVector';
+
+/**
+ *
+ * @export
+ * @interface AnalyzeTableQueryPlanRequest
+ */
+export interface AnalyzeTableQueryPlanRequest {
+ /**
+ *
+ * @type {Identity}
+ * @memberof AnalyzeTableQueryPlanRequest
+ */
+ identity?: Identity;
+ /**
+ * Arbitrary context for a request as key-value pairs.
+ * How to use the context is custom to the specific implementation.
+ *
+ * REST NAMESPACE ONLY
+ * Context entries are passed via HTTP headers using the naming convention
+ * `x-lance-ctx-: