-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from appwrite/dev
Dev
- Loading branch information
Showing
311 changed files
with
15,026 additions
and
3,463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createAnonymousSession(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createEmailPasswordSession( | ||
'email@example.com', // email | ||
'password' // password | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createEmailToken( | ||
'<USER_ID>', // userId | ||
'email@example.com', // email | ||
false // phrase (optional) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createJWT(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createMagicURLToken( | ||
'<USER_ID>', // userId | ||
'email@example.com', // email | ||
'https://example.com', // url (optional) | ||
false // phrase (optional) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession(''); // The user session to authenticate with | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createMfaAuthenticator( | ||
AuthenticatorType.Totp // type | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Client, Account, AuthenticationFactor } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createMfaChallenge( | ||
AuthenticationFactor.Email // factor | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession(''); // The user session to authenticate with | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createMfaRecoveryCodes(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Client, Account, OAuthProvider } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
account.createOAuth2Token( | ||
OAuthProvider.Amazon, // provider | ||
'https://example.com', // success (optional) | ||
'https://example.com', // failure (optional) | ||
[] // scopes (optional) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createPhoneToken( | ||
'<USER_ID>', // userId | ||
'+12065550100' // phone | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
// Init SDK | ||
let client = new sdk.Client(); | ||
|
||
let account = new sdk.Account(client); | ||
|
||
client | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
.setSession(''); // The user session to authenticate with | ||
|
||
let promise = account.createPhoneVerification(); | ||
const account = new Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createPhoneVerification(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
// Init SDK | ||
let client = new sdk.Client(); | ||
|
||
let account = new sdk.Account(client); | ||
|
||
client | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
.setSession(''); // The user session to authenticate with | ||
|
||
let promise = account.createRecovery('email@example.com', 'https://example.com'); | ||
const account = new Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createRecovery( | ||
'email@example.com', // email | ||
'https://example.com' // url | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.createSession( | ||
'<USER_ID>', // userId | ||
'<SECRET>' // secret | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
// Init SDK | ||
let client = new sdk.Client(); | ||
|
||
let account = new sdk.Account(client); | ||
|
||
client | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
.setSession(''); // The user session to authenticate with | ||
|
||
let promise = account.createVerification('https://example.com'); | ||
const account = new Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.createVerification( | ||
'https://example.com' // url | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.create( | ||
'<USER_ID>', // userId | ||
'email@example.com', // email | ||
'', // password | ||
'<NAME>' // name (optional) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
// Init SDK | ||
let client = new sdk.Client(); | ||
|
||
let account = new sdk.Account(client); | ||
|
||
client | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
.setSession(''); // The user session to authenticate with | ||
|
||
let promise = account.deleteIdentity('[IDENTITY_ID]'); | ||
const account = new Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.deleteIdentity( | ||
'<IDENTITY_ID>' // identityId | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setSession(''); // The user session to authenticate with | ||
|
||
const account = new Account(client); | ||
|
||
const response = await account.deleteMfaAuthenticator( | ||
AuthenticatorType.Totp, // type | ||
'<OTP>' // otp | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
// Init SDK | ||
let client = new sdk.Client(); | ||
|
||
let account = new sdk.Account(client); | ||
|
||
client | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
.setSession(''); // The user session to authenticate with | ||
|
||
let promise = account.deleteSession('[SESSION_ID]'); | ||
const account = new Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.deleteSession( | ||
'<SESSION_ID>' // sessionId | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; | ||
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; | ||
|
||
// Init SDK | ||
let client = new sdk.Client(); | ||
|
||
let account = new sdk.Account(client); | ||
|
||
client | ||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
.setSession(''); // The user session to authenticate with | ||
|
||
let promise = account.deleteSessions(); | ||
const account = new Account(client); | ||
|
||
promise.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
const response = await account.deleteSessions(); |
Oops, something went wrong.