-
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!: use plugin options for optional plugin parameters (#4762)
- Loading branch information
Showing
32 changed files
with
215 additions
and
130 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
3 changes: 0 additions & 3 deletions
3
packages/amplify_core/lib/src/config/analytics/pinpoint_config.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
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
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
43 changes: 43 additions & 0 deletions
43
packages/amplify_datastore/lib/src/datastore_plugin_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,43 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import 'package:amplify_core/amplify_core.dart'; | ||
|
||
/// {@template amplify_datastore.datastore_plugin_options} | ||
/// The plugin options for the Amplify DataStore plugin. | ||
/// {@endtemplate} | ||
class DataStorePluginOptions { | ||
/// {@macro amplify_datastore.datastore_plugin_options} | ||
const DataStorePluginOptions({ | ||
this.errorHandler, | ||
this.conflictHandler, | ||
this.syncExpressions = const [], | ||
this.syncInterval, | ||
this.syncMaxRecords, | ||
this.syncPageSize, | ||
this.authModeStrategy = AuthModeStrategy.defaultStrategy, | ||
}); | ||
|
||
/// The custom error handler function that receives an [AmplifyException] | ||
/// object when DataStore encounters an unhandled error. | ||
final Function(AmplifyException)? errorHandler; | ||
|
||
/// The custom conflict handler function that receives an [ConflictData] | ||
/// object when DataStore encounters a data conflict. | ||
final DataStoreConflictHandler? conflictHandler; | ||
|
||
/// The list of sync expressions to filter datastore sync. | ||
final List<DataStoreSyncExpression> syncExpressions; | ||
|
||
/// The syncing interval in seconds. | ||
final int? syncInterval; | ||
|
||
/// The max number of records to sync. | ||
final int? syncMaxRecords; | ||
|
||
/// The page size to sync. | ||
final int? syncPageSize; | ||
|
||
/// The strategy for authorizing an API call. | ||
final AuthModeStrategy authModeStrategy; | ||
} |
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
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
15 changes: 15 additions & 0 deletions
15
packages/analytics/amplify_analytics_pinpoint_dart/lib/src/analytics_plugin_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,15 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/// {@template amplify_analytics_pinpoint_dart.analytics_pinpoint_plugin_options} | ||
/// The plugin options for the Amplify Analytics Pinpoint plugin | ||
/// {@endtemplate} | ||
class AnalyticsPinpointPluginOptions { | ||
/// {@macro amplify_analytics_pinpoint_dart.analytics_pinpoint_plugin_options} | ||
const AnalyticsPinpointPluginOptions({ | ||
this.autoFlushEventsInterval = const Duration(seconds: 30), | ||
}); | ||
|
||
/// The duration in seconds between flushing analytics events to Pinpoint. | ||
final Duration autoFlushEventsInterval; | ||
} |
Oops, something went wrong.