types-shri-mangal-mandir 0.1.1

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.
Files changed (61) hide show
  1. package/README.md +34 -0
  2. package/SETUP.md +27 -0
  3. package/dist/consts/index.d.ts +1 -0
  4. package/dist/consts/index.js +3 -0
  5. package/dist/consts/index.js.map +1 -0
  6. package/dist/enum/entity-type.enum.d.ts +6 -0
  7. package/dist/enum/entity-type.enum.js +11 -0
  8. package/dist/enum/entity-type.enum.js.map +1 -0
  9. package/dist/enum/firestore-collections.enum.d.ts +7 -0
  10. package/dist/enum/firestore-collections.enum.js +12 -0
  11. package/dist/enum/firestore-collections.enum.js.map +1 -0
  12. package/dist/enum/index.d.ts +3 -0
  13. package/dist/enum/index.js +10 -0
  14. package/dist/enum/index.js.map +1 -0
  15. package/dist/enum/mandir-app.enum.d.ts +4 -0
  16. package/dist/enum/mandir-app.enum.js +9 -0
  17. package/dist/enum/mandir-app.enum.js.map +1 -0
  18. package/dist/index.d.ts +4 -0
  19. package/dist/index.js +21 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/interfaces/address.model.d.ts +13 -0
  22. package/dist/interfaces/address.model.js +3 -0
  23. package/dist/interfaces/address.model.js.map +1 -0
  24. package/dist/interfaces/api/user.api.model.d.ts +34 -0
  25. package/dist/interfaces/api/user.api.model.js +3 -0
  26. package/dist/interfaces/api/user.api.model.js.map +1 -0
  27. package/dist/interfaces/country.model.d.ts +8 -0
  28. package/dist/interfaces/country.model.js +3 -0
  29. package/dist/interfaces/country.model.js.map +1 -0
  30. package/dist/interfaces/created-by.model.d.ts +4 -0
  31. package/dist/interfaces/created-by.model.js +3 -0
  32. package/dist/interfaces/created-by.model.js.map +1 -0
  33. package/dist/interfaces/index.d.ts +6 -0
  34. package/dist/interfaces/index.js +23 -0
  35. package/dist/interfaces/index.js.map +1 -0
  36. package/dist/interfaces/phone-number-model.d.ts +20 -0
  37. package/dist/interfaces/phone-number-model.js +3 -0
  38. package/dist/interfaces/phone-number-model.js.map +1 -0
  39. package/dist/interfaces/timestamp.d.ts +32 -0
  40. package/dist/interfaces/timestamp.js +3 -0
  41. package/dist/interfaces/timestamp.js.map +1 -0
  42. package/dist/types/index.d.ts +2 -0
  43. package/dist/types/index.js +3 -0
  44. package/dist/types/index.js.map +1 -0
  45. package/package.json +24 -0
  46. package/publish_git.sh +21 -0
  47. package/src/consts/index.ts +1 -0
  48. package/src/enum/entity-type.enum.ts +6 -0
  49. package/src/enum/firestore-collections.enum.ts +7 -0
  50. package/src/enum/index.ts +3 -0
  51. package/src/enum/mandir-app.enum.ts +4 -0
  52. package/src/index.ts +4 -0
  53. package/src/interfaces/address.model.ts +13 -0
  54. package/src/interfaces/api/user.api.model.ts +31 -0
  55. package/src/interfaces/country.model.ts +8 -0
  56. package/src/interfaces/created-by.model.ts +4 -0
  57. package/src/interfaces/index.ts +6 -0
  58. package/src/interfaces/phone-number-model.ts +21 -0
  59. package/src/interfaces/timestamp.ts +32 -0
  60. package/src/types/index.ts +3 -0
  61. package/tsconfig.json +16 -0
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # types-shri-mangal-mandir
2
+
3
+ Shared TypeScript definitions for the Shri Mangal Mandir web and kiosk applications.
4
+
5
+ ## Getting started
6
+
7
+ ```bash
8
+ npm install
9
+ npm run build
10
+ ```
11
+
12
+ This compiles all declarations into `dist/` so they can be consumed by the Angular apps.
13
+
14
+ ## Usage inside apps
15
+
16
+ Install the package locally via a file reference, e.g.:
17
+
18
+ ```bash
19
+ npm install --save ../types-shri-mangal-mandir
20
+ ```
21
+
22
+ Then import the shapes you need:
23
+
24
+ ```ts
25
+ import { MandirBrandConfig } from 'types-shri-mangal-mandir';
26
+ ```
27
+
28
+ ## Project structure
29
+
30
+ - `src/enum` – application-level enums shared between clients.
31
+ - `src/interfaces` – core interfaces for brand, contact, and donation configuration.
32
+ - `src/types` – common type aliases (currencies, firebase config keys, etc.).
33
+
34
+ Extend this library as new shared contracts emerge between the web and kiosk projects.
package/SETUP.md ADDED
@@ -0,0 +1,27 @@
1
+ # Setup guide
2
+
3
+ 1. Install dependencies
4
+ ```bash
5
+ npm install
6
+ ```
7
+
8
+ 2. Build the library
9
+ ```bash
10
+ npm run build
11
+ ```
12
+
13
+ 3. Link into the consuming apps
14
+ ```bash
15
+ cd ../shri-mangal-mandir-web
16
+ npm install --save ../types-shri-mangal-mandir
17
+
18
+ cd ../shri-mangal-mandir-kiosk
19
+ npm install --save ../types-shri-mangal-mandir
20
+ ```
21
+
22
+ 4. Import types wherever needed
23
+ ```ts
24
+ import {MandirBrandConfig, DEFAULT_BRAND_CONFIG} from 'types-shri-mangal-mandir';
25
+ ```
26
+
27
+ 5. When types change, rebuild and commit the generated `dist/` folder so both apps pick up the updates.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export declare enum EntityType {
2
+ Web = "web",
3
+ Kiosk = "kiosk",
4
+ Admin = "admin",
5
+ System = "system"
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityType = void 0;
4
+ var EntityType;
5
+ (function (EntityType) {
6
+ EntityType["Web"] = "web";
7
+ EntityType["Kiosk"] = "kiosk";
8
+ EntityType["Admin"] = "admin";
9
+ EntityType["System"] = "system";
10
+ })(EntityType || (exports.EntityType = EntityType = {}));
11
+ //# sourceMappingURL=entity-type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-type.enum.js","sourceRoot":"","sources":["../../src/enum/entity-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB"}
@@ -0,0 +1,7 @@
1
+ export declare enum Collection {
2
+ Donations = "donations",
3
+ Volunteers = "volunteers",
4
+ Events = "events",
5
+ Devotees = "devotees",
6
+ Feedback = "feedback"
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Collection = void 0;
4
+ var Collection;
5
+ (function (Collection) {
6
+ Collection["Donations"] = "donations";
7
+ Collection["Volunteers"] = "volunteers";
8
+ Collection["Events"] = "events";
9
+ Collection["Devotees"] = "devotees";
10
+ Collection["Feedback"] = "feedback";
11
+ })(Collection || (exports.Collection = Collection = {}));
12
+ //# sourceMappingURL=firestore-collections.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firestore-collections.enum.js","sourceRoot":"","sources":["../../src/enum/firestore-collections.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,qCAAuB,CAAA;IACvB,uCAAyB,CAAA;IACzB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,mCAAqB,CAAA;AACvB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB"}
@@ -0,0 +1,3 @@
1
+ export { MandirApp } from './mandir-app.enum';
2
+ export { EntityType } from './entity-type.enum';
3
+ export { Collection } from './firestore-collections.enum';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Collection = exports.EntityType = exports.MandirApp = void 0;
4
+ var mandir_app_enum_1 = require("./mandir-app.enum");
5
+ Object.defineProperty(exports, "MandirApp", { enumerable: true, get: function () { return mandir_app_enum_1.MandirApp; } });
6
+ var entity_type_enum_1 = require("./entity-type.enum");
7
+ Object.defineProperty(exports, "EntityType", { enumerable: true, get: function () { return entity_type_enum_1.EntityType; } });
8
+ var firestore_collections_enum_1 = require("./firestore-collections.enum");
9
+ Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return firestore_collections_enum_1.Collection; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enum/index.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAArC,4GAAA,SAAS,OAAA;AAClB,uDAAgD;AAAvC,8GAAA,UAAU,OAAA;AACnB,2EAA0D;AAAjD,wHAAA,UAAU,OAAA"}
@@ -0,0 +1,4 @@
1
+ export declare enum MandirApp {
2
+ Web = "WEB",
3
+ Kiosk = "KIOSK"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MandirApp = void 0;
4
+ var MandirApp;
5
+ (function (MandirApp) {
6
+ MandirApp["Web"] = "WEB";
7
+ MandirApp["Kiosk"] = "KIOSK";
8
+ })(MandirApp || (exports.MandirApp = MandirApp = {}));
9
+ //# sourceMappingURL=mandir-app.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mandir-app.enum.js","sourceRoot":"","sources":["../../src/enum/mandir-app.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,4BAAe,CAAA;AACjB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}
@@ -0,0 +1,4 @@
1
+ export * from './enum';
2
+ export * from './interfaces';
3
+ export * from './types';
4
+ export * from './consts';
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./enum"), exports);
18
+ __exportStar(require("./interfaces"), exports);
19
+ __exportStar(require("./types"), exports);
20
+ __exportStar(require("./consts"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB"}
@@ -0,0 +1,13 @@
1
+ export interface AddressModel {
2
+ addressLine1: string;
3
+ addressLine2: string | null;
4
+ state: string;
5
+ street: string;
6
+ country: string;
7
+ postalCode: string;
8
+ city: string;
9
+ location: unknown;
10
+ formattedAddress?: string;
11
+ landmark?: string | null;
12
+ placeId?: string | null;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=address.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.model.js","sourceRoot":"","sources":["../../src/interfaces/address.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ import { Timestamp } from '../timestamp';
2
+ import { CreatedByModel } from '../created-by.model';
3
+ import { AddressModel } from '../address.model';
4
+ import { EntityType } from '../../enum';
5
+ import { CountryModel } from '../country.model';
6
+ import { PhoneNumberModel } from '../phone-number-model';
7
+ export interface UserApiModel {
8
+ id: string;
9
+ userId: string;
10
+ email: string;
11
+ country: CountryModel;
12
+ phoneNumber: PhoneNumberModel;
13
+ photoURL: string | null;
14
+ displayName?: string;
15
+ firstName: string;
16
+ lastName?: string;
17
+ gender: string;
18
+ color: string;
19
+ emailVerified: boolean;
20
+ createdAt: Timestamp;
21
+ updatedAt: Timestamp;
22
+ deletedAt: Timestamp | null;
23
+ isDeleted: boolean;
24
+ createdBy: CreatedByModel;
25
+ updatedBy: CreatedByModel;
26
+ deletedBy: CreatedByModel;
27
+ source: EntityType;
28
+ roles?: {
29
+ title: string;
30
+ value: string;
31
+ id: string;
32
+ };
33
+ address?: AddressModel;
34
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user.api.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.api.model.js","sourceRoot":"","sources":["../../../src/interfaces/api/user.api.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface CountryModel {
2
+ name: string;
3
+ code: string;
4
+ currencyCode: string;
5
+ currencySymbol: string;
6
+ locale: string;
7
+ tax: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=country.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country.model.js","sourceRoot":"","sources":["../../src/interfaces/country.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface CreatedByModel {
2
+ id: string;
3
+ name: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=created-by.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"created-by.model.js","sourceRoot":"","sources":["../../src/interfaces/created-by.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './timestamp';
2
+ export * from './created-by.model';
3
+ export * from './country.model';
4
+ export * from './phone-number-model';
5
+ export * from './address.model';
6
+ export * from './api/user.api.model';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./timestamp"), exports);
18
+ __exportStar(require("./created-by.model"), exports);
19
+ __exportStar(require("./country.model"), exports);
20
+ __exportStar(require("./phone-number-model"), exports);
21
+ __exportStar(require("./address.model"), exports);
22
+ __exportStar(require("./api/user.api.model"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,qDAAmC;AACnC,kDAAgC;AAChC,uDAAqC;AACrC,kDAAgC;AAChC,uDAAqC"}
@@ -0,0 +1,20 @@
1
+ export interface PhoneNumberModel {
2
+ number: NumberModel;
3
+ regionCode: string;
4
+ countryCode: number;
5
+ valid: boolean;
6
+ possible: boolean;
7
+ canBeInternationallyDialled: boolean;
8
+ type: string;
9
+ typeIsFixedLine: boolean;
10
+ typeIsMobile: boolean;
11
+ possibility: string;
12
+ }
13
+ export interface NumberModel {
14
+ input: string;
15
+ international: string;
16
+ national: string;
17
+ e164: string;
18
+ rfc3966: string;
19
+ significant: string;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=phone-number-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-number-model.js","sourceRoot":"","sources":["../../src/interfaces/phone-number-model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Firestore Timestamp type copied from the Firebase JS SDK type definition.
3
+ * Provides a structural representation without requiring the actual SDK.
4
+ */
5
+ export declare class Timestamp {
6
+ /** Number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. */
7
+ readonly seconds: number;
8
+ /** Fractions of a second at nanosecond resolution. */
9
+ readonly nanoseconds: number;
10
+ /** Returns a timestamp representing the current date/time. */
11
+ static now(): Timestamp;
12
+ /** Creates a timestamp from a JavaScript `Date`. */
13
+ static fromDate(date: Date): Timestamp;
14
+ /** Creates a timestamp from milliseconds since Unix epoch. */
15
+ static fromMillis(milliseconds: number): Timestamp;
16
+ constructor(seconds: number, nanoseconds: number);
17
+ /** Converts the timestamp into a `Date`. */
18
+ toDate(): Date;
19
+ /** Converts the timestamp into milliseconds since Unix epoch. */
20
+ toMillis(): number;
21
+ /** Returns whether two timestamps are equal. */
22
+ isEqual(other: Timestamp): boolean;
23
+ /** String representation. */
24
+ toString(): string;
25
+ /** JSON representation. */
26
+ toJSON(): {
27
+ seconds: number;
28
+ nanoseconds: number;
29
+ };
30
+ /** Primitive value representation for comparisons. */
31
+ valueOf(): string;
32
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=timestamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../src/interfaces/timestamp.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type FirebaseConfigKey = 'default' | 'production' | 'staging';
2
+ export type CurrencyCode = 'USD' | 'INR';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "types-shri-mangal-mandir",
3
+ "version": "0.1.1",
4
+ "description": "Shared TypeScript types for Shri Mangal Mandir web and kiosk apps",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "start": "tsc",
9
+ "build": "tsc",
10
+ "watch": "tsc --watch",
11
+ "publish": "bash ./publish_git.sh"
12
+ },
13
+ "keywords": [
14
+ "types",
15
+ "shri-mangal-mandir",
16
+ "typescript"
17
+ ],
18
+ "author": "",
19
+ "license": "MIT",
20
+ "devDependencies": {
21
+ "typescript": "^5.4.0"
22
+ },
23
+ "dependencies": {}
24
+ }
package/publish_git.sh ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ echo "Using npm auth token from .npmrc (ensure it's set before running)."
5
+
6
+ echo "Select version bump type:"
7
+ select version_type in "patch" "minor" "major"; do
8
+ if [ -n "${version_type:-}" ]; then
9
+ break
10
+ fi
11
+ echo "Please choose a valid option."
12
+ done
13
+
14
+ echo "Bumping npm version ($version_type)..."
15
+ npm version "$version_type" --no-git-tag-version
16
+
17
+ npm run build
18
+
19
+ echo "Publishing to npm..."
20
+
21
+ npm publish --access public
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export enum EntityType {
2
+ Web = 'web',
3
+ Kiosk = 'kiosk',
4
+ Admin = 'admin',
5
+ System = 'system',
6
+ }
@@ -0,0 +1,7 @@
1
+ export enum Collection {
2
+ Donations = 'donations',
3
+ Volunteers = 'volunteers',
4
+ Events = 'events',
5
+ Devotees = 'devotees',
6
+ Feedback = 'feedback',
7
+ }
@@ -0,0 +1,3 @@
1
+ export { MandirApp } from './mandir-app.enum';
2
+ export { EntityType } from './entity-type.enum';
3
+ export { Collection } from './firestore-collections.enum';
@@ -0,0 +1,4 @@
1
+ export enum MandirApp {
2
+ Web = 'WEB',
3
+ Kiosk = 'KIOSK',
4
+ }
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './enum';
2
+ export * from './interfaces';
3
+ export * from './types';
4
+ export * from './consts';
@@ -0,0 +1,13 @@
1
+ export interface AddressModel {
2
+ addressLine1: string;
3
+ addressLine2: string | null;
4
+ state: string;
5
+ street: string;
6
+ country: string;
7
+ postalCode: string;
8
+ city: string;
9
+ location: unknown;
10
+ formattedAddress?: string;
11
+ landmark?: string | null;
12
+ placeId?: string | null;
13
+ }
@@ -0,0 +1,31 @@
1
+ import { Timestamp } from '../timestamp';
2
+ import { CreatedByModel } from '../created-by.model';
3
+ import { AddressModel } from '../address.model';
4
+ import { EntityType } from '../../enum';
5
+ import { CountryModel } from '../country.model';
6
+ import { PhoneNumberModel } from '../phone-number-model';
7
+
8
+ export interface UserApiModel {
9
+ id: string;
10
+ userId: string;
11
+ email: string;
12
+ country: CountryModel;
13
+ phoneNumber: PhoneNumberModel;
14
+ photoURL: string | null;
15
+ displayName?: string;
16
+ firstName: string;
17
+ lastName?: string;
18
+ gender: string;
19
+ color: string;
20
+ emailVerified: boolean;
21
+ createdAt: Timestamp;
22
+ updatedAt: Timestamp;
23
+ deletedAt: Timestamp | null;
24
+ isDeleted: boolean;
25
+ createdBy: CreatedByModel;
26
+ updatedBy: CreatedByModel;
27
+ deletedBy: CreatedByModel;
28
+ source: EntityType;
29
+ roles?: { title: string; value: string; id: string };
30
+ address?: AddressModel;
31
+ }
@@ -0,0 +1,8 @@
1
+ export interface CountryModel {
2
+ name: string;
3
+ code: string;
4
+ currencyCode: string;
5
+ currencySymbol: string;
6
+ locale: string;
7
+ tax: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ export interface CreatedByModel {
2
+ id: string;
3
+ name: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ export * from './timestamp';
2
+ export * from './created-by.model';
3
+ export * from './country.model';
4
+ export * from './phone-number-model';
5
+ export * from './address.model';
6
+ export * from './api/user.api.model';
@@ -0,0 +1,21 @@
1
+ export interface PhoneNumberModel {
2
+ number: NumberModel;
3
+ regionCode: string;
4
+ countryCode: number;
5
+ valid: boolean;
6
+ possible: boolean;
7
+ canBeInternationallyDialled: boolean;
8
+ type: string;
9
+ typeIsFixedLine: boolean;
10
+ typeIsMobile: boolean;
11
+ possibility: string;
12
+ }
13
+
14
+ export interface NumberModel {
15
+ input: string;
16
+ international: string;
17
+ national: string;
18
+ e164: string;
19
+ rfc3966: string;
20
+ significant: string;
21
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Firestore Timestamp type copied from the Firebase JS SDK type definition.
3
+ * Provides a structural representation without requiring the actual SDK.
4
+ */
5
+ export declare class Timestamp {
6
+ /** Number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. */
7
+ readonly seconds: number;
8
+ /** Fractions of a second at nanosecond resolution. */
9
+ readonly nanoseconds: number;
10
+
11
+ /** Returns a timestamp representing the current date/time. */
12
+ static now(): Timestamp;
13
+ /** Creates a timestamp from a JavaScript `Date`. */
14
+ static fromDate(date: Date): Timestamp;
15
+ /** Creates a timestamp from milliseconds since Unix epoch. */
16
+ static fromMillis(milliseconds: number): Timestamp;
17
+
18
+ constructor(seconds: number, nanoseconds: number);
19
+
20
+ /** Converts the timestamp into a `Date`. */
21
+ toDate(): Date;
22
+ /** Converts the timestamp into milliseconds since Unix epoch. */
23
+ toMillis(): number;
24
+ /** Returns whether two timestamps are equal. */
25
+ isEqual(other: Timestamp): boolean;
26
+ /** String representation. */
27
+ toString(): string;
28
+ /** JSON representation. */
29
+ toJSON(): { seconds: number; nanoseconds: number };
30
+ /** Primitive value representation for comparisons. */
31
+ valueOf(): string;
32
+ }
@@ -0,0 +1,3 @@
1
+ export type FirebaseConfigKey = 'default' | 'production' | 'staging';
2
+
3
+ export type CurrencyCode = 'USD' | 'INR';
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "module": "commonjs",
5
+ "lib": ["DOM", "ES2017"],
6
+ "declaration": true,
7
+ "sourceMap": true,
8
+ "outDir": "dist",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "skipLibCheck": true,
12
+ "forceConsistentCasingInFileNames": true
13
+ },
14
+ "include": ["src/**/*"],
15
+ "exclude": ["node_modules", "dist"]
16
+ }