diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a24f7b2ebbb..b6574c0fc16 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,24 +15,24 @@ # The following paths involve server-side use cases, token/user session management. # Changes made to these paths requires additional reviews and approvals. -/packages/auth @haverchuck @cshfang @HuiSF @pranavosu -/packages/aws-amplify/src/adapter-core @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/adapterCore @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/singleton @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/utils/convert @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/utils/WordArray.ts @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/storage @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/utils/generateRandomString.ts @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/utils/globalHelpers @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/utils/urlSafeDecode.ts @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/awsClients/cognitoIdentity @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/clients/internal @haverchuck @cshfang @HuiSF @pranavosu -/packages/core/src/Hub @haverchuck @cshfang @HuiSF @pranavosu -/packages/adapter-nextjs @haverchuck @cshfang @HuiSF @pranavosu -/packages/rtn-web-browser @haverchuck @cshfang @HuiSF @pranavosu -/packages/storage/src/providers/s3/apis/internal @haverchuck @cshfang @HuiSF @pranavosu -/packages/storage/src/providers/s3/apis/server @haverchuck @cshfang @HuiSF @pranavosu -/packages/api-rest/src/apis/server.ts @haverchuck @cshfang @HuiSF @pranavosu -/packages/api-rest/src/apis/common/internalPost.ts @haverchuck @cshfang @HuiSF @pranavosu -/packages/api-graphql/src/server @haverchuck @cshfang @HuiSF @pranavosu -/packages/api-graphql/src/internals/server @haverchuck @cshfang @HuiSF @pranavosu +/packages/auth @sktimalsina @cshfang @HuiSF @pranavosu +/packages/aws-amplify/src/adapter-core @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/adapterCore @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/singleton @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/utils/convert @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/utils/WordArray.ts @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/storage @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/utils/generateRandomString.ts @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/utils/globalHelpers @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/utils/urlSafeDecode.ts @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/awsClients/cognitoIdentity @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/clients/internal @sktimalsina @cshfang @HuiSF @pranavosu +/packages/core/src/Hub @sktimalsina @cshfang @HuiSF @pranavosu +/packages/adapter-nextjs @sktimalsina @cshfang @HuiSF @pranavosu +/packages/rtn-web-browser @sktimalsina @cshfang @HuiSF @pranavosu +/packages/storage/src/providers/s3/apis/internal @sktimalsina @cshfang @HuiSF @pranavosu +/packages/storage/src/providers/s3/apis/server @sktimalsina @cshfang @HuiSF @pranavosu +/packages/api-rest/src/apis/server.ts @sktimalsina @cshfang @HuiSF @pranavosu +/packages/api-rest/src/apis/common/internalPost.ts @sktimalsina @cshfang @HuiSF @pranavosu +/packages/api-graphql/src/server @sktimalsina @cshfang @HuiSF @pranavosu +/packages/api-graphql/src/internals/server @sktimalsina @cshfang @HuiSF @pranavosu diff --git a/.github/integ-config/integ-all.yml b/.github/integ-config/integ-all.yml index 3c37683608b..b20a0cc45e1 100644 --- a/.github/integ-config/integ-all.yml +++ b/.github/integ-config/integ-all.yml @@ -890,7 +890,7 @@ tests: category: auth sample_name: [mfa] spec: mfa-req-email - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: mfa-req-email - test_name: integ_next_mfa_req_phone @@ -899,7 +899,7 @@ tests: category: auth sample_name: [mfa] spec: mfa-req-phone - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: mfa-req-phone - test_name: integ_next_mfa_opt_email @@ -908,7 +908,7 @@ tests: category: auth sample_name: [mfa] spec: mfa-opt-email - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: mfa-opt-email - test_name: integ_next_mfa_opt_phone @@ -917,7 +917,7 @@ tests: category: auth sample_name: [mfa] spec: mfa-opt-phone - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: mfa-opt-phone - test_name: integ_next_mfa_setup @@ -926,7 +926,7 @@ tests: category: auth sample_name: [mfa] spec: mfa-setup - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: mfa-setup - test_name: integ_next_passwordless_auto_sign_in @@ -935,8 +935,7 @@ tests: category: auth sample_name: [mfa] spec: passwordless/auto-sign-in - # browser: *minimal_browser_list - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: pwl-autosignin - test_name: integ_next_passwordless_first_factor_selection @@ -945,8 +944,7 @@ tests: category: auth sample_name: [mfa] spec: passwordless/first-factor-selection - # browser: *minimal_browser_list - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: pwl-ffselect - test_name: integ_next_passwordless_preferred_challenge @@ -955,8 +953,7 @@ tests: category: auth sample_name: [mfa] spec: passwordless/preferred-challenge - # browser: *minimal_browser_list - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: pwl-prefchal - test_name: integ_next_passwordless_sign_up @@ -965,8 +962,7 @@ tests: category: auth sample_name: [mfa] spec: passwordless/sign-up - # browser: *minimal_browser_list - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: pwl-signup - test_name: integ_next_passwordless_misc @@ -975,8 +971,7 @@ tests: category: auth sample_name: [mfa] spec: passwordless/miscellaneous - # browser: *minimal_browser_list - browser: [chrome] + browser: *minimal_browser_list env: NEXT_PUBLIC_BACKEND_CONFIG: pwl-misc - test_name: integ_next_passwordless_webauthn diff --git a/packages/api-graphql/src/internals/v6.ts b/packages/api-graphql/src/internals/v6.ts index c5d362908c8..553707be092 100644 --- a/packages/api-graphql/src/internals/v6.ts +++ b/packages/api-graphql/src/internals/v6.ts @@ -4,6 +4,7 @@ import { CustomHeaders } from '@aws-amplify/data-schema/runtime'; import { GraphQLAPI } from '../GraphQLAPI'; import { + GraphQLOptions, GraphQLOptionsV6, GraphQLResponseV6, V6Client, @@ -113,10 +114,11 @@ export function graphql< * Neither of these can actually be validated at runtime. Hence, we don't perform * any validation or type-guarding here. */ + const result = GraphQLAPI.graphql( // TODO: move V6Client back into this package? internals.amplify as any, - options, + options as GraphQLOptions, headers, ); diff --git a/packages/api-graphql/src/types/index.ts b/packages/api-graphql/src/types/index.ts index 0ecac34369a..d642fff3bd1 100644 --- a/packages/api-graphql/src/types/index.ts +++ b/packages/api-graphql/src/types/index.ts @@ -212,7 +212,7 @@ export type GraphQLOperation = Source | string; export interface GraphQLOptionsV6< FALLBACK_TYPES = unknown, TYPED_GQL_STRING extends string = string, -> { +> extends Record { query: TYPED_GQL_STRING | DocumentNode; variables?: GraphQLVariablesV6; authMode?: GraphQLAuthMode; diff --git a/packages/datastore/src/types.ts b/packages/datastore/src/types.ts index abc92322cc7..a36cad59ca1 100644 --- a/packages/datastore/src/types.ts +++ b/packages/datastore/src/types.ts @@ -506,6 +506,10 @@ export type TypeConstructorMap = Record< export declare const __identifierBrand__: unique symbol; export type IdentifierBrand = T & { [__identifierBrand__]: K }; +interface GenericIdentifier { + field: any; +} + // datastore generates a uuid for you export type ManagedIdentifier = IdentifierBrand< { field: F extends string ? F : never; type: T }, @@ -548,7 +552,9 @@ export type IdentifierFields< infer B > ? B[number] // B[number] - : MetadataOrDefault['identifier']['field']) & + : MetadataOrDefault['identifier'] extends GenericIdentifier + ? MetadataOrDefault['identifier']['field'] + : unknown) & string; export type IdentifierFieldsForInit< @@ -710,7 +716,9 @@ export type IdentifierFieldValue< ? MetadataOrDefault['identifier']['fields'] extends [any] ? T[MetadataOrDefault['identifier']['fields'][0]] : never - : T[MetadataOrDefault['identifier']['field']]; + : MetadataOrDefault['identifier'] extends GenericIdentifier + ? T[MetadataOrDefault['identifier']['field']] + : unknown; export type IdentifierFieldOrIdentifierObject< T extends PersistentModel,