Skip to content

Commit

Permalink
Release candidate for 1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Feb 24, 2024
1 parent 2a69c35 commit 9a9657d
Show file tree
Hide file tree
Showing 307 changed files with 782 additions and 683 deletions.
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: node_js
node_js:
- "14.16"

jobs:
include:
- stage: NPM RC Release
if: tag == *-rc*
node_js: "14.16"
script:
- npm install
- npm run build
- echo "Deploying RC to NPM..."
deploy:
provider: npm
email: $NPM_EMAIL
api_key: $NPM_API_KEY
tag: next
- stage: NPM Release
if: tag != *-rc*
node_js: "14.16"
script:
- npm install
- npm run build
- echo "Deploying to NPM..."
deploy:
provider: npm
email: $NPM_EMAIL
api_key: $NPM_API_KEY
skip_cleanup: true
on:
tags: true
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
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:

```html
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].12"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].13"></script>
```


Expand Down Expand Up @@ -64,7 +64,7 @@ Once your SDK object is set, access any of the Appwrite services and choose any
const account = new Account(client);

// Register User
account.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe')
account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien")
.then(function (response) {
console.log(response);
}, function (error) {
Expand All @@ -86,7 +86,7 @@ client
const account = new Account(client);

// Register User
account.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe')
account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien")
.then(function (response) {
console.log(response);
}, function (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const client = new Client()

const account = new Account(client);

const result = await account.create2FAChallenge(
const result = await account.createChallenge(
AuthenticationFactor.Totp // factor
);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.createEmailToken(
'[USER_ID]', // userId
'<USER_ID>', // userId
'[email protected]', // email
false // phrase (optional)
);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.createMagicURLToken(
'[USER_ID]', // userId
'<USER_ID>', // userId
'[email protected]', // email
'https://example.com', // url (optional)
false // phrase (optional)
Expand Down
1 change: 0 additions & 1 deletion docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ account.createOAuth2Session(
OAuthProvider.Amazon, // provider
'https://example.com', // success (optional)
'https://example.com', // failure (optional)
false, // token (optional)
[] // scopes (optional)
);

15 changes: 15 additions & 0 deletions docs/examples/account/create-o-auth2token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Client, Account, OAuthProvider } from "@appwrite.io/console";

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)
);

2 changes: 1 addition & 1 deletion docs/examples/account/create-phone-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.createPhoneToken(
'[USER_ID]', // userId
'<USER_ID>', // userId
'+12065550100' // phone
);

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/account/create-push-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const client = new Client()
const account = new Account(client);

const result = await account.createPushTarget(
'[TARGET_ID]', // targetId
'[IDENTIFIER]', // identifier
'[PROVIDER_ID]' // providerId (optional)
'<TARGET_ID>', // targetId
'<IDENTIFIER>', // identifier
'<PROVIDER_ID>' // providerId (optional)
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/create-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.createSession(
'[USER_ID]', // userId
'[SECRET]' // secret
'<USER_ID>', // userId
'<SECRET>' // secret
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const client = new Client()
const account = new Account(client);

const result = await account.create(
'[USER_ID]', // userId
'<USER_ID>', // userId
'[email protected]', // email
'', // password
'[NAME]' // name (optional)
'<NAME>' // name (optional)
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/account/delete-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const account = new Account(client);

const result = await account.deleteAuthenticator(
AuthenticatorType.Totp, // type
'[OTP]' // otp
'<OTP>' // otp
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/account/delete-identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.deleteIdentity(
'[IDENTITY_ID]' // identityId
'<IDENTITY_ID>' // identityId
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/account/delete-push-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.deletePushTarget(
'[TARGET_ID]' // targetId
'<TARGET_ID>' // targetId
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/account/delete-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.deleteSession(
'[SESSION_ID]' // sessionId
'<SESSION_ID>' // sessionId
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/account/get-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.getSession(
'[SESSION_ID]' // sessionId
'<SESSION_ID>' // sessionId
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/update-challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.updateChallenge(
'[CHALLENGE_ID]', // challengeId
'[OTP]' // otp
'<CHALLENGE_ID>', // challengeId
'<OTP>' // otp
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/update-magic-u-r-l-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.updateMagicURLSession(
'[USER_ID]', // userId
'[SECRET]' // secret
'<USER_ID>', // userId
'<SECRET>' // secret
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/account/update-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.updateName(
'[NAME]' // name
'<NAME>' // name
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/update-phone-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.updatePhoneVerification(
'[USER_ID]', // userId
'[SECRET]' // secret
'<USER_ID>', // userId
'<SECRET>' // secret
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/update-push-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.updatePushTarget(
'[TARGET_ID]', // targetId
'[IDENTIFIER]' // identifier
'<TARGET_ID>', // targetId
'<IDENTIFIER>' // identifier
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/update-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.updateRecovery(
'[USER_ID]', // userId
'[SECRET]', // secret
'<USER_ID>', // userId
'<SECRET>', // secret
'' // password
);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const account = new Account(client);

const result = await account.updateSession(
'[SESSION_ID]' // sessionId
'<SESSION_ID>' // sessionId
);

console.log(response);
4 changes: 2 additions & 2 deletions docs/examples/account/update-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.updateVerification(
'[USER_ID]', // userId
'[SECRET]' // secret
'<USER_ID>', // userId
'<SECRET>' // secret
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/account/verify-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const account = new Account(client);

const result = await account.verifyAuthenticator(
AuthenticatorType.Totp, // type
'[OTP]' // otp
'<OTP>' // otp
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/assistant/chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const assistant = new Assistant(client);

const result = await assistant.chat(
'[PROMPT]' // prompt
'<PROMPT>' // prompt
);

console.log(response);
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-initials.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const avatars = new Avatars(client);

const result = avatars.getInitials(
'[NAME]', // name (optional)
'<NAME>', // name (optional)
0, // width (optional)
0, // height (optional)
'' // background (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-q-r.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const client = new Client()
const avatars = new Avatars(client);

const result = avatars.getQR(
'[TEXT]', // text
'<TEXT>', // text
1, // size (optional)
0, // margin (optional)
false // download (optional)
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/databases/create-boolean-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const databases = new Databases(client);

const result = await databases.createBooleanAttribute(
'[DATABASE_ID]', // databaseId
'[COLLECTION_ID]', // collectionId
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
false, // default (optional)
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/databases/create-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const client = new Client()
const databases = new Databases(client);

const result = await databases.createCollection(
'[DATABASE_ID]', // databaseId
'[COLLECTION_ID]', // collectionId
'[NAME]', // name
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<NAME>', // name
["read("any")"], // permissions (optional)
false, // documentSecurity (optional)
false // enabled (optional)
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/databases/create-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const databases = new Databases(client);

const result = await databases.createDatetimeAttribute(
'[DATABASE_ID]', // databaseId
'[COLLECTION_ID]', // collectionId
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'', // default (optional)
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const client = new Client()
const databases = new Databases(client);

const result = await databases.createDocument(
'[DATABASE_ID]', // databaseId
'[COLLECTION_ID]', // collectionId
'[DOCUMENT_ID]', // documentId
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
{}, // data
["read("any")"] // permissions (optional)
);
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/databases/create-email-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const client = new Client()
const databases = new Databases(client);

const result = await databases.createEmailAttribute(
'[DATABASE_ID]', // databaseId
'[COLLECTION_ID]', // collectionId
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'[email protected]', // default (optional)
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/databases/create-enum-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const client = new Client()
const databases = new Databases(client);

const result = await databases.createEnumAttribute(
'[DATABASE_ID]', // databaseId
'[COLLECTION_ID]', // collectionId
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
[], // elements
false, // required
'[DEFAULT]', // default (optional)
'<DEFAULT>', // default (optional)
false // array (optional)
);

Expand Down
Loading

0 comments on commit 9a9657d

Please sign in to comment.