node-appwrite 7.0.1 → 7.0.2
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/index.d.ts +84 -68
- package/lib/client.js +1 -1
- package/lib/services/account.js +10 -10
- package/lib/services/databases.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1570,6 +1570,18 @@ declare module "node-appwrite" {
|
|
|
1570
1570
|
constructor(client: Client);
|
|
1571
1571
|
}
|
|
1572
1572
|
|
|
1573
|
+
export class InputFile {
|
|
1574
|
+
static fromPath(filePath: string, filename: string): InputFile;
|
|
1575
|
+
|
|
1576
|
+
static fromBuffer(buffer: Buffer, filename: string): InputFile;
|
|
1577
|
+
|
|
1578
|
+
static fromBlob(blob: Blob, filename: string): InputFile;
|
|
1579
|
+
|
|
1580
|
+
static fromStream(stream: any, filename: string, size: number): InputFile;
|
|
1581
|
+
|
|
1582
|
+
static fromPlainText(content: string, filename: string): InputFile;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1573
1585
|
type QueryTypesSingle = string | number | boolean;
|
|
1574
1586
|
type QueryTypesList = string[] | number[] | boolean[];
|
|
1575
1587
|
type QueryTypes = QueryTypesSingle | QueryTypesList;
|
|
@@ -1595,6 +1607,8 @@ declare module "node-appwrite" {
|
|
|
1595
1607
|
}
|
|
1596
1608
|
|
|
1597
1609
|
export class Account extends Service {
|
|
1610
|
+
constructor(client: Client);
|
|
1611
|
+
|
|
1598
1612
|
/**
|
|
1599
1613
|
* Get Account
|
|
1600
1614
|
*
|
|
@@ -1660,10 +1674,11 @@ declare module "node-appwrite" {
|
|
|
1660
1674
|
/**
|
|
1661
1675
|
* Update Account Phone
|
|
1662
1676
|
*
|
|
1663
|
-
* Update currently logged in user
|
|
1664
|
-
* number, the
|
|
1665
|
-
* is not sent automatically however you can use the
|
|
1666
|
-
*
|
|
1677
|
+
* Update the currently logged in user's phone number. After updating the
|
|
1678
|
+
* phone number, the phone verification status will be reset. A confirmation
|
|
1679
|
+
* SMS is not sent automatically, however you can use the [POST
|
|
1680
|
+
* /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
|
|
1681
|
+
* endpoint to send a confirmation SMS.
|
|
1667
1682
|
*
|
|
1668
1683
|
* @param {string} number
|
|
1669
1684
|
* @param {string} password
|
|
@@ -1839,13 +1854,12 @@ declare module "node-appwrite" {
|
|
|
1839
1854
|
/**
|
|
1840
1855
|
* Create Phone Verification
|
|
1841
1856
|
*
|
|
1842
|
-
* Use this endpoint to send a verification
|
|
1843
|
-
*
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1846
|
-
* [complete the verification
|
|
1857
|
+
* Use this endpoint to send a verification SMS to the currently logged in
|
|
1858
|
+
* user. This endpoint is meant for use after updating a user's phone number
|
|
1859
|
+
* using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone)
|
|
1860
|
+
* endpoint. Learn more about how to [complete the verification
|
|
1847
1861
|
* process](/docs/client/account#accountUpdatePhoneVerification). The
|
|
1848
|
-
* verification
|
|
1862
|
+
* verification code sent to the user's phone number is valid for 15 minutes.
|
|
1849
1863
|
*
|
|
1850
1864
|
* @throws {AppwriteException}
|
|
1851
1865
|
* @returns {Promise}
|
|
@@ -1867,6 +1881,8 @@ declare module "node-appwrite" {
|
|
|
1867
1881
|
updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
|
|
1868
1882
|
}
|
|
1869
1883
|
export class Avatars extends Service {
|
|
1884
|
+
constructor(client: Client);
|
|
1885
|
+
|
|
1870
1886
|
/**
|
|
1871
1887
|
* Get Browser Icon
|
|
1872
1888
|
*
|
|
@@ -2009,6 +2025,23 @@ declare module "node-appwrite" {
|
|
|
2009
2025
|
getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<Buffer>;
|
|
2010
2026
|
}
|
|
2011
2027
|
export class Databases extends Service {
|
|
2028
|
+
constructor(client: Client, databaseId: string);
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Get databaseId.
|
|
2032
|
+
*
|
|
2033
|
+
* @returns {string}
|
|
2034
|
+
*/
|
|
2035
|
+
getDatabaseId(): string;
|
|
2036
|
+
|
|
2037
|
+
/**
|
|
2038
|
+
* Set databaseId.
|
|
2039
|
+
*
|
|
2040
|
+
* @param {string} databaseId
|
|
2041
|
+
* @returns {void}
|
|
2042
|
+
*/
|
|
2043
|
+
setDatabaseId(databaseId: string): void;
|
|
2044
|
+
|
|
2012
2045
|
/**
|
|
2013
2046
|
* List Databases
|
|
2014
2047
|
*
|
|
@@ -2025,41 +2058,36 @@ declare module "node-appwrite" {
|
|
|
2025
2058
|
/**
|
|
2026
2059
|
* Create Database
|
|
2027
2060
|
*
|
|
2028
|
-
* @param {string} databaseId
|
|
2029
2061
|
* @param {string} name
|
|
2030
2062
|
* @throws {AppwriteException}
|
|
2031
2063
|
* @returns {Promise}
|
|
2032
2064
|
*/
|
|
2033
|
-
create(
|
|
2065
|
+
create(name: string): Promise<Models.Database>;
|
|
2034
2066
|
/**
|
|
2035
2067
|
* Get Database
|
|
2036
2068
|
*
|
|
2037
|
-
* @param {string} databaseId
|
|
2038
2069
|
* @throws {AppwriteException}
|
|
2039
2070
|
* @returns {Promise}
|
|
2040
2071
|
*/
|
|
2041
|
-
get(
|
|
2072
|
+
get(): Promise<Models.Collection>;
|
|
2042
2073
|
/**
|
|
2043
2074
|
* Update Database
|
|
2044
2075
|
*
|
|
2045
|
-
* @param {string} databaseId
|
|
2046
2076
|
* @param {string} name
|
|
2047
2077
|
* @throws {AppwriteException}
|
|
2048
2078
|
* @returns {Promise}
|
|
2049
2079
|
*/
|
|
2050
|
-
update(
|
|
2080
|
+
update(name: string): Promise<Models.Collection>;
|
|
2051
2081
|
/**
|
|
2052
2082
|
* Delete Database
|
|
2053
2083
|
*
|
|
2054
|
-
* @param {string} databaseId
|
|
2055
2084
|
* @throws {AppwriteException}
|
|
2056
2085
|
* @returns {Promise}
|
|
2057
2086
|
*/
|
|
2058
|
-
delete(
|
|
2087
|
+
delete(): Promise<Response>;
|
|
2059
2088
|
/**
|
|
2060
2089
|
* List Collections
|
|
2061
2090
|
*
|
|
2062
|
-
* @param {string} databaseId
|
|
2063
2091
|
* @param {string} search
|
|
2064
2092
|
* @param {number} limit
|
|
2065
2093
|
* @param {number} offset
|
|
@@ -2069,11 +2097,10 @@ declare module "node-appwrite" {
|
|
|
2069
2097
|
* @throws {AppwriteException}
|
|
2070
2098
|
* @returns {Promise}
|
|
2071
2099
|
*/
|
|
2072
|
-
listCollections(
|
|
2100
|
+
listCollections(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.CollectionList>;
|
|
2073
2101
|
/**
|
|
2074
2102
|
* Create Collection
|
|
2075
2103
|
*
|
|
2076
|
-
* @param {string} databaseId
|
|
2077
2104
|
* @param {string} collectionId
|
|
2078
2105
|
* @param {string} name
|
|
2079
2106
|
* @param {string} permission
|
|
@@ -2082,20 +2109,18 @@ declare module "node-appwrite" {
|
|
|
2082
2109
|
* @throws {AppwriteException}
|
|
2083
2110
|
* @returns {Promise}
|
|
2084
2111
|
*/
|
|
2085
|
-
createCollection(
|
|
2112
|
+
createCollection(collectionId: string, name: string, permission: string, read: string[], write: string[]): Promise<Models.Collection>;
|
|
2086
2113
|
/**
|
|
2087
2114
|
* Get Collection
|
|
2088
2115
|
*
|
|
2089
|
-
* @param {string} databaseId
|
|
2090
2116
|
* @param {string} collectionId
|
|
2091
2117
|
* @throws {AppwriteException}
|
|
2092
2118
|
* @returns {Promise}
|
|
2093
2119
|
*/
|
|
2094
|
-
getCollection(
|
|
2120
|
+
getCollection(collectionId: string): Promise<Models.Collection>;
|
|
2095
2121
|
/**
|
|
2096
2122
|
* Update Collection
|
|
2097
2123
|
*
|
|
2098
|
-
* @param {string} databaseId
|
|
2099
2124
|
* @param {string} collectionId
|
|
2100
2125
|
* @param {string} name
|
|
2101
2126
|
* @param {string} permission
|
|
@@ -2105,29 +2130,26 @@ declare module "node-appwrite" {
|
|
|
2105
2130
|
* @throws {AppwriteException}
|
|
2106
2131
|
* @returns {Promise}
|
|
2107
2132
|
*/
|
|
2108
|
-
updateCollection(
|
|
2133
|
+
updateCollection(collectionId: string, name: string, permission: string, read?: string[], write?: string[], enabled?: boolean): Promise<Models.Collection>;
|
|
2109
2134
|
/**
|
|
2110
2135
|
* Delete Collection
|
|
2111
2136
|
*
|
|
2112
|
-
* @param {string} databaseId
|
|
2113
2137
|
* @param {string} collectionId
|
|
2114
2138
|
* @throws {AppwriteException}
|
|
2115
2139
|
* @returns {Promise}
|
|
2116
2140
|
*/
|
|
2117
|
-
deleteCollection(
|
|
2141
|
+
deleteCollection(collectionId: string): Promise<Response>;
|
|
2118
2142
|
/**
|
|
2119
2143
|
* List Attributes
|
|
2120
2144
|
*
|
|
2121
|
-
* @param {string} databaseId
|
|
2122
2145
|
* @param {string} collectionId
|
|
2123
2146
|
* @throws {AppwriteException}
|
|
2124
2147
|
* @returns {Promise}
|
|
2125
2148
|
*/
|
|
2126
|
-
listAttributes(
|
|
2149
|
+
listAttributes(collectionId: string): Promise<Models.AttributeList>;
|
|
2127
2150
|
/**
|
|
2128
2151
|
* Create Boolean Attribute
|
|
2129
2152
|
*
|
|
2130
|
-
* @param {string} databaseId
|
|
2131
2153
|
* @param {string} collectionId
|
|
2132
2154
|
* @param {string} key
|
|
2133
2155
|
* @param {boolean} required
|
|
@@ -2136,11 +2158,10 @@ declare module "node-appwrite" {
|
|
|
2136
2158
|
* @throws {AppwriteException}
|
|
2137
2159
|
* @returns {Promise}
|
|
2138
2160
|
*/
|
|
2139
|
-
createBooleanAttribute(
|
|
2161
|
+
createBooleanAttribute(collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
|
|
2140
2162
|
/**
|
|
2141
2163
|
* Create Email Attribute
|
|
2142
2164
|
*
|
|
2143
|
-
* @param {string} databaseId
|
|
2144
2165
|
* @param {string} collectionId
|
|
2145
2166
|
* @param {string} key
|
|
2146
2167
|
* @param {boolean} required
|
|
@@ -2149,11 +2170,10 @@ declare module "node-appwrite" {
|
|
|
2149
2170
|
* @throws {AppwriteException}
|
|
2150
2171
|
* @returns {Promise}
|
|
2151
2172
|
*/
|
|
2152
|
-
createEmailAttribute(
|
|
2173
|
+
createEmailAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
|
|
2153
2174
|
/**
|
|
2154
2175
|
* Create Enum Attribute
|
|
2155
2176
|
*
|
|
2156
|
-
* @param {string} databaseId
|
|
2157
2177
|
* @param {string} collectionId
|
|
2158
2178
|
* @param {string} key
|
|
2159
2179
|
* @param {string[]} elements
|
|
@@ -2163,11 +2183,10 @@ declare module "node-appwrite" {
|
|
|
2163
2183
|
* @throws {AppwriteException}
|
|
2164
2184
|
* @returns {Promise}
|
|
2165
2185
|
*/
|
|
2166
|
-
createEnumAttribute(
|
|
2186
|
+
createEnumAttribute(collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
|
|
2167
2187
|
/**
|
|
2168
2188
|
* Create Float Attribute
|
|
2169
2189
|
*
|
|
2170
|
-
* @param {string} databaseId
|
|
2171
2190
|
* @param {string} collectionId
|
|
2172
2191
|
* @param {string} key
|
|
2173
2192
|
* @param {boolean} required
|
|
@@ -2178,11 +2197,10 @@ declare module "node-appwrite" {
|
|
|
2178
2197
|
* @throws {AppwriteException}
|
|
2179
2198
|
* @returns {Promise}
|
|
2180
2199
|
*/
|
|
2181
|
-
createFloatAttribute(
|
|
2200
|
+
createFloatAttribute(collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
|
|
2182
2201
|
/**
|
|
2183
2202
|
* Create Integer Attribute
|
|
2184
2203
|
*
|
|
2185
|
-
* @param {string} databaseId
|
|
2186
2204
|
* @param {string} collectionId
|
|
2187
2205
|
* @param {string} key
|
|
2188
2206
|
* @param {boolean} required
|
|
@@ -2193,11 +2211,10 @@ declare module "node-appwrite" {
|
|
|
2193
2211
|
* @throws {AppwriteException}
|
|
2194
2212
|
* @returns {Promise}
|
|
2195
2213
|
*/
|
|
2196
|
-
createIntegerAttribute(
|
|
2214
|
+
createIntegerAttribute(collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
|
|
2197
2215
|
/**
|
|
2198
2216
|
* Create IP Address Attribute
|
|
2199
2217
|
*
|
|
2200
|
-
* @param {string} databaseId
|
|
2201
2218
|
* @param {string} collectionId
|
|
2202
2219
|
* @param {string} key
|
|
2203
2220
|
* @param {boolean} required
|
|
@@ -2206,11 +2223,10 @@ declare module "node-appwrite" {
|
|
|
2206
2223
|
* @throws {AppwriteException}
|
|
2207
2224
|
* @returns {Promise}
|
|
2208
2225
|
*/
|
|
2209
|
-
createIpAttribute(
|
|
2226
|
+
createIpAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
|
|
2210
2227
|
/**
|
|
2211
2228
|
* Create String Attribute
|
|
2212
2229
|
*
|
|
2213
|
-
* @param {string} databaseId
|
|
2214
2230
|
* @param {string} collectionId
|
|
2215
2231
|
* @param {string} key
|
|
2216
2232
|
* @param {number} size
|
|
@@ -2220,11 +2236,10 @@ declare module "node-appwrite" {
|
|
|
2220
2236
|
* @throws {AppwriteException}
|
|
2221
2237
|
* @returns {Promise}
|
|
2222
2238
|
*/
|
|
2223
|
-
createStringAttribute(
|
|
2239
|
+
createStringAttribute(collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeString>;
|
|
2224
2240
|
/**
|
|
2225
2241
|
* Create URL Attribute
|
|
2226
2242
|
*
|
|
2227
|
-
* @param {string} databaseId
|
|
2228
2243
|
* @param {string} collectionId
|
|
2229
2244
|
* @param {string} key
|
|
2230
2245
|
* @param {boolean} required
|
|
@@ -2233,31 +2248,28 @@ declare module "node-appwrite" {
|
|
|
2233
2248
|
* @throws {AppwriteException}
|
|
2234
2249
|
* @returns {Promise}
|
|
2235
2250
|
*/
|
|
2236
|
-
createUrlAttribute(
|
|
2251
|
+
createUrlAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
|
|
2237
2252
|
/**
|
|
2238
2253
|
* Get Attribute
|
|
2239
2254
|
*
|
|
2240
|
-
* @param {string} databaseId
|
|
2241
2255
|
* @param {string} collectionId
|
|
2242
2256
|
* @param {string} key
|
|
2243
2257
|
* @throws {AppwriteException}
|
|
2244
2258
|
* @returns {Promise}
|
|
2245
2259
|
*/
|
|
2246
|
-
getAttribute(
|
|
2260
|
+
getAttribute(collectionId: string, key: string): Promise<Response>;
|
|
2247
2261
|
/**
|
|
2248
2262
|
* Delete Attribute
|
|
2249
2263
|
*
|
|
2250
|
-
* @param {string} databaseId
|
|
2251
2264
|
* @param {string} collectionId
|
|
2252
2265
|
* @param {string} key
|
|
2253
2266
|
* @throws {AppwriteException}
|
|
2254
2267
|
* @returns {Promise}
|
|
2255
2268
|
*/
|
|
2256
|
-
deleteAttribute(
|
|
2269
|
+
deleteAttribute(collectionId: string, key: string): Promise<Response>;
|
|
2257
2270
|
/**
|
|
2258
2271
|
* List Documents
|
|
2259
2272
|
*
|
|
2260
|
-
* @param {string} databaseId
|
|
2261
2273
|
* @param {string} collectionId
|
|
2262
2274
|
* @param {string[]} queries
|
|
2263
2275
|
* @param {number} limit
|
|
@@ -2269,11 +2281,10 @@ declare module "node-appwrite" {
|
|
|
2269
2281
|
* @throws {AppwriteException}
|
|
2270
2282
|
* @returns {Promise}
|
|
2271
2283
|
*/
|
|
2272
|
-
listDocuments<Document extends Models.Document>(
|
|
2284
|
+
listDocuments<Document extends Models.Document>(collectionId: string, queries?: string[], limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderAttributes?: string[], orderTypes?: string[]): Promise<Models.DocumentList<Document>>;
|
|
2273
2285
|
/**
|
|
2274
2286
|
* Create Document
|
|
2275
2287
|
*
|
|
2276
|
-
* @param {string} databaseId
|
|
2277
2288
|
* @param {string} collectionId
|
|
2278
2289
|
* @param {string} documentId
|
|
2279
2290
|
* @param {object} data
|
|
@@ -2282,21 +2293,19 @@ declare module "node-appwrite" {
|
|
|
2282
2293
|
* @throws {AppwriteException}
|
|
2283
2294
|
* @returns {Promise}
|
|
2284
2295
|
*/
|
|
2285
|
-
createDocument<Document extends Models.Document>(
|
|
2296
|
+
createDocument<Document extends Models.Document>(collectionId: string, documentId: string, data: object, read?: string[], write?: string[]): Promise<Document>;
|
|
2286
2297
|
/**
|
|
2287
2298
|
* Get Document
|
|
2288
2299
|
*
|
|
2289
|
-
* @param {string} databaseId
|
|
2290
2300
|
* @param {string} collectionId
|
|
2291
2301
|
* @param {string} documentId
|
|
2292
2302
|
* @throws {AppwriteException}
|
|
2293
2303
|
* @returns {Promise}
|
|
2294
2304
|
*/
|
|
2295
|
-
getDocument<Document extends Models.Document>(
|
|
2305
|
+
getDocument<Document extends Models.Document>(collectionId: string, documentId: string): Promise<Document>;
|
|
2296
2306
|
/**
|
|
2297
2307
|
* Update Document
|
|
2298
2308
|
*
|
|
2299
|
-
* @param {string} databaseId
|
|
2300
2309
|
* @param {string} collectionId
|
|
2301
2310
|
* @param {string} documentId
|
|
2302
2311
|
* @param {object} data
|
|
@@ -2305,30 +2314,27 @@ declare module "node-appwrite" {
|
|
|
2305
2314
|
* @throws {AppwriteException}
|
|
2306
2315
|
* @returns {Promise}
|
|
2307
2316
|
*/
|
|
2308
|
-
updateDocument<Document extends Models.Document>(
|
|
2317
|
+
updateDocument<Document extends Models.Document>(collectionId: string, documentId: string, data?: object, read?: string[], write?: string[]): Promise<Document>;
|
|
2309
2318
|
/**
|
|
2310
2319
|
* Delete Document
|
|
2311
2320
|
*
|
|
2312
|
-
* @param {string} databaseId
|
|
2313
2321
|
* @param {string} collectionId
|
|
2314
2322
|
* @param {string} documentId
|
|
2315
2323
|
* @throws {AppwriteException}
|
|
2316
2324
|
* @returns {Promise}
|
|
2317
2325
|
*/
|
|
2318
|
-
deleteDocument(
|
|
2326
|
+
deleteDocument(collectionId: string, documentId: string): Promise<Response>;
|
|
2319
2327
|
/**
|
|
2320
2328
|
* List Indexes
|
|
2321
2329
|
*
|
|
2322
|
-
* @param {string} databaseId
|
|
2323
2330
|
* @param {string} collectionId
|
|
2324
2331
|
* @throws {AppwriteException}
|
|
2325
2332
|
* @returns {Promise}
|
|
2326
2333
|
*/
|
|
2327
|
-
listIndexes(
|
|
2334
|
+
listIndexes(collectionId: string): Promise<Models.IndexList>;
|
|
2328
2335
|
/**
|
|
2329
2336
|
* Create Index
|
|
2330
2337
|
*
|
|
2331
|
-
* @param {string} databaseId
|
|
2332
2338
|
* @param {string} collectionId
|
|
2333
2339
|
* @param {string} key
|
|
2334
2340
|
* @param {string} type
|
|
@@ -2337,29 +2343,29 @@ declare module "node-appwrite" {
|
|
|
2337
2343
|
* @throws {AppwriteException}
|
|
2338
2344
|
* @returns {Promise}
|
|
2339
2345
|
*/
|
|
2340
|
-
createIndex(
|
|
2346
|
+
createIndex(collectionId: string, key: string, type: string, attributes: string[], orders?: string[]): Promise<Models.Index>;
|
|
2341
2347
|
/**
|
|
2342
2348
|
* Get Index
|
|
2343
2349
|
*
|
|
2344
|
-
* @param {string} databaseId
|
|
2345
2350
|
* @param {string} collectionId
|
|
2346
2351
|
* @param {string} key
|
|
2347
2352
|
* @throws {AppwriteException}
|
|
2348
2353
|
* @returns {Promise}
|
|
2349
2354
|
*/
|
|
2350
|
-
getIndex(
|
|
2355
|
+
getIndex(collectionId: string, key: string): Promise<Models.Index>;
|
|
2351
2356
|
/**
|
|
2352
2357
|
* Delete Index
|
|
2353
2358
|
*
|
|
2354
|
-
* @param {string} databaseId
|
|
2355
2359
|
* @param {string} collectionId
|
|
2356
2360
|
* @param {string} key
|
|
2357
2361
|
* @throws {AppwriteException}
|
|
2358
2362
|
* @returns {Promise}
|
|
2359
2363
|
*/
|
|
2360
|
-
deleteIndex(
|
|
2364
|
+
deleteIndex(collectionId: string, key: string): Promise<Response>;
|
|
2361
2365
|
}
|
|
2362
2366
|
export class Functions extends Service {
|
|
2367
|
+
constructor(client: Client);
|
|
2368
|
+
|
|
2363
2369
|
/**
|
|
2364
2370
|
* List Functions
|
|
2365
2371
|
*
|
|
@@ -2570,6 +2576,8 @@ declare module "node-appwrite" {
|
|
|
2570
2576
|
getExecution(functionId: string, executionId: string): Promise<Models.Execution>;
|
|
2571
2577
|
}
|
|
2572
2578
|
export class Health extends Service {
|
|
2579
|
+
constructor(client: Client);
|
|
2580
|
+
|
|
2573
2581
|
/**
|
|
2574
2582
|
* Get HTTP
|
|
2575
2583
|
*
|
|
@@ -2671,6 +2679,8 @@ declare module "node-appwrite" {
|
|
|
2671
2679
|
getTime(): Promise<Models.HealthTime>;
|
|
2672
2680
|
}
|
|
2673
2681
|
export class Locale extends Service {
|
|
2682
|
+
constructor(client: Client);
|
|
2683
|
+
|
|
2674
2684
|
/**
|
|
2675
2685
|
* Get User Locale
|
|
2676
2686
|
*
|
|
@@ -2748,6 +2758,8 @@ declare module "node-appwrite" {
|
|
|
2748
2758
|
getLanguages(): Promise<Models.LanguageList>;
|
|
2749
2759
|
}
|
|
2750
2760
|
export class Storage extends Service {
|
|
2761
|
+
constructor(client: Client);
|
|
2762
|
+
|
|
2751
2763
|
/**
|
|
2752
2764
|
* List buckets
|
|
2753
2765
|
*
|
|
@@ -2964,6 +2976,8 @@ declare module "node-appwrite" {
|
|
|
2964
2976
|
getFileView(bucketId: string, fileId: string): Promise<Buffer>;
|
|
2965
2977
|
}
|
|
2966
2978
|
export class Teams extends Service {
|
|
2979
|
+
constructor(client: Client);
|
|
2980
|
+
|
|
2967
2981
|
/**
|
|
2968
2982
|
* List Teams
|
|
2969
2983
|
*
|
|
@@ -3135,6 +3149,8 @@ declare module "node-appwrite" {
|
|
|
3135
3149
|
updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;
|
|
3136
3150
|
}
|
|
3137
3151
|
export class Users extends Service {
|
|
3152
|
+
constructor(client: Client);
|
|
3153
|
+
|
|
3138
3154
|
/**
|
|
3139
3155
|
* List Users
|
|
3140
3156
|
*
|
package/lib/client.js
CHANGED
|
@@ -10,7 +10,7 @@ class Client {
|
|
|
10
10
|
this.endpoint = 'https://HOSTNAME/v1';
|
|
11
11
|
this.headers = {
|
|
12
12
|
'content-type': '',
|
|
13
|
-
'x-sdk-version': 'appwrite:nodejs:7.0.
|
|
13
|
+
'x-sdk-version': 'appwrite:nodejs:7.0.2',
|
|
14
14
|
'X-Appwrite-Response-Format' : '0.15.0',
|
|
15
15
|
};
|
|
16
16
|
this.selfSigned = false;
|
package/lib/services/account.js
CHANGED
|
@@ -157,10 +157,11 @@ class Account extends Service {
|
|
|
157
157
|
/**
|
|
158
158
|
* Update Account Phone
|
|
159
159
|
*
|
|
160
|
-
* Update currently logged in user
|
|
161
|
-
* number, the
|
|
162
|
-
* is not sent automatically however you can use the
|
|
163
|
-
*
|
|
160
|
+
* Update the currently logged in user's phone number. After updating the
|
|
161
|
+
* phone number, the phone verification status will be reset. A confirmation
|
|
162
|
+
* SMS is not sent automatically, however you can use the [POST
|
|
163
|
+
* /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
|
|
164
|
+
* endpoint to send a confirmation SMS.
|
|
164
165
|
*
|
|
165
166
|
* @param {string} number
|
|
166
167
|
* @param {string} password
|
|
@@ -548,13 +549,12 @@ class Account extends Service {
|
|
|
548
549
|
/**
|
|
549
550
|
* Create Phone Verification
|
|
550
551
|
*
|
|
551
|
-
* Use this endpoint to send a verification
|
|
552
|
-
*
|
|
553
|
-
*
|
|
554
|
-
*
|
|
555
|
-
* [complete the verification
|
|
552
|
+
* Use this endpoint to send a verification SMS to the currently logged in
|
|
553
|
+
* user. This endpoint is meant for use after updating a user's phone number
|
|
554
|
+
* using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone)
|
|
555
|
+
* endpoint. Learn more about how to [complete the verification
|
|
556
556
|
* process](/docs/client/account#accountUpdatePhoneVerification). The
|
|
557
|
-
* verification
|
|
557
|
+
* verification code sent to the user's phone number is valid for 15 minutes.
|
|
558
558
|
*
|
|
559
559
|
* @throws {AppwriteException}
|
|
560
560
|
* @returns {Promise}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "node-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": "7.0.
|
|
5
|
+
"version": "7.0.2",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|