@managesome/eposmatic-toolkit 0.4.87 → 0.4.89

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,7 +1,6 @@
1
1
  // NOTE: split into ./enums/* (per-domain files) so bundlers only pull what is used.
2
2
  // This file stays as a barrel — existing imports from "./ENUMS" keep working.
3
3
  export * from './enums/accounting';
4
- export * from './enums/app';
5
4
  export * from './enums/cash';
6
5
  export * from './enums/communications';
7
6
  export * from './enums/customer';
@@ -73,3 +73,18 @@ export const RiderSchema = new Schema({
73
73
  minimize: false,
74
74
  });
75
75
  export const RIDERS_COLLECTION_NAME = 'riders';
76
+ /**
77
+ * Describes the indexes for `riders`. Values are Mongo key patterns.
78
+ *
79
+ * - `_id`: unique primary key.
80
+ * - `uid`: rider lookups by Firebase uid — authentication, profile reads and
81
+ * storage authorization all resolve a rider from their uid.
82
+ *
83
+ * The `uid` index already exists in the live collection but was never declared
84
+ * here, so a rebuilt environment would have lost it and every rider lookup
85
+ * would have become a collection scan.
86
+ */
87
+ export const RIDERS_COLLECTION_INDEXES = {
88
+ _id: { _id: 1 }, // Unique Index
89
+ uid: { uid: 1 }, // rider lookups by uid
90
+ };
@@ -1,5 +1,4 @@
1
1
  export * from './enums/accounting';
2
- export * from './enums/app';
3
2
  export * from './enums/cash';
4
3
  export * from './enums/communications';
5
4
  export * from './enums/customer';
@@ -17,7 +17,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./enums/accounting"), exports);
20
- __exportStar(require("./enums/app"), exports);
21
20
  __exportStar(require("./enums/cash"), exports);
22
21
  __exportStar(require("./enums/communications"), exports);
23
22
  __exportStar(require("./enums/customer"), exports);
@@ -22,7 +22,7 @@ export declare const MaterializedTenantDayReadinessSchema: Schema<any, import("m
22
22
  tenant_id: string;
23
23
  status: MATERIALIZED_REPORT_READINESS_STATUS_ENUM;
24
24
  schema_version: number;
25
- report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DINEIN";
25
+ report_key: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
26
26
  run_id: string;
27
27
  committed_at: NativeDate;
28
28
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
@@ -35,7 +35,7 @@ export declare const MaterializedTenantDayReadinessSchema: Schema<any, import("m
35
35
  tenant_id: string;
36
36
  status: MATERIALIZED_REPORT_READINESS_STATUS_ENUM;
37
37
  schema_version: number;
38
- report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DINEIN";
38
+ report_key: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
39
39
  run_id: string;
40
40
  committed_at: NativeDate;
41
41
  }>> & import("mongoose").FlatRecord<{
@@ -48,7 +48,7 @@ export declare const MaterializedTenantDayReadinessSchema: Schema<any, import("m
48
48
  tenant_id: string;
49
49
  status: MATERIALIZED_REPORT_READINESS_STATUS_ENUM;
50
50
  schema_version: number;
51
- report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DINEIN";
51
+ report_key: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
52
52
  run_id: string;
53
53
  committed_at: NativeDate;
54
54
  }> & {
@@ -29,7 +29,7 @@ export declare const MaterializedTenantReportRunSchema: Schema<any, import("mong
29
29
  tenant_id: string;
30
30
  status: MATERIALIZED_TENANT_REPORT_RUN_STATUS_ENUM;
31
31
  schema_version: number;
32
- report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DINEIN";
32
+ report_key: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
33
33
  attempts: number;
34
34
  total_attempts: number;
35
35
  run_id?: string | null | undefined;
@@ -46,7 +46,7 @@ export declare const MaterializedTenantReportRunSchema: Schema<any, import("mong
46
46
  tenant_id: string;
47
47
  status: MATERIALIZED_TENANT_REPORT_RUN_STATUS_ENUM;
48
48
  schema_version: number;
49
- report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DINEIN";
49
+ report_key: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
50
50
  attempts: number;
51
51
  total_attempts: number;
52
52
  run_id?: string | null | undefined;
@@ -63,7 +63,7 @@ export declare const MaterializedTenantReportRunSchema: Schema<any, import("mong
63
63
  tenant_id: string;
64
64
  status: MATERIALIZED_TENANT_REPORT_RUN_STATUS_ENUM;
65
65
  schema_version: number;
66
- report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DINEIN";
66
+ report_key: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
67
67
  attempts: number;
68
68
  total_attempts: number;
69
69
  run_id?: string | null | undefined;
@@ -66,3 +66,22 @@ export declare const RiderSchema: Schema<any, import("mongoose").Model<any, any,
66
66
  __v: number;
67
67
  }>;
68
68
  export declare const RIDERS_COLLECTION_NAME = "riders";
69
+ /**
70
+ * Describes the indexes for `riders`. Values are Mongo key patterns.
71
+ *
72
+ * - `_id`: unique primary key.
73
+ * - `uid`: rider lookups by Firebase uid — authentication, profile reads and
74
+ * storage authorization all resolve a rider from their uid.
75
+ *
76
+ * The `uid` index already exists in the live collection but was never declared
77
+ * here, so a rebuilt environment would have lost it and every rider lookup
78
+ * would have become a collection scan.
79
+ */
80
+ export declare const RIDERS_COLLECTION_INDEXES: {
81
+ _id: {
82
+ _id: number;
83
+ };
84
+ uid: {
85
+ uid: number;
86
+ };
87
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RIDERS_COLLECTION_NAME = exports.RiderSchema = void 0;
3
+ exports.RIDERS_COLLECTION_INDEXES = exports.RIDERS_COLLECTION_NAME = exports.RiderSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  exports.RiderSchema = new mongoose_1.Schema({
6
6
  _id: {
@@ -76,3 +76,18 @@ exports.RiderSchema = new mongoose_1.Schema({
76
76
  minimize: false,
77
77
  });
78
78
  exports.RIDERS_COLLECTION_NAME = 'riders';
79
+ /**
80
+ * Describes the indexes for `riders`. Values are Mongo key patterns.
81
+ *
82
+ * - `_id`: unique primary key.
83
+ * - `uid`: rider lookups by Firebase uid — authentication, profile reads and
84
+ * storage authorization all resolve a rider from their uid.
85
+ *
86
+ * The `uid` index already exists in the live collection but was never declared
87
+ * here, so a rebuilt environment would have lost it and every rider lookup
88
+ * would have become a collection scan.
89
+ */
90
+ exports.RIDERS_COLLECTION_INDEXES = {
91
+ _id: { _id: 1 }, // Unique Index
92
+ uid: { uid: 1 }, // rider lookups by uid
93
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.4.87",
3
+ "version": "0.4.89",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",