Skip to content

Commit f70611d

Browse files
authored
fix: eliminate SAML type import by flattening MetadataType to string union (#923)
* fix: flatten saml metadata types to simplify imports * chore: update docs
1 parent 66a7671 commit f70611d

File tree

7 files changed

+181
-87
lines changed

7 files changed

+181
-87
lines changed

.changeset/three-shrimps-shave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aws-amplify/auth-construct-alpha': patch
3+
---
4+
5+
Updated SAML metadata types to simplify imports.

package-lock.json

Lines changed: 76 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/auth-construct/API.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { IFunction } from 'aws-cdk-lib/aws-lambda';
1414
import { ResourceProvider } from '@aws-amplify/plugin-types';
1515
import { SecretValue } from 'aws-cdk-lib';
1616
import { StandardAttributes } from 'aws-cdk-lib/aws-cognito';
17+
import { UserPoolIdentityProviderSamlMetadata } from 'aws-cdk-lib/aws-cognito';
1718

1819
// @public
1920
export type AmazonProviderProps = Omit<aws_cognito.UserPoolIdentityProviderAmazonProps, 'userPool'>;
@@ -95,7 +96,11 @@ export type PhoneNumberLogin = true | {
9596
};
9697

9798
// @public
98-
export type SamlProviderProps = Omit<aws_cognito.UserPoolIdentityProviderSamlProps, 'userPool'>;
99+
export type SamlProviderProps = Omit<aws_cognito.UserPoolIdentityProviderSamlProps, 'userPool' | 'metadata'> & {
100+
metadata: Omit<UserPoolIdentityProviderSamlMetadata, 'metadataType'> & {
101+
metadataType: 'URL' | 'FILE';
102+
};
103+
};
99104

100105
// @public
101106
export type TriggerEvent = (typeof triggerEvents)[number];

0 commit comments

Comments
 (0)