biz-email-builder-shared 1.6.16 → 1.6.17

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.
@@ -0,0 +1,16 @@
1
+ import { Types } from "mongoose";
2
+ export interface IOrganisation extends Document {
3
+ name: string;
4
+ owner: Types.ObjectId;
5
+ isDisable: boolean;
6
+ deletedAt: Date;
7
+ updatedBy: Types.ObjectId;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ }
11
+ export declare const Organisation: import("mongoose").Model<IOrganisation, {}, {}, {}, import("mongoose").Document<unknown, {}, IOrganisation> & IOrganisation & {
12
+ _id: Types.ObjectId;
13
+ } & {
14
+ __v: number;
15
+ }, any>;
16
+ //# sourceMappingURL=organisation.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisation.entity.d.ts","sourceRoot":"","sources":["../../src/entity/organisation.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAWD,eAAO,MAAM,YAAY;SACspI,MAAO,QAAQ;;;OAD1mI,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Organisation = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const OrganisationSchema = new mongoose_1.Schema({
6
+ name: { type: String, required: true },
7
+ owner: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
8
+ isDisable: { type: Boolean, default: false },
9
+ deletedAt: { type: Date, default: null },
10
+ createdAt: { type: Date, default: null },
11
+ updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
12
+ }, { timestamps: true });
13
+ exports.Organisation = (0, mongoose_1.model)("organisation", OrganisationSchema);
@@ -0,0 +1,192 @@
1
+ import { OWNERSHIP_TYPE } from "email-builder-utils";
2
+ import { Schema, Types } from "mongoose";
3
+ export interface IOrganisationTeamSchema extends Document {
4
+ organisationId: Types.ObjectId;
5
+ userId: Types.ObjectId;
6
+ inviteStatus: string;
7
+ isDeleted: boolean;
8
+ deletedAt: Date;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ addedAt: Date;
12
+ }
13
+ export declare const Organisation: import("mongoose").Model<{
14
+ createdAt: NativeDate;
15
+ updatedAt: NativeDate;
16
+ } & {
17
+ deletedAt: NativeDate;
18
+ isDeleted: boolean;
19
+ organisationId: {
20
+ prototype?: Types.ObjectId | null | undefined;
21
+ cacheHexString?: unknown;
22
+ generate?: {} | null | undefined;
23
+ createFromTime?: {} | null | undefined;
24
+ createFromHexString?: {} | null | undefined;
25
+ createFromBase64?: {} | null | undefined;
26
+ isValid?: {} | null | undefined;
27
+ };
28
+ accessType: OWNERSHIP_TYPE;
29
+ updatedBy: Types.ObjectId;
30
+ userId: {
31
+ prototype?: Types.ObjectId | null | undefined;
32
+ cacheHexString?: unknown;
33
+ generate?: {} | null | undefined;
34
+ createFromTime?: {} | null | undefined;
35
+ createFromHexString?: {} | null | undefined;
36
+ createFromBase64?: {} | null | undefined;
37
+ isValid?: {} | null | undefined;
38
+ };
39
+ inviteStatus: "Pending" | "Accepted";
40
+ addedAt: Types.ObjectId;
41
+ }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
42
+ createdAt: NativeDate;
43
+ updatedAt: NativeDate;
44
+ } & {
45
+ deletedAt: NativeDate;
46
+ isDeleted: boolean;
47
+ organisationId: {
48
+ prototype?: Types.ObjectId | null | undefined;
49
+ cacheHexString?: unknown;
50
+ generate?: {} | null | undefined;
51
+ createFromTime?: {} | null | undefined;
52
+ createFromHexString?: {} | null | undefined;
53
+ createFromBase64?: {} | null | undefined;
54
+ isValid?: {} | null | undefined;
55
+ };
56
+ accessType: OWNERSHIP_TYPE;
57
+ updatedBy: Types.ObjectId;
58
+ userId: {
59
+ prototype?: Types.ObjectId | null | undefined;
60
+ cacheHexString?: unknown;
61
+ generate?: {} | null | undefined;
62
+ createFromTime?: {} | null | undefined;
63
+ createFromHexString?: {} | null | undefined;
64
+ createFromBase64?: {} | null | undefined;
65
+ isValid?: {} | null | undefined;
66
+ };
67
+ inviteStatus: "Pending" | "Accepted";
68
+ addedAt: Types.ObjectId;
69
+ }> & {
70
+ createdAt: NativeDate;
71
+ updatedAt: NativeDate;
72
+ } & {
73
+ deletedAt: NativeDate;
74
+ isDeleted: boolean;
75
+ organisationId: {
76
+ prototype?: Types.ObjectId | null | undefined;
77
+ cacheHexString?: unknown;
78
+ generate?: {} | null | undefined;
79
+ createFromTime?: {} | null | undefined;
80
+ createFromHexString?: {} | null | undefined;
81
+ createFromBase64?: {} | null | undefined;
82
+ isValid?: {} | null | undefined;
83
+ };
84
+ accessType: OWNERSHIP_TYPE;
85
+ updatedBy: Types.ObjectId;
86
+ userId: {
87
+ prototype?: Types.ObjectId | null | undefined;
88
+ cacheHexString?: unknown;
89
+ generate?: {} | null | undefined;
90
+ createFromTime?: {} | null | undefined;
91
+ createFromHexString?: {} | null | undefined;
92
+ createFromBase64?: {} | null | undefined;
93
+ isValid?: {} | null | undefined;
94
+ };
95
+ inviteStatus: "Pending" | "Accepted";
96
+ addedAt: Types.ObjectId;
97
+ } & {
98
+ _id: Types.ObjectId;
99
+ } & {
100
+ __v: number;
101
+ }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
102
+ timestamps: true;
103
+ }, {
104
+ createdAt: NativeDate;
105
+ updatedAt: NativeDate;
106
+ } & {
107
+ deletedAt: NativeDate;
108
+ isDeleted: boolean;
109
+ organisationId: {
110
+ prototype?: Types.ObjectId | null | undefined;
111
+ cacheHexString?: unknown;
112
+ generate?: {} | null | undefined;
113
+ createFromTime?: {} | null | undefined;
114
+ createFromHexString?: {} | null | undefined;
115
+ createFromBase64?: {} | null | undefined;
116
+ isValid?: {} | null | undefined;
117
+ };
118
+ accessType: OWNERSHIP_TYPE;
119
+ updatedBy: Types.ObjectId;
120
+ userId: {
121
+ prototype?: Types.ObjectId | null | undefined;
122
+ cacheHexString?: unknown;
123
+ generate?: {} | null | undefined;
124
+ createFromTime?: {} | null | undefined;
125
+ createFromHexString?: {} | null | undefined;
126
+ createFromBase64?: {} | null | undefined;
127
+ isValid?: {} | null | undefined;
128
+ };
129
+ inviteStatus: "Pending" | "Accepted";
130
+ addedAt: Types.ObjectId;
131
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
132
+ createdAt: NativeDate;
133
+ updatedAt: NativeDate;
134
+ } & {
135
+ deletedAt: NativeDate;
136
+ isDeleted: boolean;
137
+ organisationId: {
138
+ prototype?: Types.ObjectId | null | undefined;
139
+ cacheHexString?: unknown;
140
+ generate?: {} | null | undefined;
141
+ createFromTime?: {} | null | undefined;
142
+ createFromHexString?: {} | null | undefined;
143
+ createFromBase64?: {} | null | undefined;
144
+ isValid?: {} | null | undefined;
145
+ };
146
+ accessType: OWNERSHIP_TYPE;
147
+ updatedBy: Types.ObjectId;
148
+ userId: {
149
+ prototype?: Types.ObjectId | null | undefined;
150
+ cacheHexString?: unknown;
151
+ generate?: {} | null | undefined;
152
+ createFromTime?: {} | null | undefined;
153
+ createFromHexString?: {} | null | undefined;
154
+ createFromBase64?: {} | null | undefined;
155
+ isValid?: {} | null | undefined;
156
+ };
157
+ inviteStatus: "Pending" | "Accepted";
158
+ addedAt: Types.ObjectId;
159
+ }>> & import("mongoose").FlatRecord<{
160
+ createdAt: NativeDate;
161
+ updatedAt: NativeDate;
162
+ } & {
163
+ deletedAt: NativeDate;
164
+ isDeleted: boolean;
165
+ organisationId: {
166
+ prototype?: Types.ObjectId | null | undefined;
167
+ cacheHexString?: unknown;
168
+ generate?: {} | null | undefined;
169
+ createFromTime?: {} | null | undefined;
170
+ createFromHexString?: {} | null | undefined;
171
+ createFromBase64?: {} | null | undefined;
172
+ isValid?: {} | null | undefined;
173
+ };
174
+ accessType: OWNERSHIP_TYPE;
175
+ updatedBy: Types.ObjectId;
176
+ userId: {
177
+ prototype?: Types.ObjectId | null | undefined;
178
+ cacheHexString?: unknown;
179
+ generate?: {} | null | undefined;
180
+ createFromTime?: {} | null | undefined;
181
+ createFromHexString?: {} | null | undefined;
182
+ createFromBase64?: {} | null | undefined;
183
+ isValid?: {} | null | undefined;
184
+ };
185
+ inviteStatus: "Pending" | "Accepted";
186
+ addedAt: Types.ObjectId;
187
+ }> & {
188
+ _id: Types.ObjectId;
189
+ } & {
190
+ __v: number;
191
+ }>>;
192
+ //# sourceMappingURL=organisationTeams.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisationTeams.entity.d.ts","sourceRoot":"","sources":["../../src/entity/organisationTeams.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAS,MAAM,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,uBAAwB,SAAQ,QAAQ;IACvD,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC/B,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;CACf;AAWD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SACkyH,MAAO,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAf,MAAO,QAAQ;;;GAD5vH,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Organisation = void 0;
4
+ const email_builder_utils_1 = require("email-builder-utils");
5
+ const mongoose_1 = require("mongoose");
6
+ const OrganisationTeamSchema = new mongoose_1.Schema({
7
+ organisationId: { type: mongoose_1.Types.ObjectId, ref: "organisation", required: true },
8
+ userId: { type: mongoose_1.Types.ObjectId, ref: "user", required: true },
9
+ accessType: { type: String, enum: Object.values([email_builder_utils_1.OWNERSHIP_TYPE.CO_OWNER, email_builder_utils_1.OWNERSHIP_TYPE.EDITOR, email_builder_utils_1.OWNERSHIP_TYPE.VIEWER]), default: email_builder_utils_1.OWNERSHIP_TYPE.EDITOR },
10
+ inviteStatus: { type: String, enum: ["Pending", "Accepted"], default: "Accepted" },
11
+ isDeleted: { type: Boolean, default: false },
12
+ deletedAt: { type: Date, default: null },
13
+ updatedBy: { type: mongoose_1.Schema.Types.ObjectId, required: true },
14
+ addedAt: { type: mongoose_1.Schema.Types.ObjectId, required: true }
15
+ }, { timestamps: true });
16
+ exports.Organisation = (0, mongoose_1.model)("organisation-team", OrganisationTeamSchema);
@@ -1 +1 @@
1
- {"version":3,"file":"planHistory.entity.d.ts","sourceRoot":"","sources":["../../src/entity/planHistory.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE1D,oBAAY,cAAc;IACxB,GAAG,IAAI;IACP,KAAK,IAAI;IACT,GAAG,IAAI;IACP,MAAM,KAAK;CACZ;AAED,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAAC;IACnC,aAAa,EAAE,MAA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= new mongoose_1.Schema({
31
31
  quotaResetDate: { type: Date, required: true },
32
32
  isTransactionSuccessful: { type: Boolean, required: true },
33
33
  updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
34
- transactionHistory: { type: [exports.TransactionHistorySchema], required: true },
34
+ transactionHistory: { type: [exports.TransactionHistorySchema], default: [] },
35
35
  subscriptionQuota: { type: exports.SubscriptionQuotaSchema, required: true },
36
- durationInMonths: { type: Number, enum: Object.values(PLAN_DURATIONS), default: null },
37
- planPrice: {
38
- type: String, default: null,
39
- validate: {
40
- validator: function (value) {
41
- if (!value)
42
- return true;
43
- return /^[A-Z]{3}\s\d+(\.\d{1,2})?$/.test(value);
44
- },
45
- message: props => `${props.value} is not a valid price format. Use format like 'INR 499.00'`
46
- }
47
- }
48
36
  }, { timestamps: true });
