@aws-amplify/api
Advanced tools
Comparing version 6.1.9-graphql-multi-client.4f8e7a9.0 to 6.1.9-graphql-multi-client.93b5136.0
@@ -7,2 +7,11 @@ 'use strict'; | ||
const core_1 = require("@aws-amplify/core"); | ||
// NOTE: The type narrowing on CommonPublicClientOptions seems to hinge on | ||
// defining these signatures separately. Not sure why offhand. This is worth | ||
// some investigation later. | ||
/** | ||
* Generates an API client that can work with models or raw GraphQL | ||
* | ||
* @returns {@link V6Client} | ||
* @throws {@link Error} - Throws error when client cannot be generated due to configuration issues. | ||
*/ | ||
function generateClient(options) { | ||
@@ -9,0 +18,0 @@ return (0, internals_1.generateClient)({ |
@@ -9,5 +9,2 @@ import { V6Client } from '@aws-amplify/api-graphql'; | ||
*/ | ||
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions<false, false>): V6Client<T, false, false>; | ||
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions<false, true>): V6Client<T, false, true>; | ||
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions<true, false>): V6Client<T, true, false>; | ||
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions<true, true>): V6Client<T, true, true>; | ||
export declare function generateClient<T extends Record<any, any> = never, Options extends CommonPublicClientOptions = object>(options?: Options): V6Client<T, Options>; |
{ | ||
"name": "@aws-amplify/api", | ||
"version": "6.1.9-graphql-multi-client.4f8e7a9.0+4f8e7a9", | ||
"version": "6.1.9-graphql-multi-client.93b5136.0+93b5136", | ||
"description": "Api category of aws-amplify", | ||
@@ -83,7 +83,7 @@ "main": "./dist/cjs/index.js", | ||
"dependencies": { | ||
"@aws-amplify/api-graphql": "4.6.7-graphql-multi-client.4f8e7a9.0+4f8e7a9", | ||
"@aws-amplify/api-rest": "4.0.64-graphql-multi-client.4f8e7a9.0+4f8e7a9", | ||
"@aws-amplify/api-graphql": "4.6.7-graphql-multi-client.93b5136.0+93b5136", | ||
"@aws-amplify/api-rest": "4.0.64-graphql-multi-client.93b5136.0+93b5136", | ||
"tslib": "^2.5.0" | ||
}, | ||
"gitHead": "4f8e7a94a1c2540baa7eda530787b248b0fb237a" | ||
"gitHead": "93b51360e57e283a7d4ed64c6b701d85ec71e94b" | ||
} |
@@ -20,25 +20,10 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
*/ | ||
export function generateClient<T extends Record<any, any> = never>( | ||
options?: CommonPublicClientOptions<false, false>, | ||
): V6Client<T, false, false>; | ||
export function generateClient<T extends Record<any, any> = never>( | ||
options?: CommonPublicClientOptions<false, true>, | ||
): V6Client<T, false, true>; | ||
export function generateClient<T extends Record<any, any> = never>( | ||
options?: CommonPublicClientOptions<true, false>, | ||
): V6Client<T, true, false>; | ||
export function generateClient<T extends Record<any, any> = never>( | ||
options?: CommonPublicClientOptions<true, true>, | ||
): V6Client<T, true, true>; | ||
export function generateClient< | ||
WithCustomEndpoint extends boolean, | ||
WithApiKey extends boolean, | ||
T extends Record<any, any> = never, | ||
>( | ||
options?: CommonPublicClientOptions<WithCustomEndpoint, WithApiKey>, | ||
): V6Client<T, WithCustomEndpoint, WithApiKey> { | ||
Options extends CommonPublicClientOptions = object, | ||
>(options?: Options): V6Client<T, Options> { | ||
return internalGenerateClient({ | ||
...(options || ({} as any)), | ||
amplify: Amplify, | ||
}) as unknown as V6Client<T, WithCustomEndpoint, WithApiKey>; | ||
}) as unknown as V6Client<T, Options>; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
56168