react-native-appwrite 0.11.0 → 0.13.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/README.md +84 -3
- package/dist/cjs/sdk.js +1854 -1121
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1854 -1122
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/account/create-email-password-session.md +4 -4
- package/docs/examples/account/create-email-token.md +5 -5
- package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
- package/docs/examples/account/create-mfa-authenticator.md +3 -3
- package/docs/examples/account/create-mfa-challenge.md +3 -3
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
- package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
- package/docs/examples/account/create-phone-token.md +4 -4
- package/docs/examples/account/create-push-target.md +5 -5
- package/docs/examples/account/create-recovery.md +4 -4
- package/docs/examples/account/create-session.md +4 -4
- package/docs/examples/account/create-verification.md +3 -3
- package/docs/examples/account/create.md +6 -6
- package/docs/examples/account/delete-identity.md +3 -3
- package/docs/examples/account/delete-mfa-authenticator.md +3 -3
- package/docs/examples/account/delete-push-target.md +3 -3
- package/docs/examples/account/delete-session.md +3 -3
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-session.md +3 -3
- package/docs/examples/account/list-identities.md +3 -3
- package/docs/examples/account/list-logs.md +3 -3
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/update-email.md +4 -4
- package/docs/examples/account/{update-magic-u-r-l-session.md → update-magic-url-session.md} +4 -4
- package/docs/examples/account/update-mfa-authenticator.md +4 -4
- package/docs/examples/account/update-mfa-challenge.md +4 -4
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{update-m-f-a.md → update-mfa.md} +3 -3
- package/docs/examples/account/update-name.md +3 -3
- package/docs/examples/account/update-password.md +4 -4
- package/docs/examples/account/update-phone-session.md +4 -4
- package/docs/examples/account/update-phone-verification.md +4 -4
- package/docs/examples/account/update-phone.md +4 -4
- package/docs/examples/account/update-prefs.md +7 -3
- package/docs/examples/account/update-push-target.md +4 -4
- package/docs/examples/account/update-recovery.md +5 -5
- package/docs/examples/account/update-session.md +3 -3
- package/docs/examples/account/update-verification.md +4 -4
- package/docs/examples/avatars/get-browser.md +6 -6
- package/docs/examples/avatars/get-credit-card.md +6 -6
- package/docs/examples/avatars/get-favicon.md +3 -3
- package/docs/examples/avatars/get-flag.md +6 -6
- package/docs/examples/avatars/get-image.md +5 -5
- package/docs/examples/avatars/get-initials.md +6 -6
- package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
- package/docs/examples/databases/create-document.md +13 -7
- package/docs/examples/databases/decrement-document-attribute.md +8 -8
- package/docs/examples/databases/delete-document.md +5 -5
- package/docs/examples/databases/get-document.md +6 -6
- package/docs/examples/databases/increment-document-attribute.md +8 -8
- package/docs/examples/databases/list-documents.md +5 -5
- package/docs/examples/databases/update-document.md +7 -7
- package/docs/examples/databases/upsert-document.md +7 -7
- package/docs/examples/functions/create-execution.md +9 -9
- package/docs/examples/functions/get-execution.md +4 -4
- package/docs/examples/functions/list-executions.md +4 -4
- package/docs/examples/graphql/mutation.md +3 -3
- package/docs/examples/graphql/query.md +3 -3
- package/docs/examples/messaging/create-subscriber.md +5 -5
- package/docs/examples/messaging/delete-subscriber.md +4 -4
- package/docs/examples/storage/create-file.md +6 -6
- package/docs/examples/storage/delete-file.md +4 -4
- package/docs/examples/storage/get-file-download.md +5 -5
- package/docs/examples/storage/get-file-preview.md +16 -16
- package/docs/examples/storage/get-file-view.md +5 -5
- package/docs/examples/storage/get-file.md +4 -4
- package/docs/examples/storage/list-files.md +5 -5
- package/docs/examples/storage/update-file.md +6 -6
- package/docs/examples/tablesdb/create-row.md +23 -0
- package/docs/examples/tablesdb/decrement-row-column.md +18 -0
- package/docs/examples/tablesdb/delete-row.md +15 -0
- package/docs/examples/tablesdb/get-row.md +16 -0
- package/docs/examples/tablesdb/increment-row-column.md +18 -0
- package/docs/examples/tablesdb/list-rows.md +15 -0
- package/docs/examples/tablesdb/update-row.md +17 -0
- package/docs/examples/tablesdb/upsert-row.md +17 -0
- package/docs/examples/teams/create-membership.md +9 -9
- package/docs/examples/teams/create.md +5 -5
- package/docs/examples/teams/delete-membership.md +4 -4
- package/docs/examples/teams/delete.md +3 -3
- package/docs/examples/teams/get-membership.md +4 -4
- package/docs/examples/teams/get-prefs.md +3 -3
- package/docs/examples/teams/get.md +3 -3
- package/docs/examples/teams/list-memberships.md +5 -5
- package/docs/examples/teams/list.md +4 -4
- package/docs/examples/teams/update-membership-status.md +6 -6
- package/docs/examples/teams/update-membership.md +5 -5
- package/docs/examples/teams/update-name.md +4 -4
- package/docs/examples/teams/update-prefs.md +4 -4
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/enums/credit-card.ts +1 -1
- package/src/enums/execution-method.ts +1 -0
- package/src/index.ts +1 -0
- package/src/models.ts +72 -27
- package/src/query.ts +247 -4
- package/src/services/account.ts +1469 -315
- package/src/services/avatars.ts +289 -80
- package/src/services/databases.ts +345 -63
- package/src/services/functions.ts +115 -20
- package/src/services/graphql.ts +52 -4
- package/src/services/locale.ts +8 -19
- package/src/services/messaging.ts +66 -7
- package/src/services/storage.ts +345 -76
- package/src/services/tables-db.ts +621 -0
- package/src/services/teams.ts +454 -93
- package/types/enums/credit-card.d.ts +1 -1
- package/types/enums/execution-method.d.ts +2 -1
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +69 -25
- package/types/query.d.ts +201 -4
- package/types/services/account.d.ts +734 -280
- package/types/services/avatars.d.ts +168 -73
- package/types/services/databases.d.ts +199 -58
- package/types/services/functions.d.ts +62 -17
- package/types/services/graphql.d.ts +24 -2
- package/types/services/locale.d.ts +8 -19
- package/types/services/messaging.d.ts +33 -5
- package/types/services/storage.d.ts +201 -68
- package/types/services/tables-db.d.ts +245 -0
- package/types/services/teams.d.ts +242 -80
- /package/docs/examples/account/{create-j-w-t.md → create-jwt.md} +0 -0
- /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { Client } from '../client';
|
|
3
|
+
import type { Models } from '../models';
|
|
4
|
+
export declare class TablesDB extends Service {
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
/**
|
|
7
|
+
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} params.databaseId - Database ID.
|
|
10
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate).
|
|
11
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
12
|
+
* @throws {AppwriteException}
|
|
13
|
+
* @returns {Promise}
|
|
14
|
+
*/
|
|
15
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
16
|
+
databaseId: string;
|
|
17
|
+
tableId: string;
|
|
18
|
+
queries?: string[];
|
|
19
|
+
}): Promise<Models.RowList<Row>>;
|
|
20
|
+
/**
|
|
21
|
+
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} databaseId - Database ID.
|
|
24
|
+
* @param {string} tableId - Table ID. You can create a new table using the TableDB service [server integration](https://appwrite.io/docs/server/tablesdbdb#tablesdbCreate).
|
|
25
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
26
|
+
* @throws {AppwriteException}
|
|
27
|
+
* @returns {Promise<Models.RowList<Row>>}
|
|
28
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
29
|
+
*/
|
|
30
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} params.databaseId - Database ID.
|
|
35
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
|
|
36
|
+
* @param {string} params.rowId - Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
37
|
+
* @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>} params.data - Row data as JSON object.
|
|
38
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
39
|
+
* @throws {AppwriteException}
|
|
40
|
+
* @returns {Promise}
|
|
41
|
+
*/
|
|
42
|
+
createRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
43
|
+
databaseId: string;
|
|
44
|
+
tableId: string;
|
|
45
|
+
rowId: string;
|
|
46
|
+
data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>;
|
|
47
|
+
permissions?: string[];
|
|
48
|
+
}): Promise<Row>;
|
|
49
|
+
/**
|
|
50
|
+
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreateTable) API or directly from your database console.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} databaseId - Database ID.
|
|
53
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
|
|
54
|
+
* @param {string} rowId - Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
55
|
+
* @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>} data - Row data as JSON object.
|
|
56
|
+
* @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
57
|
+
* @throws {AppwriteException}
|
|
58
|
+
* @returns {Promise<Row>}
|
|
59
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
60
|
+
*/
|
|
61
|
+
createRow<Row extends Models.Row = Models.DefaultRow>(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[]): Promise<Row>;
|
|
62
|
+
/**
|
|
63
|
+
* Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} params.databaseId - Database ID.
|
|
66
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
|
|
67
|
+
* @param {string} params.rowId - Row ID.
|
|
68
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
69
|
+
* @throws {AppwriteException}
|
|
70
|
+
* @returns {Promise}
|
|
71
|
+
*/
|
|
72
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
73
|
+
databaseId: string;
|
|
74
|
+
tableId: string;
|
|
75
|
+
rowId: string;
|
|
76
|
+
queries?: string[];
|
|
77
|
+
}): Promise<Row>;
|
|
78
|
+
/**
|
|
79
|
+
* Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} databaseId - Database ID.
|
|
82
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
|
|
83
|
+
* @param {string} rowId - Row ID.
|
|
84
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
85
|
+
* @throws {AppwriteException}
|
|
86
|
+
* @returns {Promise<Row>}
|
|
87
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
88
|
+
*/
|
|
89
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[]): Promise<Row>;
|
|
90
|
+
/**
|
|
91
|
+
* 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/server/tablesdb#tablesDBCreateTable) API or directly from your database console.
|
|
92
|
+
*
|
|
93
|
+
* @param {string} params.databaseId - Database ID.
|
|
94
|
+
* @param {string} params.tableId - Table ID.
|
|
95
|
+
* @param {string} params.rowId - Row ID.
|
|
96
|
+
* @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} params.data - Row data as JSON object. Include all required columns of the row to be created or updated.
|
|
97
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
98
|
+
* @throws {AppwriteException}
|
|
99
|
+
* @returns {Promise}
|
|
100
|
+
*/
|
|
101
|
+
upsertRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
102
|
+
databaseId: string;
|
|
103
|
+
tableId: string;
|
|
104
|
+
rowId: string;
|
|
105
|
+
data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
|
|
106
|
+
permissions?: string[];
|
|
107
|
+
}): Promise<Row>;
|
|
108
|
+
/**
|
|
109
|
+
* 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/server/tablesdb#tablesDBCreateTable) API or directly from your database console.
|
|
110
|
+
*
|
|
111
|
+
* @param {string} databaseId - Database ID.
|
|
112
|
+
* @param {string} tableId - Table ID.
|
|
113
|
+
* @param {string} rowId - Row ID.
|
|
114
|
+
* @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} data - Row data as JSON object. Include all required columns of the row to be created or updated.
|
|
115
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
116
|
+
* @throws {AppwriteException}
|
|
117
|
+
* @returns {Promise<Row>}
|
|
118
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
119
|
+
*/
|
|
120
|
+
upsertRow<Row extends Models.Row = Models.DefaultRow>(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[]): Promise<Row>;
|
|
121
|
+
/**
|
|
122
|
+
* Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
123
|
+
*
|
|
124
|
+
* @param {string} params.databaseId - Database ID.
|
|
125
|
+
* @param {string} params.tableId - Table ID.
|
|
126
|
+
* @param {string} params.rowId - Row ID.
|
|
127
|
+
* @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} params.data - Row data as JSON object. Include only columns and value pairs to be updated.
|
|
128
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
129
|
+
* @throws {AppwriteException}
|
|
130
|
+
* @returns {Promise}
|
|
131
|
+
*/
|
|
132
|
+
updateRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
133
|
+
databaseId: string;
|
|
134
|
+
tableId: string;
|
|
135
|
+
rowId: string;
|
|
136
|
+
data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
|
|
137
|
+
permissions?: string[];
|
|
138
|
+
}): Promise<Row>;
|
|
139
|
+
/**
|
|
140
|
+
* Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
141
|
+
*
|
|
142
|
+
* @param {string} databaseId - Database ID.
|
|
143
|
+
* @param {string} tableId - Table ID.
|
|
144
|
+
* @param {string} rowId - Row ID.
|
|
145
|
+
* @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} data - Row data as JSON object. Include only columns and value pairs to be updated.
|
|
146
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
147
|
+
* @throws {AppwriteException}
|
|
148
|
+
* @returns {Promise<Row>}
|
|
149
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
150
|
+
*/
|
|
151
|
+
updateRow<Row extends Models.Row = Models.DefaultRow>(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[]): Promise<Row>;
|
|
152
|
+
/**
|
|
153
|
+
* Delete a row by its unique ID.
|
|
154
|
+
*
|
|
155
|
+
* @param {string} params.databaseId - Database ID.
|
|
156
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
|
|
157
|
+
* @param {string} params.rowId - Row ID.
|
|
158
|
+
* @throws {AppwriteException}
|
|
159
|
+
* @returns {Promise}
|
|
160
|
+
*/
|
|
161
|
+
deleteRow(params: {
|
|
162
|
+
databaseId: string;
|
|
163
|
+
tableId: string;
|
|
164
|
+
rowId: string;
|
|
165
|
+
}): Promise<{}>;
|
|
166
|
+
/**
|
|
167
|
+
* Delete a row by its unique ID.
|
|
168
|
+
*
|
|
169
|
+
* @param {string} databaseId - Database ID.
|
|
170
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
|
|
171
|
+
* @param {string} rowId - Row ID.
|
|
172
|
+
* @throws {AppwriteException}
|
|
173
|
+
* @returns {Promise<{}>}
|
|
174
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
175
|
+
*/
|
|
176
|
+
deleteRow(databaseId: string, tableId: string, rowId: string): Promise<{}>;
|
|
177
|
+
/**
|
|
178
|
+
* Decrement a specific column of a row by a given value.
|
|
179
|
+
*
|
|
180
|
+
* @param {string} params.databaseId - Database ID.
|
|
181
|
+
* @param {string} params.tableId - Table ID.
|
|
182
|
+
* @param {string} params.rowId - Row ID.
|
|
183
|
+
* @param {string} params.column - Column key.
|
|
184
|
+
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
185
|
+
* @param {number} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
186
|
+
* @throws {AppwriteException}
|
|
187
|
+
* @returns {Promise}
|
|
188
|
+
*/
|
|
189
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
190
|
+
databaseId: string;
|
|
191
|
+
tableId: string;
|
|
192
|
+
rowId: string;
|
|
193
|
+
column: string;
|
|
194
|
+
value?: number;
|
|
195
|
+
min?: number;
|
|
196
|
+
}): Promise<Row>;
|
|
197
|
+
/**
|
|
198
|
+
* Decrement a specific column of a row by a given value.
|
|
199
|
+
*
|
|
200
|
+
* @param {string} databaseId - Database ID.
|
|
201
|
+
* @param {string} tableId - Table ID.
|
|
202
|
+
* @param {string} rowId - Row ID.
|
|
203
|
+
* @param {string} column - Column key.
|
|
204
|
+
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
205
|
+
* @param {number} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
206
|
+
* @throws {AppwriteException}
|
|
207
|
+
* @returns {Promise<Row>}
|
|
208
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
209
|
+
*/
|
|
210
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number): Promise<Row>;
|
|
211
|
+
/**
|
|
212
|
+
* Increment a specific column of a row by a given value.
|
|
213
|
+
*
|
|
214
|
+
* @param {string} params.databaseId - Database ID.
|
|
215
|
+
* @param {string} params.tableId - Table ID.
|
|
216
|
+
* @param {string} params.rowId - Row ID.
|
|
217
|
+
* @param {string} params.column - Column key.
|
|
218
|
+
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
219
|
+
* @param {number} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
220
|
+
* @throws {AppwriteException}
|
|
221
|
+
* @returns {Promise}
|
|
222
|
+
*/
|
|
223
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
224
|
+
databaseId: string;
|
|
225
|
+
tableId: string;
|
|
226
|
+
rowId: string;
|
|
227
|
+
column: string;
|
|
228
|
+
value?: number;
|
|
229
|
+
max?: number;
|
|
230
|
+
}): Promise<Row>;
|
|
231
|
+
/**
|
|
232
|
+
* Increment a specific column of a row by a given value.
|
|
233
|
+
*
|
|
234
|
+
* @param {string} databaseId - Database ID.
|
|
235
|
+
* @param {string} tableId - Table ID.
|
|
236
|
+
* @param {string} rowId - Row ID.
|
|
237
|
+
* @param {string} column - Column key.
|
|
238
|
+
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
239
|
+
* @param {number} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
240
|
+
* @throws {AppwriteException}
|
|
241
|
+
* @returns {Promise<Row>}
|
|
242
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
243
|
+
*/
|
|
244
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number): Promise<Row>;
|
|
245
|
+
}
|