appwrite 11.0.1 → 11.0.2

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: 0bca03eb7af675e72f241faee81443dd471831f3e7835c9f7bb32f83979a9266
4
- data.tar.gz: 14612cd69df877ead2f82c0e0e9c9eaf423b1f059d6221570a9a285bd2f91189
3
+ metadata.gz: 8e424b9f2d47290e383c32b18e244a3a49847d6f65c4d208336271dd8c84cd66
4
+ data.tar.gz: 5472a16fc5f3c5b37ae116e73752aaf096804c9e06103003bf47f02d93e16b3b
5
5
  SHA512:
6
- metadata.gz: a5afccd0969e11345fb06bf9f6857624f98a852d1359a685fe659245d490ff7a03351747b37173a9cb9030a326ee0b275c1ccee911c9cbc9509878c7c7479ac2
7
- data.tar.gz: 8083c9e4416972961fc58af0b7a5328b72fb7e3e67f792bef5c7b8a4e04fc3600ae2e6c007e2bdf7093f4418ca34321f00b82428ed4a5514ff8096a06588a90f
6
+ metadata.gz: 67c94728750e2116841b3f4292d00c40ab277e11a1083e58e5e813b5444953ce55ddfdd0873a782e03c9e3a2b1c16d8b2c74fbafe4b5c7b0f4990f923b376566
7
+ data.tar.gz: 0e6d5bcca03322aa2f6353695615a802e045018502fb65a6cbe0178d0a1f9ee038a9e1367c8017fa094dd841d9be80a86f30bfcfb7808ee8d840ec60000cc8bb
@@ -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'=> '11.0.1',
18
+ 'x-sdk-version'=> '11.0.2',
19
19
  'X-Appwrite-Response-Format' => '1.5.0'
20
20
  }
21
21
  @endpoint = 'https://cloud.appwrite.io/v1'
@@ -4,7 +4,7 @@ module Appwrite
4
4
  AMERICAN_EXPRESS = 'amex'
5
5
  ARGENCARD = 'argencard'
6
6
  CABAL = 'cabal'
7
- CONSOSUD = 'censosud'
7
+ CENCOSUD = 'cencosud'
8
8
  DINERS_CLUB = 'diners'
9
9
  DISCOVER = 'discover'
10
10
  ELO = 'elo'
@@ -142,6 +142,7 @@ module Appwrite
142
142
  PALAU = 'pw'
143
143
  PAPUA_NEW_GUINEA = 'pg'
144
144
  POLAND = 'pl'
145
+ FRENCH_POLYNESIA = 'pf'
145
146
  NORTH_KOREA = 'kp'
146
147
  PORTUGAL = 'pt'
147
148
  PARAGUAY = 'py'
@@ -20,6 +20,7 @@ module Appwrite
20
20
  PYTHON_3_10 = 'python-3.10'
21
21
  PYTHON_3_11 = 'python-3.11'
22
22
  PYTHON_3_12 = 'python-3.12'
23
+ PYTHON_ML_3_11 = 'python-ml-3.11'
23
24
  DENO_1_40 = 'deno-1.40'
24
25
  DART_2_15 = 'dart-2.15'
25
26
  DART_2_16 = 'dart-2.16'
@@ -6,22 +6,26 @@ module Appwrite
6
6
  attr_reader :totp
7
7
  attr_reader :phone
8
8
  attr_reader :email
9
+ attr_reader :recovery_code
9
10
 
10
11
  def initialize(
11
12
  totp:,
12
13
  phone:,
13
- email:
14
+ email:,
15
+ recovery_code:
14
16
  )
15
17
  @totp = totp
16
18
  @phone = phone
17
19
  @email = email
20
+ @recovery_code = recovery_code
18
21
  end
19
22
 
20
23
  def self.from(map:)
21
24
  MfaFactors.new(
22
25
  totp: map["totp"],
23
26
  phone: map["phone"],
24
- email: map["email"]
27
+ email: map["email"],
28
+ recovery_code: map["recoveryCode"]
25
29
  )
26
30
  end
27
31
 
@@ -29,7 +33,8 @@ module Appwrite
29
33
  {
30
34
  "totp": @totp,
31
35
  "phone": @phone,
32
- "email": @email
36
+ "email": @email,
37
+ "recoveryCode": @recovery_code
33
38
  }
34
39
  end
35
40
  end
@@ -5,6 +5,7 @@ module Appwrite
5
5
  class Session
6
6
  attr_reader :id
7
7
  attr_reader :created_at
8
+ attr_reader :updated_at
8
9
  attr_reader :user_id
9
10
  attr_reader :expire
10
11
  attr_reader :provider
@@ -35,6 +36,7 @@ module Appwrite
35
36
  def initialize(
36
37
  id:,
37
38
  created_at:,
39
+ updated_at:,
38
40
  user_id:,
39
41
  expire:,
40
42
  provider:,
@@ -64,6 +66,7 @@ module Appwrite
64
66
  )
65
67
  @id = id
66
68
  @created_at = created_at
69
+ @updated_at = updated_at
67
70
  @user_id = user_id
68
71
  @expire = expire
69
72
  @provider = provider
