-
Notifications
You must be signed in to change notification settings - Fork 45
feat: SDK update for version 28.0.0 #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8afd7b1
chore: update Node.js SDK to 26.2.0
ChiragAgg5k 8177977
chore: update Node.js SDK to 27.0.0
ChiragAgg5k c2a4f04
chore: update Node.js SDK to 27.0.0
ChiragAgg5k 455569b
Merge main into dev for 27.0.0 release
ChiragAgg5k 5b3431b
(fix): remove duplicate Project model properties from merge
ChiragAgg5k 25c3ae5
chore: update Node.js SDK to 27.1.0
ChiragAgg5k 74843a3
Merge main into dev for 27.1.0 release
ChiragAgg5k 2868e94
chore: update Node.js SDK to 27.1.0
ChiragAgg5k 8f69fc5
chore: update Node.js SDK to 28.0.0
ChiragAgg5k c0e5f18
chore: update Node.js SDK to 28.0.0
ChiragAgg5k 147c3c9
chore: update Node.js SDK to 28.0.0
ChiragAgg5k 7f8fee2
chore: merge main into dev for the release
ChiragAgg5k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,15 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const embeddings = new sdk.Embeddings(client); | ||
|
|
||
| const result = await embeddings.createTextEmbeddings({ | ||
| texts: [], | ||
| model: sdk.EmbeddingModel.NomicEmbedText // optional | ||
| }); | ||
| ``` |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,16 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const proxy = new sdk.Proxy(client); | ||
|
|
||
| const result = await proxy.createInvalidation({ | ||
| domain: '', | ||
| type: sdk.InvalidationType.Tag, | ||
| reference: '<REFERENCE>' // optional | ||
| }); | ||
| ``` |
This file contains hidden or 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 hidden or 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,16 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const tablesDB = new sdk.TablesDB(client); | ||
|
|
||
| const result = await tablesDB.createMigration({ | ||
| databaseId: '<DATABASE_ID>', | ||
| specification: 's-1vcpu-1gb', | ||
| autoCutover: false // optional | ||
| }); | ||
| ``` |
This file contains hidden or 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 hidden or 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,15 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const tablesDB = new sdk.TablesDB(client); | ||
|
|
||
| const result = await tablesDB.cutoverMigration({ | ||
| databaseId: '<DATABASE_ID>', | ||
| migrationId: '<MIGRATION_ID>' | ||
| }); | ||
| ``` | ||
This file contains hidden or 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,15 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const tablesDB = new sdk.TablesDB(client); | ||
|
|
||
| const result = await tablesDB.deleteMigration({ | ||
| databaseId: '<DATABASE_ID>', | ||
| migrationId: '<MIGRATION_ID>' | ||
| }); | ||
| ``` |
This file contains hidden or 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,15 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const tablesDB = new sdk.TablesDB(client); | ||
|
|
||
| const result = await tablesDB.getMigration({ | ||
| databaseId: '<DATABASE_ID>', | ||
| migrationId: '<MIGRATION_ID>' | ||
| }); | ||
| ``` |
This file contains hidden or 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 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const tablesDB = new sdk.TablesDB(client); | ||
|
|
||
| const result = await tablesDB.listMigrations({ | ||
| databaseId: '<DATABASE_ID>' | ||
| }); | ||
| ``` |
This file contains hidden or 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,17 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const tablesDB = new sdk.TablesDB(client); | ||
|
|
||
| const result = await tablesDB.listOperations({ | ||
| databaseId: '<DATABASE_ID>', | ||
| status: 'running', // optional | ||
| limit: 1, // optional | ||
| offset: 0 // optional | ||
| }); | ||
| ``` |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -12,6 +12,8 @@ const result = await tablesDB.update({ | |
| databaseId: '<DATABASE_ID>', | ||
| name: '<NAME>', // optional | ||
| enabled: false, // optional | ||
| replicas: 0 // optional | ||
| specification: 'serverless', // optional | ||
| replicas: 0, // optional | ||
| syncMode: 'async' // optional | ||
|
Comment on lines
+15
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note for fututre, we might want enums here |
||
| }); | ||
| ``` | ||
This file contains hidden or 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,15 @@ | ||
| ```javascript | ||
| const sdk = require('node-appwrite'); | ||
|
|
||
| const client = new sdk.Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>') // Your project ID | ||
| .setKey('<YOUR_API_KEY>'); // Your secret API key | ||
|
|
||
| const users = new sdk.Users(client); | ||
|
|
||
| const result = await users.getMFAChallenge({ | ||
| userId: '<USER_ID>', | ||
| challengeId: '<CHALLENGE_ID>' | ||
| }); | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets check with Jake if this is 100% terminology we want. its not what we commonly do. We usually createMnigrationCutover, for exmaple