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

@amplication/code-gen-types

Package Overview
Dependencies
Maintainers
8
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplication/code-gen-types - npm Package Compare versions

Comparing version 2.0.19 to 2.0.20

2

package.json
{
"name": "@amplication/code-gen-types",
"version": "2.0.19",
"version": "2.0.20",
"description": "This library supplies all the contracts for Amplication Code Generation. The purpose is to make the contracts available for inclusion in plugins.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -6,3 +6,3 @@ import type { namedTypes } from "ast-types";

import { BuildLogger } from "./build-logger";
export { EnumDataType, EnumEntityAction, EnumEntityPermissionType, EnumMessagePatternConnectionOptions, } from "./models";
export { EnumDataType, EnumEntityAction, EnumEntityPermissionType, EnumMessagePatternConnectionOptions, EnumModuleActionType, EnumModuleActionGqlOperation, EnumModuleActionRestVerb, } from "./models";
export type ServiceSettings = Omit<BlockOmittedFields<models.ServiceSettings>, "id">;

@@ -149,3 +149,35 @@ export type AppInfo = {

export type PluginInstallation = BlockOmittedFields<models.PluginInstallation>;
type BlockOmittedFields<T> = Omit<T, "__typename" | "createdAt" | "updatedAt" | "parentBlock" | "displayName" | "description" | "blockType" | "versionNumber" | "inputParameters" | "outputParameters" | "lockedByUserId" | "lockedAt">;
export type ModuleContainer = BlockOmittedFields<models.Module>;
export type ModuleAction = Omit<BlockOmittedFields<models.ModuleAction>, "id" | "actionType" | "restVerb" | "gqlOperation"> & {
id?: string;
displayName: string;
description: string;
actionType: keyof typeof models.EnumModuleActionType;
restVerb: keyof typeof models.EnumModuleActionRestVerb;
gqlOperation: keyof typeof models.EnumModuleActionGqlOperation;
};
export type entityDefaultActions = {
[models.EnumModuleActionType.Create]: ModuleAction | undefined;
[models.EnumModuleActionType.Delete]: ModuleAction | undefined;
[models.EnumModuleActionType.Find]: ModuleAction | undefined;
[models.EnumModuleActionType.Meta]: ModuleAction | undefined;
[models.EnumModuleActionType.Read]: ModuleAction | undefined;
[models.EnumModuleActionType.Update]: ModuleAction | undefined;
};
export type entityRelatedFieldDefaultActions = {
[models.EnumModuleActionType.ChildrenConnect]?: ModuleAction | undefined;
[models.EnumModuleActionType.ChildrenDisconnect]?: ModuleAction | undefined;
[models.EnumModuleActionType.ChildrenFind]?: ModuleAction | undefined;
[models.EnumModuleActionType.ChildrenUpdate]?: ModuleAction | undefined;
[models.EnumModuleActionType.ParentGet]?: ModuleAction | undefined;
};
export type entityActions = {
entityDefaultActions: entityDefaultActions;
relatedFieldsDefaultActions: Record<string, //field name
entityRelatedFieldDefaultActions>;
customActions: ModuleAction[];
};
export type EntityActionsMap = Record<string, //module name/ entity name
entityActions>;
type BlockOmittedFields<T> = Omit<T, "__typename" | "createdAt" | "updatedAt" | "parentBlock" | "displayName" | "description" | "blockType" | "versionNumber" | "inputParameters" | "outputParameters" | "lockedByUserId" | "lockedAt" | "lockedByUser">;
export type clientDirectories = {

@@ -152,0 +184,0 @@ baseDirectory: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModuleMap = exports.EnumMessagePatternConnectionOptions = exports.EnumEntityPermissionType = exports.EnumEntityAction = exports.EnumDataType = void 0;
exports.ModuleMap = exports.EnumModuleActionRestVerb = exports.EnumModuleActionGqlOperation = exports.EnumModuleActionType = exports.EnumMessagePatternConnectionOptions = exports.EnumEntityPermissionType = exports.EnumEntityAction = exports.EnumDataType = void 0;
const tslib_1 = require("tslib");
const models = tslib_1.__importStar(require("./models"));
var models_1 = require("./models");

@@ -9,2 +11,5 @@ Object.defineProperty(exports, "EnumDataType", { enumerable: true, get: function () { return models_1.EnumDataType; } });

Object.defineProperty(exports, "EnumMessagePatternConnectionOptions", { enumerable: true, get: function () { return models_1.EnumMessagePatternConnectionOptions; } });
Object.defineProperty(exports, "EnumModuleActionType", { enumerable: true, get: function () { return models_1.EnumModuleActionType; } });
Object.defineProperty(exports, "EnumModuleActionGqlOperation", { enumerable: true, get: function () { return models_1.EnumModuleActionGqlOperation; } });
Object.defineProperty(exports, "EnumModuleActionRestVerb", { enumerable: true, get: function () { return models_1.EnumModuleActionRestVerb; } });
/**

@@ -11,0 +16,0 @@ * ModuleMap is a map of module paths to modules

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

import { AppInfo, Entity, PluginInstallation, Role, ServiceTopics, Topic } from "./code-gen-types";
import { AppInfo, Entity, ModuleAction, ModuleContainer, PluginInstallation, Role, ServiceTopics, Topic } from "./code-gen-types";
import { EnumResourceType } from "./models";

@@ -10,2 +10,4 @@ export declare class DSGResourceData {

pluginInstallations: PluginInstallation[];
moduleContainers?: ModuleContainer[];
moduleActions?: ModuleAction[];
serviceTopics?: ServiceTopics[];

@@ -12,0 +14,0 @@ topics?: Topic[];

@@ -11,2 +11,4 @@ "use strict";

pluginInstallations;
moduleContainers;
moduleActions;
//#region Blocks

@@ -13,0 +15,0 @@ serviceTopics;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SortOrder = exports.Role = exports.QueryMode = exports.EnumWorkspaceMemberType = exports.EnumUserActionType = exports.EnumUserActionStatus = exports.EnumSubscriptionStatus = exports.EnumSubscriptionPlan = exports.EnumResourceType = exports.EnumPendingChangeOriginType = exports.EnumPendingChangeAction = exports.EnumMessagePatternConnectionOptions = exports.EnumGitProvider = exports.EnumGitOrganizationType = exports.EnumEntityPermissionType = exports.EnumEntityAction = exports.EnumDataType = exports.EnumBuildStatus = exports.EnumBlockType = exports.EnumAuthProviderType = exports.EnumActionStepStatus = exports.EnumActionLogLevel = exports.CodeGeneratorVersionStrategy = void 0;
exports.SortOrder = exports.Role = exports.QueryMode = exports.EnumWorkspaceMemberType = exports.EnumUserActionType = exports.EnumUserActionStatus = exports.EnumSubscriptionStatus = exports.EnumSubscriptionPlan = exports.EnumResourceType = exports.EnumPendingChangeOriginType = exports.EnumPendingChangeAction = exports.EnumModuleActionType = exports.EnumModuleActionRestVerb = exports.EnumModuleActionGqlOperation = exports.EnumMessagePatternConnectionOptions = exports.EnumGitProvider = exports.EnumGitOrganizationType = exports.EnumEntityPermissionType = exports.EnumEntityAction = exports.EnumDataType = exports.EnumBuildStatus = exports.EnumBlockType = exports.EnumAuthProviderType = exports.EnumActionStepStatus = exports.EnumActionLogLevel = exports.CodeGeneratorVersionStrategy = void 0;
var CodeGeneratorVersionStrategy;

@@ -32,2 +32,4 @@ (function (CodeGeneratorVersionStrategy) {

(function (EnumBlockType) {
EnumBlockType["Module"] = "Module";
EnumBlockType["ModuleAction"] = "ModuleAction";
EnumBlockType["PluginInstallation"] = "PluginInstallation";

@@ -92,2 +94,3 @@ EnumBlockType["PluginOrder"] = "PluginOrder";

EnumGitProvider["Bitbucket"] = "Bitbucket";
EnumGitProvider["GitLab"] = "GitLab";
EnumGitProvider["Github"] = "Github";

@@ -101,2 +104,33 @@ })(EnumGitProvider || (exports.EnumGitProvider = EnumGitProvider = {}));

})(EnumMessagePatternConnectionOptions || (exports.EnumMessagePatternConnectionOptions = EnumMessagePatternConnectionOptions = {}));
var EnumModuleActionGqlOperation;
(function (EnumModuleActionGqlOperation) {
EnumModuleActionGqlOperation["Mutation"] = "Mutation";
EnumModuleActionGqlOperation["Query"] = "Query";
})(EnumModuleActionGqlOperation || (exports.EnumModuleActionGqlOperation = EnumModuleActionGqlOperation = {}));
var EnumModuleActionRestVerb;
(function (EnumModuleActionRestVerb) {
EnumModuleActionRestVerb["Delete"] = "Delete";
EnumModuleActionRestVerb["Get"] = "Get";
EnumModuleActionRestVerb["Head"] = "Head";
EnumModuleActionRestVerb["Options"] = "Options";
EnumModuleActionRestVerb["Patch"] = "Patch";
EnumModuleActionRestVerb["Post"] = "Post";
EnumModuleActionRestVerb["Put"] = "Put";
EnumModuleActionRestVerb["Trace"] = "Trace";
})(EnumModuleActionRestVerb || (exports.EnumModuleActionRestVerb = EnumModuleActionRestVerb = {}));
var EnumModuleActionType;
(function (EnumModuleActionType) {
EnumModuleActionType["ChildrenConnect"] = "ChildrenConnect";
EnumModuleActionType["ChildrenDisconnect"] = "ChildrenDisconnect";
EnumModuleActionType["ChildrenFind"] = "ChildrenFind";
EnumModuleActionType["ChildrenUpdate"] = "ChildrenUpdate";
EnumModuleActionType["Create"] = "Create";
EnumModuleActionType["Custom"] = "Custom";
EnumModuleActionType["Delete"] = "Delete";
EnumModuleActionType["Find"] = "Find";
EnumModuleActionType["Meta"] = "Meta";
EnumModuleActionType["ParentGet"] = "ParentGet";
EnumModuleActionType["Read"] = "Read";
EnumModuleActionType["Update"] = "Update";
})(EnumModuleActionType || (exports.EnumModuleActionType = EnumModuleActionType = {}));
var EnumPendingChangeAction;

@@ -103,0 +137,0 @@ (function (EnumPendingChangeAction) {

import type { namedTypes } from "ast-types";
import { DTOs, Entity, EntityComponents, EntityField, EntityLookupField, EnumDataType, ModuleMap, NamedClassDeclaration } from "./code-gen-types";
import { DTOs, Entity, EntityComponents, EntityField, EntityLookupField, EnumDataType, ModuleMap, NamedClassDeclaration, entityActions, ModuleContainer } from "./code-gen-types";
import { EventParams } from "./plugins.types";

@@ -16,2 +16,4 @@ import type { Generator, DataSource, ScalarField, ObjectField } from "prisma-schema-dsl-types";

template: namedTypes.File;
moduleContainers: ModuleContainer[];
entityActions: entityActions;
}

@@ -27,2 +29,3 @@ export interface CreateEntityServiceParams extends EventParams {

template: namedTypes.File;
entityActions: entityActions;
}

@@ -38,2 +41,3 @@ export interface CreateEntityControllerParams extends EventParams {

serviceId: namedTypes.Identifier;
entityActions: entityActions;
}

@@ -51,2 +55,4 @@ export interface CreateEntityControllerBaseParams extends EventParams {

serviceId: namedTypes.Identifier;
moduleContainers: ModuleContainer[];
entityActions: entityActions;
}

@@ -257,2 +263,3 @@ export interface CreateEntityGrpcControllerParams extends EventParams {

};
entityActions: entityActions;
}

@@ -274,2 +281,4 @@ export interface CreateEntityResolverBaseParams extends EventParams {

};
moduleContainers: ModuleContainer[];
entityActions: entityActions;
}

@@ -276,0 +285,0 @@ export interface CreateSwaggerParams extends EventParams {

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 too big to display

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