@appwrite.io/console 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/models.d.ts CHANGED
@@ -1082,6 +1082,59 @@ export declare namespace Models {
1082
1082
  */
1083
1083
  threads: number;
1084
1084
  };
1085
+ /**
1086
+ * Account
1087
+ */
1088
+ type Account<Preferences extends Models.Preferences> = {
1089
+ /**
1090
+ * User ID.
1091
+ */
1092
+ $id: string;
1093
+ /**
1094
+ * User creation date in ISO 8601 format.
1095
+ */
1096
+ $createdAt: string;
1097
+ /**
1098
+ * User update date in ISO 8601 format.
1099
+ */
1100
+ $updatedAt: string;
1101
+ /**
1102
+ * User name.
1103
+ */
1104
+ name: string;
1105
+ /**
1106
+ * User registration date in ISO 8601 format.
1107
+ */
1108
+ registration: string;
1109
+ /**
1110
+ * User status. Pass `true` for enabled and `false` for disabled.
1111
+ */
1112
+ status: boolean;
1113
+ /**
1114
+ * Password update time in ISO 8601 format.
1115
+ */
1116
+ passwordUpdate: string;
1117
+ /**
1118
+ * User email address.
1119
+ */
1120
+ email: string;
1121
+ /**
1122
+ * User phone number in E.164 format.
1123
+ */
1124
+ phone: string;
1125
+ /**
1126
+ * Email verification status.
1127
+ */
1128
+ emailVerification: boolean;
1129
+ /**
1130
+ * Phone verification status.
1131
+ */
1132
+ phoneVerification: boolean;
1133
+ /**
1134
+ * User preferences as a key-value object
1135
+ */
1136
+ prefs: Preferences;
1137
+ };
1085
1138
  /**
1086
1139
  * Preferences
1087
1140
  */
