appwrite 21.1.0 → 22.0.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: f7d65feccf5827c513e9c2975c3192a9c08538beb3369c13f4cc8687a524df35
4
- data.tar.gz: 9067bd506e5b7ae9e4050c327a7c669c842b29a46b063a53a434f11923aa9bf3
3
+ metadata.gz: 4f4a3d1bf31ce4e73601bc346a1e2d1607cc7660dab949aa3d7cdac1c5072901
4
+ data.tar.gz: ce5739e6bdaa5f4a39c0d29153772395ad51dd53fcedea2114eff17f14fe2d67
5
5
  SHA512:
6
- metadata.gz: 3bb093f2cf13c12960eae3682a0f9c7293a30217636f1ee9baa9b6d5a67739b18df5111a24b9bdfac7fcaa6e8ec1281e67e90e2c910f1a94a581673f42ff7322
7
- data.tar.gz: a466eed8fc575662941dcaa7535514ea78111b026bd65bce6d1772a1766bee11963f4cf396b2330e7fb95a11d40549118e236790ab69086e37f28569cdd061e2
6
+ metadata.gz: 0db71f51932537771194fc8595e4093ab39c694c57e3fe8672c785d8160b1899f94d2b253be40b0e808708edb3c460a6ba023f21fee1c94d181836f2502d80f5
7
+ data.tar.gz: 22a815abefa4ed7cd85442cf03c01fa5cae995f3e53b91f05bf4f87982bd318f6f18b0b79b24194fd8569858c26bb0455decc79d01121164bd005df0b79cdf4f
@@ -15,8 +15,8 @@ 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.1.0',
19
- 'X-Appwrite-Response-Format' => '1.8.0'
18
+ 'x-sdk-version'=> '22.0.0',
19
+ 'X-Appwrite-Response-Format' => '1.9.0'
20
20
  }
21
21
  @endpoint = 'https://cloud.appwrite.io/v1'
22
22
  end
@@ -97,6 +97,45 @@ module Appwrite
97
97
  self
98
98
  end
99
99
 
100
+ # Set ImpersonateUserId
101
+ #
102
+ # Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
103
+ #
104
+ # @param [String] value The value to set for the ImpersonateUserId header
105
+ #
106
+ # @return [self]
107
+ def set_impersonate_user_id(value)
108
+ add_header('x-appwrite-impersonate-user-id', value)
109
+
110
+ self
111
+ end
112
+
113
+ # Set ImpersonateUserEmail
114
+ #
115
+ # Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
116
+ #
117
+ # @param [String] value The value to set for the ImpersonateUserEmail header
118
+ #
119
+ # @return [self]
120
+ def set_impersonate_user_email(value)
121
+ add_header('x-appwrite-impersonate-user-email', value)
122
+
123
+ self
124
+ end
125
+
126
+ # Set ImpersonateUserPhone
127
+ #
128
+ # Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
129
+ #
130
+ # @param [String] value The value to set for the ImpersonateUserPhone header
131
+ #
132
+ # @return [self]
133
+ def set_impersonate_user_phone(value)
134
+ add_header('x-appwrite-impersonate-user-phone', value)
135
+
136
+ self
137
+ end
138
+
100
139
  # Set endpoint.
101
140
  #
102
141
  # @param [String] endpoint The endpoint to set
@@ -2,6 +2,9 @@ module Appwrite
2
2
  module Enums
3
3
  module BackupServices
4
4
  DATABASES = 'databases'
5
+ TABLESDB = 'tablesdb'
6
+ DOCUMENTSDB = 'documentsdb'
7
+ VECTORSDB = 'vectorsdb'
5
8
  FUNCTIONS = 'functions'
6
9
  STORAGE = 'storage'
7
10
  end
@@ -3,6 +3,8 @@ module Appwrite
3
3
  module DatabaseType
4
4
  LEGACY = 'legacy'
5
5
  TABLESDB = 'tablesdb'
6
+ DOCUMENTSDB = 'documentsdb'
7
+ VECTORSDB = 'vectorsdb'
6
8
  end
7
9
  end
8
10
  end
@@ -0,0 +1,10 @@
1
+ module Appwrite
2
+ module Enums
3
+ module DatabasesIndexType
4
+ KEY = 'key'
5
+ FULLTEXT = 'fulltext'
6
+ UNIQUE = 'unique'
7
+ SPATIAL = 'spatial'
8
+ end
9
+ end
10
+ end
@@ -58,6 +58,10 @@ module Appwrite
58
58
  ASSISTANT_READ = 'assistant.read'
59
59
  TOKENS_READ = 'tokens.read'
60
60
  TOKENS_WRITE = 'tokens.write'
