Repository navigation
feat: SDK update for version 31.1.0 #180
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
8 commits
Select commit
Hold shift + click to select a range
8ea8526
Merge remote-tracking branch 'origin/dev' into dev
abnegate 90edd65
chore: update Node.js SDK to 31.0.0
abnegate d32cb25
Merge remote-tracking branch 'origin/dev' into dev
abnegate 0b07633
chore: update Node.js SDK to 31.0.0
abnegate 9818f41
Merge remote-tracking branch 'origin/dev' into dev
ChiragAgg5k 052e631
chore: update Node.js SDK to 31.1.0
ChiragAgg5k 3420bc9
Merge remote-tracking branch 'origin/dev' into dev
ChiragAgg5k 1b94dd1
chore: update Node.js SDK to 31.1.0
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ```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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createAppwriteMigration({ | ||
| resources: [sdk.AppwriteMigrationResource.User], | ||
| endpoint: 'https://example.com', | ||
| projectId: '<PROJECT_ID>', | ||
| apiKey: '<API_KEY>', | ||
| onDuplicate: sdk.OnDuplicate.Fail, // 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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ```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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createCSVExport({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| filename: '<FILENAME>', | ||
| columns: [], // optional | ||
| queries: [], // optional | ||
| delimiter: '<DELIMITER>', // optional | ||
| enclosure: '<ENCLOSURE>', // optional | ||
| escape: '<ESCAPE>', // optional | ||
| header: false, // optional | ||
| notify: 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ```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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createCSVImport({ | ||
| bucketId: '<BUCKET_ID>', | ||
| fileId: '<FILE_ID>', | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| internalFile: false, // optional | ||
| onDuplicate: sdk.OnDuplicate.Fail, // 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 |
|---|---|---|
| @@ -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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createFirebaseMigration({ | ||
| resources: [sdk.FirebaseMigrationResource.User], | ||
| serviceAccount: '<SERVICE_ACCOUNT>', | ||
| }); | ||
| ``` |
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,19 @@ | ||
| ```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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createJSONExport({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| filename: '<FILENAME>', | ||
| columns: [], // optional | ||
| queries: [], // optional | ||
| notify: 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ```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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createJSONImport({ | ||
| bucketId: '<BUCKET_ID>', | ||
| fileId: '<FILE_ID>', | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| internalFile: false, // optional | ||
| onDuplicate: sdk.OnDuplicate.Fail, // 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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ```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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createNHostMigration({ | ||
| resources: [sdk.NHostMigrationResource.User], | ||
| subdomain: '<SUBDOMAIN>', | ||
| region: '<REGION>', | ||
| adminSecret: '<ADMIN_SECRET>', | ||
| database: '<DATABASE>', | ||
| username: '<USERNAME>', | ||
| password: 'password', | ||
| port: 5432, // 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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ```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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.createSupabaseMigration({ | ||
| resources: [sdk.SupabaseMigrationResource.User], | ||
| endpoint: 'https://example.com', | ||
| apiKey: '<API_KEY>', | ||
| databaseHost: '<DATABASE_HOST>', | ||
| username: '<USERNAME>', | ||
| password: 'password', | ||
| port: 5432, // 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 |
|---|---|---|
| @@ -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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.delete({ | ||
| 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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.get({ | ||
| 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,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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.list({ | ||
| queries: [], // optional | ||
| search: '<SEARCH>', // optional | ||
| total: 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
| 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 migrations = new sdk.Migrations(client); | ||
|
|
||
| const result = await migrations.retry({ | ||
| 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
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
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,12 @@ | ||
| ```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 project = new sdk.Project(client); | ||
|
|
||
| const result = await project.deleteSessions(); | ||
| ``` |
14 changes: 14 additions & 0 deletions
14
docs/examples/project/update-deny-realtime-guests-policy.md
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 project = new sdk.Project(client); | ||
|
|
||
| const result = await project.updateDenyRealtimeGuestsPolicy({ | ||
| enabled: false, | ||
| }); | ||
| ``` |
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
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.
Use the exported environment resource member
The enum exports
Environmentvariable(lowercasev), soEnvironmentVariableis undefined. JavaScript will serialize this array entry asnulland TypeScript users will get a compile error; please use the exported member name.Prompt To Fix With AI
🟡 Minor · documentation · Reply if this doesn't apply.