react-native-appwrite 0.12.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/dist/cjs/sdk.js +123 -11
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +123 -11
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/account/update-prefs.md +5 -1
- package/docs/examples/databases/create-document.md +7 -1
- package/docs/examples/databases/decrement-document-attribute.md +2 -2
- package/docs/examples/databases/increment-document-attribute.md +2 -2
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/tablesdb/create-row.md +7 -1
- package/docs/examples/tablesdb/decrement-row-column.md +2 -2
- package/docs/examples/tablesdb/increment-row-column.md +2 -2
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/credit-card.ts +1 -1
- package/src/enums/execution-method.ts +1 -0
- package/src/query.ts +153 -5
- package/src/services/account.ts +2 -2
- package/src/services/avatars.ts +2 -2
- package/src/services/databases.ts +0 -9
- package/src/services/functions.ts +2 -2
- package/types/enums/credit-card.d.ts +1 -1
- package/types/enums/execution-method.d.ts +2 -1
- package/types/query.d.ts +125 -5
- package/types/services/account.d.ts +2 -2
- package/types/services/avatars.d.ts +2 -2
- package/types/services/functions.d.ts +2 -2
|
@@ -10,7 +10,13 @@ const result = await databases.createDocument({
|
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
|
-
data: {
|
|
13
|
+
data: {
|
|
14
|
+
"username": "walter.obrien",
|
|
15
|
+
"email": "walter.obrien@example.com",
|
|
16
|
+
"fullName": "Walter O'Brien",
|
|
17
|
+
"age": 30,
|
|
18
|
+
"isAdmin": false
|
|
19
|
+
},
|
|
14
20
|
permissions: ["read("any")"] // optional
|
|
15
21
|
});
|
|
16
22
|
|
|
@@ -11,8 +11,8 @@ const result = await databases.decrementDocumentAttribute({
|
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
13
|
attribute: '',
|
|
14
|
-
value:
|
|
15
|
-
min:
|
|
14
|
+
value: 0, // optional
|
|
15
|
+
min: 0 // optional
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
console.log(result);
|
|
@@ -11,8 +11,8 @@ const result = await databases.incrementDocumentAttribute({
|
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
13
|
attribute: '',
|
|
14
|
-
value:
|
|
15
|
-
max:
|
|
14
|
+
value: 0, // optional
|
|
15
|
+
max: 0 // optional
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
console.log(result);
|
|
@@ -9,7 +9,7 @@ const storage = new Storage(client);
|
|
|
9
9
|
const result = await storage.createFile({
|
|
10
10
|
bucketId: '<BUCKET_ID>',
|
|
11
11
|
fileId: '<FILE_ID>',
|
|
12
|
-
file:
|
|
12
|
+
file: InputFile.fromPath('/path/to/file', 'filename'),
|
|
13
13
|
permissions: ["read("any")"] // optional
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -10,7 +10,13 @@ const result = await tablesDB.createRow({
|
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
tableId: '<TABLE_ID>',
|
|
12
12
|
rowId: '<ROW_ID>',
|
|
13
|
-
data: {
|
|
13
|
+
data: {
|
|
14
|
+
"username": "walter.obrien",
|
|
15
|
+
"email": "walter.obrien@example.com",
|
|
16
|
+
"fullName": "Walter O'Brien",
|
|
17
|
+
"age": 30,
|
|
18
|
+
"isAdmin": false
|
|
19
|
+
},
|
|
14
20
|
permissions: ["read("any")"] // optional
|
|
15
21
|
});
|
|
16
22
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "react-native-appwrite",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.13.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
package/src/client.ts
CHANGED
package/src/enums/credit-card.ts
CHANGED
package/src/query.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type QueryTypesSingle = string | number | boolean;
|
|
2
|
-
export type QueryTypesList = string[] | number[] | boolean[] | Query[];
|
|
2
|
+
export type QueryTypesList = string[] | number[] | boolean[] | Query[] | any[];
|
|
3
3
|
export type QueryTypes = QueryTypesSingle | QueryTypesList;
|
|
4
4
|
type AttributesTypes = string | string[];
|
|
5
5
|
|
|
@@ -33,10 +33,10 @@ export class Query {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
static equal = (attribute: string, value: QueryTypes): string =>
|
|
36
|
+
static equal = (attribute: string, value: QueryTypes | any[]): string =>
|
|
37
37
|
new Query("equal", attribute, value).toString();
|
|
38
38
|
|
|
39
|
-
static notEqual = (attribute: string, value: QueryTypes): string =>
|
|
39
|
+
static notEqual = (attribute: string, value: QueryTypes | any[]): string =>
|
|
40
40
|
new Query("notEqual", attribute, value).toString();
|
|
41
41
|
|
|
42
42
|
static lessThan = (attribute: string, value: QueryTypes): string =>
|
|
@@ -97,7 +97,7 @@ export class Query {
|
|
|
97
97
|
* @param {string | string[]} value
|
|
98
98
|
* @returns {string}
|
|
99
99
|
*/
|
|
100
|
-
static contains = (attribute: string, value: string |
|
|
100
|
+
static contains = (attribute: string, value: string | any[]): string =>
|
|
101
101
|
new Query("contains", attribute, value).toString();
|
|
102
102
|
|
|
103
103
|
/**
|
|
@@ -107,7 +107,7 @@ export class Query {
|
|
|
107
107
|
* @param {string | string[]} value
|
|
108
108
|
* @returns {string}
|
|
109
109
|
*/
|
|
110
|
-
static notContains = (attribute: string, value: string |
|
|
110
|
+
static notContains = (attribute: string, value: string | any[]): string =>
|
|
111
111
|
new Query("notContains", attribute, value).toString();
|
|
112
112
|
|
|
113
113
|
/**
|
|
@@ -170,6 +170,16 @@ export class Query {
|
|
|
170
170
|
static createdAfter = (value: string): string =>
|
|
171
171
|
new Query("createdAfter", undefined, value).toString();
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Filter resources where document was created between dates.
|
|
175
|
+
*
|
|
176
|
+
* @param {string} start
|
|
177
|
+
* @param {string} end
|
|
178
|
+
* @returns {string}
|
|
179
|
+
*/
|
|
180
|
+
static createdBetween = (start: string, end: string): string =>
|
|
181
|
+
new Query("createdBetween", undefined, [start, end] as QueryTypesList).toString();
|
|
182
|
+
|
|
173
183
|
/**
|
|
174
184
|
* Filter resources where document was updated before date.
|
|
175
185
|
*
|
|
@@ -188,9 +198,147 @@ export class Query {
|
|
|
188
198
|
static updatedAfter = (value: string): string =>
|
|
189
199
|
new Query("updatedAfter", undefined, value).toString();
|
|
190
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Filter resources where document was updated between dates.
|
|
203
|
+
*
|
|
204
|
+
* @param {string} start
|
|
205
|
+
* @param {string} end
|
|
206
|
+
* @returns {string}
|
|
207
|
+
*/
|
|
208
|
+
static updatedBetween = (start: string, end: string): string =>
|
|
209
|
+
new Query("updatedBetween", undefined, [start, end] as QueryTypesList).toString();
|
|
210
|
+
|
|
191
211
|
static or = (queries: string[]) =>
|
|
192
212
|
new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
193
213
|
|
|
194
214
|
static and = (queries: string[]) =>
|
|
195
215
|
new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Filter resources where attribute is at a specific distance from the given coordinates.
|
|
219
|
+
*
|
|
220
|
+
* @param {string} attribute
|
|
221
|
+
* @param {any[]} values
|
|
222
|
+
* @param {number} distance
|
|
223
|
+
* @param {boolean} meters
|
|
224
|
+
* @returns {string}
|
|
225
|
+
*/
|
|
226
|
+
static distanceEqual = (attribute: string, values: any[], distance: number, meters: boolean = true): string =>
|
|
227
|
+
new Query("distanceEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Filter resources where attribute is not at a specific distance from the given coordinates.
|
|
231
|
+
*
|
|
232
|
+
* @param {string} attribute
|
|
233
|
+
* @param {any[]} values
|
|
234
|
+
* @param {number} distance
|
|
235
|
+
* @param {boolean} meters
|
|
236
|
+
* @returns {string}
|
|
237
|
+
*/
|
|
238
|
+
static distanceNotEqual = (attribute: string, values: any[], distance: number, meters: boolean = true): string =>
|
|
239
|
+
new Query("distanceNotEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
|
|
243
|
+
*
|
|
244
|
+
* @param {string} attribute
|
|
245
|
+
* @param {any[]} values
|
|
246
|
+
* @param {number} distance
|
|
247
|
+
* @param {boolean} meters
|
|
248
|
+
* @returns {string}
|
|
249
|
+
*/
|
|
250
|
+
static distanceGreaterThan = (attribute: string, values: any[], distance: number, meters: boolean = true): string =>
|
|
251
|
+
new Query("distanceGreaterThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Filter resources where attribute is at a distance less than the specified value from the given coordinates.
|
|
255
|
+
*
|
|
256
|
+
* @param {string} attribute
|
|
257
|
+
* @param {any[]} values
|
|
258
|
+
* @param {number} distance
|
|
259
|
+
* @param {boolean} meters
|
|
260
|
+
* @returns {string}
|
|
261
|
+
*/
|
|
262
|
+
static distanceLessThan = (attribute: string, values: any[], distance: number, meters: boolean = true): string =>
|
|
263
|
+
new Query("distanceLessThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Filter resources where attribute intersects with the given geometry.
|
|
267
|
+
*
|
|
268
|
+
* @param {string} attribute
|
|
269
|
+
* @param {any[]} values
|
|
270
|
+
* @returns {string}
|
|
271
|
+
*/
|
|
272
|
+
static intersects = (attribute: string, values: any[]): string =>
|
|
273
|
+
new Query("intersects", attribute, [values]).toString();
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Filter resources where attribute does not intersect with the given geometry.
|
|
277
|
+
*
|
|
278
|
+
* @param {string} attribute
|
|
279
|
+
* @param {any[]} values
|
|
280
|
+
* @returns {string}
|
|
281
|
+
*/
|
|
282
|
+
static notIntersects = (attribute: string, values: any[]): string =>
|
|
283
|
+
new Query("notIntersects", attribute, [values]).toString();
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Filter resources where attribute crosses the given geometry.
|
|
287
|
+
*
|
|
288
|
+
* @param {string} attribute
|
|
289
|
+
* @param {any[]} values
|
|
290
|
+
* @returns {string}
|
|
291
|
+
*/
|
|
292
|
+
static crosses = (attribute: string, values: any[]): string =>
|
|
293
|
+
new Query("crosses", attribute, [values]).toString();
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Filter resources where attribute does not cross the given geometry.
|
|
297
|
+
*
|
|
298
|
+
* @param {string} attribute
|
|
299
|
+
* @param {any[]} values
|
|
300
|
+
* @returns {string}
|
|
301
|
+
*/
|
|
302
|
+
static notCrosses = (attribute: string, values: any[]): string =>
|
|
303
|
+
new Query("notCrosses", attribute, [values]).toString();
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Filter resources where attribute overlaps with the given geometry.
|
|
307
|
+
*
|
|
308
|
+
* @param {string} attribute
|
|
309
|
+
* @param {any[]} values
|
|
310
|
+
* @returns {string}
|
|
311
|
+
*/
|
|
312
|
+
static overlaps = (attribute: string, values: any[]): string =>
|
|
313
|
+
new Query("overlaps", attribute, [values]).toString();
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Filter resources where attribute does not overlap with the given geometry.
|
|
317
|
+
*
|
|
318
|
+
* @param {string} attribute
|
|
319
|
+
* @param {any[]} values
|
|
320
|
+
* @returns {string}
|
|
321
|
+
*/
|
|
322
|
+
static notOverlaps = (attribute: string, values: any[]): string =>
|
|
323
|
+
new Query("notOverlaps", attribute, [values]).toString();
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Filter resources where attribute touches the given geometry.
|
|
327
|
+
*
|
|
328
|
+
* @param {string} attribute
|
|
329
|
+
* @param {any[]} values
|
|
330
|
+
* @returns {string}
|
|
331
|
+
*/
|
|
332
|
+
static touches = (attribute: string, values: any[]): string =>
|
|
333
|
+
new Query("touches", attribute, [values]).toString();
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Filter resources where attribute does not touch the given geometry.
|
|
337
|
+
*
|
|
338
|
+
* @param {string} attribute
|
|
339
|
+
* @param {any[]} values
|
|
340
|
+
* @returns {string}
|
|
341
|
+
*/
|
|
342
|
+
static notTouches = (attribute: string, values: any[]): string =>
|
|
343
|
+
new Query("notTouches", attribute, [values]).toString();
|
|
196
344
|
}
|
package/src/services/account.ts
CHANGED
|
@@ -1521,7 +1521,7 @@ export class Account extends Service {
|
|
|
1521
1521
|
* @param {string} params.secret - Valid verification token.
|
|
1522
1522
|
* @throws {AppwriteException}
|
|
1523
1523
|
* @returns {Promise}
|
|
1524
|
-
* @deprecated This API has been deprecated.
|
|
1524
|
+
* @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
|
|
1525
1525
|
*/
|
|
1526
1526
|
updateMagicURLSession(params: { userId: string, secret: string }): Promise<Models.Session>;
|
|
1527
1527
|
/**
|
|
@@ -1668,7 +1668,7 @@ export class Account extends Service {
|
|
|
1668
1668
|
* @param {string} params.secret - Valid verification token.
|
|
1669
1669
|
* @throws {AppwriteException}
|
|
1670
1670
|
* @returns {Promise}
|
|
1671
|
-
* @deprecated This API has been deprecated.
|
|
1671
|
+
* @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
|
|
1672
1672
|
*/
|
|
1673
1673
|
updatePhoneSession(params: { userId: string, secret: string }): Promise<Models.Session>;
|
|
1674
1674
|
/**
|
package/src/services/avatars.ts
CHANGED
|
@@ -101,7 +101,7 @@ export class Avatars extends Service {
|
|
|
101
101
|
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
102
102
|
*
|
|
103
103
|
*
|
|
104
|
-
* @param {CreditCard} params.code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping,
|
|
104
|
+
* @param {CreditCard} params.code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.
|
|
105
105
|
* @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.
|
|
106
106
|
* @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.
|
|
107
107
|
* @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
|
|
@@ -115,7 +115,7 @@ export class Avatars extends Service {
|
|
|
115
115
|
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
116
116
|
*
|
|
117
117
|
*
|
|
118
|
-
* @param {CreditCard} code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping,
|
|
118
|
+
* @param {CreditCard} code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.
|
|
119
119
|
* @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.
|
|
120
120
|
* @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.
|
|
121
121
|
* @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
|
|
@@ -141,9 +141,6 @@ export class Databases extends Service {
|
|
|
141
141
|
throw new AppwriteException('Missing required parameter: "data"');
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
delete data?.$sequence;
|
|
145
|
-
delete data?.$collectionId;
|
|
146
|
-
delete data?.$databaseId;
|
|
147
144
|
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
148
145
|
const payload: Payload = {};
|
|
149
146
|
|
|
@@ -301,9 +298,6 @@ export class Databases extends Service {
|
|
|
301
298
|
throw new AppwriteException('Missing required parameter: "data"');
|
|
302
299
|
}
|
|
303
300
|
|
|
304
|
-
delete data?.$sequence;
|
|
305
|
-
delete data?.$collectionId;
|
|
306
|
-
delete data?.$databaseId;
|
|
307
301
|
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
308
302
|
const payload: Payload = {};
|
|
309
303
|
|
|
@@ -383,9 +377,6 @@ export class Databases extends Service {
|
|
|
383
377
|
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
384
378
|
}
|
|
385
379
|
|
|
386
|
-
delete data?.$sequence;
|
|
387
|
-
delete data?.$collectionId;
|
|
388
|
-
delete data?.$databaseId;
|
|
389
380
|
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
390
381
|
const payload: Payload = {};
|
|
391
382
|
|
|
@@ -74,7 +74,7 @@ export class Functions extends Service {
|
|
|
74
74
|
* @param {string} params.body - HTTP body of execution. Default value is empty string.
|
|
75
75
|
* @param {boolean} params.async - Execute code in the background. Default value is false.
|
|
76
76
|
* @param {string} params.xpath - HTTP path of execution. Path can include query params. Default value is /
|
|
77
|
-
* @param {ExecutionMethod} params.method - HTTP method of execution. Default value is
|
|
77
|
+
* @param {ExecutionMethod} params.method - HTTP method of execution. Default value is POST.
|
|
78
78
|
* @param {object} params.headers - HTTP headers of execution. Defaults to empty.
|
|
79
79
|
* @param {string} params.scheduledAt - Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
|
|
80
80
|
* @throws {AppwriteException}
|
|
@@ -88,7 +88,7 @@ export class Functions extends Service {
|
|
|
88
88
|
* @param {string} body - HTTP body of execution. Default value is empty string.
|
|
89
89
|
* @param {boolean} async - Execute code in the background. Default value is false.
|
|
90
90
|
* @param {string} xpath - HTTP path of execution. Path can include query params. Default value is /
|
|
91
|
-
* @param {ExecutionMethod} method - HTTP method of execution. Default value is
|
|
91
|
+
* @param {ExecutionMethod} method - HTTP method of execution. Default value is POST.
|
|
92
92
|
* @param {object} headers - HTTP headers of execution. Defaults to empty.
|
|
93
93
|
* @param {string} scheduledAt - Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
|
|
94
94
|
* @throws {AppwriteException}
|
package/types/query.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type QueryTypesSingle = string | number | boolean;
|
|
2
|
-
export type QueryTypesList = string[] | number[] | boolean[] | Query[];
|
|
2
|
+
export type QueryTypesList = string[] | number[] | boolean[] | Query[] | any[];
|
|
3
3
|
export type QueryTypes = QueryTypesSingle | QueryTypesList;
|
|
4
4
|
type AttributesTypes = string | string[];
|
|
5
5
|
export declare class Query {
|
|
@@ -8,8 +8,8 @@ export declare class Query {
|
|
|
8
8
|
values: QueryTypesList | undefined;
|
|
9
9
|
constructor(method: string, attribute?: AttributesTypes, values?: QueryTypes);
|
|
10
10
|
toString(): string;
|
|
11
|
-
static equal: (attribute: string, value: QueryTypes) => string;
|
|
12
|
-
static notEqual: (attribute: string, value: QueryTypes) => string;
|
|
11
|
+
static equal: (attribute: string, value: QueryTypes | any[]) => string;
|
|
12
|
+
static notEqual: (attribute: string, value: QueryTypes | any[]) => string;
|
|
13
13
|
static lessThan: (attribute: string, value: QueryTypes) => string;
|
|
14
14
|
static lessThanEqual: (attribute: string, value: QueryTypes) => string;
|
|
15
15
|
static greaterThan: (attribute: string, value: QueryTypes) => string;
|
|
@@ -34,7 +34,7 @@ export declare class Query {
|
|
|
34
34
|
* @param {string | string[]} value
|
|
35
35
|
* @returns {string}
|
|
36
36
|
*/
|
|
37
|
-
static contains: (attribute: string, value: string |
|
|
37
|
+
static contains: (attribute: string, value: string | any[]) => string;
|
|
38
38
|
/**
|
|
39
39
|
* Filter resources where attribute does not contain the specified value.
|
|
40
40
|
*
|
|
@@ -42,7 +42,7 @@ export declare class Query {
|
|
|
42
42
|
* @param {string | string[]} value
|
|
43
43
|
* @returns {string}
|
|
44
44
|
*/
|
|
45
|
-
static notContains: (attribute: string, value: string |
|
|
45
|
+
static notContains: (attribute: string, value: string | any[]) => string;
|
|
46
46
|
/**
|
|
47
47
|
* Filter resources by searching attribute for value (inverse of search).
|
|
48
48
|
* A fulltext index on attribute is required for this query to work.
|
|
@@ -91,6 +91,14 @@ export declare class Query {
|
|
|
91
91
|
* @returns {string}
|
|
92
92
|
*/
|
|
93
93
|
static createdAfter: (value: string) => string;
|
|
94
|
+
/**
|
|
95
|
+
* Filter resources where document was created between dates.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} start
|
|
98
|
+
* @param {string} end
|
|
99
|
+
* @returns {string}
|
|
100
|
+
*/
|
|
101
|
+
static createdBetween: (start: string, end: string) => string;
|
|
94
102
|
/**
|
|
95
103
|
* Filter resources where document was updated before date.
|
|
96
104
|
*
|
|
@@ -105,7 +113,119 @@ export declare class Query {
|
|
|
105
113
|
* @returns {string}
|
|
106
114
|
*/
|
|
107
115
|
static updatedAfter: (value: string) => string;
|
|
116
|
+
/**
|
|
117
|
+
* Filter resources where document was updated between dates.
|
|
118
|
+
*
|
|
119
|
+
* @param {string} start
|
|
120
|
+
* @param {string} end
|
|
121
|
+
* @returns {string}
|
|
122
|
+
*/
|
|
123
|
+
static updatedBetween: (start: string, end: string) => string;
|
|
108
124
|
static or: (queries: string[]) => string;
|
|
109
125
|
static and: (queries: string[]) => string;
|
|
126
|
+
/**
|
|
127
|
+
* Filter resources where attribute is at a specific distance from the given coordinates.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} attribute
|
|
130
|
+
* @param {any[]} values
|
|
131
|
+
* @param {number} distance
|
|
132
|
+
* @param {boolean} meters
|
|
133
|
+
* @returns {string}
|
|
134
|
+
*/
|
|
135
|
+
static distanceEqual: (attribute: string, values: any[], distance: number, meters?: boolean) => string;
|
|
136
|
+
/**
|
|
137
|
+
* Filter resources where attribute is not at a specific distance from the given coordinates.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} attribute
|
|
140
|
+
* @param {any[]} values
|
|
141
|
+
* @param {number} distance
|
|
142
|
+
* @param {boolean} meters
|
|
143
|
+
* @returns {string}
|
|
144
|
+
*/
|
|
145
|
+
static distanceNotEqual: (attribute: string, values: any[], distance: number, meters?: boolean) => string;
|
|
146
|
+
/**
|
|
147
|
+
* Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
|
|
148
|
+
*
|
|
149
|
+
* @param {string} attribute
|
|
150
|
+
* @param {any[]} values
|
|
151
|
+
* @param {number} distance
|
|
152
|
+
* @param {boolean} meters
|
|
153
|
+
* @returns {string}
|
|
154
|
+
*/
|
|
155
|
+
static distanceGreaterThan: (attribute: string, values: any[], distance: number, meters?: boolean) => string;
|
|
156
|
+
/**
|
|
157
|
+
* Filter resources where attribute is at a distance less than the specified value from the given coordinates.
|
|
158
|
+
*
|
|
159
|
+
* @param {string} attribute
|
|
160
|
+
* @param {any[]} values
|
|
161
|
+
* @param {number} distance
|
|
162
|
+
* @param {boolean} meters
|
|
163
|
+
* @returns {string}
|
|
164
|
+
*/
|
|
165
|
+
static distanceLessThan: (attribute: string, values: any[], distance: number, meters?: boolean) => string;
|
|
166
|
+
/**
|
|
167
|
+
* Filter resources where attribute intersects with the given geometry.
|
|
168
|
+
*
|
|
169
|
+
* @param {string} attribute
|
|
170
|
+
* @param {any[]} values
|
|
171
|
+
* @returns {string}
|
|
172
|
+
*/
|
|
173
|
+
static intersects: (attribute: string, values: any[]) => string;
|
|
174
|
+
/**
|
|
175
|
+
* Filter resources where attribute does not intersect with the given geometry.
|
|
176
|
+
*
|
|
177
|
+
* @param {string} attribute
|
|
178
|
+
* @param {any[]} values
|
|
179
|
+
* @returns {string}
|
|
180
|
+
*/
|
|
181
|
+
static notIntersects: (attribute: string, values: any[]) => string;
|
|
182
|
+
/**
|
|
183
|
+
* Filter resources where attribute crosses the given geometry.
|
|
184
|
+
*
|
|
185
|
+
* @param {string} attribute
|
|
186
|
+
* @param {any[]} values
|
|
187
|
+
* @returns {string}
|
|
188
|
+
*/
|
|
189
|
+
static crosses: (attribute: string, values: any[]) => string;
|
|
190
|
+
/**
|
|
191
|
+
* Filter resources where attribute does not cross the given geometry.
|
|
192
|
+
*
|
|
193
|
+
* @param {string} attribute
|
|
194
|
+
* @param {any[]} values
|
|
195
|
+
* @returns {string}
|
|
196
|
+
*/
|
|
197
|
+
static notCrosses: (attribute: string, values: any[]) => string;
|
|
198
|
+
/**
|
|
199
|
+
* Filter resources where attribute overlaps with the given geometry.
|
|
200
|
+
*
|
|
201
|
+
* @param {string} attribute
|
|
202
|
+
* @param {any[]} values
|
|
203
|
+
* @returns {string}
|
|
204
|
+
*/
|
|
205
|
+
static overlaps: (attribute: string, values: any[]) => string;
|
|
206
|
+
/**
|
|
207
|
+
* Filter resources where attribute does not overlap with the given geometry.
|
|
208
|
+
*
|
|
209
|
+
* @param {string} attribute
|
|
210
|
+
* @param {any[]} values
|
|
211
|
+
* @returns {string}
|
|
212
|
+
*/
|
|
213
|
+
static notOverlaps: (attribute: string, values: any[]) => string;
|
|
214
|
+
/**
|
|
215
|
+
* Filter resources where attribute touches the given geometry.
|
|
216
|
+
*
|
|
217
|
+
* @param {string} attribute
|
|
218
|
+
* @param {any[]} values
|
|
219
|
+
* @returns {string}
|
|
220
|
+
*/
|
|
221
|
+
static touches: (attribute: string, values: any[]) => string;
|
|
222
|
+
/**
|
|
223
|
+
* Filter resources where attribute does not touch the given geometry.
|
|
224
|
+
*
|
|
225
|
+
* @param {string} attribute
|
|
226
|
+
* @param {any[]} values
|
|
227
|
+
* @returns {string}
|
|
228
|
+
*/
|
|
229
|
+
static notTouches: (attribute: string, values: any[]) => string;
|
|
110
230
|
}
|
|
111
231
|
export {};
|
|
@@ -611,7 +611,7 @@ export declare class Account extends Service {
|
|
|
611
611
|
* @param {string} params.secret - Valid verification token.
|
|
612
612
|
* @throws {AppwriteException}
|
|
613
613
|
* @returns {Promise}
|
|
614
|
-
* @deprecated This API has been deprecated.
|
|
614
|
+
* @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
|
|
615
615
|
*/
|
|
616
616
|
updateMagicURLSession(params: {
|
|
617
617
|
userId: string;
|
|
@@ -672,7 +672,7 @@ export declare class Account extends Service {
|
|
|
672
672
|
* @param {string} params.secret - Valid verification token.
|
|
673
673
|
* @throws {AppwriteException}
|
|
674
674
|
* @returns {Promise}
|
|
675
|
-
* @deprecated This API has been deprecated.
|
|
675
|
+
* @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
|
|
676
676
|
*/
|
|
677
677
|
updatePhoneSession(params: {
|
|
678
678
|
userId: string;
|
|
@@ -43,7 +43,7 @@ export declare class Avatars extends Service {
|
|
|
43
43
|
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
44
44
|
*
|
|
45
45
|
*
|
|
46
|
-
* @param {CreditCard} params.code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping,
|
|
46
|
+
* @param {CreditCard} params.code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.
|
|
47
47
|
* @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.
|
|
48
48
|
* @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.
|
|
49
49
|
* @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
|
|
@@ -62,7 +62,7 @@ export declare class Avatars extends Service {
|
|
|
62
62
|
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
63
63
|
*
|
|
64
64
|
*
|
|
65
|
-
* @param {CreditCard} code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping,
|
|
65
|
+
* @param {CreditCard} code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.
|
|
66
66
|
* @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.
|
|
67
67
|
* @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.
|
|
68
68
|
* @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
|