61
+ WEBHOOKS_READ = 'webhooks.read'
62
+ WEBHOOKS_WRITE = 'webhooks.write'
63
+ PROJECT_READ = 'project.read'
64
+ PROJECT_WRITE = 'project.write'
61
65
  POLICIES_WRITE = 'policies.write'
62
66
  POLICIES_READ = 'policies.read'
63
67
  ARCHIVES_READ = 'archives.read'
@@ -1,6 +1,6 @@
1
1
  module Appwrite
2
2
  module Enums
3
- module IndexType
3
+ module TablesDBIndexType
4
4
  KEY = 'key'
5
5
  FULLTEXT = 'fulltext'
6
6
  UNIQUE = 'unique'
@@ -1,8 +1,8 @@
1
1
  module Appwrite
2
2
  module Enums
3
3
  module TemplateReferenceType
4
- BRANCH = 'branch'
5
4
  COMMIT = 'commit'
5
+ BRANCH = 'branch'
6
6
  TAG = 'tag'
7
7
  end
8
8
  end
@@ -64,6 +64,8 @@ module Appwrite
64
64
  valid_type = [
65
65
  Appwrite::Enums::DatabaseType::LEGACY,
66
66
  Appwrite::Enums::DatabaseType::TABLESDB,
67
+ Appwrite::Enums::DatabaseType::DOCUMENTSDB,
68
+ Appwrite::Enums::DatabaseType::VECTORSDB,
67
69
  ]
68
70
 
69
71
  unless valid_type.include?(type)
@@ -12,6 +12,7 @@ module Appwrite
12
12
  attr_reader :live
13
13
  attr_reader :logging
14
14
  attr_reader :runtime
15
+ attr_reader :deployment_retention
15
16
  attr_reader :deployment_id
16
17
  attr_reader :deployment_created_at
17
18
  attr_reader :latest_deployment_id
@@ -30,7 +31,8 @@ module Appwrite
30
31
  attr_reader :provider_branch
31
32
  attr_reader :provider_root_directory
32
33
  attr_reader :provider_silent_mode
33
- attr_reader :specification
34
+ attr_reader :build_specification
35
+ attr_reader :runtime_specification
34
36
 
35
37
  def initialize(
36
38
  id:,
@@ -42,6 +44,7 @@ module Appwrite
42
44
  live:,
43
45
  logging:,
44
46
  runtime:,
47
+ deployment_retention:,
45
48
  deployment_id:,
46
49
  deployment_created_at:,
47
50
  latest_deployment_id:,
@@ -60,7 +63,8 @@ module Appwrite
60
63
  provider_branch:,
61
64
  provider_root_directory:,
62
65
  provider_silent_mode:,
63
- specification:
66
+ build_specification:,
67
+ runtime_specification:
64
68
  )
65
69
  @id = id
66
70
  @created_at = created_at
@@ -71,6 +75,7 @@ module Appwrite
71
75
  @live = live
72
76
  @logging = logging
73
77
  @runtime = runtime
78
+ @deployment_retention = deployment_retention
74
79
  @deployment_id = deployment_id
75
80
  @deployment_created_at = deployment_created_at
76
81
  @latest_deployment_id = latest_deployment_id
@@ -89,7 +94,8 @@ module Appwrite
89
94
  @provider_branch = provider_branch
90
95
  @provider_root_directory = provider_root_directory
91
96
  @provider_silent_mode = provider_silent_mode
92
- @specification = specification
97
+ @build_specification = build_specification
98
+ @runtime_specification = runtime_specification
93
99
  end
94
100
 
95
101
  def self.from(map:)
@@ -103,6 +109,7 @@ module Appwrite
103
109
  live: map["live"],
104
110
  logging: map["logging"],
105
111
  runtime: map["runtime"],
112
+ deployment_retention: map["deploymentRetention"],
106
113
  deployment_id: map["deploymentId"],
107
114
  deployment_created_at: map["deploymentCreatedAt"],
108
115
  latest_deployment_id: map["latestDeploymentId"],
@@ -121,7 +128,8 @@ module Appwrite
121
128
  provider_branch: map["providerBranch"],
122
129
  provider_root_directory: map["providerRootDirectory"],
123
130
  provider_silent_mode: map["providerSilentMode"],
124
- specification: map["specification"]
131
+ build_specification: map["buildSpecification"],
132
+ runtime_specification: map["runtimeSpecification"]
125
133
  )
126
134
  end
127
135
 
@@ -136,6 +144,7 @@ module Appwrite
136
144
  "live": @live,
137
145
  "logging": @logging,
138
146
  "runtime": @runtime,
