@managesome/eposmatic-toolkit 0.4.86 → 0.4.87

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,6 +1,7 @@
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';
4
5
  export * from './enums/cash';
5
6
  export * from './enums/communications';
6
7
  export * from './enums/customer';
@@ -0,0 +1,15 @@
1
+ // Auto-split from constants/ENUMS.ts — see ENUMS.ts barrel for exports.
2
+ // Identity Platform tenant ids for tenant-scoped apps (not Mongo tenant_id).
3
+ export var APP_TENANT_ENUM;
4
+ (function (APP_TENANT_ENUM) {
5
+ APP_TENANT_ENUM["POS"] = "app-pos";
6
+ APP_TENANT_ENUM["ADMIN"] = "app-admin";
7
+ APP_TENANT_ENUM["WAREHOUSE"] = "app-warehouse";
8
+ APP_TENANT_ENUM["DASHBOARD"] = "app-dashboard";
9
+ APP_TENANT_ENUM["REPORTS"] = "app-reports";
10
+ APP_TENANT_ENUM["ORDERING"] = "app-ordering";
11
+ APP_TENANT_ENUM["RIDER"] = "app-rider";
12
+ APP_TENANT_ENUM["DIALER"] = "app-dialer";
13
+ APP_TENANT_ENUM["OMS"] = "app-oms";
14
+ })(APP_TENANT_ENUM || (APP_TENANT_ENUM = {}));
15
+ export const ALL_APP_TENANT_IDS = Object.values(APP_TENANT_ENUM);
@@ -1,4 +1,5 @@
1
1
  export * from './enums/accounting';
2
+ export * from './enums/app';
2
3
  export * from './enums/cash';
3
4
  export * from './enums/communications';
4
5
  export * from './enums/customer';
@@ -17,6 +17,7 @@ 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);
20
21
  __exportStar(require("./enums/cash"), exports);
21
22
  __exportStar(require("./enums/communications"), exports);
22
23
  __exportStar(require("./enums/customer"), exports);
@@ -0,0 +1,12 @@
1
+ export declare enum APP_TENANT_ENUM {
2
+ POS = "app-pos",
3
+ ADMIN = "app-admin",
4
+ WAREHOUSE = "app-warehouse",
5
+ DASHBOARD = "app-dashboard",
6
+ REPORTS = "app-reports",
7
+ ORDERING = "app-ordering",
8
+ RIDER = "app-rider",
9
+ DIALER = "app-dialer",
10
+ OMS = "app-oms"
11
+ }
12
+ export declare const ALL_APP_TENANT_IDS: APP_TENANT_ENUM[];
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Auto-split from constants/ENUMS.ts — see ENUMS.ts barrel for exports.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ALL_APP_TENANT_IDS = exports.APP_TENANT_ENUM = void 0;
5
+ // Identity Platform tenant ids for tenant-scoped apps (not Mongo tenant_id).
6
+ var APP_TENANT_ENUM;
7
+ (function (APP_TENANT_ENUM) {
8
+ APP_TENANT_ENUM["POS"] = "app-pos";
9
+ APP_TENANT_ENUM["ADMIN"] = "app-admin";
10
+ APP_TENANT_ENUM["WAREHOUSE"] = "app-warehouse";
11
+ APP_TENANT_ENUM["DASHBOARD"] = "app-dashboard";
12
+ APP_TENANT_ENUM["REPORTS"] = "app-reports";
13
+ APP_TENANT_ENUM["ORDERING"] = "app-ordering";
14
+ APP_TENANT_ENUM["RIDER"] = "app-rider";
15
+ APP_TENANT_ENUM["DIALER"] = "app-dialer";
16
+ APP_TENANT_ENUM["OMS"] = "app-oms";
17
+ })(APP_TENANT_ENUM || (exports.APP_TENANT_ENUM = APP_TENANT_ENUM = {}));
18
+ exports.ALL_APP_TENANT_IDS = Object.values(APP_TENANT_ENUM);
@@ -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: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
25
+ report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "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: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
38
+ report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "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: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
51
+ report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "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: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
32
+ report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "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: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
49
+ report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "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: "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DIALER" | "DINEIN";
66
+ report_key: "DIALER" | "DELIVERY" | "DISCOUNTS" | "OVERVIEW" | "PREP_TIME" | "DINEIN";
67
67
  attempts: number;
68
68
  total_attempts: number;
69
69
  run_id?: string | null | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ENUMS_1 = require("../constants/ENUMS");
4
+ test('APP_TENANT_ENUM lists every tenant-scoped app and its pool tenant id', () => {
5
+ expect(ENUMS_1.APP_TENANT_ENUM).toEqual({
6
+ POS: 'app-pos',
7
+ ADMIN: 'app-admin',
8
+ WAREHOUSE: 'app-warehouse',
9
+ DASHBOARD: 'app-dashboard',
10
+ REPORTS: 'app-reports',
11
+ RIDER: 'app-rider',
12
+ ORDERING: 'app-ordering',
13
+ DIALER: 'app-dialer',
14
+ OMS: 'app-oms',
15
+ });
16
+ });
17
+ test('the values are unique Identity Platform tenant ids', () => {
18
+ expect(ENUMS_1.ALL_APP_TENANT_IDS).toHaveLength(9);
19
+ expect(new Set(ENUMS_1.ALL_APP_TENANT_IDS).size).toBe(ENUMS_1.ALL_APP_TENANT_IDS.length);
20
+ for (const tenantId of ENUMS_1.ALL_APP_TENANT_IDS) {
21
+ expect(tenantId).toMatch(/^app-[a-z]+$/);
22
+ }
23
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.4.86",
3
+ "version": "0.4.87",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",