-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename sendUserAttributeVerificationCode (#3759)
* feat: rename sendUserAttributeVerificationCode * fix: include deprecated category API * chore: add test, docs updates
- Loading branch information
1 parent
b09b5fd
commit 0d65eed
Showing
26 changed files
with
393 additions
and
257 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
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
51 changes: 0 additions & 51 deletions
51
...fy_core/lib/src/types/auth/attribute/resend_user_attribute_confirmation_code_options.dart
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
...ify_core/lib/src/types/auth/attribute/resend_user_attribute_confirmation_code_result.dart
This file was deleted.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
...lify_core/lib/src/types/auth/attribute/send_user_attribute_verification_code_options.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,62 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import 'package:amplify_core/amplify_core.dart'; | ||
|
||
/// {@category Auth} | ||
/// {@template amplify_core.send_attribute_verification_code_options} | ||
/// The shared send user attribute verification code options among all Auth | ||
/// plugins. | ||
/// {@endtemplate} | ||
class SendUserAttributeVerificationCodeOptions | ||
with | ||
AWSEquatable<SendUserAttributeVerificationCodeOptions>, | ||
AWSSerializable<Map<String, Object?>>, | ||
AWSDebuggable { | ||
/// {@macro amplify_core.send_attribute_verification_code_options} | ||
const SendUserAttributeVerificationCodeOptions({ | ||
this.pluginOptions, | ||
}); | ||
|
||
/// {@macro amplify_core.auth.send_user_attribute_verification_code_plugin_options} | ||
final SendUserAttributeVerificationCodePluginOptions? pluginOptions; | ||
|
||
@override | ||
List<Object?> get props => [pluginOptions]; | ||
|
||
@override | ||
String get runtimeTypeName => 'SendUserAttributeVerificationCodeOptions'; | ||
|
||
/// @nodoc | ||
@Deprecated('Use toJson instead') | ||
Map<String, Object?> serializeAsMap() => toJson(); | ||
|
||
@override | ||
Map<String, Object?> toJson() => { | ||
'pluginOptions': pluginOptions?.toJson(), | ||
}; | ||
} | ||
|
||
/// @nodoc | ||
/// {@template amplify_core.auth.send_user_attribute_verification_code_plugin_options} | ||
/// Plugin-specific options for `Amplify.Auth.sendUserAttributeVerificationCode`. | ||
/// {@endtemplate} | ||
abstract class SendUserAttributeVerificationCodePluginOptions | ||
with | ||
AWSEquatable<SendUserAttributeVerificationCodePluginOptions>, | ||
AWSSerializable<Map<String, Object?>>, | ||
AWSDebuggable { | ||
/// {@macro amplify_core.auth.send_user_attribute_verification_code_plugin_options} | ||
const SendUserAttributeVerificationCodePluginOptions(); | ||
} | ||
|
||
/// {@macro amplify_core.send_attribute_verification_code_options} | ||
@Deprecated('Use SendUserAttributeVerificationCodeOptions.') | ||
typedef ResendUserAttributeConfirmationCodeOptions | ||
= SendUserAttributeVerificationCodeOptions; | ||
|
||
/// @nodoc | ||
/// {@macro amplify_core.auth.send_user_attribute_verification_code_plugin_options} | ||
@Deprecated('Use SendUserAttributeVerificationCodePluginOptions.') | ||
typedef ResendUserAttributeConfirmationCodePluginOptions | ||
= SendUserAttributeVerificationCodePluginOptions; |
47 changes: 47 additions & 0 deletions
47
...plify_core/lib/src/types/auth/attribute/send_user_attribute_verification_code_result.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,47 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import 'package:amplify_core/amplify_core.dart'; | ||
|
||
part 'send_user_attribute_verification_code_result.g.dart'; | ||
|
||
/// {@category Auth} | ||
/// {@template amplify_core.send_user_attribute_verification_code_result} | ||
/// Wraps the result of a send user verification code operation. | ||
/// {@endtemplate} | ||
@zAmplifySerializable | ||
class SendUserAttributeVerificationCodeResult | ||
with | ||
AWSEquatable<SendUserAttributeVerificationCodeResult>, | ||
AWSSerializable<Map<String, Object?>>, | ||
AWSDebuggable { | ||
/// {@macro amplify_core.send_user_attribute_verification_code_result} | ||
const SendUserAttributeVerificationCodeResult({ | ||
required this.codeDeliveryDetails, | ||
}); | ||
|
||
/// {@macro amplify_core.send_user_attribute_verification_code_result} | ||
factory SendUserAttributeVerificationCodeResult.fromJson( | ||
Map<String, Object?> json, | ||
) => | ||
_$SendUserAttributeVerificationCodeResultFromJson(json); | ||
|
||
/// Contains the delivery details of the confirmation code that was sent to | ||
/// the user. | ||
final AuthCodeDeliveryDetails codeDeliveryDetails; | ||
|
||
@override | ||
List<Object?> get props => [codeDeliveryDetails]; | ||
|
||
@override | ||
String get runtimeTypeName => 'SendUserAttributeVerificationCodeResult'; | ||
|
||
@override | ||
Map<String, Object?> toJson() => | ||
_$SendUserAttributeVerificationCodeResultToJson(this); | ||
} | ||
|
||
/// {@macro amplify_core.send_user_attribute_verification_code_result} | ||
@Deprecated('Use SendUserAttributeVerificationCodeResult.') | ||
typedef ResendUserAttributeConfirmationCodeResult | ||
= SendUserAttributeVerificationCodeResult; |
12 changes: 6 additions & 6 deletions
12
...attribute_confirmation_code_result.g.dart → ...attribute_verification_code_result.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.