147
+ "deploymentRetention": @deployment_retention,
139
148
  "deploymentId": @deployment_id,
140
149
  "deploymentCreatedAt": @deployment_created_at,
141
150
  "latestDeploymentId": @latest_deployment_id,
@@ -154,7 +163,8 @@ module Appwrite
154
163
  "providerBranch": @provider_branch,
155
164
  "providerRootDirectory": @provider_root_directory,
156
165
  "providerSilentMode": @provider_silent_mode,
157
- "specification": @specification
166
+ "buildSpecification": @build_specification,
167
+ "runtimeSpecification": @runtime_specification
158
168
  }
159
169
  end
160
170
  end
@@ -11,6 +11,7 @@ module Appwrite
11
11
  attr_reader :live
12
12
  attr_reader :logging
13
13
  attr_reader :framework
14
+ attr_reader :deployment_retention
14
15
  attr_reader :deployment_id
15
16
  attr_reader :deployment_created_at
16
17
  attr_reader :deployment_screenshot_light
@@ -22,13 +23,15 @@ module Appwrite
22
23
  attr_reader :timeout
23
24
  attr_reader :install_command
24
25
  attr_reader :build_command
26
+ attr_reader :start_command
25
27
  attr_reader :output_directory
26
28
  attr_reader :installation_id
27
29
  attr_reader :provider_repository_id
28
30
  attr_reader :provider_branch
29
31
  attr_reader :provider_root_directory
30
32
  attr_reader :provider_silent_mode
31
- attr_reader :specification
33
+ attr_reader :build_specification
34
+ attr_reader :runtime_specification
32
35
  attr_reader :build_runtime
33
36
  attr_reader :adapter
34
37
  attr_reader :fallback_file
@@ -42,6 +45,7 @@ module Appwrite
42
45
  live:,
43
46
  logging:,
44
47
  framework:,
48
+ deployment_retention:,
45
49
  deployment_id:,
46
50
  deployment_created_at:,
47
51
  deployment_screenshot_light:,
@@ -53,13 +57,15 @@ module Appwrite
53
57
  timeout:,
54
58
  install_command:,
55
59
  build_command:,
60
+ start_command:,
56
61
  output_directory:,
57
62
  installation_id:,
58
63
  provider_repository_id:,
59
64
  provider_branch:,
60
65
  provider_root_directory:,
61
66
  provider_silent_mode:,
62
- specification:,
67
+ build_specification:,
68
+ runtime_specification:,
63
69
  build_runtime:,
64
70
  adapter:,
65
71
  fallback_file:
@@ -72,6 +78,7 @@ module Appwrite
72
78
  @live = live
73
79
  @logging = logging
74
80
  @framework = framework
81
+ @deployment_retention = deployment_retention
75
82
  @deployment_id = deployment_id
76
83
  @deployment_created_at = deployment_created_at
77
84
  @deployment_screenshot_light = deployment_screenshot_light
@@ -83,13 +90,15 @@ module Appwrite
83
90
  @timeout = timeout
84
91
  @install_command = install_command
85
92
  @build_command = build_command
93
+ @start_command = start_command
86
94
  @output_directory = output_directory
87
95
  @installation_id = installation_id
88
96
  @provider_repository_id = provider_repository_id
89
97
  @provider_branch = provider_branch
90
98
  @provider_root_directory = provider_root_directory
91
99
  @provider_silent_mode = provider_silent_mode
92
- @specification = specification
100
+ @build_specification = build_specification
101
+ @runtime_specification = runtime_specification
93
102
  @build_runtime = build_runtime
94
103
  @adapter = adapter
95
104
  @fallback_file = fallback_file
@@ -105,6 +114,7 @@ module Appwrite
105
114
  live: map["live"],
106
115
  logging: map["logging"],
107
116
  framework: map["framework"],
117
+ deployment_retention: map["deploymentRetention"],
108
118
  deployment_id: map["deploymentId"],
109
119
  deployment_created_at: map["deploymentCreatedAt"],
110
120
  deployment_screenshot_light: map["deploymentScreenshotLight"],
@@ -116,13 +126,15 @@ module Appwrite
116
126
  timeout: map["timeout"],
117
127
  install_command: map["installCommand"],
118
128
  build_command: map["buildCommand"],
129
+ start_command: map["startCommand"],
119
130
  output_directory: map["outputDirectory"],
120
131
  installation_id: map["installationId"],
121
132
  provider_repository_id: map["providerRepositoryId"],
122
133
  provider_branch: map["providerBranch"],
123
134
  provider_root_directory: map["providerRootDirectory"],
124
135
  provider_silent_mode: map["providerSilentMode"],
