Skip to content

Commit 131d2e6

Browse files
committed
Fixes for nested query parsing and MFA route authentication types
1 parent f181e11 commit 131d2e6

File tree

8 files changed

+12
-22
lines changed

8 files changed

+12
-22
lines changed

docs/examples/users/delete-authenticator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void main() { // Init SDK
77
client
88
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
10-
.setSession('') // The user session to authenticate with
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

1313
Future result = users.deleteAuthenticator(

docs/examples/users/list-providers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void main() { // Init SDK
77
client
88
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
10-
.setSession('') // The user session to authenticate with
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

1313
Future result = users.listProviders(

lib/src/models/message.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class Message implements Model {
2828
final Map<String, dynamic> data;
2929
/// Status of delivery.
3030
final String status;
31-
/// Message description.
32-
final String? description;
3331

3432
Message({
3533
required this.$id,
@@ -45,7 +43,6 @@ class Message implements Model {
4543
required this.deliveredTotal,
4644
required this.data,
4745
required this.status,
48-
this.description,
4946
});
5047

5148
factory Message.fromMap(Map<String, dynamic> map) {
@@ -63,7 +60,6 @@ class Message implements Model {
6360
deliveredTotal: map['deliveredTotal'],
6461
data: map['data'],
6562
status: map['status'].toString(),
66-
description: map['description']?.toString(),
6763
);
6864
}
6965

@@ -82,7 +78,6 @@ class Message implements Model {
8278
"deliveredTotal": deliveredTotal,
8379
"data": data,
8480
"status": status,
85-
"description": description,
8681
};
8782
}
8883
}

lib/src/models/session.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Session implements Model {
5353
/// Returns true if this the current user session.
5454
final bool current;
5555
/// Returns a list of active session factors.
56-
final int factors;
56+
final List factors;
5757
/// Secret used to authenticate the user. Only included if the request was made with an API key
5858
final String secret;
5959

lib/src/models/topic.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ class Topic implements Model {
1212
final String name;
1313
/// Total count of subscribers subscribed to topic.
1414
final int total;
15-
/// Description of the topic.
16-
final String? description;
1715

1816
Topic({
1917
required this.$id,
2018
required this.$createdAt,
2119
required this.$updatedAt,
2220
required this.name,
2321
required this.total,
24-
this.description,
2522
});
2623

2724
factory Topic.fromMap(Map<String, dynamic> map) {
@@ -31,7 +28,6 @@ class Topic implements Model {
3128
$updatedAt: map['\$updatedAt'].toString(),
3229
name: map['name'].toString(),
3330
total: map['total'],
34-
description: map['description']?.toString(),
3531
);
3632
}
3733

@@ -42,7 +38,6 @@ class Topic implements Model {
4238
"\$updatedAt": $updatedAt,
4339
"name": name,
4440
"total": total,
45-
"description": description,
4641
};
4742
}
4843
}

test/services/account_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ void main() {
641641
'countryCode': 'US',
642642
'countryName': 'United States',
643643
'current': true,
644-
'factors': 1,
644+
'factors': [],
645645
'secret': '5e5bb8c16897e',};
646646

647647

@@ -683,7 +683,7 @@ void main() {
683683
'countryCode': 'US',
684684
'countryName': 'United States',
685685
'current': true,
686-
'factors': 1,
686+
'factors': [],
687687
'secret': '5e5bb8c16897e',};
688688

689689

@@ -727,7 +727,7 @@ void main() {
727727
'countryCode': 'US',
728728
'countryName': 'United States',
729729
'current': true,
730-
'factors': 1,
730+
'factors': [],
731731
'secret': '5e5bb8c16897e',};
732732

733733

@@ -783,7 +783,7 @@ void main() {
783783
'countryCode': 'US',
784784
'countryName': 'United States',
785785
'current': true,
786-
'factors': 1,
786+
'factors': [],
787787
'secret': '5e5bb8c16897e',};
788788

789789

@@ -827,7 +827,7 @@ void main() {
827827
'countryCode': 'US',
828828
'countryName': 'United States',
829829
'current': true,
830-
'factors': 1,
830+
'factors': [],
831831
'secret': '5e5bb8c16897e',};
832832

833833

@@ -870,7 +870,7 @@ void main() {
870870
'countryCode': 'US',
871871
'countryName': 'United States',
872872
'current': true,
873-
'factors': 1,
873+
'factors': [],
874874
'secret': '5e5bb8c16897e',};
875875

876876

test/services/users_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ void main() {
805805
'countryCode': 'US',
806806
'countryName': 'United States',
807807
'current': true,
808-
'factors': 1,
808+
'factors': [],
809809
'secret': '5e5bb8c16897e',};
810810

811811

test/src/models/session_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void main() {
3131
countryCode: 'US',
3232
countryName: 'United States',
3333
current: true,
34-
factors: 1,
34+
factors: [],
3535
secret: '5e5bb8c16897e',
3636
);
3737

@@ -63,7 +63,7 @@ void main() {
6363
expect(result.countryCode, 'US');
6464
expect(result.countryName, 'United States');
6565
expect(result.current, true);
66-
expect(result.factors, 1);
66+
expect(result.factors, []);
6767
expect(result.secret, '5e5bb8c16897e');
6868
});
6969
});

0 commit comments

Comments
 (0)