49
37
  exports.PlanHistoryModel = (0, mongoose_1.model)("plan-history", exports.PlanHistorySchema);
@@ -9,7 +9,7 @@ export interface ISubscriptionPlan extends Document {
9
9
  updatedBy: mongoose.Types.ObjectId;
10
10
  deletedAt: Date;
11
11
  isDefault: boolean;
12
- priceForDuration: Record<string, number>;
12
+ canCreateOrganisation: boolean;
13
13
  }
14
14
  export declare const SubscriptionPlanModel: mongoose.Model<ISubscriptionPlan, {}, {}, {}, mongoose.Document<unknown, {}, ISubscriptionPlan> & ISubscriptionPlan & {
15
15
  _id: mongoose.Types.ObjectId;
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptionPlan.entity.d.ts","sourceRoot":"","sources":["../../src/entity/subscriptionPlan.entity.ts"],"names":[],"mappings":"AAAA,OAAO,QAA2B,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACnC,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAiBD,eAAO,MAAM,qBAAqB;;;;OAAwE,CAAC"}
1
+ {"version":3,"file":"subscriptionPlan.entity.d.ts","sourceRoot":"","sources":["../../src/entity/subscriptionPlan.entity.ts"],"names":[],"mappings":"AAAA,OAAO,QAA2B,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACnC,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAiBD,eAAO,MAAM,qBAAqB;;;;OAAwE,CAAC"}
@@ -42,9 +42,9 @@ const SubscriptionPlanSchema = new mongoose_1.Schema({
42
42
  publicTemplateLimit: { type: Number, required: true },
43
43
  smtpConfigAllowed: { type: Boolean, required: true },
44
44
  isDeleted: { type: Boolean, default: false },
45
- updatedBy: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "User", required: true },
45
+ updatedBy: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "user", required: true },
46
46
  deletedAt: { type: Date, default: null },
47
47
  isDefault: { type: Boolean, default: false, index: { unique: true, partialFilterExpression: { isDefault: true } } },
48
- priceForDuration: { type: Map, of: Number, default: { 1: 0, 3: 0, 6: 0, 12: 0 } }
48
+ canCreateOrganisation: { type: Boolean, default: false },
49
49
  }, { timestamps: true, });
