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 +4 -4
- data/lib/appwrite/client.rb +1 -1
- data/lib/appwrite/enums/message_priority.rb +8 -0
- data/lib/appwrite/enums/runtime.rb +1 -0
- data/lib/appwrite/services/account.rb +1 -3
- data/lib/appwrite/services/messaging.rb +17 -13
- data/lib/appwrite.rb +1 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91db12572d18cd543bed7b608b76b1eb80007acead69427a1a90c13f13daf6f4
|
4
|
+
data.tar.gz: a33b3f44d258d6b3f22f67e95765199d2c22b1f9a0e1e7ef595088b61fe1a040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 884cc7aa2ed774b780cdd9904e09f5afe2fb942af27ad60c7134cc8ca6a8cf499b0f046149dea0a3eeaa2d57b218a3142a94b502970a5c95a79ae60b799e29b5
|
7
|
+
data.tar.gz: 6c987d2022ae499fc8e2421ccc349242477d572d4c946994a0c1221dd933f779b84bf36fd9b402ccd448eb2bede9bb5007a861c6bb87cd2f7e71bda3943ac0f9
|
data/lib/appwrite/client.rb
CHANGED
@@ -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.
|
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
|
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
|
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 [
|
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
|
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
|
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:
|
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
|