Skip to content

Commit a11f02b

Browse files
committed
Release candidate for 1.5.x
1 parent b5e5045 commit a11f02b

File tree

12 files changed

+28
-28
lines changed

12 files changed

+28
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { Client, Account } from "appwrite";
3333
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
3434

3535
```html
36-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3"></script>
3737
```
3838

3939

docs/examples/account/add-authenticator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, , Account } from "appwrite";
1+
import { Client, AuthenticatorType, Account } from "appwrite";
22

33
const client = new Client();
44

@@ -9,7 +9,7 @@ client
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
const promise = account.addAuthenticator(.Totp);
12+
const promise = account.addAuthenticator(AuthenticatorType.Totp);
1313

1414
promise.then(function (response) {
1515
console.log(response); // Success

docs/examples/account/create2f-a-challenge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, , Account } from "appwrite";
1+
import { Client, AuthenticationFactor, Account } from "appwrite";
22

33
const client = new Client();
44

@@ -9,7 +9,7 @@ client
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
const promise = account.create2FAChallenge(.Totp);
12+
const promise = account.create2FAChallenge(AuthenticationFactor.Totp);
1313

1414
promise.then(function (response) {
1515
console.log(response); // Success

docs/examples/account/delete-authenticator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, , Account } from "appwrite";
1+
import { Client, AuthenticatorType, Account } from "appwrite";
22

33
const client = new Client();
44

@@ -9,7 +9,7 @@ client
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
const promise = account.deleteAuthenticator(.Totp, '[OTP]');
12+
const promise = account.deleteAuthenticator(AuthenticatorType.Totp, '[OTP]');
1313

1414
promise.then(function (response) {
1515
console.log(response); // Success

docs/examples/account/verify-authenticator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, , Account } from "appwrite";
1+
import { Client, AuthenticatorType, Account } from "appwrite";
22

33
const client = new Client();
44

@@ -9,7 +9,7 @@ client
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
const promise = account.verifyAuthenticator(.Totp, '[OTP]');
12+
const promise = account.verifyAuthenticator(AuthenticatorType.Totp, '[OTP]');
1313

1414
promise.then(function (response) {
1515
console.log(response); // Success

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "appwrite",
33
"homepage": "https://appwrite.io/support",
44
"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": "14.0.0-rc.2",
5+
"version": "14.0.0-rc.3",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ class Client {
103103
'x-sdk-name': 'Web',
104104
'x-sdk-platform': 'client',
105105
'x-sdk-language': 'web',
106-
'x-sdk-version': '14.0.0-rc.2',
107-
'X-Appwrite-Response-Format': '1.4.0',
106+
'x-sdk-version': '14.0.0-rc.3',
107+
'X-Appwrite-Response-Format': '1.5.0',
108108
};
109109

110110
/**

src/enums/factor.ts renamed to src/enums/authentication-factor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export enum Factor {
1+
export enum AuthenticationFactor {
22
Totp = 'totp',
33
Phone = 'phone',
44
Email = 'email',

src/enums/authenticator-type.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export enum AuthenticatorType {
2+
Totp = 'totp',
3+
}

src/enums/type.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export type { QueryTypes, QueryTypesList } from './query';
1313
export { Permission } from './permission';
1414
export { Role } from './role';
1515
export { ID } from './id';
16-
export { Factor } from './enums/factor';
17-
export { Type } from './enums/type';
16+
export { AuthenticationFactor } from './enums/authentication-factor';
17+
export { AuthenticatorType } from './enums/authenticator-type';
1818
export { OAuthProvider } from './enums/o-auth-provider';
1919
export { Browser } from './enums/browser';
2020
export { CreditCard } from './enums/credit-card';

src/services/account.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { AppwriteException, Client } from '../client';
33
import type { Models } from '../models';
44
import type { UploadProgress, Payload } from '../client';
55
import { Query } from '../query';
6-
import { Factor } from '../enums/factor';
7-
import { Type } from '../enums/type';
6+
import { AuthenticationFactor } from '../enums/authentication-factor';
7+
import { AuthenticatorType } from '../enums/authenticator-type';
88
import { OAuthProvider } from '../enums/o-auth-provider';
99

1010
export class Account extends Service {
@@ -253,11 +253,11 @@ export class Account extends Service {
253253
* Create 2FA Challenge
254254
*
255255
*
256-
* @param {Factor} factor
256+
* @param {AuthenticationFactor} factor
257257
* @throws {AppwriteException}
258258
* @returns {Promise}
259259
*/
260-
async create2FAChallenge(factor: Factor): Promise<Models.MfaChallenge> {
260+
async create2FAChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge> {
261261
if (typeof factor === 'undefined') {
262262
throw new AppwriteException('Missing required parameter: "factor"');
263263
}
@@ -331,11 +331,11 @@ export class Account extends Service {
331331
* Add Authenticator
332332
*
333333
*
334-
* @param {Type} type
334+
* @param {AuthenticatorType} type
335335
* @throws {AppwriteException}
336336
* @returns {Promise}
337337
*/
338-
async addAuthenticator(type: Type): Promise<Models.MfaType> {
338+
async addAuthenticator(type: AuthenticatorType): Promise<Models.MfaType> {
339339
if (typeof type === 'undefined') {
340340
throw new AppwriteException('Missing required parameter: "type"');
341341
}
@@ -353,12 +353,12 @@ export class Account extends Service {
353353
* Verify Authenticator
354354
*
355355
*
356-
* @param {Type} type
356+
* @param {AuthenticatorType} type
357357
* @param {string} otp
358358
* @throws {AppwriteException}
359359
* @returns {Promise}
360360
*/
361-
async verifyAuthenticator<Preferences extends Models.Preferences>(type: Type, otp: string): Promise<Models.User<Preferences>> {
361+
async verifyAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {
362362
if (typeof type === 'undefined') {
363363
throw new AppwriteException('Missing required parameter: "type"');
364364
}
@@ -384,12 +384,12 @@ export class Account extends Service {
384384
* Delete Authenticator
385385
*
386386
*
387-
* @param {Type} type
387+
* @param {AuthenticatorType} type
388388
* @param {string} otp
389389
* @throws {AppwriteException}
390390
* @returns {Promise}
391391
*/
392-
async deleteAuthenticator<Preferences extends Models.Preferences>(type: Type, otp: string): Promise<Models.User<Preferences>> {
392+
async deleteAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {
393393
if (typeof type === 'undefined') {
394394
throw new AppwriteException('Missing required parameter: "type"');
395395
}

0 commit comments

Comments
 (0)