@contrail/entity-types 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # Types Entity
2
+
3
+ This module includes type definitions for VibeIQ's core types.
4
+
5
+ ### Usage
6
+ ```js
7
+ import Item from '@contrail/entity-types';
8
+
9
+ interface MyItem extends Item {
10
+ myCustomProp: string;
11
+ }
12
+ ```
@@ -0,0 +1,15 @@
1
+ import { OrgManagedEntity } from "@contrail/core-types";
2
+ import { AppOrg } from "./app-org";
3
+ export interface AppApiKey extends OrgManagedEntity {
4
+ id: string;
5
+ createdOn?: Date;
6
+ updatedOn?: Date;
7
+ createdById?: string;
8
+ updatedById?: string;
9
+ createdBy?: any;
10
+ updatedBy?: any;
11
+ orgId?: string;
12
+ appOrgId?: string;
13
+ appOrg?: AppOrg;
14
+ apiKey?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { App } from './app';
2
+ import { BaseManagedEntity } from '@contrail/core-types';
3
+ export interface AppCodePackage extends BaseManagedEntity {
4
+ id: string;
5
+ createdOn?: Date;
6
+ updatedOn?: Date;
7
+ createdById?: string;
8
+ updatedById?: string;
9
+ createdBy?: any;
10
+ updatedBy?: any;
11
+ orgId?: string;
12
+ appId?: string;
13
+ app?: App;
14
+ s3Location?: string;
15
+ uploadURL?: string;
16
+ downloadURL?: string;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { OrgManagedEntity } from "@contrail/core-types";
2
+ import { App } from "./app";
3
+ import { AppVersion } from "./app-version";
4
+ import { AppApiKey } from './app-api-key';
5
+ export declare enum AppOrgStatus {
6
+ INSTALLING = "INSTALLING",
7
+ FAILED_INSTALLING = "FAILED_INSTALLING",
8
+ READY = "READY",
9
+ DELETING = "DELETING",
10
+ FAILED_DELETING = "FAILED_DELETING"
11
+ }
12
+ export interface AppOrg extends OrgManagedEntity {
13
+ status: AppOrgStatus;
14
+ appId?: string;
15
+ app?: App;
16
+ appVersionId?: string;
17
+ appVersion?: AppVersion;
18
+ apiKey?: AppApiKey;
19
+ appConfig?: any;
20
+ }
package/lib/app-org.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppOrgStatus = void 0;
4
+ var AppOrgStatus;
5
+ (function (AppOrgStatus) {
6
+ AppOrgStatus["INSTALLING"] = "INSTALLING";
7
+ AppOrgStatus["FAILED_INSTALLING"] = "FAILED_INSTALLING";
8
+ AppOrgStatus["READY"] = "READY";
9
+ AppOrgStatus["DELETING"] = "DELETING";
10
+ AppOrgStatus["FAILED_DELETING"] = "FAILED_DELETING";
11
+ })(AppOrgStatus = exports.AppOrgStatus || (exports.AppOrgStatus = {}));
@@ -0,0 +1,45 @@
1
+ import { BaseManagedEntity } from "@contrail/core-types";
2
+ import { App } from "./app";
3
+ import { AppCodePackage } from "./app-code-package";
4
+ import { PropertyType } from "./property-type";
5
+ import { AppOrg } from "./app-org";
6
+ export declare enum AppVersionStatus {
7
+ PUBLISHING = "PUBLISHING",
8
+ FAILED_PUBLISHING = "FAILED_PUBLISHING",
9
+ PUBLISHED = "PUBLISHED",
10
+ ARCHIVING = "ARCHIVING",
11
+ FAILED_ARCHIVING = "FAILED_ARCHIVING",
12
+ ARCHIVED = "ARCHIVED"
13
+ }
14
+ export declare enum AppRuntime {
15
+ DOCKER = "DOCKER",
16
+ NODE = "NODE"
17
+ }
18
+ export interface AppVersion extends BaseManagedEntity {
19
+ orgId?: string;
20
+ appId?: string;
21
+ app?: App;
22
+ appOrgs?: AppOrg[];
23
+ versionNumber: number;
24
+ status: AppVersionStatus;
25
+ eventWorkflowTriggerKeyMapping: string;
26
+ configProperties?: ConfigProperty[];
27
+ triggerKeyDefinitions?: TriggerKeyDefinition[];
28
+ dockerImageRef?: string;
29
+ appCodePackageId?: string;
30
+ appCodePackage?: AppCodePackage;
31
+ appRuntime?: AppRuntime;
32
+ frameworkVersion?: number;
33
+ }
34
+ export declare class ConfigProperty {
35
+ slug: string;
36
+ propertyType: PropertyType;
37
+ options?: any[];
38
+ label: string;
39
+ }
40
+ export declare class TriggerKeyDefinition {
41
+ name: string;
42
+ description?: string;
43
+ triggerKey: string;
44
+ external?: boolean;
45
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TriggerKeyDefinition = exports.ConfigProperty = exports.AppRuntime = exports.AppVersionStatus = void 0;
4
+ var AppVersionStatus;
5
+ (function (AppVersionStatus) {
6
+ AppVersionStatus["PUBLISHING"] = "PUBLISHING";
7
+ AppVersionStatus["FAILED_PUBLISHING"] = "FAILED_PUBLISHING";
8
+ AppVersionStatus["PUBLISHED"] = "PUBLISHED";
9
+ AppVersionStatus["ARCHIVING"] = "ARCHIVING";
10
+ AppVersionStatus["FAILED_ARCHIVING"] = "FAILED_ARCHIVING";
11
+ AppVersionStatus["ARCHIVED"] = "ARCHIVED";
12
+ })(AppVersionStatus = exports.AppVersionStatus || (exports.AppVersionStatus = {}));
13
+ var AppRuntime;
14
+ (function (AppRuntime) {
15
+ AppRuntime["DOCKER"] = "DOCKER";
16
+ AppRuntime["NODE"] = "NODE";
17
+ })(AppRuntime = exports.AppRuntime || (exports.AppRuntime = {}));
18
+ class ConfigProperty {
19
+ slug;
20
+ propertyType;
21
+ options;
22
+ label;
23
+ }
24
+ exports.ConfigProperty = ConfigProperty;
25
+ class TriggerKeyDefinition {
26
+ name;
27
+ description;
28
+ triggerKey;
29
+ external;
30
+ }
31
+ exports.TriggerKeyDefinition = TriggerKeyDefinition;
package/lib/app.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import { BaseManagedEntity } from "@contrail/core-types";
2
+ import { AppCodePackage } from "./app-code-package";
3
+ import { AppOrg } from "./app-org";
4
+ import { AppVersion, ConfigProperty, TriggerKeyDefinition, AppRuntime } from "./app-version";
5
+ export interface App extends BaseManagedEntity {
6
+ name: string;
7
+ identifier: string;
8
+ installable?: boolean;
9
+ latestAppVersionId?: string;
10
+ latestAppVersion?: AppVersion;
11
+ thumbnail?: string;
12
+ description?: string;
13
+ publisher: string;
14
+ public: boolean;
15
+ hidden?: boolean;
16
+ privateOrgId?: string;
17
+ eventWorkflowTriggerKeyMapping: string;
18
+ configProperties?: ConfigProperty[];
19
+ appOrgs?: AppOrg[];
20
+ triggerKeyDefinitions?: TriggerKeyDefinition[];
21
+ dockerImageRef?: string;
22
+ appCodePackageId?: string;
23
+ appCodePackage?: AppCodePackage;
24
+ appRuntime?: AppRuntime;
25
+ frameworkVersion?: number;
26
+ }
package/lib/app.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/lib/asset.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { TypeManagedEntity } from "@contrail/core-types";
2
+ import { Content } from './content';
3
+ export interface Asset extends TypeManagedEntity {
4
+ workspaceId?: string;
5
+ name?: string;
6
+ contentId: string;
7
+ content?: Content;
8
+ copyFileId?: string;
9
+ fileName?: string;
10
+ contentType?: string;
11
+ fileSize?: string;
12
+ largeViewableDownloadUrl?: string;
13
+ mediumViewableDownloadUrl?: string;
14
+ smallViewableDownloadUrl?: string;
15
+ tinyViewableDownloadUrl?: string;
16
+ }
package/lib/asset.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import { BaseManagedEntity } from '@contrail/core-types';
2
+ import { ContentHolderContent } from './contentholder-content';
3
+ export interface Content extends BaseManagedEntity {
4
+ assetId?: string;
5
+ fileName?: string;
6
+ contentType?: string;
7
+ fileSize?: string;
8
+ primaryFileId?: string;
9
+ primaryFileUrl?: string;
10
+ largeViewableId?: string;
11
+ largeViewableUrl?: string;
12
+ mediumViewableId?: string;
13
+ mediumViewableUrl?: string;
14
+ smallViewableId?: string;
15
+ smallViewableUrl?: string;
16
+ tinyViewableId?: string;
17
+ tinyViewableUrl?: string;
18
+ federatedId?: string;
19
+ ownerType?: string;
20
+ ownerFederatedId?: string;
21
+ primaryViewable?: boolean;
22
+ primaryFile?: any;
23
+ copyFileId?: string[];
24
+ contentHolderContent?: ContentHolderContent;
25
+ }
package/lib/content.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { OrgManagedEntity } from "@contrail/core-types";
2
+ export interface ContentHolderContent extends OrgManagedEntity {
3
+ contentHolderReference?: string;
4
+ contentId?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/lib/file.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { OrgManagedEntity } from '@contrail/core-types';
2
+ export interface File extends OrgManagedEntity {
3
+ ownedByReference?: string;
4
+ fileKey: string;
5
+ fileBucket: string;
6
+ fileSize: string;
7
+ fileName: string;
8
+ contentType: string;
9
+ fileUrl: string;
10
+ uploaded: boolean;
11
+ downloadUrl: string;
12
+ uploadPost: any;
13
+ ttl?: number;
14
+ }
package/lib/file.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/lib/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './item';
package/lib/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./item"), exports);
package/lib/item.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { TypeManagedEntity } from '@contrail/core-types';
2
+ export interface Item extends TypeManagedEntity {
3
+ itemFamilyId?: string;
4
+ itemFamily?: Item;
5
+ itemOptions?: {
6
+ [key: string]: Array<Item>;
7
+ };
8
+ name: string;
9
+ primaryViewableId?: string;
10
+ federatedId?: string;
11
+ assortmentItems?: any[];
12
+ assortmentAtts?: {
13
+ [key: string]: any;
14
+ };
15
+ optionGroup?: string;
16
+ optionName?: string;
17
+ isPrimary?: boolean;
18
+ roles?: Array<string>;
19
+ [key: string]: any;
20
+ }
package/lib/item.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { TypeManagedEntity } from '@contrail/core-types';
2
+ import { Project } from './project';
3
+ export interface ProjectItem extends TypeManagedEntity {
4
+ projectId?: string;
5
+ project?: Project;
6
+ itemId?: string;
7
+ item?: any;
8
+ roles?: Array<string>;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { OrgManagedEntity } from "@contrail/core-types";
2
+ export interface Project extends OrgManagedEntity {
3
+ name: string;
4
+ }
package/lib/project.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ export declare enum PropertyType {
2
+ Text = "text",
3
+ String = "string",
4
+ Number = "number",
5
+ Date = "date",
6
+ Boolean = "boolean",
7
+ MultiSelect = "multi_select",
8
+ SingleSelect = "choice",
9
+ Url = "url",
10
+ Currency = "currency",
11
+ Percent = "percent",
12
+ Rating = "rating",
13
+ Formula = "formula",
14
+ ObjectReference = "object_reference",
15
+ ObjectReferenceList = "object_ref_list",
16
+ DataGrid = "data_grid",
17
+ CascadingSelect = "cascading_select",
18
+ Sequence = "sequence",
19
+ Constant = "constant",
20
+ Composite = "composite",
21
+ UserList = "userList",
22
+ Image = "image",
23
+ Json = "json"
24
+ }
25
+ export interface PropertyTypeMetaData {
26
+ label: string;
27
+ propertyType: PropertyType;
28
+ createable?: boolean;
29
+ }
30
+ export declare const AllPropertyTypes: Array<PropertyTypeMetaData>;
31
+ export declare const PropertyTypeMeta: Map<PropertyType, PropertyTypeMetaData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@contrail/entity-types",
3
+ "version": "1.1.6",
4
+ "description": "A types library for Vibeiq entities.",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
10
+ "lint": "tslint -p tsconfig.json",
11
+ "test": "jest"
12
+ },
13
+ "keywords": [
14
+ "VibeIQ",
15
+ "contrail"
16
+ ],
17
+ "author": "",
18
+ "license": "ISC",
19
+ "dependencies": {
20
+ "@contrail/core-types": "^1.0.6"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^18.15.11",
24
+ "jest": "^23.6.0",
25
+ "js-yaml": "^4.1.0",
26
+ "ts-jest": "^23.10.5",
27
+ "typescript": "^4.0.0"
28
+ },
29
+ "jest": {
30
+ "moduleFileExtensions": [
31
+ "js",
32
+ "json",
33
+ "ts"
34
+ ],
35
+ "rootDir": "src",
36
+ "testRegex": ".spec.ts$",
37
+ "transform": {
38
+ "^.+\\.(t|j)s$": "ts-jest"
39
+ },
40
+ "coverageDirectory": "../coverage",
41
+ "testEnvironment": "node"
42
+ }
43
+ }