UNPKG

node-appwrite

Version:

Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API

983 lines (982 loc) 124 kB
import { Client } from '../client.js'; import { Models } from '../models.js'; import { RelationshipType } from '../enums/relationship-type.js'; import { RelationMutate } from '../enums/relation-mutate.js'; import { IndexType } from '../enums/index-type.js'; import { OrderBy } from '../enums/order-by.js'; import '../query.js'; import '../enums/database-type.js'; import '../enums/attribute-status.js'; import '../enums/column-status.js'; import '../enums/index-status.js'; import '../enums/deployment-status.js'; import '../enums/execution-trigger.js'; import '../enums/execution-status.js'; import '../enums/health-antivirus-status.js'; import '../enums/health-check-status.js'; import '../enums/message-status.js'; declare class TablesDB { client: Client; constructor(client: Client); /** * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. * * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise<Models.DatabaseList>} */ list(params?: { queries?: string[]; search?: string; total?: boolean; }): Promise<Models.DatabaseList>; /** * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. * * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name * @param {string} search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise<Models.DatabaseList>} * @deprecated Use the object parameter style method for a better developer experience. */ list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>; /** * Create a new Database. * * * @param {string} params.databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {string} params.name - Database name. Max length: 128 chars. * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. * @throws {AppwriteException} * @returns {Promise<Models.Database>} */ create(params: { databaseId: string; name: string; enabled?: boolean; }): Promise<Models.Database>; /** * Create a new Database. * * * @param {string} databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {string} name - Database name. Max length: 128 chars. * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. * @throws {AppwriteException} * @returns {Promise<Models.Database>} * @deprecated Use the object parameter style method for a better developer experience. */ create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>; /** * List transactions across all databases. * * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). * @throws {AppwriteException} * @returns {Promise<Models.TransactionList>} */ listTransactions(params?: { queries?: string[]; }): Promise<Models.TransactionList>; /** * List transactions across all databases. * * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). * @throws {AppwriteException} * @returns {Promise<Models.TransactionList>} * @deprecated Use the object parameter style method for a better developer experience. */ listTransactions(queries?: string[]): Promise<Models.TransactionList>; /** * Create a new transaction. * * @param {number} params.ttl - Seconds before the transaction expires. * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} */ createTransaction(params?: { ttl?: number; }): Promise<Models.Transaction>; /** * Create a new transaction. * * @param {number} ttl - Seconds before the transaction expires. * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} * @deprecated Use the object parameter style method for a better developer experience. */ createTransaction(ttl?: number): Promise<Models.Transaction>; /** * Get a transaction by its unique ID. * * @param {string} params.transactionId - Transaction ID. * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} */ getTransaction(params: { transactionId: string; }): Promise<Models.Transaction>; /** * Get a transaction by its unique ID. * * @param {string} transactionId - Transaction ID. * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} * @deprecated Use the object parameter style method for a better developer experience. */ getTransaction(transactionId: string): Promise<Models.Transaction>; /** * Update a transaction, to either commit or roll back its operations. * * @param {string} params.transactionId - Transaction ID. * @param {boolean} params.commit - Commit transaction? * @param {boolean} params.rollback - Rollback transaction? * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} */ updateTransaction(params: { transactionId: string; commit?: boolean; rollback?: boolean; }): Promise<Models.Transaction>; /** * Update a transaction, to either commit or roll back its operations. * * @param {string} transactionId - Transaction ID. * @param {boolean} commit - Commit transaction? * @param {boolean} rollback - Rollback transaction? * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} * @deprecated Use the object parameter style method for a better developer experience. */ updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>; /** * Delete a transaction by its unique ID. * * @param {string} params.transactionId - Transaction ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ deleteTransaction(params: { transactionId: string; }): Promise<{}>; /** * Delete a transaction by its unique ID. * * @param {string} transactionId - Transaction ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteTransaction(transactionId: string): Promise<{}>; /** * Create multiple operations in a single transaction. * * @param {string} params.transactionId - Transaction ID. * @param {object[]} params.operations - Array of staged operations. * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} */ createOperations(params: { transactionId: string; operations?: object[]; }): Promise<Models.Transaction>; /** * Create multiple operations in a single transaction. * * @param {string} transactionId - Transaction ID. * @param {object[]} operations - Array of staged operations. * @throws {AppwriteException} * @returns {Promise<Models.Transaction>} * @deprecated Use the object parameter style method for a better developer experience. */ createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>; /** * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. * * @param {string} params.databaseId - Database ID. * @throws {AppwriteException} * @returns {Promise<Models.Database>} */ get(params: { databaseId: string; }): Promise<Models.Database>; /** * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. * * @param {string} databaseId - Database ID. * @throws {AppwriteException} * @returns {Promise<Models.Database>} * @deprecated Use the object parameter style method for a better developer experience. */ get(databaseId: string): Promise<Models.Database>; /** * Update a database by its unique ID. * * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. * @throws {AppwriteException} * @returns {Promise<Models.Database>} */ update(params: { databaseId: string; name?: string; enabled?: boolean; }): Promise<Models.Database>; /** * Update a database by its unique ID. * * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. * @throws {AppwriteException} * @returns {Promise<Models.Database>} * @deprecated Use the object parameter style method for a better developer experience. */ update(databaseId: string, name?: string, enabled?: boolean): Promise<Models.Database>; /** * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. * * @param {string} params.databaseId - Database ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ delete(params: { databaseId: string; }): Promise<{}>; /** * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. * * @param {string} databaseId - Database ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ delete(databaseId: string): Promise<{}>; /** * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. * * @param {string} params.databaseId - Database ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise<Models.TableList>} */ listTables(params: { databaseId: string; queries?: string[]; search?: string; total?: boolean; }): Promise<Models.TableList>; /** * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. * * @param {string} databaseId - Database ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity * @param {string} search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise<Models.TableList>} * @deprecated Use the object parameter style method for a better developer experience. */ listTables(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.TableList>; /** * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {string} params.name - Table name. Max length: 128 chars. * @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} params.rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {object[]} params.columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). * @throws {AppwriteException} * @returns {Promise<Models.Table>} */ createTable(params: { databaseId: string; tableId: string; name: string; permissions?: string[]; rowSecurity?: boolean; enabled?: boolean; columns?: object[]; indexes?: object[]; }): Promise<Models.Table>; /** * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. * * @param {string} databaseId - Database ID. * @param {string} tableId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {string} name - Table name. Max length: 128 chars. * @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {object[]} columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). * @throws {AppwriteException} * @returns {Promise<Models.Table>} * @deprecated Use the object parameter style method for a better developer experience. */ createTable(databaseId: string, tableId: string, name: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean, columns?: object[], indexes?: object[]): Promise<Models.Table>; /** * Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @throws {AppwriteException} * @returns {Promise<Models.Table>} */ getTable(params: { databaseId: string; tableId: string; }): Promise<Models.Table>; /** * Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @throws {AppwriteException} * @returns {Promise<Models.Table>} * @deprecated Use the object parameter style method for a better developer experience. */ getTable(databaseId: string, tableId: string): Promise<Models.Table>; /** * Update a table by its unique ID. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.name - Table name. Max length: 128 chars. * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} params.rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @throws {AppwriteException} * @returns {Promise<Models.Table>} */ updateTable(params: { databaseId: string; tableId: string; name?: string; permissions?: string[]; rowSecurity?: boolean; enabled?: boolean; }): Promise<Models.Table>; /** * Update a table by its unique ID. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} name - Table name. Max length: 128 chars. * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @throws {AppwriteException} * @returns {Promise<Models.Table>} * @deprecated Use the object parameter style method for a better developer experience. */ updateTable(databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean): Promise<Models.Table>; /** * Delete a table by its unique ID. Only users with write permissions have access to delete this resource. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ deleteTable(params: { databaseId: string; tableId: string; }): Promise<{}>; /** * Delete a table by its unique ID. Only users with write permissions have access to delete this resource. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteTable(databaseId: string, tableId: string): Promise<{}>; /** * List columns in the table. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise<Models.ColumnList>} */ listColumns(params: { databaseId: string; tableId: string; queries?: string[]; total?: boolean; }): Promise<Models.ColumnList>; /** * List columns in the table. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise<Models.ColumnList>} * @deprecated Use the object parameter style method for a better developer experience. */ listColumns(databaseId: string, tableId: string, queries?: string[], total?: boolean): Promise<Models.ColumnList>; /** * Create a boolean column. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {boolean} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnBoolean>} */ createBooleanColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: boolean; array?: boolean; }): Promise<Models.ColumnBoolean>; /** * Create a boolean column. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {boolean} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnBoolean>} * @deprecated Use the object parameter style method for a better developer experience. */ createBooleanColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.ColumnBoolean>; /** * Update a boolean column. Changing the `default` value will not update already existing rows. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {boolean} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnBoolean>} */ updateBooleanColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: boolean; newKey?: string; }): Promise<Models.ColumnBoolean>; /** * Update a boolean column. Changing the `default` value will not update already existing rows. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {boolean} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnBoolean>} * @deprecated Use the object parameter style method for a better developer experience. */ updateBooleanColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.ColumnBoolean>; /** * Create a date time column according to the ISO 8601 standard. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnDatetime>} */ createDatetimeColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: string; array?: boolean; }): Promise<Models.ColumnDatetime>; /** * Create a date time column according to the ISO 8601 standard. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnDatetime>} * @deprecated Use the object parameter style method for a better developer experience. */ createDatetimeColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnDatetime>; /** * Update a date time column. Changing the `default` value will not update already existing rows. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnDatetime>} */ updateDatetimeColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: string; newKey?: string; }): Promise<Models.ColumnDatetime>; /** * Update a date time column. Changing the `default` value will not update already existing rows. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnDatetime>} * @deprecated Use the object parameter style method for a better developer experience. */ updateDatetimeColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.ColumnDatetime>; /** * Create an email column. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnEmail>} */ createEmailColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: string; array?: boolean; }): Promise<Models.ColumnEmail>; /** * Create an email column. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnEmail>} * @deprecated Use the object parameter style method for a better developer experience. */ createEmailColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnEmail>; /** * Update an email column. Changing the `default` value will not update already existing rows. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnEmail>} */ updateEmailColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: string; newKey?: string; }): Promise<Models.ColumnEmail>; /** * Update an email column. Changing the `default` value will not update already existing rows. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnEmail>} * @deprecated Use the object parameter style method for a better developer experience. */ updateEmailColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.ColumnEmail>; /** * Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {string[]} params.elements - Array of enum values. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnEnum>} */ createEnumColumn(params: { databaseId: string; tableId: string; key: string; elements: string[]; required: boolean; xdefault?: string; array?: boolean; }): Promise<Models.ColumnEnum>; /** * Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {string[]} elements - Array of enum values. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnEnum>} * @deprecated Use the object parameter style method for a better developer experience. */ createEnumColumn(databaseId: string, tableId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnEnum>; /** * Update an enum column. Changing the `default` value will not update already existing rows. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {string[]} params.elements - Updated list of enum values. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnEnum>} */ updateEnumColumn(params: { databaseId: string; tableId: string; key: string; elements: string[]; required: boolean; xdefault?: string; newKey?: string; }): Promise<Models.ColumnEnum>; /** * Update an enum column. Changing the `default` value will not update already existing rows. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {string[]} elements - Updated list of enum values. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnEnum>} * @deprecated Use the object parameter style method for a better developer experience. */ updateEnumColumn(databaseId: string, tableId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.ColumnEnum>; /** * Create a float column. Optionally, minimum and maximum values can be provided. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {number} params.min - Minimum value * @param {number} params.max - Maximum value * @param {number} params.xdefault - Default value. Cannot be set when required. * @param {boolean} params.array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnFloat>} */ createFloatColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; min?: number; max?: number; xdefault?: number; array?: boolean; }): Promise<Models.ColumnFloat>; /** * Create a float column. Optionally, minimum and maximum values can be provided. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {number} min - Minimum value * @param {number} max - Maximum value * @param {number} xdefault - Default value. Cannot be set when required. * @param {boolean} array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnFloat>} * @deprecated Use the object parameter style method for a better developer experience. */ createFloatColumn(databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.ColumnFloat>; /** * Update a float column. Changing the `default` value will not update already existing rows. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {number} params.xdefault - Default value. Cannot be set when required. * @param {number} params.min - Minimum value * @param {number} params.max - Maximum value * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnFloat>} */ updateFloatColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: number; min?: number; max?: number; newKey?: string; }): Promise<Models.ColumnFloat>; /** * Update a float column. Changing the `default` value will not update already existing rows. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {number} xdefault - Default value. Cannot be set when required. * @param {number} min - Minimum value * @param {number} max - Maximum value * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnFloat>} * @deprecated Use the object parameter style method for a better developer experience. */ updateFloatColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.ColumnFloat>; /** * Create an integer column. Optionally, minimum and maximum values can be provided. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {number | bigint} params.min - Minimum value * @param {number | bigint} params.max - Maximum value * @param {number | bigint} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnInteger>} */ createIntegerColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; min?: number | bigint; max?: number | bigint; xdefault?: number | bigint; array?: boolean; }): Promise<Models.ColumnInteger>; /** * Create an integer column. Optionally, minimum and maximum values can be provided. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {number | bigint} min - Minimum value * @param {number | bigint} max - Maximum value * @param {number | bigint} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnInteger>} * @deprecated Use the object parameter style method for a better developer experience. */ createIntegerColumn(databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise<Models.ColumnInteger>; /** * Update an integer column. Changing the `default` value will not update already existing rows. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {number | bigint} params.xdefault - Default value. Cannot be set when column is required. * @param {number | bigint} params.min - Minimum value * @param {number | bigint} params.max - Maximum value * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnInteger>} */ updateIntegerColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: number | bigint; min?: number | bigint; max?: number | bigint; newKey?: string; }): Promise<Models.ColumnInteger>; /** * Update an integer column. Changing the `default` value will not update already existing rows. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {number | bigint} xdefault - Default value. Cannot be set when column is required. * @param {number | bigint} min - Minimum value * @param {number | bigint} max - Maximum value * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnInteger>} * @deprecated Use the object parameter style method for a better developer experience. */ updateIntegerColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise<Models.ColumnInteger>; /** * Create IP address column. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnIp>} */ createIpColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: string; array?: boolean; }): Promise<Models.ColumnIp>; /** * Create IP address column. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @throws {AppwriteException} * @returns {Promise<Models.ColumnIp>} * @deprecated Use the object parameter style method for a better developer experience. */ createIpColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnIp>; /** * Update an ip column. Changing the `default` value will not update already existing rows. * * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {string} params.xdefault - Default value. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnIp>} */ updateIpColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: string; newKey?: string; }): Promise<Models.ColumnIp>; /** * Update an ip column. Changing the `default` value will not update already existing rows. * * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {string} xdefault - Default value. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise<Models.ColumnIp>} * @deprecated Use the object parameter style method for a better developer experience. */ updateIpColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.ColumnIp>; /** * Create a geometric line column. * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {any[]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @throws {AppwriteException} * @returns {Promise<Models.ColumnLine>} */ createLineColumn(params: { databaseId: string; tableId: string; key: string; required: boolean; xdefault?: any[]; }): Promise<Models.ColumnLine>; /** * Create a geometric line column. * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param