@appwrite.io/console 0.1.0-preview-0.1 → 0.1.1

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
@@ -746,11 +746,11 @@ export declare namespace Models {
746
746
  */
747
747
  array?: boolean;
748
748
  /**
749
- * The Id of the related collection
749
+ * The ID of the related collection.
750
750
  */
751
751
  relatedCollection: string;
752
752
  /**
753
- * The type of the relationship
753
+ * The type of the relationship.
754
754
  */
755
755
  relationType: string;
756
756
  /**
@@ -758,13 +758,17 @@ export declare namespace Models {
758
758
  */
759
759
  twoWay: boolean;
760
760
  /**
761
- * The key of the two-way relationship
761
+ * The key of the two-way relationship.
762
762
  */
763
763
  twoWayKey: string;
764
764
  /**
765
- * Action to take on related documents when parent document is deleted
765
+ * How deleting the parent document will propagate to child documents.
766
766
  */
767
767
  onDelete: string;
768
+ /**
769
+ * Whether this is the parent or child side of the relationship
770
+ */
771
+ side: string;
768
772
  };
769
773
  /**
770
774
  * Index
@@ -933,15 +937,15 @@ export declare namespace Models {
933
937
  /**
934
938
  * Hashed user password.
935
939
  */
936
- password: string;
940
+ password?: string;
937
941
  /**
938
942
  * Password hashing algorithm.
939
943
  */
940
- hash: string;
944
+ hash?: string;
941
945
  /**
942
946
  * Password hashing algorithm configuration.
943
947
  */
944
- hashOptions: object;
948
+ hashOptions?: object;
945
949
  /**
946
950
  * User registration date in ISO 8601 format.
947
951
  */
@@ -1078,59 +1082,6 @@ export declare namespace Models {
1078
1082
  */
1079
1083
  threads: number;
1080
1084
  };
1081
- /**
1082
- * Account
1083
- */
1084
- type Account<Preferences extends Models.Preferences> = {
1085
- /**
1086
- * User ID.
1087
- */
1088
- $id: string;
1089
- /**
1090
- * User creation date in ISO 8601 format.
1091
- */
1092
- $createdAt: string;
1093
- /**
1094
- * User update date in ISO 8601 format.
1095
- */
1096
- $updatedAt: string;
1097
- /**
1098
- * User name.
1099
- */
1100
- name: string;
1101
- /**
1102
- * User registration date in ISO 8601 format.
1103
- */
1104
- registration: string;
1105
- /**
1106
- * User status. Pass `true` for enabled and `false` for disabled.
1107
- */
1108
- status: boolean;
1109
- /**
1110
- * Password update time in ISO 8601 format.
1111
- */
1112
- passwordUpdate: string;
1113
- /**
1114
- * User email address.
1115
- */
1116
- email: string;
1117
- /**
1118
- * User phone number in E.164 format.
1119
- */
1120
- phone: string;
1121
- /**
1122
- * Email verification status.
1123
- */
1124
- emailVerification: boolean;
1125
- /**
1126
- * Phone verification status.
1127
- */
1128
- phoneVerification: boolean;
1129
- /**
1130
- * User preferences as a key-value object
1131
- */
1132
- prefs: Preferences;
1133
- };
1134
1085
  /**
1135
1086
  * Preferences
1136
1087
  */
@@ -2594,4 +2545,25 @@ export declare namespace Models {
2594
2545
  */
2595
2546
  buckets: Metric[];
2596
2547
  };
2548
+ /**
2549
+ * Console Variables
2550
+ */
2551
+ type ConsoleVariables = {
2552
+ /**
2553
+ * CNAME target for your Appwrite custom domains.
2554
+ */
2555
+ _APP_DOMAIN_TARGET: string;
2556
+ /**
2557
+ * Maximum file size allowed for file upload in bytes.
2558
+ */
2559
+ _APP_STORAGE_LIMIT: number;
2560
+ /**
2561
+ * Maximum file size allowed for deployment in bytes.
2562
+ */
2563
+ _APP_FUNCTIONS_SIZE_LIMIT: number;
2564
+ /**
2565
+ * Defines if usage stats are enabled. This value is set to &#039;enabled&#039; by default, to disable the usage stats set the value to &#039;disabled&#039;.
2566
+ */
2567
+ _APP_USAGE_STATS: string;
2568
+ };
2597
2569
  }
