@amohamud23/notihub 1.0.92 → 1.0.93
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/dist/index.cjs +13 -3
- package/dist/index.js +13 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -144,7 +144,6 @@ var CustomerMinifiedSchema_default = CustomerMinifiedSchema;
|
|
|
144
144
|
|
|
145
145
|
// src/models/schemas/CustomerSchema.ts
|
|
146
146
|
var CustomerSchema = {
|
|
147
|
-
// id: { type: Schema.Types.UUID, default: true },
|
|
148
147
|
minified: CustomerMinifiedSchema_default,
|
|
149
148
|
minifiedRef: {
|
|
150
149
|
type: import_mongoose3.Schema.ObjectId,
|
|
@@ -163,7 +162,17 @@ var SubscriptionSchema = {
|
|
|
163
162
|
id: { type: import_mongoose4.Schema.Types.UUID, default: true },
|
|
164
163
|
subscriptionId: { type: String, required: true },
|
|
165
164
|
user: UserSchema_default,
|
|
166
|
-
|
|
165
|
+
userRef: {
|
|
166
|
+
type: import_mongoose4.Schema.Types.ObjectId,
|
|
167
|
+
ref: "User",
|
|
168
|
+
required: true
|
|
169
|
+
},
|
|
170
|
+
entity: CustomerSchema_default,
|
|
171
|
+
entityRef: {
|
|
172
|
+
type: import_mongoose4.Schema.Types.ObjectId,
|
|
173
|
+
ref: "Customer",
|
|
174
|
+
required: true
|
|
175
|
+
}
|
|
167
176
|
};
|
|
168
177
|
var SubscriptionSchema_default = SubscriptionSchema;
|
|
169
178
|
|
|
@@ -187,8 +196,9 @@ var import_mongoose7 = require("mongoose");
|
|
|
187
196
|
var import_mongoose6 = require("mongoose");
|
|
188
197
|
var import_uuid = require("uuid");
|
|
189
198
|
var NotiTypeSchema = {
|
|
190
|
-
id: { type:
|
|
199
|
+
id: { type: String, default: (0, import_uuid.v4)().toString() },
|
|
191
200
|
entity: CustomerSchema_default,
|
|
201
|
+
entityRef: { type: import_mongoose6.Schema.Types.ObjectId, ref: "Customer", required: true },
|
|
192
202
|
type: { type: String, required: true }
|
|
193
203
|
};
|
|
194
204
|
var NotiTypeSchema_default = NotiTypeSchema;
|
package/dist/index.js
CHANGED
|
@@ -93,7 +93,6 @@ var CustomerMinifiedSchema_default = CustomerMinifiedSchema;
|
|
|
93
93
|
|
|
94
94
|
// src/models/schemas/CustomerSchema.ts
|
|
95
95
|
var CustomerSchema = {
|
|
96
|
-
// id: { type: Schema.Types.UUID, default: true },
|
|
97
96
|
minified: CustomerMinifiedSchema_default,
|
|
98
97
|
minifiedRef: {
|
|
99
98
|
type: Schema3.ObjectId,
|
|
@@ -112,7 +111,17 @@ var SubscriptionSchema = {
|
|
|
112
111
|
id: { type: Schema4.Types.UUID, default: true },
|
|
113
112
|
subscriptionId: { type: String, required: true },
|
|
114
113
|
user: UserSchema_default,
|
|
115
|
-
|
|
114
|
+
userRef: {
|
|
115
|
+
type: Schema4.Types.ObjectId,
|
|
116
|
+
ref: "User",
|
|
117
|
+
required: true
|
|
118
|
+
},
|
|
119
|
+
entity: CustomerSchema_default,
|
|
120
|
+
entityRef: {
|
|
121
|
+
type: Schema4.Types.ObjectId,
|
|
122
|
+
ref: "Customer",
|
|
123
|
+
required: true
|
|
124
|
+
}
|
|
116
125
|
};
|
|
117
126
|
var SubscriptionSchema_default = SubscriptionSchema;
|
|
118
127
|
|
|
@@ -136,8 +145,9 @@ import { Schema as Schema7, model as model3 } from "mongoose";
|
|
|
136
145
|
import { Schema as Schema6 } from "mongoose";
|
|
137
146
|
import { v4 as uuidv4 } from "uuid";
|
|
138
147
|
var NotiTypeSchema = {
|
|
139
|
-
id: { type:
|
|
148
|
+
id: { type: String, default: uuidv4().toString() },
|
|
140
149
|
entity: CustomerSchema_default,
|
|
150
|
+
entityRef: { type: Schema6.Types.ObjectId, ref: "Customer", required: true },
|
|
141
151
|
type: { type: String, required: true }
|
|
142
152
|
};
|
|
143
153
|
var NotiTypeSchema_default = NotiTypeSchema;
|