@@ -1492,14 +1545,6 @@ export declare namespace Models {
1492
1545
  * Function execution schedult in CRON format.
1493
1546
  */
1494
1547
  schedule: string;
1495
- /**
1496
- * Function&#039;s next scheduled execution time in ISO 8601 format.
1497
- */
1498
- scheduleNext: string;
1499
- /**
1500
- * Function&#039;s previous scheduled execution time in ISO 8601 format.
1501
- */
1502
- schedulePrevious: string;
1503
1548
  /**
1504
1549
  * Function execution timeout in seconds.
1505
1550
  */
@@ -2150,6 +2195,10 @@ export declare namespace Models {
2150
2195
  * Health Status
2151
2196
  */
2152
2197
  type HealthStatus = {
2198
+ /**
2199
+ * Name of the service.
2200
+ */
2201
+ name: string;
2153
2202
  /**
2154
2203
  * Duration in milliseconds how long the health check took.
2155
2204
  */
@@ -2200,63 +2249,15 @@ export declare namespace Models {
2200
2249
  /**
2201
2250
  * Aggregated stats for total number of documents.
2202
2251
  */
2203
- databasesCount: Metric[];
2204
- /**
2205
- * Aggregated stats for total number of documents.
2206
- */
2207
- documentsCount: Metric[];
2252
+ databasesTotal: Metric[];
2208
2253
  /**
2209
2254
  * Aggregated stats for total number of collections.
2210
2255
  */
2211
- collectionsCount: Metric[];
2212
- /**
2213
- * Aggregated stats for documents created.
2214
- */
2215
- databasesCreate: Metric[];
2216
- /**
2217
- * Aggregated stats for documents read.
2218
- */
2219
- databasesRead: Metric[];
2220
- /**
2221
- * Aggregated stats for documents updated.
2222
- */
2223
- databasesUpdate: Metric[];
2224
- /**
2225
- * Aggregated stats for total number of collections.
2226
- */
2227
- databasesDelete: Metric[];
2228
- /**
2229
- * Aggregated stats for documents created.
2230
- */
2231
- documentsCreate: Metric[];
2232
- /**
2233
- * Aggregated stats for documents read.
2234
- */
2235
- documentsRead: Metric[];
2236
- /**
2237
- * Aggregated stats for documents updated.
2238
- */
2239
- documentsUpdate: Metric[];
2240
- /**
2241
- * Aggregated stats for documents deleted.
2242
- */
2243
- documentsDelete: Metric[];
2244
- /**
2245
- * Aggregated stats for collections created.
2246
- */
2247
- collectionsCreate: Metric[];
2248
- /**
2249
- * Aggregated stats for collections read.
2250
- */
2251
- collectionsRead: Metric[];
2252
- /**
2253
- * Aggregated stats for collections updated.
2254
- */
2255
- collectionsUpdate: Metric[];
2256
+ collectionsTotal: Metric[];
2256
2257
  /**
2257
- * Aggregated stats for collections delete.
2258
+ * Aggregated stats for total number of documents.
2258
2259
  */
2259
- collectionsDelete: Metric[];
2260
+ documentsTotal: Metric[];
2260
2261
  };
2261
2262
  /**
2262
2263
  * UsageDatabase
@@ -2266,46 +2267,14 @@ export declare namespace Models {
2266
2267
  * The time range of the usage stats.
2267
2268
  */
2268
2269
  range: string;
2269
- /**
2270
- * Aggregated stats for total number of documents.
2271
- */
2272
- documentsCount: Metric[];
2273
2270
  /**
2274
2271
  * Aggregated stats for total number of collections.
2275
2272
  */
2276
- collectionsCount: Metric[];
2277
- /**
2278
- * Aggregated stats for documents created.
2279
- */
2280
- documentsCreate: Metric[];
2281
- /**
2282
- * Aggregated stats for documents read.
2283
- */
2284
- documentsRead: Metric[];
2285
- /**
2286
- * Aggregated stats for documents updated.
2287
- */
2288
- documentsUpdate: Metric[];
2273
+ collectionsTotal: Metric[];
2289
2274
  /**
2290
- * Aggregated stats for documents deleted.
2291
- */
2292
- documentsDelete: Metric[];
2293
- /**
2294
- * Aggregated stats for collections created.
2295
- */
2296
- collectionsCreate: Metric[];
2297
- /**
2298
- * Aggregated stats for collections read.
2299
- */
2300
- collectionsRead: Metric[];
2301
- /**
2302
- * Aggregated stats for collections updated.
2303
- */
2304
- collectionsUpdate: Metric[];
2305
- /**
2306
- * Aggregated stats for collections delete.
2275
+ * Aggregated stats for total number of documents.
2307
2276
  */
2308
- collectionsDelete: Metric[];
2277
+ documentsTotal: Metric[];
2309
2278
  };
2310
2279
  /**
2311
2280
  * UsageCollection
@@ -2318,23 +2287,7 @@ export declare namespace Models {
2318
2287
  /**
2319
2288
  * Aggregated stats for total number of documents.
2320
2289
  */
2321
- documentsCount: Metric[];
2322
- /**
2323
- * Aggregated stats for documents created.
2324
- */
2325
- documentsCreate: Metric[];
2326
- /**
2327
- * Aggregated stats for documents read.
2328
- */
2329
- documentsRead: Metric[];
2330
- /**
2331
- * Aggregated stats for documents updated.
2332
- */
2333
- documentsUpdate: Metric[];
2334
- /**
2335
- * Aggregated stats for documents deleted.
2336
- */
2337
- documentsDelete: Metric[];
2290
+ documentsTotal: Metric[];
2338
2291
  };
2339
2292
  /**
2340
2293
  * UsageUsers
@@ -2347,35 +2300,11 @@ export declare namespace Models {
2347
2300
  /**
2348
2301
  * Aggregated stats for total number of users.
2349
2302
  */
2350
- usersCount: Metric[];
2351
- /**
2352
- * Aggregated stats for users created.
2353
- */
2354
- usersCreate: Metric[];
2355
- /**
2356
- * Aggregated stats for users read.
2357
- */
2358
- usersRead: Metric[];
2359
- /**
2360
- * Aggregated stats for users updated.
2361
- */
2362
- usersUpdate: Metric[];
2363
- /**
2364
- * Aggregated stats for users deleted.
2365
- */
2366
- usersDelete: Metric[];
2303
+ usersTotal: Metric[];
2367
2304
  /**
2368
2305
  * Aggregated stats for sessions created.
2369
2306
  */
2370
- sessionsCreate: Metric[];
2371
- /**
2372
- * Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).
2373
- */
2374
- sessionsProviderCreate: Metric[];
2375
- /**
2376
- * Aggregated stats for sessions deleted.
2377
- */
2378
- sessionsDelete: Metric[];
2307
+ sessionsTotal: Metric[];
2379
2308
  };