125
- specification: map["specification"],
136
+ build_specification: map["buildSpecification"],
137
+ runtime_specification: map["runtimeSpecification"],
126
138
  build_runtime: map["buildRuntime"],
127
139
  adapter: map["adapter"],
128
140
  fallback_file: map["fallbackFile"]
@@ -139,6 +151,7 @@ module Appwrite
139
151
  "live": @live,
140
152
  "logging": @logging,
141
153
  "framework": @framework,
154
+ "deploymentRetention": @deployment_retention,
142
155
  "deploymentId": @deployment_id,
143
156
  "deploymentCreatedAt": @deployment_created_at,
144
157
  "deploymentScreenshotLight": @deployment_screenshot_light,
@@ -150,13 +163,15 @@ module Appwrite
150
163
  "timeout": @timeout,
151
164
  "installCommand": @install_command,
152
165
  "buildCommand": @build_command,
166
+ "startCommand": @start_command,
153
167
  "outputDirectory": @output_directory,
154
168
  "installationId": @installation_id,
155
169
  "providerRepositoryId": @provider_repository_id,
156
170
  "providerBranch": @provider_branch,
157
171
  "providerRootDirectory": @provider_root_directory,
158
172
  "providerSilentMode": @provider_silent_mode,
159
- "specification": @specification,
173
+ "buildSpecification": @build_specification,
174
+ "runtimeSpecification": @runtime_specification,
160
175
  "buildRuntime": @build_runtime,
161
176
  "adapter": @adapter,
162
177
  "fallbackFile": @fallback_file
@@ -22,6 +22,8 @@ module Appwrite
22
22
  attr_reader :prefs
23
23
  attr_reader :targets
24
24
  attr_reader :accessed_at
25
+ attr_reader :impersonator
26
+ attr_reader :impersonator_user_id
25
27
 
26
28
  def initialize(
27
29
  id:,
@@ -42,7 +44,9 @@ module Appwrite
42
44
  mfa:,
43
45
  prefs:,
44
46
  targets:,
45
- accessed_at:
47
+ accessed_at:,
48
+ impersonator: ,
49
+ impersonator_user_id:
46
50
  )
47
51
  @id = id
48
52
  @created_at = created_at
@@ -63,6 +67,8 @@ module Appwrite
63
67
  @prefs = prefs
64
68
  @targets = targets
65
69
  @accessed_at = accessed_at
70
+ @impersonator = impersonator
71
+ @impersonator_user_id = impersonator_user_id
66
72
  end
67
73
 
68
74
  def self.from(map:)
@@ -85,7 +91,9 @@ module Appwrite
85
91
  mfa: map["mfa"],
86
92
  prefs: Preferences.from(map: map["prefs"]),
87
93
  targets: map["targets"].map { |it| Target.from(map: it) },
88
- accessed_at: map["accessedAt"]
94
+ accessed_at: map["accessedAt"],
95
+ impersonator: map["impersonator"],
96
+ impersonator_user_id: map["impersonatorUserId"]
89
97
  )
90
98
  end
91
99
 
@@ -109,7 +117,9 @@ module Appwrite
109
117
  "mfa": @mfa,
110
118
  "prefs": @prefs.to_map,
111
119
  "targets": @targets.map { |it| it.to_map },
112
- "accessedAt": @accessed_at
120
+ "accessedAt": @accessed_at,
121
+ "impersonator": @impersonator,
122
+ "impersonatorUserId": @impersonator_user_id
113
123
  }
114
124
  end
115
125
  end
