@classytic/loyalty 0.2.2 → 0.3.0
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/CHANGELOG.md +101 -0
- package/README.md +69 -35
- package/dist/{config-96Sl6oNJ.d.mts → config-BdSyAdnF.d.mts} +10 -0
- package/dist/events/index.d.mts +1 -1
- package/dist/events/index.mjs +2 -2
- package/dist/{events-BtZOdiPw.mjs → events-DN5_p6T0.mjs} +1 -1
- package/dist/{index-CMSNfGos.d.mts → index-BN96EDac.d.mts} +19 -4
- package/dist/{index-xLLJ7jLy.d.mts → index-CnESLipu.d.mts} +1 -1
- package/dist/{index-Bo5YQ_fu.d.mts → index-D20Cn4KB.d.mts} +23 -0
- package/dist/index.d.mts +154 -6
- package/dist/index.mjs +26 -18
- package/dist/{loyalty-events-Cyt9TwX6.mjs → loyalty-events-C38JA3cU.mjs} +4 -2
- package/dist/models/index.d.mts +513 -465
- package/dist/models/index.mjs +1 -1
- package/dist/{models-uhh9c-7k.mjs → models-Ddh62lgO.mjs} +29 -2
- package/dist/repositories/index.d.mts +1 -1
- package/dist/repositories/index.mjs +1 -1
- package/dist/{repositories-CZlhTYVp.mjs → repositories-C_p8asCn.mjs} +307 -155
- package/dist/types/index.d.mts +2 -2
- package/package.json +6 -6
package/dist/models/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createModels, t as LoyaltyModelCollisionError } from "../models-
|
|
1
|
+
import { n as createModels, t as LoyaltyModelCollisionError } from "../models-Ddh62lgO.mjs";
|
|
2
2
|
export { LoyaltyModelCollisionError, createModels };
|
|
@@ -232,6 +232,18 @@ function createPointTransactionSchema() {
|
|
|
232
232
|
actorId: {
|
|
233
233
|
type: String,
|
|
234
234
|
required: true
|
|
235
|
+
},
|
|
236
|
+
approvals: {
|
|
237
|
+
type: mongoose.Schema.Types.Mixed,
|
|
238
|
+
default: null
|
|
239
|
+
},
|
|
240
|
+
approvalPolicyId: {
|
|
241
|
+
type: String,
|
|
242
|
+
default: null
|
|
243
|
+
},
|
|
244
|
+
approvalPolicyVersion: {
|
|
245
|
+
type: Number,
|
|
246
|
+
default: null
|
|
235
247
|
}
|
|
236
248
|
}, { timestamps: {
|
|
237
249
|
createdAt: true,
|
|
@@ -297,12 +309,27 @@ function createRedemptionSchema() {
|
|
|
297
309
|
reversalTransactionId: { type: mongoose.Schema.Types.ObjectId },
|
|
298
310
|
transactionId: { type: mongoose.Schema.Types.ObjectId },
|
|
299
311
|
initialBalance: { type: Number },
|
|
300
|
-
remainingBalance: { type: Number }
|
|
312
|
+
remainingBalance: { type: Number },
|
|
313
|
+
approvals: {
|
|
314
|
+
type: mongoose.Schema.Types.Mixed,
|
|
315
|
+
default: null
|
|
316
|
+
},
|
|
317
|
+
approvalPolicyId: {
|
|
318
|
+
type: String,
|
|
319
|
+
default: null
|
|
320
|
+
},
|
|
321
|
+
approvalPolicyVersion: {
|
|
322
|
+
type: Number,
|
|
323
|
+
default: null
|
|
324
|
+
}
|
|
301
325
|
}, { timestamps: true });
|
|
302
326
|
schema.index({
|
|
303
327
|
ownerType: 1,
|
|
304
328
|
ownerId: 1
|
|
305
|
-
}, {
|
|
329
|
+
}, {
|
|
330
|
+
unique: true,
|
|
331
|
+
partialFilterExpression: { status: { $in: ["reserved", "confirmed"] } }
|
|
332
|
+
});
|
|
306
333
|
return schema;
|
|
307
334
|
}
|
|
308
335
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ReferralRepository, d as MemberRepository, i as TierDefinitionRepository, l as EarningRuleRepository, n as LoyaltyRepositories, r as createRepositories, s as RedemptionRepository, t as CreateRepositoriesInput, u as PointTransactionRepository } from "../index-
|
|
1
|
+
import { a as ReferralRepository, d as MemberRepository, i as TierDefinitionRepository, l as EarningRuleRepository, n as LoyaltyRepositories, r as createRepositories, s as RedemptionRepository, t as CreateRepositoriesInput, u as PointTransactionRepository } from "../index-BN96EDac.mjs";
|
|
2
2
|
export { CreateRepositoriesInput, EarningRuleRepository, LoyaltyRepositories, MemberRepository, PointTransactionRepository, RedemptionRepository, ReferralRepository, TierDefinitionRepository, createRepositories };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PointTransactionRepository, i as RedemptionRepository, n as TierDefinitionRepository, o as MemberRepository, r as ReferralRepository,
|
|
1
|
+
import { a as PointTransactionRepository, i as RedemptionRepository, l as EarningRuleRepository, n as TierDefinitionRepository, o as MemberRepository, r as ReferralRepository, t as createRepositories } from "../repositories-C_p8asCn.mjs";
|
|
2
2
|
export { EarningRuleRepository, MemberRepository, PointTransactionRepository, RedemptionRepository, ReferralRepository, TierDefinitionRepository, createRepositories };
|