2380
2309
  /**
2381
2310
  * StorageUsage
@@ -2385,50 +2314,18 @@ export declare namespace Models {
2385
2314
  * The time range of the usage stats.
2386
2315
  */
2387
2316
  range: string;
2388
- /**
2389
- * Aggregated stats for the occupied storage size (in bytes).
2390
- */
2391
- storage: Metric[];
2392
- /**
2393
- * Aggregated stats for total number of files.
2394
- */
2395
- filesCount: Metric[];
2396
2317
  /**
2397
2318
  * Aggregated stats for total number of buckets.
2398
2319
  */
2399
- bucketsCount: Metric[];
2400
- /**
2401
- * Aggregated stats for buckets created.
2402
- */
2403
- bucketsCreate: Metric[];
2320
+ bucketsTotal: Metric[];
2404
2321
  /**
2405
- * Aggregated stats for buckets read.
2406
- */
2407
- bucketsRead: Metric[];
2408
- /**
2409
- * Aggregated stats for buckets updated.
2410
- */
2411
- bucketsUpdate: Metric[];
2412
- /**
2413
- * Aggregated stats for buckets deleted.
2414
- */
2415
- bucketsDelete: Metric[];
2416
- /**
2417
- * Aggregated stats for files created.
2418
- */
2419
- filesCreate: Metric[];
2420
- /**
2421
- * Aggregated stats for files read.
2422
- */
2423
- filesRead: Metric[];
2424
- /**
2425
- * Aggregated stats for files updated.
2322
+ * Aggregated stats for total number of files.
2426
2323
  */
2427
- filesUpdate: Metric[];
2324
+ filesTotal: Metric[];
2428
2325
  /**
2429
- * Aggregated stats for files deleted.
2326
+ * Aggregated stats for the occupied storage size (in bytes).
2430
2327
  */
2431
- filesDelete: Metric[];
2328
+ filesStorage: Metric[];
2432
2329
  };
2433
2330
  /**
2434
2331
  * UsageBuckets
@@ -2441,27 +2338,11 @@ export declare namespace Models {
2441
2338
  /**
2442
2339
  * Aggregated stats for total number of files in this bucket.
2443
2340
  */
2444
- filesCount: Metric[];
2341
+ filesTotal: Metric[];
2445
2342
  /**
2446
2343
  * Aggregated stats for total storage of files in this bucket.
2447
2344
  */
2448
2345
  filesStorage: Metric[];
2449
- /**
2450
- * Aggregated stats for files created.
2451
- */
2452
- filesCreate: Metric[];
2453
- /**
2454
- * Aggregated stats for files read.
2455
- */
2456
- filesRead: Metric[];
2457
- /**
2458
- * Aggregated stats for files updated.
2459
- */
2460
- filesUpdate: Metric[];
2461
- /**
2462
- * Aggregated stats for files deleted.
2463
- */
2464
- filesDelete: Metric[];
2465
2346
  };
2466
2347
  /**
2467
2348
  * UsageFunctions
@@ -2472,37 +2353,37 @@ export declare namespace Models {
2472
2353
  */
2473
2354
  range: string;
2474
2355
  /**
2475
- * Aggregated stats for number of function executions.
2476
- */
2477
- executionsTotal: Metric[];
2478
- /**
2479
- * Aggregated stats for function execution failures.
2356
+ * Aggregated stats for number of functions.
2480
2357
  */
2481
- executionsFailure: Metric[];
2358
+ functionsTotal: Metric[];
2482
2359
  /**
2483
- * Aggregated stats for function execution successes.
2360
+ * Aggregated stats for number of function deployments.
2484
2361
  */
2485
- executionsSuccess: Metric[];
2362
+ deploymentsTotal: Metric[];
2486
2363
  /**
2487
- * Aggregated stats for function execution duration.
2364
+ * Aggregated stats for function deployments storage.
2488
2365
  */