package/types/query.d.ts CHANGED
@@ -8,6 +8,12 @@ export declare class Query {
8
8
  static lessThanEqual: (attribute: string, value: QueryTypes) => string;
9
9
  static greaterThan: (attribute: string, value: QueryTypes) => string;
10
10
  static greaterThanEqual: (attribute: string, value: QueryTypes) => string;
11
+ static isNull: (attribute: string) => string;
12
+ static isNotNull: (attribute: string) => string;
13
+ static between: (attribute: string, start: string | number, end: string | number) => string;
14
+ static startsWith: (attribute: string, value: string) => string;
15
+ static endsWith: (attribute: string, value: string) => string;
16
+ static select: (attributes: string[]) => string;
11
17
  static search: (attribute: string, value: string) => string;
12
18
  static orderDesc: (attribute: string) => string;
13
19
  static orderAsc: (attribute: string) => string;
@@ -94,7 +94,7 @@ export declare class Account extends Service {
94
94
  * @throws {AppwriteException}
95
95
  * @returns {Promise}
96
96
  */
97
- updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.Account<Preferences>>;
97
+ updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
98
98
  /**
99
99
  * Update Phone
100
100
  *
@@ -211,7 +211,7 @@ export declare class Account extends Service {
211
211
  * password combination. This route will create a new session for the user.
212
212
  *
213
213
  * A user is limited to 10 active sessions at a time by default. [Learn more
214
- * about session limits](/docs/authentication#limits).
214
+ * about session limits](/docs/authentication-security#limits).
215
215
  *
216
216
  * @param {string} email
217
217
  * @param {string} password
@@ -235,7 +235,7 @@ export declare class Account extends Service {
235
235
  * your Appwrite instance by default.
236
236
  *
237
237
  * A user is limited to 10 active sessions at a time by default. [Learn more
238
- * about session limits](/docs/authentication#limits).
238
+ * about session limits](/docs/authentication-security#limits).
239
239
  *
240
240
  * @param {string} userId
241
241
  * @param {string} email
@@ -281,7 +281,7 @@ export declare class Account extends Service {
281
281
  * user.
282
282
  *
283
283
  * A user is limited to 10 active sessions at a time by default. [Learn more
284
- * about session limits](/docs/authentication#limits).
284
+ * about session limits](/docs/authentication-security#limits).
285
285
  *
286
286
  *
287
287
  * @param {string} provider
@@ -303,7 +303,7 @@ export declare class Account extends Service {
303
303
  * is valid for 15 minutes.
304
304
  *
305
305
  * A user is limited to 10 active sessions at a time by default. [Learn more
306
- * about session limits](/docs/authentication#limits).
306
+ * about session limits](/docs/authentication-security#limits).
307
307
  *
308
308
  * @param {string} userId
309
309
  * @param {string} phone
@@ -372,7 +372,7 @@ export declare class Account extends Service {
372
372
  * @throws {AppwriteException}
373
373
  * @returns {Promise}
374
374
  */
375
- updateStatus<Preferences extends Models.Preferences>(): Promise<Models.Account<Preferences>>;
375
+ updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
376
376
  /**
377
377
  * Create Email Verification
378
378
  *
@@ -0,0 +1,15 @@
1
+ import { Service } from '../service';
2
+ import { Client } from '../client';
3
+ import type { Models } from '../models';
4
+ export declare class Console extends Service {
5
+ constructor(client: Client);
6
+ /**
7
+ * Get Variables
8
+ *
9
+ * Get all Environment Variables that are relevant for the console.
10
+ *
11
+ * @throws {AppwriteException}
12
+ * @returns {Promise}
13
+ */
14
+ variables(): Promise<Models.ConsoleVariables>;
15
+ }
@@ -176,7 +176,7 @@ export declare class Databases extends Service {
176
176
  * @throws {AppwriteException}
177
177
  * @returns {Promise}
178
178
  */
179
- updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: boolean): Promise<Models.AttributeBoolean>;
179
+ updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean): Promise<Models.AttributeBoolean>;
180
180
  /**
181
181
  * Create DateTime Attribute
182
182
  *
@@ -203,7 +203,7 @@ export declare class Databases extends Service {
203
203
  * @throws {AppwriteException}
204
204
  * @returns {Promise}
205
205
  */
