@eeplatform/core 1.4.2 → 1.4.3

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.mjs CHANGED
@@ -11382,6 +11382,24 @@ function useVerificationRepo() {
11382
11382
  });
11383
11383
  });
11384
11384
  }
11385
+ async function createIndexes() {
11386
+ try {
11387
+ await collection.createIndexes([
11388
+ { key: { email: 1 } },
11389
+ { key: { type: 1 } },
11390
+ { key: { status: 1 } },
11391
+ { key: { "metadata.org": 1 } },
11392
+ { key: { email: "text" } },
11393
+ {
11394
+ key: { expiredAt: 1 },
11395
+ expireAfterSeconds: 0,
11396
+ name: "ttl_expiredAt_index"
11397
+ }
11398
+ ]);
11399
+ } catch (error) {
11400
+ throw new InternalServerError("Failed to create indexes.");
11401
+ }
11402
+ }
11385
11403
  async function createIndex() {
11386
11404
  try {
11387
11405
  await collection.createIndex([
@@ -11604,9 +11622,7 @@ function useVerificationRepo() {
11604
11622
  }
11605
11623
  }
11606
11624
  return {
11607
- createIndex,
11608
- createTextIndex,
11609
- createUniqueIndex,
11625
+ createIndexes,
11610
11626
  add,
11611
11627
  getVerifications,
11612
11628
  getById,
@@ -13017,7 +13033,7 @@ function useVerificationService() {
13017
13033
  type: "user-sign-up",
13018
13034
  email,
13019
13035
  metadata,
13020
- expireAt: new Date((/* @__PURE__ */ new Date()).getTime() + 5 * 60 * 1e3).toISOString(),
13036
+ expireAt: new Date((/* @__PURE__ */ new Date()).getTime() + 5 * 60 * 1e3),
13021
13037
  // 5mins from now
13022
13038
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
13023
13039
  };