@aws-amplify/data-schema-types
Advanced tools
Comparing version 0.7.14 to 0.7.15
export * from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './types.v3'; | ||
//# sourceMappingURL=index.v3.d.ts.map |
@@ -22,13 +22,20 @@ import { ConstructFactory, FunctionResources, ResourceAccessAcceptorFactory, ResourceProvider } from '@aws-amplify/plugin-types'; | ||
readonly functionSchemaAccess: FunctionSchemaAccess[]; | ||
readonly customSqlDataSourceStrategies?: CustomSqlDataSourceStrategy[]; | ||
} | ||
export type DerivedCombinedSchema = { | ||
schemas: DerivedModelSchema[]; | ||
}; | ||
export type DerivedModelSchema = { | ||
data: { | ||
types: object; | ||
configuration: SchemaConfiguration; | ||
}; | ||
transform: () => DerivedApiDefinition; | ||
}; | ||
export type JsResolverEntry = string | { | ||
type PathEntry = { | ||
relativePath: string; | ||
importLine: string; | ||
}; | ||
export type JsResolverEntry = string | PathEntry; | ||
export type SqlStatementFolderEntry = PathEntry; | ||
export type JsResolver = { | ||
@@ -48,1 +55,40 @@ typeName: 'Mutation' | 'Query' | 'Subscription'; | ||
export type DefineFunction = ConstructFactory<ResourceProvider<FunctionResources> & ResourceAccessAcceptorFactory>; | ||
export type DatasourceEngine = 'mysql' | 'postgresql' | 'dynamodb'; | ||
export type CustomSqlDataSourceStrategy = { | ||
typeName: 'Query' | 'Mutation'; | ||
fieldName: string; | ||
entry?: JsResolverEntry; | ||
}; | ||
type SubnetAZ = { | ||
subnetId: string; | ||
availabilityZone: string; | ||
}; | ||
type VpcConfig = { | ||
vpcId: string; | ||
securityGroupIds: string[]; | ||
subnetAvailabilityZones: SubnetAZ[]; | ||
}; | ||
export type DataSourceConfiguration<DE extends DatasourceEngine = DatasourceEngine> = DE extends 'dynamodb' ? { | ||
engine: DE; | ||
} : { | ||
engine: DE; | ||
connectionUri: BackendSecret; | ||
vpcConfig?: VpcConfig; | ||
identifier?: string; | ||
}; | ||
export type SchemaConfiguration<DE extends DatasourceEngine = DatasourceEngine, DC extends DataSourceConfiguration<DE> = DataSourceConfiguration<DE>> = { | ||
database: DC; | ||
}; | ||
/** | ||
* Importing the full objects from @aws-amplify/plugin-types | ||
* more than doubles dev env runtime. This type replacement | ||
* will contain the content for config without the negative | ||
* side-effects. We may need to re-approach if customers interact | ||
* with these programmatically to avoid forcing narrowing. | ||
*/ | ||
type BackendSecret = { | ||
resolve: (scope: any, backendIdentifier: any) => any; | ||
resolvePath: (backendIdentifier: any) => any; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -7,2 +7,8 @@ /** | ||
*/ | ||
/** | ||
* references IAmplifyGraphqlDefinition from: | ||
* https://github.com/aws-amplify/amplify-category-api/blob/4c0ea253a0bae51f775383929ba4748593185bc1/packages/amplify-graphql-api-construct/src/types.ts#L491-L503 | ||
* | ||
* function slots is any'd for now. Will add actual type when we add support for this feature | ||
*/ | ||
export interface DerivedApiDefinition { | ||
@@ -22,13 +28,20 @@ /** | ||
readonly functionSchemaAccess: FunctionSchemaAccess[]; | ||
readonly customSqlDataSourceStrategies?: CustomSqlDataSourceStrategy[]; | ||
} | ||
export type DerivedCombinedSchema = { | ||
schemas: DerivedModelSchema[]; | ||
}; | ||
export type DerivedModelSchema = { | ||
data: { | ||
types: object; | ||
configuration: SchemaConfiguration; | ||
}; | ||
transform: () => DerivedApiDefinition; | ||
}; | ||
export type JsResolverEntry = string | { | ||
type PathEntry = { | ||
relativePath: string; | ||
importLine: string; | ||
}; | ||
export type JsResolverEntry = string | PathEntry; | ||
export type SqlStatementFolderEntry = PathEntry; | ||
export type JsResolver = { | ||
@@ -48,1 +61,40 @@ typeName: 'Mutation' | 'Query' | 'Subscription'; | ||
export type DefineFunction = any; | ||
export type DatasourceEngine = 'mysql' | 'postgresql' | 'dynamodb'; | ||
export type CustomSqlDataSourceStrategy = { | ||
typeName: 'Query' | 'Mutation'; | ||
fieldName: string; | ||
entry?: JsResolverEntry; | ||
}; | ||
type SubnetAZ = { | ||
subnetId: string; | ||
availabilityZone: string; | ||
}; | ||
type VpcConfig = { | ||
vpcId: string; | ||
securityGroupIds: string[]; | ||
subnetAvailabilityZones: SubnetAZ[]; | ||
}; | ||
export type DataSourceConfiguration<DE extends DatasourceEngine = DatasourceEngine> = DE extends 'dynamodb' ? { | ||
engine: DE; | ||
} : { | ||
engine: DE; | ||
connectionUri: BackendSecret; | ||
vpcConfig?: VpcConfig; | ||
identifier?: string; | ||
}; | ||
export type SchemaConfiguration<DE extends DatasourceEngine = DatasourceEngine, DC extends DataSourceConfiguration<DE> = DataSourceConfiguration<DE>> = { | ||
database: DC; | ||
}; | ||
/** | ||
* Importing the full objects from @aws-amplify/plugin-types | ||
* more than doubles dev env runtime. This type replacement | ||
* will contain the content for config without the negative | ||
* side-effects. We may need to re-approach if customers interact | ||
* with these programmatically to avoid forcing narrowing. | ||
*/ | ||
type BackendSecret = { | ||
resolve: (scope: any, backendIdentifier: any) => any; | ||
resolvePath: (backendIdentifier: any) => any; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=types.v3.d.ts.map |
@@ -549,1 +549,2 @@ import type { DeepReadOnlyObject, UnwrapArray, UnionToIntersection, Prettify, Equal } from '../util'; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -16,1 +16,2 @@ export declare const __modelMeta__: unique symbol; | ||
export type ModelSortDirection = 'ASC' | 'DESC'; | ||
//# sourceMappingURL=index.v3.d.ts.map |
export * from './builder'; | ||
export * from './client'; | ||
export * from './util'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './builder/types.v3'; | ||
export * from './client/index.v3'; | ||
export * from './util'; | ||
//# sourceMappingURL=index.v3.d.ts.map |
@@ -56,1 +56,2 @@ /** | ||
} : T; | ||
//# sourceMappingURL=util.d.ts.map |
{ | ||
"name": "@aws-amplify/data-schema-types", | ||
"version": "0.7.14", | ||
"version": "0.7.15", | ||
"license": "Apache-2.0", | ||
@@ -20,2 +20,5 @@ "main": "./lib-esm/index.d.ts", | ||
"clean": "rimraf lib-esm tsconfig.tsbuildinfo", | ||
"docs": "api-extractor run && api-documenter markdown --input-folder temp --output-folder docs", | ||
"docs:temp": "api-extractor run && api-documenter markdown --input-folder temp --output-folder temp/docs", | ||
"check-api": "rimraf temp && npm run docs:temp && node ../../scripts/shallow-dir-diff.js docs temp/docs", | ||
"test": "echo \"No tests\"", | ||
@@ -22,0 +25,0 @@ "lint": "eslint ." |
@@ -30,15 +30,24 @@ import { | ||
readonly functionSchemaAccess: FunctionSchemaAccess[]; | ||
readonly customSqlDataSourceStrategies?: CustomSqlDataSourceStrategy[]; | ||
} | ||
export type DerivedCombinedSchema = { | ||
schemas: DerivedModelSchema[]; | ||
}; | ||
export type DerivedModelSchema = { | ||
data: { | ||
types: object; | ||
configuration: SchemaConfiguration; | ||
}; | ||
transform: () => DerivedApiDefinition; | ||
}; | ||
export type JsResolverEntry = | ||
| string | ||
| { relativePath: string; importLine: string }; | ||
type PathEntry = { relativePath: string; importLine: string }; | ||
export type JsResolverEntry = string | PathEntry; | ||
export type SqlStatementFolderEntry = PathEntry; | ||
export type JsResolver = { | ||
@@ -63,1 +72,50 @@ typeName: 'Mutation' | 'Query' | 'Subscription'; | ||
>; | ||
export type DatasourceEngine = 'mysql' | 'postgresql' | 'dynamodb'; | ||
export type CustomSqlDataSourceStrategy = { | ||
typeName: 'Query' | 'Mutation'; | ||
fieldName: string; | ||
entry?: JsResolverEntry; | ||
}; | ||
type SubnetAZ = { | ||
subnetId: string; | ||
availabilityZone: string; | ||
}; | ||
type VpcConfig = { | ||
vpcId: string; | ||
securityGroupIds: string[]; | ||
subnetAvailabilityZones: SubnetAZ[]; | ||
}; | ||
export type DataSourceConfiguration< | ||
DE extends DatasourceEngine = DatasourceEngine, | ||
> = DE extends 'dynamodb' | ||
? { engine: DE } | ||
: { | ||
engine: DE; | ||
connectionUri: BackendSecret; | ||
vpcConfig?: VpcConfig; | ||
identifier?: string; | ||
}; | ||
export type SchemaConfiguration< | ||
DE extends DatasourceEngine = DatasourceEngine, | ||
DC extends DataSourceConfiguration<DE> = DataSourceConfiguration<DE>, | ||
> = { | ||
database: DC; | ||
}; | ||
/** | ||
* Importing the full objects from @aws-amplify/plugin-types | ||
* more than doubles dev env runtime. This type replacement | ||
* will contain the content for config without the negative | ||
* side-effects. We may need to re-approach if customers interact | ||
* with these programmatically to avoid forcing narrowing. | ||
*/ | ||
type BackendSecret = { | ||
resolve: (scope: any, backendIdentifier: any) => any; | ||
resolvePath: (backendIdentifier: any) => any; | ||
}; |
@@ -8,2 +8,9 @@ /** | ||
/** | ||
* references IAmplifyGraphqlDefinition from: | ||
* https://github.com/aws-amplify/amplify-category-api/blob/4c0ea253a0bae51f775383929ba4748593185bc1/packages/amplify-graphql-api-construct/src/types.ts#L491-L503 | ||
* | ||
* function slots is any'd for now. Will add actual type when we add support for this feature | ||
*/ | ||
export interface DerivedApiDefinition { | ||
@@ -24,15 +31,24 @@ /** | ||
readonly functionSchemaAccess: FunctionSchemaAccess[]; | ||
readonly customSqlDataSourceStrategies?: CustomSqlDataSourceStrategy[]; | ||
} | ||
export type DerivedCombinedSchema = { | ||
schemas: DerivedModelSchema[]; | ||
}; | ||
export type DerivedModelSchema = { | ||
data: { | ||
types: object; | ||
configuration: SchemaConfiguration; | ||
}; | ||
transform: () => DerivedApiDefinition; | ||
}; | ||
export type JsResolverEntry = | ||
| string | ||
| { relativePath: string; importLine: string }; | ||
type PathEntry = { relativePath: string; importLine: string }; | ||
export type JsResolverEntry = string | PathEntry; | ||
export type SqlStatementFolderEntry = PathEntry; | ||
export type JsResolver = { | ||
@@ -55,1 +71,50 @@ typeName: 'Mutation' | 'Query' | 'Subscription'; | ||
export type DefineFunction = any; | ||
export type DatasourceEngine = 'mysql' | 'postgresql' | 'dynamodb'; | ||
export type CustomSqlDataSourceStrategy = { | ||
typeName: 'Query' | 'Mutation'; | ||
fieldName: string; | ||
entry?: JsResolverEntry; | ||
}; | ||
type SubnetAZ = { | ||
subnetId: string; | ||
availabilityZone: string; | ||
}; | ||
type VpcConfig = { | ||
vpcId: string; | ||
securityGroupIds: string[]; | ||
subnetAvailabilityZones: SubnetAZ[]; | ||
}; | ||
export type DataSourceConfiguration< | ||
DE extends DatasourceEngine = DatasourceEngine, | ||
> = DE extends 'dynamodb' | ||
? { engine: DE } | ||
: { | ||
engine: DE; | ||
connectionUri: BackendSecret; | ||
vpcConfig?: VpcConfig; | ||
identifier?: string; | ||
}; | ||
export type SchemaConfiguration< | ||
DE extends DatasourceEngine = DatasourceEngine, | ||
DC extends DataSourceConfiguration<DE> = DataSourceConfiguration<DE>, | ||
> = { | ||
database: DC; | ||
}; | ||
/** | ||
* Importing the full objects from @aws-amplify/plugin-types | ||
* more than doubles dev env runtime. This type replacement | ||
* will contain the content for config without the negative | ||
* side-effects. We may need to re-approach if customers interact | ||
* with these programmatically to avoid forcing narrowing. | ||
*/ | ||
type BackendSecret = { | ||
resolve: (scope: any, backendIdentifier: any) => any; | ||
resolvePath: (backendIdentifier: any) => any; | ||
}; |
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
115184
29
1985