@nimee/shared-types 1.0.215 → 1.0.216

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.
@@ -1,6 +1,7 @@
1
1
  import { IPostSQSTypeValues } from "../send-notification/sqs";
2
2
  import { IAutomationProvider } from "../crm/automation";
3
3
  import { ILanguageEnum } from "../common/common";
4
+ import { IDynamicFieldDefinition } from "../common/dynamicFields";
4
5
  export declare enum IMailProvider {
5
6
  sendgrid = "sendgrid",
6
7
  inforu = "inforu",
@@ -54,6 +55,7 @@ export interface IMarketPlace {
54
55
  isAutomationActive?: boolean;
55
56
  automationProvider?: IAutomationProvider;
56
57
  automationToken?: string;
58
+ crmDynamicFields?: IDynamicFieldDefinition[];
57
59
  flutterDesign?: {
58
60
  eventPage?: {
59
61
  bookButtonColor?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"marketPlace.js","sourceRoot":"","sources":["../../src/account/marketPlace.ts"],"names":[],"mappings":";;;AAGA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,uEAAuE;AACvE,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,mCAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
1
+ {"version":3,"file":"marketPlace.js","sourceRoot":"","sources":["../../src/account/marketPlace.ts"],"names":[],"mappings":";;;AAKA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,uEAAuE;AACvE,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,mCAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
@@ -0,0 +1,39 @@
1
+ export declare enum DynamicFieldType {
2
+ TEXT = "text",
3
+ NUMBER = "number",
4
+ BOOLEAN = "boolean",
5
+ DATE = "date",
6
+ EMAIL = "email",
7
+ PHONE = "phone",
8
+ SELECT = "select",
9
+ MULTISELECT = "multiselect",
10
+ TEXTAREA = "textarea",
11
+ URL = "url"
12
+ }
13
+ export interface IDynamicFieldDefinition {
14
+ name: string;
15
+ label: string;
16
+ type: DynamicFieldType;
17
+ required?: boolean;
18
+ placeholder?: string;
19
+ description?: string;
20
+ options?: string[];
21
+ defaultValue?: any;
22
+ validation?: {
23
+ minLength?: number;
24
+ maxLength?: number;
25
+ min?: number;
26
+ max?: number;
27
+ pattern?: string;
28
+ };
29
+ isActive?: boolean;
30
+ order?: number;
31
+ }
32
+ export interface IDynamicFieldValue {
33
+ fieldName: string;
34
+ value: any;
35
+ lastUpdated?: Date;
36
+ }
37
+ export interface IDynamicFields {
38
+ [fieldName: string]: any;
39
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamicFieldType = void 0;
4
+ var DynamicFieldType;
5
+ (function (DynamicFieldType) {
6
+ DynamicFieldType["TEXT"] = "text";
7
+ DynamicFieldType["NUMBER"] = "number";
8
+ DynamicFieldType["BOOLEAN"] = "boolean";
9
+ DynamicFieldType["DATE"] = "date";
10
+ DynamicFieldType["EMAIL"] = "email";
11
+ DynamicFieldType["PHONE"] = "phone";
12
+ DynamicFieldType["SELECT"] = "select";
13
+ DynamicFieldType["MULTISELECT"] = "multiselect";
14
+ DynamicFieldType["TEXTAREA"] = "textarea";
15
+ DynamicFieldType["URL"] = "url";
16
+ })(DynamicFieldType || (exports.DynamicFieldType = DynamicFieldType = {}));
17
+ //# sourceMappingURL=dynamicFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamicFields.js","sourceRoot":"","sources":["../../src/common/dynamicFields.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,mCAAe,CAAA;IACf,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,+CAA2B,CAAA;IAC3B,yCAAqB,CAAA;IACrB,+BAAW,CAAA;AACf,CAAC,EAXW,gBAAgB,gCAAhB,gBAAgB,QAW3B"}
@@ -1 +1,2 @@
1
1
  export * from "./common";
2
+ export * from "./dynamicFields";
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./common"), exports);
18
+ __exportStar(require("./dynamicFields"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,kDAAgC"}
package/dist/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./analytics";
7
7
  export * from "./common";
8
8
  export * from "./user";
9
9
  export * from "./crm";
10
+ export * from "./common/dynamicFields";
package/dist/index.js CHANGED
@@ -24,4 +24,5 @@ __exportStar(require("./analytics"), exports);
24
24
  __exportStar(require("./common"), exports);
25
25
  __exportStar(require("./user"), exports);
26
26
  __exportStar(require("./crm"), exports);
27
+ __exportStar(require("./common/dynamicFields"), exports);
27
28
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,0CAAwB;AACxB,4CAA0B;AAC1B,sDAAoC;AACpC,8CAA4B;AAC5B,2CAAyB;AACzB,yCAAuB;AACvB,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,0CAAwB;AACxB,4CAA0B;AAC1B,sDAAoC;AACpC,8CAA4B;AAC5B,2CAAyB;AACzB,yCAAuB;AACvB,wCAAsB;AACtB,yDAAuC"}
@@ -6,6 +6,7 @@
6
6
  /// <reference types="mongoose/types/mongooseoptions" />
7
7
  /// <reference types="mongoose/types/schemaoptions" />
8
8
  import mongoose from "mongoose";
9
+ import { IDynamicFields } from "../common/dynamicFields";
9
10
  export declare enum IEndUserRoleTypeEnum {
10
11
  endUser = "endUser"
11
12
  }
@@ -43,4 +44,5 @@ export interface IEndUserModel {
43
44
  originDate?: Date;
44
45
  lastParticipationDate?: Date;
45
46
  approved_for_subscription_purchase?: boolean;
47
+ dynamicFields?: IDynamicFields;
46
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"endUser.js","sourceRoot":"","sources":["../../src/user/endUser.ts"],"names":[],"mappings":";;;AAEA,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;AACrB,CAAC,EAFW,oBAAoB,oCAApB,oBAAoB,QAE/B"}
1
+ {"version":3,"file":"endUser.js","sourceRoot":"","sources":["../../src/user/endUser.ts"],"names":[],"mappings":";;;AAGA,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;AACrB,CAAC,EAFW,oBAAoB,oCAApB,oBAAoB,QAE/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimee/shared-types",
3
- "version": "1.0.215",
3
+ "version": "1.0.216",
4
4
  "description": "Types and interfaces that any service can access if needed",
5
5
  "main": "dist/index.js",
6
6
  "author": "dan goldberg",
@@ -1,6 +1,8 @@
1
1
  import { IPostSQSTypeValues } from "../send-notification/sqs";
2
2
  import { IAutomationProvider } from "../crm/automation";
3
3
  import { ILanguageEnum } from "../common/common";
4
+ import { IDynamicFieldDefinition } from "../common/dynamicFields";
5
+
4
6
  export enum IMailProvider {
5
7
  sendgrid = "sendgrid",
6
8
  inforu = "inforu",
@@ -57,6 +59,7 @@ export interface IMarketPlace {
57
59
  isAutomationActive?: boolean;
58
60
  automationProvider?: IAutomationProvider;
59
61
  automationToken?: string;
62
+ crmDynamicFields?: IDynamicFieldDefinition[];
60
63
  flutterDesign?: {
61
64
  eventPage?: {
62
65
  bookButtonColor?: string;
@@ -0,0 +1,42 @@
1
+ export enum DynamicFieldType {
2
+ TEXT = "text",
3
+ NUMBER = "number",
4
+ BOOLEAN = "boolean",
5
+ DATE = "date",
6
+ EMAIL = "email",
7
+ PHONE = "phone",
8
+ SELECT = "select",
9
+ MULTISELECT = "multiselect",
10
+ TEXTAREA = "textarea",
11
+ URL = "url",
12
+ }
13
+
14
+ export interface IDynamicFieldDefinition {
15
+ name: string;
16
+ label: string;
17
+ type: DynamicFieldType;
18
+ required?: boolean;
19
+ placeholder?: string;
20
+ description?: string;
21
+ options?: string[]; // For select/multiselect fields
22
+ defaultValue?: any;
23
+ validation?: {
24
+ minLength?: number;
25
+ maxLength?: number;
26
+ min?: number;
27
+ max?: number;
28
+ pattern?: string;
29
+ };
30
+ isActive?: boolean;
31
+ order?: number;
32
+ }
33
+
34
+ export interface IDynamicFieldValue {
35
+ fieldName: string;
36
+ value: any;
37
+ lastUpdated?: Date;
38
+ }
39
+
40
+ export interface IDynamicFields {
41
+ [fieldName: string]: any;
42
+ }
@@ -1 +1,2 @@
1
1
  export * from "./common";
2
+ export * from "./dynamicFields";
package/src/index.ts CHANGED
@@ -8,3 +8,4 @@ export * from "./analytics";
8
8
  export * from "./common";
9
9
  export * from "./user";
10
10
  export * from "./crm";
11
+ export * from "./common/dynamicFields";
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { IDynamicFields } from "../common/dynamicFields";
2
3
 
3
4
  export enum IEndUserRoleTypeEnum {
4
5
  endUser = "endUser",
@@ -37,4 +38,5 @@ export interface IEndUserModel {
37
38
  originDate?: Date;
38
39
  lastParticipationDate?: Date;
39
40
  approved_for_subscription_purchase?: boolean;
41
+ dynamicFields?: IDynamicFields;
40
42
  }