Skip to content

Commit 0e6cf1b

Browse files
fix: string attribute class
1 parent 0829941 commit 0e6cf1b

11 files changed

+30
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-swift.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-0.12.0-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-0.12.1-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

Sources/Appwrite/Services/Account.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,9 @@ open class Account: Service {
272272
///
273273
/// Update Account Preferences
274274
///
275-
/// Update currently logged in user account preferences. You can pass only the
276-
/// specific settings you wish to update.
275+
/// Update currently logged in user account preferences. The object you pass is
276+
/// stored as is, and replaces any previous value. The maximum allowed prefs
277+
/// size is 64kB and throws error if exceeded.
277278
///
278279
/// @param Any prefs
279280
/// @throws Exception

Sources/Appwrite/Services/Users.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,9 @@ open class Users: Service {
393393
///
394394
/// Update User Preferences
395395
///
396-
/// Update the user preferences by its unique ID. You can pass only the
397-
/// specific settings you wish to update.
396+
/// Update the user preferences by its unique ID. The object you pass is stored
397+
/// as is, and replaces any previous value. The maximum allowed prefs size is
398+
/// 64kB and throws error if exceeded.
398399
///
399400
/// @param String userId
400401
/// @param Any prefs

Sources/AppwriteModels/AttributeBoolean.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public class AttributeBoolean {
2525
type: String,
2626
status: String,
2727
xrequired: Bool,
28-
array: Bool? = ,
29-
xdefault: Bool? =
28+
array: Bool?,
29+
xdefault: Bool?
3030
) {
3131
self.key = key
3232
self.type = type

Sources/AppwriteModels/AttributeEmail.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public class AttributeEmail {
2828
type: String,
2929
status: String,
3030
xrequired: Bool,
31-
array: Bool? = ,
31+
array: Bool?,
3232
format: String,
33-
xdefault: String? =
33+
xdefault: String?
3434
) {
3535
self.key = key
3636
self.type = type

Sources/AppwriteModels/AttributeEnum.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ public class AttributeEnum {
3131
type: String,
3232
status: String,
3333
xrequired: Bool,
34-
array: Bool? = ,
34+
array: Bool?,
3535
elements: [Any],
3636
format: String,
37-
xdefault: String? =
37+
xdefault: String?
3838
) {
3939
self.key = key
4040
self.type = type

Sources/AppwriteModels/AttributeFloat.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ public class AttributeFloat {
3131
type: String,
3232
status: String,
3333
xrequired: Bool,
34-
array: Bool? = ,
35-
min: Double? = ,
36-
max: Double? = ,
37-
xdefault: Double? =
34+
array: Bool?,
35+
min: Double?,
36+
max: Double?,
37+
xdefault: Double?
3838
) {
3939
self.key = key
4040
self.type = type

Sources/AppwriteModels/AttributeInteger.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ public class AttributeInteger {
3131
type: String,
3232
status: String,
3333
xrequired: Bool,
34-
array: Bool? = ,
35-
min: Int? = ,
36-
max: Int? = ,
37-
xdefault: Int? =
34+
array: Bool?,
35+
min: Int?,
36+
max: Int?,
37+
xdefault: Int?
3838
) {
3939
self.key = key
4040
self.type = type

Sources/AppwriteModels/AttributeIp.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public class AttributeIp {
2828
type: String,
2929
status: String,
3030
xrequired: Bool,
31-
array: Bool? = ,
31+
array: Bool?,
3232
format: String,
33-
xdefault: String? =
33+
xdefault: String?
3434
) {
3535
self.key = key
3636
self.type = type

Sources/AppwriteModels/AttributeString.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class AttributeString {
1818
public let array: Bool?
1919

2020
/// Attribute size.
21-
public let size: String
21+
public let size: Int
2222

2323
/// Default value for attribute when not provided. Cannot be set when attribute is required.
2424
public let xdefault: String?
@@ -28,9 +28,9 @@ public class AttributeString {
2828
type: String,
2929
status: String,
3030
xrequired: Bool,
31-
array: Bool? = ,
32-
size: String,
33-
xdefault: String? =
31+
array: Bool?,
32+
size: Int,
33+
xdefault: String?
3434
) {
3535
self.key = key
3636
self.type = type
@@ -48,7 +48,7 @@ public class AttributeString {
4848
status: map["status"] as! String,
4949
xrequired: map["required"] as! Bool,
5050
array: map["array"] as? Bool,
51-
size: map["size"] as! String,
51+
size: map["size"] as! Int,
5252
xdefault: map["default"] as? String
5353
)
5454
}

Sources/AppwriteModels/AttributeUrl.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public class AttributeUrl {
2828
type: String,
2929
status: String,
3030
xrequired: Bool,
31-
array: Bool? = ,
31+
array: Bool?,
3232
format: String,
33-
xdefault: String? =
33+
xdefault: String?
3434
) {
3535
self.key = key
3636
self.type = type

0 commit comments

Comments
 (0)