@appwrite.io/console 0.6.0-rc.15 → 0.6.0-rc.16

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/iife/sdk.js CHANGED
@@ -115,7 +115,7 @@
115
115
  'x-sdk-name': 'Console',
116
116
  'x-sdk-platform': 'console',
117
117
  'x-sdk-language': 'web',
118
- 'x-sdk-version': '0.6.0-rc.15',
118
+ 'x-sdk-version': '0.6.0-rc.16',
119
119
  'X-Appwrite-Response-Format': '1.5.0',
120
120
  };
121
121
  this.realtime = {
@@ -698,7 +698,7 @@
698
698
  * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
699
699
  * method.
700
700
  *
701
- * @param {Type} type
701
+ * @param {AuthenticatorType} type
702
702
  * @throws {AppwriteException}
703
703
  * @returns {Promise}
704
704
  */
@@ -722,7 +722,7 @@
722
722
  * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
723
723
  * method.
724
724
  *
725
- * @param {Type} type
725
+ * @param {AuthenticatorType} type
726
726
  * @param {string} otp
727
727
  * @throws {AppwriteException}
728
728
  * @returns {Promise}
@@ -751,7 +751,7 @@
751
751
  *
752
752
  * Delete an authenticator for a user by ID.
753
753
  *
754
- * @param {Type} type
754
+ * @param {AuthenticatorType} type
755
755
  * @param {string} otp
756
756
  * @throws {AppwriteException}
757
757
  * @returns {Promise}
@@ -782,7 +782,7 @@
782
782
  * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
783
783
  * method.
784
784
  *
785
- * @param {Factor} factor
785
+ * @param {AuthenticationFactor} factor
786
786
  * @throws {AppwriteException}
787
787
  * @returns {Promise}
788
788
  */
@@ -1423,10 +1423,11 @@
1423
1423
  });
1424
1424
  }
