appwrite 21.0.1 → 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2831d24a130794405e14b086fdf2e8b6809fe5c6b7f2d623cdda1f0a9b78ce5c
4
- data.tar.gz: bd9b24a029d07266b9261c9c81a303a2f551003701f7e555df6b967bc812bd29
3
+ metadata.gz: f7d65feccf5827c513e9c2975c3192a9c08538beb3369c13f4cc8687a524df35
4
+ data.tar.gz: 9067bd506e5b7ae9e4050c327a7c669c842b29a46b063a53a434f11923aa9bf3
5
5
  SHA512:
6
- metadata.gz: 36ed7dcef5420cb85867beb857dadb513f30840f02caef461872237033ae2354d82bbfeb29021603aae3baca49685af8c47be338c2f0243cd255bf672f94b3b0
7
- data.tar.gz: 3f78df9b7dc7deebaf66b4f5ddfb7356107454ef4d739dd3135abbd6b09a530ea496e5221633b852deaf36e87f9736a2301394d0cf42f9d8db4ca003a8426054
6
+ metadata.gz: 3bb093f2cf13c12960eae3682a0f9c7293a30217636f1ee9baa9b6d5a67739b18df5111a24b9bdfac7fcaa6e8ec1281e67e90e2c910f1a94a581673f42ff7322
7
+ data.tar.gz: a466eed8fc575662941dcaa7535514ea78111b026bd65bce6d1772a1766bee11963f4cf396b2330e7fb95a11d40549118e236790ab69086e37f28569cdd061e2
@@ -15,7 +15,7 @@ module Appwrite
15
15
  'x-sdk-name'=> 'Ruby',
16
16
  'x-sdk-platform'=> 'server',
17
17
  'x-sdk-language'=> 'ruby',
18
- 'x-sdk-version'=> '21.0.1',
18
+ 'x-sdk-version'=> '21.1.0',
19
19
  'X-Appwrite-Response-Format' => '1.8.0'
20
20
  }
21
21
  @endpoint = 'https://cloud.appwrite.io/v1'
@@ -614,7 +614,7 @@ module Appwrite
614
614
  #
615
615
  #
616
616
  # @param [String] database_id Database ID.
617
- # @param [String] collection_id Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
617
+ # @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
618
618
  # @param [String] key Attribute Key.
619
619
  # @param [] required Is attribute required?
620
620
  # @param [] default Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -2043,6 +2043,56 @@ module Appwrite
2043
2043
  )
2044
2044
  end
2045
2045
 
2046
+ #
2047
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
2048
+ #
2049
+ # Update relationship attribute. [Learn more about relationship
2050
+ # attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
2051
+ #
2052
+ #
2053
+ # @param [String] database_id Database ID.
2054
+ # @param [String] collection_id Collection ID.
2055
+ # @param [String] key Attribute Key.
2056
+ # @param [RelationMutate] on_delete Constraints option
2057
+ # @param [String] new_key New Attribute Key.
2058
+ #
2059
+ # @return [AttributeRelationship]
2060
+ def update_relationship_attribute(database_id:, collection_id:, key:, on_delete: nil, new_key: nil)
2061
+ api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'
2062
+ .gsub('{databaseId}', database_id)
2063
+ .gsub('{collectionId}', collection_id)
2064
+ .gsub('{key}', key)
2065
+
2066
+ if database_id.nil?
2067
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
2068
+ end
2069
+
2070
+ if collection_id.nil?
2071
+ raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
2072
+ end
2073
+
2074
+ if key.nil?
2075
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
2076
+ end
2077
+
2078
+ api_params = {
2079
+ onDelete: on_delete,
2080
+ newKey: new_key,
2081
+ }
2082
+
2083
+ api_headers = {
2084
+ "content-type": 'application/json',
2085
+ }
2086
+
2087
+ @client.call(
2088
+ method: 'PATCH',
2089
+ path: api_path,
2090
+ headers: api_headers,
2091
+ params: api_params,
2092
+ response_type: Models::AttributeRelationship
2093
+ )
2094
+ end
2095
+
2046
2096
  #
2047
2097
  # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
2048
2098
  #
@@ -2599,56 +2649,6 @@ module Appwrite
2599
2649
  )
2600
2650
  end
2601
2651
 
2602
- #
2603
- # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
2604
- #
2605
- # Update relationship attribute. [Learn more about relationship
2606
- # attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
2607
- #
2608
- #
2609
- # @param [String] database_id Database ID.
2610
- # @param [String] collection_id Collection ID.
2611
- # @param [String] key Attribute Key.
2612
- # @param [RelationMutate] on_delete Constraints option
2613
- # @param [String] new_key New Attribute Key.
2614
- #
2615
- # @return [AttributeRelationship]
2616
- def update_relationship_attribute(database_id:, collection_id:, key:, on_delete: nil, new_key: nil)
2617
- api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'
2618
- .gsub('{databaseId}', database_id)
2619
- .gsub('{collectionId}', collection_id)
2620
- .gsub('{key}', key)
2621
-
2622
- if database_id.nil?
2623
- raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
2624
- end
2625
-
2626
- if collection_id.nil?
2627
- raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
2628
- end
2629
-
2630
- if key.nil?
2631
- raise Appwrite::Exception.new('Missing required parameter: "key"')
2632
- end
2633
-
2634
- api_params = {
2635
- onDelete: on_delete,
2636
- newKey: new_key,
2637
- }
2638
-
2639
- api_headers = {
2640
- "content-type": 'application/json',
2641
- }
2642
-
2643
- @client.call(
2644
- method: 'PATCH',
2645
- path: api_path,
2646
- headers: api_headers,
2647
- params: api_params,
2648
- response_type: Models::AttributeRelationship
2649
- )
2650
- end
2651
-
2652
2652
  #
