Socket
Socket
Sign inDemoInstall

@aws-amplify/data-schema-types

Package Overview
Dependencies
2
Maintainers
10
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.4 to 0.7.5

21

lib-esm/client/index.d.ts

@@ -455,2 +455,23 @@ import { DeepReadOnlyObject, UnwrapArray, UnionToIntersection, Prettify, Equal } from '../util';

};
export type CustomQueries<Schema extends Record<any, any>, Context extends ContextType = 'CLIENT', ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = CustomOperations<Schema, 'Query', Context, ModelMeta>;
export type CustomMutations<Schema extends Record<any, any>, Context extends ContextType = 'CLIENT', ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = CustomOperations<Schema, 'Mutation', Context, ModelMeta>;
export type CustomOperations<Schema extends Record<any, any>, OperationType extends 'Query' | 'Mutation' | 'Subscription', Context extends ContextType = 'CLIENT', ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = {
[OpName in keyof ModelMeta['customOperations'] as ModelMeta['customOperations'][OpName]['typeName'] extends OperationType ? OpName : never]: {
CLIENT: (input: ModelMeta['customOperations'][OpName]['arguments'], options?: {
authMode?: AuthMode;
authToken?: string;
headers?: CustomHeaders;
}) => SingularReturnValue<ModelMeta['customOperations'][OpName]['returnType']>;
COOKIES: (input: ModelMeta['customOperations'][OpName]['arguments'], options?: {
authMode?: AuthMode;
authToken?: string;
headers?: CustomHeaders;
}) => SingularReturnValue<ModelMeta['customOperations'][OpName]['returnType']>;
REQUEST: (contextSpec: any, input: ModelMeta['customOperations'][OpName]['arguments'], options?: {
authMode?: AuthMode;
authToken?: string;
headers?: CustomHeaders;
}) => SingularReturnValue<ModelMeta['customOperations'][OpName]['returnType']>;
}[Context];
};
/**

@@ -457,0 +478,0 @@ * The utility type that is used to infer the type (interface) of the generated

2

lib-esm/client/index.v3.d.ts

@@ -12,1 +12,3 @@ export declare const __modelMeta__: unique symbol;

export type CustomHeaders = Record<string, string> | (() => Promise<Record<string, string>>);
export type CustomQueries<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any;
export type CustomMutations<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any;

2

package.json
{
"name": "@aws-amplify/data-schema-types",
"version": "0.7.4",
"version": "0.7.5",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "main": "./lib-esm/index.d.ts",

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

export type CustomQueries<
Schema extends Record<any, any>,
Context extends ContextType = 'CLIENT',
ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>,
> = CustomOperations<Schema, 'Query', Context, ModelMeta>;
export type CustomMutations<
Schema extends Record<any, any>,
Context extends ContextType = 'CLIENT',
ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>,
> = CustomOperations<Schema, 'Mutation', Context, ModelMeta>;
export type CustomOperations<
Schema extends Record<any, any>,
OperationType extends 'Query' | 'Mutation' | 'Subscription',
Context extends ContextType = 'CLIENT',
ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>,
> = {
[OpName in keyof ModelMeta['customOperations'] as ModelMeta['customOperations'][OpName]['typeName'] extends OperationType
? OpName
: never]: {
CLIENT: (
input: ModelMeta['customOperations'][OpName]['arguments'],
options?: {
// selectionSet?: SelectionSet;
authMode?: AuthMode;
authToken?: string;
headers?: CustomHeaders;
},
) => SingularReturnValue<
ModelMeta['customOperations'][OpName]['returnType']
>;
COOKIES: (
input: ModelMeta['customOperations'][OpName]['arguments'],
options?: {
// selectionSet?: SelectionSet;
authMode?: AuthMode;
authToken?: string;
headers?: CustomHeaders;
},
) => SingularReturnValue<
ModelMeta['customOperations'][OpName]['returnType']
>;
REQUEST: (
contextSpec: any,
input: ModelMeta['customOperations'][OpName]['arguments'],
options?: {
// selectionSet?: SelectionSet;
authMode?: AuthMode;
authToken?: string;
headers?: CustomHeaders;
},
) => SingularReturnValue<
ModelMeta['customOperations'][OpName]['returnType']
>;
}[Context];
};
/**

@@ -729,0 +787,0 @@ * The utility type that is used to infer the type (interface) of the generated

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

| (() => Promise<Record<string, string>>);
export type CustomQueries<
Schema extends Record<any, any>,
_Context extends string = 'CLIENT',
_ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>,
> = any;
export type CustomMutations<
Schema extends Record<any, any>,
_Context extends string = 'CLIENT',
_ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>,
> = any;
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc