Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

## 27.0.0

* Breaking: removed `account.createJWT`; use `users.createJWT` instead. A leaked JWT could mint further JWTs, letting a credential outlive its own expiry — a session cannot duplicate itself to live forever either
* Breaking: removed `project.createKey`. A leaked key could mint further hidden keys, making a compromise far harder to contain and revoke
* Breaking: `activities.listEvents` `queries` now takes an array instead of a string
* Added: `embeddings` service with `createTextEmbeddings`, plus the `EmbeddingModel` enum
* Added: TablesDB migration methods `listMigrations`, `createMigration`, `getMigration`, `deleteMigration`, `cutoverMigration`, and `listOperations`
* Added: `proxy.createInvalidation` for purging cached edge responses, plus the `InvalidationType` enum
* Added: `apps.deleteInstallation`
* Added: `users.getMFAChallenge` and the `MfaChallengeSecret` model
* Added: `project.updateMFAFactorsPolicy` and the `PolicyMfaFactors` model
* Added: `client.setOrganization` for organization-scoped requests
* Added: `folder` parameter to `storage.createFile`
* Added: `syncMode` parameter to `tablesDB.create` and `tablesDB.update`, and `specification` to `tablesDB.update`
* Added: `installationScopes` parameter to `project.updateOAuth2Server`
* Added: `custom` authentication factor, `node-26` runtime, `mfa-factors` project policy, and the `embeddings.write` and `proxy.invalidations.write` key scopes
* Updated: response format to `1.9.6`

## 26.1.0

* Added: `Apps` service for managing OAuth2 applications, keys, and installations
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Appwrite Ruby SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.9.5-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.9.6-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
Expand Down
2 changes: 1 addition & 1 deletion appwrite.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |spec|

spec.name = 'appwrite'
spec.version = '26.1.0'
spec.version = '27.0.0'
spec.license = 'BSD-3-Clause'
spec.summary = 'Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API'
spec.author = 'Appwrite Team'
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/activities/list-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ client = Client.new
activities = Activities.new(client)

result = activities.list_events(
queries: '' # optional
queries: [] # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/apps/create-installation-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include Appwrite
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ client = Client.new
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)
apps = Apps.new(client)

result = account.create_jwt(
duration: 0 # optional
result = apps.delete_installation(
app_id: '<APP_ID>',
installation_id: '<INSTALLATION_ID>'
)
```
2 changes: 1 addition & 1 deletion docs/examples/apps/get-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include Appwrite
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/apps/list-installations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include Appwrite
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

Expand Down
18 changes: 18 additions & 0 deletions docs/examples/embeddings/create-text-embeddings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```ruby
require 'appwrite'

include Appwrite
include Appwrite::Enums

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

embeddings = Embeddings.new(client)

result = embeddings.create_text_embeddings(
texts: [],
model: EmbeddingModel::NOMIC_EMBED_TEXT # optional
)
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'appwrite'

include Appwrite
include Appwrite::Enums

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
Expand All @@ -11,10 +10,10 @@ client = Client.new

project = Project.new(client)

result = project.create_key(
key_id: '<KEY_ID>',
name: '<NAME>',
scopes: [ProjectKeyScopes::PROJECT_READ],
expire: '2020-10-15T06:38:00.000+00:00' # optional
result = project.update_mfa_factors_policy(
totp: false, # optional
email: false, # optional
phone: false, # optional
custom: false # optional
)
```
3 changes: 2 additions & 1 deletion docs/examples/project/update-o-auth-2-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ result = project.update_o_auth2_server(
user_code_length: 6, # optional
user_code_format: 'numeric', # optional
device_code_duration: 60, # optional
default_scopes: [] # optional
default_scopes: [], # optional
installation_scopes: [] # optional
)
```
2 changes: 1 addition & 1 deletion docs/examples/project/update-session-duration-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ client = Client.new
project = Project.new(client)

result = project.update_session_duration_policy(
duration: 5
duration: 60
)
```
2 changes: 1 addition & 1 deletion docs/examples/project/update-user-limit-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ client = Client.new
project = Project.new(client)

result = project.update_user_limit_policy(
total: 1
total: 0
)
```
19 changes: 19 additions & 0 deletions docs/examples/proxy/create-invalidation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```ruby
require 'appwrite'

include Appwrite
include Appwrite::Enums

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

proxy = Proxy.new(client)

result = proxy.create_invalidation(
domain: '',
type: InvalidationType::TAG,
reference: '<REFERENCE>' # optional
)
```
3 changes: 2 additions & 1 deletion docs/examples/storage/create-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ result = storage.create_file(
bucket_id: '<BUCKET_ID>',
file_id: '<FILE_ID>',
file: InputFile.from_path('dir/file.png'),
permissions: [Permission.read(Role.any())] # optional
permissions: [Permission.read(Role.any())], # optional
folder: '' # optional
)
```
18 changes: 18 additions & 0 deletions docs/examples/tablesdb/create-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.create_migration(
database_id: '<DATABASE_ID>',
specification: 's-1vcpu-1gb',
auto_cutover: false # optional
)
```
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ result = tables_db.create(
name: '<NAME>',
enabled: false, # optional
specification: 'serverless', # optional
replicas: 0 # optional
replicas: 0, # optional
sync_mode: 'async' # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/tablesdb/cutover-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.cutover_migration(
database_id: '<DATABASE_ID>',
migration_id: '<MIGRATION_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/tablesdb/delete-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.delete_migration(
database_id: '<DATABASE_ID>',
migration_id: '<MIGRATION_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/tablesdb/get-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.get_migration(
database_id: '<DATABASE_ID>',
migration_id: '<MIGRATION_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/tablesdb/list-migrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.list_migrations(
database_id: '<DATABASE_ID>'
)
```
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/list-operations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

tables_db = TablesDB.new(client)

result = tables_db.list_operations(
database_id: '<DATABASE_ID>',
status: 'running', # optional
limit: 1, # optional
offset: 0 # optional
)
```
4 changes: 3 additions & 1 deletion docs/examples/tablesdb/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ result = tables_db.update(
database_id: '<DATABASE_ID>',
name: '<NAME>', # optional
enabled: false, # optional
replicas: 0 # optional
specification: 'serverless', # optional
replicas: 0, # optional
sync_mode: 'async' # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/users/get-mfa-challenge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

users = Users.new(client)

result = users.get_mfa_challenge(
user_id: '<USER_ID>',
challenge_id: '<CHALLENGE_ID>'
)
```
Loading