1425
1425
  /**
1426
- * Update (or renew) session
1426
+ * Update session
1427
1427
  *
1428
- * Extend session's expiry to increase it's lifespan. Extending a session is
1429
- * useful when session length is short such as 5 minutes.
1428
+ * Use this endpoint to extend a session's length. Extending a session is
1429
+ * useful when session expiry is short. If the session was created using an
1430
+ * OAuth provider, this endpoint refreshes the access token from the provider.
1430
1431
  *
1431
1432
  * @param {string} sessionId
1432
1433
  * @throws {AppwriteException}
@@ -12762,18 +12763,18 @@
12762
12763
  }
12763
12764
  }
12764
12765
 
12765
- exports.Type = void 0;
12766
- (function (Type) {
12767
- Type["Totp"] = "totp";
12768
- })(exports.Type || (exports.Type = {}));
12766
+ exports.AuthenticatorType = void 0;
12767
+ (function (AuthenticatorType) {
12768
+ AuthenticatorType["Totp"] = "totp";
12769
+ })(exports.AuthenticatorType || (exports.AuthenticatorType = {}));
12769
12770
 
12770
- exports.Factor = void 0;
12771
- (function (Factor) {
12772
- Factor["Email"] = "email";
12773
- Factor["Phone"] = "phone";
12774
- Factor["Totp"] = "totp";
12775
- Factor["Recoverycode"] = "recoverycode";
12776
- })(exports.Factor || (exports.Factor = {}));
12771
+ exports.AuthenticationFactor = void 0;
12772
+ (function (AuthenticationFactor) {
12773
+ AuthenticationFactor["Email"] = "email";
12774
+ AuthenticationFactor["Phone"] = "phone";
12775
+ AuthenticationFactor["Totp"] = "totp";
12776
+ AuthenticationFactor["Recoverycode"] = "recoverycode";
12777
+ })(exports.AuthenticationFactor || (exports.AuthenticationFactor = {}));
12777
12778
 
12778
12779
  exports.OAuthProvider = void 0;
12779
12780
  (function (OAuthProvider) {
@@ -13574,6 +13575,11 @@
13574
13575
  UserUsageRange["NinetyDays"] = "90d";
13575
13576
  })(exports.UserUsageRange || (exports.UserUsageRange = {}));
13576
13577
 
13578
+ exports.Type = void 0;
13579
+ (function (Type) {
13580
+ Type["Totp"] = "totp";
13581
+ })(exports.Type || (exports.Type = {}));
13582
+
13577
13583
  exports.MessagingProviderType = void 0;
13578
13584
  (function (MessagingProviderType) {
13579
13585
  MessagingProviderType["Email"] = "email";
@@ -1,4 +1,4 @@
1
- import { Client, Account, } from "@appwrite.io/console";
1
+ import { Client, Account, AuthenticatorType } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
@@ -7,7 +7,7 @@ const client = new Client()
7
7
  const account = new Account(client);
8
8
 
9
9
  const result = await account.createMfaAuthenticator(
10
- .Totp // type
10
+ AuthenticatorType.Totp // type
11
11
  );
12
12
 
13
13
  console.log(response);
@@ -1,4 +1,4 @@
1
- import { Client, Account, } from "@appwrite.io/console";
1
+ import { Client, Account, AuthenticationFactor } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
@@ -7,7 +7,7 @@ const client = new Client()
7
7
  const account = new Account(client);
8
8
 
9
9
  const result = await account.createMfaChallenge(
10
- .Email // factor
10
+ AuthenticationFactor.Email // factor
11
11
  );
12
12
 
13
13
  console.log(response);
@@ -1,4 +1,4 @@
1
- import { Client, Account, } from "@appwrite.io/console";
1
+ import { Client, Account, AuthenticatorType } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
@@ -7,7 +7,7 @@ const client = new Client()
7
7
  const account = new Account(client);
8
8
 
9
9
  const result = await account.deleteMfaAuthenticator(
10
- .Totp, // type
10
+ AuthenticatorType.Totp, // type
11
11
  '<OTP>' // otp
12
12
  );
13
13
 
@@ -1,4 +1,4 @@
1
- import { Client, Account, } from "@appwrite.io/console";
1
+ import { Client, Account, AuthenticatorType } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
@@ -7,7 +7,7 @@ const client = new Client()
7
7
  const account = new Account(client);
8
8
 
9
9
  const result = await account.updateMfaAuthenticator(
10
- .Totp, // type
10
+ AuthenticatorType.Totp, // type
11
11
  '<OTP>' // otp
12
12
  );
13
13
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appwrite.io/console",
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.6.0-rc.15",
5
+ "version": "0.6.0-rc.16",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/src/client.ts CHANGED
@@ -104,7 +104,7 @@ class Client {
104
104
  'x-sdk-name': 'Console',
105
105
  'x-sdk-platform': 'console',
106
106
  'x-sdk-language': 'web',
107
- 'x-sdk-version': '0.6.0-rc.15',
107
+ 'x-sdk-version': '0.6.0-rc.16',
108
108
  'X-Appwrite-Response-Format': '1.5.0',
109
109
  };
110
110
 
@@ -1,4 +1,4 @@
1
- export enum Factor {
1
+ export enum AuthenticationFactor {
2
2
  Email = 'email',
3
3
  Phone = 'phone',
4
4
  Totp = 'totp',
@@ -0,0 +1,3 @@
1
+ export enum AuthenticatorType {
2
+ Totp = 'totp',
3
+ }
package/src/index.ts CHANGED
@@ -22,8 +22,8 @@ export type { QueryTypes, QueryTypesList } from './query';
22
22
  export { Permission } from './permission';
23
23
  export { Role } from './role';
24
24
  export { ID } from './id';
25
- export { Type } from './enums/type';
26
- export { Factor } from './enums/factor';
25
+ export { AuthenticatorType } from './enums/authenticator-type';
26
+ export { AuthenticationFactor } from './enums/authentication-factor';
27
27
  export { OAuthProvider } from './enums/o-auth-provider';
28
28
  export { Browser } from './enums/browser';
29
29
  export { CreditCard } from './enums/credit-card';
@@ -54,4 +54,5 @@ export { ImageFormat } from './enums/image-format';
54
54
  export { StorageUsageRange } from './enums/storage-usage-range';
55
55
  export { PasswordHash } from './enums/password-hash';
56
56
  export { UserUsageRange } from './enums/user-usage-range';
57
+ export { Type } from './enums/type';
57
58
  export { MessagingProviderType } from './enums/messaging-provider-type';
@@ -2,8 +2,8 @@ import { Service } from '../service';
2
2
  import { AppwriteException, Client } from '../client';
3
3
  import type { Models } from '../models';
4
4
  import type { UploadProgress, Payload } from '../client';
5
- import { Type } from '../enums/type';
6
- import { Factor } from '../enums/factor';
5
+ import { AuthenticatorType } from '../enums/authenticator-type';
6
+ import { AuthenticationFactor } from '../enums/authentication-factor';
7
7
  import { OAuthProvider } from '../enums/o-auth-provider';
8
8
 
9
9
  export class Account extends Service {
@@ -275,11 +275,11 @@ export class Account extends Service {
275
275
  * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
276
276
  * method.
277
277
  *
278
- * @param {Type} type
278
+ * @param {AuthenticatorType} type
279
279
  * @throws {AppwriteException}
280
280
  * @returns {Promise}
281
281
  */
