spotcharge-types 1.0.406 → 1.0.407
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/consts/consumer/charging-booking-kind.const.d.ts +7 -0
- package/dist/consts/consumer/charging-booking-kind.const.d.ts.map +1 -0
- package/dist/consts/consumer/charging-booking-kind.const.js +9 -0
- package/dist/consts/consumer/charging-booking-kind.const.js.map +1 -0
- package/dist/consts/consumer/charging-booking-pay-method.const.d.ts +7 -0
- package/dist/consts/consumer/charging-booking-pay-method.const.d.ts.map +1 -0
- package/dist/consts/consumer/charging-booking-pay-method.const.js +9 -0
- package/dist/consts/consumer/charging-booking-pay-method.const.js.map +1 -0
- package/dist/consts/consumer/charging-booking-status.const.d.ts +10 -0
- package/dist/consts/consumer/charging-booking-status.const.d.ts.map +1 -0
- package/dist/consts/consumer/charging-booking-status.const.js +12 -0
- package/dist/consts/consumer/charging-booking-status.const.js.map +1 -0
- package/dist/consts/consumer/charging-booking-tax-type.const.d.ts +7 -0
- package/dist/consts/consumer/charging-booking-tax-type.const.d.ts.map +1 -0
- package/dist/consts/consumer/charging-booking-tax-type.const.js +9 -0
- package/dist/consts/consumer/charging-booking-tax-type.const.js.map +1 -0
- package/dist/consts/consumer/charging-session-status.const.d.ts +11 -0
- package/dist/consts/consumer/charging-session-status.const.d.ts.map +1 -0
- package/dist/consts/consumer/charging-session-status.const.js +17 -0
- package/dist/consts/consumer/charging-session-status.const.js.map +1 -0
- package/dist/consts/consumer/index.d.ts +6 -0
- package/dist/consts/consumer/index.d.ts.map +1 -0
- package/dist/consts/consumer/index.js +15 -0
- package/dist/consts/consumer/index.js.map +1 -0
- package/dist/consts/index.d.ts +1 -0
- package/dist/consts/index.d.ts.map +1 -1
- package/dist/consts/index.js +8 -1
- package/dist/consts/index.js.map +1 -1
- package/dist/models/api/consumer/charging-booking.api.model.d.ts +114 -0
- package/dist/models/api/consumer/charging-booking.api.model.d.ts.map +1 -0
- package/dist/models/api/consumer/charging-booking.api.model.js +3 -0
- package/dist/models/api/consumer/charging-booking.api.model.js.map +1 -0
- package/dist/models/api/consumer/charging-settings.api.model.d.ts +23 -0
- package/dist/models/api/consumer/charging-settings.api.model.d.ts.map +1 -0
- package/dist/models/api/consumer/charging-settings.api.model.js +8 -0
- package/dist/models/api/consumer/charging-settings.api.model.js.map +1 -0
- package/dist/models/api/consumer/index.d.ts +2 -0
- package/dist/models/api/consumer/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/consts/consumer/charging-booking-kind.const.ts +7 -0
- package/src/consts/consumer/charging-booking-pay-method.const.ts +7 -0
- package/src/consts/consumer/charging-booking-status.const.ts +10 -0
- package/src/consts/consumer/charging-booking-tax-type.const.ts +7 -0
- package/src/consts/consumer/charging-session-status.const.ts +16 -0
- package/src/consts/consumer/index.ts +8 -0
- package/src/consts/index.ts +8 -0
- package/src/models/api/consumer/charging-booking.api.model.ts +124 -0
- package/src/models/api/consumer/charging-settings.api.model.ts +24 -0
- package/src/models/api/consumer/index.ts +16 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** How the customer chose the plug window. */
|
|
2
|
+
export declare const ChargingBookingKind: {
|
|
3
|
+
readonly ChargeNow: "charge_now";
|
|
4
|
+
readonly BookLater: "book_later";
|
|
5
|
+
};
|
|
6
|
+
export type ChargingBookingKind = (typeof ChargingBookingKind)[keyof typeof ChargingBookingKind];
|
|
7
|
+
//# sourceMappingURL=charging-booking-kind.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-kind.const.d.ts","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-kind.const.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChargingBookingKind = void 0;
|
|
4
|
+
/** How the customer chose the plug window. */
|
|
5
|
+
exports.ChargingBookingKind = {
|
|
6
|
+
ChargeNow: 'charge_now',
|
|
7
|
+
BookLater: 'book_later',
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=charging-booking-kind.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-kind.const.js","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-kind.const.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AACjC,QAAA,mBAAmB,GAAG;IACjC,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;CACf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** How the customer pays the quoted hold. */
|
|
2
|
+
export declare const ChargingBookingPayMethod: {
|
|
3
|
+
readonly Wallet: "wallet";
|
|
4
|
+
readonly Razorpay: "razorpay";
|
|
5
|
+
};
|
|
6
|
+
export type ChargingBookingPayMethod = (typeof ChargingBookingPayMethod)[keyof typeof ChargingBookingPayMethod];
|
|
7
|
+
//# sourceMappingURL=charging-booking-pay-method.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-pay-method.const.d.ts","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-pay-method.const.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChargingBookingPayMethod = void 0;
|
|
4
|
+
/** How the customer pays the quoted hold. */
|
|
5
|
+
exports.ChargingBookingPayMethod = {
|
|
6
|
+
Wallet: 'wallet',
|
|
7
|
+
Razorpay: 'razorpay',
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=charging-booking-pay-method.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-pay-method.const.js","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-pay-method.const.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAChC,QAAA,wBAAwB,GAAG;IACtC,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Postgres booking status. This is not the Firestore `BookingStatus`. */
|
|
2
|
+
export declare const ChargingBookingStatus: {
|
|
3
|
+
readonly PendingPayment: "pending_payment";
|
|
4
|
+
readonly Confirmed: "confirmed";
|
|
5
|
+
readonly Started: "started";
|
|
6
|
+
readonly Cancelled: "cancelled";
|
|
7
|
+
readonly Expired: "expired";
|
|
8
|
+
};
|
|
9
|
+
export type ChargingBookingStatus = (typeof ChargingBookingStatus)[keyof typeof ChargingBookingStatus];
|
|
10
|
+
//# sourceMappingURL=charging-booking-status.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-status.const.d.ts","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-status.const.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB;;;;;;CAMxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChargingBookingStatus = void 0;
|
|
4
|
+
/** Postgres booking status. This is not the Firestore `BookingStatus`. */
|
|
5
|
+
exports.ChargingBookingStatus = {
|
|
6
|
+
PendingPayment: 'pending_payment',
|
|
7
|
+
Confirmed: 'confirmed',
|
|
8
|
+
Started: 'started',
|
|
9
|
+
Cancelled: 'cancelled',
|
|
10
|
+
Expired: 'expired',
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=charging-booking-status.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-status.const.js","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-status.const.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC7D,QAAA,qBAAqB,GAAG;IACnC,cAAc,EAAE,iBAAiB;IACjC,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** GST shape frozen on consumer.bookings and charging sessions. */
|
|
2
|
+
export declare const ChargingBookingTaxType: {
|
|
3
|
+
readonly CgstSgst: "cgst_sgst";
|
|
4
|
+
readonly Igst: "igst";
|
|
5
|
+
};
|
|
6
|
+
export type ChargingBookingTaxType = (typeof ChargingBookingTaxType)[keyof typeof ChargingBookingTaxType];
|
|
7
|
+
//# sourceMappingURL=charging-booking-tax-type.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-tax-type.const.d.ts","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-tax-type.const.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChargingBookingTaxType = void 0;
|
|
4
|
+
/** GST shape frozen on consumer.bookings and charging sessions. */
|
|
5
|
+
exports.ChargingBookingTaxType = {
|
|
6
|
+
CgstSgst: 'cgst_sgst',
|
|
7
|
+
Igst: 'igst',
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=charging-booking-tax-type.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking-tax-type.const.js","sourceRoot":"","sources":["../../../src/consts/consumer/charging-booking-tax-type.const.ts"],"names":[],"mappings":";;;AAAA,mEAAmE;AACtD,QAAA,sBAAsB,GAAG;IACpC,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,MAAM;CACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Live charge lifecycle on `consumer.charging_sessions`. */
|
|
2
|
+
export declare const ChargingSessionStatus: {
|
|
3
|
+
readonly Starting: "starting";
|
|
4
|
+
readonly Charging: "charging";
|
|
5
|
+
readonly Stopping: "stopping";
|
|
6
|
+
readonly Stopped: "stopped";
|
|
7
|
+
};
|
|
8
|
+
export type ChargingSessionStatus = (typeof ChargingSessionStatus)[keyof typeof ChargingSessionStatus];
|
|
9
|
+
/** Session is on the plug until stop completes. */
|
|
10
|
+
export declare const LIVE_CHARGING_SESSION_STATUSES: readonly ["starting", "charging", "stopping"];
|
|
11
|
+
//# sourceMappingURL=charging-session-status.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-session-status.const.d.ts","sourceRoot":"","sources":["../../../src/consts/consumer/charging-session-status.const.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvG,mDAAmD;AACnD,eAAO,MAAM,8BAA8B,+CAIU,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LIVE_CHARGING_SESSION_STATUSES = exports.ChargingSessionStatus = void 0;
|
|
4
|
+
/** Live charge lifecycle on `consumer.charging_sessions`. */
|
|
5
|
+
exports.ChargingSessionStatus = {
|
|
6
|
+
Starting: 'starting',
|
|
7
|
+
Charging: 'charging',
|
|
8
|
+
Stopping: 'stopping',
|
|
9
|
+
Stopped: 'stopped',
|
|
10
|
+
};
|
|
11
|
+
/** Session is on the plug until stop completes. */
|
|
12
|
+
exports.LIVE_CHARGING_SESSION_STATUSES = [
|
|
13
|
+
exports.ChargingSessionStatus.Starting,
|
|
14
|
+
exports.ChargingSessionStatus.Charging,
|
|
15
|
+
exports.ChargingSessionStatus.Stopping,
|
|
16
|
+
];
|
|
17
|
+
//# sourceMappingURL=charging-session-status.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-session-status.const.js","sourceRoot":"","sources":["../../../src/consts/consumer/charging-session-status.const.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AAChD,QAAA,qBAAqB,GAAG;IACnC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACV,CAAC;AAIX,mDAAmD;AACtC,QAAA,8BAA8B,GAAG;IAC5C,6BAAqB,CAAC,QAAQ;IAC9B,6BAAqB,CAAC,QAAQ;IAC9B,6BAAqB,CAAC,QAAQ;CACqB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ChargingBookingKind } from './charging-booking-kind.const';
|
|
2
|
+
export { ChargingBookingStatus } from './charging-booking-status.const';
|
|
3
|
+
export { ChargingBookingPayMethod } from './charging-booking-pay-method.const';
|
|
4
|
+
export { ChargingBookingTaxType } from './charging-booking-tax-type.const';
|
|
5
|
+
export { ChargingSessionStatus, LIVE_CHARGING_SESSION_STATUSES, } from './charging-session-status.const';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/consts/consumer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EACL,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LIVE_CHARGING_SESSION_STATUSES = exports.ChargingSessionStatus = exports.ChargingBookingTaxType = exports.ChargingBookingPayMethod = exports.ChargingBookingStatus = exports.ChargingBookingKind = void 0;
|
|
4
|
+
var charging_booking_kind_const_1 = require("./charging-booking-kind.const");
|
|
5
|
+
Object.defineProperty(exports, "ChargingBookingKind", { enumerable: true, get: function () { return charging_booking_kind_const_1.ChargingBookingKind; } });
|
|
6
|
+
var charging_booking_status_const_1 = require("./charging-booking-status.const");
|
|
7
|
+
Object.defineProperty(exports, "ChargingBookingStatus", { enumerable: true, get: function () { return charging_booking_status_const_1.ChargingBookingStatus; } });
|
|
8
|
+
var charging_booking_pay_method_const_1 = require("./charging-booking-pay-method.const");
|
|
9
|
+
Object.defineProperty(exports, "ChargingBookingPayMethod", { enumerable: true, get: function () { return charging_booking_pay_method_const_1.ChargingBookingPayMethod; } });
|
|
10
|
+
var charging_booking_tax_type_const_1 = require("./charging-booking-tax-type.const");
|
|
11
|
+
Object.defineProperty(exports, "ChargingBookingTaxType", { enumerable: true, get: function () { return charging_booking_tax_type_const_1.ChargingBookingTaxType; } });
|
|
12
|
+
var charging_session_status_const_1 = require("./charging-session-status.const");
|
|
13
|
+
Object.defineProperty(exports, "ChargingSessionStatus", { enumerable: true, get: function () { return charging_session_status_const_1.ChargingSessionStatus; } });
|
|
14
|
+
Object.defineProperty(exports, "LIVE_CHARGING_SESSION_STATUSES", { enumerable: true, get: function () { return charging_session_status_const_1.LIVE_CHARGING_SESSION_STATUSES; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/consts/consumer/index.ts"],"names":[],"mappings":";;;AAAA,6EAAoE;AAA3D,kIAAA,mBAAmB,OAAA;AAC5B,iFAAwE;AAA/D,sIAAA,qBAAqB,OAAA;AAC9B,yFAA+E;AAAtE,6IAAA,wBAAwB,OAAA;AACjC,qFAA2E;AAAlE,yIAAA,sBAAsB,OAAA;AAC/B,iFAGyC;AAFvC,sIAAA,qBAAqB,OAAA;AACrB,+IAAA,8BAA8B,OAAA"}
|
package/dist/consts/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { Notifications, NotificationType } from './notifications.const';
|
|
|
6
6
|
export { permissionConfig, Permission, PermissionKeys } from './permission-config';
|
|
7
7
|
export { PromotionAdjustmentType, PromotionAppliesTo, PromotionScopeType, } from './pricing';
|
|
8
8
|
export { CampaignScopeType, CampaignAudienceType } from './marketing';
|
|
9
|
+
export { ChargingBookingKind, ChargingBookingStatus, ChargingBookingPayMethod, ChargingBookingTaxType, ChargingSessionStatus, LIVE_CHARGING_SESSION_STATUSES, } from './consumer';
|
|
9
10
|
export { VehicleTypeCatalog } from './catalog/vehicle-type.const';
|
|
10
11
|
export { CatalogErrorCode } from './catalog/catalog-error.const';
|
|
11
12
|
export * from './business-unit-site-setup-status.const';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":"AA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EACvB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,8CAA8C,CAAC"}
|
package/dist/consts/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.CatalogErrorCode = exports.VehicleTypeCatalog = exports.CampaignAudienceType = exports.CampaignScopeType = exports.PromotionScopeType = exports.PromotionAppliesTo = exports.PromotionAdjustmentType = exports.permissionConfig = exports.Notifications = exports.VehicleInspectionChecklist = exports.InOutType = exports.InOutStatus = exports.VehiclePurpose = void 0;
|
|
17
|
+
exports.CatalogErrorCode = exports.VehicleTypeCatalog = exports.LIVE_CHARGING_SESSION_STATUSES = exports.ChargingSessionStatus = exports.ChargingBookingTaxType = exports.ChargingBookingPayMethod = exports.ChargingBookingStatus = exports.ChargingBookingKind = exports.CampaignAudienceType = exports.CampaignScopeType = exports.PromotionScopeType = exports.PromotionAppliesTo = exports.PromotionAdjustmentType = exports.permissionConfig = exports.Notifications = exports.VehicleInspectionChecklist = exports.InOutType = exports.InOutStatus = exports.VehiclePurpose = void 0;
|
|
18
18
|
var vehicle_purpose_const_1 = require("./vehicle-purpose.const");
|
|
19
19
|
Object.defineProperty(exports, "VehiclePurpose", { enumerable: true, get: function () { return vehicle_purpose_const_1.VehiclePurpose; } });
|
|
20
20
|
var in_out_status_const_1 = require("./in-out-status.const");
|
|
@@ -34,6 +34,13 @@ Object.defineProperty(exports, "PromotionScopeType", { enumerable: true, get: fu
|
|
|
34
34
|
var marketing_1 = require("./marketing");
|
|
35
35
|
Object.defineProperty(exports, "CampaignScopeType", { enumerable: true, get: function () { return marketing_1.CampaignScopeType; } });
|
|
36
36
|
Object.defineProperty(exports, "CampaignAudienceType", { enumerable: true, get: function () { return marketing_1.CampaignAudienceType; } });
|
|
37
|
+
var consumer_1 = require("./consumer");
|
|
38
|
+
Object.defineProperty(exports, "ChargingBookingKind", { enumerable: true, get: function () { return consumer_1.ChargingBookingKind; } });
|
|
39
|
+
Object.defineProperty(exports, "ChargingBookingStatus", { enumerable: true, get: function () { return consumer_1.ChargingBookingStatus; } });
|
|
40
|
+
Object.defineProperty(exports, "ChargingBookingPayMethod", { enumerable: true, get: function () { return consumer_1.ChargingBookingPayMethod; } });
|
|
41
|
+
Object.defineProperty(exports, "ChargingBookingTaxType", { enumerable: true, get: function () { return consumer_1.ChargingBookingTaxType; } });
|
|
42
|
+
Object.defineProperty(exports, "ChargingSessionStatus", { enumerable: true, get: function () { return consumer_1.ChargingSessionStatus; } });
|
|
43
|
+
Object.defineProperty(exports, "LIVE_CHARGING_SESSION_STATUSES", { enumerable: true, get: function () { return consumer_1.LIVE_CHARGING_SESSION_STATUSES; } });
|
|
37
44
|
var vehicle_type_const_1 = require("./catalog/vehicle-type.const");
|
|
38
45
|
Object.defineProperty(exports, "VehicleTypeCatalog", { enumerable: true, get: function () { return vehicle_type_const_1.VehicleTypeCatalog; } });
|
|
39
46
|
var catalog_error_const_1 = require("./catalog/catalog-error.const");
|
package/dist/consts/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,i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mEAAkE;AAAzD,wHAAA,kBAAkB,OAAA;AAC3B,qEAAiE;AAAxD,uHAAA,gBAAgB,OAAA;AACzB,0EAAwD;AACxD,+EAA6D"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ChargingBookingKind } from '../../../consts/consumer/charging-booking-kind.const';
|
|
2
|
+
import { ChargingBookingPayMethod } from '../../../consts/consumer/charging-booking-pay-method.const';
|
|
3
|
+
import { ChargingBookingStatus } from '../../../consts/consumer/charging-booking-status.const';
|
|
4
|
+
import { ServiceChargeModel } from '../../service-charge.model';
|
|
5
|
+
import { IsoDateTime } from '../users/shared.api.model';
|
|
6
|
+
/**
|
|
7
|
+
* Postgres booking APIs.
|
|
8
|
+
*
|
|
9
|
+
* Times are ISO 8601 strings. Money is rupees with two decimals.
|
|
10
|
+
* `BookingApiModel` is the old Firestore document and is not this contract.
|
|
11
|
+
*/
|
|
12
|
+
/** Vehicle frozen on the booking at create time. */
|
|
13
|
+
export interface ChargingBookingVehicleApiModel {
|
|
14
|
+
/** consumer.account_vehicles.id (uuid). */
|
|
15
|
+
accountVehicleId: string;
|
|
16
|
+
registrationNo: string;
|
|
17
|
+
brandName: string | null;
|
|
18
|
+
modelName: string | null;
|
|
19
|
+
batteryCapacityKwh: number | null;
|
|
20
|
+
}
|
|
21
|
+
/** One booking returned by the customer and staff read APIs. */
|
|
22
|
+
export interface ChargingBookingApiModel {
|
|
23
|
+
/** consumer.bookings.id (uuid). */
|
|
24
|
+
bookingId: string;
|
|
25
|
+
bookingRef: string;
|
|
26
|
+
status: ChargingBookingStatus;
|
|
27
|
+
kind: ChargingBookingKind;
|
|
28
|
+
customerName: string;
|
|
29
|
+
/** users.profiles.id (uuid). */
|
|
30
|
+
profileId: string;
|
|
31
|
+
phoneE164: string | null;
|
|
32
|
+
/** infrastructure.chargers.id (uuid). */
|
|
33
|
+
chargerId: string;
|
|
34
|
+
chargePointId: string;
|
|
35
|
+
stationName: string;
|
|
36
|
+
connectorNo: number;
|
|
37
|
+
energyLimitKwh: number;
|
|
38
|
+
slotStartsAt: IsoDateTime;
|
|
39
|
+
slotEndsAt: IsoDateTime;
|
|
40
|
+
startByAt: IsoDateTime;
|
|
41
|
+
/** Grand total held at payment. Same as the old Firestore `totalAmount`. */
|
|
42
|
+
quotedAmount: number;
|
|
43
|
+
/** Energy rate (₹/kWh) frozen at create. */
|
|
44
|
+
pricePerKwh: number;
|
|
45
|
+
/** Energy subtotal before service charge and GST. */
|
|
46
|
+
amount: number;
|
|
47
|
+
serviceCharge: number;
|
|
48
|
+
taxAmount: number;
|
|
49
|
+
isServiceChargeApplicable: boolean;
|
|
50
|
+
serviceChargeInfo: ServiceChargeModel;
|
|
51
|
+
vehicle: ChargingBookingVehicleApiModel | null;
|
|
52
|
+
}
|
|
53
|
+
/** GET /api/booking/bookings and GET /api/admin/charging-bookings */
|
|
54
|
+
export interface ChargingBookingListApiModel {
|
|
55
|
+
bookings: ChargingBookingApiModel[];
|
|
56
|
+
}
|
|
57
|
+
/** GET /api/admin/charging-bookings/stats */
|
|
58
|
+
export interface ChargingBookingCountApiModel {
|
|
59
|
+
count: number;
|
|
60
|
+
}
|
|
61
|
+
/** POST /api/booking/bookings */
|
|
62
|
+
export interface CreateChargingBookingRequest {
|
|
63
|
+
kind: ChargingBookingKind;
|
|
64
|
+
/** infrastructure.chargers.id (uuid). */
|
|
65
|
+
chargerId: string;
|
|
66
|
+
connectorNo: number;
|
|
67
|
+
/** Required for book later. ISO start chosen from the slot list. */
|
|
68
|
+
startsAt?: IsoDateTime;
|
|
69
|
+
durationMinutes: number;
|
|
70
|
+
energyLimitKwh: number;
|
|
71
|
+
idempotencyKey: string;
|
|
72
|
+
payWith?: ChargingBookingPayMethod;
|
|
73
|
+
/** consumer.account_vehicles.id (uuid). Optional; frozen on the row when set. */
|
|
74
|
+
accountVehicleId?: string;
|
|
75
|
+
}
|
|
76
|
+
/** POST /api/booking/bookings/:id/pay and the create response when payWith is set. */
|
|
77
|
+
export interface PayChargingBookingApiModel {
|
|
78
|
+
bookingId: string;
|
|
79
|
+
bookingRef: string;
|
|
80
|
+
status: ChargingBookingStatus;
|
|
81
|
+
kind: ChargingBookingKind;
|
|
82
|
+
quotedAmount: number;
|
|
83
|
+
slotStartsAt: IsoDateTime;
|
|
84
|
+
slotEndsAt: IsoDateTime;
|
|
85
|
+
startByAt: IsoDateTime;
|
|
86
|
+
holdExpiresAt: IsoDateTime | null;
|
|
87
|
+
orderId?: string;
|
|
88
|
+
/** Rupees. Checkout on the phone multiplies by 100 for paise. */
|
|
89
|
+
razorpayAmount?: number;
|
|
90
|
+
}
|
|
91
|
+
/** POST /api/booking/bookings/:id/pay */
|
|
92
|
+
export interface PayChargingBookingRequest {
|
|
93
|
+
method: ChargingBookingPayMethod;
|
|
94
|
+
}
|
|
95
|
+
/** POST /api/booking/bookings/:id/cancel and POST /api/admin/charging-bookings/:id/cancel */
|
|
96
|
+
export interface CancelChargingBookingRequest {
|
|
97
|
+
reason?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface BookLaterSlotApiModel {
|
|
100
|
+
startsAt: IsoDateTime;
|
|
101
|
+
endsAt: IsoDateTime;
|
|
102
|
+
}
|
|
103
|
+
/** GET /api/booking/book-later-slots */
|
|
104
|
+
export interface BookLaterSlotListApiModel {
|
|
105
|
+
date: string;
|
|
106
|
+
timeZone: 'Asia/Kolkata';
|
|
107
|
+
durationMinutes: number;
|
|
108
|
+
maxAdvanceDays: number;
|
|
109
|
+
lastDate: string;
|
|
110
|
+
/** infrastructure.connectors.id (uuid). */
|
|
111
|
+
connectorId: string;
|
|
112
|
+
slots: BookLaterSlotApiModel[];
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=charging-booking.api.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking.api.model.d.ts","sourceRoot":"","sources":["../../../../src/models/api/consumer/charging-booking.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,M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B;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,wCAAwC;AACxC,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,qBAAqB,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-booking.api.model.js","sourceRoot":"","sources":["../../../../src/models/api/consumer/charging-booking.api.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET and PATCH /api/admin/charging-settings.
|
|
3
|
+
*
|
|
4
|
+
* Money is rupees with two decimals. One singleton row.
|
|
5
|
+
*/
|
|
6
|
+
export interface ChargingSettingsApiModel {
|
|
7
|
+
/** Hold for a continuation or later RFID/auto-charge when the pack size is unknown. */
|
|
8
|
+
unknownPackHoldAmount: number;
|
|
9
|
+
/** Wallet must keep at least this much free after a hold. */
|
|
10
|
+
minimumFreeBalance: number;
|
|
11
|
+
/** Minutes after payment (Charge Now) or after slot start (Book Later) to start. */
|
|
12
|
+
lateStartMinutes: number;
|
|
13
|
+
/** Last Book Later date is today plus this many days in Asia/Kolkata. */
|
|
14
|
+
maxAdvanceDays: number;
|
|
15
|
+
}
|
|
16
|
+
/** PATCH /api/admin/charging-settings */
|
|
17
|
+
export interface UpdateChargingSettingsRequest {
|
|
18
|
+
unknownPackHoldAmount: number;
|
|
19
|
+
minimumFreeBalance: number;
|
|
20
|
+
lateStartMinutes: number;
|
|
21
|
+
maxAdvanceDays: number;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=charging-settings.api.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-settings.api.model.d.ts","sourceRoot":"","sources":["../../../../src/models/api/consumer/charging-settings.api.model.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,wBAAwB;IACvC,uFAAuF;IACvF,qBAAqB,EAAE,MAAM,CAAC;IAC9B,6DAA6D;IAC7D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oFAAoF;IACpF,gBAAgB,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,yCAAyC;AACzC,MAAM,WAAW,6BAA6B;IAC5C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charging-settings.api.model.js","sourceRoot":"","sources":["../../../../src/models/api/consumer/charging-settings.api.model.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -4,5 +4,7 @@ export { ConsumerAccountVehicleApiModel, ConsumerAccountVehicleListApiModel, Cre
|
|
|
4
4
|
export { RegisterPushTokenRequest, ConsumerPushTokenApiModel, UnregisterPushTokenRequest, } from './consumer-push-token.api.model';
|
|
5
5
|
export { ConsumerFavoriteStationListItemApiModel, ConsumerFavoriteStationListApiModel, } from './consumer-favorite-station.api.model';
|
|
6
6
|
export { CONSUMER_DELETE_BLOCKED_CODE, DeleteConsumerBlockedReason, ConsumerDeleteEligibilityApiModel, DeleteConsumerMeResponse, } from './consumer-account-deletion.api.model';
|
|
7
|
+
export { ChargingSettingsApiModel, UpdateChargingSettingsRequest, } from './charging-settings.api.model';
|
|
8
|
+
export { ChargingBookingApiModel, ChargingBookingListApiModel, ChargingBookingCountApiModel, CreateChargingBookingRequest, PayChargingBookingApiModel, PayChargingBookingRequest, CancelChargingBookingRequest, BookLaterSlotApiModel, BookLaterSlotListApiModel, ChargingBookingVehicleApiModel, } from './charging-booking.api.model';
|
|
7
9
|
export { AdminConsumerListOrderBy, AdminConsumerListItemApiModel, AdminConsumerListApiModel, AdminConsumerAccountApiModel, AdminConsumerDetailApiModel, AdminUpdateConsumerRequest, BlockConsumerRequest, AdjustConsumerWalletRequest, AdjustConsumerWalletResponse, AdminConsumerWalletTransactionListApiModel, } from './admin-consumer.api.model';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/api/consumer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,mCAAmC,EACnC,mCAAmC,GACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uCAAuC,EACvC,mCAAmC,GACpC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,2BAA2B,EAC3B,4BAA4B,EAC5B,0CAA0C,GAC3C,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/api/consumer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,mCAAmC,EACnC,mCAAmC,GACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uCAAuC,EACvC,mCAAmC,GACpC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACrB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,2BAA2B,EAC3B,4BAA4B,EAC5B,0CAA0C,GAC3C,MAAM,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Postgres booking status. This is not the Firestore `BookingStatus`. */
|
|
2
|
+
export const ChargingBookingStatus = {
|
|
3
|
+
PendingPayment: 'pending_payment',
|
|
4
|
+
Confirmed: 'confirmed',
|
|
5
|
+
Started: 'started',
|
|
6
|
+
Cancelled: 'cancelled',
|
|
7
|
+
Expired: 'expired',
|
|
8
|
+
} as const;
|
|
9
|
+
|
|
10
|
+
export type ChargingBookingStatus = (typeof ChargingBookingStatus)[keyof typeof ChargingBookingStatus];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** GST shape frozen on consumer.bookings and charging sessions. */
|
|
2
|
+
export const ChargingBookingTaxType = {
|
|
3
|
+
CgstSgst: 'cgst_sgst',
|
|
4
|
+
Igst: 'igst',
|
|
5
|
+
} as const;
|
|
6
|
+
|
|
7
|
+
export type ChargingBookingTaxType = (typeof ChargingBookingTaxType)[keyof typeof ChargingBookingTaxType];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Live charge lifecycle on `consumer.charging_sessions`. */
|
|
2
|
+
export const ChargingSessionStatus = {
|
|
3
|
+
Starting: 'starting',
|
|
4
|
+
Charging: 'charging',
|
|
5
|
+
Stopping: 'stopping',
|
|
6
|
+
Stopped: 'stopped',
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export type ChargingSessionStatus = (typeof ChargingSessionStatus)[keyof typeof ChargingSessionStatus];
|
|
10
|
+
|
|
11
|
+
/** Session is on the plug until stop completes. */
|
|
12
|
+
export const LIVE_CHARGING_SESSION_STATUSES = [
|
|
13
|
+
ChargingSessionStatus.Starting,
|
|
14
|
+
ChargingSessionStatus.Charging,
|
|
15
|
+
ChargingSessionStatus.Stopping,
|
|
16
|
+
] as const satisfies readonly ChargingSessionStatus[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ChargingBookingKind } from './charging-booking-kind.const';
|
|
2
|
+
export { ChargingBookingStatus } from './charging-booking-status.const';
|
|
3
|
+
export { ChargingBookingPayMethod } from './charging-booking-pay-method.const';
|
|
4
|
+
export { ChargingBookingTaxType } from './charging-booking-tax-type.const';
|
|
5
|
+
export {
|
|
6
|
+
ChargingSessionStatus,
|
|
7
|
+
LIVE_CHARGING_SESSION_STATUSES,
|
|
8
|
+
} from './charging-session-status.const';
|
package/src/consts/index.ts
CHANGED
|
@@ -10,6 +10,14 @@ export {
|
|
|
10
10
|
PromotionScopeType,
|
|
11
11
|
} from './pricing';
|
|
12
12
|
export { CampaignScopeType, CampaignAudienceType } from './marketing';
|
|
13
|
+
export {
|
|
14
|
+
ChargingBookingKind,
|
|
15
|
+
ChargingBookingStatus,
|
|
16
|
+
ChargingBookingPayMethod,
|
|
17
|
+
ChargingBookingTaxType,
|
|
18
|
+
ChargingSessionStatus,
|
|
19
|
+
LIVE_CHARGING_SESSION_STATUSES,
|
|
20
|
+
} from './consumer';
|
|
13
21
|
export { VehicleTypeCatalog } from './catalog/vehicle-type.const';
|
|
14
22
|
export { CatalogErrorCode } from './catalog/catalog-error.const';
|
|
15
23
|
export * from './business-unit-site-setup-status.const';
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ChargingBookingKind } from '../../../consts/consumer/charging-booking-kind.const';
|
|
2
|
+
import { ChargingBookingPayMethod } from '../../../consts/consumer/charging-booking-pay-method.const';
|
|
3
|
+
import { ChargingBookingStatus } from '../../../consts/consumer/charging-booking-status.const';
|
|
4
|
+
import { ServiceChargeModel } from '../../service-charge.model';
|
|
5
|
+
import { IsoDateTime } from '../users/shared.api.model';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Postgres booking APIs.
|
|
9
|
+
*
|
|
10
|
+
* Times are ISO 8601 strings. Money is rupees with two decimals.
|
|
11
|
+
* `BookingApiModel` is the old Firestore document and is not this contract.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Vehicle frozen on the booking at create time. */
|
|
15
|
+
export interface ChargingBookingVehicleApiModel {
|
|
16
|
+
/** consumer.account_vehicles.id (uuid). */
|
|
17
|
+
accountVehicleId: string;
|
|
18
|
+
registrationNo: string;
|
|
19
|
+
brandName: string | null;
|
|
20
|
+
modelName: string | null;
|
|
21
|
+
batteryCapacityKwh: number | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** One booking returned by the customer and staff read APIs. */
|
|
25
|
+
export interface ChargingBookingApiModel {
|
|
26
|
+
/** consumer.bookings.id (uuid). */
|
|
27
|
+
bookingId: string;
|
|
28
|
+
bookingRef: string;
|
|
29
|
+
status: ChargingBookingStatus;
|
|
30
|
+
kind: ChargingBookingKind;
|
|
31
|
+
customerName: string;
|
|
32
|
+
/** users.profiles.id (uuid). */
|
|
33
|
+
profileId: string;
|
|
34
|
+
phoneE164: string | null;
|
|
35
|
+
/** infrastructure.chargers.id (uuid). */
|
|
36
|
+
chargerId: string;
|
|
37
|
+
chargePointId: string;
|
|
38
|
+
stationName: string;
|
|
39
|
+
connectorNo: number;
|
|
40
|
+
energyLimitKwh: number;
|
|
41
|
+
slotStartsAt: IsoDateTime;
|
|
42
|
+
slotEndsAt: IsoDateTime;
|
|
43
|
+
startByAt: IsoDateTime;
|
|
44
|
+
/** Grand total held at payment. Same as the old Firestore `totalAmount`. */
|
|
45
|
+
quotedAmount: number;
|
|
46
|
+
/** Energy rate (₹/kWh) frozen at create. */
|
|
47
|
+
pricePerKwh: number;
|
|
48
|
+
/** Energy subtotal before service charge and GST. */
|
|
49
|
+
amount: number;
|
|
50
|
+
serviceCharge: number;
|
|
51
|
+
taxAmount: number;
|
|
52
|
+
isServiceChargeApplicable: boolean;
|
|
53
|
+
serviceChargeInfo: ServiceChargeModel;
|
|
54
|
+
vehicle: ChargingBookingVehicleApiModel | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** GET /api/booking/bookings and GET /api/admin/charging-bookings */
|
|
58
|
+
export interface ChargingBookingListApiModel {
|
|
59
|
+
bookings: ChargingBookingApiModel[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** GET /api/admin/charging-bookings/stats */
|
|
63
|
+
export interface ChargingBookingCountApiModel {
|
|
64
|
+
count: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** POST /api/booking/bookings */
|
|
68
|
+
export interface CreateChargingBookingRequest {
|
|
69
|
+
kind: ChargingBookingKind;
|
|
70
|
+
/** infrastructure.chargers.id (uuid). */
|
|
71
|
+
chargerId: string;
|
|
72
|
+
connectorNo: number;
|
|
73
|
+
/** Required for book later. ISO start chosen from the slot list. */
|
|
74
|
+
startsAt?: IsoDateTime;
|
|
75
|
+
durationMinutes: number;
|
|
76
|
+
energyLimitKwh: number;
|
|
77
|
+
idempotencyKey: string;
|
|
78
|
+
payWith?: ChargingBookingPayMethod;
|
|
79
|
+
/** consumer.account_vehicles.id (uuid). Optional; frozen on the row when set. */
|
|
80
|
+
accountVehicleId?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** POST /api/booking/bookings/:id/pay and the create response when payWith is set. */
|
|
84
|
+
export interface PayChargingBookingApiModel {
|
|
85
|
+
bookingId: string;
|
|
86
|
+
bookingRef: string;
|
|
87
|
+
status: ChargingBookingStatus;
|
|
88
|
+
kind: ChargingBookingKind;
|
|
89
|
+
quotedAmount: number;
|
|
90
|
+
slotStartsAt: IsoDateTime;
|
|
91
|
+
slotEndsAt: IsoDateTime;
|
|
92
|
+
startByAt: IsoDateTime;
|
|
93
|
+
holdExpiresAt: IsoDateTime | null;
|
|
94
|
+
orderId?: string;
|
|
95
|
+
/** Rupees. Checkout on the phone multiplies by 100 for paise. */
|
|
96
|
+
razorpayAmount?: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** POST /api/booking/bookings/:id/pay */
|
|
100
|
+
export interface PayChargingBookingRequest {
|
|
101
|
+
method: ChargingBookingPayMethod;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** POST /api/booking/bookings/:id/cancel and POST /api/admin/charging-bookings/:id/cancel */
|
|
105
|
+
export interface CancelChargingBookingRequest {
|
|
106
|
+
reason?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface BookLaterSlotApiModel {
|
|
110
|
+
startsAt: IsoDateTime;
|
|
111
|
+
endsAt: IsoDateTime;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** GET /api/booking/book-later-slots */
|
|
115
|
+
export interface BookLaterSlotListApiModel {
|
|
116
|
+
date: string;
|
|
117
|
+
timeZone: 'Asia/Kolkata';
|
|
118
|
+
durationMinutes: number;
|
|
119
|
+
maxAdvanceDays: number;
|
|
120
|
+
lastDate: string;
|
|
121
|
+
/** infrastructure.connectors.id (uuid). */
|
|
122
|
+
connectorId: string;
|
|
123
|
+
slots: BookLaterSlotApiModel[];
|
|
124
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET and PATCH /api/admin/charging-settings.
|
|
3
|
+
*
|
|
4
|
+
* Money is rupees with two decimals. One singleton row.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export interface ChargingSettingsApiModel {
|
|
8
|
+
/** Hold for a continuation or later RFID/auto-charge when the pack size is unknown. */
|
|
9
|
+
unknownPackHoldAmount: number;
|
|
10
|
+
/** Wallet must keep at least this much free after a hold. */
|
|
11
|
+
minimumFreeBalance: number;
|
|
12
|
+
/** Minutes after payment (Charge Now) or after slot start (Book Later) to start. */
|
|
13
|
+
lateStartMinutes: number;
|
|
14
|
+
/** Last Book Later date is today plus this many days in Asia/Kolkata. */
|
|
15
|
+
maxAdvanceDays: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** PATCH /api/admin/charging-settings */
|
|
19
|
+
export interface UpdateChargingSettingsRequest {
|
|
20
|
+
unknownPackHoldAmount: number;
|
|
21
|
+
minimumFreeBalance: number;
|
|
22
|
+
lateStartMinutes: number;
|
|
23
|
+
maxAdvanceDays: number;
|
|
24
|
+
}
|
|
@@ -30,6 +30,22 @@ export {
|
|
|
30
30
|
ConsumerDeleteEligibilityApiModel,
|
|
31
31
|
DeleteConsumerMeResponse,
|
|
32
32
|
} from './consumer-account-deletion.api.model';
|
|
33
|
+
export {
|
|
34
|
+
ChargingSettingsApiModel,
|
|
35
|
+
UpdateChargingSettingsRequest,
|
|
36
|
+
} from './charging-settings.api.model';
|
|
37
|
+
export {
|
|
38
|
+
ChargingBookingApiModel,
|
|
39
|
+
ChargingBookingListApiModel,
|
|
40
|
+
ChargingBookingCountApiModel,
|
|
41
|
+
CreateChargingBookingRequest,
|
|
42
|
+
PayChargingBookingApiModel,
|
|
43
|
+
PayChargingBookingRequest,
|
|
44
|
+
CancelChargingBookingRequest,
|
|
45
|
+
BookLaterSlotApiModel,
|
|
46
|
+
BookLaterSlotListApiModel,
|
|
47
|
+
ChargingBookingVehicleApiModel,
|
|
48
|
+
} from './charging-booking.api.model';
|
|
33
49
|
export {
|
|
34
50
|
AdminConsumerListOrderBy,
|
|
35
51
|
AdminConsumerListItemApiModel,
|