@aws-amplify/data-schema
Advanced tools
Comparing version 0.0.0-top-down-types-refactor-20240529225037 to 0.0.0-top-down-types-refactor-20240530013757
@@ -1,5 +0,6 @@ | ||
import { CustomMutations, CustomQueries } from '../client'; | ||
import { CustomMutations, CustomQueries, CustomSubscriptions } from '../client'; | ||
import { BaseClient, ClientInternalsGetter, GraphQLProviderConfig } from '../bridge-types'; | ||
type OpTypes = 'queries' | 'mutations' | 'subscriptions'; | ||
export declare function generateCustomOperationsProperty<T extends Record<any, any>, OpType extends OpTypes>(client: BaseClient, config: GraphQLProviderConfig['GraphQL'], operationsType: OpType, getInternals: ClientInternalsGetter): OpType extends 'queries' ? CustomQueries<T> : CustomMutations<T>; | ||
type CustomOpsProperty<T extends Record<any, any>, OpType extends OpTypes> = OpType extends 'queries' ? CustomQueries<T> : OpType extends 'mutations' ? CustomMutations<T> : OpType extends 'subscriptions' ? CustomSubscriptions<T> : never; | ||
export declare function generateCustomOperationsProperty<T extends Record<any, any>, OpType extends OpTypes>(client: BaseClient, config: GraphQLProviderConfig['GraphQL'], operationsType: OpType, getInternals: ClientInternalsGetter): CustomOpsProperty<T, OpType>; | ||
export declare function generateCustomMutationsProperty<T extends Record<any, any>>(client: BaseClient, config: GraphQLProviderConfig['GraphQL'], getInternals: ClientInternalsGetter): import("../client").CustomOperations<import("../../util").Select<T, { | ||
@@ -12,4 +13,4 @@ __entityType: "customMutation"; | ||
export declare function generateCustomSubscriptionsProperty<T extends Record<any, any>>(client: BaseClient, config: GraphQLProviderConfig['GraphQL'], getInternals: ClientInternalsGetter): import("../client").CustomOperations<import("../../util").Select<T, { | ||
__entityType: "customMutation"; | ||
__entityType: "customSubscription"; | ||
}>, "CLIENT">; | ||
export {}; |
{ | ||
"name": "@aws-amplify/data-schema", | ||
"version": "0.0.0-top-down-types-refactor-20240529225037", | ||
"version": "0.0.0-top-down-types-refactor-20240530013757", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -10,3 +10,2 @@ import type { __modelMeta__ } from '../runtime/client'; | ||
ModelType, | ||
// RDSModelSchema, | ||
} from '../ModelSchema'; | ||
@@ -13,0 +12,0 @@ |
@@ -40,3 +40,3 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
getInternals: ClientInternalsGetter, | ||
): OpType extends 'queries' ? CustomQueries<T> : CustomMutations<T> { | ||
): CustomOpsProperty<T, OpType> { | ||
// some bundlers end up with `Amplify.configure` being called *after* generate client. | ||
@@ -46,3 +46,3 @@ // if that occurs, we need to *not error* while we wait. handling for late configuration | ||
if (!config) { | ||
return {} as any; | ||
return {} as CustomOpsProperty<T, OpType>; | ||
} | ||
@@ -55,3 +55,3 @@ | ||
if (!modelIntrospection) { | ||
return {} as any; | ||
return {} as CustomOpsProperty<T, OpType>; | ||
} | ||
@@ -63,3 +63,3 @@ | ||
if (!operations) { | ||
return {} as any; | ||
return {} as CustomOpsProperty<T, OpType>; | ||
} | ||
@@ -80,3 +80,3 @@ | ||
return ops as any; | ||
return ops as CustomOpsProperty<T, OpType>; | ||
} | ||
@@ -83,0 +83,0 @@ |
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
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
1714622
23640