2489
- executionsTime: Metric[];
2366
+ deploymentsStorage: Metric[];
2490
2367
  /**
2491
2368
  * Aggregated stats for number of function builds.
2492
2369
  */
2493
2370
  buildsTotal: Metric[];
2494
2371
  /**
2495
- * Aggregated stats for function build failures.
2372
+ * Aggregated stats for builds storage.
2496
2373
  */
2497
- buildsFailure: Metric[];
2374
+ buildsStorage: Metric[];
2498
2375
  /**
2499
- * Aggregated stats for function build successes.
2376
+ * Aggregated stats for function build compute.
2500
2377
  */
2501
- buildsSuccess: Metric[];
2378
+ buildsTime: Metric[];
2502
2379
  /**
2503
- * Aggregated stats for function build duration.
2380
+ * Aggregated stats for number of function executions.
2504
2381
  */
2505
- buildsTime: Metric[];
2382
+ executionsTotal: Metric[];
2383
+ /**
2384
+ * Aggregated stats for function execution compute.
2385
+ */
2386
+ executionsTime: Metric[];
2506
2387
  };
2507
2388
  /**
2508
2389
  * UsageProject
@@ -2515,7 +2396,7 @@ export declare namespace Models {
2515
2396
  /**
2516
2397
  * Aggregated stats for number of requests.
2517
2398
  */
2518
- requests: Metric[];
2399
+ requestsTotal: Metric[];
2519
2400
  /**
2520
2401
  * Aggregated stats for consumed bandwidth.
2521
2402
  */
@@ -2523,27 +2404,27 @@ export declare namespace Models {
2523
2404
  /**
2524
2405
  * Aggregated stats for function executions.
2525
2406
  */
2526
- executions: Metric[];
2407
+ executionsTotal: Metric[];
2527
2408
  /**
2528
2409
  * Aggregated stats for number of documents.
2529
2410
  */
2530
- documents: Metric[];
2411
+ documentsTotal: Metric[];
2531
2412
  /**
2532
2413
  * Aggregated stats for number of databases.
2533
2414
  */
2534
- databases: Metric[];
2415
+ databasesTotal: Metric[];
2535
2416
  /**
2536
2417
  * Aggregated stats for number of users.
2537
2418
  */
2538
- users: Metric[];
2419
+ usersTotal: Metric[];
2539
2420
  /**
2540
2421
  * Aggregated stats for the occupied storage size (in bytes).
2541
2422
  */
2542
- storage: Metric[];
2423
+ filesStorage: Metric[];
2543
2424
  /**
2544
2425
  * Aggregated stats for number of buckets.
2545
2426
  */
2546
- buckets: Metric[];
2427
+ bucketsTotal: Metric[];
2547
2428
  };
2548
2429
  /**
2549
2430
  * Console Variables
@@ -48,6 +48,25 @@ export declare class Account extends Service {
48
48
  * @returns {Promise}
49
49
  */
50
50
  updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
51
+ /**
52
+ * Create account using an invite code
53
+ *
54
+ * Use this endpoint to allow a new user to register a new account in your
55
+ * project. After the user registration completes successfully, you can use
56
+ * the [/account/verfication](/docs/client/account#accountCreateVerification)
57
+ * route to start verifying the user email address. To allow the new user to
58
+ * login to their new account, you need to create a new [account
59
+ * session](/docs/client/account#accountCreateSession).
60
+ *
61
+ * @param {string} userId
62
+ * @param {string} email
63
+ * @param {string} password
64
+ * @param {string} name
65
+ * @param {string} code
66
+ * @throws {AppwriteException}
67
+ * @returns {Promise}
68
+ */
69
+ createWithInviteCode<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string, code?: string): Promise<Models.Account<Preferences>>;
51
70
  /**
52
71
  * Create JWT
53
72
  *
@@ -24,7 +24,7 @@ export declare class Health extends Service {
24
24
  /**
25
25
  * Get Cache
26
26
  *
27
- * Check the Appwrite in-memory cache server is up and connection is
27
+ * Check the Appwrite in-memory cache servers are up and connection is
28
28
  * successful.
29
29
  *
30
30
  * @throws {AppwriteException}
@@ -34,12 +34,31 @@ export declare class Health extends Service {
34
34
  /**
35
35
  * Get DB
36
36
  *
37
- * Check the Appwrite database server is up and connection is successful.
37
+ * Check the Appwrite database servers are up and connection is successful.
38
38
  *
39
39
  * @throws {AppwriteException}
40
40
  * @returns {Promise}
41
41
  */