206
- updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeDatetime>;
206
+ updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeDatetime>;
207
207
  /**
208
208
  * Create Email Attribute
209
209
  *
@@ -235,7 +235,7 @@ export declare class Databases extends Service {
235
235
  * @throws {AppwriteException}
236
236
  * @returns {Promise}
237
237
  */
238
- updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeEmail>;
238
+ updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeEmail>;
239
239
  /**
240
240
  * Create Enum Attribute
241
241
  *
@@ -267,7 +267,7 @@ export declare class Databases extends Service {
267
267
  * @throws {AppwriteException}
268
268
  * @returns {Promise}
269
269
  */
270
- updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault: string): Promise<Models.AttributeEnum>;
270
+ updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string): Promise<Models.AttributeEnum>;
271
271
  /**
272
272
  * Create Float Attribute
273
273
  *
@@ -304,7 +304,7 @@ export declare class Databases extends Service {
304
304
  * @throws {AppwriteException}
305
305
  * @returns {Promise}
306
306
  */
307
- updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault: number): Promise<Models.AttributeFloat>;
307
+ updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeFloat>;
308
308
  /**
309
309
  * Create Integer Attribute
310
310
  *
@@ -341,7 +341,7 @@ export declare class Databases extends Service {
341
341
  * @throws {AppwriteException}
342
342
  * @returns {Promise}
343
343
  */
344
- updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault: number): Promise<Models.AttributeInteger>;
344
+ updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeInteger>;
345
345
  /**
346
346
  * Create IP Address Attribute
347
347
  *
@@ -373,9 +373,12 @@ export declare class Databases extends Service {
373
373
  * @throws {AppwriteException}
374
374
  * @returns {Promise}
375
375
  */
376
- updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeIp>;
376
+ updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeIp>;
377
377
  /**
378
- * Create relationship Attribute
378
+ * Create Relationship Attribute
379
+ *
380
+ * Create relationship attribute. [Learn more about relationship
381
+ * attributes](/docs/databases-relationships#relationship-attributes).
379
382
  *
380
383
  *
381
384
  * @param {string} databaseId
@@ -422,7 +425,7 @@ export declare class Databases extends Service {
422
425
  * @throws {AppwriteException}
423
426
  * @returns {Promise}
424
427
  */
425
- updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeString>;
428
+ updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeString>;
426
429
  /**
427
430
  * Create URL Attribute
428
431
  *
@@ -454,7 +457,7 @@ export declare class Databases extends Service {
454
457
  * @throws {AppwriteException}
455
458
  * @returns {Promise}
456
459
  */
457
- updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeUrl>;
460
+ updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeUrl>;
458
461
  /**
459
462
  * Get Attribute
460
463
  *
@@ -480,16 +483,18 @@ export declare class Databases extends Service {
480
483
  /**
481
484
  * Update Relationship Attribute
482
485
  *
486
+ * Update relationship attribute. [Learn more about relationship
487
+ * attributes](/docs/databases-relationships#relationship-attributes).
488
+ *
483
489
  *
484
490
  * @param {string} databaseId
485
491
  * @param {string} collectionId
486
492
  * @param {string} key
487
- * @param {boolean} twoWay
488
493
  * @param {string} onDelete
489
494
  * @throws {AppwriteException}
490
495
  * @returns {Promise}
491
496
  */
492
- updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, twoWay?: boolean, onDelete?: string): Promise<Models.AttributeRelationship>;
497
+ updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: string): Promise<Models.AttributeRelationship>;
493
498
  /**
494
499
  * List Documents
495
500
  *