@@ -96,6 +99,7 @@ module Appwrite
96
99
  Session.new(
97
100
  id: map["$id"],
98
101
  created_at: map["$createdAt"],
102
+ updated_at: map["$updatedAt"],
99
103
  user_id: map["userId"],
100
104
  expire: map["expire"],
101
105
  provider: map["provider"],
@@ -129,6 +133,7 @@ module Appwrite
129
133
  {
130
134
  "$id": @id,
131
135
  "$createdAt": @created_at,
136
+ "$updatedAt": @updated_at,
132
137
  "userId": @user_id,
133
138
  "expire": @expire,
134
139
  "provider": @provider,
@@ -266,7 +266,7 @@ module Appwrite
266
266
 
267
267
  # Add an authenticator app to be used as an MFA factor. Verify the
268
268
  # authenticator using the [verify
269
- # authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
269
+ # authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator)
270
270
  # method.
271
271
  #
272
272
  # @param [AuthenticatorType] type Type of authenticator. Must be `totp`
@@ -298,8 +298,8 @@ module Appwrite
298
298
 
299
299
 
300
300
  # Verify an authenticator app after adding it using the [add
301
- # authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
302
- # method.
301
+ # authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator)
302
+ # method. add
303
303
  #
304
304
  # @param [AuthenticatorType] type Type of authenticator.
305
305
  # @param [String] otp Valid verification token.
@@ -340,7 +340,7 @@ module Appwrite
340
340
  # @param [AuthenticatorType] type Type of authenticator.
341
341
  # @param [String] otp Valid verification token.
342
342
  #
343
- # @return [User]
343
+ # @return []
344
344
  def delete_mfa_authenticator(type:, otp:)
345
345
  api_path = '/account/mfa/authenticators/{type}'
346
346
  .gsub('{type}', type)
@@ -366,7 +366,6 @@ module Appwrite
366
366
  path: api_path,
367
367
  headers: api_headers,
368
368
  params: api_params,
369
- response_type: Models::User
370
369
  )
371
370
  end
372
371
 
@@ -61,7 +61,7 @@ module Appwrite
61
61
  # of image returned is 100x100px.
62
62
  #
63
63
  #
64
- # @param [CreditCard] code Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.
64
+ # @param [CreditCard] code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.
65
65
  # @param [Integer] width Image width. Pass an integer between 0 to 2000. Defaults to 100.
66
66
  # @param [Integer] height Image height. Pass an integer between 0 to 2000. Defaults to 100.
67
67
  # @param [Integer] quality Image quality. Pass an integer between 0 to 100. Defaults to 100.
@@ -45,7 +45,7 @@ module Appwrite
45
45
  # @param [Array] targets List of Targets IDs.
46
46
  # @param [Array] cc Array of target IDs to be added as CC.
47
47
  # @param [Array] bcc Array of target IDs to be added as BCC.
48
- # @param [Array] attachments Array of compound bucket IDs to file IDs to be attached to the email.
48
+ # @param [Array] attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
49
49
  # @param [] draft Is message a draft
50
50
  # @param [] html Is content of type HTML
51
51
  # @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.
@@ -109,9 +109,10 @@ module Appwrite
109
109
  # @param [Array] cc Array of target IDs to be added as CC.
110
110
  # @param [Array] bcc Array of target IDs to be added as BCC.
111
111
  # @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.
112
+ # @param [Array] attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
112
113
  #
113
114
  # @return [Message]
114
- def update_email(message_id:, topics: nil, users: nil, targets: nil, subject: nil, content: nil, draft: nil, html: nil, cc: nil, bcc: nil, scheduled_at: nil)
115
+ def update_email(message_id:, topics: nil, users: nil, targets: nil, subject: nil, content: nil, draft: nil, html: nil, cc: nil, bcc: nil, scheduled_at: nil, attachments: nil)
115
116
  api_path = '/messaging/messages/email/{messageId}'
116
117
  .gsub('{messageId}', message_id)
117
118
 
@@ -130,6 +131,7 @@ module Appwrite
130
131
  cc: cc,
131
132
  bcc: bcc,
132
133
  scheduledAt: scheduled_at,
134
+ attachments: attachments,
133
135
  }
134
136
 
135
137
  api_headers = {
@@ -156,7 +158,7 @@ module Appwrite
156
158
  # @param [Array] targets List of Targets IDs.
157
159
  # @param [Hash] data Additional Data for push notification.
158
160
  # @param [String] action Action for push notification.
159
- # @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.
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>.
160
162
  # @param [String] icon Icon for push notification. Available only for Android and Web Platform.
161
163
  # @param [String] sound Sound for push notification. Available only for Android and IOS Platform.
162
164
  # @param [String] color Color for push notification. Available only for Android Platform.
@@ -225,7 +227,7 @@ module Appwrite
225
227
  # @param [String] body Body for push notification.
226
228
  # @param [Hash] data Additional Data for push notification.
227
229
  # @param [String] action Action for push notification.
228
- # @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.
230
+ # @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>.
229
231
  # @param [String] icon Icon for push notification. Available only for Android and Web platforms.
230
232
  # @param [String] sound Sound for push notification. Available only for Android and iOS platforms.
231
233
  # @param [String] color Color for push notification. Available only for Android platforms.
@@ -1454,11 +1454,11 @@ module Appwrite
1454
1454
  end
1455
1455
 
1456
1456
 
1457
- # Returns a token with a secret key for creating a session. If the provided
1458
- # user ID has not be registered, a new user will be created. Use the returned
1459
- # user ID and secret and submit a request to the [PUT
1460
- # /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession)
1457
+ # Returns a token with a secret key for creating a session. Use the user ID
1458
+ # and secret and submit a request to the [PUT
1459
+ # /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
1461
1460
  # endpoint to complete the login process.
1461
+ #
1462
1462
  #
1463
1463
  # @param [String] user_id User ID.
1464
1464
  # @param [Integer] length Token length in characters. The default length is 6 characters
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: 11.0.1
4
+ version: 11.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appwrite Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-24 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types