spotcharge-types 1.0.325 → 1.0.327

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 (47) hide show
  1. package/dist/enum/station-access-capability.enum.d.ts +1 -0
  2. package/dist/enum/station-access-capability.enum.d.ts.map +1 -1
  3. package/dist/enum/station-access-capability.enum.js +1 -0
  4. package/dist/enum/station-access-capability.enum.js.map +1 -1
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/models/api/charger.api.model.d.ts +2 -1
  10. package/dist/models/api/charger.api.model.d.ts.map +1 -1
  11. package/dist/models/api/companies/company.api.model.d.ts +68 -0
  12. package/dist/models/api/companies/company.api.model.d.ts.map +1 -0
  13. package/dist/models/api/companies/company.api.model.js +3 -0
  14. package/dist/models/api/companies/company.api.model.js.map +1 -0
  15. package/dist/models/api/companies/index.d.ts +2 -0
  16. package/dist/models/api/companies/index.d.ts.map +1 -0
  17. package/dist/models/api/companies/index.js +18 -0
  18. package/dist/models/api/companies/index.js.map +1 -0
  19. package/dist/models/api/company.api.model.d.ts +1 -0
  20. package/dist/models/api/company.api.model.d.ts.map +1 -1
  21. package/dist/models/api/index.d.ts +1 -0
  22. package/dist/models/api/index.d.ts.map +1 -1
  23. package/dist/models/api/index.js.map +1 -1
  24. package/dist/models/api/station-search.api.model.d.ts +1 -0
  25. package/dist/models/api/station-search.api.model.d.ts.map +1 -1
  26. package/dist/models/api/station.api.model.d.ts +6 -3
  27. package/dist/models/api/station.api.model.d.ts.map +1 -1
  28. package/dist/utils/index.d.ts +2 -0
  29. package/dist/utils/index.d.ts.map +1 -0
  30. package/dist/utils/index.js +10 -0
  31. package/dist/utils/index.js.map +1 -0
  32. package/dist/utils/station-access.util.d.ts +10 -0
  33. package/dist/utils/station-access.util.d.ts.map +1 -0
  34. package/dist/utils/station-access.util.js +51 -0
  35. package/dist/utils/station-access.util.js.map +1 -0
  36. package/package.json +2 -1
  37. package/src/enum/station-access-capability.enum.ts +1 -0
  38. package/src/index.ts +1 -0
  39. package/src/models/api/charger.api.model.ts +2 -1
  40. package/src/models/api/companies/company.api.model.ts +75 -0
  41. package/src/models/api/companies/index.ts +1 -0
  42. package/src/models/api/company.api.model.ts +1 -0
  43. package/src/models/api/index.ts +8 -0
  44. package/src/models/api/station-search.api.model.ts +1 -0
  45. package/src/models/api/station.api.model.ts +6 -6
  46. package/src/utils/index.ts +7 -0
  47. package/src/utils/station-access.util.ts +58 -0