50
50
  exports.SubscriptionPlanModel = (0, mongoose_1.model)("subscription-plan", SubscriptionPlanSchema);
@@ -14,6 +14,7 @@ interface IUser {
14
14
  isDeleted: boolean;
15
15
  updateBy: Types.ObjectId;
16
16
  currentPlanId: Types.ObjectId;
17
+ organisationId: Types.ObjectId[];
17
18
  }
18
19
  export declare const UserModel: import("mongoose").Model<IUser, {}, {}, {}, import("mongoose").Document<unknown, {}, IUser> & IUser & {
19
20
  _id: Types.ObjectId;
@@ -1 +1 @@
1
- {"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entity/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC;CAC/B;AAqBD,eAAO,MAAM,SAAS;SAC2qH,MAAO,QAAQ;;;OADvpH,CAAC"}
1
+ {"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entity/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC9B,cAAc,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;CAClC;AAmBD,eAAO,MAAM,SAAS;SACujH,MAAO,QAAQ;;;OADniH,CAAC"}
@@ -14,8 +14,7 @@ const UserSchema = new mongoose_1.Schema({
14
14
  isDeleted: { type: Boolean, default: false },
15
15
  groups: { type: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'user-group' }], default: [], _id: false },
16
16
  updateBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user' },
17
- currentPlanId: { type: mongoose_1.Schema.Types.ObjectId, ref: "subscription-plan" }
18
- }, {
19
- timestamps: true,
20
- });
17
+ currentPlanId: { type: mongoose_1.Schema.Types.ObjectId, ref: "subscription-plan" },
18
+ organisationId: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "organisation", default: [] }]
19
+ }, { timestamps: true, });
21
20
  exports.UserModel = (0, mongoose_1.model)("user", UserSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz-email-builder-shared",
3
- "version": "1.6.16",
3
+ "version": "1.6.17",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [