Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-amplify/api

Package Overview
Dependencies
Maintainers
0
Versions
2192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/api - npm Package Compare versions

Comparing version 6.1.8 to 6.1.9-graphql-multi-client.4f8e7a9.0

10

dist/cjs/API.js

@@ -7,11 +7,5 @@ 'use strict';

const core_1 = require("@aws-amplify/core");
/**
* 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 = {}) {
function generateClient(options) {
return (0, internals_1.generateClient)({
...options,
...(options || {}),
amplify: core_1.Amplify,

@@ -18,0 +12,0 @@ });

8

dist/esm/API.d.ts

@@ -1,2 +0,3 @@

import { CommonPublicClientOptions, V6Client } from '@aws-amplify/api-graphql';
import { V6Client } from '@aws-amplify/api-graphql';
import { CommonPublicClientOptions } from '@aws-amplify/api-graphql/internals';
/**

@@ -8,2 +9,5 @@ * Generates an API client that can work with models or raw GraphQL

*/
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions): V6Client<T>;
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>;
{
"name": "@aws-amplify/api",
"version": "6.1.8",
"version": "6.1.9-graphql-multi-client.4f8e7a9.0+4f8e7a9",
"description": "Api category of aws-amplify",

@@ -71,2 +71,3 @@ "main": "./dist/cjs/index.js",

"devDependencies": {
"jest-fetch-mock": "3.0.3",
"typescript": "5.0.2"

@@ -83,7 +84,7 @@ },

"dependencies": {
"@aws-amplify/api-graphql": "4.6.6",
"@aws-amplify/api-rest": "4.0.63",
"@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",
"tslib": "^2.5.0"
},
"gitHead": "8a8097a71e5adcafb546e98cf0538ccb51ff8fbc"
"gitHead": "4f8e7a94a1c2540baa7eda530787b248b0fb237a"
}
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { CommonPublicClientOptions, V6Client } from '@aws-amplify/api-graphql';
import { generateClient as internalGenerateClient } from '@aws-amplify/api-graphql/internals';
import { V6Client } from '@aws-amplify/api-graphql';
import {
CommonPublicClientOptions,
generateClient as internalGenerateClient,
} from '@aws-amplify/api-graphql/internals';
import { Amplify } from '@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.
/**

@@ -14,8 +21,24 @@ * Generates an API client that can work with models or raw GraphQL

export function generateClient<T extends Record<any, any> = never>(
options: CommonPublicClientOptions = {},
): V6Client<T> {
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> {
return internalGenerateClient({
...options,
...(options || ({} as any)),
amplify: Amplify,
}) as unknown as V6Client<T>;
}) as unknown as V6Client<T, WithCustomEndpoint, WithApiKey>;
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc