appwrite 13.0.1 → 13.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 204a8ccd072fd6ffc1646fa433866343a9af6a36253ff7ceff9f40173c0f01c7
4
- data.tar.gz: 14ee8bc80f69a8c4e0ad36fa27d1ee58b1a71ea41a3a98be71276fa68fa56a48
3
+ metadata.gz: 91db12572d18cd543bed7b608b76b1eb80007acead69427a1a90c13f13daf6f4
4
+ data.tar.gz: a33b3f44d258d6b3f22f67e95765199d2c22b1f9a0e1e7ef595088b61fe1a040
5
5
  SHA512:
6
- metadata.gz: 79f2553e43afcfbaa9a7afaaa647d95a733245a55a4b1f4adfc197af31e0c8975dfc2242ab3305ed24cc99f50f0664f4f888f28c1146425a3ed896779326edca
7
- data.tar.gz: e8cf14548158fa30eb56d0b5dd88c6d7b8623292e061c3d246522036350f87188c7c6ed08221e2947552b49ed46fc81b0e70b43ba865727db326e8e0348e57d0
6
+ metadata.gz: 884cc7aa2ed774b780cdd9904e09f5afe2fb942af27ad60c7134cc8ca6a8cf499b0f046149dea0a3eeaa2d57b218a3142a94b502970a5c95a79ae60b799e29b5
7
+ data.tar.gz: 6c987d2022ae499fc8e2421ccc349242477d572d4c946994a0c1221dd933f779b84bf36fd9b402ccd448eb2bede9bb5007a861c6bb87cd2f7e71bda3943ac0f9
@@ -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'=> '13.0.1',
18
+ 'x-sdk-version'=> '13.1.0',
19
19
  'X-Appwrite-Response-Format' => '1.6.0'
20
20
  }
21
21
  @endpoint = 'https://cloud.appwrite.io/v1'
@@ -0,0 +1,8 @@
1
+ module Appwrite
2
+ module Enums
3
+ module MessagePriority
4
+ NORMAL = 'normal'
5
+ HIGH = 'high'
6
+ end
7
+ end
8
+ end
@@ -59,6 +59,7 @@ module Appwrite
59
59
  BUN_1_1 = 'bun-1.1'
60
60
  GO_1_23 = 'go-1.23'
61
61
  STATIC_1 = 'static-1'
62
+ FLUTTER_3_24 = 'flutter-3.24'
62
63
  end
63
64
  end
64
65
  end
@@ -1206,9 +1206,7 @@ module Appwrite
1206
1206
  # [POST
1207
1207
  # /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
1208
1208
  # endpoint to complete the login process. The link sent to the user's email
1209
- # address is valid for 1 hour. If you are on a mobile device you can leave
1210
- # the URL parameter empty, so that the login completion will be handled by
1211
- # your Appwrite instance by default.
1209
+ # address is valid for 1 hour.
1212
1210
  #
1213
1211
  # A user is limited to 10 active sessions at a time by default. [Learn more
1214
1212
  # about session
@@ -156,33 +156,28 @@ module Appwrite
156
156
  # @param [Array] topics List of Topic IDs.
157
157
  # @param [Array] users List of User IDs.
158
158
  # @param [Array] targets List of Targets IDs.
159
- # @param [Hash] data Additional Data for push notification.
159
+ # @param [Hash] data Additional key-value pair data for push notification.
160
160
  # @param [String] action Action for push notification.
161
161
  # @param [String] image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
162
162
  # @param [String] icon Icon for push notification. Available only for Android and Web Platform.
163
- # @param [String] sound Sound for push notification. Available only for Android and IOS Platform.
163
+ # @param [String] sound Sound for push notification. Available only for Android and iOS Platform.
164
164
  # @param [String] color Color for push notification. Available only for Android Platform.
165
165
  # @param [String] tag Tag for push notification. Available only for Android Platform.
166
- # @param [String] badge Badge for push notification. Available only for IOS Platform.
166
+ # @param [Integer] badge Badge for push notification. Available only for iOS Platform.
167
167
  # @param [] draft Is message a draft
168
168
  # @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
169
+ # @param [] content_available If set to true, the notification will be delivered in the background. Available only for iOS Platform.
170
+ # @param [] critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
171
+ # @param [MessagePriority] priority Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.
169
172
  #
170
173
  # @return [Message]
