@appwrite.io/console 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +2099 -520
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2098 -521
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2003 -444
- package/docs/examples/account/create-key.md +15 -0
- package/docs/examples/account/delete-key.md +13 -0
- package/docs/examples/account/get-key.md +13 -0
- package/docs/examples/account/list-keys.md +13 -0
- package/docs/examples/account/update-key.md +16 -0
- package/docs/examples/avatars/get-screenshot.md +5 -5
- package/docs/examples/backups/create-archive.md +2 -2
- package/docs/examples/backups/create-policy.md +2 -2
- package/docs/examples/backups/create-restoration.md +2 -2
- package/docs/examples/console/{get-regions.md → list-regions.md} +1 -3
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-longtext-attribute.md +18 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/create-text-attribute.md +18 -0
- package/docs/examples/databases/create-varchar-attribute.md +19 -0
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-longtext-attribute.md +18 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/update-text-attribute.md +18 -0
- package/docs/examples/databases/update-varchar-attribute.md +19 -0
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create.md +2 -2
- package/docs/examples/functions/list-templates.md +3 -3
- package/docs/examples/functions/update.md +2 -2
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +2 -2
- package/docs/examples/migrations/create-n-host-migration.md +2 -2
- package/docs/examples/migrations/create-supabase-migration.md +2 -2
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report.md +2 -2
- package/docs/examples/migrations/get-n-host-report.md +2 -2
- package/docs/examples/migrations/get-supabase-report.md +2 -2
- package/docs/examples/organizations/create-key.md +16 -0
- package/docs/examples/organizations/create.md +2 -2
- package/docs/examples/organizations/delete-key.md +14 -0
- package/docs/examples/organizations/estimation-create-organization.md +2 -2
- package/docs/examples/organizations/estimation-update-plan.md +2 -2
- package/docs/examples/organizations/get-key.md +14 -0
- package/docs/examples/organizations/list-keys.md +14 -0
- package/docs/examples/organizations/list-regions.md +13 -0
- package/docs/examples/organizations/update-key.md +17 -0
- package/docs/examples/organizations/update-plan.md +2 -2
- package/docs/examples/projects/create-jwt.md +2 -2
- package/docs/examples/projects/create-key.md +2 -2
- package/docs/examples/projects/update-key.md +2 -2
- package/docs/examples/sites/list-templates.md +3 -3
- package/docs/examples/tablesdb/create-index.md +2 -2
- package/docs/examples/tablesdb/create-longtext-column.md +18 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/create-text-column.md +18 -0
- package/docs/examples/tablesdb/create-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update-longtext-column.md +18 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/update-table.md +1 -1
- package/docs/examples/tablesdb/update-text-column.md +18 -0
- package/docs/examples/tablesdb/update-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update.md +1 -1
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/update-membership.md +2 -2
- package/package.json +3 -2
- package/src/channel.ts +138 -0
- package/src/client.ts +54 -9
- package/src/enums/browser-permission.ts +22 -0
- package/src/enums/deployment-status.ts +1 -0
- package/src/enums/frameworks.ts +17 -0
- package/src/enums/order-by.ts +4 -0
- package/src/enums/resources.ts +13 -0
- package/src/enums/roles.ts +7 -0
- package/src/enums/runtimes.ts +66 -0
- package/src/enums/scopes.ts +65 -0
- package/src/enums/services.ts +5 -0
- package/src/enums/use-cases.ts +11 -0
- package/src/index.ts +10 -1
- package/src/models.ts +349 -1
- package/src/query.ts +42 -0
- package/src/services/account.ts +364 -56
- package/src/services/assistant.ts +1 -1
- package/src/services/avatars.ts +17 -16
- package/src/services/backups.ts +37 -36
- package/src/services/console.ts +11 -42
- package/src/services/databases.ts +1060 -280
- package/src/services/domains.ts +44 -44
- package/src/services/functions.ts +60 -57
- package/src/services/graphql.ts +2 -2
- package/src/services/health.ts +22 -20
- package/src/services/messaging.ts +56 -56
- package/src/services/migrations.ts +79 -78
- package/src/services/organizations.ts +466 -70
- package/src/services/project.ts +5 -5
- package/src/services/projects.ts +86 -85
- package/src/services/proxy.ts +8 -8
- package/src/services/realtime.ts +35 -12
- package/src/services/sites.ts +42 -40
- package/src/services/storage.ts +16 -16
- package/src/services/tables-db.ts +1050 -268
- package/src/services/teams.ts +31 -30
- package/src/services/tokens.ts +5 -5
- package/src/services/users.ts +49 -49
- package/src/services/vcs.ts +10 -10
- package/types/channel.d.ts +72 -0
- package/types/client.d.ts +11 -3
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/deployment-status.d.ts +1 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/resources.d.ts +13 -0
- package/types/enums/roles.d.ts +7 -0
- package/types/enums/runtimes.d.ts +66 -0
- package/types/enums/scopes.d.ts +65 -0
- package/types/enums/services.d.ts +5 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/index.d.ts +10 -1
- package/types/models.d.ts +341 -1
- package/types/query.d.ts +30 -0
- package/types/services/account.d.ts +111 -0
- package/types/services/avatars.d.ts +5 -4
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +1 -13
- package/types/services/databases.d.ts +303 -8
- package/types/services/functions.d.ts +18 -15
- package/types/services/health.d.ts +2 -0
- package/types/services/migrations.d.ts +33 -32
- package/types/services/organizations.d.ts +161 -17
- package/types/services/projects.d.ts +13 -12
- package/types/services/realtime.d.ts +17 -8
- package/types/services/sites.d.ts +9 -7
- package/types/services/tables-db.d.ts +305 -8
- package/types/services/teams.d.ts +9 -8
- package/src/enums/billing-plan.ts +0 -17
- package/types/enums/billing-plan.d.ts +0 -17
|
@@ -6,6 +6,7 @@ import { UsageRange } from '../enums/usage-range';
|
|
|
6
6
|
import { RelationshipType } from '../enums/relationship-type';
|
|
7
7
|
import { RelationMutate } from '../enums/relation-mutate';
|
|
8
8
|
import { IndexType } from '../enums/index-type';
|
|
9
|
+
import { OrderBy } from '../enums/order-by';
|
|
9
10
|
|
|
10
11
|
export class TablesDB {
|
|
11
12
|
client: Client;
|
|
@@ -23,7 +24,7 @@ export class TablesDB {
|
|
|
23
24
|
* @throws {AppwriteException}
|
|
24
25
|
* @returns {Promise<Models.DatabaseList>}
|
|
25
26
|
*/
|
|
26
|
-
list(params?: { queries?: string[], search?: string, total?: boolean
|
|
27
|
+
list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.DatabaseList>;
|
|
27
28
|
/**
|
|
28
29
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
29
30
|
*
|
|
@@ -90,7 +91,7 @@ export class TablesDB {
|
|
|
90
91
|
* @throws {AppwriteException}
|
|
91
92
|
* @returns {Promise<Models.Database>}
|
|
92
93
|
*/
|
|
93
|
-
create(params: { databaseId: string, name: string, enabled?: boolean
|
|
94
|
+
create(params: { databaseId: string, name: string, enabled?: boolean }): Promise<Models.Database>;
|
|
94
95
|
/**
|
|
95
96
|
* Create a new Database.
|
|
96
97
|
*
|
|
@@ -162,7 +163,7 @@ export class TablesDB {
|
|
|
162
163
|
* @throws {AppwriteException}
|
|
163
164
|
* @returns {Promise<Models.TransactionList>}
|
|
164
165
|
*/
|
|
165
|
-
listTransactions(params?: { queries?: string[]
|
|
166
|
+
listTransactions(params?: { queries?: string[] }): Promise<Models.TransactionList>;
|
|
166
167
|
/**
|
|
167
168
|
* List transactions across all databases.
|
|
168
169
|
*
|
|
@@ -213,7 +214,7 @@ export class TablesDB {
|
|
|
213
214
|
* @throws {AppwriteException}
|
|
214
215
|
* @returns {Promise<Models.Transaction>}
|
|
215
216
|
*/
|
|
216
|
-
createTransaction(params?: { ttl?: number
|
|
217
|
+
createTransaction(params?: { ttl?: number }): Promise<Models.Transaction>;
|
|
217
218
|
/**
|
|
218
219
|
* Create a new transaction.
|
|
219
220
|
*
|
|
@@ -265,7 +266,7 @@ export class TablesDB {
|
|
|
265
266
|
* @throws {AppwriteException}
|
|
266
267
|
* @returns {Promise<Models.Transaction>}
|
|
267
268
|
*/
|
|
268
|
-
getTransaction(params: { transactionId: string
|
|
269
|
+
getTransaction(params: { transactionId: string }): Promise<Models.Transaction>;
|
|
269
270
|
/**
|
|
270
271
|
* Get a transaction by its unique ID.
|
|
271
272
|
*
|
|
@@ -318,7 +319,7 @@ export class TablesDB {
|
|
|
318
319
|
* @throws {AppwriteException}
|
|
319
320
|
* @returns {Promise<Models.Transaction>}
|
|
320
321
|
*/
|
|
321
|
-
updateTransaction(params: { transactionId: string, commit?: boolean, rollback?: boolean
|
|
322
|
+
updateTransaction(params: { transactionId: string, commit?: boolean, rollback?: boolean }): Promise<Models.Transaction>;
|
|
322
323
|
/**
|
|
323
324
|
* Update a transaction, to either commit or roll back its operations.
|
|
324
325
|
*
|
|
@@ -383,7 +384,7 @@ export class TablesDB {
|
|
|
383
384
|
* @throws {AppwriteException}
|
|
384
385
|
* @returns {Promise<{}>}
|
|
385
386
|
*/
|
|
386
|
-
deleteTransaction(params: { transactionId: string
|
|
387
|
+
deleteTransaction(params: { transactionId: string }): Promise<{}>;
|
|
387
388
|
/**
|
|
388
389
|
* Delete a transaction by its unique ID.
|
|
389
390
|
*
|
|
@@ -436,7 +437,7 @@ export class TablesDB {
|
|
|
436
437
|
* @throws {AppwriteException}
|
|
437
438
|
* @returns {Promise<Models.Transaction>}
|
|
438
439
|
*/
|
|
439
|
-
createOperations(params: { transactionId: string, operations?: object[]
|
|
440
|
+
createOperations(params: { transactionId: string, operations?: object[] }): Promise<Models.Transaction>;
|
|
440
441
|
/**
|
|
441
442
|
* Create multiple operations in a single transaction.
|
|
442
443
|
*
|
|
@@ -495,7 +496,7 @@ export class TablesDB {
|
|
|
495
496
|
* @throws {AppwriteException}
|
|
496
497
|
* @returns {Promise<Models.UsageDatabases>}
|
|
497
498
|
*/
|
|
498
|
-
listUsage(params?: { range?: UsageRange
|
|
499
|
+
listUsage(params?: { range?: UsageRange }): Promise<Models.UsageDatabases>;
|
|
499
500
|
/**
|
|
500
501
|
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
501
502
|
*
|
|
@@ -546,7 +547,7 @@ export class TablesDB {
|
|
|
546
547
|
* @throws {AppwriteException}
|
|
547
548
|
* @returns {Promise<Models.Database>}
|
|
548
549
|
*/
|
|
549
|
-
get(params: { databaseId: string
|
|
550
|
+
get(params: { databaseId: string }): Promise<Models.Database>;
|
|
550
551
|
/**
|
|
551
552
|
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
552
553
|
*
|
|
@@ -599,7 +600,7 @@ export class TablesDB {
|
|
|
599
600
|
* @throws {AppwriteException}
|
|
600
601
|
* @returns {Promise<Models.Database>}
|
|
601
602
|
*/
|
|
602
|
-
update(params: { databaseId: string, name
|
|
603
|
+
update(params: { databaseId: string, name?: string, enabled?: boolean }): Promise<Models.Database>;
|
|
603
604
|
/**
|
|
604
605
|
* Update a database by its unique ID.
|
|
605
606
|
*
|
|
@@ -610,15 +611,15 @@ export class TablesDB {
|
|
|
610
611
|
* @returns {Promise<Models.Database>}
|
|
611
612
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
612
613
|
*/
|
|
613
|
-
update(databaseId: string, name
|
|
614
|
+
update(databaseId: string, name?: string, enabled?: boolean): Promise<Models.Database>;
|
|
614
615
|
update(
|
|
615
|
-
paramsOrFirst: { databaseId: string, name
|
|
616
|
+
paramsOrFirst: { databaseId: string, name?: string, enabled?: boolean } | string,
|
|
616
617
|
...rest: [(string)?, (boolean)?]
|
|
617
618
|
): Promise<Models.Database> {
|
|
618
|
-
let params: { databaseId: string, name
|
|
619
|
+
let params: { databaseId: string, name?: string, enabled?: boolean };
|
|
619
620
|
|
|
620
621
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
621
|
-
params = (paramsOrFirst || {}) as { databaseId: string, name
|
|
622
|
+
params = (paramsOrFirst || {}) as { databaseId: string, name?: string, enabled?: boolean };
|
|
622
623
|
} else {
|
|
623
624
|
params = {
|
|
624
625
|
databaseId: paramsOrFirst as string,
|
|
@@ -634,9 +635,6 @@ export class TablesDB {
|
|
|
634
635
|
if (typeof databaseId === 'undefined') {
|
|
635
636
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
636
637
|
}
|
|
637
|
-
if (typeof name === 'undefined') {
|
|
638
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
639
|
-
}
|
|
640
638
|
|
|
641
639
|
const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId);
|
|
642
640
|
const payload: Payload = {};
|
|
@@ -667,7 +665,7 @@ export class TablesDB {
|
|
|
667
665
|
* @throws {AppwriteException}
|
|
668
666
|
* @returns {Promise<{}>}
|
|
669
667
|
*/
|
|
670
|
-
delete(params: { databaseId: string
|
|
668
|
+
delete(params: { databaseId: string }): Promise<{}>;
|
|
671
669
|
/**
|
|
672
670
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
673
671
|
*
|
|
@@ -722,7 +720,7 @@ export class TablesDB {
|
|
|
722
720
|
* @throws {AppwriteException}
|
|
723
721
|
* @returns {Promise<Models.TableList>}
|
|
724
722
|
*/
|
|
725
|
-
listTables(params: { databaseId: string, queries?: string[], search?: string, total?: boolean
|
|
723
|
+
listTables(params: { databaseId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.TableList>;
|
|
726
724
|
/**
|
|
727
725
|
* Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
728
726
|
*
|
|
@@ -799,7 +797,7 @@ export class TablesDB {
|
|
|
799
797
|
* @throws {AppwriteException}
|
|
800
798
|
* @returns {Promise<Models.Table>}
|
|
801
799
|
*/
|
|
802
|
-
createTable(params: { databaseId: string, tableId: string, name: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean, columns?: object[], indexes?: object[]
|
|
800
|
+
createTable(params: { databaseId: string, tableId: string, name: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean, columns?: object[], indexes?: object[] }): Promise<Models.Table>;
|
|
803
801
|
/**
|
|
804
802
|
* 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.
|
|
805
803
|
*
|
|
@@ -901,7 +899,7 @@ export class TablesDB {
|
|
|
901
899
|
* @throws {AppwriteException}
|
|
902
900
|
* @returns {Promise<Models.Table>}
|
|
903
901
|
*/
|
|
904
|
-
getTable(params: { databaseId: string, tableId: string
|
|
902
|
+
getTable(params: { databaseId: string, tableId: string }): Promise<Models.Table>;
|
|
905
903
|
/**
|
|
906
904
|
* Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.
|
|
907
905
|
*
|
|
@@ -964,7 +962,7 @@ export class TablesDB {
|
|
|
964
962
|
* @throws {AppwriteException}
|
|
965
963
|
* @returns {Promise<Models.Table>}
|
|
966
964
|
*/
|
|
967
|
-
updateTable(params: { databaseId: string, tableId: string, name
|
|
965
|
+
updateTable(params: { databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean }): Promise<Models.Table>;
|
|
968
966
|
/**
|
|
969
967
|
* Update a table by its unique ID.
|
|
970
968
|
*
|
|
@@ -978,15 +976,15 @@ export class TablesDB {
|
|
|
978
976
|
* @returns {Promise<Models.Table>}
|
|
979
977
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
980
978
|
*/
|
|
981
|
-
updateTable(databaseId: string, tableId: string, name
|
|
979
|
+
updateTable(databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean): Promise<Models.Table>;
|
|
982
980
|
updateTable(
|
|
983
|
-
paramsOrFirst: { databaseId: string, tableId: string, name
|
|
981
|
+
paramsOrFirst: { databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean } | string,
|
|
984
982
|
...rest: [(string)?, (string)?, (string[])?, (boolean)?, (boolean)?]
|
|
985
983
|
): Promise<Models.Table> {
|
|
986
|
-
let params: { databaseId: string, tableId: string, name
|
|
984
|
+
let params: { databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean };
|
|
987
985
|
|
|
988
986
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
989
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, name
|
|
987
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, name?: string, permissions?: string[], rowSecurity?: boolean, enabled?: boolean };
|
|
990
988
|
} else {
|
|
991
989
|
params = {
|
|
992
990
|
databaseId: paramsOrFirst as string,
|
|
@@ -1011,9 +1009,6 @@ export class TablesDB {
|
|
|
1011
1009
|
if (typeof tableId === 'undefined') {
|
|
1012
1010
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
1013
1011
|
}
|
|
1014
|
-
if (typeof name === 'undefined') {
|
|
1015
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
1016
|
-
}
|
|
1017
1012
|
|
|
1018
1013
|
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
1019
1014
|
const payload: Payload = {};
|
|
@@ -1051,7 +1046,7 @@ export class TablesDB {
|
|
|
1051
1046
|
* @throws {AppwriteException}
|
|
1052
1047
|
* @returns {Promise<{}>}
|
|
1053
1048
|
*/
|
|
1054
|
-
deleteTable(params: { databaseId: string, tableId: string
|
|
1049
|
+
deleteTable(params: { databaseId: string, tableId: string }): Promise<{}>;
|
|
1055
1050
|
/**
|
|
1056
1051
|
* Delete a table by its unique ID. Only users with write permissions have access to delete this resource.
|
|
1057
1052
|
*
|
|
@@ -1113,7 +1108,7 @@ export class TablesDB {
|
|
|
1113
1108
|
* @throws {AppwriteException}
|
|
1114
1109
|
* @returns {Promise<Models.ColumnList>}
|
|
1115
1110
|
*/
|
|
1116
|
-
listColumns(params: { databaseId: string, tableId: string, queries?: string[], total?: boolean
|
|
1111
|
+
listColumns(params: { databaseId: string, tableId: string, queries?: string[], total?: boolean }): Promise<Models.ColumnList>;
|
|
1117
1112
|
/**
|
|
1118
1113
|
* List columns in the table.
|
|
1119
1114
|
*
|
|
@@ -1189,7 +1184,7 @@ export class TablesDB {
|
|
|
1189
1184
|
* @throws {AppwriteException}
|
|
1190
1185
|
* @returns {Promise<Models.ColumnBoolean>}
|
|
1191
1186
|
*/
|
|
1192
|
-
createBooleanColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean
|
|
1187
|
+
createBooleanColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean }): Promise<Models.ColumnBoolean>;
|
|
1193
1188
|
/**
|
|
1194
1189
|
* Create a boolean column.
|
|
1195
1190
|
*
|
|
@@ -1284,7 +1279,7 @@ export class TablesDB {
|
|
|
1284
1279
|
* @throws {AppwriteException}
|
|
1285
1280
|
* @returns {Promise<Models.ColumnBoolean>}
|
|
1286
1281
|
*/
|
|
1287
|
-
updateBooleanColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string
|
|
1282
|
+
updateBooleanColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string }): Promise<Models.ColumnBoolean>;
|
|
1288
1283
|
/**
|
|
1289
1284
|
* Update a boolean column. Changing the `default` value will not update already existing rows.
|
|
1290
1285
|
*
|
|
@@ -1378,7 +1373,7 @@ export class TablesDB {
|
|
|
1378
1373
|
* @throws {AppwriteException}
|
|
1379
1374
|
* @returns {Promise<Models.ColumnDatetime>}
|
|
1380
1375
|
*/
|
|
1381
|
-
createDatetimeColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean
|
|
1376
|
+
createDatetimeColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnDatetime>;
|
|
1382
1377
|
/**
|
|
1383
1378
|
* Create a date time column according to the ISO 8601 standard.
|
|
1384
1379
|
*
|
|
@@ -1472,7 +1467,7 @@ export class TablesDB {
|
|
|
1472
1467
|
* @throws {AppwriteException}
|
|
1473
1468
|
* @returns {Promise<Models.ColumnDatetime>}
|
|
1474
1469
|
*/
|
|
1475
|
-
updateDatetimeColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string
|
|
1470
|
+
updateDatetimeColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnDatetime>;
|
|
1476
1471
|
/**
|
|
1477
1472
|
* Update a date time column. Changing the `default` value will not update already existing rows.
|
|
1478
1473
|
*
|
|
@@ -1567,7 +1562,7 @@ export class TablesDB {
|
|
|
1567
1562
|
* @throws {AppwriteException}
|
|
1568
1563
|
* @returns {Promise<Models.ColumnEmail>}
|
|
1569
1564
|
*/
|
|
1570
|
-
createEmailColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean
|
|
1565
|
+
createEmailColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnEmail>;
|
|
1571
1566
|
/**
|
|
1572
1567
|
* Create an email column.
|
|
1573
1568
|
*
|
|
@@ -1663,7 +1658,7 @@ export class TablesDB {
|
|
|
1663
1658
|
* @throws {AppwriteException}
|
|
1664
1659
|
* @returns {Promise<Models.ColumnEmail>}
|
|
1665
1660
|
*/
|
|
1666
|
-
updateEmailColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string
|
|
1661
|
+
updateEmailColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnEmail>;
|
|
1667
1662
|
/**
|
|
1668
1663
|
* Update an email column. Changing the `default` value will not update already existing rows.
|
|
1669
1664
|
*
|
|
@@ -1759,7 +1754,7 @@ export class TablesDB {
|
|
|
1759
1754
|
* @throws {AppwriteException}
|
|
1760
1755
|
* @returns {Promise<Models.ColumnEnum>}
|
|
1761
1756
|
*/
|
|
1762
|
-
createEnumColumn(params: { databaseId: string, tableId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean
|
|
1757
|
+
createEnumColumn(params: { databaseId: string, tableId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnEnum>;
|
|
1763
1758
|
/**
|
|
1764
1759
|
* Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.
|
|
1765
1760
|
*
|
|
@@ -1864,7 +1859,7 @@ export class TablesDB {
|
|
|
1864
1859
|
* @throws {AppwriteException}
|
|
1865
1860
|
* @returns {Promise<Models.ColumnEnum>}
|
|
1866
1861
|
*/
|
|
1867
|
-
updateEnumColumn(params: { databaseId: string, tableId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string
|
|
1862
|
+
updateEnumColumn(params: { databaseId: string, tableId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnEnum>;
|
|
1868
1863
|
/**
|
|
1869
1864
|
* Update an enum column. Changing the `default` value will not update already existing rows.
|
|
1870
1865
|
*
|
|
@@ -1971,7 +1966,7 @@ export class TablesDB {
|
|
|
1971
1966
|
* @throws {AppwriteException}
|
|
1972
1967
|
* @returns {Promise<Models.ColumnFloat>}
|
|
1973
1968
|
*/
|
|
1974
|
-
createFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean
|
|
1969
|
+
createFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean }): Promise<Models.ColumnFloat>;
|
|
1975
1970
|
/**
|
|
1976
1971
|
* Create a float column. Optionally, minimum and maximum values can be provided.
|
|
1977
1972
|
*
|
|
@@ -2081,7 +2076,7 @@ export class TablesDB {
|
|
|
2081
2076
|
* @throws {AppwriteException}
|
|
2082
2077
|
* @returns {Promise<Models.ColumnFloat>}
|
|
2083
2078
|
*/
|
|
2084
|
-
updateFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string
|
|
2079
|
+
updateFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string }): Promise<Models.ColumnFloat>;
|
|
2085
2080
|
/**
|
|
2086
2081
|
* Update a float column. Changing the `default` value will not update already existing rows.
|
|
2087
2082
|
*
|
|
@@ -2191,7 +2186,7 @@ export class TablesDB {
|
|
|
2191
2186
|
* @throws {AppwriteException}
|
|
2192
2187
|
* @returns {Promise<Models.ColumnInteger>}
|
|
2193
2188
|
*/
|
|
2194
|
-
createIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean
|
|
2189
|
+
createIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean }): Promise<Models.ColumnInteger>;
|
|
2195
2190
|
/**
|
|
2196
2191
|
* Create an integer column. Optionally, minimum and maximum values can be provided.
|
|
2197
2192
|
*
|
|
@@ -2301,7 +2296,7 @@ export class TablesDB {
|
|
|
2301
2296
|
* @throws {AppwriteException}
|
|
2302
2297
|
* @returns {Promise<Models.ColumnInteger>}
|
|
2303
2298
|
*/
|
|
2304
|
-
updateIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string
|
|
2299
|
+
updateIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string }): Promise<Models.ColumnInteger>;
|
|
2305
2300
|
/**
|
|
2306
2301
|
* Update an integer column. Changing the `default` value will not update already existing rows.
|
|
2307
2302
|
*
|
|
@@ -2409,7 +2404,7 @@ export class TablesDB {
|
|
|
2409
2404
|
* @throws {AppwriteException}
|
|
2410
2405
|
* @returns {Promise<Models.ColumnIp>}
|
|
2411
2406
|
*/
|
|
2412
|
-
createIpColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean
|
|
2407
|
+
createIpColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnIp>;
|
|
2413
2408
|
/**
|
|
2414
2409
|
* Create IP address column.
|
|
2415
2410
|
*
|
|
@@ -2505,7 +2500,7 @@ export class TablesDB {
|
|
|
2505
2500
|
* @throws {AppwriteException}
|
|
2506
2501
|
* @returns {Promise<Models.ColumnIp>}
|
|
2507
2502
|
*/
|
|
2508
|
-
updateIpColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string
|
|
2503
|
+
updateIpColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnIp>;
|
|
2509
2504
|
/**
|
|
2510
2505
|
* Update an ip column. Changing the `default` value will not update already existing rows.
|
|
2511
2506
|
*
|
|
@@ -2599,7 +2594,7 @@ export class TablesDB {
|
|
|
2599
2594
|
* @throws {AppwriteException}
|
|
2600
2595
|
* @returns {Promise<Models.ColumnLine>}
|
|
2601
2596
|
*/
|
|
2602
|
-
createLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]
|
|
2597
|
+
createLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }): Promise<Models.ColumnLine>;
|
|
2603
2598
|
/**
|
|
2604
2599
|
* Create a geometric line column.
|
|
2605
2600
|
*
|
|
@@ -2687,7 +2682,7 @@ export class TablesDB {
|
|
|
2687
2682
|
* @throws {AppwriteException}
|
|
2688
2683
|
* @returns {Promise<Models.ColumnLine>}
|
|
2689
2684
|
*/
|
|
2690
|
-
updateLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string
|
|
2685
|
+
updateLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise<Models.ColumnLine>;
|
|
2691
2686
|
/**
|
|
2692
2687
|
* Update a line column. Changing the `default` value will not update already existing rows.
|
|
2693
2688
|
*
|
|
@@ -2767,45 +2762,50 @@ export class TablesDB {
|
|
|
2767
2762
|
}
|
|
2768
2763
|
|
|
2769
2764
|
/**
|
|
2770
|
-
* Create a
|
|
2765
|
+
* Create a longtext column.
|
|
2766
|
+
*
|
|
2771
2767
|
*
|
|
2772
2768
|
* @param {string} params.databaseId - Database ID.
|
|
2773
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the
|
|
2769
|
+
* @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).
|
|
2774
2770
|
* @param {string} params.key - Column Key.
|
|
2775
2771
|
* @param {boolean} params.required - Is column required?
|
|
2776
|
-
* @param {
|
|
2772
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
2773
|
+
* @param {boolean} params.array - Is column an array?
|
|
2777
2774
|
* @throws {AppwriteException}
|
|
2778
|
-
* @returns {Promise<Models.
|
|
2775
|
+
* @returns {Promise<Models.ColumnLongtext>}
|
|
2779
2776
|
*/
|
|
2780
|
-
|
|
2777
|
+
createLongtextColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnLongtext>;
|
|
2781
2778
|
/**
|
|
2782
|
-
* Create a
|
|
2779
|
+
* Create a longtext column.
|
|
2780
|
+
*
|
|
2783
2781
|
*
|
|
2784
2782
|
* @param {string} databaseId - Database ID.
|
|
2785
|
-
* @param {string} tableId - Table ID. You can create a new table using the
|
|
2783
|
+
* @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).
|
|
2786
2784
|
* @param {string} key - Column Key.
|
|
2787
2785
|
* @param {boolean} required - Is column required?
|
|
2788
|
-
* @param {
|
|
2786
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
2787
|
+
* @param {boolean} array - Is column an array?
|
|
2789
2788
|
* @throws {AppwriteException}
|
|
2790
|
-
* @returns {Promise<Models.
|
|
2789
|
+
* @returns {Promise<Models.ColumnLongtext>}
|
|
2791
2790
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2792
2791
|
*/
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2796
|
-
...rest: [(string)?, (string)?, (boolean)?, (
|
|
2797
|
-
): Promise<Models.
|
|
2798
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2792
|
+
createLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnLongtext>;
|
|
2793
|
+
createLongtextColumn(
|
|
2794
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
2795
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
2796
|
+
): Promise<Models.ColumnLongtext> {
|
|
2797
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2799
2798
|
|
|
2800
2799
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2801
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2800
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2802
2801
|
} else {
|
|
2803
2802
|
params = {
|
|
2804
2803
|
databaseId: paramsOrFirst as string,
|
|
2805
2804
|
tableId: rest[0] as string,
|
|
2806
2805
|
key: rest[1] as string,
|
|
2807
2806
|
required: rest[2] as boolean,
|
|
2808
|
-
xdefault: rest[3] as
|
|
2807
|
+
xdefault: rest[3] as string,
|
|
2808
|
+
array: rest[4] as boolean
|
|
2809
2809
|
};
|
|
2810
2810
|
}
|
|
2811
2811
|
|
|
@@ -2814,6 +2814,7 @@ export class TablesDB {
|
|
|
2814
2814
|
const key = params.key;
|
|
2815
2815
|
const required = params.required;
|
|
2816
2816
|
const xdefault = params.xdefault;
|
|
2817
|
+
const array = params.array;
|
|
2817
2818
|
|
|
2818
2819
|
if (typeof databaseId === 'undefined') {
|
|
2819
2820
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -2828,7 +2829,7 @@ export class TablesDB {
|
|
|
2828
2829
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
2829
2830
|
}
|
|
2830
2831
|
|
|
2831
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
2832
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
2832
2833
|
const payload: Payload = {};
|
|
2833
2834
|
if (typeof key !== 'undefined') {
|
|
2834
2835
|
payload['key'] = key;
|
|
@@ -2839,6 +2840,9 @@ export class TablesDB {
|
|
|
2839
2840
|
if (typeof xdefault !== 'undefined') {
|
|
2840
2841
|
payload['default'] = xdefault;
|
|
2841
2842
|
}
|
|
2843
|
+
if (typeof array !== 'undefined') {
|
|
2844
|
+
payload['array'] = array;
|
|
2845
|
+
}
|
|
2842
2846
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2843
2847
|
|
|
2844
2848
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2854,47 +2858,49 @@ export class TablesDB {
|
|
|
2854
2858
|
}
|
|
2855
2859
|
|
|
2856
2860
|
/**
|
|
2857
|
-
* Update a
|
|
2861
|
+
* Update a longtext column. Changing the `default` value will not update already existing rows.
|
|
2862
|
+
*
|
|
2858
2863
|
*
|
|
2859
2864
|
* @param {string} params.databaseId - Database ID.
|
|
2860
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the
|
|
2865
|
+
* @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).
|
|
2861
2866
|
* @param {string} params.key - Column Key.
|
|
2862
2867
|
* @param {boolean} params.required - Is column required?
|
|
2863
|
-
* @param {
|
|
2868
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
2864
2869
|
* @param {string} params.newKey - New Column Key.
|
|
2865
2870
|
* @throws {AppwriteException}
|
|
2866
|
-
* @returns {Promise<Models.
|
|
2871
|
+
* @returns {Promise<Models.ColumnLongtext>}
|
|
2867
2872
|
*/
|
|
2868
|
-
|
|
2873
|
+
updateLongtextColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnLongtext>;
|
|
2869
2874
|
/**
|
|
2870
|
-
* Update a
|
|
2875
|
+
* Update a longtext column. Changing the `default` value will not update already existing rows.
|
|
2876
|
+
*
|
|
2871
2877
|
*
|
|
2872
2878
|
* @param {string} databaseId - Database ID.
|
|
2873
|
-
* @param {string} tableId - Table ID. You can create a new table using the
|
|
2879
|
+
* @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).
|
|
2874
2880
|
* @param {string} key - Column Key.
|
|
2875
2881
|
* @param {boolean} required - Is column required?
|
|
2876
|
-
* @param {
|
|
2882
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
2877
2883
|
* @param {string} newKey - New Column Key.
|
|
2878
2884
|
* @throws {AppwriteException}
|
|
2879
|
-
* @returns {Promise<Models.
|
|
2885
|
+
* @returns {Promise<Models.ColumnLongtext>}
|
|
2880
2886
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2881
2887
|
*/
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2885
|
-
...rest: [(string)?, (string)?, (boolean)?, (
|
|
2886
|
-
): Promise<Models.
|
|
2887
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2888
|
+
updateLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.ColumnLongtext>;
|
|
2889
|
+
updateLongtextColumn(
|
|
2890
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string } | string,
|
|
2891
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
2892
|
+
): Promise<Models.ColumnLongtext> {
|
|
2893
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string };
|
|
2888
2894
|
|
|
2889
2895
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2890
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2896
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string };
|
|
2891
2897
|
} else {
|
|
2892
2898
|
params = {
|
|
2893
2899
|
databaseId: paramsOrFirst as string,
|
|
2894
2900
|
tableId: rest[0] as string,
|
|
2895
2901
|
key: rest[1] as string,
|
|
2896
2902
|
required: rest[2] as boolean,
|
|
2897
|
-
xdefault: rest[3] as
|
|
2903
|
+
xdefault: rest[3] as string,
|
|
2898
2904
|
newKey: rest[4] as string
|
|
2899
2905
|
};
|
|
2900
2906
|
}
|
|
@@ -2918,8 +2924,11 @@ export class TablesDB {
|
|
|
2918
2924
|
if (typeof required === 'undefined') {
|
|
2919
2925
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
2920
2926
|
}
|
|
2927
|
+
if (typeof xdefault === 'undefined') {
|
|
2928
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
2929
|
+
}
|
|
2921
2930
|
|
|
2922
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
2931
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
2923
2932
|
const payload: Payload = {};
|
|
2924
2933
|
if (typeof required !== 'undefined') {
|
|
2925
2934
|
payload['required'] = required;
|
|
@@ -2945,45 +2954,50 @@ export class TablesDB {
|
|
|
2945
2954
|
}
|
|
2946
2955
|
|
|
2947
2956
|
/**
|
|
2948
|
-
* Create a
|
|
2957
|
+
* Create a mediumtext column.
|
|
2958
|
+
*
|
|
2949
2959
|
*
|
|
2950
2960
|
* @param {string} params.databaseId - Database ID.
|
|
2951
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the
|
|
2961
|
+
* @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).
|
|
2952
2962
|
* @param {string} params.key - Column Key.
|
|
2953
2963
|
* @param {boolean} params.required - Is column required?
|
|
2954
|
-
* @param {
|
|
2964
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
2965
|
+
* @param {boolean} params.array - Is column an array?
|
|
2955
2966
|
* @throws {AppwriteException}
|
|
2956
|
-
* @returns {Promise<Models.
|
|
2967
|
+
* @returns {Promise<Models.ColumnMediumtext>}
|
|
2957
2968
|
*/
|
|
2958
|
-
|
|
2969
|
+
createMediumtextColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnMediumtext>;
|
|
2959
2970
|
/**
|
|
2960
|
-
* Create a
|
|
2971
|
+
* Create a mediumtext column.
|
|
2972
|
+
*
|
|
2961
2973
|
*
|
|
2962
2974
|
* @param {string} databaseId - Database ID.
|
|
2963
|
-
* @param {string} tableId - Table ID. You can create a new table using the
|
|
2975
|
+
* @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).
|
|
2964
2976
|
* @param {string} key - Column Key.
|
|
2965
2977
|
* @param {boolean} required - Is column required?
|
|
2966
|
-
* @param {
|
|
2978
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
2979
|
+
* @param {boolean} array - Is column an array?
|
|
2967
2980
|
* @throws {AppwriteException}
|
|
2968
|
-
* @returns {Promise<Models.
|
|
2981
|
+
* @returns {Promise<Models.ColumnMediumtext>}
|
|
2969
2982
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2970
2983
|
*/
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2974
|
-
...rest: [(string)?, (string)?, (boolean)?, (
|
|
2975
|
-
): Promise<Models.
|
|
2976
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2984
|
+
createMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnMediumtext>;
|
|
2985
|
+
createMediumtextColumn(
|
|
2986
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
2987
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
2988
|
+
): Promise<Models.ColumnMediumtext> {
|
|
2989
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2977
2990
|
|
|
2978
2991
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2979
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
2992
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2980
2993
|
} else {
|
|
2981
2994
|
params = {
|
|
2982
2995
|
databaseId: paramsOrFirst as string,
|
|
2983
2996
|
tableId: rest[0] as string,
|
|
2984
2997
|
key: rest[1] as string,
|
|
2985
2998
|
required: rest[2] as boolean,
|
|
2986
|
-
xdefault: rest[3] as
|
|
2999
|
+
xdefault: rest[3] as string,
|
|
3000
|
+
array: rest[4] as boolean
|
|
2987
3001
|
};
|
|
2988
3002
|
}
|
|
2989
3003
|
|
|
@@ -2992,6 +3006,7 @@ export class TablesDB {
|
|
|
2992
3006
|
const key = params.key;
|
|
2993
3007
|
const required = params.required;
|
|
2994
3008
|
const xdefault = params.xdefault;
|
|
3009
|
+
const array = params.array;
|
|
2995
3010
|
|
|
2996
3011
|
if (typeof databaseId === 'undefined') {
|
|
2997
3012
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -3006,7 +3021,7 @@ export class TablesDB {
|
|
|
3006
3021
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
3007
3022
|
}
|
|
3008
3023
|
|
|
3009
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
3024
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
3010
3025
|
const payload: Payload = {};
|
|
3011
3026
|
if (typeof key !== 'undefined') {
|
|
3012
3027
|
payload['key'] = key;
|
|
@@ -3017,6 +3032,9 @@ export class TablesDB {
|
|
|
3017
3032
|
if (typeof xdefault !== 'undefined') {
|
|
3018
3033
|
payload['default'] = xdefault;
|
|
3019
3034
|
}
|
|
3035
|
+
if (typeof array !== 'undefined') {
|
|
3036
|
+
payload['array'] = array;
|
|
3037
|
+
}
|
|
3020
3038
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3021
3039
|
|
|
3022
3040
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -3032,47 +3050,49 @@ export class TablesDB {
|
|
|
3032
3050
|
}
|
|
3033
3051
|
|
|
3034
3052
|
/**
|
|
3035
|
-
* Update a
|
|
3053
|
+
* Update a mediumtext column. Changing the `default` value will not update already existing rows.
|
|
3054
|
+
*
|
|
3036
3055
|
*
|
|
3037
3056
|
* @param {string} params.databaseId - Database ID.
|
|
3038
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the
|
|
3057
|
+
* @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).
|
|
3039
3058
|
* @param {string} params.key - Column Key.
|
|
3040
3059
|
* @param {boolean} params.required - Is column required?
|
|
3041
|
-
* @param {
|
|
3060
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3042
3061
|
* @param {string} params.newKey - New Column Key.
|
|
3043
3062
|
* @throws {AppwriteException}
|
|
3044
|
-
* @returns {Promise<Models.
|
|
3063
|
+
* @returns {Promise<Models.ColumnMediumtext>}
|
|
3045
3064
|
*/
|
|
3046
|
-
|
|
3065
|
+
updateMediumtextColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnMediumtext>;
|
|
3047
3066
|
/**
|
|
3048
|
-
* Update a
|
|
3067
|
+
* Update a mediumtext column. Changing the `default` value will not update already existing rows.
|
|
3068
|
+
*
|
|
3049
3069
|
*
|
|
3050
3070
|
* @param {string} databaseId - Database ID.
|
|
3051
|
-
* @param {string} tableId - Table ID. You can create a new table using the
|
|
3071
|
+
* @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).
|
|
3052
3072
|
* @param {string} key - Column Key.
|
|
3053
3073
|
* @param {boolean} required - Is column required?
|
|
3054
|
-
* @param {
|
|
3074
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3055
3075
|
* @param {string} newKey - New Column Key.
|
|
3056
3076
|
* @throws {AppwriteException}
|
|
3057
|
-
* @returns {Promise<Models.
|
|
3077
|
+
* @returns {Promise<Models.ColumnMediumtext>}
|
|
3058
3078
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3059
3079
|
*/
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
3063
|
-
...rest: [(string)?, (string)?, (boolean)?, (
|
|
3064
|
-
): Promise<Models.
|
|
3065
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
3080
|
+
updateMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.ColumnMediumtext>;
|
|
3081
|
+
updateMediumtextColumn(
|
|
3082
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string } | string,
|
|
3083
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
3084
|
+
): Promise<Models.ColumnMediumtext> {
|
|
3085
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string };
|
|
3066
3086
|
|
|
3067
3087
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3068
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?:
|
|
3088
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string };
|
|
3069
3089
|
} else {
|
|
3070
3090
|
params = {
|
|
3071
3091
|
databaseId: paramsOrFirst as string,
|
|
3072
3092
|
tableId: rest[0] as string,
|
|
3073
3093
|
key: rest[1] as string,
|
|
3074
3094
|
required: rest[2] as boolean,
|
|
3075
|
-
xdefault: rest[3] as
|
|
3095
|
+
xdefault: rest[3] as string,
|
|
3076
3096
|
newKey: rest[4] as string
|
|
3077
3097
|
};
|
|
3078
3098
|
}
|
|
@@ -3096,8 +3116,11 @@ export class TablesDB {
|
|
|
3096
3116
|
if (typeof required === 'undefined') {
|
|
3097
3117
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
3098
3118
|
}
|
|
3119
|
+
if (typeof xdefault === 'undefined') {
|
|
3120
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
3121
|
+
}
|
|
3099
3122
|
|
|
3100
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
3123
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
3101
3124
|
const payload: Payload = {};
|
|
3102
3125
|
if (typeof required !== 'undefined') {
|
|
3103
3126
|
payload['required'] = required;
|
|
@@ -3123,67 +3146,53 @@ export class TablesDB {
|
|
|
3123
3146
|
}
|
|
3124
3147
|
|
|
3125
3148
|
/**
|
|
3126
|
-
* Create
|
|
3127
|
-
*
|
|
3149
|
+
* Create a geometric point column.
|
|
3128
3150
|
*
|
|
3129
3151
|
* @param {string} params.databaseId - Database ID.
|
|
3130
|
-
* @param {string} params.tableId - Table ID.
|
|
3131
|
-
* @param {string} params.relatedTableId - Related Table ID.
|
|
3132
|
-
* @param {RelationshipType} params.type - Relation type
|
|
3133
|
-
* @param {boolean} params.twoWay - Is Two Way?
|
|
3152
|
+
* @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).
|
|
3134
3153
|
* @param {string} params.key - Column Key.
|
|
3135
|
-
* @param {
|
|
3136
|
-
* @param {
|
|
3154
|
+
* @param {boolean} params.required - Is column required?
|
|
3155
|
+
* @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
3137
3156
|
* @throws {AppwriteException}
|
|
3138
|
-
* @returns {Promise<Models.
|
|
3157
|
+
* @returns {Promise<Models.ColumnPoint>}
|
|
3139
3158
|
*/
|
|
3140
|
-
|
|
3159
|
+
createPointColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }): Promise<Models.ColumnPoint>;
|
|
3141
3160
|
/**
|
|
3142
|
-
* Create
|
|
3143
|
-
*
|
|
3161
|
+
* Create a geometric point column.
|
|
3144
3162
|
*
|
|
3145
3163
|
* @param {string} databaseId - Database ID.
|
|
3146
|
-
* @param {string} tableId - Table ID.
|
|
3147
|
-
* @param {string} relatedTableId - Related Table ID.
|
|
3148
|
-
* @param {RelationshipType} type - Relation type
|
|
3149
|
-
* @param {boolean} twoWay - Is Two Way?
|
|
3164
|
+
* @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).
|
|
3150
3165
|
* @param {string} key - Column Key.
|
|
3151
|
-
* @param {
|
|
3152
|
-
* @param {
|
|
3166
|
+
* @param {boolean} required - Is column required?
|
|
3167
|
+
* @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
3153
3168
|
* @throws {AppwriteException}
|
|
3154
|
-
* @returns {Promise<Models.
|
|
3169
|
+
* @returns {Promise<Models.ColumnPoint>}
|
|
3155
3170
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3156
3171
|
*/
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
paramsOrFirst: { databaseId: string, tableId: string,
|
|
3160
|
-
...rest: [(string)?, (string)?, (
|
|
3161
|
-
): Promise<Models.
|
|
3162
|
-
let params: { databaseId: string, tableId: string,
|
|
3172
|
+
createPointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.ColumnPoint>;
|
|
3173
|
+
createPointColumn(
|
|
3174
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] } | string,
|
|
3175
|
+
...rest: [(string)?, (string)?, (boolean)?, (any[])?]
|
|
3176
|
+
): Promise<Models.ColumnPoint> {
|
|
3177
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] };
|
|
3163
3178
|
|
|
3164
3179
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3165
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string,
|
|
3180
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] };
|
|
3166
3181
|
} else {
|
|
3167
3182
|
params = {
|
|
3168
3183
|
databaseId: paramsOrFirst as string,
|
|
3169
3184
|
tableId: rest[0] as string,
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
key: rest[4] as string,
|
|
3174
|
-
twoWayKey: rest[5] as string,
|
|
3175
|
-
onDelete: rest[6] as RelationMutate
|
|
3185
|
+
key: rest[1] as string,
|
|
3186
|
+
required: rest[2] as boolean,
|
|
3187
|
+
xdefault: rest[3] as any[]
|
|
3176
3188
|
};
|
|
3177
3189
|
}
|
|
3178
3190
|
|
|
3179
3191
|
const databaseId = params.databaseId;
|
|
3180
3192
|
const tableId = params.tableId;
|
|
3181
|
-
const relatedTableId = params.relatedTableId;
|
|
3182
|
-
const type = params.type;
|
|
3183
|
-
const twoWay = params.twoWay;
|
|
3184
3193
|
const key = params.key;
|
|
3185
|
-
const
|
|
3186
|
-
const
|
|
3194
|
+
const required = params.required;
|
|
3195
|
+
const xdefault = params.xdefault;
|
|
3187
3196
|
|
|
3188
3197
|
if (typeof databaseId === 'undefined') {
|
|
3189
3198
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -3191,32 +3200,23 @@ export class TablesDB {
|
|
|
3191
3200
|
if (typeof tableId === 'undefined') {
|
|
3192
3201
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
3193
3202
|
}
|
|
3194
|
-
if (typeof
|
|
3195
|
-
throw new AppwriteException('Missing required parameter: "
|
|
3203
|
+
if (typeof key === 'undefined') {
|
|
3204
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
3196
3205
|
}
|
|
3197
|
-
if (typeof
|
|
3198
|
-
throw new AppwriteException('Missing required parameter: "
|
|
3206
|
+
if (typeof required === 'undefined') {
|
|
3207
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
3199
3208
|
}
|
|
3200
3209
|
|
|
3201
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
3210
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
3202
3211
|
const payload: Payload = {};
|
|
3203
|
-
if (typeof relatedTableId !== 'undefined') {
|
|
3204
|
-
payload['relatedTableId'] = relatedTableId;
|
|
3205
|
-
}
|
|
3206
|
-
if (typeof type !== 'undefined') {
|
|
3207
|
-
payload['type'] = type;
|
|
3208
|
-
}
|
|
3209
|
-
if (typeof twoWay !== 'undefined') {
|
|
3210
|
-
payload['twoWay'] = twoWay;
|
|
3211
|
-
}
|
|
3212
3212
|
if (typeof key !== 'undefined') {
|
|
3213
3213
|
payload['key'] = key;
|
|
3214
3214
|
}
|
|
3215
|
-
if (typeof
|
|
3216
|
-
payload['
|
|
3215
|
+
if (typeof required !== 'undefined') {
|
|
3216
|
+
payload['required'] = required;
|
|
3217
3217
|
}
|
|
3218
|
-
if (typeof
|
|
3219
|
-
payload['
|
|
3218
|
+
if (typeof xdefault !== 'undefined') {
|
|
3219
|
+
payload['default'] = xdefault;
|
|
3220
3220
|
}
|
|
3221
3221
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3222
3222
|
|
|
@@ -3233,67 +3233,656 @@ export class TablesDB {
|
|
|
3233
3233
|
}
|
|
3234
3234
|
|
|
3235
3235
|
/**
|
|
3236
|
-
*
|
|
3237
|
-
*
|
|
3236
|
+
* Update a point column. Changing the `default` value will not update already existing rows.
|
|
3238
3237
|
*
|
|
3239
3238
|
* @param {string} params.databaseId - Database ID.
|
|
3240
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the
|
|
3239
|
+
* @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).
|
|
3241
3240
|
* @param {string} params.key - Column Key.
|
|
3242
|
-
* @param {number} params.size - Column size for text columns, in number of characters.
|
|
3243
3241
|
* @param {boolean} params.required - Is column required?
|
|
3244
|
-
* @param {
|
|
3245
|
-
* @param {
|
|
3246
|
-
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
3242
|
+
* @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
3243
|
+
* @param {string} params.newKey - New Column Key.
|
|
3247
3244
|
* @throws {AppwriteException}
|
|
3248
|
-
* @returns {Promise<Models.
|
|
3245
|
+
* @returns {Promise<Models.ColumnPoint>}
|
|
3249
3246
|
*/
|
|
3250
|
-
|
|
3247
|
+
updatePointColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise<Models.ColumnPoint>;
|
|
3251
3248
|
/**
|
|
3252
|
-
*
|
|
3253
|
-
*
|
|
3249
|
+
* Update a point column. Changing the `default` value will not update already existing rows.
|
|
3254
3250
|
*
|
|
3255
3251
|
* @param {string} databaseId - Database ID.
|
|
3256
|
-
* @param {string} tableId - Table ID. You can create a new table using the
|
|
3252
|
+
* @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).
|
|
3257
3253
|
* @param {string} key - Column Key.
|
|
3258
|
-
* @param {number} size - Column size for text columns, in number of characters.
|
|
3259
3254
|
* @param {boolean} required - Is column required?
|
|
3260
|
-
* @param {
|
|
3261
|
-
* @param {
|
|
3262
|
-
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
3255
|
+
* @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
3256
|
+
* @param {string} newKey - New Column Key.
|
|
3263
3257
|
* @throws {AppwriteException}
|
|
3264
|
-
* @returns {Promise<Models.
|
|
3258
|
+
* @returns {Promise<Models.ColumnPoint>}
|
|
3265
3259
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3266
3260
|
*/
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string,
|
|
3270
|
-
...rest: [(string)?, (string)?, (
|
|
3261
|
+
updatePointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.ColumnPoint>;
|
|
3262
|
+
updatePointColumn(
|
|
3263
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string,
|
|
3264
|
+
...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?]
|
|
3265
|
+
): Promise<Models.ColumnPoint> {
|
|
3266
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string };
|
|
3267
|
+
|
|
3268
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3269
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string };
|
|
3270
|
+
} else {
|
|
3271
|
+
params = {
|
|
3272
|
+
databaseId: paramsOrFirst as string,
|
|
3273
|
+
tableId: rest[0] as string,
|
|
3274
|
+
key: rest[1] as string,
|
|
3275
|
+
required: rest[2] as boolean,
|
|
3276
|
+
xdefault: rest[3] as any[],
|
|
3277
|
+
newKey: rest[4] as string
|
|
3278
|
+
};
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
const databaseId = params.databaseId;
|
|
3282
|
+
const tableId = params.tableId;
|
|
3283
|
+
const key = params.key;
|
|
3284
|
+
const required = params.required;
|
|
3285
|
+
const xdefault = params.xdefault;
|
|
3286
|
+
const newKey = params.newKey;
|
|
3287
|
+
|
|
3288
|
+
if (typeof databaseId === 'undefined') {
|
|
3289
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
3290
|
+
}
|
|
3291
|
+
if (typeof tableId === 'undefined') {
|
|
3292
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
3293
|
+
}
|
|
3294
|
+
if (typeof key === 'undefined') {
|
|
3295
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
3296
|
+
}
|
|
3297
|
+
if (typeof required === 'undefined') {
|
|
3298
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
3302
|
+
const payload: Payload = {};
|
|
3303
|
+
if (typeof required !== 'undefined') {
|
|
3304
|
+
payload['required'] = required;
|
|
3305
|
+
}
|
|
3306
|
+
if (typeof xdefault !== 'undefined') {
|
|
3307
|
+
payload['default'] = xdefault;
|
|
3308
|
+
}
|
|
3309
|
+
if (typeof newKey !== 'undefined') {
|
|
3310
|
+
payload['newKey'] = newKey;
|
|
3311
|
+
}
|
|
3312
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3313
|
+
|
|
3314
|
+
const apiHeaders: { [header: string]: string } = {
|
|
3315
|
+
'content-type': 'application/json',
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
return this.client.call(
|
|
3319
|
+
'patch',
|
|
3320
|
+
uri,
|
|
3321
|
+
apiHeaders,
|
|
3322
|
+
payload
|
|
3323
|
+
);
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
/**
|
|
3327
|
+
* Create a geometric polygon column.
|
|
3328
|
+
*
|
|
3329
|
+
* @param {string} params.databaseId - Database ID.
|
|
3330
|
+
* @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).
|
|
3331
|
+
* @param {string} params.key - Column Key.
|
|
3332
|
+
* @param {boolean} params.required - Is column required?
|
|
3333
|
+
* @param {any[]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
|
|
3334
|
+
* @throws {AppwriteException}
|
|
3335
|
+
* @returns {Promise<Models.ColumnPolygon>}
|
|
3336
|
+
*/
|
|
3337
|
+
createPolygonColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }): Promise<Models.ColumnPolygon>;
|
|
3338
|
+
/**
|
|
3339
|
+
* Create a geometric polygon column.
|
|
3340
|
+
*
|
|
3341
|
+
* @param {string} databaseId - Database ID.
|
|
3342
|
+
* @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).
|
|
3343
|
+
* @param {string} key - Column Key.
|
|
3344
|
+
* @param {boolean} required - Is column required?
|
|
3345
|
+
* @param {any[]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
|
|
3346
|
+
* @throws {AppwriteException}
|
|
3347
|
+
* @returns {Promise<Models.ColumnPolygon>}
|
|
3348
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3349
|
+
*/
|
|
3350
|
+
createPolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.ColumnPolygon>;
|
|
3351
|
+
createPolygonColumn(
|
|
3352
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] } | string,
|
|
3353
|
+
...rest: [(string)?, (string)?, (boolean)?, (any[])?]
|
|
3354
|
+
): Promise<Models.ColumnPolygon> {
|
|
3355
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] };
|
|
3356
|
+
|
|
3357
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3358
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] };
|
|
3359
|
+
} else {
|
|
3360
|
+
params = {
|
|
3361
|
+
databaseId: paramsOrFirst as string,
|
|
3362
|
+
tableId: rest[0] as string,
|
|
3363
|
+
key: rest[1] as string,
|
|
3364
|
+
required: rest[2] as boolean,
|
|
3365
|
+
xdefault: rest[3] as any[]
|
|
3366
|
+
};
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
const databaseId = params.databaseId;
|
|
3370
|
+
const tableId = params.tableId;
|
|
3371
|
+
const key = params.key;
|
|
3372
|
+
const required = params.required;
|
|
3373
|
+
const xdefault = params.xdefault;
|
|
3374
|
+
|
|
3375
|
+
if (typeof databaseId === 'undefined') {
|
|
3376
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
3377
|
+
}
|
|
3378
|
+
if (typeof tableId === 'undefined') {
|
|
3379
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
3380
|
+
}
|
|
3381
|
+
if (typeof key === 'undefined') {
|
|
3382
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
3383
|
+
}
|
|
3384
|
+
if (typeof required === 'undefined') {
|
|
3385
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
3389
|
+
const payload: Payload = {};
|
|
3390
|
+
if (typeof key !== 'undefined') {
|
|
3391
|
+
payload['key'] = key;
|
|
3392
|
+
}
|
|
3393
|
+
if (typeof required !== 'undefined') {
|
|
3394
|
+
payload['required'] = required;
|
|
3395
|
+
}
|
|
3396
|
+
if (typeof xdefault !== 'undefined') {
|
|
3397
|
+
payload['default'] = xdefault;
|
|
3398
|
+
}
|
|
3399
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3400
|
+
|
|
3401
|
+
const apiHeaders: { [header: string]: string } = {
|
|
3402
|
+
'content-type': 'application/json',
|
|
3403
|
+
}
|
|
3404
|
+
|
|
3405
|
+
return this.client.call(
|
|
3406
|
+
'post',
|
|
3407
|
+
uri,
|
|
3408
|
+
apiHeaders,
|
|
3409
|
+
payload
|
|
3410
|
+
);
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
/**
|
|
3414
|
+
* Update a polygon column. Changing the `default` value will not update already existing rows.
|
|
3415
|
+
*
|
|
3416
|
+
* @param {string} params.databaseId - Database ID.
|
|
3417
|
+
* @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).
|
|
3418
|
+
* @param {string} params.key - Column Key.
|
|
3419
|
+
* @param {boolean} params.required - Is column required?
|
|
3420
|
+
* @param {any[]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
|
|
3421
|
+
* @param {string} params.newKey - New Column Key.
|
|
3422
|
+
* @throws {AppwriteException}
|
|
3423
|
+
* @returns {Promise<Models.ColumnPolygon>}
|
|
3424
|
+
*/
|
|
3425
|
+
updatePolygonColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise<Models.ColumnPolygon>;
|
|
3426
|
+
/**
|
|
3427
|
+
* Update a polygon column. Changing the `default` value will not update already existing rows.
|
|
3428
|
+
*
|
|
3429
|
+
* @param {string} databaseId - Database ID.
|
|
3430
|
+
* @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).
|
|
3431
|
+
* @param {string} key - Column Key.
|
|
3432
|
+
* @param {boolean} required - Is column required?
|
|
3433
|
+
* @param {any[]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
|
|
3434
|
+
* @param {string} newKey - New Column Key.
|
|
3435
|
+
* @throws {AppwriteException}
|
|
3436
|
+
* @returns {Promise<Models.ColumnPolygon>}
|
|
3437
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3438
|
+
*/
|
|
3439
|
+
updatePolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.ColumnPolygon>;
|
|
3440
|
+
updatePolygonColumn(
|
|
3441
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string,
|
|
3442
|
+
...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?]
|
|
3443
|
+
): Promise<Models.ColumnPolygon> {
|
|
3444
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string };
|
|
3445
|
+
|
|
3446
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3447
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string };
|
|
3448
|
+
} else {
|
|
3449
|
+
params = {
|
|
3450
|
+
databaseId: paramsOrFirst as string,
|
|
3451
|
+
tableId: rest[0] as string,
|
|
3452
|
+
key: rest[1] as string,
|
|
3453
|
+
required: rest[2] as boolean,
|
|
3454
|
+
xdefault: rest[3] as any[],
|
|
3455
|
+
newKey: rest[4] as string
|
|
3456
|
+
};
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
const databaseId = params.databaseId;
|
|
3460
|
+
const tableId = params.tableId;
|
|
3461
|
+
const key = params.key;
|
|
3462
|
+
const required = params.required;
|
|
3463
|
+
const xdefault = params.xdefault;
|
|
3464
|
+
const newKey = params.newKey;
|
|
3465
|
+
|
|
3466
|
+
if (typeof databaseId === 'undefined') {
|
|
3467
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
3468
|
+
}
|
|
3469
|
+
if (typeof tableId === 'undefined') {
|
|
3470
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
3471
|
+
}
|
|
3472
|
+
if (typeof key === 'undefined') {
|
|
3473
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
3474
|
+
}
|
|
3475
|
+
if (typeof required === 'undefined') {
|
|
3476
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
3477
|
+
}
|
|
3478
|
+
|
|
3479
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
3480
|
+
const payload: Payload = {};
|
|
3481
|
+
if (typeof required !== 'undefined') {
|
|
3482
|
+
payload['required'] = required;
|
|
3483
|
+
}
|
|
3484
|
+
if (typeof xdefault !== 'undefined') {
|
|
3485
|
+
payload['default'] = xdefault;
|
|
3486
|
+
}
|
|
3487
|
+
if (typeof newKey !== 'undefined') {
|
|
3488
|
+
payload['newKey'] = newKey;
|
|
3489
|
+
}
|
|
3490
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3491
|
+
|
|
3492
|
+
const apiHeaders: { [header: string]: string } = {
|
|
3493
|
+
'content-type': 'application/json',
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
return this.client.call(
|
|
3497
|
+
'patch',
|
|
3498
|
+
uri,
|
|
3499
|
+
apiHeaders,
|
|
3500
|
+
payload
|
|
3501
|
+
);
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
/**
|
|
3505
|
+
* Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
3506
|
+
*
|
|
3507
|
+
*
|
|
3508
|
+
* @param {string} params.databaseId - Database ID.
|
|
3509
|
+
* @param {string} params.tableId - Table ID.
|
|
3510
|
+
* @param {string} params.relatedTableId - Related Table ID.
|
|
3511
|
+
* @param {RelationshipType} params.type - Relation type
|
|
3512
|
+
* @param {boolean} params.twoWay - Is Two Way?
|
|
3513
|
+
* @param {string} params.key - Column Key.
|
|
3514
|
+
* @param {string} params.twoWayKey - Two Way Column Key.
|
|
3515
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
3516
|
+
* @throws {AppwriteException}
|
|
3517
|
+
* @returns {Promise<Models.ColumnRelationship>}
|
|
3518
|
+
*/
|
|
3519
|
+
createRelationshipColumn(params: { databaseId: string, tableId: string, relatedTableId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate }): Promise<Models.ColumnRelationship>;
|
|
3520
|
+
/**
|
|
3521
|
+
* Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
3522
|
+
*
|
|
3523
|
+
*
|
|
3524
|
+
* @param {string} databaseId - Database ID.
|
|
3525
|
+
* @param {string} tableId - Table ID.
|
|
3526
|
+
* @param {string} relatedTableId - Related Table ID.
|
|
3527
|
+
* @param {RelationshipType} type - Relation type
|
|
3528
|
+
* @param {boolean} twoWay - Is Two Way?
|
|
3529
|
+
* @param {string} key - Column Key.
|
|
3530
|
+
* @param {string} twoWayKey - Two Way Column Key.
|
|
3531
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
3532
|
+
* @throws {AppwriteException}
|
|
3533
|
+
* @returns {Promise<Models.ColumnRelationship>}
|
|
3534
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3535
|
+
*/
|
|
3536
|
+
createRelationshipColumn(databaseId: string, tableId: string, relatedTableId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.ColumnRelationship>;
|
|
3537
|
+
createRelationshipColumn(
|
|
3538
|
+
paramsOrFirst: { databaseId: string, tableId: string, relatedTableId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate } | string,
|
|
3539
|
+
...rest: [(string)?, (string)?, (RelationshipType)?, (boolean)?, (string)?, (string)?, (RelationMutate)?]
|
|
3540
|
+
): Promise<Models.ColumnRelationship> {
|
|
3541
|
+
let params: { databaseId: string, tableId: string, relatedTableId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate };
|
|
3542
|
+
|
|
3543
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3544
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, relatedTableId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate };
|
|
3545
|
+
} else {
|
|
3546
|
+
params = {
|
|
3547
|
+
databaseId: paramsOrFirst as string,
|
|
3548
|
+
tableId: rest[0] as string,
|
|
3549
|
+
relatedTableId: rest[1] as string,
|
|
3550
|
+
type: rest[2] as RelationshipType,
|
|
3551
|
+
twoWay: rest[3] as boolean,
|
|
3552
|
+
key: rest[4] as string,
|
|
3553
|
+
twoWayKey: rest[5] as string,
|
|
3554
|
+
onDelete: rest[6] as RelationMutate
|
|
3555
|
+
};
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3558
|
+
const databaseId = params.databaseId;
|
|
3559
|
+
const tableId = params.tableId;
|
|
3560
|
+
const relatedTableId = params.relatedTableId;
|
|
3561
|
+
const type = params.type;
|
|
3562
|
+
const twoWay = params.twoWay;
|
|
3563
|
+
const key = params.key;
|
|
3564
|
+
const twoWayKey = params.twoWayKey;
|
|
3565
|
+
const onDelete = params.onDelete;
|
|
3566
|
+
|
|
3567
|
+
if (typeof databaseId === 'undefined') {
|
|
3568
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
3569
|
+
}
|
|
3570
|
+
if (typeof tableId === 'undefined') {
|
|
3571
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
3572
|
+
}
|
|
3573
|
+
if (typeof relatedTableId === 'undefined') {
|
|
3574
|
+
throw new AppwriteException('Missing required parameter: "relatedTableId"');
|
|
3575
|
+
}
|
|
3576
|
+
if (typeof type === 'undefined') {
|
|
3577
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3580
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
3581
|
+
const payload: Payload = {};
|
|
3582
|
+
if (typeof relatedTableId !== 'undefined') {
|
|
3583
|
+
payload['relatedTableId'] = relatedTableId;
|
|
3584
|
+
}
|
|
3585
|
+
if (typeof type !== 'undefined') {
|
|
3586
|
+
payload['type'] = type;
|
|
3587
|
+
}
|
|
3588
|
+
if (typeof twoWay !== 'undefined') {
|
|
3589
|
+
payload['twoWay'] = twoWay;
|
|
3590
|
+
}
|
|
3591
|
+
if (typeof key !== 'undefined') {
|
|
3592
|
+
payload['key'] = key;
|
|
3593
|
+
}
|
|
3594
|
+
if (typeof twoWayKey !== 'undefined') {
|
|
3595
|
+
payload['twoWayKey'] = twoWayKey;
|
|
3596
|
+
}
|
|
3597
|
+
if (typeof onDelete !== 'undefined') {
|
|
3598
|
+
payload['onDelete'] = onDelete;
|
|
3599
|
+
}
|
|
3600
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3601
|
+
|
|
3602
|
+
const apiHeaders: { [header: string]: string } = {
|
|
3603
|
+
'content-type': 'application/json',
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
return this.client.call(
|
|
3607
|
+
'post',
|
|
3608
|
+
uri,
|
|
3609
|
+
apiHeaders,
|
|
3610
|
+
payload
|
|
3611
|
+
);
|
|
3612
|
+
}
|
|
3613
|
+
|
|
3614
|
+
/**
|
|
3615
|
+
* Create a string column.
|
|
3616
|
+
*
|
|
3617
|
+
*
|
|
3618
|
+
* @param {string} params.databaseId - Database ID.
|
|
3619
|
+
* @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).
|
|
3620
|
+
* @param {string} params.key - Column Key.
|
|
3621
|
+
* @param {number} params.size - Column size for text columns, in number of characters.
|
|
3622
|
+
* @param {boolean} params.required - Is column required?
|
|
3623
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3624
|
+
* @param {boolean} params.array - Is column an array?
|
|
3625
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
3626
|
+
* @throws {AppwriteException}
|
|
3627
|
+
* @returns {Promise<Models.ColumnString>}
|
|
3628
|
+
* @deprecated This API has been deprecated since 1.9.0. Please use `TablesDB.createTextColumn` instead.
|
|
3629
|
+
*/
|
|
3630
|
+
createStringColumn(params: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.ColumnString>;
|
|
3631
|
+
/**
|
|
3632
|
+
* Create a string column.
|
|
3633
|
+
*
|
|
3634
|
+
*
|
|
3635
|
+
* @param {string} databaseId - Database ID.
|
|
3636
|
+
* @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).
|
|
3637
|
+
* @param {string} key - Column Key.
|
|
3638
|
+
* @param {number} size - Column size for text columns, in number of characters.
|
|
3639
|
+
* @param {boolean} required - Is column required?
|
|
3640
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3641
|
+
* @param {boolean} array - Is column an array?
|
|
3642
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
3643
|
+
* @throws {AppwriteException}
|
|
3644
|
+
* @returns {Promise<Models.ColumnString>}
|
|
3645
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3646
|
+
*/
|
|
3647
|
+
createStringColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnString>;
|
|
3648
|
+
createStringColumn(
|
|
3649
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3650
|
+
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3271
3651
|
): Promise<Models.ColumnString> {
|
|
3272
3652
|
let params: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3273
3653
|
|
|
3274
3654
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3275
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3655
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3656
|
+
} else {
|
|
3657
|
+
params = {
|
|
3658
|
+
databaseId: paramsOrFirst as string,
|
|
3659
|
+
tableId: rest[0] as string,
|
|
3660
|
+
key: rest[1] as string,
|
|
3661
|
+
size: rest[2] as number,
|
|
3662
|
+
required: rest[3] as boolean,
|
|
3663
|
+
xdefault: rest[4] as string,
|
|
3664
|
+
array: rest[5] as boolean,
|
|
3665
|
+
encrypt: rest[6] as boolean
|
|
3666
|
+
};
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3669
|
+
const databaseId = params.databaseId;
|
|
3670
|
+
const tableId = params.tableId;
|
|
3671
|
+
const key = params.key;
|
|
3672
|
+
const size = params.size;
|
|
3673
|
+
const required = params.required;
|
|
3674
|
+
const xdefault = params.xdefault;
|
|
3675
|
+
const array = params.array;
|
|
3676
|
+
const encrypt = params.encrypt;
|
|
3677
|
+
|
|
3678
|
+
if (typeof databaseId === 'undefined') {
|
|
3679
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
3680
|
+
}
|
|
3681
|
+
if (typeof tableId === 'undefined') {
|
|
3682
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
3683
|
+
}
|
|
3684
|
+
if (typeof key === 'undefined') {
|
|
3685
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
3686
|
+
}
|
|
3687
|
+
if (typeof size === 'undefined') {
|
|
3688
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
3689
|
+
}
|
|
3690
|
+
if (typeof required === 'undefined') {
|
|
3691
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3694
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
3695
|
+
const payload: Payload = {};
|
|
3696
|
+
if (typeof key !== 'undefined') {
|
|
3697
|
+
payload['key'] = key;
|
|
3698
|
+
}
|
|
3699
|
+
if (typeof size !== 'undefined') {
|
|
3700
|
+
payload['size'] = size;
|
|
3701
|
+
}
|
|
3702
|
+
if (typeof required !== 'undefined') {
|
|
3703
|
+
payload['required'] = required;
|
|
3704
|
+
}
|
|
3705
|
+
if (typeof xdefault !== 'undefined') {
|
|
3706
|
+
payload['default'] = xdefault;
|
|
3707
|
+
}
|
|
3708
|
+
if (typeof array !== 'undefined') {
|
|
3709
|
+
payload['array'] = array;
|
|
3710
|
+
}
|
|
3711
|
+
if (typeof encrypt !== 'undefined') {
|
|
3712
|
+
payload['encrypt'] = encrypt;
|
|
3713
|
+
}
|
|
3714
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3715
|
+
|
|
3716
|
+
const apiHeaders: { [header: string]: string } = {
|
|
3717
|
+
'content-type': 'application/json',
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3720
|
+
return this.client.call(
|
|
3721
|
+
'post',
|
|
3722
|
+
uri,
|
|
3723
|
+
apiHeaders,
|
|
3724
|
+
payload
|
|
3725
|
+
);
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3728
|
+
/**
|
|
3729
|
+
* Update a string column. Changing the `default` value will not update already existing rows.
|
|
3730
|
+
*
|
|
3731
|
+
*
|
|
3732
|
+
* @param {string} params.databaseId - Database ID.
|
|
3733
|
+
* @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).
|
|
3734
|
+
* @param {string} params.key - Column Key.
|
|
3735
|
+
* @param {boolean} params.required - Is column required?
|
|
3736
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3737
|
+
* @param {number} params.size - Maximum size of the string column.
|
|
3738
|
+
* @param {string} params.newKey - New Column Key.
|
|
3739
|
+
* @throws {AppwriteException}
|
|
3740
|
+
* @returns {Promise<Models.ColumnString>}
|
|
3741
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead.
|
|
3742
|
+
*/
|
|
3743
|
+
updateStringColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string }): Promise<Models.ColumnString>;
|
|
3744
|
+
/**
|
|
3745
|
+
* Update a string column. Changing the `default` value will not update already existing rows.
|
|
3746
|
+
*
|
|
3747
|
+
*
|
|
3748
|
+
* @param {string} databaseId - Database ID.
|
|
3749
|
+
* @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).
|
|
3750
|
+
* @param {string} key - Column Key.
|
|
3751
|
+
* @param {boolean} required - Is column required?
|
|
3752
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3753
|
+
* @param {number} size - Maximum size of the string column.
|
|
3754
|
+
* @param {string} newKey - New Column Key.
|
|
3755
|
+
* @throws {AppwriteException}
|
|
3756
|
+
* @returns {Promise<Models.ColumnString>}
|
|
3757
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3758
|
+
*/
|
|
3759
|
+
updateStringColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.ColumnString>;
|
|
3760
|
+
updateStringColumn(
|
|
3761
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string } | string,
|
|
3762
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (number)?, (string)?]
|
|
3763
|
+
): Promise<Models.ColumnString> {
|
|
3764
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
3765
|
+
|
|
3766
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3767
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
3768
|
+
} else {
|
|
3769
|
+
params = {
|
|
3770
|
+
databaseId: paramsOrFirst as string,
|
|
3771
|
+
tableId: rest[0] as string,
|
|
3772
|
+
key: rest[1] as string,
|
|
3773
|
+
required: rest[2] as boolean,
|
|
3774
|
+
xdefault: rest[3] as string,
|
|
3775
|
+
size: rest[4] as number,
|
|
3776
|
+
newKey: rest[5] as string
|
|
3777
|
+
};
|
|
3778
|
+
}
|
|
3779
|
+
|
|
3780
|
+
const databaseId = params.databaseId;
|
|
3781
|
+
const tableId = params.tableId;
|
|
3782
|
+
const key = params.key;
|
|
3783
|
+
const required = params.required;
|
|
3784
|
+
const xdefault = params.xdefault;
|
|
3785
|
+
const size = params.size;
|
|
3786
|
+
const newKey = params.newKey;
|
|
3787
|
+
|
|
3788
|
+
if (typeof databaseId === 'undefined') {
|
|
3789
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
3790
|
+
}
|
|
3791
|
+
if (typeof tableId === 'undefined') {
|
|
3792
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
3793
|
+
}
|
|
3794
|
+
if (typeof key === 'undefined') {
|
|
3795
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
3796
|
+
}
|
|
3797
|
+
if (typeof required === 'undefined') {
|
|
3798
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
3799
|
+
}
|
|
3800
|
+
if (typeof xdefault === 'undefined') {
|
|
3801
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
3805
|
+
const payload: Payload = {};
|
|
3806
|
+
if (typeof required !== 'undefined') {
|
|
3807
|
+
payload['required'] = required;
|
|
3808
|
+
}
|
|
3809
|
+
if (typeof xdefault !== 'undefined') {
|
|
3810
|
+
payload['default'] = xdefault;
|
|
3811
|
+
}
|
|
3812
|
+
if (typeof size !== 'undefined') {
|
|
3813
|
+
payload['size'] = size;
|
|
3814
|
+
}
|
|
3815
|
+
if (typeof newKey !== 'undefined') {
|
|
3816
|
+
payload['newKey'] = newKey;
|
|
3817
|
+
}
|
|
3818
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3819
|
+
|
|
3820
|
+
const apiHeaders: { [header: string]: string } = {
|
|
3821
|
+
'content-type': 'application/json',
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
return this.client.call(
|
|
3825
|
+
'patch',
|
|
3826
|
+
uri,
|
|
3827
|
+
apiHeaders,
|
|
3828
|
+
payload
|
|
3829
|
+
);
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
/**
|
|
3833
|
+
* Create a text column.
|
|
3834
|
+
*
|
|
3835
|
+
*
|
|
3836
|
+
* @param {string} params.databaseId - Database ID.
|
|
3837
|
+
* @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).
|
|
3838
|
+
* @param {string} params.key - Column Key.
|
|
3839
|
+
* @param {boolean} params.required - Is column required?
|
|
3840
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3841
|
+
* @param {boolean} params.array - Is column an array?
|
|
3842
|
+
* @throws {AppwriteException}
|
|
3843
|
+
* @returns {Promise<Models.ColumnText>}
|
|
3844
|
+
*/
|
|
3845
|
+
createTextColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnText>;
|
|
3846
|
+
/**
|
|
3847
|
+
* Create a text column.
|
|
3848
|
+
*
|
|
3849
|
+
*
|
|
3850
|
+
* @param {string} databaseId - Database ID.
|
|
3851
|
+
* @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).
|
|
3852
|
+
* @param {string} key - Column Key.
|
|
3853
|
+
* @param {boolean} required - Is column required?
|
|
3854
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3855
|
+
* @param {boolean} array - Is column an array?
|
|
3856
|
+
* @throws {AppwriteException}
|
|
3857
|
+
* @returns {Promise<Models.ColumnText>}
|
|
3858
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3859
|
+
*/
|
|
3860
|
+
createTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnText>;
|
|
3861
|
+
createTextColumn(
|
|
3862
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
3863
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
3864
|
+
): Promise<Models.ColumnText> {
|
|
3865
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3866
|
+
|
|
3867
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3868
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3276
3869
|
} else {
|
|
3277
3870
|
params = {
|
|
3278
3871
|
databaseId: paramsOrFirst as string,
|
|
3279
3872
|
tableId: rest[0] as string,
|
|
3280
3873
|
key: rest[1] as string,
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
array: rest[5] as boolean,
|
|
3285
|
-
encrypt: rest[6] as boolean
|
|
3874
|
+
required: rest[2] as boolean,
|
|
3875
|
+
xdefault: rest[3] as string,
|
|
3876
|
+
array: rest[4] as boolean
|
|
3286
3877
|
};
|
|
3287
3878
|
}
|
|
3288
3879
|
|
|
3289
3880
|
const databaseId = params.databaseId;
|
|
3290
3881
|
const tableId = params.tableId;
|
|
3291
3882
|
const key = params.key;
|
|
3292
|
-
const size = params.size;
|
|
3293
3883
|
const required = params.required;
|
|
3294
3884
|
const xdefault = params.xdefault;
|
|
3295
3885
|
const array = params.array;
|
|
3296
|
-
const encrypt = params.encrypt;
|
|
3297
3886
|
|
|
3298
3887
|
if (typeof databaseId === 'undefined') {
|
|
3299
3888
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -3304,21 +3893,15 @@ export class TablesDB {
|
|
|
3304
3893
|
if (typeof key === 'undefined') {
|
|
3305
3894
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
3306
3895
|
}
|
|
3307
|
-
if (typeof size === 'undefined') {
|
|
3308
|
-
throw new AppwriteException('Missing required parameter: "size"');
|
|
3309
|
-
}
|
|
3310
3896
|
if (typeof required === 'undefined') {
|
|
3311
3897
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
3312
3898
|
}
|
|
3313
3899
|
|
|
3314
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
3900
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
3315
3901
|
const payload: Payload = {};
|
|
3316
3902
|
if (typeof key !== 'undefined') {
|
|
3317
3903
|
payload['key'] = key;
|
|
3318
3904
|
}
|
|
3319
|
-
if (typeof size !== 'undefined') {
|
|
3320
|
-
payload['size'] = size;
|
|
3321
|
-
}
|
|
3322
3905
|
if (typeof required !== 'undefined') {
|
|
3323
3906
|
payload['required'] = required;
|
|
3324
3907
|
}
|
|
@@ -3328,9 +3911,6 @@ export class TablesDB {
|
|
|
3328
3911
|
if (typeof array !== 'undefined') {
|
|
3329
3912
|
payload['array'] = array;
|
|
3330
3913
|
}
|
|
3331
|
-
if (typeof encrypt !== 'undefined') {
|
|
3332
|
-
payload['encrypt'] = encrypt;
|
|
3333
|
-
}
|
|
3334
3914
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3335
3915
|
|
|
3336
3916
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -3346,7 +3926,7 @@ export class TablesDB {
|
|
|
3346
3926
|
}
|
|
3347
3927
|
|
|
3348
3928
|
/**
|
|
3349
|
-
* Update a
|
|
3929
|
+
* Update a text column. Changing the `default` value will not update already existing rows.
|
|
3350
3930
|
*
|
|
3351
3931
|
*
|
|
3352
3932
|
* @param {string} params.databaseId - Database ID.
|
|
@@ -3354,14 +3934,13 @@ export class TablesDB {
|
|
|
3354
3934
|
* @param {string} params.key - Column Key.
|
|
3355
3935
|
* @param {boolean} params.required - Is column required?
|
|
3356
3936
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3357
|
-
* @param {number} params.size - Maximum size of the string column.
|
|
3358
3937
|
* @param {string} params.newKey - New Column Key.
|
|
3359
3938
|
* @throws {AppwriteException}
|
|
3360
|
-
* @returns {Promise<Models.
|
|
3939
|
+
* @returns {Promise<Models.ColumnText>}
|
|
3361
3940
|
*/
|
|
3362
|
-
|
|
3941
|
+
updateTextColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnText>;
|
|
3363
3942
|
/**
|
|
3364
|
-
* Update a
|
|
3943
|
+
* Update a text column. Changing the `default` value will not update already existing rows.
|
|
3365
3944
|
*
|
|
3366
3945
|
*
|
|
3367
3946
|
* @param {string} databaseId - Database ID.
|
|
@@ -3369,21 +3948,20 @@ export class TablesDB {
|
|
|
3369
3948
|
* @param {string} key - Column Key.
|
|
3370
3949
|
* @param {boolean} required - Is column required?
|
|
3371
3950
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3372
|
-
* @param {number} size - Maximum size of the string column.
|
|
3373
3951
|
* @param {string} newKey - New Column Key.
|
|
3374
3952
|
* @throws {AppwriteException}
|
|
3375
|
-
* @returns {Promise<Models.
|
|
3953
|
+
* @returns {Promise<Models.ColumnText>}
|
|
3376
3954
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3377
3955
|
*/
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string,
|
|
3381
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (
|
|
3382
|
-
): Promise<Models.
|
|
3383
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string,
|
|
3956
|
+
updateTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.ColumnText>;
|
|
3957
|
+
updateTextColumn(
|
|
3958
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string } | string,
|
|
3959
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
3960
|
+
): Promise<Models.ColumnText> {
|
|
3961
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string };
|
|
3384
3962
|
|
|
3385
3963
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3386
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string,
|
|
3964
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string };
|
|
3387
3965
|
} else {
|
|
3388
3966
|
params = {
|
|
3389
3967
|
databaseId: paramsOrFirst as string,
|
|
@@ -3391,8 +3969,7 @@ export class TablesDB {
|
|
|
3391
3969
|
key: rest[1] as string,
|
|
3392
3970
|
required: rest[2] as boolean,
|
|
3393
3971
|
xdefault: rest[3] as string,
|
|
3394
|
-
|
|
3395
|
-
newKey: rest[5] as string
|
|
3972
|
+
newKey: rest[4] as string
|
|
3396
3973
|
};
|
|
3397
3974
|
}
|
|
3398
3975
|
|
|
@@ -3401,7 +3978,6 @@ export class TablesDB {
|
|
|
3401
3978
|
const key = params.key;
|
|
3402
3979
|
const required = params.required;
|
|
3403
3980
|
const xdefault = params.xdefault;
|
|
3404
|
-
const size = params.size;
|
|
3405
3981
|
const newKey = params.newKey;
|
|
3406
3982
|
|
|
3407
3983
|
if (typeof databaseId === 'undefined') {
|
|
@@ -3420,7 +3996,7 @@ export class TablesDB {
|
|
|
3420
3996
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
3421
3997
|
}
|
|
3422
3998
|
|
|
3423
|
-
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
3999
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
3424
4000
|
const payload: Payload = {};
|
|
3425
4001
|
if (typeof required !== 'undefined') {
|
|
3426
4002
|
payload['required'] = required;
|
|
@@ -3428,9 +4004,6 @@ export class TablesDB {
|
|
|
3428
4004
|
if (typeof xdefault !== 'undefined') {
|
|
3429
4005
|
payload['default'] = xdefault;
|
|
3430
4006
|
}
|
|
3431
|
-
if (typeof size !== 'undefined') {
|
|
3432
|
-
payload['size'] = size;
|
|
3433
|
-
}
|
|
3434
4007
|
if (typeof newKey !== 'undefined') {
|
|
3435
4008
|
payload['newKey'] = newKey;
|
|
3436
4009
|
}
|
|
@@ -3461,7 +4034,7 @@ export class TablesDB {
|
|
|
3461
4034
|
* @throws {AppwriteException}
|
|
3462
4035
|
* @returns {Promise<Models.ColumnUrl>}
|
|
3463
4036
|
*/
|
|
3464
|
-
createUrlColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean
|
|
4037
|
+
createUrlColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnUrl>;
|
|
3465
4038
|
/**
|
|
3466
4039
|
* Create a URL column.
|
|
3467
4040
|
*
|
|
@@ -3557,7 +4130,7 @@ export class TablesDB {
|
|
|
3557
4130
|
* @throws {AppwriteException}
|
|
3558
4131
|
* @returns {Promise<Models.ColumnUrl>}
|
|
3559
4132
|
*/
|
|
3560
|
-
updateUrlColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string
|
|
4133
|
+
updateUrlColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise<Models.ColumnUrl>;
|
|
3561
4134
|
/**
|
|
3562
4135
|
* Update an url column. Changing the `default` value will not update already existing rows.
|
|
3563
4136
|
*
|
|
@@ -3640,6 +4213,215 @@ export class TablesDB {
|
|
|
3640
4213
|
);
|
|
3641
4214
|
}
|
|
3642
4215
|
|
|
4216
|
+
/**
|
|
4217
|
+
* Create a varchar column.
|
|
4218
|
+
*
|
|
4219
|
+
*
|
|
4220
|
+
* @param {string} params.databaseId - Database ID.
|
|
4221
|
+
* @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).
|
|
4222
|
+
* @param {string} params.key - Column Key.
|
|
4223
|
+
* @param {number} params.size - Column size for varchar columns, in number of characters. Maximum size is 16381.
|
|
4224
|
+
* @param {boolean} params.required - Is column required?
|
|
4225
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
4226
|
+
* @param {boolean} params.array - Is column an array?
|
|
4227
|
+
* @throws {AppwriteException}
|
|
4228
|
+
* @returns {Promise<Models.ColumnVarchar>}
|
|
4229
|
+
*/
|
|
4230
|
+
createVarcharColumn(params: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.ColumnVarchar>;
|
|
4231
|
+
/**
|
|
4232
|
+
* Create a varchar column.
|
|
4233
|
+
*
|
|
4234
|
+
*
|
|
4235
|
+
* @param {string} databaseId - Database ID.
|
|
4236
|
+
* @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).
|
|
4237
|
+
* @param {string} key - Column Key.
|
|
4238
|
+
* @param {number} size - Column size for varchar columns, in number of characters. Maximum size is 16381.
|
|
4239
|
+
* @param {boolean} required - Is column required?
|
|
4240
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
4241
|
+
* @param {boolean} array - Is column an array?
|
|
4242
|
+
* @throws {AppwriteException}
|
|
4243
|
+
* @returns {Promise<Models.ColumnVarchar>}
|
|
4244
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4245
|
+
*/
|
|
4246
|
+
createVarcharColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnVarchar>;
|
|
4247
|
+
createVarcharColumn(
|
|
4248
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
4249
|
+
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?]
|
|
4250
|
+
): Promise<Models.ColumnVarchar> {
|
|
4251
|
+
let params: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean };
|
|
4252
|
+
|
|
4253
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4254
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean };
|
|
4255
|
+
} else {
|
|
4256
|
+
params = {
|
|
4257
|
+
databaseId: paramsOrFirst as string,
|
|
4258
|
+
tableId: rest[0] as string,
|
|
4259
|
+
key: rest[1] as string,
|
|
4260
|
+
size: rest[2] as number,
|
|
4261
|
+
required: rest[3] as boolean,
|
|
4262
|
+
xdefault: rest[4] as string,
|
|
4263
|
+
array: rest[5] as boolean
|
|
4264
|
+
};
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4267
|
+
const databaseId = params.databaseId;
|
|
4268
|
+
const tableId = params.tableId;
|
|
4269
|
+
const key = params.key;
|
|
4270
|
+
const size = params.size;
|
|
4271
|
+
const required = params.required;
|
|
4272
|
+
const xdefault = params.xdefault;
|
|
4273
|
+
const array = params.array;
|
|
4274
|
+
|
|
4275
|
+
if (typeof databaseId === 'undefined') {
|
|
4276
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
4277
|
+
}
|
|
4278
|
+
if (typeof tableId === 'undefined') {
|
|
4279
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
4280
|
+
}
|
|
4281
|
+
if (typeof key === 'undefined') {
|
|
4282
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
4283
|
+
}
|
|
4284
|
+
if (typeof size === 'undefined') {
|
|
4285
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
4286
|
+
}
|
|
4287
|
+
if (typeof required === 'undefined') {
|
|
4288
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
4289
|
+
}
|
|
4290
|
+
|
|
4291
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
4292
|
+
const payload: Payload = {};
|
|
4293
|
+
if (typeof key !== 'undefined') {
|
|
4294
|
+
payload['key'] = key;
|
|
4295
|
+
}
|
|
4296
|
+
if (typeof size !== 'undefined') {
|
|
4297
|
+
payload['size'] = size;
|
|
4298
|
+
}
|
|
4299
|
+
if (typeof required !== 'undefined') {
|
|
4300
|
+
payload['required'] = required;
|
|
4301
|
+
}
|
|
4302
|
+
if (typeof xdefault !== 'undefined') {
|
|
4303
|
+
payload['default'] = xdefault;
|
|
4304
|
+
}
|
|
4305
|
+
if (typeof array !== 'undefined') {
|
|
4306
|
+
payload['array'] = array;
|
|
4307
|
+
}
|
|
4308
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4309
|
+
|
|
4310
|
+
const apiHeaders: { [header: string]: string } = {
|
|
4311
|
+
'content-type': 'application/json',
|
|
4312
|
+
}
|
|
4313
|
+
|
|
4314
|
+
return this.client.call(
|
|
4315
|
+
'post',
|
|
4316
|
+
uri,
|
|
4317
|
+
apiHeaders,
|
|
4318
|
+
payload
|
|
4319
|
+
);
|
|
4320
|
+
}
|
|
4321
|
+
|
|
4322
|
+
/**
|
|
4323
|
+
* Update a varchar column. Changing the `default` value will not update already existing rows.
|
|
4324
|
+
*
|
|
4325
|
+
*
|
|
4326
|
+
* @param {string} params.databaseId - Database ID.
|
|
4327
|
+
* @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).
|
|
4328
|
+
* @param {string} params.key - Column Key.
|
|
4329
|
+
* @param {boolean} params.required - Is column required?
|
|
4330
|
+
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
4331
|
+
* @param {number} params.size - Maximum size of the varchar column.
|
|
4332
|
+
* @param {string} params.newKey - New Column Key.
|
|
4333
|
+
* @throws {AppwriteException}
|
|
4334
|
+
* @returns {Promise<Models.ColumnVarchar>}
|
|
4335
|
+
*/
|
|
4336
|
+
updateVarcharColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string }): Promise<Models.ColumnVarchar>;
|
|
4337
|
+
/**
|
|
4338
|
+
* Update a varchar column. Changing the `default` value will not update already existing rows.
|
|
4339
|
+
*
|
|
4340
|
+
*
|
|
4341
|
+
* @param {string} databaseId - Database ID.
|
|
4342
|
+
* @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).
|
|
4343
|
+
* @param {string} key - Column Key.
|
|
4344
|
+
* @param {boolean} required - Is column required?
|
|
4345
|
+
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
4346
|
+
* @param {number} size - Maximum size of the varchar column.
|
|
4347
|
+
* @param {string} newKey - New Column Key.
|
|
4348
|
+
* @throws {AppwriteException}
|
|
4349
|
+
* @returns {Promise<Models.ColumnVarchar>}
|
|
4350
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4351
|
+
*/
|
|
4352
|
+
updateVarcharColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.ColumnVarchar>;
|
|
4353
|
+
updateVarcharColumn(
|
|
4354
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string } | string,
|
|
4355
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (number)?, (string)?]
|
|
4356
|
+
): Promise<Models.ColumnVarchar> {
|
|
4357
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
4358
|
+
|
|
4359
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4360
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
4361
|
+
} else {
|
|
4362
|
+
params = {
|
|
4363
|
+
databaseId: paramsOrFirst as string,
|
|
4364
|
+
tableId: rest[0] as string,
|
|
4365
|
+
key: rest[1] as string,
|
|
4366
|
+
required: rest[2] as boolean,
|
|
4367
|
+
xdefault: rest[3] as string,
|
|
4368
|
+
size: rest[4] as number,
|
|
4369
|
+
newKey: rest[5] as string
|
|
4370
|
+
};
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4373
|
+
const databaseId = params.databaseId;
|
|
4374
|
+
const tableId = params.tableId;
|
|
4375
|
+
const key = params.key;
|
|
4376
|
+
const required = params.required;
|
|
4377
|
+
const xdefault = params.xdefault;
|
|
4378
|
+
const size = params.size;
|
|
4379
|
+
const newKey = params.newKey;
|
|
4380
|
+
|
|
4381
|
+
if (typeof databaseId === 'undefined') {
|
|
4382
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
4383
|
+
}
|
|
4384
|
+
if (typeof tableId === 'undefined') {
|
|
4385
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
4386
|
+
}
|
|
4387
|
+
if (typeof key === 'undefined') {
|
|
4388
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
4389
|
+
}
|
|
4390
|
+
if (typeof required === 'undefined') {
|
|
4391
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
4392
|
+
}
|
|
4393
|
+
if (typeof xdefault === 'undefined') {
|
|
4394
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
|
|
4398
|
+
const payload: Payload = {};
|
|
4399
|
+
if (typeof required !== 'undefined') {
|
|
4400
|
+
payload['required'] = required;
|
|
4401
|
+
}
|
|
4402
|
+
if (typeof xdefault !== 'undefined') {
|
|
4403
|
+
payload['default'] = xdefault;
|
|
4404
|
+
}
|
|
4405
|
+
if (typeof size !== 'undefined') {
|
|
4406
|
+
payload['size'] = size;
|
|
4407
|
+
}
|
|
4408
|
+
if (typeof newKey !== 'undefined') {
|
|
4409
|
+
payload['newKey'] = newKey;
|
|
4410
|
+
}
|
|
4411
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4412
|
+
|
|
4413
|
+
const apiHeaders: { [header: string]: string } = {
|
|
4414
|
+
'content-type': 'application/json',
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
return this.client.call(
|
|
4418
|
+
'patch',
|
|
4419
|
+
uri,
|
|
4420
|
+
apiHeaders,
|
|
4421
|
+
payload
|
|
4422
|
+
);
|
|
4423
|
+
}
|
|
4424
|
+
|
|
3643
4425
|
/**
|
|
3644
4426
|
* Get column by ID.
|
|
3645
4427
|
*
|
|
@@ -3649,7 +4431,7 @@ export class TablesDB {
|
|
|
3649
4431
|
* @throws {AppwriteException}
|
|
3650
4432
|
* @returns {Promise<Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnString>}
|
|
3651
4433
|
*/
|
|
3652
|
-
getColumn(params: { databaseId: string, tableId: string, key: string
|
|
4434
|
+
getColumn(params: { databaseId: string, tableId: string, key: string }): Promise<Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnString>;
|
|
3653
4435
|
/**
|
|
3654
4436
|
* Get column by ID.
|
|
3655
4437
|
*
|
|
@@ -3715,7 +4497,7 @@ export class TablesDB {
|
|
|
3715
4497
|
* @throws {AppwriteException}
|
|
3716
4498
|
* @returns {Promise<{}>}
|
|
3717
4499
|
*/
|
|
3718
|
-
deleteColumn(params: { databaseId: string, tableId: string, key: string
|
|
4500
|
+
deleteColumn(params: { databaseId: string, tableId: string, key: string }): Promise<{}>;
|
|
3719
4501
|
/**
|
|
3720
4502
|
* Deletes a column.
|
|
3721
4503
|
*
|
|
@@ -3785,7 +4567,7 @@ export class TablesDB {
|
|
|
3785
4567
|
* @throws {AppwriteException}
|
|
3786
4568
|
* @returns {Promise<Models.ColumnRelationship>}
|
|
3787
4569
|
*/
|
|
3788
|
-
updateRelationshipColumn(params: { databaseId: string, tableId: string, key: string, onDelete?: RelationMutate, newKey?: string
|
|
4570
|
+
updateRelationshipColumn(params: { databaseId: string, tableId: string, key: string, onDelete?: RelationMutate, newKey?: string }): Promise<Models.ColumnRelationship>;
|
|
3789
4571
|
/**
|
|
3790
4572
|
* Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
3791
4573
|
*
|
|
@@ -3866,7 +4648,7 @@ export class TablesDB {
|
|
|
3866
4648
|
* @throws {AppwriteException}
|
|
3867
4649
|
* @returns {Promise<Models.ColumnIndexList>}
|
|
3868
4650
|
*/
|
|
3869
|
-
listIndexes(params: { databaseId: string, tableId: string, queries?: string[], total?: boolean
|
|
4651
|
+
listIndexes(params: { databaseId: string, tableId: string, queries?: string[], total?: boolean }): Promise<Models.ColumnIndexList>;
|
|
3870
4652
|
/**
|
|
3871
4653
|
* List indexes on the table.
|
|
3872
4654
|
*
|
|
@@ -3938,12 +4720,12 @@ export class TablesDB {
|
|
|
3938
4720
|
* @param {string} params.key - Index Key.
|
|
3939
4721
|
* @param {IndexType} params.type - Index type.
|
|
3940
4722
|
* @param {string[]} params.columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
|
|
3941
|
-
* @param {
|
|
4723
|
+
* @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
3942
4724
|
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
3943
4725
|
* @throws {AppwriteException}
|
|
3944
4726
|
* @returns {Promise<Models.ColumnIndex>}
|
|
3945
4727
|
*/
|
|
3946
|
-
createIndex(params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?:
|
|
4728
|
+
createIndex(params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: OrderBy[], lengths?: number[] }): Promise<Models.ColumnIndex>;
|
|
3947
4729
|
/**
|
|
3948
4730
|
* Creates an index on the columns listed. Your index should include all the columns you will query in a single request.
|
|
3949
4731
|
* Type can be `key`, `fulltext`, or `unique`.
|
|
@@ -3953,21 +4735,21 @@ export class TablesDB {
|
|
|
3953
4735
|
* @param {string} key - Index Key.
|
|
3954
4736
|
* @param {IndexType} type - Index type.
|
|
3955
4737
|
* @param {string[]} columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
|
|
3956
|
-
* @param {
|
|
4738
|
+
* @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
3957
4739
|
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
3958
4740
|
* @throws {AppwriteException}
|
|
3959
4741
|
* @returns {Promise<Models.ColumnIndex>}
|
|
3960
4742
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3961
4743
|
*/
|
|
3962
|
-
createIndex(databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?:
|
|
4744
|
+
createIndex(databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: OrderBy[], lengths?: number[]): Promise<Models.ColumnIndex>;
|
|
3963
4745
|
createIndex(
|
|
3964
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?:
|
|
3965
|
-
...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (
|
|
4746
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: OrderBy[], lengths?: number[] } | string,
|
|
4747
|
+
...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (OrderBy[])?, (number[])?]
|
|
3966
4748
|
): Promise<Models.ColumnIndex> {
|
|
3967
|
-
let params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?:
|
|
4749
|
+
let params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: OrderBy[], lengths?: number[] };
|
|
3968
4750
|
|
|
3969
4751
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3970
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?:
|
|
4752
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: OrderBy[], lengths?: number[] };
|
|
3971
4753
|
} else {
|
|
3972
4754
|
params = {
|
|
3973
4755
|
databaseId: paramsOrFirst as string,
|
|
@@ -3975,7 +4757,7 @@ export class TablesDB {
|
|
|
3975
4757
|
key: rest[1] as string,
|
|
3976
4758
|
type: rest[2] as IndexType,
|
|
3977
4759
|
columns: rest[3] as string[],
|
|
3978
|
-
orders: rest[4] as
|
|
4760
|
+
orders: rest[4] as OrderBy[],
|
|
3979
4761
|
lengths: rest[5] as number[]
|
|
3980
4762
|
};
|
|
3981
4763
|
}
|
|
@@ -4044,7 +4826,7 @@ export class TablesDB {
|
|
|
4044
4826
|
* @throws {AppwriteException}
|
|
4045
4827
|
* @returns {Promise<Models.ColumnIndex>}
|
|
4046
4828
|
*/
|
|
4047
|
-
getIndex(params: { databaseId: string, tableId: string, key: string
|
|
4829
|
+
getIndex(params: { databaseId: string, tableId: string, key: string }): Promise<Models.ColumnIndex>;
|
|
4048
4830
|
/**
|
|
4049
4831
|
* Get index by ID.
|
|
4050
4832
|
*
|
|
@@ -4110,7 +4892,7 @@ export class TablesDB {
|
|
|
4110
4892
|
* @throws {AppwriteException}
|
|
4111
4893
|
* @returns {Promise<{}>}
|
|
4112
4894
|
*/
|
|
4113
|
-
deleteIndex(params: { databaseId: string, tableId: string, key: string
|
|
4895
|
+
deleteIndex(params: { databaseId: string, tableId: string, key: string }): Promise<{}>;
|
|
4114
4896
|
/**
|
|
4115
4897
|
* Delete an index.
|
|
4116
4898
|
*
|
|
@@ -4177,7 +4959,7 @@ export class TablesDB {
|
|
|
4177
4959
|
* @throws {AppwriteException}
|
|
4178
4960
|
* @returns {Promise<Models.LogList>}
|
|
4179
4961
|
*/
|
|
4180
|
-
listTableLogs(params: { databaseId: string, tableId: string, queries?: string[]
|
|
4962
|
+
listTableLogs(params: { databaseId: string, tableId: string, queries?: string[] }): Promise<Models.LogList>;
|
|
4181
4963
|
/**
|
|
4182
4964
|
* Get the table activity logs list by its unique ID.
|
|
4183
4965
|
*
|
|
@@ -4245,7 +5027,7 @@ export class TablesDB {
|
|
|
4245
5027
|
* @throws {AppwriteException}
|
|
4246
5028
|
* @returns {Promise<Models.RowList<Row>>}
|
|
4247
5029
|
*/
|
|
4248
|
-
listRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean
|
|
5030
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean }): Promise<Models.RowList<Row>>;
|
|
4249
5031
|
/**
|
|
4250
5032
|
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
4251
5033
|
*
|
|
@@ -4326,7 +5108,7 @@ export class TablesDB {
|
|
|
4326
5108
|
* @throws {AppwriteException}
|
|
4327
5109
|
* @returns {Promise<Row>}
|
|
4328
5110
|
*/
|
|
4329
|
-
createRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>, permissions?: string[], transactionId?: string
|
|
5111
|
+
createRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>, permissions?: string[], transactionId?: string }): Promise<Row>;
|
|
4330
5112
|
/**
|
|
4331
5113
|
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
4332
5114
|
*
|
|
@@ -4418,7 +5200,7 @@ export class TablesDB {
|
|
|
4418
5200
|
* @throws {AppwriteException}
|
|
4419
5201
|
* @returns {Promise<Models.RowList<Row>>}
|
|
4420
5202
|
*/
|
|
4421
|
-
createRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rows: object[], transactionId?: string
|
|
5203
|
+
createRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rows: object[], transactionId?: string }): Promise<Models.RowList<Row>>;
|
|
4422
5204
|
/**
|
|
4423
5205
|
* Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
4424
5206
|
*
|
|
@@ -4496,7 +5278,7 @@ export class TablesDB {
|
|
|
4496
5278
|
* @throws {AppwriteException}
|
|
4497
5279
|
* @returns {Promise<Models.RowList<Row>>}
|
|
4498
5280
|
*/
|
|
4499
|
-
upsertRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rows: object[], transactionId?: string
|
|
5281
|
+
upsertRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rows: object[], transactionId?: string }): Promise<Models.RowList<Row>>;
|
|
4500
5282
|
/**
|
|
4501
5283
|
* Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
4502
5284
|
*
|
|
@@ -4575,7 +5357,7 @@ export class TablesDB {
|
|
|
4575
5357
|
* @throws {AppwriteException}
|
|
4576
5358
|
* @returns {Promise<Models.RowList<Row>>}
|
|
4577
5359
|
*/
|
|
4578
|
-
updateRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, data?: object, queries?: string[], transactionId?: string
|
|
5360
|
+
updateRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, data?: object, queries?: string[], transactionId?: string }): Promise<Models.RowList<Row>>;
|
|
4579
5361
|
/**
|
|
4580
5362
|
* Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.
|
|
4581
5363
|
*
|
|
@@ -4655,7 +5437,7 @@ export class TablesDB {
|
|
|
4655
5437
|
* @throws {AppwriteException}
|
|
4656
5438
|
* @returns {Promise<Models.RowList<Row>>}
|
|
4657
5439
|
*/
|
|
4658
|
-
deleteRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string
|
|
5440
|
+
deleteRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string }): Promise<Models.RowList<Row>>;
|
|
4659
5441
|
/**
|
|
4660
5442
|
* Bulk delete rows using queries, if no queries are passed then all rows are deleted.
|
|
4661
5443
|
*
|
|
@@ -4730,7 +5512,7 @@ export class TablesDB {
|
|
|
4730
5512
|
* @throws {AppwriteException}
|
|
4731
5513
|
* @returns {Promise<Row>}
|
|
4732
5514
|
*/
|
|
4733
|
-
getRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string
|
|
5515
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string }): Promise<Row>;
|
|
4734
5516
|
/**
|
|
4735
5517
|
* Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
|
|
4736
5518
|
*
|
|
@@ -4811,7 +5593,7 @@ export class TablesDB {
|
|
|
4811
5593
|
* @throws {AppwriteException}
|
|
4812
5594
|
* @returns {Promise<Row>}
|
|
4813
5595
|
*/
|
|
4814
|
-
upsertRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string
|
|
5596
|
+
upsertRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string }): Promise<Row>;
|
|
4815
5597
|
/**
|
|
4816
5598
|
* Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
4817
5599
|
*
|
|
@@ -4899,7 +5681,7 @@ export class TablesDB {
|
|
|
4899
5681
|
* @throws {AppwriteException}
|
|
4900
5682
|
* @returns {Promise<Row>}
|
|
4901
5683
|
*/
|
|
4902
|
-
updateRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string
|
|
5684
|
+
updateRow<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string }): Promise<Row>;
|
|
4903
5685
|
/**
|
|
4904
5686
|
* Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
4905
5687
|
*
|
|
@@ -4985,7 +5767,7 @@ export class TablesDB {
|
|
|
4985
5767
|
* @throws {AppwriteException}
|
|
4986
5768
|
* @returns {Promise<{}>}
|
|
4987
5769
|
*/
|
|
4988
|
-
deleteRow(params: { databaseId: string, tableId: string, rowId: string, transactionId?: string
|
|
5770
|
+
deleteRow(params: { databaseId: string, tableId: string, rowId: string, transactionId?: string }): Promise<{}>;
|
|
4989
5771
|
/**
|
|
4990
5772
|
* Delete a row by its unique ID.
|
|
4991
5773
|
*
|
|
@@ -5059,7 +5841,7 @@ export class TablesDB {
|
|
|
5059
5841
|
* @throws {AppwriteException}
|
|
5060
5842
|
* @returns {Promise<Models.LogList>}
|
|
5061
5843
|
*/
|
|
5062
|
-
listRowLogs(params: { databaseId: string, tableId: string, rowId: string, queries?: string[]
|
|
5844
|
+
listRowLogs(params: { databaseId: string, tableId: string, rowId: string, queries?: string[] }): Promise<Models.LogList>;
|
|
5063
5845
|
/**
|
|
5064
5846
|
* Get the row activity logs list by its unique ID.
|
|
5065
5847
|
*
|
|
@@ -5135,7 +5917,7 @@ export class TablesDB {
|
|
|
5135
5917
|
* @throws {AppwriteException}
|
|
5136
5918
|
* @returns {Promise<Row>}
|
|
5137
5919
|
*/
|
|
5138
|
-
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string
|
|
5920
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string }): Promise<Row>;
|
|
5139
5921
|
/**
|
|
5140
5922
|
* Decrement a specific column of a row by a given value.
|
|
5141
5923
|
*
|
|
@@ -5230,7 +6012,7 @@ export class TablesDB {
|
|
|
5230
6012
|
* @throws {AppwriteException}
|
|
5231
6013
|
* @returns {Promise<Row>}
|
|
5232
6014
|
*/
|
|
5233
|
-
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string
|
|
6015
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string }): Promise<Row>;
|
|
5234
6016
|
/**
|
|
5235
6017
|
* Increment a specific column of a row by a given value.
|
|
5236
6018
|
*
|
|
@@ -5321,7 +6103,7 @@ export class TablesDB {
|
|
|
5321
6103
|
* @throws {AppwriteException}
|
|
5322
6104
|
* @returns {Promise<Models.UsageTable>}
|
|
5323
6105
|
*/
|
|
5324
|
-
getTableUsage(params: { databaseId: string, tableId: string, range?: UsageRange
|
|
6106
|
+
getTableUsage(params: { databaseId: string, tableId: string, range?: UsageRange }): Promise<Models.UsageTable>;
|
|
5325
6107
|
/**
|
|
5326
6108
|
* Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
5327
6109
|
*
|
|
@@ -5386,7 +6168,7 @@ export class TablesDB {
|
|
|
5386
6168
|
* @throws {AppwriteException}
|
|
5387
6169
|
* @returns {Promise<Models.UsageDatabase>}
|
|
5388
6170
|
*/
|
|
5389
|
-
getUsage(params: { databaseId: string, range?: UsageRange
|
|
6171
|
+
getUsage(params: { databaseId: string, range?: UsageRange }): Promise<Models.UsageDatabase>;
|
|
5390
6172
|
/**
|
|
5391
6173
|
* Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
5392
6174
|
*
|