Skip to content

Commit 8005940

Browse files
committed
update verification response
1 parent 9de0582 commit 8005940

9 files changed

+62
-29
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ example/config.dart
2424

2525
.idea
2626

27+
.keystore.json

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.9
2+
3+
* update verification response
4+
15
## 1.2.8
26

37
* Fix code generation for `Asset` class.

example/pubspec.lock

+19-11
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ packages:
5353
dependency: transitive
5454
description:
5555
name: crypto
56-
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
56+
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "3.0.3"
59+
version: "3.0.5"
6060
dart_jsonwebtoken:
6161
dependency: transitive
6262
description:
@@ -77,18 +77,18 @@ packages:
7777
dependency: transitive
7878
description:
7979
name: dio
80-
sha256: e17f6b3097b8c51b72c74c9f071a605c47bcc8893839bd66732457a5ebe73714
80+
sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260"
8181
url: "https://pub.dev"
8282
source: hosted
83-
version: "5.5.0+1"
83+
version: "5.7.0"
8484
dio_web_adapter:
8585
dependency: transitive
8686
description:
8787
name: dio_web_adapter
88-
sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac"
88+
sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8"
8989
url: "https://pub.dev"
9090
source: hosted
91-
version: "1.0.1"
91+
version: "2.0.0"
9292
ed25519_edwards:
9393
dependency: "direct main"
9494
description:
@@ -133,10 +133,10 @@ packages:
133133
dependency: transitive
134134
description:
135135
name: http_parser
136-
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
136+
sha256: "40f592dd352890c3b60fec1b68e786cefb9603e05ff303dbc4dda49b304ecdf4"
137137
url: "https://pub.dev"
138138
source: hosted
139-
version: "4.0.2"
139+
version: "4.1.0"
140140
intl:
141141
dependency: transitive
142142
description:
@@ -175,7 +175,7 @@ packages:
175175
path: ".."
176176
relative: true
177177
source: path
178-
version: "1.2.7"
178+
version: "1.2.8"
179179
path:
180180
dependency: transitive
181181
description:
@@ -260,10 +260,10 @@ packages:
260260
dependency: transitive
261261
description:
262262
name: uuid
263-
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
263+
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
264264
url: "https://pub.dev"
265265
source: hosted
266-
version: "4.4.2"
266+
version: "4.5.0"
267267
very_good_analysis:
268268
dependency: "direct dev"
269269
description:
@@ -272,6 +272,14 @@ packages:
272272
url: "https://pub.dev"
273273
source: hosted
274274
version: "5.1.0"
275+
web:
276+
dependency: transitive
277+
description:
278+
name: web
279+
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
280+
url: "https://pub.dev"
281+
source: hosted
282+
version: "1.0.0"
275283
x25519:
276284
dependency: transitive
277285
description:

lib/src/vo/account.dart

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Account with EquatableMixin {
3737
required this.tipKeyBase64,
3838
this.fullName,
3939
this.avatarUrl,
40+
this.membership,
4041
});
4142

4243
factory Account.fromJson(Map<String, dynamic> json) =>

lib/src/vo/account.g.dart

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/vo/verification_response.dart

+8-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class VerificationResponse extends Equatable {
1010
required this.id,
1111
this.hasEmergencyContact = false,
1212
this.contactId,
13-
this.deactivatedAt,
13+
this.deactivationEffectiveAt,
14+
this.deactivationRequestedAt,
1415
});
1516

1617
factory VerificationResponse.fromJson(Map<String, dynamic> json) =>
@@ -28,16 +29,19 @@ class VerificationResponse extends Equatable {
2829
@JsonKey(name: 'contact_id')
2930
final String? contactId;
3031

31-
@JsonKey(name: 'deactivated_at')
32-
final String? deactivatedAt;
32+
@JsonKey(name: 'deactivation_requested_at')
33+
final DateTime? deactivationRequestedAt;
34+
@JsonKey(name: 'deactivation_effective_at')
35+
final DateTime? deactivationEffectiveAt;
3336

3437
@override
3538
List<Object?> get props => [
3639
type,
3740
id,
3841
hasEmergencyContact,
3942
contactId,
40-
deactivatedAt,
43+
deactivationRequestedAt,
44+
deactivationEffectiveAt,
4145
];
4246

4347
Map<String, dynamic> toJson() => _$VerificationResponseToJson(this);

lib/src/vo/verification_response.g.dart

+10-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pubspec.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mixin_bot_sdk_dart
22
description: Mixin Messenger API for Dart/Flutter, build decentrialized applications on Mixin
3-
version: 1.2.8
3+
version: 1.2.9
44
homepage: https://github.com/MixinNetwork/mixin_bot_sdk_dart
55

66
environment:
@@ -29,8 +29,7 @@ dependencies:
2929
edwards25519: ^1.0.4
3030

3131
dev_dependencies:
32-
test: ^1.17.9
32+
test: ^1.25.8
3333
very_good_analysis: ">=5.1.0 <7.0.0"
34-
# pedantic: ^1.11.0
35-
build_runner: any
36-
json_serializable: ^6.1.4
34+
build_runner: ^2.4.9
35+
json_serializable: ^6.8.0

test/config.dart

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
// Get APP data from https://developers.mixin.one/dashboard
2+
import 'dart:convert';
3+
import 'dart:io';
4+
25
import 'package:mixin_bot_sdk_dart/mixin_bot_sdk_dart.dart';
36

4-
const uid = '23cec735-ffb8-435d-8c2c-e352c98a8b59';
5-
const sid = '63f600c8-7247-4a02-8a71-1546c3a2abdb';
6-
final private = Key.froHex(
7-
'da34117b06b3d186d9f3455717b67861b5340f283c613f75ccb39092485b722bc9db931e3cea42c34f5d33afa306ed2f0b24446779a4e3347cdead21e0216480');
7+
final _keystore = () {
8+
final content = File('.keystore.json').readAsStringSync();
9+
return json.decode(content) as Map<String, dynamic>;
10+
}();
11+
12+
final uid = _keystore['app_id'] as String;
13+
final sid = _keystore['session_id'] as String;
14+
final private = Key.fromHexSeed(_keystore['session_private_key'] as String);
815

916
final uids = <String>['773e5e77-4107-45c2-b648-8fc722ed77f5'];
1017

0 commit comments

Comments
 (0)