Skip to content

Commit fe476d7

Browse files
authored
Merge pull request #20 from appwrite/dev
fix: minor bugs
2 parents 63b9538 + 44fc066 commit fe476d7

File tree

13 files changed

+51
-39
lines changed

13 files changed

+51
-39
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Deno SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.5.4-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.7-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

docs/examples/messaging/update-email.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ const response = await messaging.updateEmail(
1818
false, // html (optional)
1919
[], // cc (optional)
2020
[], // bcc (optional)
21-
'' // scheduledAt (optional)
21+
'', // scheduledAt (optional)
22+
[] // attachments (optional)
2223
);

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export class Client {
1111
endpoint: string = 'https://cloud.appwrite.io/v1';
1212
headers: Payload = {
1313
'content-type': '',
14-
'user-agent' : `AppwriteDenoSDK/10.0.1 (${Deno.build.os}; ${Deno.build.arch})`,
14+
'user-agent' : `AppwriteDenoSDK/11.0.0 (${Deno.build.os}; ${Deno.build.arch})`,
1515
'x-sdk-name': 'Deno',
1616
'x-sdk-platform': 'server',
1717
'x-sdk-language': 'deno',
18-
'x-sdk-version': '10.0.1',
18+
'x-sdk-version': '11.0.0',
1919
'X-Appwrite-Response-Format':'1.5.0',
2020
};
2121

src/enums/credit-card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export enum CreditCard {
22
AmericanExpress = 'amex',
33
Argencard = 'argencard',
44
Cabal = 'cabal',
5-
Consosud = 'censosud',
5+
Cencosud = 'cencosud',
66
DinersClub = 'diners',
77
Discover = 'discover',
88
Elo = 'elo',

src/enums/flag.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export enum Flag {
140140
Palau = 'pw',
141141
PapuaNewGuinea = 'pg',
142142
Poland = 'pl',
143+
FrenchPolynesia = 'pf',
143144
NorthKorea = 'kp',
144145
Portugal = 'pt',
145146
Paraguay = 'py',

src/enums/name.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ export enum Name {
1111
V1Builds = 'v1-builds',
1212
V1Messaging = 'v1-messaging',
1313
V1Migrations = 'v1-migrations',
14-
Hamsterv1 = 'hamsterv1',
1514
}

src/enums/runtime.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export enum Runtime {
1818
Python310 = 'python-3.10',
1919
Python311 = 'python-3.11',
2020
Python312 = 'python-3.12',
21+
PythonMl311 = 'python-ml-3.11',
22+
Deno121 = 'deno-1.21',
23+
Deno124 = 'deno-1.24',
24+
Deno135 = 'deno-1.35',
2125
Deno140 = 'deno-1.40',
2226
Dart215 = 'dart-2.15',
2327
Dart216 = 'dart-2.16',

src/models.d.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,10 @@ export namespace Models {
11881188
* Session creation date in ISO 8601 format.
11891189
*/
11901190
$createdAt: string;
1191+
/**
1192+
* Session update date in ISO 8601 format.
1193+
*/
1194+
$updatedAt: string;
11911195
/**
11921196
* User ID.
11931197
*/
@@ -2174,17 +2178,21 @@ export namespace Models {
21742178
*/
21752179
export type MfaFactors = {
21762180
/**
2177-
* TOTP
2181+
* Can TOTP be used for MFA challenge for this account.
21782182
*/
21792183
totp: boolean;
21802184
/**
2181-
* Phone
2185+
* Can phone (SMS) be used for MFA challenge for this account.
21822186
*/
21832187
phone: boolean;
21842188
/**
2185-
* Email
2189+
* Can email be used for MFA challenge for this account.
21862190
*/
21872191
email: boolean;
2192+
/**
2193+
* Can recovery code be used for MFA challenge for this account.
2194+
*/
2195+
recoveryCode: boolean;
21882196
}
21892197
/**
21902198
* Provider

src/services/account.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export class Account extends Service {
290290
*
291291
* Add an authenticator app to be used as an MFA factor. Verify the
292292
* authenticator using the [verify
293-
* authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
293+
* authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator)
294294
* method.
295295
*
296296
* @param {AuthenticatorType} type
@@ -319,8 +319,8 @@ export class Account extends Service {
319319
* Verify Authenticator
320320
*
321321
* Verify an authenticator app after adding it using the [add
322-
* authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
323-
* method.
322+
* authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator)
323+
* method. add
324324
*
325325
* @param {AuthenticatorType} type
326326
* @param {string} otp
@@ -362,7 +362,7 @@ export class Account extends Service {
362362
* @throws {AppwriteException}
363363
* @returns {Promise}
364364
*/
365-
async deleteMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {
365+
async deleteMfaAuthenticator(type: AuthenticatorType, otp: string): Promise<Response> {
366366
if (typeof type === 'undefined') {
367367
throw new AppwriteException('Missing required parameter: "type"');
368368
}

src/services/messaging.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,11 @@ export class Messaging extends Service {
153153
* @param {string[]} cc
154154
* @param {string[]} bcc
155155
* @param {string} scheduledAt
156+
* @param {string[]} attachments
156157
* @throws {AppwriteException}
157158
* @returns {Promise}
158159
*/
159-
async updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string): Promise<Models.Message> {
160+
async updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string, attachments?: string[]): Promise<Models.Message> {
160161
if (typeof messageId === 'undefined') {
161162
throw new AppwriteException('Missing required parameter: "messageId"');
162163
}
@@ -194,6 +195,9 @@ export class Messaging extends Service {
194195
if (typeof scheduledAt !== 'undefined') {
195196
payload['scheduledAt'] = scheduledAt;
196197
}
198+
if (typeof attachments !== 'undefined') {
199+
payload['attachments'] = attachments;
200+
}
197201
return await this.client.call(
198202
'patch',
199203
apiPath,

0 commit comments

Comments
 (0)