agentbase-web-sdk 2.6.0-fix1
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/LICENSE +0 -0
- package/README.md +41 -0
- package/dist/cjs/sdk.js +13833 -0
- package/dist/cjs/sdk.js.map +1 -0
- package/dist/esm/sdk.js +13805 -0
- package/dist/esm/sdk.js.map +1 -0
- package/dist/iife/sdk.js +17632 -0
- package/package.json +50 -0
- package/types/channel.d.ts +79 -0
- package/types/client.d.ts +289 -0
- package/types/enums/authentication-factor.d.ts +6 -0
- package/types/enums/authenticator-type.d.ts +3 -0
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/browser.d.ts +16 -0
- package/types/enums/credit-card.d.ts +19 -0
- package/types/enums/distillation-message-role.d.ts +6 -0
- package/types/enums/distillation-mode.d.ts +4 -0
- package/types/enums/distillation-tool-status.d.ts +4 -0
- package/types/enums/execution-method.d.ts +9 -0
- package/types/enums/execution-status.d.ts +7 -0
- package/types/enums/execution-trigger.d.ts +5 -0
- package/types/enums/export-job-mode.d.ts +4 -0
- package/types/enums/export-mode.d.ts +3 -0
- package/types/enums/feedback-type.d.ts +5 -0
- package/types/enums/flag.d.ts +197 -0
- package/types/enums/format.d.ts +4 -0
- package/types/enums/image-format.d.ts +9 -0
- package/types/enums/image-gravity.d.ts +11 -0
- package/types/enums/kind.d.ts +6 -0
- package/types/enums/kinds.d.ts +6 -0
- package/types/enums/knowledge-base-data-source-document-import-result-status.d.ts +5 -0
- package/types/enums/memory-access-mode.d.ts +4 -0
- package/types/enums/memory-batch-operation.d.ts +5 -0
- package/types/enums/memory-bulk-delete-item-status.d.ts +4 -0
- package/types/enums/memory-bulk-delete-response-status.d.ts +4 -0
- package/types/enums/memory-handling-policy.d.ts +5 -0
- package/types/enums/memory-message-role.d.ts +5 -0
- package/types/enums/memory-record-kind.d.ts +5 -0
- package/types/enums/memory-record-sensitivity.d.ts +5 -0
- package/types/enums/memory-scope.d.ts +7 -0
- package/types/enums/memory-sensitivity.d.ts +6 -0
- package/types/enums/memory-share-subject-type.d.ts +4 -0
- package/types/enums/o-auth-provider.d.ts +45 -0
- package/types/enums/organization-project-deletion-deletion-status.d.ts +5 -0
- package/types/enums/organization-role.d.ts +8 -0
- package/types/enums/organization-usage-range.d.ts +5 -0
- package/types/enums/outcome.d.ts +6 -0
- package/types/enums/profile-extraction-mode.d.ts +4 -0
- package/types/enums/profile-type.d.ts +4 -0
- package/types/enums/project-deletion-restore-status.d.ts +3 -0
- package/types/enums/project-deletion-result-deletion-status.d.ts +5 -0
- package/types/enums/project-deletion-result-status.d.ts +5 -0
- package/types/enums/record-kind.d.ts +5 -0
- package/types/enums/retention-policy.d.ts +3 -0
- package/types/enums/scope.d.ts +5 -0
- package/types/enums/source-type.d.ts +6 -0
- package/types/enums/status.d.ts +17 -0
- package/types/enums/theme.d.ts +4 -0
- package/types/enums/timezone.d.ts +422 -0
- package/types/enums/transaction-action.d.ts +12 -0
- package/types/enums/validation-status.d.ts +6 -0
- package/types/enums/verification-source.d.ts +5 -0
- package/types/id.d.ts +20 -0
- package/types/index.d.ts +87 -0
- package/types/models.d.ts +2537 -0
- package/types/operator.d.ts +180 -0
- package/types/permission.d.ts +43 -0
- package/types/query.d.ts +442 -0
- package/types/role.d.ts +70 -0
- package/types/service.d.ts +11 -0
- package/types/services/account.d.ts +1267 -0
- package/types/services/ai-gateway.d.ts +738 -0
- package/types/services/avatars.d.ts +320 -0
- package/types/services/databases.d.ts +437 -0
- package/types/services/documents-db.d.ts +405 -0
- package/types/services/functions.d.ts +91 -0
- package/types/services/graphql.d.ts +43 -0
- package/types/services/knowledge-bases.d.ts +117 -0
- package/types/services/llm-gateway.d.ts +282 -0
- package/types/services/locale.d.ts +64 -0
- package/types/services/memory.d.ts +1765 -0
- package/types/services/messaging.d.ts +53 -0
- package/types/services/projects.d.ts +129 -0
- package/types/services/realtime.d.ts +197 -0
- package/types/services/self-hosted-organizations.d.ts +495 -0
- package/types/services/storage.d.ts +259 -0
- package/types/services/tables-db.d.ts +434 -0
- package/types/services/teams.d.ts +341 -0
- package/types/services/vectors-db.d.ts +297 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { Client } from '../client';
|
|
2
|
+
import type { Models } from '../models';
|
|
3
|
+
export declare class TablesDB {
|
|
4
|
+
client: Client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
/**
|
|
7
|
+
* List transactions across all databases.
|
|
8
|
+
*
|
|
9
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries).
|
|
10
|
+
* @throws {AgentbaseException}
|
|
11
|
+
* @returns {Promise<Models.TransactionList>}
|
|
12
|
+
*/
|
|
13
|
+
listTransactions(params?: {
|
|
14
|
+
queries?: string[];
|
|
15
|
+
}): Promise<Models.TransactionList>;
|
|
16
|
+
/**
|
|
17
|
+
* List transactions across all databases.
|
|
18
|
+
*
|
|
19
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries).
|
|
20
|
+
* @throws {AgentbaseException}
|
|
21
|
+
* @returns {Promise<Models.TransactionList>}
|
|
22
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
23
|
+
*/
|
|
24
|
+
listTransactions(queries?: string[]): Promise<Models.TransactionList>;
|
|
25
|
+
/**
|
|
26
|
+
* Create a new transaction.
|
|
27
|
+
*
|
|
28
|
+
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
29
|
+
* @throws {AgentbaseException}
|
|
30
|
+
* @returns {Promise<Models.Transaction>}
|
|
31
|
+
*/
|
|
32
|
+
createTransaction(params?: {
|
|
33
|
+
ttl?: number;
|
|
34
|
+
}): Promise<Models.Transaction>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a new transaction.
|
|
37
|
+
*
|
|
38
|
+
* @param {number} ttl - Seconds before the transaction expires.
|
|
39
|
+
* @throws {AgentbaseException}
|
|
40
|
+
* @returns {Promise<Models.Transaction>}
|
|
41
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
42
|
+
*/
|
|
43
|
+
createTransaction(ttl?: number): Promise<Models.Transaction>;
|
|
44
|
+
/**
|
|
45
|
+
* Get a transaction by its unique ID.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
48
|
+
* @throws {AgentbaseException}
|
|
49
|
+
* @returns {Promise<Models.Transaction>}
|
|
50
|
+
*/
|
|
51
|
+
getTransaction(params: {
|
|
52
|
+
transactionId: string;
|
|
53
|
+
}): Promise<Models.Transaction>;
|
|
54
|
+
/**
|
|
55
|
+
* Get a transaction by its unique ID.
|
|
56
|
+
*
|
|
57
|
+
* @param {string} transactionId - Transaction ID.
|
|
58
|
+
* @throws {AgentbaseException}
|
|
59
|
+
* @returns {Promise<Models.Transaction>}
|
|
60
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
61
|
+
*/
|
|
62
|
+
getTransaction(transactionId: string): Promise<Models.Transaction>;
|
|
63
|
+
/**
|
|
64
|
+
* Update a transaction, to either commit or roll back its operations.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
67
|
+
* @param {boolean} params.commit - Commit transaction?
|
|
68
|
+
* @param {boolean} params.rollback - Rollback transaction?
|
|
69
|
+
* @throws {AgentbaseException}
|
|
70
|
+
* @returns {Promise<Models.Transaction>}
|
|
71
|
+
*/
|
|
72
|
+
updateTransaction(params: {
|
|
73
|
+
transactionId: string;
|
|
74
|
+
commit?: boolean;
|
|
75
|
+
rollback?: boolean;
|
|
76
|
+
}): Promise<Models.Transaction>;
|
|
77
|
+
/**
|
|
78
|
+
* Update a transaction, to either commit or roll back its operations.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} transactionId - Transaction ID.
|
|
81
|
+
* @param {boolean} commit - Commit transaction?
|
|
82
|
+
* @param {boolean} rollback - Rollback transaction?
|
|
83
|
+
* @throws {AgentbaseException}
|
|
84
|
+
* @returns {Promise<Models.Transaction>}
|
|
85
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
86
|
+
*/
|
|
87
|
+
updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
|
|
88
|
+
/**
|
|
89
|
+
* Delete a transaction by its unique ID.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
92
|
+
* @throws {AgentbaseException}
|
|
93
|
+
* @returns {Promise<{}>}
|
|
94
|
+
*/
|
|
95
|
+
deleteTransaction(params: {
|
|
96
|
+
transactionId: string;
|
|
97
|
+
}): Promise<{}>;
|
|
98
|
+
/**
|
|
99
|
+
* Delete a transaction by its unique ID.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} transactionId - Transaction ID.
|
|
102
|
+
* @throws {AgentbaseException}
|
|
103
|
+
* @returns {Promise<{}>}
|
|
104
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
105
|
+
*/
|
|
106
|
+
deleteTransaction(transactionId: string): Promise<{}>;
|
|
107
|
+
/**
|
|
108
|
+
* Create multiple operations in a single transaction.
|
|
109
|
+
*
|
|
110
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
111
|
+
* @param {Models.TablesDBTransactionOperation[]} params.operations - Array of staged operations.
|
|
112
|
+
* @throws {AgentbaseException}
|
|
113
|
+
* @returns {Promise<Models.Transaction>}
|
|
114
|
+
*/
|
|
115
|
+
createOperations(params: {
|
|
116
|
+
transactionId: string;
|
|
117
|
+
operations?: Models.TablesDBTransactionOperation[];
|
|
118
|
+
}): Promise<Models.Transaction>;
|
|
119
|
+
/**
|
|
120
|
+
* Create multiple operations in a single transaction.
|
|
121
|
+
*
|
|
122
|
+
* @param {string} transactionId - Transaction ID.
|
|
123
|
+
* @param {Models.TablesDBTransactionOperation[]} operations - Array of staged operations.
|
|
124
|
+
* @throws {AgentbaseException}
|
|
125
|
+
* @returns {Promise<Models.Transaction>}
|
|
126
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
127
|
+
*/
|
|
128
|
+
createOperations(transactionId: string, operations?: Models.TablesDBTransactionOperation[]): Promise<Models.Transaction>;
|
|
129
|
+
/**
|
|
130
|
+
* Aggregate rows that match the supplied filtering queries. Use `groupBy` for up to five scalar grouping columns and `select` for grouped columns or `count`, `sum`, `avg`, `min`, and `max` expressions. Expressions can use an `AS` alias, for example `status AS state`, `count(*) AS total`, or `sum(amount) AS amountTotal`. Selected plain columns must also appear in `groupBy`. Each response row exposes selected grouped columns under `group` and aggregate expressions under `values`, both keyed by their aliases. Pass `transactionId` to include uncommitted row creates, updates, and deletes from that transaction. Aggregations are limited to `APP_LIMIT_COUNT` matching source rows and reject pagination, ordering, cursor, and Query.select controls rather than silently changing the aggregation scope.
|
|
131
|
+
*
|
|
132
|
+
*
|
|
133
|
+
* @param {string} params.databaseId - Database ID.
|
|
134
|
+
* @param {string} params.tableId - Table ID.
|
|
135
|
+
* @param {string[]} params.select - Aggregate expressions and grouped columns to return. Supports count, sum, avg, min, max, and optional AS aliases.
|
|
136
|
+
* @param {string[]} params.queries - Array of filtering query strings generated using the Query class provided by the SDK. Pagination, ordering, cursor, and select queries are not supported by this endpoint.
|
|
137
|
+
* @param {string[]} params.groupBy - Columns used to group matching rows. A maximum of 5 scalar columns is allowed.
|
|
138
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
139
|
+
* @throws {AgentbaseException}
|
|
140
|
+
* @returns {Promise<Models.RowAggregation>}
|
|
141
|
+
*/
|
|
142
|
+
aggregateRows(params: {
|
|
143
|
+
databaseId: string;
|
|
144
|
+
tableId: string;
|
|
145
|
+
select: string[];
|
|
146
|
+
queries?: string[];
|
|
147
|
+
groupBy?: string[];
|
|
148
|
+
transactionId?: string;
|
|
149
|
+
}): Promise<Models.RowAggregation>;
|
|
150
|
+
/**
|
|
151
|
+
* Aggregate rows that match the supplied filtering queries. Use `groupBy` for up to five scalar grouping columns and `select` for grouped columns or `count`, `sum`, `avg`, `min`, and `max` expressions. Expressions can use an `AS` alias, for example `status AS state`, `count(*) AS total`, or `sum(amount) AS amountTotal`. Selected plain columns must also appear in `groupBy`. Each response row exposes selected grouped columns under `group` and aggregate expressions under `values`, both keyed by their aliases. Pass `transactionId` to include uncommitted row creates, updates, and deletes from that transaction. Aggregations are limited to `APP_LIMIT_COUNT` matching source rows and reject pagination, ordering, cursor, and Query.select controls rather than silently changing the aggregation scope.
|
|
152
|
+
*
|
|
153
|
+
*
|
|
154
|
+
* @param {string} databaseId - Database ID.
|
|
155
|
+
* @param {string} tableId - Table ID.
|
|
156
|
+
* @param {string[]} select - Aggregate expressions and grouped columns to return. Supports count, sum, avg, min, max, and optional AS aliases.
|
|
157
|
+
* @param {string[]} queries - Array of filtering query strings generated using the Query class provided by the SDK. Pagination, ordering, cursor, and select queries are not supported by this endpoint.
|
|
158
|
+
* @param {string[]} groupBy - Columns used to group matching rows. A maximum of 5 scalar columns is allowed.
|
|
159
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
160
|
+
* @throws {AgentbaseException}
|
|
161
|
+
* @returns {Promise<Models.RowAggregation>}
|
|
162
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
163
|
+
*/
|
|
164
|
+
aggregateRows(databaseId: string, tableId: string, select: string[], queries?: string[], groupBy?: string[], transactionId?: string): Promise<Models.RowAggregation>;
|
|
165
|
+
/**
|
|
166
|
+
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
167
|
+
*
|
|
168
|
+
* @param {string} params.databaseId - Database ID.
|
|
169
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration]([HOSTNAME]/docs/products/databases/tables#create-table).
|
|
170
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
171
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
172
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
173
|
+
* @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
174
|
+
* @throws {AgentbaseException}
|
|
175
|
+
* @returns {Promise<Models.RowList<Row>>}
|
|
176
|
+
*/
|
|
177
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
178
|
+
databaseId: string;
|
|
179
|
+
tableId: string;
|
|
180
|
+
queries?: string[];
|
|
181
|
+
transactionId?: string;
|
|
182
|
+
total?: boolean;
|
|
183
|
+
ttl?: number;
|
|
184
|
+
}): Promise<Models.RowList<Row>>;
|
|
185
|
+
/**
|
|
186
|
+
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
187
|
+
*
|
|
188
|
+
* @param {string} databaseId - Database ID.
|
|
189
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration]([HOSTNAME]/docs/products/databases/tables#create-table).
|
|
190
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
191
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
192
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
193
|
+
* @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
194
|
+
* @throws {AgentbaseException}
|
|
195
|
+
* @returns {Promise<Models.RowList<Row>>}
|
|
196
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
197
|
+
*/
|
|
198
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.RowList<Row>>;
|
|
199
|
+
/**
|
|
200
|
+
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
201
|
+
*
|
|
202
|
+
* @param {string} params.databaseId - Database ID.
|
|
203
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
|
|
204
|
+
* @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.
|
|
205
|
+
* @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.
|
|
206
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions]([HOSTNAME]/docs/permissions).
|
|
207
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
208
|
+
* @throws {AgentbaseException}
|
|
209
|
+
* @returns {Promise<Row>}
|
|
210
|
+
*/
|
|
211
|
+
createRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
212
|
+
databaseId: string;
|
|
213
|
+
tableId: string;
|
|
214
|
+
rowId: string;
|
|
215
|
+
data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>;
|
|
216
|
+
permissions?: string[];
|
|
217
|
+
transactionId?: string;
|
|
218
|
+
}): Promise<Row>;
|
|
219
|
+
/**
|
|
220
|
+
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
221
|
+
*
|
|
222
|
+
* @param {string} databaseId - Database ID.
|
|
223
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
|
|
224
|
+
* @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.
|
|
225
|
+
* @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.
|
|
226
|
+
* @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions]([HOSTNAME]/docs/permissions).
|
|
227
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
228
|
+
* @throws {AgentbaseException}
|
|
229
|
+
* @returns {Promise<Row>}
|
|
230
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
231
|
+
*/
|
|
232
|
+
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[], transactionId?: string): Promise<Row>;
|
|
233
|
+
/**
|
|
234
|
+
* Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
|
|
235
|
+
*
|
|
236
|
+
* @param {string} params.databaseId - Database ID.
|
|
237
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
238
|
+
* @param {string} params.rowId - Row ID.
|
|
239
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
240
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
241
|
+
* @throws {AgentbaseException}
|
|
242
|
+
* @returns {Promise<Row>}
|
|
243
|
+
*/
|
|
244
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
245
|
+
databaseId: string;
|
|
246
|
+
tableId: string;
|
|
247
|
+
rowId: string;
|
|
248
|
+
queries?: string[];
|
|
249
|
+
transactionId?: string;
|
|
250
|
+
}): Promise<Row>;
|
|
251
|
+
/**
|
|
252
|
+
* Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
|
|
253
|
+
*
|
|
254
|
+
* @param {string} databaseId - Database ID.
|
|
255
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
256
|
+
* @param {string} rowId - Row ID.
|
|
257
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries]([HOSTNAME]/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
258
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
259
|
+
* @throws {AgentbaseException}
|
|
260
|
+
* @returns {Promise<Row>}
|
|
261
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
262
|
+
*/
|
|
263
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string): Promise<Row>;
|
|
264
|
+
/**
|
|
265
|
+
* Create or update a Row. Before using this route, you should create a new table resource using either a [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
266
|
+
*
|
|
267
|
+
* @param {string} params.databaseId - Database ID.
|
|
268
|
+
* @param {string} params.tableId - Table ID.
|
|
269
|
+
* @param {string} params.rowId - Row ID.
|
|
270
|
+
* @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.
|
|
271
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions]([HOSTNAME]/docs/permissions).
|
|
272
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
273
|
+
* @throws {AgentbaseException}
|
|
274
|
+
* @returns {Promise<Row>}
|
|
275
|
+
*/
|
|
276
|
+
upsertRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
277
|
+
databaseId: string;
|
|
278
|
+
tableId: string;
|
|
279
|
+
rowId: string;
|
|
280
|
+
data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
|
|
281
|
+
permissions?: string[];
|
|
282
|
+
transactionId?: string;
|
|
283
|
+
}): Promise<Row>;
|
|
284
|
+
/**
|
|
285
|
+
* Create or update a Row. Before using this route, you should create a new table resource using either a [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
286
|
+
*
|
|
287
|
+
* @param {string} databaseId - Database ID.
|
|
288
|
+
* @param {string} tableId - Table ID.
|
|
289
|
+
* @param {string} rowId - Row ID.
|
|
290
|
+
* @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.
|
|
291
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions]([HOSTNAME]/docs/permissions).
|
|
292
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
293
|
+
* @throws {AgentbaseException}
|
|
294
|
+
* @returns {Promise<Row>}
|
|
295
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
296
|
+
*/
|
|
297
|
+
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[], transactionId?: string): Promise<Row>;
|
|
298
|
+
/**
|
|
299
|
+
* Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
300
|
+
*
|
|
301
|
+
* @param {string} params.databaseId - Database ID.
|
|
302
|
+
* @param {string} params.tableId - Table ID.
|
|
303
|
+
* @param {string} params.rowId - Row ID.
|
|
304
|
+
* @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.
|
|
305
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions]([HOSTNAME]/docs/permissions).
|
|
306
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
307
|
+
* @throws {AgentbaseException}
|
|
308
|
+
* @returns {Promise<Row>}
|
|
309
|
+
*/
|
|
310
|
+
updateRow<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
311
|
+
databaseId: string;
|
|
312
|
+
tableId: string;
|
|
313
|
+
rowId: string;
|
|
314
|
+
data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
|
|
315
|
+
permissions?: string[];
|
|
316
|
+
transactionId?: string;
|
|
317
|
+
}): Promise<Row>;
|
|
318
|
+
/**
|
|
319
|
+
* Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
320
|
+
*
|
|
321
|
+
* @param {string} databaseId - Database ID.
|
|
322
|
+
* @param {string} tableId - Table ID.
|
|
323
|
+
* @param {string} rowId - Row ID.
|
|
324
|
+
* @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.
|
|
325
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions]([HOSTNAME]/docs/permissions).
|
|
326
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
327
|
+
* @throws {AgentbaseException}
|
|
328
|
+
* @returns {Promise<Row>}
|
|
329
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
330
|
+
*/
|
|
331
|
+
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[], transactionId?: string): Promise<Row>;
|
|
332
|
+
/**
|
|
333
|
+
* Delete a row by its unique ID.
|
|
334
|
+
*
|
|
335
|
+
* @param {string} params.databaseId - Database ID.
|
|
336
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
337
|
+
* @param {string} params.rowId - Row ID.
|
|
338
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
339
|
+
* @throws {AgentbaseException}
|
|
340
|
+
* @returns {Promise<{}>}
|
|
341
|
+
*/
|
|
342
|
+
deleteRow(params: {
|
|
343
|
+
databaseId: string;
|
|
344
|
+
tableId: string;
|
|
345
|
+
rowId: string;
|
|
346
|
+
transactionId?: string;
|
|
347
|
+
}): Promise<{}>;
|
|
348
|
+
/**
|
|
349
|
+
* Delete a row by its unique ID.
|
|
350
|
+
*
|
|
351
|
+
* @param {string} databaseId - Database ID.
|
|
352
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration]([HOSTNAME]/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
353
|
+
* @param {string} rowId - Row ID.
|
|
354
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
355
|
+
* @throws {AgentbaseException}
|
|
356
|
+
* @returns {Promise<{}>}
|
|
357
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
358
|
+
*/
|
|
359
|
+
deleteRow(databaseId: string, tableId: string, rowId: string, transactionId?: string): Promise<{}>;
|
|
360
|
+
/**
|
|
361
|
+
* Decrement a specific column of a row by a given value.
|
|
362
|
+
*
|
|
363
|
+
* @param {string} params.databaseId - Database ID.
|
|
364
|
+
* @param {string} params.tableId - Table ID.
|
|
365
|
+
* @param {string} params.rowId - Row ID.
|
|
366
|
+
* @param {string} params.column - Column key.
|
|
367
|
+
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
368
|
+
* @param {number} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
369
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
370
|
+
* @throws {AgentbaseException}
|
|
371
|
+
* @returns {Promise<Row>}
|
|
372
|
+
*/
|
|
373
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
374
|
+
databaseId: string;
|
|
375
|
+
tableId: string;
|
|
376
|
+
rowId: string;
|
|
377
|
+
column: string;
|
|
378
|
+
value?: number;
|
|
379
|
+
min?: number;
|
|
380
|
+
transactionId?: string;
|
|
381
|
+
}): Promise<Row>;
|
|
382
|
+
/**
|
|
383
|
+
* Decrement a specific column of a row by a given value.
|
|
384
|
+
*
|
|
385
|
+
* @param {string} databaseId - Database ID.
|
|
386
|
+
* @param {string} tableId - Table ID.
|
|
387
|
+
* @param {string} rowId - Row ID.
|
|
388
|
+
* @param {string} column - Column key.
|
|
389
|
+
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
390
|
+
* @param {number} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
391
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
392
|
+
* @throws {AgentbaseException}
|
|
393
|
+
* @returns {Promise<Row>}
|
|
394
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
395
|
+
*/
|
|
396
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string): Promise<Row>;
|
|
397
|
+
/**
|
|
398
|
+
* Increment a specific column of a row by a given value.
|
|
399
|
+
*
|
|
400
|
+
* @param {string} params.databaseId - Database ID.
|
|
401
|
+
* @param {string} params.tableId - Table ID.
|
|
402
|
+
* @param {string} params.rowId - Row ID.
|
|
403
|
+
* @param {string} params.column - Column key.
|
|
404
|
+
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
405
|
+
* @param {number} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
406
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
407
|
+
* @throws {AgentbaseException}
|
|
408
|
+
* @returns {Promise<Row>}
|
|
409
|
+
*/
|
|
410
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: {
|
|
411
|
+
databaseId: string;
|
|
412
|
+
tableId: string;
|
|
413
|
+
rowId: string;
|
|
414
|
+
column: string;
|
|
415
|
+
value?: number;
|
|
416
|
+
max?: number;
|
|
417
|
+
transactionId?: string;
|
|
418
|
+
}): Promise<Row>;
|
|
419
|
+
/**
|
|
420
|
+
* Increment a specific column of a row by a given value.
|
|
421
|
+
*
|
|
422
|
+
* @param {string} databaseId - Database ID.
|
|
423
|
+
* @param {string} tableId - Table ID.
|
|
424
|
+
* @param {string} rowId - Row ID.
|
|
425
|
+
* @param {string} column - Column key.
|
|
426
|
+
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
427
|
+
* @param {number} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
428
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
429
|
+
* @throws {AgentbaseException}
|
|
430
|
+
* @returns {Promise<Row>}
|
|
431
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
432
|
+
*/
|
|
433
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise<Row>;
|
|
434
|
+
}
|