Skip to content

Commit 5ba5de3

Browse files
authored
Merge pull request #18 from appwrite/dev
Dev
2 parents 69e2f4c + 20dc261 commit 5ba5de3

File tree

311 files changed

+15026
-3463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

311 files changed

+15026
-3463
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
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.4.12-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.0-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)
88

9-
**This SDK is compatible with Appwrite server version 1.4.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-deno/releases).**
9+
**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-deno/releases).**
1010

1111
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Deno SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1212

1313

14-
![Appwrite](https://appwrite.io/images/github.png)
14+
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
1515

1616
## Installation
1717

@@ -43,7 +43,7 @@ Once your SDK object is set, create any of the Appwrite service objects and choo
4343
```typescript
4444
let users = new sdk.Users(client);
4545

46-
let user = await users.create(ID.unique(), 'email@example.com', 'password');
46+
let user = await users.create(ID.unique(), "email@example.com", "+123456789", "password", "Walter O'Brien");
4747
console.log(user);
4848
```
4949

@@ -61,7 +61,7 @@ client
6161
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
6262
;
6363

64-
let user = await users.create(ID.unique(), 'email@example.com', 'password');
64+
let user = await users.create(ID.unique(), "email@example.com", "+123456789", "password", "Walter O'Brien");
6565
console.log(user);
6666
```
6767

@@ -72,7 +72,7 @@ The Appwrite Deno SDK raises `AppwriteException` object with `message`, `code` a
7272
let users = new sdk.Users(client);
7373

7474
try {
75-
let user = await users.create(ID.unique(), 'email@example.com', 'password');
75+
let user = await users.create(ID.unique(), "email@example.com", "+123456789", "password", "Walter O'Brien");
7676
} catch(e) {
7777
console.log(e.message);
7878
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
6+
7+
const account = new Account(client);
8+
9+
const response = await account.createAnonymousSession();
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
6+
7+
const account = new Account(client);
8+
9+
const response = await account.createEmailPasswordSession(
10+
'email@example.com', // email
11+
'password' // password
12+
);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
6+
7+
const account = new Account(client);
8+
9+
const response = await account.createEmailToken(
10+
'<USER_ID>', // userId
11+
'email@example.com', // email
12+
false // phrase (optional)
13+
);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
6+
7+
const account = new Account(client);
8+
9+
const response = await account.createJWT();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
6+
7+
const account = new Account(client);
8+
9+
const response = await account.createMagicURLToken(
10+
'<USER_ID>', // userId
11+
'email@example.com', // email
12+
'https://example.com', // url (optional)
13+
false // phrase (optional)
14+
);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2') // Your project ID
6+
.setSession(''); // The user session to authenticate with
7+
8+
const account = new Account(client);
9+
10+
const response = await account.createMfaAuthenticator(
11+
AuthenticatorType.Totp // type
12+
);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Client, Account, AuthenticationFactor } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
6+
7+
const account = new Account(client);
8+
9+
const response = await account.createMfaChallenge(
10+
AuthenticationFactor.Email // factor
11+
);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2') // Your project ID
6+
.setSession(''); // The user session to authenticate with
7+
8+
const account = new Account(client);
9+
10+
const response = await account.createMfaRecoveryCodes();

0 commit comments

Comments
 (0)