282
- async createMfaAuthenticator(type: Type): Promise<Models.MfaType> {
282
+ async createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType> {
283
283
  if (typeof type === 'undefined') {
284
284
  throw new AppwriteException('Missing required parameter: "type"');
285
285
  }
@@ -300,12 +300,12 @@ export class Account extends Service {
300
300
  * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
301
301
  * method.
302
302
  *
303
- * @param {Type} type
303
+ * @param {AuthenticatorType} type
304
304
  * @param {string} otp
305
305
  * @throws {AppwriteException}
306
306
  * @returns {Promise}
307
307
  */
308
- async updateMfaAuthenticator<Preferences extends Models.Preferences>(type: Type, otp: string): Promise<Models.User<Preferences>> {
308
+ async updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {
309
309
  if (typeof type === 'undefined') {
310
310
  throw new AppwriteException('Missing required parameter: "type"');
311
311
  }
@@ -332,12 +332,12 @@ export class Account extends Service {
332
332
  *
333
333
  * Delete an authenticator for a user by ID.
334
334
  *
335
- * @param {Type} type
335
+ * @param {AuthenticatorType} type
336
336
  * @param {string} otp
337
337
  * @throws {AppwriteException}
338
338
  * @returns {Promise}
339
339
  */
340
- async deleteMfaAuthenticator<Preferences extends Models.Preferences>(type: Type, otp: string): Promise<Models.User<Preferences>> {
340
+ async deleteMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {
341
341
  if (typeof type === 'undefined') {
342
342
  throw new AppwriteException('Missing required parameter: "type"');
343
343
  }
@@ -366,11 +366,11 @@ export class Account extends Service {
366
366
  * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
367
367
  * method.
368
368
  *
369
- * @param {Factor} factor
369
+ * @param {AuthenticationFactor} factor
370
370
  * @throws {AppwriteException}
371
371
  * @returns {Promise}
372
372
  */
373
- async createMfaChallenge(factor: Factor): Promise<Models.MfaChallenge> {
373
+ async createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge> {
374
374
  if (typeof factor === 'undefined') {
375
375
  throw new AppwriteException('Missing required parameter: "factor"');
376
376
  }
@@ -1058,10 +1058,11 @@ export class Account extends Service {
1058
1058
  }
1059
1059
 
1060
1060
  /**
1061
- * Update (or renew) session
1061
+ * Update session
1062
1062
  *
1063
- * Extend session's expiry to increase it's lifespan. Extending a session is
1064
- * useful when session length is short such as 5 minutes.
1063
+ * Use this endpoint to extend a session's length. Extending a session is
1064
+ * useful when session expiry is short. If the session was created using an
1065
+ * OAuth provider, this endpoint refreshes the access token from the provider.
1065
1066
  *
1066
1067
  * @param {string} sessionId
1067
1068
  * @throws {AppwriteException}
@@ -1,4 +1,4 @@
1
- export declare enum Factor {
1
+ export declare enum AuthenticationFactor {
2
2
  Email = "email",
3
3
  Phone = "phone",
4
4
  Totp = "totp",
@@ -0,0 +1,3 @@
1
+ export declare enum AuthenticatorType {
2
+ Totp = "totp"
3
+ }
package/types/index.d.ts CHANGED
@@ -22,8 +22,8 @@ export type { QueryTypes, QueryTypesList } from './query';
22
22
  export { Permission } from './permission';
23
23
  export { Role } from './role';
24
24
  export { ID } from './id';
25
- export { Type } from './enums/type';
26
- export { Factor } from './enums/factor';
25
+ export { AuthenticatorType } from './enums/authenticator-type';
26
+ export { AuthenticationFactor } from './enums/authentication-factor';
27
27
  export { OAuthProvider } from './enums/o-auth-provider';
28
28
  export { Browser } from './enums/browser';
29
29
  export { CreditCard } from './enums/credit-card';
@@ -54,4 +54,5 @@ export { ImageFormat } from './enums/image-format';
54
54
  export { StorageUsageRange } from './enums/storage-usage-range';
55
55
  export { PasswordHash } from './enums/password-hash';
56
56
  export { UserUsageRange } from './enums/user-usage-range';
57
+ export { Type } from './enums/type';
57
58
  export { MessagingProviderType } from './enums/messaging-provider-type';
@@ -1,8 +1,8 @@
1
1
  import { Service } from '../service';
2
2
  import { Client } from '../client';
3
3
  import type { Models } from '../models';
4
- import { Type } from '../enums/type';
5
- import { Factor } from '../enums/factor';
4
+ import { AuthenticatorType } from '../enums/authenticator-type';
5
+ import { AuthenticationFactor } from '../enums/authentication-factor';
6
6
  import { OAuthProvider } from '../enums/o-auth-provider';
7
7
  export declare class Account extends Service {
8
8
  constructor(client: Client);
@@ -123,11 +123,11 @@ export declare class Account extends Service {
123
123
  * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
124
124
  * method.
125
125
  *
126
- * @param {Type} type
126
+ * @param {AuthenticatorType} type
127
127
  * @throws {AppwriteException}
128
128
  * @returns {Promise}
129
129
  */
130
- createMfaAuthenticator(type: Type): Promise<Models.MfaType>;
130
+ createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType>;
131
131
  /**
132
132
  * Verify Authenticator
133
133
  *
@@ -135,23 +135,23 @@ export declare class Account extends Service {
135
135
  * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
136
136
  * method.
137
137
  *
138
- * @param {Type} type
138
+ * @param {AuthenticatorType} type
139
139
  * @param {string} otp
140
140
  * @throws {AppwriteException}
141
141
  * @returns {Promise}
142
142
  */
143
- updateMfaAuthenticator<Preferences extends Models.Preferences>(type: Type, otp: string): Promise<Models.User<Preferences>>;
143
+ updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
144
144
  /**
145
145
  * Delete Authenticator
146
146
  *
147
147
  * Delete an authenticator for a user by ID.
148
148
  *
149
- * @param {Type} type
149
+ * @param {AuthenticatorType} type
150
150
  * @param {string} otp
151
151
  * @throws {AppwriteException}
152
152
  * @returns {Promise}
153
153
  */
154
- deleteMfaAuthenticator<Preferences extends Models.Preferences>(type: Type, otp: string): Promise<Models.User<Preferences>>;
154
+ deleteMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
155
155
  /**
156
156
  * Create 2FA Challenge
157
157
  *
@@ -159,11 +159,11 @@ export declare class Account extends Service {
159
159
  * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
160
160
  * method.
161
161
  *
162
- * @param {Factor} factor
162
+ * @param {AuthenticationFactor} factor
163
163
  * @throws {AppwriteException}
164
164
  * @returns {Promise}
165
165
  */
166
- createMfaChallenge(factor: Factor): Promise<Models.MfaChallenge>;
166
+ createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge>;
167
167
  /**
168
168
  * Create MFA Challenge (confirmation)
169
169
  *
@@ -453,10 +453,11 @@ export declare class Account extends Service {
453
453
  */
454
454
  getSession(sessionId: string): Promise<Models.Session>;
455
455
  /**
456
- * Update (or renew) session
456
+ * Update session
457
457
  *
458
- * Extend session's expiry to increase it's lifespan. Extending a session is
459
- * useful when session length is short such as 5 minutes.
458
+ * Use this endpoint to extend a session's length. Extending a session is
459
+ * useful when session expiry is short. If the session was created using an
460
+ * OAuth provider, this endpoint refreshes the access token from the provider.
460
461
  *
461
462
  * @param {string} sessionId
462
463
  * @throws {AppwriteException}