@@ -0,0 +1,87 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Webhook
6
+ attr_reader :id
7
+ attr_reader :created_at
8
+ attr_reader :updated_at
9
+ attr_reader :name
10
+ attr_reader :url
11
+ attr_reader :events
12
+ attr_reader :security
13
+ attr_reader :http_user
14
+ attr_reader :http_pass
15
+ attr_reader :signature_key
16
+ attr_reader :enabled
17
+ attr_reader :logs
18
+ attr_reader :attempts
19
+
20
+ def initialize(
21
+ id:,
22
+ created_at:,
23
+ updated_at:,
24
+ name:,
25
+ url:,
26
+ events:,
27
+ security:,
28
+ http_user:,
29
+ http_pass:,
30
+ signature_key:,
31
+ enabled:,
32
+ logs:,
33
+ attempts:
34
+ )
35
+ @id = id
36
+ @created_at = created_at
37
+ @updated_at = updated_at
38
+ @name = name
39
+ @url = url
40
+ @events = events
41
+ @security = security
42
+ @http_user = http_user
43
+ @http_pass = http_pass
44
+ @signature_key = signature_key
45
+ @enabled = enabled
46
+ @logs = logs
47
+ @attempts = attempts
48
+ end
49
+
50
+ def self.from(map:)
51
+ Webhook.new(
52
+ id: map["$id"],
53
+ created_at: map["$createdAt"],
54
+ updated_at: map["$updatedAt"],
55
+ name: map["name"],
56
+ url: map["url"],
57
+ events: map["events"],
58
+ security: map["security"],
59
+ http_user: map["httpUser"],
60
+ http_pass: map["httpPass"],
61
+ signature_key: map["signatureKey"],
62
+ enabled: map["enabled"],
63
+ logs: map["logs"],
64
+ attempts: map["attempts"]
65
+ )
66
+ end
67
+
68
+ def to_map
69
+ {
70
+ "$id": @id,
71
+ "$createdAt": @created_at,
72
+ "$updatedAt": @updated_at,
73
+ "name": @name,
74
+ "url": @url,
75
+ "events": @events,
76
+ "security": @security,
77
+ "httpUser": @http_user,
78
+ "httpPass": @http_pass,
79
+ "signatureKey": @signature_key,
80
+ "enabled": @enabled,
81
+ "logs": @logs,
82
+ "attempts": @attempts
83
+ }
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class WebhookList
6
+ attr_reader :total
7
+ attr_reader :webhooks
8
+
9
+ def initialize(
10
+ total:,
11
+ webhooks:
12
+ )
13
+ @total = total
14
+ @webhooks = webhooks
15
+ end
16
+
17
+ def self.from(map:)
18
+ WebhookList.new(
19
+ total: map["total"],
20
+ webhooks: map["webhooks"].map { |it| Webhook.from(map: it) }
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "total": @total,
27
+ "webhooks": @webhooks.map { |it| it.to_map }
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -3300,7 +3300,7 @@ module Appwrite
3300
3300
  # @param [String] database_id Database ID.
3301
3301
  # @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).
3302
3302
  # @param [String] key Index Key.
3303
- # @param [IndexType] type Index type.
3303
+ # @param [DatabasesIndexType] type Index type.
3304
3304
  # @param [Array] attributes Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
3305
3305
  # @param [Array] orders Array of index orders. Maximum of 100 orders are allowed.
3306
3306
  # @param [Array] lengths Length of index. Maximum of 100
@@ -58,10 +58,12 @@ module Appwrite
58
58
  # @param [String] provider_branch Production branch for the repo linked to the function.
59
59
  # @param [] provider_silent_mode Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
60
60
  # @param [String] provider_root_directory Path to function code in the linked repo.
61
- # @param [String] specification Runtime specification for the function and builds.
61
+ # @param [String] build_specification Build specification for the function deployments.
62
+ # @param [String] runtime_specification Runtime specification for the function executions.
63
+ # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
62
64
  #
63
65
  # @return [Function]
64
- def create(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, specification: nil)
66
+ def create(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
65
67
  api_path = '/functions'
66
68
 
67
69
  if function_id.nil?
@@ -94,7 +96,9 @@ module Appwrite
94
96
  providerBranch: provider_branch,
95
97
  providerSilentMode: provider_silent_mode,
96
98
  providerRootDirectory: provider_root_directory,
97
- specification: specification,
99
+ buildSpecification: build_specification,
100
+ runtimeSpecification: runtime_specification,
101
+ deploymentRetention: deployment_retention,
98
102
  }
99
103
 
100
104
  api_headers = {
@@ -201,10 +205,12 @@ module Appwrite
201
205
  # @param [String] provider_branch Production branch for the repo linked to the function
202
206
  # @param [] provider_silent_mode Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
203
207
  # @param [String] provider_root_directory Path to function code in the linked repo.
204
- # @param [String] specification Runtime specification for the function and builds.
208
+ # @param [String] build_specification Build specification for the function deployments.
209
+ # @param [String] runtime_specification Runtime specification for the function executions.
210
+ # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
205
211
  #
206
212
  # @return [Function]
207
- def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, specification: nil)
213
+ def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
208
214
  api_path = '/functions/{functionId}'
209
215
  .gsub('{functionId}', function_id)
210
216
 
@@ -233,7 +239,9 @@ module Appwrite
233
239
  providerBranch: provider_branch,
234
240
  providerSilentMode: provider_silent_mode,
235
241
  providerRootDirectory: provider_root_directory,
236
- specification: specification,
242
+ buildSpecification: build_specification,
243
+ runtimeSpecification: runtime_specification,
244
+ deploymentRetention: deployment_retention,
237
245
  }
238
246
 
239
247
  api_headers = {