Skip to content

Commit

Permalink
update verification response
Browse files Browse the repository at this point in the history
  • Loading branch information
boyan01 committed Dec 31, 2024
1 parent 9de0582 commit 8005940
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ example/config.dart

.idea

.keystore.json
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.9

* update verification response

## 1.2.8

* Fix code generation for `Asset` class.
Expand Down
30 changes: 19 additions & 11 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ packages:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.5"
dart_jsonwebtoken:
dependency: transitive
description:
Expand All @@ -77,18 +77,18 @@ packages:
dependency: transitive
description:
name: dio
sha256: e17f6b3097b8c51b72c74c9f071a605c47bcc8893839bd66732457a5ebe73714
sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260"
url: "https://pub.dev"
source: hosted
version: "5.5.0+1"
version: "5.7.0"
dio_web_adapter:
dependency: transitive
description:
name: dio_web_adapter
sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac"
sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "2.0.0"
ed25519_edwards:
dependency: "direct main"
description:
Expand Down Expand Up @@ -133,10 +133,10 @@ packages:
dependency: transitive
description:
name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
sha256: "40f592dd352890c3b60fec1b68e786cefb9603e05ff303dbc4dda49b304ecdf4"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
version: "4.1.0"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -175,7 +175,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.7"
version: "1.2.8"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -260,10 +260,10 @@ packages:
dependency: transitive
description:
name: uuid
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
url: "https://pub.dev"
source: hosted
version: "4.4.2"
version: "4.5.0"
very_good_analysis:
dependency: "direct dev"
description:
Expand All @@ -272,6 +272,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.1.0"
web:
dependency: transitive
description:
name: web
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
url: "https://pub.dev"
source: hosted
version: "1.0.0"
x25519:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions lib/src/vo/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Account with EquatableMixin {
required this.tipKeyBase64,
this.fullName,
this.avatarUrl,
this.membership,
});

factory Account.fromJson(Map<String, dynamic> json) =>
Expand Down
7 changes: 4 additions & 3 deletions lib/src/vo/account.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions lib/src/vo/verification_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class VerificationResponse extends Equatable {
required this.id,
this.hasEmergencyContact = false,
this.contactId,
this.deactivatedAt,
this.deactivationEffectiveAt,
this.deactivationRequestedAt,
});

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

@JsonKey(name: 'deactivated_at')
final String? deactivatedAt;
@JsonKey(name: 'deactivation_requested_at')
final DateTime? deactivationRequestedAt;
@JsonKey(name: 'deactivation_effective_at')
final DateTime? deactivationEffectiveAt;

@override
List<Object?> get props => [
type,
id,
hasEmergencyContact,
contactId,
deactivatedAt,
deactivationRequestedAt,
deactivationEffectiveAt,
];

Map<String, dynamic> toJson() => _$VerificationResponseToJson(this);
Expand Down
12 changes: 10 additions & 2 deletions lib/src/vo/verification_response.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mixin_bot_sdk_dart
description: Mixin Messenger API for Dart/Flutter, build decentrialized applications on Mixin
version: 1.2.8
version: 1.2.9
homepage: https://github.com/MixinNetwork/mixin_bot_sdk_dart

environment:
Expand Down Expand Up @@ -29,8 +29,7 @@ dependencies:
edwards25519: ^1.0.4

dev_dependencies:
test: ^1.17.9
test: ^1.25.8
very_good_analysis: ">=5.1.0 <7.0.0"
# pedantic: ^1.11.0
build_runner: any
json_serializable: ^6.1.4
build_runner: ^2.4.9
json_serializable: ^6.8.0
15 changes: 11 additions & 4 deletions test/config.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
// Get APP data from https://developers.mixin.one/dashboard
import 'dart:convert';
import 'dart:io';

import 'package:mixin_bot_sdk_dart/mixin_bot_sdk_dart.dart';

const uid = '23cec735-ffb8-435d-8c2c-e352c98a8b59';
const sid = '63f600c8-7247-4a02-8a71-1546c3a2abdb';
final private = Key.froHex(
'da34117b06b3d186d9f3455717b67861b5340f283c613f75ccb39092485b722bc9db931e3cea42c34f5d33afa306ed2f0b24446779a4e3347cdead21e0216480');
final _keystore = () {
final content = File('.keystore.json').readAsStringSync();
return json.decode(content) as Map<String, dynamic>;
}();

final uid = _keystore['app_id'] as String;
final sid = _keystore['session_id'] as String;
final private = Key.fromHexSeed(_keystore['session_private_key'] as String);

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

Expand Down

0 comments on commit 8005940

Please sign in to comment.