-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e982f51
commit 6bdb1fb
Showing
24 changed files
with
737 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,7 @@ | |
"Roboto", | ||
"Shinya", | ||
"shinyakato", | ||
"Signup", | ||
"sublist", | ||
"Threadgate", | ||
"tlds", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/atproto/lib/src/services/entities/signup_queue.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2023 Shinya Kato. All rights reserved. | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided the conditions. | ||
|
||
// 📦 Package imports: | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
// 🌎 Project imports: | ||
import '../../lex_annotations.g.dart' as lex; | ||
|
||
part 'signup_queue.freezed.dart'; | ||
part 'signup_queue.g.dart'; | ||
|
||
/// https://atprotodart.com/docs/lexicons/com/atproto/temp/checkSignupQueue/#output | ||
@freezed | ||
@lex.comAtprotoTempCheckSignupQueue | ||
class SignupQueue with _$SignupQueue { | ||
const factory SignupQueue({ | ||
required bool activated, | ||
int? placeInQueue, | ||
int? estimatedTimeMs, | ||
}) = _SignupQueue; | ||
|
||
factory SignupQueue.fromJson(Map<String, Object?> json) => | ||
_$SignupQueueFromJson(json); | ||
} |
191 changes: 191 additions & 0 deletions
191
packages/atproto/lib/src/services/entities/signup_queue.freezed.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
// ignore_for_file: type=lint | ||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark | ||
|
||
part of 'signup_queue.dart'; | ||
|
||
// ************************************************************************** | ||
// FreezedGenerator | ||
// ************************************************************************** | ||
|
||
T _$identity<T>(T value) => value; | ||
|
||
final _privateConstructorUsedError = UnsupportedError( | ||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); | ||
|
||
SignupQueue _$SignupQueueFromJson(Map<String, dynamic> json) { | ||
return _SignupQueue.fromJson(json); | ||
} | ||
|
||
/// @nodoc | ||
mixin _$SignupQueue { | ||
bool get activated => throw _privateConstructorUsedError; | ||
int? get placeInQueue => throw _privateConstructorUsedError; | ||
int? get estimatedTimeMs => throw _privateConstructorUsedError; | ||
|
||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; | ||
@JsonKey(ignore: true) | ||
$SignupQueueCopyWith<SignupQueue> get copyWith => | ||
throw _privateConstructorUsedError; | ||
} | ||
|
||
/// @nodoc | ||
abstract class $SignupQueueCopyWith<$Res> { | ||
factory $SignupQueueCopyWith( | ||
SignupQueue value, $Res Function(SignupQueue) then) = | ||
_$SignupQueueCopyWithImpl<$Res, SignupQueue>; | ||
@useResult | ||
$Res call({bool activated, int? placeInQueue, int? estimatedTimeMs}); | ||
} | ||
|
||
/// @nodoc | ||
class _$SignupQueueCopyWithImpl<$Res, $Val extends SignupQueue> | ||
implements $SignupQueueCopyWith<$Res> { | ||
_$SignupQueueCopyWithImpl(this._value, this._then); | ||
|
||
// ignore: unused_field | ||
final $Val _value; | ||
// ignore: unused_field | ||
final $Res Function($Val) _then; | ||
|
||
@pragma('vm:prefer-inline') | ||
@override | ||
$Res call({ | ||
Object? activated = null, | ||
Object? placeInQueue = freezed, | ||
Object? estimatedTimeMs = freezed, | ||
}) { | ||
return _then(_value.copyWith( | ||
activated: null == activated | ||
? _value.activated | ||
: activated // ignore: cast_nullable_to_non_nullable | ||
as bool, | ||
placeInQueue: freezed == placeInQueue | ||
? _value.placeInQueue | ||
: placeInQueue // ignore: cast_nullable_to_non_nullable | ||
as int?, | ||
estimatedTimeMs: freezed == estimatedTimeMs | ||
? _value.estimatedTimeMs | ||
: estimatedTimeMs // ignore: cast_nullable_to_non_nullable | ||
as int?, | ||
) as $Val); | ||
} | ||
} | ||
|
||
/// @nodoc | ||
abstract class _$$SignupQueueImplCopyWith<$Res> | ||
implements $SignupQueueCopyWith<$Res> { | ||
factory _$$SignupQueueImplCopyWith( | ||
_$SignupQueueImpl value, $Res Function(_$SignupQueueImpl) then) = | ||
__$$SignupQueueImplCopyWithImpl<$Res>; | ||
@override | ||
@useResult | ||
$Res call({bool activated, int? placeInQueue, int? estimatedTimeMs}); | ||
} | ||
|
||
/// @nodoc | ||
class __$$SignupQueueImplCopyWithImpl<$Res> | ||
extends _$SignupQueueCopyWithImpl<$Res, _$SignupQueueImpl> | ||
implements _$$SignupQueueImplCopyWith<$Res> { | ||
__$$SignupQueueImplCopyWithImpl( | ||
_$SignupQueueImpl _value, $Res Function(_$SignupQueueImpl) _then) | ||
: super(_value, _then); | ||
|
||
@pragma('vm:prefer-inline') | ||
@override | ||
$Res call({ | ||
Object? activated = null, | ||
Object? placeInQueue = freezed, | ||
Object? estimatedTimeMs = freezed, | ||
}) { | ||
return _then(_$SignupQueueImpl( | ||
activated: null == activated | ||
? _value.activated | ||
: activated // ignore: cast_nullable_to_non_nullable | ||
as bool, | ||
placeInQueue: freezed == placeInQueue | ||
? _value.placeInQueue | ||
: placeInQueue // ignore: cast_nullable_to_non_nullable | ||
as int?, | ||
estimatedTimeMs: freezed == estimatedTimeMs | ||
? _value.estimatedTimeMs | ||
: estimatedTimeMs // ignore: cast_nullable_to_non_nullable | ||
as int?, | ||
)); | ||
} | ||
} | ||
|
||
/// @nodoc | ||
@JsonSerializable() | ||
class _$SignupQueueImpl implements _SignupQueue { | ||
const _$SignupQueueImpl( | ||
{required this.activated, this.placeInQueue, this.estimatedTimeMs}); | ||
|
||
factory _$SignupQueueImpl.fromJson(Map<String, dynamic> json) => | ||
_$$SignupQueueImplFromJson(json); | ||
|
||
@override | ||
final bool activated; | ||
@override | ||
final int? placeInQueue; | ||
@override | ||
final int? estimatedTimeMs; | ||
|
||
@override | ||
String toString() { | ||
return 'SignupQueue(activated: $activated, placeInQueue: $placeInQueue, estimatedTimeMs: $estimatedTimeMs)'; | ||
} | ||
|
||
@override | ||
bool operator ==(Object other) { | ||
return identical(this, other) || | ||
(other.runtimeType == runtimeType && | ||
other is _$SignupQueueImpl && | ||
(identical(other.activated, activated) || | ||
other.activated == activated) && | ||
(identical(other.placeInQueue, placeInQueue) || | ||
other.placeInQueue == placeInQueue) && | ||
(identical(other.estimatedTimeMs, estimatedTimeMs) || | ||
other.estimatedTimeMs == estimatedTimeMs)); | ||
} | ||
|
||
@JsonKey(ignore: true) | ||
@override | ||
int get hashCode => | ||
Object.hash(runtimeType, activated, placeInQueue, estimatedTimeMs); | ||
|
||
@JsonKey(ignore: true) | ||
@override | ||
@pragma('vm:prefer-inline') | ||
_$$SignupQueueImplCopyWith<_$SignupQueueImpl> get copyWith => | ||
__$$SignupQueueImplCopyWithImpl<_$SignupQueueImpl>(this, _$identity); | ||
|
||
@override | ||
Map<String, dynamic> toJson() { | ||
return _$$SignupQueueImplToJson( | ||
this, | ||
); | ||
} | ||
} | ||
|
||
abstract class _SignupQueue implements SignupQueue { | ||
const factory _SignupQueue( | ||
{required final bool activated, | ||
final int? placeInQueue, | ||
final int? estimatedTimeMs}) = _$SignupQueueImpl; | ||
|
||
factory _SignupQueue.fromJson(Map<String, dynamic> json) = | ||
_$SignupQueueImpl.fromJson; | ||
|
||
@override | ||
bool get activated; | ||
@override | ||
int? get placeInQueue; | ||
@override | ||
int? get estimatedTimeMs; | ||
@override | ||
@JsonKey(ignore: true) | ||
_$$SignupQueueImplCopyWith<_$SignupQueueImpl> get copyWith => | ||
throw _privateConstructorUsedError; | ||
} |
29 changes: 29 additions & 0 deletions
29
packages/atproto/lib/src/services/entities/signup_queue.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
packages/atproto/lib/src/services/entities/transferred_account.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2024 Shinya Kato. All rights reserved. | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided the conditions. | ||
|
||
// 📦 Package imports: | ||
import 'package:atproto_core/atproto_core.dart'; | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'transferred_account.freezed.dart'; | ||
part 'transferred_account.g.dart'; | ||
|
||
@freezed | ||
class TransferredAccount with _$TransferredAccount { | ||
// ignore: unused_element | ||
const TransferredAccount._(); | ||
|
||
@jsonSerializable | ||
const factory TransferredAccount({ | ||
required String did, | ||
required String handle, | ||
required String accessJwt, | ||
required String refreshJwt, | ||
}) = _TransferredAccount; | ||
|
||
factory TransferredAccount.fromJson(Map<String, Object?> json) => | ||
_$TransferredAccountFromJson(json); | ||
|
||
/// Returns decoded [accessJwt]. | ||
AuthToken get accessToken => decodeJwt(accessJwt); | ||
|
||
/// Returns decoded [refreshJwt]. | ||
AuthToken get refreshToken => decodeJwt(refreshJwt); | ||
} |
Oops, something went wrong.