171
- def create_push(message_id:, title:, body:, topics: nil, users: nil, targets: nil, data: nil, action: nil, image: nil, icon: nil, sound: nil, color: nil, tag: nil, badge: nil, draft: nil, scheduled_at: nil)
174
+ def create_push(message_id:, title: nil, body: nil, topics: nil, users: nil, targets: nil, data: nil, action: nil, image: nil, icon: nil, sound: nil, color: nil, tag: nil, badge: nil, draft: nil, scheduled_at: nil, content_available: nil, critical: nil, priority: nil)
172
175
  api_path = '/messaging/messages/push'
173
176
 
174
177
  if message_id.nil?
175
178
  raise Appwrite::Exception.new('Missing required parameter: "messageId"')
176
179
  end
177
180
 
178
- if title.nil?
179
- raise Appwrite::Exception.new('Missing required parameter: "title"')
180
- end
181
-
182
- if body.nil?
183
- raise Appwrite::Exception.new('Missing required parameter: "body"')
184
- end
185
-
186
181
  api_params = {
187
182
  messageId: message_id,
188
183
  title: title,
@@ -200,6 +195,9 @@ module Appwrite
200
195
  badge: badge,
201
196
  draft: draft,
202
197
  scheduledAt: scheduled_at,
198
+ contentAvailable: content_available,
199
+ critical: critical,
200
+ priority: priority,
203
201
  }
204
202
 
205
203
  api_headers = {
@@ -235,9 +233,12 @@ module Appwrite
235
233
  # @param [Integer] badge Badge for push notification. Available only for iOS platforms.
236
234
  # @param [] draft Is message a draft
237
235
  # @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
236
+ # @param [] content_available If set to true, the notification will be delivered in the background. Available only for iOS Platform.
237
+ # @param [] critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
238
+ # @param [MessagePriority] priority Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.
238
239
  #
239
240
  # @return [Message]
240
- def update_push(message_id:, topics: nil, users: nil, targets: nil, title: nil, body: nil, data: nil, action: nil, image: nil, icon: nil, sound: nil, color: nil, tag: nil, badge: nil, draft: nil, scheduled_at: nil)
241
+ def update_push(message_id:, topics: nil, users: nil, targets: nil, title: nil, body: nil, data: nil, action: nil, image: nil, icon: nil, sound: nil, color: nil, tag: nil, badge: nil, draft: nil, scheduled_at: nil, content_available: nil, critical: nil, priority: nil)
241
242
  api_path = '/messaging/messages/push/{messageId}'
242
243
  .gsub('{messageId}', message_id)
243
244
 
@@ -261,6 +262,9 @@ module Appwrite
261
262
  badge: badge,
262
263
  draft: draft,
263
264
  scheduledAt: scheduled_at,
265
+ contentAvailable: content_available,
266
+ critical: critical,
267
+ priority: priority,
264
268
  }
265
269
 
266
270
  api_headers = {
data/lib/appwrite.rb CHANGED
@@ -116,6 +116,7 @@ require_relative 'appwrite/enums/index_type'
116
116
  require_relative 'appwrite/enums/runtime'
117
117
  require_relative 'appwrite/enums/execution_method'
118
118
  require_relative 'appwrite/enums/name'
119
+ require_relative 'appwrite/enums/message_priority'
119
120
  require_relative 'appwrite/enums/smtp_encryption'
120
121
  require_relative 'appwrite/enums/compression'
121
122
  require_relative 'appwrite/enums/image_gravity'
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: 13.0.1
4
+ version: 13.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appwrite Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-19 00:00:00.000000000 Z
11
+ date: 2025-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.4.1
27
- description:
27
+ description:
28
28
  email: team@appwrite.io
29
29
  executables: []
30
30
  extensions: []
@@ -42,6 +42,7 @@ files:
42
42
  - lib/appwrite/enums/image_format.rb
43
43
  - lib/appwrite/enums/image_gravity.rb
44
44
  - lib/appwrite/enums/index_type.rb
45
+ - lib/appwrite/enums/message_priority.rb
45
46
  - lib/appwrite/enums/messaging_provider_type.rb
46
47
  - lib/appwrite/enums/name.rb
47
48
  - lib/appwrite/enums/o_auth_provider.rb
@@ -163,7 +164,7 @@ homepage: https://appwrite.io/support
163
164
  licenses:
164
165
  - BSD-3-Clause
165
166
  metadata: {}
166
- post_install_message:
167
+ post_install_message:
167
168
  rdoc_options: []
168
169
  require_paths:
169
170
  - lib
@@ -179,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
180
  version: '0'
180
181
  requirements: []
181
182
  rubygems_version: 3.1.6
182
- signing_key:
183
+ signing_key:
183
184
  specification_version: 4
184
185
  summary: Appwrite is an open-source self-hosted backend server that abstract and simplify
185
186
  complex and repetitive development tasks behind a very simple REST API