@@ -1,3 +1,4 @@
1
+ /** @deprecated Use StationAccessType on the station document instead. */
1
2
  export declare enum StationAccessCapability {
2
3
  Fleet = "fleet",
3
4
  Public = "public",
@@ -1 +1 @@
1
- {"version":3,"file":"station-access-capability.enum.d.ts","sourceRoot":"","sources":["../../src/enum/station-access-capability.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,uBAAuB;IACjC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,aAAa,mBAAmB;CACjC"}
1
+ {"version":3,"file":"station-access-capability.enum.d.ts","sourceRoot":"","sources":["../../src/enum/station-access-capability.enum.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,oBAAY,uBAAuB;IACjC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,aAAa,mBAAmB;CACjC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StationAccessCapability = void 0;
4
+ /** @deprecated Use StationAccessType on the station document instead. */
4
5
  var StationAccessCapability;
5
6
  (function (StationAccessCapability) {
6
7
  StationAccessCapability["Fleet"] = "fleet";
@@ -1 +1 @@
1
- {"version":3,"file":"station-access-capability.enum.js","sourceRoot":"","sources":["../../src/enum/station-access-capability.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,0CAAe,CAAA;IACf,4CAAiB,CAAA;IACjB,2DAAgC,CAAA;AAClC,CAAC,EAJW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAIlC"}
1
+ {"version":3,"file":"station-access-capability.enum.js","sourceRoot":"","sources":["../../src/enum/station-access-capability.enum.ts"],"names":[],"mappings":";;;AAAA,yEAAyE;AACzE,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,0CAAe,CAAA;IACf,4CAAiB,CAAA;IACjB,2DAAgC,CAAA;AAClC,CAAC,EAJW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAIlC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './enum/index';
2
2
  export * from './models/index';
3
3
  export * from './consts/index';
4
+ export * from './utils/index';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enum/index"), exports);
18
18
  __exportStar(require("./models/index"), exports);
19
19
  __exportStar(require("./consts/index"), exports);
20
+ __exportStar(require("./utils/index"), exports);
20
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B;AAC/B,gDAA8B"}
@@ -19,7 +19,8 @@ export interface ChargerApiModel {
19
19
  connectors: Record<string, ConnectorModel>;
20
20
  gst: GstModel;
21
21
  protocol: string;
22
- allowedModes: ChargerAllowedMode[];
22
+ /** @deprecated Access is defined on the parent station via accessType. */
23
+ allowedModes?: ChargerAllowedMode[];
23
24
  accessNote?: string;
24
25
  purchaseRate: number;
25
26
  isServiceChargeApplicable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"charger.api.model.d.ts","sourceRoot":"","sources":["../../../src/models/api/charger.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,aAAa,EAAE,WAAW,EAAY,MAAM,YAAY,CAAC;AACpI,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC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EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,68 @@
1
+ import { CompanyStatus, CompanyType } from '../../../enum';
2
+ import { AuditActor } from '../../audit-actor.model';
3
+ import { PhoneNumberModel } from '../../phone-number-model';
4
+ import { AddressApiModel } from '../address.api.model';
5
+ import { AuditTimestampsApiModel, IsoDateTime } from '../users/shared.api.model';
6
+ import { ApiSortDirection } from '../users/admin-user.api.model';
7
+ /** GET /api/companies */
8
+ export type CompanyListOrderBy = 'name' | 'status' | 'contactName' | 'createdAt';
9
+ export interface CompanyListItemApiModel {
10
+ /** companies.companies.id (uuid). */
11
+ id: string;
12
+ name: string;
13
+ displayName?: string;
14
+ type?: CompanyType;
15
+ contactName: string;
16
+ contactEmail?: string;
17
+ status: CompanyStatus;
18
+ createdAt: IsoDateTime;
19
+ }
20
+ /** GET /api/companies — paginated list response */
21
+ export interface CompanyListApiModel {
22
+ rows: CompanyListItemApiModel[];
23
+ totalCount: number;
24
+ pageIndex: number;
25
+ pageSize: number;
26
+ orderBy: CompanyListOrderBy;
27
+ sortDirection: ApiSortDirection;
28
+ }
29
+ /** GET /api/companies/:id */
30
+ export interface CompanyDetailApiModel extends Omit<CompanyListItemApiModel, 'contactEmail'>, AuditTimestampsApiModel {
31
+ legacyFirestoreId?: string | null;
32
+ contactPhone?: PhoneNumberModel | null;
33
+ contactEmail?: string | null;
34
+ address?: AddressApiModel | null;
35
+ gstNumber?: string | null;
36
+ panNumber?: string | null;
37
+ isDeleted: boolean;
38
+ createdBy: AuditActor | null;
39
+ updatedBy: AuditActor | null;
40
+ deletedBy: AuditActor | null;
41
+ }
42
+ /** POST /api/companies — audit fields set server-side from auth token. */
43
+ export interface CreateCompanyRequest {
44
+ name: string;
45
+ displayName?: string;
46
+ type?: CompanyType;
47
+ contactName: string;
48
+ contactPhone?: PhoneNumberModel | null;
49
+ contactEmail?: string;
50
+ address?: AddressApiModel | null;
51
+ gstNumber?: string;
52
+ panNumber?: string;
53
+ status?: CompanyStatus;
54
+ }
55
+ /** PATCH /api/companies/:id */
56
+ export interface UpdateCompanyRequest {
57
+ name?: string;
58
+ displayName?: string | null;
59
+ type?: CompanyType | null;
60
+ contactName?: string;
61
+ contactPhone?: PhoneNumberModel | null;
62
+ contactEmail?: string | null;
63
+ address?: AddressApiModel | null;
64
+ gstNumber?: string | null;
65
+ panNumber?: string | null;
66
+ status?: CompanyStatus;
67
+ }
68
+ //# sourceMappingURL=company.api.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.api.model.d.ts","sourceRoot":"","sources":["../../../../src/models/api/companies/company.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,yBAAyB;AACzB,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC;AAEjF,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,WAAW,CAAC;CACxB;AAED,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,uBAAuB,EAAE,CA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WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=company.api.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.api.model.js","sourceRoot":"","sources":["../../../../src/models/api/companies/company.api.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './company.api.model';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/api/companies/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
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("./company.api.model"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/api/companies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
@@ -3,6 +3,7 @@ import { PhoneNumberModel } from "../phone-number-model";
3
3
  import { CreatedByModel } from "../created-by.model";
4
4
  import { Timestamp } from "../timestamp";
5
5
  import { AddressApiModel } from "./address.api.model";
6
+ /** @deprecated Firestore document shape. Use CompanyDetailApiModel from `./companies` for Postgres REST API. */
6
7
  export interface CompanyApiModel {
7
8
  id: string;
8
9
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"company.api.model.d.ts","sourceRoot":"","sources":["../../../src/models/api/company.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,a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,SAAS,EAAE,OAAO,CAAC;CACtB"}
@@ -50,6 +50,7 @@ export { FleetUserAccessApiModel } from './fleet-user-access.api.model';
50
50
  export { TariffApiModel } from './tariff.api.model';
51
51
  export { TariffAssignmentApiModel } from './tariff-assignment.api.model';
52
52
  export { CompanyApiModel } from './company.api.model';
53
+ export { CompanyDetailApiModel, CompanyListApiModel, CompanyListItemApiModel, CompanyListOrderBy, CreateCompanyRequest, UpdateCompanyRequest, } from './companies/company.api.model';
53
54
  export { CompanyUserApiModel } from './company-user.api.model';
54
55
  export { BusinessModelConfig, RevenueConfig } from './franchise-business-model';
55
56
  export { CompanyUserEntityAccessApiModel } from './company-user-entity-access.api.model';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,eAAe,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,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MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,sBAAsB,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAC3J,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAC,2BAA2B,EAAC,MAAM,mCAAmC,CAAC;AAC9E,cAAc,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoCA,mCAA+C;AAAvC,2GAAA,mBAAmB,OAAA;AA4B3B,yEAA2J;AAA3H,0IAAA,6BAA6B,OAAA;AAAE,4IAAA,+BAA+B,OAAA;AAAE,mIAAA,sBAAsB,OAAA;AAGtH,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoCA,mCAA+C;AAAvC,2GAAA,mBAAmB,OAAA;AAoC3B,yEAA2J;AAA3H,0IAAA,6BAA6B,OAAA;AAAE,4IAAA,+BAA+B,OAAA;AAAE,mIAAA,sBAAsB,OAAA;AAGtH,0CAAwB"}
@@ -20,6 +20,7 @@ export interface StationSearchApiModel {
20
20
  lat: number;
21
21
  lng: number;
22
22
  } | null;
23
+ /** @deprecated Mirrored from accessType during transition. */
23
24
  capabilitiesAccess?: string[];
24
25
  createdAt?: number;
25
26
  updatedAt?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"station-search.api.model.d.ts","sourceRoot":"","sources":["../../../src/models/api/station-search.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACf,GAAG,IAAI,CAAC;IACT,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC"}
1
+ {"version":3,"file":"station-search.api.model.d.ts","sourceRoot":"","sources":["../../../src/models/api/station-search.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACf,GAAG,IAAI,CAAC;IACT,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC"}
@@ -21,14 +21,17 @@ export interface StationApiModel {
21
21
  lat: number;
22
22
  lng: number;
23
23
  };
24
- capabilities: {
24
+ /** Admin-configured physical access for the station location. */
25
+ accessType: StationAccessType[];
26
+ /** @deprecated Use accessType. Removed after all consumers migrate. */
27
+ capabilities?: {
25
28
  access: StationAccessCapability[];
26
29
  };
27
- accessType: StationAccessType[];
28
30
  amenities: StationAmenities;
29
31
  facilities: StationFacility[];
30
32
  photos: StationPhotoModel[];
31
- chargerCounts: StationChargerCounts;
33
+ /** @deprecated No longer maintained. Query chargers by stationId when needed. */
34
+ chargerCounts?: StationChargerCounts;
32
35
  status: StationStatus;
33
36
  createdBy: CreatedByModel;
34
37
  updatedBy: CreatedByModel;
@@ -1 +1 @@
1
- {"version":3,"file":"station.api.model.d.ts","sourceRoot":"","sources":["../../../src/models/api/station.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACtG,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IACF,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IAGF,YAAY,EAAE;QACZ,MAAM,EAAE,uBAAuB,EAAE,CAAC;KACnC,CAAC;IACF,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,UAAU,EAAE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AAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export { CONSUMER_STATION_ACCESS_TYPES, FLEET_STATION_ACCESS_TYPES, mapCapabilitiesAccessToAccessType, stationHasConsumerAccess, stationHasFleetAccess, } from './station-access.util';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,iCAAiC,EACjC,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stationHasFleetAccess = exports.stationHasConsumerAccess = exports.mapCapabilitiesAccessToAccessType = exports.FLEET_STATION_ACCESS_TYPES = exports.CONSUMER_STATION_ACCESS_TYPES = void 0;
4
+ var station_access_util_1 = require("./station-access.util");
5
+ Object.defineProperty(exports, "CONSUMER_STATION_ACCESS_TYPES", { enumerable: true, get: function () { return station_access_util_1.CONSUMER_STATION_ACCESS_TYPES; } });
6
+ Object.defineProperty(exports, "FLEET_STATION_ACCESS_TYPES", { enumerable: true, get: function () { return station_access_util_1.FLEET_STATION_ACCESS_TYPES; } });
7
+ Object.defineProperty(exports, "mapCapabilitiesAccessToAccessType", { enumerable: true, get: function () { return station_access_util_1.mapCapabilitiesAccessToAccessType; } });
8
+ Object.defineProperty(exports, "stationHasConsumerAccess", { enumerable: true, get: function () { return station_access_util_1.stationHasConsumerAccess; } });
9
+ Object.defineProperty(exports, "stationHasFleetAccess", { enumerable: true, get: function () { return station_access_util_1.stationHasFleetAccess; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,6DAM+B;AAL7B,oIAAA,6BAA6B,OAAA;AAC7B,iIAAA,0BAA0B,OAAA;AAC1B,wIAAA,iCAAiC,OAAA;AACjC,+HAAA,wBAAwB,OAAA;AACxB,4HAAA,qBAAqB,OAAA"}
@@ -0,0 +1,10 @@
1
+ import { StationAccessCapability, StationAccessType } from '../enum';
2
+ /** Station access types visible in consumer discovery (map/search). */
3
+ export declare const CONSUMER_STATION_ACCESS_TYPES: StationAccessType[];
4
+ /** Maps legacy capabilities.access values to station accessType for migration backfill. */
5
+ export declare function mapCapabilitiesAccessToAccessType(capabilitiesAccess: StationAccessCapability[] | string[] | undefined | null): StationAccessType[];
6
+ export declare function stationHasConsumerAccess(accessType: StationAccessType[] | undefined | null): boolean;
7
+ /** Station access types used for fleet-operated locations. */
8
+ export declare const FLEET_STATION_ACCESS_TYPES: StationAccessType[];
9
+ export declare function stationHasFleetAccess(accessType: StationAccessType[] | undefined | null): boolean;
10
+ //# sourceMappingURL=station-access.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"station-access.util.d.ts","sourceRoot":"","sources":["../../src/utils/station-access.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQnE,uEAAuE;AACvE,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,EAG5D,CAAC;AAEF,2FAA2F;AAC3F,wBAAgB,iCAAiC,CAC/C,kBAAkB,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,GAC1E,iBAAiB,EAAE,CAcrB;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,iBAAiB,EAAE,GAAG,SAAS,GAAG,IAAI,GACjD,OAAO,CAMT;AAED,8DAA8D;AAC9D,eAAO,MAAM,0BAA0B,EAAE,iBAAiB,EAGzD,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,iBAAiB,EAAE,GAAG,SAAS,GAAG,IAAI,GACjD,OAAO,CAMT"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.stationHasFleetAccess = exports.FLEET_STATION_ACCESS_TYPES = exports.stationHasConsumerAccess = exports.mapCapabilitiesAccessToAccessType = exports.CONSUMER_STATION_ACCESS_TYPES = void 0;
5
+ var enum_1 = require("../enum");
6
+ var CAPABILITY_TO_ACCESS_TYPE = (_a = {},
7
+ _a[enum_1.StationAccessCapability.Public] = enum_1.StationAccessType.Public,
8
+ _a[enum_1.StationAccessCapability.Fleet] = enum_1.StationAccessType.Fleet,
9
+ _a[enum_1.StationAccessCapability.ResidentsOnly] = enum_1.StationAccessType.ResidentsOnly,
10
+ _a);
11
+ /** Station access types visible in consumer discovery (map/search). */
12
+ exports.CONSUMER_STATION_ACCESS_TYPES = [
13
+ enum_1.StationAccessType.Public,
14
+ enum_1.StationAccessType.ResidentsOnly,
15
+ ];
16
+ /** Maps legacy capabilities.access values to station accessType for migration backfill. */
17
+ function mapCapabilitiesAccessToAccessType(capabilitiesAccess) {
18
+ if (!(capabilitiesAccess === null || capabilitiesAccess === void 0 ? void 0 : capabilitiesAccess.length)) {
19
+ return [];
20
+ }
21
+ var mapped = new Set();
22
+ for (var _i = 0, capabilitiesAccess_1 = capabilitiesAccess; _i < capabilitiesAccess_1.length; _i++) {
23
+ var capability = capabilitiesAccess_1[_i];
24
+ var accessType = CAPABILITY_TO_ACCESS_TYPE[capability];
25
+ if (accessType) {
26
+ mapped.add(accessType);
27
+ }
28
+ }
29
+ return Array.from(mapped);
30
+ }
31
+ exports.mapCapabilitiesAccessToAccessType = mapCapabilitiesAccessToAccessType;
32
+ function stationHasConsumerAccess(accessType) {
33
+ if (!(accessType === null || accessType === void 0 ? void 0 : accessType.length)) {
34
+ return false;
35
+ }
36
+ return accessType.some(function (type) { return exports.CONSUMER_STATION_ACCESS_TYPES.indexOf(type) !== -1; });
37
+ }
38
+ exports.stationHasConsumerAccess = stationHasConsumerAccess;
39
+ /** Station access types used for fleet-operated locations. */
40
+ exports.FLEET_STATION_ACCESS_TYPES = [
41
+ enum_1.StationAccessType.Fleet,
42
+ enum_1.StationAccessType.Private,
43
+ ];
44
+ function stationHasFleetAccess(accessType) {
45
+ if (!(accessType === null || accessType === void 0 ? void 0 : accessType.length)) {
46
+ return false;
47
+ }
48
+ return accessType.some(function (type) { return exports.FLEET_STATION_ACCESS_TYPES.indexOf(type) !== -1; });
49
+ }
50
+ exports.stationHasFleetAccess = stationHasFleetAccess;
51
+ //# sourceMappingURL=station-access.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"station-access.util.js","sourceRoot":"","sources":["../../src/utils/station-access.util.ts"],"names":[],"mappings":";;;;AAAA,gCAAmE;AAEnE,IAAM,yBAAyB;IAC7B,GAAC,8BAAuB,CAAC,MAAM,IAAG,wBAAiB,CAAC,MAAM;IAC1D,GAAC,8BAAuB,CAAC,KAAK,IAAG,wBAAiB,CAAC,KAAK;IACxD,GAAC,8BAAuB,CAAC,aAAa,IAAG,wBAAiB,CAAC,aAAa;OACzE,CAAC;AAEF,uEAAuE;AAC1D,QAAA,6BAA6B,GAAwB;IAChE,wBAAiB,CAAC,MAAM;IACxB,wBAAiB,CAAC,aAAa;CAChC,CAAC;AAEF,2FAA2F;AAC3F,SAAgB,iCAAiC,CAC/C,kBAA2E;IAE3E,IAAI,CAAC,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,CAAA,EAAE;QAC/B,OAAO,EAAE,CAAC;KACX;IAED,IAAM,MAAM,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC5C,KAAyB,UAAkB,EAAlB,yCAAkB,EAAlB,gCAAkB,EAAlB,IAAkB,EAAE;QAAxC,IAAM,UAAU,2BAAA;QACnB,IAAM,UAAU,GAAG,yBAAyB,CAAC,UAAqC,CAAC,CAAC;QACpF,IAAI,UAAU,EAAE;YACd,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SACxB;KACF;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAhBD,8EAgBC;AAED,SAAgB,wBAAwB,CACtC,UAAkD;IAElD,IAAI,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,CAAA,EAAE;QACvB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,UAAU,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,qCAA6B,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAlD,CAAkD,CAAC,CAAC;AACvF,CAAC;AARD,4DAQC;AAED,8DAA8D;AACjD,QAAA,0BAA0B,GAAwB;IAC7D,wBAAiB,CAAC,KAAK;IACvB,wBAAiB,CAAC,OAAO;CAC1B,CAAC;AAEF,SAAgB,qBAAqB,CACnC,UAAkD;IAElD,IAAI,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,CAAA,EAAE;QACvB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,UAAU,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,kCAA0B,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAA/C,CAA+C,CAAC,CAAC;AACpF,CAAC;AARD,sDAQC"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "spotcharge-types",
3
- "version": "1.0.325",
3
+ "version": "1.0.327",
4
4
  "description": "Spotcharge types",
5
5
  "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "scripts": {
7
8
  "start": "tsc",
8
9
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -1,3 +1,4 @@
1
+ /** @deprecated Use StationAccessType on the station document instead. */
1
2
  export enum StationAccessCapability {
2
3
  Fleet = 'fleet',
3
4
  Public = 'public',
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './enum/index';
2
2
  export * from './models/index';
3
3
  export * from './consts/index';
4
+ export * from './utils/index';
@@ -20,7 +20,8 @@ export interface ChargerApiModel {
20
20
  connectors: Record<string, ConnectorModel>;
21
21
  gst: GstModel;
22
22
  protocol: string;
23
- allowedModes: ChargerAllowedMode[];
23
+ /** @deprecated Access is defined on the parent station via accessType. */
24
+ allowedModes?: ChargerAllowedMode[];
24
25
  accessNote?: string;
25
26
  purchaseRate: number;
26
27
  isServiceChargeApplicable: boolean;
@@ -0,0 +1,75 @@
1
+ import { CompanyStatus, CompanyType } from '../../../enum';
2
+ import { AuditActor } from '../../audit-actor.model';
3
+ import { PhoneNumberModel } from '../../phone-number-model';
4
+ import { AddressApiModel } from '../address.api.model';
5
+ import { AuditTimestampsApiModel, IsoDateTime } from '../users/shared.api.model';
6
+ import { ApiSortDirection } from '../users/admin-user.api.model';
7
+
8
+ /** GET /api/companies */
9
+ export type CompanyListOrderBy = 'name' | 'status' | 'contactName' | 'createdAt';
10
+
11
+ export interface CompanyListItemApiModel {
12
+ /** companies.companies.id (uuid). */
13
+ id: string;
14
+ name: string;
15
+ displayName?: string;
16
+ type?: CompanyType;
17
+ contactName: string;
18
+ contactEmail?: string;
19
+ status: CompanyStatus;
20
+ createdAt: IsoDateTime;
21
+ }
22
+
23
+ /** GET /api/companies — paginated list response */
24
+ export interface CompanyListApiModel {
25
+ rows: CompanyListItemApiModel[];
26
+ totalCount: number;
27
+ pageIndex: number;
28
+ pageSize: number;
29
+ orderBy: CompanyListOrderBy;
30
+ sortDirection: ApiSortDirection;
31
+ }
32
+
33
+ /** GET /api/companies/:id */
34
+ export interface CompanyDetailApiModel
35
+ extends Omit<CompanyListItemApiModel, 'contactEmail'>,
36
+ AuditTimestampsApiModel {
37
+ legacyFirestoreId?: string | null;
38
+ contactPhone?: PhoneNumberModel | null;
39
+ contactEmail?: string | null;
40
+ address?: AddressApiModel | null;
41
+ gstNumber?: string | null;
42
+ panNumber?: string | null;
43
+ isDeleted: boolean;
44
+ createdBy: AuditActor | null;
45
+ updatedBy: AuditActor | null;
46
+ deletedBy: AuditActor | null;
47
+ }
48
+
49
+ /** POST /api/companies — audit fields set server-side from auth token. */
50
+ export interface CreateCompanyRequest {
51
+ name: string;
52
+ displayName?: string;
53
+ type?: CompanyType;
54
+ contactName: string;
55
+ contactPhone?: PhoneNumberModel | null;
56
+ contactEmail?: string;
57
+ address?: AddressApiModel | null;
58
+ gstNumber?: string;
59
+ panNumber?: string;
60
+ status?: CompanyStatus;
61
+ }
62
+
63
+ /** PATCH /api/companies/:id */
64
+ export interface UpdateCompanyRequest {
65
+ name?: string;
66
+ displayName?: string | null;
67
+ type?: CompanyType | null;
68
+ contactName?: string;
69
+ contactPhone?: PhoneNumberModel | null;
70
+ contactEmail?: string | null;
71
+ address?: AddressApiModel | null;
72
+ gstNumber?: string | null;
73
+ panNumber?: string | null;
74
+ status?: CompanyStatus;
75
+ }
@@ -0,0 +1 @@
1
+ export * from './company.api.model';
@@ -4,6 +4,7 @@ import {CreatedByModel} from "../created-by.model";
4
4
  import {Timestamp} from "../timestamp";
5
5
  import {AddressApiModel} from "./address.api.model";
6
6
 
7
+ /** @deprecated Firestore document shape. Use CompanyDetailApiModel from `./companies` for Postgres REST API. */
7
8
  export interface CompanyApiModel {
8
9
  id: string;
9
10
  name: string;
@@ -58,6 +58,14 @@ export {FleetUserAccessApiModel} from './fleet-user-access.api.model';
58
58
  export {TariffApiModel} from './tariff.api.model';
59
59
  export {TariffAssignmentApiModel} from './tariff-assignment.api.model';
60
60
  export {CompanyApiModel} from './company.api.model';
61
+ export {
62
+ CompanyDetailApiModel,
63
+ CompanyListApiModel,
64
+ CompanyListItemApiModel,
65
+ CompanyListOrderBy,
66
+ CreateCompanyRequest,
67
+ UpdateCompanyRequest,
68
+ } from './companies/company.api.model';
61
69
  export {CompanyUserApiModel} from './company-user.api.model';
62
70
  export {BusinessModelConfig, RevenueConfig} from './franchise-business-model';
63
71
  export {CompanyUserEntityAccessApiModel} from './company-user-entity-access.api.model';
@@ -21,6 +21,7 @@ export interface StationSearchApiModel {
21
21
  lat: number;
22
22
  lng: number;
23
23
  } | null;
24
+ /** @deprecated Mirrored from accessType during transition. */
24
25
  capabilitiesAccess?: string[];
25
26
  createdAt?: number;
26
27
  updatedAt?: number;
@@ -23,18 +23,18 @@ export interface StationApiModel {
23
23
  lat: number;
24
24
  lng: number;
25
25
  };
26
- /* ---------- CAPABILITIES (DERIVED, REQUIRED) ---------- */
27
- // @deprecated
28
- capabilities: {
26
+ /** Admin-configured physical access for the station location. */
27
+ accessType: StationAccessType[];
28
+ /** @deprecated Use accessType. Removed after all consumers migrate. */
29
+ capabilities?: {
29
30
  access: StationAccessCapability[];
30
31
  };
31
- accessType: StationAccessType[];
32
32
  amenities: StationAmenities;
33
33
  facilities: StationFacility[];
34
34
  photos: StationPhotoModel[];
35
35
 
36
- /* ---------- CHARGER COUNTS (DERIVED, REQUIRED) ---------- */
37
- chargerCounts: StationChargerCounts;
36
+ /** @deprecated No longer maintained. Query chargers by stationId when needed. */
37
+ chargerCounts?: StationChargerCounts;
38
38
  status: StationStatus;
39
39
  createdBy: CreatedByModel;
40
40
  updatedBy: CreatedByModel;
@@ -0,0 +1,7 @@
1
+ export {
2
+ CONSUMER_STATION_ACCESS_TYPES,
3
+ FLEET_STATION_ACCESS_TYPES,
4
+ mapCapabilitiesAccessToAccessType,
5
+ stationHasConsumerAccess,
6
+ stationHasFleetAccess,
7
+ } from './station-access.util';
@@ -0,0 +1,58 @@
1
+ import {StationAccessCapability, StationAccessType} from '../enum';
2
+
3
+ const CAPABILITY_TO_ACCESS_TYPE: Record<StationAccessCapability, StationAccessType> = {
4
+ [StationAccessCapability.Public]: StationAccessType.Public,
5
+ [StationAccessCapability.Fleet]: StationAccessType.Fleet,
6
+ [StationAccessCapability.ResidentsOnly]: StationAccessType.ResidentsOnly,
7
+ };
8
+
9
+ /** Station access types visible in consumer discovery (map/search). */
10
+ export const CONSUMER_STATION_ACCESS_TYPES: StationAccessType[] = [
11
+ StationAccessType.Public,
12
+ StationAccessType.ResidentsOnly,
13
+ ];
14
+
15
+ /** Maps legacy capabilities.access values to station accessType for migration backfill. */
16
+ export function mapCapabilitiesAccessToAccessType(
17
+ capabilitiesAccess: StationAccessCapability[] | string[] | undefined | null,
18
+ ): StationAccessType[] {
19
+ if (!capabilitiesAccess?.length) {
20
+ return [];
21
+ }
22
+
23
+ const mapped = new Set<StationAccessType>();
24
+ for (const capability of capabilitiesAccess) {
25
+ const accessType = CAPABILITY_TO_ACCESS_TYPE[capability as StationAccessCapability];
26
+ if (accessType) {
27
+ mapped.add(accessType);
28
+ }
29
+ }
30
+
31
+ return Array.from(mapped);
32
+ }
33
+
34
+ export function stationHasConsumerAccess(
35
+ accessType: StationAccessType[] | undefined | null,
36
+ ): boolean {
37
+ if (!accessType?.length) {
38
+ return false;
39
+ }
40
+
41
+ return accessType.some((type) => CONSUMER_STATION_ACCESS_TYPES.indexOf(type) !== -1);
42
+ }
43
+
44
+ /** Station access types used for fleet-operated locations. */
45
+ export const FLEET_STATION_ACCESS_TYPES: StationAccessType[] = [
46
+ StationAccessType.Fleet,
47
+ StationAccessType.Private,
48
+ ];
49
+
50
+ export function stationHasFleetAccess(
51
+ accessType: StationAccessType[] | undefined | null,
52
+ ): boolean {
53
+ if (!accessType?.length) {
54
+ return false;
55
+ }
56
+
57
+ return accessType.some((type) => FLEET_STATION_ACCESS_TYPES.indexOf(type) !== -1);
58
+ }