2653
2653
  # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
2654
2654
  #
@@ -2660,9 +2660,10 @@ module Appwrite
2660
2660
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
2661
2661
  # @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
2662
2662
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
2663
+ # @param [Integer] ttl TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
2663
2664
  #
2664
2665
  # @return [DocumentList]
2665
- def list_documents(database_id:, collection_id:, queries: nil, transaction_id: nil, total: nil)
2666
+ def list_documents(database_id:, collection_id:, queries: nil, transaction_id: nil, total: nil, ttl: nil)
2666
2667
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
2667
2668
  .gsub('{databaseId}', database_id)
2668
2669
  .gsub('{collectionId}', collection_id)
@@ -2679,6 +2680,7 @@ module Appwrite
2679
2680
  queries: queries,
2680
2681
  transactionId: transaction_id,
2681
2682
  total: total,
2683
+ ttl: ttl,
2682
2684
  }
2683
2685
 
2684
2686
  api_headers = {
@@ -98,6 +98,34 @@ module Appwrite
98
98
  )
99
99
  end
100
100
 
101
+ # Get console pausing health status. Monitors projects approaching the pause
102
+ # threshold to detect potential issues with console access tracking.
103
+ #
104
+ #
105
+ # @param [Integer] threshold Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
106
+ # @param [Integer] inactivity_days Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
107
+ #
108
+ # @return [HealthStatus]
109
+ def get_console_pausing(threshold: nil, inactivity_days: nil)
110
+ api_path = '/health/console-pausing'
111
+
112
+ api_params = {
113
+ threshold: threshold,
114
+ inactivityDays: inactivity_days,
115
+ }
116
+
117
+ api_headers = {
118
+ }
119
+
120
+ @client.call(
121
+ method: 'GET',
122
+ path: api_path,
123
+ headers: api_headers,
124
+ params: api_params,
125
+ response_type: Models::HealthStatus
126
+ )
127
+ end
128
+
101
129
  # Check the Appwrite database servers are up and connection is successful.
102
130
  #
103
131
  #
@@ -1802,7 +1802,7 @@ module Appwrite
1802
1802
  # Get a list of all subscribers from the current Appwrite project.
1803
1803
  #
1804
1804
  # @param [String] topic_id Topic ID. The topic ID subscribed to.
1805
- # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
1805
+ # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType
1806
1806
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
1807
1807
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1808
1808
  #
@@ -360,13 +360,13 @@ module Appwrite
360
360
  #
361
361
  # @param [String] site_id Site ID.
362
362
  # @param [file] code Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
363
- # @param [] activate Automatically activate the deployment when it is finished building.
364
363
  # @param [String] install_command Install Commands.
365
364
  # @param [String] build_command Build Commands.
366
365
  # @param [String] output_directory Output Directory.
366
+ # @param [] activate Automatically activate the deployment when it is finished building.
367
367
  #
368
368
  # @return [Deployment]
369
- def create_deployment(site_id:, code:, activate:, install_command: nil, build_command: nil, output_directory: nil, on_progress: nil)
369
+ def create_deployment(site_id:, code:, install_command: nil, build_command: nil, output_directory: nil, activate: nil, on_progress: nil)
370
370
  api_path = '/sites/{siteId}/deployments'
371
371
  .gsub('{siteId}', site_id)
372
372
 
@@ -378,10 +378,6 @@ module Appwrite
378
378
  raise Appwrite::Exception.new('Missing required parameter: "code"')
379
379
  end
380
380
 
381
- if activate.nil?
382
- raise Appwrite::Exception.new('Missing required parameter: "activate"')
383
- end
384
-
385
381
  api_params = {
386
382
  installCommand: install_command,
387
383
  buildCommand: build_command,
@@ -2722,9 +2722,10 @@ module Appwrite
2722
2722
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
2723
2723
  # @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
2724
2724
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
2725
+ # @param [Integer] ttl TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
2725
2726
  #
2726
2727
  # @return [RowList]
2727
- def list_rows(database_id:, table_id:, queries: nil, transaction_id: nil, total: nil)
2728
+ def list_rows(database_id:, table_id:, queries: nil, transaction_id: nil, total: nil, ttl: nil)
2728
2729
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
2729
2730
  .gsub('{databaseId}', database_id)
2730
2731
  .gsub('{tableId}', table_id)
@@ -2741,6 +2742,7 @@ module Appwrite
2741
2742
  queries: queries,
2742
2743
  transactionId: transaction_id,
2743
2744
  total: total,
2745
+ ttl: ttl,
2744
2746
  }
2745
2747
 
2746
2748
  api_headers = {
@@ -226,7 +226,7 @@ module Appwrite
226
226
  #
227
227
  #
228
228
  # @param [String] team_id Team ID.
229
- # @param [Array] roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
229
+ # @param [Array] roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
230
230
  # @param [String] email Email of the new team member.
231
231
  # @param [String] user_id ID of the user to be added to a team.
232
232
  # @param [String] phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
@@ -311,7 +311,7 @@ module Appwrite
311
311
  #
312
312
  # @param [String] team_id Team ID.
313
313
  # @param [String] membership_id Membership ID.
314
- # @param [Array] roles An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
314
+ # @param [Array] roles An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
315
315
  #
316
316
  # @return [Membership]
317
317
  def update_membership(team_id:, membership_id:, roles:)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appwrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.0.1
4
+ version: 21.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appwrite Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-19 00:00:00.000000000 Z
11
+ date: 2026-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types