42
42
  getDB(): Promise<Models.HealthStatus>;
43
+ /**
44
+ * Get PubSub
45
+ *
46
+ * Check the Appwrite pub-sub servers are up and connection is successful.
47
+ *
48
+ * @throws {AppwriteException}
49
+ * @returns {Promise}
50
+ */
51
+ getPubSub(): Promise<Models.HealthStatus>;
52
+ /**
53
+ * Get Queue
54
+ *
55
+ * Check the Appwrite queue messaging servers are up and connection is
56
+ * successful.
57
+ *
58
+ * @throws {AppwriteException}
59
+ * @returns {Promise}
60
+ */
61
+ getQueue(): Promise<Models.HealthStatus>;
43
62
  /**
44
63
  * Get Certificates Queue
45
64
  *
@@ -0,0 +1,15 @@
1
+ import { Service } from '../service';
2
+ import { Client } from '../client';
3
+ import type { Models } from '../models';
4
+ export declare class Project extends Service {
5
+ constructor(client: Client);
6
+ /**
7
+ * Get usage stats for a project
8
+ *
9
+ *
10
+ * @param {string} range
11
+ * @throws {AppwriteException}
12
+ * @returns {Promise}
13
+ */
14
+ getUsage(range?: string): Promise<Models.UsageProject>;
15
+ }
@@ -317,16 +317,6 @@ export declare class Projects extends Service {
317
317
  * @returns {Promise}
318
318
  */
319
319
  updateServiceStatus(projectId: string, service: string, status: boolean): Promise<Models.Project>;
320
- /**
321
- * Get usage stats for a project
322
- *
323
- *
324
- * @param {string} projectId
325
- * @param {string} range
326
- * @throws {AppwriteException}
327
- * @returns {Promise}
328
- */
329
- getUsage(projectId: string, range?: string): Promise<Models.UsageProject>;
330
320
  /**
331
321
  * List Webhooks
332
322
  *
@@ -217,7 +217,7 @@ export declare class Storage extends Service {
217
217
  */
218
218
  getUsage(range?: string): Promise<Models.UsageStorage>;
219
219
  /**
220
- * Get usage stats for a storage bucket
220
+ * Get usage stats for storage bucket
221
221
  *
222
222
  *
223
223
  * @param {string} bucketId
@@ -155,11 +155,10 @@ export declare class Users extends Service {
155
155
  *
156
156
  *
157
157
  * @param {string} range
158
- * @param {string} provider
159
158
  * @throws {AppwriteException}
160
159
  * @returns {Promise}
161
160
  */
162
- getUsage(range?: string, provider?: string): Promise<Models.UsageUsers>;
161
+ getUsage(range?: string): Promise<Models.UsageUsers>;
163
162
  /**
164
163
  * Get User
165
164
  *
package/.travis.yml DELETED
@@ -1,32 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "14.16"
4
-
5
- jobs:
6
- include:
7
- - stage: NPM RC Release
8
- if: tag == *-RC*
9
- node_js: "14.16"
10
- script:
11
- - npm install
12
- - npm run build
13
- - echo "Deploying RC to NPM..."
14
- deploy:
15
- provider: npm
16
- email: $NPM_EMAIL
17
- api_key: $NPM_API_KEY
18
- tag: next
19
- - stage: NPM Release
20
- if: tag != *-RC*
21
- node_js: "14.16"
22
- script:
23
- - npm install
24
- - npm run build
25
- - echo "Deploying to NPM..."
26
- deploy:
27
- provider: npm
28
- email: $NPM_EMAIL
29
- api_key: $NPM_API_KEY
30
- skip_cleanup: true
31
- on:
32
- tags: true