@aws-amplify/data-schema
Advanced tools
Comparing version 0.12.5 to 0.12.6
import type { DerivedApiDefinition, SetTypeSubArg } from '@aws-amplify/data-schema-types'; | ||
import type { ModelType, ModelTypeParamShape, InternalModel } from './ModelType'; | ||
import type { EnumType } from './EnumType'; | ||
import type { CustomType } from './CustomType'; | ||
import type { InternalCustom } from './CustomOperation'; | ||
import type { EnumType, EnumTypeParamShape } from './EnumType'; | ||
import type { CustomType, CustomTypeParamShape } from './CustomType'; | ||
import type { CustomOperation, CustomOperationParamShape, InternalCustom } from './CustomOperation'; | ||
export { __auth } from './ModelField'; | ||
import { Authorization } from './Authorization'; | ||
type ModelSchemaModels = Record<string, ModelType<ModelTypeParamShape, any>>; | ||
type SchemaContent = ModelType<ModelTypeParamShape, any> | CustomType<CustomTypeParamShape> | EnumType<EnumTypeParamShape> | CustomOperation<CustomOperationParamShape, any>; | ||
type ModelSchemaContents = Record<string, SchemaContent>; | ||
type InternalSchemaModels = Record<string, InternalModel | EnumType<any> | CustomType<any> | InternalCustom>; | ||
export type ModelSchemaParamShape = { | ||
types: ModelSchemaModels; | ||
types: ModelSchemaContents; | ||
authorization: Authorization<any, any, any>[]; | ||
@@ -43,5 +44,5 @@ }; | ||
*/ | ||
export declare function schema<Types extends ModelSchemaModels>(types: Types): ModelSchema<{ | ||
export declare function schema<Types extends ModelSchemaContents>(types: Types): ModelSchema<{ | ||
types: Types; | ||
authorization: []; | ||
}>; |
@@ -1,2 +0,2 @@ | ||
import type { SetTypeSubArg } from '@aws-amplify/data-schema-types'; | ||
import type { Brand, SetTypeSubArg } from '@aws-amplify/data-schema-types'; | ||
import { ModelField, InternalField } from './ModelField'; | ||
@@ -8,2 +8,3 @@ import type { ModelRelationalField, InternalRelationalField } from './ModelRelationalField'; | ||
import { CustomType, CustomTypeParamShape } from './CustomType'; | ||
declare const brand = "modelType"; | ||
type ModelFields = Record<string, ModelField<any, any, any> | ModelRelationalField<any, string, any, any> | RefType<any, any, any> | EnumType<EnumTypeParamShape> | CustomType<CustomTypeParamShape>>; | ||
@@ -38,3 +39,3 @@ type InternalModelFields = Record<string, InternalField | InternalRelationalField>; | ||
authorization<AuthRuleType extends Authorization<any, any, any>>(rules: AuthRuleType[]): ModelType<SetTypeSubArg<T, 'authorization', AuthRuleType[]>, K | 'authorization'>; | ||
}, K>; | ||
}, K> & Brand<object, typeof brand>; | ||
/** | ||
@@ -41,0 +42,0 @@ * Internal representation of Model Type that exposes the `data` property. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.model = void 0; | ||
const brand = 'modelType'; | ||
function _model(fields) { | ||
@@ -5,0 +6,0 @@ const data = { |
{ | ||
"name": "@aws-amplify/data-schema", | ||
"version": "0.12.5", | ||
"version": "0.12.6", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
199610
2541