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

@aws-amplify/graphql-transformer-interfaces

Package Overview
Dependencies
Maintainers
10
Versions
319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/graphql-transformer-interfaces - npm Package Compare versions

Comparing version 3.3.0-rds-5.0 to 3.3.0

76

API.md

@@ -158,3 +158,6 @@ ## API Report File for "@aws-amplify/graphql-transformer-interfaces"

// @public (undocumented)
export interface DatasourceType {
export type DataSourceProvisionStrategy = DynamoDBProvisionStrategy | SQLLambdaModelProvisionStrategy;
// @public (undocumented)
export interface DataSourceType {
// (undocumented)

@@ -164,6 +167,8 @@ dbType: DBType;

provisionDB: boolean;
// (undocumented)
provisionStrategy: DataSourceProvisionStrategy;
}
// @public (undocumented)
export type DBType = 'DDB' | 'MySQL' | 'Postgres';
export type DBType = 'DDB' | SQLDBType;

@@ -177,2 +182,10 @@ // @public (undocumented)

// @public (undocumented)
export const enum DynamoDBProvisionStrategy {
// (undocumented)
AMPLIFY_TABLE = "AMPLIFY_TABLE",
// (undocumented)
DEFAULT = "DEFAULT"
}
// @public (undocumented)
export type FieldMapEntry = {

@@ -250,2 +263,8 @@ originalFieldName: string;

// @public (undocumented)
export interface ProvisionedConcurrencyConfig {
// (undocumented)
readonly provisionedConcurrentExecutions: number;
}
// @public (undocumented)
export enum QueryFieldType {

@@ -261,7 +280,8 @@ // (undocumented)

// @public (undocumented)
export type RDSLayerMapping = {
[key: string]: {
export interface RDSLayerMapping {
// (undocumented)
readonly [key: string]: {
layerRegion: string;
};
};
}

@@ -313,2 +333,11 @@ // @public (undocumented)

// @public (undocumented)
export type SQLDBType = 'MySQL' | 'Postgres';
// @public (undocumented)
export const enum SQLLambdaModelProvisionStrategy {
// (undocumented)
DEFAULT = "DEFAULT"
}
// @public (undocumented)
export interface StackManagerProvider {

@@ -332,6 +361,8 @@ // (undocumented)

// @public (undocumented)
export type SubnetAvailabilityZone = {
SubnetId: string;
AvailabilityZone: string;
};
export interface SubnetAvailabilityZone {
// (undocumented)
readonly availabilityZone: string;
// (undocumented)
readonly subnetId: string;
}

@@ -446,3 +477,3 @@ // @public (undocumented)

// (undocumented)
modelToDatasourceMap: Map<string, DatasourceType>;
modelToDatasourceMap: Map<string, DataSourceType>;
// (undocumented)

@@ -459,2 +490,4 @@ output: TransformerContextOutputProvider;

// (undocumented)
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
// (undocumented)
readonly sqlLambdaVpcConfig?: VpcConfig;

@@ -472,7 +505,7 @@ // (undocumented)

// (undocumented)
add(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance): void;
add: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance) => void;
// (undocumented)
get(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): DataSourceInstance;
get: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => DataSourceInstance;
// (undocumented)
has(name: string): boolean;
has: (name: string) => boolean;
}

@@ -768,2 +801,4 @@

sandboxModeEnabled: boolean;
allowDestructiveGraphqlSchemaUpdates: boolean;
replaceTableUponGsiUpdate: boolean;
useSubUsernameForDefaultIdentityClaim: boolean;

@@ -785,11 +820,14 @@ populateOwnerFieldForStaticGroupAuth: boolean;

// @public (undocumented)
export type VpcConfig = {
vpcId: string;
subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
securityGroupIds: string[];
};
export interface VpcConfig {
// (undocumented)
readonly securityGroupIds: string[];
// (undocumented)
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
// (undocumented)
readonly vpcId: string;
}
// Warnings were encountered during analysis:
//
// src/graphql-api-provider.ts:34:3 - (ae-forgotten-export) The symbol "OpenIDConnectConfig" needs to be exported by the entry point index.d.ts
// src/graphql-api-provider.ts:35:3 - (ae-forgotten-export) The symbol "OpenIDConnectConfig" needs to be exported by the entry point index.d.ts

@@ -796,0 +834,0 @@ // (No @packageDocumentation comment for this package)

@@ -6,6 +6,7 @@ # Change Log

# [3.3.0-rds-5.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-interfaces@3.2.1...@aws-amplify/graphql-transformer-interfaces@3.3.0-rds-5.0) (2023-11-01)
# [3.3.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-interfaces@3.2.2...@aws-amplify/graphql-transformer-interfaces@3.3.0) (2023-11-15)
### Features
- add managed table support in API construct ([#2024](https://github.com/aws-amplify/amplify-category-api/issues/2024)) ([96a0d94](https://github.com/aws-amplify/amplify-category-api/commit/96a0d94fa872a5329da120f53be139833449b815)), closes [#1849](https://github.com/aws-amplify/amplify-category-api/issues/1849) [#1903](https://github.com/aws-amplify/amplify-category-api/issues/1903) [#1940](https://github.com/aws-amplify/amplify-category-api/issues/1940) [#1971](https://github.com/aws-amplify/amplify-category-api/issues/1971) [#1973](https://github.com/aws-amplify/amplify-category-api/issues/1973)
- add postgres engine and update types as needed ([#1979](https://github.com/aws-amplify/amplify-category-api/issues/1979)) ([5257d53](https://github.com/aws-amplify/amplify-category-api/commit/5257d53f1d4d02be71b34ddf6757f22dd5d74aff))

@@ -15,3 +16,11 @@ - Add SQL database support to AmplifyGraphqlApi construct ([#1986](https://github.com/aws-amplify/amplify-category-api/issues/1986)) ([2ff63a5](https://github.com/aws-amplify/amplify-category-api/commit/2ff63a540387d96cf10d8ae1975858a76d9ba045)), closes [#1917](https://github.com/aws-amplify/amplify-category-api/issues/1917) [#1983](https://github.com/aws-amplify/amplify-category-api/issues/1983)

- **api:** custom queries support using sql directive ([5214037](https://github.com/aws-amplify/amplify-category-api/commit/52140374ca974956c5d5eac09fec91a51cfc9027))
- sql lambda provisioned concurrency ([#2055](https://github.com/aws-amplify/amplify-category-api/issues/2055)) ([d8c5bf0](https://github.com/aws-amplify/amplify-category-api/commit/d8c5bf0b7df3cdd1ad499380d24fe49a61acbc7e))
- transformer behavior of replacing table upon gsi updates ([#2067](https://github.com/aws-amplify/amplify-category-api/issues/2067)) ([c4b7530](https://github.com/aws-amplify/amplify-category-api/commit/c4b7530e0880b34d411fc2732fa199e4a28bcea1))
## [3.2.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-interfaces@3.2.1...@aws-amplify/graphql-transformer-interfaces@3.2.2) (2023-11-02)
### Bug Fixes
- pass in and use correct lambda arn for lambdaauthorizers ([#2007](https://github.com/aws-amplify/amplify-category-api/issues/2007)) ([4114411](https://github.com/aws-amplify/amplify-category-api/commit/4114411ba6d086d46ac0e9967139cb287e3fc22b))
## [3.2.1](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-interfaces@3.2.0...@aws-amplify/graphql-transformer-interfaces@3.2.1) (2023-10-05)

@@ -18,0 +27,0 @@

@@ -47,18 +47,22 @@ import { CfnResource, IAsset } from 'aws-cdk-lib';

lambdaFunction: string;
lambdaArn?: string;
ttlSeconds?: number;
}
export type VpcConfig = {
vpcId: string;
subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
securityGroupIds: string[];
};
export type SubnetAvailabilityZone = {
SubnetId: string;
AvailabilityZone: string;
};
export type RDSLayerMapping = {
[key: string]: {
export interface VpcConfig {
readonly vpcId: string;
readonly securityGroupIds: string[];
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
}
export interface ProvisionedConcurrencyConfig {
readonly provisionedConcurrentExecutions: number;
}
export interface SubnetAvailabilityZone {
readonly subnetId: string;
readonly availabilityZone: string;
}
export interface RDSLayerMapping {
readonly [key: string]: {
layerRegion: string;
};
};
}
export interface AppSyncFunctionConfigurationProvider extends IConstruct {

@@ -65,0 +69,0 @@ readonly arn: string;

export * from './transformer-context';
export { TransformerPluginProvider, TransformerPluginType } from './transformer-plugin-provider';
export { MutationFieldType, QueryFieldType, SubscriptionFieldType, TransformerModelProvider, TransformerModelEnhancementProvider, TransformerAuthProvider, } from './transformer-model-provider';
export { GraphQLAPIProvider, AppSyncFunctionConfigurationProvider, DataSourceOptions, MappingTemplateProvider, S3MappingTemplateProvider, S3MappingFunctionCodeProvider, InlineMappingTemplateProvider, APIIAMResourceProvider, TemplateType as MappingTemplateType, AppSyncAuthConfiguration, AppSyncAuthConfigurationAPIKeyEntry, AppSyncAuthConfigurationEntry, AppSyncAuthConfigurationIAMEntry, ApiKeyConfig, AppSyncAuthConfigurationOIDCEntry, AppSyncAuthConfigurationUserPoolEntry, AppSyncAuthMode, UserPoolConfig, VpcConfig, SubnetAvailabilityZone, SearchableDataSourceOptions, RDSLayerMapping, } from './graphql-api-provider';
export { GraphQLAPIProvider, AppSyncFunctionConfigurationProvider, DataSourceOptions, MappingTemplateProvider, S3MappingTemplateProvider, S3MappingFunctionCodeProvider, InlineMappingTemplateProvider, APIIAMResourceProvider, TemplateType as MappingTemplateType, AppSyncAuthConfiguration, AppSyncAuthConfigurationAPIKeyEntry, AppSyncAuthConfigurationEntry, AppSyncAuthConfigurationIAMEntry, ApiKeyConfig, AppSyncAuthConfigurationOIDCEntry, AppSyncAuthConfigurationUserPoolEntry, AppSyncAuthMode, UserPoolConfig, VpcConfig, SubnetAvailabilityZone, SearchableDataSourceOptions, RDSLayerMapping, ProvisionedConcurrencyConfig, } from './graphql-api-provider';
export { TransformHostProvider, DynamoDbDataSourceOptions } from './transform-host-provider';

@@ -6,0 +6,0 @@ export { TransformerLog, TransformerLogLevel } from './transformer-log';

@@ -1,2 +0,2 @@

export { DataSourceProvider, TransformerDataSourceManagerProvider, AppSyncDataSourceType, DataSourceInstance, DBType, DatasourceType, } from './transformer-datasource-provider';
export { DataSourceProvider, TransformerDataSourceManagerProvider, AppSyncDataSourceType, DataSourceInstance, DataSourceType, DBType, DataSourceProvisionStrategy, DynamoDBProvisionStrategy, SQLLambdaModelProvisionStrategy, SQLDBType, } from './transformer-datasource-provider';
export { TransformerContextOutputProvider } from './transformer-context-output-provider';

@@ -3,0 +3,0 @@ export { TransformerProviderRegistry } from './transformer-provider-registry';

@@ -17,6 +17,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AppSyncDataSourceType = void 0;
exports.SQLLambdaModelProvisionStrategy = exports.DynamoDBProvisionStrategy = exports.AppSyncDataSourceType = void 0;
var transformer_datasource_provider_1 = require("./transformer-datasource-provider");
Object.defineProperty(exports, "AppSyncDataSourceType", { enumerable: true, get: function () { return transformer_datasource_provider_1.AppSyncDataSourceType; } });
Object.defineProperty(exports, "DynamoDBProvisionStrategy", { enumerable: true, get: function () { return transformer_datasource_provider_1.DynamoDBProvisionStrategy; } });
Object.defineProperty(exports, "SQLLambdaModelProvisionStrategy", { enumerable: true, get: function () { return transformer_datasource_provider_1.SQLLambdaModelProvisionStrategy; } });
__exportStar(require("./resource-resource-provider"), exports);
//# sourceMappingURL=index.js.map

@@ -6,2 +6,4 @@ export type TransformParameters = {

sandboxModeEnabled: boolean;
allowDestructiveGraphqlSchemaUpdates: boolean;
replaceTableUponGsiUpdate: boolean;
useSubUsernameForDefaultIdentityClaim: boolean;

@@ -8,0 +10,0 @@ populateOwnerFieldForStaticGroupAuth: boolean;

import { DocumentNode } from 'graphql';
import { AppSyncAuthConfiguration, GraphQLAPIProvider, RDSLayerMapping, VpcConfig } from '../graphql-api-provider';
import { TransformerDataSourceManagerProvider, DatasourceType } from './transformer-datasource-provider';
import { AppSyncAuthConfiguration, GraphQLAPIProvider, RDSLayerMapping, VpcConfig, ProvisionedConcurrencyConfig } from '../graphql-api-provider';
import { TransformerDataSourceManagerProvider, DataSourceType } from './transformer-datasource-provider';
import { TransformerProviderRegistry } from './transformer-provider-registry';

@@ -25,3 +25,3 @@ import { TransformerContextOutputProvider } from './transformer-context-output-provider';

inputDocument: DocumentNode;
modelToDatasourceMap: Map<string, DatasourceType>;
modelToDatasourceMap: Map<string, DataSourceType>;
datasourceSecretParameterLocations: Map<string, TransformerSecrets>;

@@ -40,2 +40,3 @@ output: TransformerContextOutputProvider;

readonly rdsLayerMapping?: RDSLayerMapping;
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
}

@@ -42,0 +43,0 @@ export type TransformerBeforeStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'modelToDatasourceMap' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'authConfig' | 'stackManager' | 'synthParameters'>;

@@ -19,13 +19,23 @@ import { BackedDataSource, HttpDataSource } from 'aws-cdk-lib/aws-appsync';

export interface TransformerDataSourceManagerProvider {
add(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance): void;
get(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): DataSourceInstance;
has(name: string): boolean;
add: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance) => void;
get: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => DataSourceInstance;
has: (name: string) => boolean;
}
export interface DataSourceProvider extends BackedDataSource {
}
export type DBType = 'DDB' | 'MySQL' | 'Postgres';
export interface DatasourceType {
export type DBType = 'DDB' | SQLDBType;
export type SQLDBType = 'MySQL' | 'Postgres';
export type DataSourceProvisionStrategy = DynamoDBProvisionStrategy | SQLLambdaModelProvisionStrategy;
export declare const enum DynamoDBProvisionStrategy {
DEFAULT = "DEFAULT",
AMPLIFY_TABLE = "AMPLIFY_TABLE"
}
export declare const enum SQLLambdaModelProvisionStrategy {
DEFAULT = "DEFAULT"
}
export interface DataSourceType {
dbType: DBType;
provisionDB: boolean;
provisionStrategy: DataSourceProvisionStrategy;
}
//# sourceMappingURL=transformer-datasource-provider.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppSyncDataSourceType = void 0;
exports.SQLLambdaModelProvisionStrategy = exports.DynamoDBProvisionStrategy = exports.AppSyncDataSourceType = void 0;
var AppSyncDataSourceType;

@@ -13,2 +13,11 @@ (function (AppSyncDataSourceType) {

})(AppSyncDataSourceType = exports.AppSyncDataSourceType || (exports.AppSyncDataSourceType = {}));
var DynamoDBProvisionStrategy;
(function (DynamoDBProvisionStrategy) {
DynamoDBProvisionStrategy["DEFAULT"] = "DEFAULT";
DynamoDBProvisionStrategy["AMPLIFY_TABLE"] = "AMPLIFY_TABLE";
})(DynamoDBProvisionStrategy = exports.DynamoDBProvisionStrategy || (exports.DynamoDBProvisionStrategy = {}));
var SQLLambdaModelProvisionStrategy;
(function (SQLLambdaModelProvisionStrategy) {
SQLLambdaModelProvisionStrategy["DEFAULT"] = "DEFAULT";
})(SQLLambdaModelProvisionStrategy = exports.SQLLambdaModelProvisionStrategy || (exports.SQLLambdaModelProvisionStrategy = {}));
//# sourceMappingURL=transformer-datasource-provider.js.map
{
"name": "@aws-amplify/graphql-transformer-interfaces",
"version": "3.3.0-rds-5.0",
"version": "3.3.0",
"description": "Amplify GraphQL transformer interface definitions",

@@ -52,3 +52,3 @@ "repository": {

},
"gitHead": "ddbbff11d6a070cb4d2b9708c60c734a5d139bfc"
"gitHead": "857bf7833e84e2a88ea19f17b087c202e454bf80"
}
import { CfnResource, IAsset } from 'aws-cdk-lib';
import { Construct, IConstruct } from 'constructs';
import { Grant, IGrantable, IRole } from 'aws-cdk-lib/aws-iam';
// eslint-disable-next-line import/no-cycle
import { TransformHostProvider } from './transform-host-provider';

@@ -59,3 +60,16 @@

export interface LambdaConfig {
/**
* Function name, excluding optional `-{env}` suffix.
*/
lambdaFunction: string;
/**
* The ARN of an existing Lambda function. If provided, this will circumvent the ARN construction when building the API auth mode config.
* The ARN must refer to the same function named in `lambdaFunction`.
*/
lambdaArn?: string;
/**
* Optional auth response time to live.
*/
ttlSeconds?: number;

@@ -65,12 +79,24 @@ }

/**
* VpcConfig required to deploy a Lambda function in a VPC. The SQL Lambda will be deployed into the specified VPC, subnets, and security
* groups. The specified subnets and security groups must be in the same VPC. The VPC must have at least one subnet. The construct will also
* create VPC endpoints in the specified subnets, as well as inbound security rules to allow traffic on port 443 within each security group,
* to allow the Lambda to read database connection information from Secure Systems Manager. */
export type VpcConfig = {
vpcId: string;
subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
securityGroupIds: string[];
};
* Configuration of the VPC in which to install a Lambda to resolve queries against a SQL-based data source. The SQL Lambda will be deployed
* into the specified VPC, subnets, and security groups. The specified subnets and security groups must be in the same VPC. The VPC must
* have at least one subnet. The construct will also create VPC service endpoints in the specified subnets, as well as inbound security
* rules, to allow traffic on port 443 within each security group. This allows the Lambda to read database connection information from
* Secure Systems Manager.
* @experimental
*/
export interface VpcConfig {
/** The VPC to install the Lambda data source in. */
readonly vpcId: string;
/** The security groups to install the Lambda data source in. */
readonly securityGroupIds: string[];
/** The subnets to install the Lambda data source in, one per availability zone. */
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
}
export interface ProvisionedConcurrencyConfig {
readonly provisionedConcurrentExecutions: number;
}
/**

@@ -80,15 +106,15 @@ * Although it is possible to create multiple subnets in a single availability zone, VPC Endpoints may only be deployed to a single subnet

*/
export type SubnetAvailabilityZone = {
SubnetId: string;
AvailabilityZone: string;
};
export interface SubnetAvailabilityZone {
readonly subnetId: string;
readonly availabilityZone: string;
}
/**
* Maps a given AWS region to the SQL Lambda layer version ARN for that region.
* Maps a given AWS region to the SQL Lambda layer version ARN for that region. TODO: Rename to SQLLambdaLayerMapping
*/
export type RDSLayerMapping = {
[key: string]: {
export interface RDSLayerMapping {
readonly [key: string]: {
layerRegion: string;
};
};
}

@@ -95,0 +121,0 @@ export interface AppSyncFunctionConfigurationProvider extends IConstruct {

@@ -0,1 +1,2 @@

// eslint-disable-next-line import/no-cycle
export * from './transformer-context';

@@ -34,2 +35,3 @@ export { TransformerPluginProvider, TransformerPluginType } from './transformer-plugin-provider';

RDSLayerMapping,
ProvisionedConcurrencyConfig,
} from './graphql-api-provider';

@@ -36,0 +38,0 @@ export { TransformHostProvider, DynamoDbDataSourceOptions } from './transform-host-provider';

@@ -6,4 +6,8 @@ export {

DataSourceInstance,
DataSourceType,
DBType,
DatasourceType,
DataSourceProvisionStrategy,
DynamoDBProvisionStrategy,
SQLLambdaModelProvisionStrategy,
SQLDBType,
} from './transformer-datasource-provider';

@@ -10,0 +14,0 @@ export { TransformerContextOutputProvider } from './transformer-context-output-provider';

@@ -15,2 +15,4 @@ /**

sandboxModeEnabled: boolean;
allowDestructiveGraphqlSchemaUpdates: boolean;
replaceTableUponGsiUpdate: boolean;

@@ -17,0 +19,0 @@ // Auth Params

import { DocumentNode } from 'graphql';
import { AppSyncAuthConfiguration, GraphQLAPIProvider, RDSLayerMapping, VpcConfig } from '../graphql-api-provider';
import { TransformerDataSourceManagerProvider, DatasourceType } from './transformer-datasource-provider';
import {
AppSyncAuthConfiguration,
GraphQLAPIProvider,
RDSLayerMapping,
VpcConfig,
ProvisionedConcurrencyConfig,
} from '../graphql-api-provider';
import { TransformerDataSourceManagerProvider, DataSourceType } from './transformer-datasource-provider';
import { TransformerProviderRegistry } from './transformer-provider-registry';

@@ -27,3 +33,3 @@ import { TransformerContextOutputProvider } from './transformer-context-output-provider';

inputDocument: DocumentNode;
modelToDatasourceMap: Map<string, DatasourceType>;
modelToDatasourceMap: Map<string, DataSourceType>;
datasourceSecretParameterLocations: Map<string, TransformerSecrets>;

@@ -43,2 +49,3 @@ output: TransformerContextOutputProvider;

readonly rdsLayerMapping?: RDSLayerMapping;
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
}

@@ -45,0 +52,0 @@

@@ -23,5 +23,5 @@ import { BackedDataSource, HttpDataSource } from 'aws-cdk-lib/aws-appsync';

export interface TransformerDataSourceManagerProvider {
add(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance): void;
get(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): DataSourceInstance;
has(name: string): boolean;
add: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance) => void;
get: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => DataSourceInstance;
has: (name: string) => boolean;
}

@@ -32,13 +32,42 @@

/**
* Supported transformable database types.
* Supported transformable database types. TODO: Move this to amplify-graphql-api-construct
*/
export type DBType = 'DDB' | 'MySQL' | 'Postgres';
export type DBType = 'DDB' | SQLDBType;
/**
* Configuration for a datasource. Defines the underlying database engine, and instructs the tranformer whether to provision the database
* storage or whether it already exists.
* Supported transformable SQL database types. TODO: Move this to amplify-graphql-api-construct
*/
export interface DatasourceType {
export type SQLDBType = 'MySQL' | 'Postgres';
// TODO: add strategy for the RDS. TODO: Move this to amplify-graphql-api-construct
export type DataSourceProvisionStrategy = DynamoDBProvisionStrategy | SQLLambdaModelProvisionStrategy;
/**
* Provisioning configuration for a DynamoDB datasource. TODO: Remove this type in favor of strategy definitions in
* amplify-graphql-api-construct
*/
export const enum DynamoDBProvisionStrategy {
/**
* Use default CloudFormation resource of `AWS::DynamoDB::Table`
*/
DEFAULT = 'DEFAULT',
/**
* Use custom resource type `Custom::AmplifyDynamoDBTable`
*/
AMPLIFY_TABLE = 'AMPLIFY_TABLE',
}
// TODO: Remove this type in favor of fully-specified SQLLambdaModelDataSourceStrategy from amplify-graphql-api-construct
export const enum SQLLambdaModelProvisionStrategy {
/**
* A strategy that creates a Lambda to connect to a pre-existing SQL table to resolve model data.
*/
DEFAULT = 'DEFAULT',
}
// TODO: Replace usages of this type with ModelDataSourceStrategy
export interface DataSourceType {
dbType: DBType;
provisionDB: boolean;
provisionStrategy: DataSourceProvisionStrategy;
}

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

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

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