-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: PubSub Add Options objects for all Providers and fix: Spelling …
…error and deprecation of old exports (#9683) * fix: Spelling error and add deprecation warnings to deprecated interfaces * feat: PubSub - Add options extensions for each provider
- Loading branch information
Showing
13 changed files
with
232 additions
and
205 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
/* | ||
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with | ||
* the License. A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0/ | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
*/ | ||
|
||
import { Auth } from './Auth'; | ||
import { CognitoHostedUIIdentityProvider, SignUpParams } from './types/Auth'; | ||
import { | ||
CognitoUser, | ||
CookieStorage, | ||
appendToCognitoUserAgent, | ||
} from 'amazon-cognito-identity-js'; | ||
import { AuthErrorStrings } from './common/AuthErrorStrings'; | ||
|
||
/** | ||
* @deprecated use named import | ||
*/ | ||
export default Auth; | ||
export { | ||
Auth, | ||
CognitoUser, | ||
CookieStorage, | ||
CognitoHostedUIIdentityProvider, | ||
SignUpParams, | ||
appendToCognitoUserAgent, | ||
AuthErrorStrings, | ||
}; | ||
/* | ||
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with | ||
* the License. A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0/ | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
*/ | ||
|
||
import { Auth } from './Auth'; | ||
import { | ||
CognitoHostedUIIdentityProvider, | ||
SignUpParams, | ||
GRAPHQL_AUTH_MODE, | ||
} from './types/Auth'; | ||
import { | ||
CognitoUser, | ||
CookieStorage, | ||
appendToCognitoUserAgent, | ||
} from 'amazon-cognito-identity-js'; | ||
import { AuthErrorStrings } from './common/AuthErrorStrings'; | ||
|
||
/** | ||
* @deprecated use named import | ||
*/ | ||
export default Auth; | ||
export { | ||
Auth, | ||
CognitoUser, | ||
CookieStorage, | ||
CognitoHostedUIIdentityProvider, | ||
SignUpParams, | ||
appendToCognitoUserAgent, | ||
AuthErrorStrings, | ||
GRAPHQL_AUTH_MODE, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
import { InputLogEvent, LogGroup } from '@aws-sdk/client-cloudwatch-logs'; | ||
import { Credentials } from '@aws-sdk/types'; | ||
|
||
export interface AmplifyConfig { | ||
Analytics?: object; | ||
Auth?: object; | ||
API?: object; | ||
Logging?: object; | ||
Storage?: object; | ||
Cache?: object; | ||
Geo?: object; | ||
ssr?: boolean; | ||
} | ||
|
||
export interface ICredentials { | ||
accessKeyId: string; | ||
sessionToken: string; | ||
secretAccessKey: string; | ||
identityId: string; | ||
authenticated: boolean; | ||
// Long term creds do not provide an expiration date | ||
expiration?: Date; | ||
} | ||
|
||
/** | ||
* @private | ||
* Internal use of Amplify only | ||
*/ | ||
|
||
export type DelayFunction = ( | ||
attempt: number, | ||
args?: any[], | ||
error?: Error | ||
) => number | false; | ||
|
||
export interface LoggingProvider { | ||
// return the name of you provider | ||
getProviderName(): string; | ||
|
||
// return the name of you category | ||
getCategoryName(): string; | ||
|
||
// configure the plugin | ||
configure(config?: object): object; | ||
|
||
// take logs and push to provider | ||
pushLogs(logs: InputLogEvent[]): void; | ||
} | ||
|
||
export interface AWSCloudWatchProviderOptions { | ||
logGroupName?: string; | ||
logStreamName?: string; | ||
region?: string; | ||
credentials?: Credentials; | ||
endpoint?: string; | ||
} | ||
|
||
export interface CloudWatchDataTracker { | ||
eventUploadInProgress: boolean; | ||
logEvents: InputLogEvent[]; | ||
verifiedLogGroup?: LogGroup; | ||
} | ||
import { InputLogEvent, LogGroup } from '@aws-sdk/client-cloudwatch-logs'; | ||
import { Credentials } from '@aws-sdk/types'; | ||
|
||
export interface AmplifyConfig { | ||
Analytics?: object; | ||
Auth?: object; | ||
API?: object; | ||
Logging?: object; | ||
Storage?: object; | ||
Cache?: object; | ||
Geo?: object; | ||
ssr?: boolean; | ||
} | ||
|
||
export interface ICredentials { | ||
accessKeyId: string; | ||
sessionToken: string; | ||
secretAccessKey: string; | ||
identityId: string; | ||
authenticated: boolean; | ||
// Long term creds do not provide an expiration date | ||
expiration?: Date; | ||
} | ||
|
||
/** | ||
* @private | ||
* Internal use of Amplify only | ||
*/ | ||
|
||
export type DelayFunction = ( | ||
attempt: number, | ||
args?: any[], | ||
error?: Error | ||
) => number | false; | ||
|
||
export interface LoggingProvider { | ||
// return the name of you provider | ||
getProviderName(): string; | ||
|
||
// return the name of you category | ||
getCategoryName(): string; | ||
|
||
// configure the plugin | ||
configure(config?: object): object; | ||
|
||
// take logs and push to provider | ||
pushLogs(logs: InputLogEvent[]): void; | ||
} | ||
|
||
export interface AWSCloudWatchProviderOptions { | ||
logGroupName?: string; | ||
logStreamName?: string; | ||
region?: string; | ||
credentials?: Credentials; | ||
endpoint?: string; | ||
} | ||
|
||
export interface CloudWatchDataTracker { | ||
eventUploadInProgress: boolean; | ||
logEvents: InputLogEvent[]; | ||
verifiedLogGroup?: LogGroup; | ||
} |
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
Oops, something went wrong.