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

@aws-amplify/data-schema

Package Overview
Dependencies
Maintainers
9
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/data-schema - npm Package Compare versions

Comparing version 0.16.0 to 0.16.1

5

dist/cjs/runtime/index.v3.js

@@ -6,9 +6,4 @@ 'use strict';

Object.defineProperty(exports, "__esModule", { value: true });
exports.addSchemaToClientWithInstance = exports.addSchemaToClient = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./client/index.v3"), exports);
var addSchemaToClient_1 = require("./addSchemaToClient");
Object.defineProperty(exports, "addSchemaToClient", { enumerable: true, get: function () { return addSchemaToClient_1.addSchemaToClient; } });
var addSchemaToClientWithInstance_1 = require("./addSchemaToClientWithInstance");
Object.defineProperty(exports, "addSchemaToClientWithInstance", { enumerable: true, get: function () { return addSchemaToClientWithInstance_1.addSchemaToClientWithInstance; } });
//# sourceMappingURL=index.v3.js.map

2

dist/esm/runtime/bridge-types.d.ts

@@ -267,3 +267,3 @@ /**

};
export type ClientInternalsGetter = (client: any) => ClientInternals;
export type ClientInternalsGetter = (client: BaseClient) => ClientInternals;
export type BaseClient = BaseBrowserClient | BaseSSRClient;

@@ -270,0 +270,0 @@ export type BaseBrowserClient = {

@@ -12,2 +12,12 @@ import { ExtractModelMeta } from '@aws-amplify/data-schema-types';

export type CustomHeaders = Record<string, string> | (() => Promise<Record<string, string>>);
/**
* Request options that are passed to custom header functions.
* `method` and `headers` are not included in custom header functions passed to
* subscriptions.
*/
export type RequestOptions = {
url: string;
queryString: string;
method?: string;
};
export type CustomQueries<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any;

@@ -17,1 +27,31 @@ export type CustomMutations<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any;

export type ModelSortDirection = 'ASC' | 'DESC';
export type ClientExtensions<T extends Record<any, any> = never> = {
models: ModelTypes<T>;
enums: EnumTypes<T>;
queries: CustomQueries<T, 'CLIENT'>;
mutations: CustomMutations<T, 'CLIENT'>;
subscriptions: CustomSubscriptions<T, 'CLIENT'>;
};
export type ClientExtensionsSSRRequest<T extends Record<any, any> = never> = {
models: ModelTypes<T, 'REQUEST'>;
enums: EnumTypes<T>;
queries: CustomQueries<T, 'REQUEST'>;
mutations: CustomMutations<T, 'REQUEST'>;
};
export type ClientExtensionsSSRCookies<T extends Record<any, any> = never> = {
models: ModelTypes<T, 'COOKIES'>;
enums: EnumTypes<T>;
queries: CustomQueries<T, 'COOKIES'>;
mutations: CustomMutations<T, 'COOKIES'>;
};
export type ClientInternals = {
amplify: any;
authMode: any;
authToken: string | undefined;
headers: CustomHeaders | undefined;
};
export type BaseClient = {
graphql(...args: any): Promise<Record<string, any>>;
cancel(promise: Promise<any>, message?: string): boolean;
isCancelError(error: any): boolean;
};
export * from './client/index.v3';
export { addSchemaToClient } from './addSchemaToClient';
export { addSchemaToClientWithInstance } from './addSchemaToClientWithInstance';
export { BaseClient, ClientInternals } from './bridge-types';
export declare function addSchemaToClient<_T extends Record<any, any> = never>(client: any, apiGraphqlConfig: any, getInternals: any): any;
export declare function addSchemaToClientWithInstance<_T extends Record<any, any>>(client: any, params: any, getInternals: any): any;
{
"name": "@aws-amplify/data-schema",
"version": "0.16.0",
"version": "0.16.1",
"license": "Apache-2.0",

@@ -37,2 +37,3 @@ "repository": {

"types": "./dist/esm/runtime/index.d.ts",
"types@<5": "./dist/esm/runtime/index.v3.d.ts",
"import": "./dist/esm/runtime/index.mjs",

@@ -39,0 +40,0 @@ "require": "./dist/cjs/runtime/index.js",

{
"name": "@aws-amplify/data-schema/runtime",
"main": "../dist/cjs/runtime/index.js",
"typings": "./defer-to-types-versions",
"module": "../dist/esm/runtime/index.mjs",
"types": "../dist/esm/runtime/index.d.ts",
"react-native": "../src/runtime/index.ts",
"sideEffects": false
"sideEffects": false,
"typesVersions": {
"<5": {
"defer-to-types-versions": [
"../dist/esm/runtime/index.v3.d.ts"
]
},
">=5": {
"defer-to-types-versions": [
"../dist/esm/runtime/index.d.ts"
]
}
}
}

@@ -358,3 +358,3 @@ /* eslint-disable @typescript-eslint/no-namespace */

export type ClientInternalsGetter = (client: any) => ClientInternals;
export type ClientInternalsGetter = (client: BaseClient) => ClientInternals;

@@ -361,0 +361,0 @@ export type BaseClient = BaseBrowserClient | BaseSSRClient;

@@ -34,2 +34,13 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

/**
* Request options that are passed to custom header functions.
* `method` and `headers` are not included in custom header functions passed to
* subscriptions.
*/
export type RequestOptions = {
url: string;
queryString: string;
method?: string;
};
export type CustomQueries<

@@ -54,1 +65,36 @@ Schema extends Record<any, any>,

export type ModelSortDirection = 'ASC' | 'DESC';
export type ClientExtensions<T extends Record<any, any> = never> = {
models: ModelTypes<T>;
enums: EnumTypes<T>;
queries: CustomQueries<T, 'CLIENT'>;
mutations: CustomMutations<T, 'CLIENT'>;
subscriptions: CustomSubscriptions<T, 'CLIENT'>;
};
export type ClientExtensionsSSRRequest<T extends Record<any, any> = never> = {
models: ModelTypes<T, 'REQUEST'>;
enums: EnumTypes<T>;
queries: CustomQueries<T, 'REQUEST'>;
mutations: CustomMutations<T, 'REQUEST'>;
};
export type ClientExtensionsSSRCookies<T extends Record<any, any> = never> = {
models: ModelTypes<T, 'COOKIES'>;
enums: EnumTypes<T>;
queries: CustomQueries<T, 'COOKIES'>;
mutations: CustomMutations<T, 'COOKIES'>;
};
export type ClientInternals = {
amplify: any;
authMode: any;
authToken: string | undefined;
headers: CustomHeaders | undefined;
};
export type BaseClient = {
graphql(...args: any): Promise<Record<string, any>>;
cancel(promise: Promise<any>, message?: string): boolean;
isCancelError(error: any): boolean;
};

@@ -5,4 +5,9 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

export * from './client/index.v3';
export { addSchemaToClient } from './addSchemaToClient';
export { addSchemaToClientWithInstance } from './addSchemaToClientWithInstance';
export { BaseClient, ClientInternals } from './bridge-types';
export declare function addSchemaToClient<_T extends Record<any, any> = never>(
client: any,
apiGraphqlConfig: any,
getInternals: any,
): any;
export declare function addSchemaToClientWithInstance<
_T extends Record<any, any>,
>(client: any, params: any, getInternals: any): any;

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

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